From 84c49bbc022bf466456e7f51650ecd2d6514ce92 Mon Sep 17 00:00:00 2001 From: Vincent Dai <23257217+vidai-msft@users.noreply.github.com> Date: Thu, 28 Mar 2024 21:02:45 -0700 Subject: [PATCH 01/12] Fixed variable name mismatch issue (#24548) --- .../LiveTests/TestLiveScenarios.ps1 | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/src/Websites/Websites.Test/LiveTests/TestLiveScenarios.ps1 b/src/Websites/Websites.Test/LiveTests/TestLiveScenarios.ps1 index ccc481e11808..ffe62d3af328 100644 --- a/src/Websites/Websites.Test/LiveTests/TestLiveScenarios.ps1 +++ b/src/Websites/Websites.Test/LiveTests/TestLiveScenarios.ps1 @@ -3,16 +3,16 @@ Invoke-LiveTestScenario -Name "Create new web with service plan" -Description "T param ($rg) $rgName = $rg.ResourceGroupName - $webName = New-LiveTestResourceName + $webAppName = New-LiveTestResourceName $webLocation = "westus" $whpName = New-LiveTestResourceName $tier = "Shared" $serverFarm = New-AzAppServicePlan -ResourceGroupName $rgName -Name $whpName -Location $weblocation -Tier $tier - $actual = New-AzWebApp -ResourceGroupName $rgName -Name $webName -Location $webLocation -AppServicePlan $whpName - Set-AzWebApp -ResourceGroupName $rgName -Name $webName -MinTlsVersion "1.2" + $actual = New-AzWebApp -ResourceGroupName $rgName -Name $webAppName -Location $webLocation -AppServicePlan $whpName + Set-AzWebApp -ResourceGroupName $rgName -Name $webAppName -MinTlsVersion "1.2" - Assert-AreEqual $webName $actual.Name + Assert-AreEqual $webAppName $actual.Name Assert-AreEqual $serverFarm.Id $actual.ServerFarmId } @@ -21,17 +21,17 @@ Invoke-LiveTestScenario -Name "Get a webapp" -Description "Test getting a new we param ($rg) $rgName = $rg.ResourceGroupName - $webName = New-LiveTestResourceName + $webAppName = New-LiveTestResourceName $webLocation = "westus" $whpName = New-LiveTestResourceName $tier = "Shared" $serverFarm = New-AzAppServicePlan -ResourceGroupName $rgName -Name $whpName -Location $weblocation -Tier $tier - $null = New-AzWebApp -ResourceGroupName $rgName -Name $webName -Location $webLocation -AppServicePlan $whpName - Set-AzWebApp -ResourceGroupName $rgName -Name $webName -MinTlsVersion "1.2" + $null = New-AzWebApp -ResourceGroupName $rgName -Name $webAppName -Location $webLocation -AppServicePlan $whpName + Set-AzWebApp -ResourceGroupName $rgName -Name $webAppName -MinTlsVersion "1.2" - $webApp = Get-AzWebApp -ResourceGroupName $rgName -Name $webName - Assert-AreEqual $webName $webApp.Name + $webApp = Get-AzWebApp -ResourceGroupName $rgName -Name $webAppName + Assert-AreEqual $webAppName $webApp.Name Assert-AreEqual $rgName $webApp.ResourceGroup Assert-AreEqual $serverFarm.Id $webApp.ServerFarmId } @@ -51,7 +51,7 @@ Invoke-LiveTestScenario -Name "Update web app" -Description "Test updating servi $serverFarm1 = New-AzAppServicePlan -ResourceGroupName $rgName -Name $appServicePlanName1 -Location $webLocation -Tier $tier1 $serverFarm2 = New-AzAppServicePlan -ResourceGroupName $rgName -Name $appServicePlanName2 -Location $webLocation -Tier $tier2 $webApp = New-AzWebApp -ResourceGroupName $rgName -Name $webAppName -Location $webLocation -AppServicePlan $appServicePlanName1 - Set-AzWebApp -ResourceGroupName $rgName -Name $webName -MinTlsVersion "1.2" + Set-AzWebApp -ResourceGroupName $rgName -Name $webAppName -MinTlsVersion "1.2" Assert-AreEqual $webAppName $webApp.Name Assert-AreEqual $serverFarm1.Id $webApp.ServerFarmId @@ -94,18 +94,18 @@ Invoke-LiveTestScenario -Name "Delete web app" -Description "Test deleting web a param ($rg) $rgName = $rg.ResourceGroupName - $webName = New-LiveTestResourceName + $webAppName = New-LiveTestResourceName $webLocation = "westus" $whpName = New-LiveTestResourceName $tier = "Shared" $null = New-AzAppServicePlan -ResourceGroupName $rgName -Name $whpName -Location $webLocation -Tier $tier - $null = New-AzWebApp -ResourceGroupName $rgName -Name $webName -Location $webLocation -AppServicePlan $whpName - Set-AzWebApp -ResourceGroupName $rgName -Name $webName -MinTlsVersion "1.2" - Remove-AzWebApp -ResourceGroupName $rgName -Name $webName -Force + $null = New-AzWebApp -ResourceGroupName $rgName -Name $webAppName -Location $webLocation -AppServicePlan $whpName + Set-AzWebApp -ResourceGroupName $rgName -Name $webAppName -MinTlsVersion "1.2" + Remove-AzWebApp -ResourceGroupName $rgName -Name $webAppName -Force - $webappNames = (Get-AzWebApp -ResourceGroupName $rgName) | Select-Object -Property Name - Assert-False { $webappNames -contains $webName } + $webAppNames = (Get-AzWebApp -ResourceGroupName $rgName) | Select-Object -Property Name + Assert-False { $webAppNames -contains $webAppName } } Invoke-LiveTestScenario -Name "Start, Stop and Restart WebApp" -Description "Test Stop-AzWebApp, Start-AzWebApp, Restart-AzWebApp" -ScenarioScript ` @@ -113,14 +113,14 @@ Invoke-LiveTestScenario -Name "Start, Stop and Restart WebApp" -Description "Tes param ($rg) $rgName = $rg.ResourceGroupName - $webName = New-LiveTestResourceName + $webAppName = New-LiveTestResourceName $webLocation = "westus" $whpName = New-LiveTestResourceName $tier = "Shared" $null = New-AzAppServicePlan -ResourceGroupName $rgName -Name $whpName -Location $webLocation -Tier $tier - $webApp = New-AzWebApp -ResourceGroupName $rgName -Name $webName -Location $webLocation -AppServicePlan $whpName - Set-AzWebApp -ResourceGroupName $rgName -Name $webName -MinTlsVersion "1.2" + $webApp = New-AzWebApp -ResourceGroupName $rgName -Name $webAppName -Location $webLocation -AppServicePlan $whpName + Set-AzWebApp -ResourceGroupName $rgName -Name $webAppName -MinTlsVersion "1.2" # Stop web app $webApp = $webApp | Stop-AzWebApp @@ -135,14 +135,14 @@ Invoke-LiveTestScenario -Name "Start, Stop and Restart WebApp" -Description "Tes Assert-AreEqual "Running" $webApp.State # Stop web app - $webApp = Stop-AzWebApp -ResourceGroupName $rgName -Name $webName + $webApp = Stop-AzWebApp -ResourceGroupName $rgName -Name $webAppName Assert-AreEqual "Stopped" $webApp.State # Start web app - $webApp = Start-AzWebApp -ResourceGroupName $rgName -Name $webName + $webApp = Start-AzWebApp -ResourceGroupName $rgName -Name $webAppName Assert-AreEqual "Running" $webApp.State # Retart web app - $webApp = Restart-AzWebApp -ResourceGroupName $rgName -Name $webName + $webApp = Restart-AzWebApp -ResourceGroupName $rgName -Name $webAppName Assert-AreEqual "Running" $webApp.State } From b1711414db0dcd5222fcc5edafbfda62c9cbe0d3 Mon Sep 17 00:00:00 2001 From: wiboris <54044985+wiboris@users.noreply.github.com> Date: Thu, 28 Mar 2024 22:29:28 -0700 Subject: [PATCH 02/12] [Az.Batch] March update (#24440) * adding support for 2024-02-01 api * removed generated file --- src/Batch/Batch.Test/Batch.Test.csproj | 2 +- .../GetBatchPoolNodeCountsCommandTests.cs | 19 +- .../Pools/NewBatchPoolCommandTests.cs | 16 + .../BatchApplicationPackageTests.cs | 2 +- .../BatchApplicationPackageTests.ps1 | 13 +- .../ScenarioTests/CertificateTests.cs | 2 +- .../ScenarioTests/ComputeNodeTests.cs | 43 +- .../ScenarioTests/ComputeNodeTests.ps1 | 5 - .../ScenarioTests/ComputeNodeUserTests.cs | 12 +- .../ScenarioTests/ComputeNodeUserTests.ps1 | 22 + .../Batch.Test/ScenarioTests/FileTests.cs | 13 +- .../ScenarioTests/JobScheduleTests.cs | 28 +- .../ScenarioTests/JobScheduleTests.ps1 | 2 +- .../Batch.Test/ScenarioTests/JobTests.cs | 3 + .../Batch.Test/ScenarioTests/PoolTests.cs | 4 +- .../Batch.Test/ScenarioTests/PoolTests.ps1 | 23 +- .../ScenarioTests/ScenarioTestHelpers.cs | 74 +- .../Batch.Test/ScenarioTests/TaskTests.cs | 5 +- .../TestBatchAccountEndToEnd.json | 927 ++--- ...stCreateNewBatchAccountWithNoPublicIp.json | 1225 +++--- ...eateNewBatchAccountWithSystemIdentity.json | 334 +- .../TestGetBatchSupportedImages.json | 30 +- .../TestCreatePoolWithApplicationPackage.json | 235 +- .../TestUpdateApplicationPackage.json | 298 +- .../TestUpdatePoolWithApplicationPackage.json | 309 +- .../TestUploadApplicationPackage.json | 181 +- .../TestAddApplication.json | 113 +- .../TestCancelCertificateDelete.json | 1040 +---- .../TestCertificateCrudOperations.json | 96 +- ...DisableAndEnableComputeNodeScheduling.json | 1069 ++--- ...TestGetComputeNodeRemoteLoginSettings.json | 549 ++- .../TestRebootAndReimageComputeNode.json | 1045 ++++- .../TestRemoveComputeNodes.json | 1325 +----- .../TestComputeNodeUserEndToEnd.json | 757 +++- .../TestGetRemoteDesktopProtocolFile.json | 551 ++- ...TestDisableEnableTerminateJobSchedule.json | 204 +- .../TestJobScheduleCRUD.json | 538 ++- ...toFailure_ItCompletesWhenAnyTaskFails.json | 3659 ++++++++++++++++- .../TestDisableEnableTerminateJob.json | 204 +- .../TestJobCRUD.json | 200 +- .../TestGetLocationQuotas.json | 77 +- .../TestAutoScaleActions.json | 206 +- .../TestPoolCRUD.json | 208 +- .../TestResizeAndStopResizePool.json | 249 +- .../TestCreateTaskCollection.json | 228 +- .../TestListAllSubtasks.json | 415 +- .../TestTaskCRUD.json | 266 +- .../TestTerminateTask.json | 204 +- src/Batch/Batch/Batch.csproj | 2 +- src/Batch/Batch/ChangeLog.md | 7 + .../PSAutomaticOSUpgradePolicy.cs | 99 + .../Batch/Models.Generated/PSCloudPool.cs | 64 + .../Batch/Models.Generated/PSManagedDisk.cs | 63 + .../Batch/Models.Generated/PSNodeCounts.cs | 8 + src/Batch/Batch/Models.Generated/PSOSDisk.cs | 63 + .../Models.Generated/PSPoolSpecification.cs | 64 + .../PSRollingUpgradePolicy.cs | 135 + .../Models.Generated/PSSecurityProfile.cs | 102 + .../PSServiceArtifactReference.cs | 63 + .../Batch/Models.Generated/PSUefiSettings.cs | 75 + .../Batch/Models.Generated/PSUpgradePolicy.cs | 117 + .../PSVirtualMachineConfiguration.cs | 54 + .../Models.Generated/PSVirtualMachineInfo.cs | 12 + src/Batch/Batch/Models/BatchClient.Pools.cs | 15 + src/Batch/Batch/Models/NewPoolParameters.cs | 10 + src/Batch/Batch/Pools/NewBatchPoolCommand.cs | 13 +- src/Batch/Batch/help/New-AzBatchPool.md | 54 +- tools/BatchModelGenerator/Program.cs | 27 +- 68 files changed, 11419 insertions(+), 6658 deletions(-) create mode 100644 src/Batch/Batch/Models.Generated/PSAutomaticOSUpgradePolicy.cs create mode 100644 src/Batch/Batch/Models.Generated/PSManagedDisk.cs create mode 100644 src/Batch/Batch/Models.Generated/PSRollingUpgradePolicy.cs create mode 100644 src/Batch/Batch/Models.Generated/PSSecurityProfile.cs create mode 100644 src/Batch/Batch/Models.Generated/PSServiceArtifactReference.cs create mode 100644 src/Batch/Batch/Models.Generated/PSUefiSettings.cs create mode 100644 src/Batch/Batch/Models.Generated/PSUpgradePolicy.cs diff --git a/src/Batch/Batch.Test/Batch.Test.csproj b/src/Batch/Batch.Test/Batch.Test.csproj index 98839dc7c356..930edda9004a 100644 --- a/src/Batch/Batch.Test/Batch.Test.csproj +++ b/src/Batch/Batch.Test/Batch.Test.csproj @@ -13,7 +13,7 @@ - + diff --git a/src/Batch/Batch.Test/Pools/GetBatchPoolNodeCountsCommandTests.cs b/src/Batch/Batch.Test/Pools/GetBatchPoolNodeCountsCommandTests.cs index b45dbf4880c2..714cbd0503c2 100644 --- a/src/Batch/Batch.Test/Pools/GetBatchPoolNodeCountsCommandTests.cs +++ b/src/Batch/Batch.Test/Pools/GetBatchPoolNodeCountsCommandTests.cs @@ -74,7 +74,8 @@ public void WhenGetBatchPoolNodeCountsCommandIsCalledWithoutFilter_ShouldReturnA unknown: 11, unusable: 12, waitingForStartTask: 13, - total: 91), // Total + total: 91, + upgradingOS: 1), // Total LowPriority = new ProxyModels.NodeCounts( creating: 1, idle: 2, @@ -89,7 +90,8 @@ public void WhenGetBatchPoolNodeCountsCommandIsCalledWithoutFilter_ShouldReturnA unknown: 11, unusable: 12, waitingForStartTask: 13, - total: 91), // Total + total: 91, + upgradingOS: 1), // Total }; var poolNodeCounts2 = new ProxyModels.PoolNodeCounts() @@ -109,7 +111,8 @@ public void WhenGetBatchPoolNodeCountsCommandIsCalledWithoutFilter_ShouldReturnA unknown: 21, unusable: 22, waitingForStartTask: 23, - total: 221), // Total + total: 221, + upgradingOS: 1), // Total LowPriority = new ProxyModels.NodeCounts( creating: 11, idle: 12, @@ -124,7 +127,8 @@ public void WhenGetBatchPoolNodeCountsCommandIsCalledWithoutFilter_ShouldReturnA unknown: 21, unusable: 22, waitingForStartTask: 23, - total: 221), // Total + total: 221, + upgradingOS: 1), // Total }; // Simulate node state counts for two pools are returned @@ -246,6 +250,7 @@ public void WhenPSNodeCountsFormatObjectIsCalled_ShouldSerlializeNodeCountsToStr const int unusable = 12; const int waitingForStartTask = 13; const int total = 91; + const int upgradingOS = 1; var poolNodeCounts = new ProxyModels.PoolNodeCounts() { @@ -265,7 +270,8 @@ public void WhenPSNodeCountsFormatObjectIsCalled_ShouldSerlializeNodeCountsToStr unknown: unknown, unusable: unusable, waitingForStartTask: waitingForStartTask, - total: total), // Total + total: total, + upgradingOS: upgradingOS), // Total // all zero properties LowPriority = new ProxyModels.NodeCounts( creating: 0, @@ -281,7 +287,8 @@ public void WhenPSNodeCountsFormatObjectIsCalled_ShouldSerlializeNodeCountsToStr unknown: 0, unusable: 0, waitingForStartTask: 0, - total: 0), // Total + total: 0, + upgradingOS: 0), // Total }; BatchAccountContext context = BatchTestHelpers.CreateBatchContextWithKeys(); diff --git a/src/Batch/Batch.Test/Pools/NewBatchPoolCommandTests.cs b/src/Batch/Batch.Test/Pools/NewBatchPoolCommandTests.cs index fb83423c3327..a02bf8c72dd8 100644 --- a/src/Batch/Batch.Test/Pools/NewBatchPoolCommandTests.cs +++ b/src/Batch/Batch.Test/Pools/NewBatchPoolCommandTests.cs @@ -24,6 +24,7 @@ using System.Management.Automation; using Xunit; using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient; +using Microsoft.Azure.Commands.Common.Strategies; namespace Microsoft.Azure.Commands.Batch.Test.Pools { @@ -95,18 +96,27 @@ public void NewBatchPoolParametersGetPassedToRequestTest() cmdlet.InterComputeNodeCommunicationEnabled = true; cmdlet.TaskSlotsPerNode = 4; cmdlet.Metadata = new Dictionary { { "meta1", "value1" } }; + cmdlet.ResourceTag = new Dictionary { { "resource1", "value1" } }; cmdlet.ResizeTimeout = TimeSpan.FromMinutes(20); cmdlet.StartTask = new PSStartTask("cmd /c echo start task"); cmdlet.TargetDedicatedComputeNodes = 3; cmdlet.TargetLowPriorityComputeNodes = 2; cmdlet.TargetNodeCommunicationMode = Microsoft.Azure.Batch.Common.NodeCommunicationMode.Simplified; cmdlet.TaskSchedulingPolicy = new PSTaskSchedulingPolicy(Azure.Batch.Common.ComputeNodeFillType.Spread); + cmdlet.UpgradePolicy = new PSUpgradePolicy(Azure.Batch.Common.UpgradeMode.Automatic); cmdlet.VirtualMachineConfiguration = new PSVirtualMachineConfiguration(new PSImageReference("offer", "publisher", "sku"), "node agent"); cmdlet.VirtualMachineConfiguration.Extensions = new List { new PSVMExtension("sample-extension", "sample-publisher", "sample-type") { EnableAutomaticUpgrade = true }, }; cmdlet.VirtualMachineConfiguration.ContainerConfiguration = new PSContainerConfiguration() { Type = "CriCompatible" }; + cmdlet.VirtualMachineConfiguration.SecurityProfile = new PSSecurityProfile(); + cmdlet.VirtualMachineConfiguration.SecurityProfile.SecurityType = Azure.Batch.Common.SecurityTypes.TrustedLaunch; + cmdlet.VirtualMachineConfiguration.SecurityProfile.EncryptionAtHost = true; + cmdlet.VirtualMachineConfiguration.SecurityProfile.UefiSettings = new PSUefiSettings(); + cmdlet.VirtualMachineConfiguration.SecurityProfile.UefiSettings.SecureBootEnabled = true; + cmdlet.VirtualMachineConfiguration.SecurityProfile.UefiSettings.VTpmEnabled = true; + cmdlet.VirtualMachineConfiguration.ServiceArtifactReference = new PSServiceArtifactReference("testid"); cmdlet.VirtualMachineSize = "small"; cmdlet.MountConfiguration = new[] { new PSMountConfiguration(new PSAzureBlobFileSystemConfiguration("foo", "bar", "baz", AzureStorageAuthenticationKey.FromAccountKey("abc"))), @@ -141,21 +151,27 @@ public void NewBatchPoolParametersGetPassedToRequestTest() Assert.Equal(cmdlet.TaskSlotsPerNode, requestParameters.TaskSlotsPerNode); Assert.Equal(cmdlet.Metadata.Count, requestParameters.Metadata.Count); Assert.Equal(cmdlet.Metadata["meta1"], requestParameters.Metadata[0].Value); + Assert.Equal(cmdlet.ResourceTag.Count, requestParameters.ResourceTags.Count); + Assert.Equal(cmdlet.ResourceTag["resource1"], requestParameters.ResourceTags["resource1"]); Assert.Equal(cmdlet.ResizeTimeout, requestParameters.ResizeTimeout); Assert.Equal(cmdlet.StartTask.CommandLine, requestParameters.StartTask.CommandLine); Assert.Equal(cmdlet.TargetDedicatedComputeNodes, requestParameters.TargetDedicatedNodes); Assert.Equal(cmdlet.TargetLowPriorityComputeNodes, requestParameters.TargetLowPriorityNodes); Assert.Equal(cmdlet.TaskSchedulingPolicy.ComputeNodeFillType.ToString(), requestParameters.TaskSchedulingPolicy.NodeFillType.ToString()); + Assert.Equal(cmdlet.UpgradePolicy.Mode.ToString(), requestParameters.UpgradePolicy.Mode.ToString()); Assert.Equal(cmdlet.TargetNodeCommunicationMode.ToString(), NodeCommunicationMode.Simplified.ToString()); Assert.Equal(cmdlet.VirtualMachineConfiguration.NodeAgentSkuId, requestParameters.VirtualMachineConfiguration.NodeAgentSKUId); Assert.Equal(cmdlet.VirtualMachineConfiguration.ImageReference.Publisher, requestParameters.VirtualMachineConfiguration.ImageReference.Publisher); Assert.Equal(cmdlet.VirtualMachineConfiguration.ImageReference.Offer, requestParameters.VirtualMachineConfiguration.ImageReference.Offer); Assert.Equal(cmdlet.VirtualMachineConfiguration.ImageReference.Sku, requestParameters.VirtualMachineConfiguration.ImageReference.Sku); + Assert.Equal(cmdlet.VirtualMachineConfiguration.SecurityProfile.SecurityType.ToString(), requestParameters.VirtualMachineConfiguration.SecurityProfile.SecurityType.ToString()); + Assert.Equal(cmdlet.VirtualMachineConfiguration.SecurityProfile.UefiSettings.SecureBootEnabled, requestParameters.VirtualMachineConfiguration.SecurityProfile.UefiSettings.SecureBootEnabled); Assert.Equal(cmdlet.VirtualMachineConfiguration.Extensions[0].Name, requestParameters.VirtualMachineConfiguration.Extensions[0].Name); Assert.Equal(cmdlet.VirtualMachineConfiguration.Extensions[0].Publisher, requestParameters.VirtualMachineConfiguration.Extensions[0].Publisher); Assert.Equal(cmdlet.VirtualMachineConfiguration.Extensions[0].Type, requestParameters.VirtualMachineConfiguration.Extensions[0].Type); Assert.Equal(cmdlet.VirtualMachineConfiguration.Extensions[0].EnableAutomaticUpgrade, requestParameters.VirtualMachineConfiguration.Extensions[0].EnableAutomaticUpgrade); Assert.Equal(cmdlet.VirtualMachineConfiguration.ContainerConfiguration.Type, requestParameters.VirtualMachineConfiguration.ContainerConfiguration.Type); + Assert.Equal(cmdlet.VirtualMachineConfiguration.ServiceArtifactReference.Id, requestParameters.VirtualMachineConfiguration.ServiceArtifactReference.Id); Assert.Equal(cmdlet.VirtualMachineSize, requestParameters.VmSize); Assert.Equal(cmdlet.MountConfiguration[0].AzureBlobFileSystemConfiguration.AccountName, requestParameters.MountConfiguration[0].AzureBlobFileSystemConfiguration.AccountName); Assert.Equal(cmdlet.MountConfiguration[0].AzureBlobFileSystemConfiguration.AccountKey, requestParameters.MountConfiguration[0].AzureBlobFileSystemConfiguration.AccountKey); diff --git a/src/Batch/Batch.Test/ScenarioTests/BatchApplicationPackageTests.cs b/src/Batch/Batch.Test/ScenarioTests/BatchApplicationPackageTests.cs index 96ee8214d715..d26e7cfdcb2c 100644 --- a/src/Batch/Batch.Test/ScenarioTests/BatchApplicationPackageTests.cs +++ b/src/Batch/Batch.Test/ScenarioTests/BatchApplicationPackageTests.cs @@ -106,7 +106,7 @@ public void TestUpdatePoolWithApplicationPackage() { context = new ScenarioTestContext(); ScenarioTestHelpers.CreateApplicationPackage(this, context, id, version, filePath); - ScenarioTestHelpers.CreateTestPool(this, context, poolId, targetDedicated: 1, targetLowPriority: 0); + ScenarioTestHelpers.CreateTestPoolVirtualMachine(this, context, poolId, targetDedicated: 1, targetLowPriority: 0); }, () => { diff --git a/src/Batch/Batch.Test/ScenarioTests/BatchApplicationPackageTests.ps1 b/src/Batch/Batch.Test/ScenarioTests/BatchApplicationPackageTests.ps1 index 4ca5515cff1e..dfda06da1cee 100644 --- a/src/Batch/Batch.Test/ScenarioTests/BatchApplicationPackageTests.ps1 +++ b/src/Batch/Batch.Test/ScenarioTests/BatchApplicationPackageTests.ps1 @@ -79,11 +79,14 @@ function Test-CreatePoolWithApplicationPackage $apr = [Microsoft.Azure.Commands.Batch.Models.PSApplicationPackageReference[]]$apr1 # Create a pool with application package reference - $osFamily = "4" - $targetOSVersion = "*" - $paasConfiguration = New-Object Microsoft.Azure.Commands.Batch.Models.PSCloudServiceConfiguration -ArgumentList @($osFamily, $targetOSVersion) - - New-AzBatchPool -Id $poolId -CloudServiceConfiguration $paasConfiguration -TargetDedicated 3 -VirtualMachineSize "small" -BatchContext $context -ApplicationPackageReferences $apr + $vmSize = "standard_d1_v2" + $publisher = "microsoft-azure-batch" + $offer = "ubuntu-server-container" + $osSKU = "20-04-lts" + $nodeAgent = "batch.node.ubuntu 20.04" + $imageRef = New-Object Microsoft.Azure.Commands.Batch.Models.PSImageReference -ArgumentList @($offer, $publisher, $osSKU) + $iaasConfiguration = New-Object Microsoft.Azure.Commands.Batch.Models.PSVirtualMachineConfiguration -ArgumentList @($imageRef, $nodeAgent) + New-AzBatchPool -Id $poolId -VirtualMachineSize "standard_d1_v2" -TargetDedicated 3 -VirtualMachineConfiguration $iaasConfiguration -BatchContext $context -ApplicationPackageReferences $apr } finally { diff --git a/src/Batch/Batch.Test/ScenarioTests/CertificateTests.cs b/src/Batch/Batch.Test/ScenarioTests/CertificateTests.cs index 678127d37f0b..cd7e79b272a0 100644 --- a/src/Batch/Batch.Test/ScenarioTests/CertificateTests.cs +++ b/src/Batch/Batch.Test/ScenarioTests/CertificateTests.cs @@ -57,7 +57,7 @@ public void TestCancelCertificateDelete() certRef.ThumbprintAlgorithm = BatchTestHelpers.TestCertificateAlgorithm; certRef.Thumbprint = thumbprint; certRef.Visibility = CertificateVisibility.Task; - ScenarioTestHelpers.CreateTestPool(this, context, poolId, targetDedicated: 0, targetLowPriority: 0, certReference: certRef); + ScenarioTestHelpers.CreateTestPoolVirtualMachine(this, context, poolId, targetDedicated: 0, targetLowPriority: 0, certReference: certRef); ScenarioTestHelpers.DeleteTestCertificate(this, context, BatchTestHelpers.TestCertificateAlgorithm, thumbprint); ScenarioTestHelpers.WaitForCertificateToFailDeletion(this, context, BatchTestHelpers.TestCertificateAlgorithm, thumbprint); }, diff --git a/src/Batch/Batch.Test/ScenarioTests/ComputeNodeTests.cs b/src/Batch/Batch.Test/ScenarioTests/ComputeNodeTests.cs index 48c2715d1e40..1977b0d8dbd7 100644 --- a/src/Batch/Batch.Test/ScenarioTests/ComputeNodeTests.cs +++ b/src/Batch/Batch.Test/ScenarioTests/ComputeNodeTests.cs @@ -12,7 +12,9 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Batch; using Microsoft.WindowsAzure.Commands.ScenarioTest; +using System; using Xunit; namespace Microsoft.Azure.Commands.Batch.Test.ScenarioTests @@ -33,12 +35,28 @@ public void TestRemoveComputeNodes() { BatchAccountContext context = null; string removeNodePoolId = "removenodepool"; + UpgradePolicy upgradePolicy = new UpgradePolicy(Azure.Batch.Common.UpgradeMode.Automatic); + upgradePolicy.AutomaticOSUpgradePolicy = new AutomaticOSUpgradePolicy(); + upgradePolicy.AutomaticOSUpgradePolicy.DisableAutomaticRollback = true; + upgradePolicy.AutomaticOSUpgradePolicy.EnableAutomaticOSUpgrade = true; + upgradePolicy.AutomaticOSUpgradePolicy.UseRollingUpgradePolicy = true; + upgradePolicy.AutomaticOSUpgradePolicy.OsRollingUpgradeDeferral = true; + + upgradePolicy.RollingUpgradePolicy = new RollingUpgradePolicy(); + upgradePolicy.RollingUpgradePolicy.EnableCrossZoneUpgrade = true; + upgradePolicy.RollingUpgradePolicy.MaxBatchInstancePercent = 20; + upgradePolicy.RollingUpgradePolicy.MaxUnhealthyUpgradedInstancePercent = 20; + upgradePolicy.RollingUpgradePolicy.MaxUnhealthyInstancePercent = 20; + upgradePolicy.RollingUpgradePolicy.PauseTimeBetweenBatches = TimeSpan.FromSeconds(5); + upgradePolicy.RollingUpgradePolicy.PrioritizeUnhealthyInstances = false; + upgradePolicy.RollingUpgradePolicy.RollbackFailedInstancesOnPolicyBreach = false; + TestRunner.RunTestScript( null, mockContext => { context = new ScenarioTestContext(); - ScenarioTestHelpers.CreateTestPool(this, context, removeNodePoolId, targetDedicated: 2, targetLowPriority: 0); + ScenarioTestHelpers.CreateTestPoolVirtualMachine(this, context, removeNodePoolId, targetDedicated: 2, targetLowPriority: 0, upgradePolicy: upgradePolicy); ScenarioTestHelpers.WaitForSteadyPoolAllocation(this, context, removeNodePoolId); }, () => @@ -53,10 +71,15 @@ public void TestRemoveComputeNodes() [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestRebootAndReimageComputeNode() { + BatchAccountContext context = null; + string poolId = "rebootandreimagenodepool"; + TestRunner.RunTestScript( mockContext => { - _ = new ScenarioTestContext(); + context = new ScenarioTestContext(); + ScenarioTestHelpers.CreateTestPoolVirtualMachine(this, context, poolId, targetDedicated: 2, targetLowPriority: 0); + ScenarioTestHelpers.WaitForSteadyPoolAllocation(this, context, poolId); }, $"Test-RebootAndReimageComputeNode '{poolId}'" ); @@ -66,10 +89,15 @@ public void TestRebootAndReimageComputeNode() [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestDisableAndEnableComputeNodeScheduling() { + BatchAccountContext context = null; + string poolId = "disableandenablenodepool"; + TestRunner.RunTestScript( mockContext => { - _ = new ScenarioTestContext(); + context = new ScenarioTestContext(); + ScenarioTestHelpers.CreateTestPoolVirtualMachine(this, context, poolId, targetDedicated: 2, targetLowPriority: 0); + ScenarioTestHelpers.WaitForSteadyPoolAllocation(this, context, poolId); }, $"Test-DisableAndEnableComputeNodeScheduling '{poolId}'" ); @@ -79,12 +107,17 @@ public void TestDisableAndEnableComputeNodeScheduling() [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestGetComputeNodeRemoteLoginSettings() { + BatchAccountContext context = null; + string poolId = "noderemoteloginpool"; + TestRunner.RunTestScript( mockContext => { - _ = new ScenarioTestContext(); + context = new ScenarioTestContext(); + ScenarioTestHelpers.CreateTestPoolVirtualMachine(this, context, poolId, targetDedicated: 2, targetLowPriority: 0); + ScenarioTestHelpers.WaitForSteadyPoolAllocation(this, context, poolId); }, - $"Test-GetRemoteLoginSettings '{iaasPoolId}'" + $"Test-GetRemoteLoginSettings '{poolId}'" ); } } diff --git a/src/Batch/Batch.Test/ScenarioTests/ComputeNodeTests.ps1 b/src/Batch/Batch.Test/ScenarioTests/ComputeNodeTests.ps1 index d18d3877366c..2c70689fef61 100644 --- a/src/Batch/Batch.Test/ScenarioTests/ComputeNodeTests.ps1 +++ b/src/Batch/Batch.Test/ScenarioTests/ComputeNodeTests.ps1 @@ -72,11 +72,6 @@ function Test-RebootAndReimageComputeNode Get-AzBatchComputeNode $poolId $computeNodeId -BatchContext $context | Restart-AzBatchComputeNode -RebootOption $rebootOption -BatchContext $context $computeNode = Get-AzBatchComputeNode -PoolId $poolId $computeNodeId -BatchContext $context Assert-AreEqual 'Rebooting' $computeNode.State - - # Reimage a node - Get-AzBatchComputeNode $poolId $computeNodeId2 -BatchContext $context | Reset-AzBatchComputeNode -ReimageOption $reimageOption -BatchContext $context - $computeNode2 = Get-AzBatchComputeNode -PoolId $poolId $computeNodeId2 -BatchContext $context - Assert-AreEqual 'Reimaging' $computeNode2.State } <# diff --git a/src/Batch/Batch.Test/ScenarioTests/ComputeNodeUserTests.cs b/src/Batch/Batch.Test/ScenarioTests/ComputeNodeUserTests.cs index 77574754b44b..f3c023c72cc1 100644 --- a/src/Batch/Batch.Test/ScenarioTests/ComputeNodeUserTests.cs +++ b/src/Batch/Batch.Test/ScenarioTests/ComputeNodeUserTests.cs @@ -30,10 +30,20 @@ public ComputeNodeUserTests(Xunit.Abstractions.ITestOutputHelper output) : base( [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestComputeNodeUserEndToEnd() { + BatchAccountContext context = null; + string poolId = "computenodeuserendtoendpool"; + TestRunner.RunTestScript( + null, mockContext => { - _ = new ScenarioTestContext(); + context = new ScenarioTestContext(); + ScenarioTestHelpers.CreateTestPoolVirtualMachine(this, context, poolId, targetDedicated: 2, targetLowPriority: 0); + ScenarioTestHelpers.WaitForSteadyPoolAllocation(this, context, poolId); + }, + () => + { + ScenarioTestHelpers.DeletePool(this, context, poolId); }, $"Test-ComputeNodeUserEndToEnd '{poolId}'" ); diff --git a/src/Batch/Batch.Test/ScenarioTests/ComputeNodeUserTests.ps1 b/src/Batch/Batch.Test/ScenarioTests/ComputeNodeUserTests.ps1 index dc13b7af3988..80f5b088aa5d 100644 --- a/src/Batch/Batch.Test/ScenarioTests/ComputeNodeUserTests.ps1 +++ b/src/Batch/Batch.Test/ScenarioTests/ComputeNodeUserTests.ps1 @@ -27,6 +27,8 @@ function Test-ComputeNodeUserEndToEnd $computeNodes = Get-AzBatchComputeNode -PoolId $poolId -BatchContext $context $computeNodeId = $computeNodes[0].Id + WaitForIdleComputeNode $context $poolId $computeNodeId + # Create a user New-AzBatchComputeNodeUser -PoolId $poolId -ComputeNodeId $computeNodeId -Name $userName -Password $password1 -BatchContext $context @@ -42,4 +44,24 @@ function Test-ComputeNodeUserEndToEnd # Verify the user was deleted # There is currently no Get/List user API, so try to delete the user again and verify that it fails. Assert-Throws { Remove-AzBatchComputeNodeUser -PoolId $poolId -ComputeNodeId $computeNodeId -Name $userName -BatchContext $context } +} + +function WaitForIdleComputeNode +{ + param([Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ScenarioTestContext]$context, [string]$poolId, [string]$computeNodeId) + + $start = [DateTime]::Now + $timeout = Compute-TestTimeout 600 + $end = $start.AddSeconds($timeout) + + $computeNode = Get-AzBatchComputeNode -Id $computeNodeId -PoolId $poolId -BatchContext $context -Select "id,state" + while ($computeNode.State -ne 'idle') + { + if ([DateTime]::Now -gt $end) + { + throw [System.TimeoutException] "Timed out waiting for idle compute node" + } + Start-TestSleep -Seconds 5 + $computeNode = Get-AzBatchComputeNode -Id $computeNodeId -PoolId $poolId -BatchContext $context -Select "id,state" + } } \ No newline at end of file diff --git a/src/Batch/Batch.Test/ScenarioTests/FileTests.cs b/src/Batch/Batch.Test/ScenarioTests/FileTests.cs index dc8aa3c0f4e7..c2fa3c0bad4f 100644 --- a/src/Batch/Batch.Test/ScenarioTests/FileTests.cs +++ b/src/Batch/Batch.Test/ScenarioTests/FileTests.cs @@ -75,18 +75,7 @@ public void TestGetNodeFileContentByComputeNode() ); } - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestGetRemoteDesktopProtocolFile() - { - TestRunner.RunTestScript( - mockContext => - { - _ = new ScenarioTestContext(); - }, - $"Test-GetRDPFile '{poolId}'" - ); - } + [Fact(Skip = "Successful re-recording, but fails in playback. See issue https://github.com/Azure/azure-powershell/issues/7512")] [Trait(Category.AcceptanceType, Category.CheckIn)] diff --git a/src/Batch/Batch.Test/ScenarioTests/JobScheduleTests.cs b/src/Batch/Batch.Test/ScenarioTests/JobScheduleTests.cs index ff8fee5da20f..22dfb1eee65e 100644 --- a/src/Batch/Batch.Test/ScenarioTests/JobScheduleTests.cs +++ b/src/Batch/Batch.Test/ScenarioTests/JobScheduleTests.cs @@ -12,6 +12,7 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.Batch.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Xunit; @@ -28,7 +29,32 @@ public JobScheduleTests(Xunit.Abstractions.ITestOutputHelper output) : base(outp [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestJobScheduleCRUD() { - TestRunner.RunTestScript("Test-JobScheduleCRUD"); + BatchAccountContext context = null; + string poolId1 = "testPool"; + string poolId2 = "testPool2"; + + TestRunner.RunTestScript( + null, + mockContext => + { + context = new ScenarioTestContext(); + ScenarioTestHelpers.CreateTestPoolVirtualMachine(this, context, poolId1, targetDedicated: 2, targetLowPriority: 0); + ScenarioTestHelpers.WaitForSteadyPoolAllocation(this, context, poolId1); + + ScenarioTestHelpers.CreateTestPoolVirtualMachine(this, context, poolId2, targetDedicated: 2, targetLowPriority: 0); + ScenarioTestHelpers.WaitForSteadyPoolAllocation(this, context, poolId2); + }, + () => + { + + ScenarioTestHelpers.DeletePool(this, context, poolId1); + ScenarioTestHelpers.DeletePool(this, context, poolId2); + }, + $"Test-JobScheduleCRUD" + ); + + + } diff --git a/src/Batch/Batch.Test/ScenarioTests/JobScheduleTests.ps1 b/src/Batch/Batch.Test/ScenarioTests/JobScheduleTests.ps1 index aefb11311b3b..c770e3e1da21 100644 --- a/src/Batch/Batch.Test/ScenarioTests/JobScheduleTests.ps1 +++ b/src/Batch/Batch.Test/ScenarioTests/JobScheduleTests.ps1 @@ -36,7 +36,7 @@ function Test-JobScheduleCRUD $jobSpec2.PoolInformation = New-Object Microsoft.Azure.Commands.Batch.Models.PSPoolInformation $jobSpec2.PoolInformation.PoolId = "testPool2" $schedule2 = New-Object Microsoft.Azure.Commands.Batch.Models.PSSchedule - $schedule2.DoNotRunUntil = New-Object System.DateTime -ArgumentList @(2024, 01, 01, 12, 30, 0) + $schedule2.DoNotRunUntil = New-Object System.DateTime -ArgumentList @(2024, 12, 01, 12, 30, 0) New-AzBatchJobSchedule -Id $jsId2 -JobSpecification $jobSpec2 -Schedule $schedule2 -BatchContext $context # List the job schedules to ensure they were created diff --git a/src/Batch/Batch.Test/ScenarioTests/JobTests.cs b/src/Batch/Batch.Test/ScenarioTests/JobTests.cs index 362faaf85f25..1fa871f10cd3 100644 --- a/src/Batch/Batch.Test/ScenarioTests/JobTests.cs +++ b/src/Batch/Batch.Test/ScenarioTests/JobTests.cs @@ -69,6 +69,9 @@ public void IfJobSetsAutoFailure_ItCompletesWhenAnyTaskFails() mockContext => { context = new ScenarioTestContext(); + ScenarioTestHelpers.CreateTestPoolVirtualMachine(this, context, poolId, targetDedicated: 2, targetLowPriority: 0); + ScenarioTestHelpers.WaitForSteadyPoolAllocation(this, context, poolId); + }, () => { diff --git a/src/Batch/Batch.Test/ScenarioTests/PoolTests.cs b/src/Batch/Batch.Test/ScenarioTests/PoolTests.cs index b903762510c8..bc31edd06d30 100644 --- a/src/Batch/Batch.Test/ScenarioTests/PoolTests.cs +++ b/src/Batch/Batch.Test/ScenarioTests/PoolTests.cs @@ -47,7 +47,7 @@ public void TestResizeAndStopResizePool() mockContext => { context = new ScenarioTestContext(); - ScenarioTestHelpers.CreateTestPool(this, context, poolId, targetDedicated: 0, targetLowPriority: 0); + ScenarioTestHelpers.CreateTestPoolVirtualMachine(this, context, poolId, targetDedicated: 0, targetLowPriority: 0); }, () => { @@ -69,7 +69,7 @@ public void TestAutoScaleActions() mockContext => { context = new ScenarioTestContext(); - ScenarioTestHelpers.CreateTestPool(this, context, poolId, targetDedicated: 0, targetLowPriority: 0); + ScenarioTestHelpers.CreateTestPoolVirtualMachine(this, context, poolId, targetDedicated: 0, targetLowPriority: 0); }, () => { diff --git a/src/Batch/Batch.Test/ScenarioTests/PoolTests.ps1 b/src/Batch/Batch.Test/ScenarioTests/PoolTests.ps1 index 42b0f3ce6338..3cde52497b6d 100644 --- a/src/Batch/Batch.Test/ScenarioTests/PoolTests.ps1 +++ b/src/Batch/Batch.Test/ScenarioTests/PoolTests.ps1 @@ -29,9 +29,21 @@ function Test-PoolCRUD $osFamily = "4" $targetOSVersion = "*" $targetDedicated = 0 - $vmSize = "small" - $paasConfiguration = New-Object Microsoft.Azure.Commands.Batch.Models.PSCloudServiceConfiguration -ArgumentList @($osFamily, $targetOSVersion) - New-AzBatchPool $poolId1 -CloudServiceConfiguration $paasConfiguration -TargetDedicated $targetDedicated -VirtualMachineSize $vmSize -BatchContext $context + + $vmSize = "standard_d1_v2" + $publisher = "microsoft-azure-batch" + $offer = "ubuntu-server-container" + $osSKU = "20-04-lts" + $nodeAgent = "batch.node.ubuntu 20.04" + $imageRef = New-Object Microsoft.Azure.Commands.Batch.Models.PSImageReference -ArgumentList @($offer, $publisher, $osSKU) + $iaasConfiguration = New-Object Microsoft.Azure.Commands.Batch.Models.PSVirtualMachineConfiguration -ArgumentList @($imageRef, $nodeAgent) + $iaasConfiguration.ContainerConfiguration = New-Object Microsoft.Azure.Commands.Batch.Models.PSContainerConfiguration + $iaasConfiguration.ContainerConfiguration.ContainerImageNames = New-Object System.Collections.Generic.List[string] + $iaasConfiguration.ContainerConfiguration.ContainerImageNames.Add("test1") + $iaasConfiguration.ContainerConfiguration.type = "dockerCompatible" + + New-AzBatchPool $poolId1 -VirtualMachineConfiguration $iaasConfiguration -TargetDedicated $targetDedicated -VirtualMachineSize $vmSize -BatchContext $context + $vmSize = "standard_d1_v2" $publisher = "microsoft-azure-batch" @@ -42,8 +54,9 @@ function Test-PoolCRUD $iaasConfiguration = New-Object Microsoft.Azure.Commands.Batch.Models.PSVirtualMachineConfiguration -ArgumentList @($imageRef, $nodeAgent) $iaasConfiguration.ContainerConfiguration = New-Object Microsoft.Azure.Commands.Batch.Models.PSContainerConfiguration $iaasConfiguration.ContainerConfiguration.ContainerImageNames = New-Object System.Collections.Generic.List[string] - $iaasConfiguration.ContainerConfiguration.ContainerImageNames.Add("test") + $iaasConfiguration.ContainerConfiguration.ContainerImageNames.Add("test2") $iaasConfiguration.ContainerConfiguration.type = "dockerCompatible" + New-AzBatchPool $poolId2 -VirtualMachineConfiguration $iaasConfiguration -TargetDedicated $targetDedicated -VirtualMachineSize $vmSize -BatchContext $context # List the pools to ensure they were created @@ -56,7 +69,7 @@ function Test-PoolCRUD # Ensure that some of the properties were set correctly Assert-NotNull $pool2.VirtualMachineConfiguration.ContainerConfiguration Assert-NotNull $pool2.VirtualMachineConfiguration.ContainerConfiguration.ContainerImageNames - Assert-AreEqual "test" $pool2.VirtualMachineConfiguration.ContainerConfiguration.ContainerImageNames[0] + Assert-AreEqual "test2" $pool2.VirtualMachineConfiguration.ContainerConfiguration.ContainerImageNames[0] # Update a pool $startTaskCmd = "/bin/bash -c 'echo start task'" diff --git a/src/Batch/Batch.Test/ScenarioTests/ScenarioTestHelpers.cs b/src/Batch/Batch.Test/ScenarioTests/ScenarioTestHelpers.cs index f648b7f63359..e5c0cb55a111 100644 --- a/src/Batch/Batch.Test/ScenarioTests/ScenarioTestHelpers.cs +++ b/src/Batch/Batch.Test/ScenarioTests/ScenarioTestHelpers.cs @@ -37,6 +37,7 @@ using BatchAccountCreateParameters = Microsoft.Azure.Management.Batch.Models.BatchAccountCreateParameters; using BatchAccountKeys = Microsoft.Azure.Management.Batch.Models.BatchAccountKeys; using ApplicationPackage = Microsoft.Azure.Management.Batch.Models.ApplicationPackage; +using System.Security.Policy; namespace Microsoft.Azure.Commands.Batch.Test.ScenarioTests @@ -194,7 +195,8 @@ public static void CreateTestPool( int? targetDedicated, int? targetLowPriority, CertificateReference certReference = null, - StartTask startTask = null) + StartTask startTask = null, + UpgradePolicy upgradePolicy = null) { PSCertificateReference[] certReferences = null; if (certReference != null) @@ -207,8 +209,14 @@ public static void CreateTestPool( psStartTask = new PSStartTask(startTask); } - PSCloudServiceConfiguration paasConfiguration = new PSCloudServiceConfiguration("4", "*"); + PSUpgradePolicy psUpgradePolicy = null; + if (upgradePolicy != null) + { + psUpgradePolicy = new PSUpgradePolicy(upgradePolicy); + } + PSCloudServiceConfiguration paasConfiguration = new PSCloudServiceConfiguration("4", "*"); + NewPoolParameters parameters = new NewPoolParameters(context, poolId) { VirtualMachineSize = "standard_d1_v2", @@ -216,6 +224,7 @@ public static void CreateTestPool( TargetDedicatedComputeNodes = targetDedicated, TargetLowPriorityComputeNodes = targetLowPriority, CertificateReferences = certReferences, + UpgradePolicy = psUpgradePolicy, StartTask = psStartTask, InterComputeNodeCommunicationEnabled = true, TargetCommunicationMode = NodeCommunicationMode.Classic @@ -224,6 +233,63 @@ public static void CreateTestPool( CreatePoolIfNotExists(runner, parameters); } + /// + /// Creates a test pool for use in Scenario tests. + /// + public static void CreateTestPoolVirtualMachine( + BatchTestRunner runner, + BatchAccountContext context, + string poolId, + int? targetDedicated, + int? targetLowPriority, + CertificateReference certReference = null, + StartTask startTask = null, + UpgradePolicy upgradePolicy = null) + { + PSCertificateReference[] certReferences = null; + if (certReference != null) + { + certReferences = new PSCertificateReference[] { new PSCertificateReference(certReference) }; + } + PSStartTask psStartTask = null; + if (startTask != null) + { + psStartTask = new PSStartTask(startTask); + } + + PSUpgradePolicy psUpgradePolicy = null; + if (upgradePolicy != null) + { + psUpgradePolicy = new PSUpgradePolicy(upgradePolicy); + } + + string vmSize = "STANDARD_D2S_V3"; + string publisher = "canonical"; + string offer = "0001-com-ubuntu-server-focal"; + string sku = "20_04-lts"; + string nodeAgent = "batch.node.ubuntu 20.04"; + + PSImageReference imageReference = new PSImageReference(offer: offer, publisher: publisher, sku: sku); + PSVirtualMachineConfiguration vmConfiguration = new PSVirtualMachineConfiguration(imageReference, nodeAgent); + vmConfiguration.NodePlacementConfiguration = new PSNodePlacementConfiguration(NodePlacementPolicyType.Zonal); + + NewPoolParameters parameters = new NewPoolParameters(context, poolId) + { + VirtualMachineSize = vmSize, + VirtualMachineConfiguration = vmConfiguration, + TargetDedicatedComputeNodes = targetDedicated, + TargetLowPriorityComputeNodes = targetLowPriority, + CertificateReferences = certReferences, + UpgradePolicy = psUpgradePolicy, + StartTask = psStartTask, + TaskSlotsPerNode = 1, + InterComputeNodeCommunicationEnabled = true + }; + + CreatePoolIfNotExists(runner, parameters); + } + + public static void CreatePoolIfNotExists( BatchTestRunner runner, NewPoolParameters poolParameters) @@ -269,7 +335,7 @@ public static void CreateMpiPoolIfNotExists(BatchTestRunner runner, BatchAccount // We got the pool not found error, so continue and create the pool } - CreateTestPool(runner, context, MpiPoolId, targetDedicated, targetLowPriority: 0); + CreateTestPoolVirtualMachine(runner, context, MpiPoolId, targetDedicated, targetLowPriority: 0); } public static void WaitForSteadyPoolAllocation(BatchTestRunner runner, BatchAccountContext context, string poolId) @@ -399,7 +465,7 @@ public static void CreateTestTask(BatchTestRunner runner, BatchAccountContext co PSMultiInstanceSettings multiInstanceSettings = null; if (numInstances > 1) { - multiInstanceSettings = new PSMultiInstanceSettings("cmd /c echo coordinating", numInstances); + multiInstanceSettings = new PSMultiInstanceSettings("/bin/bash -c 'echo coordinating'", numInstances); } NewTaskParameters parameters = new NewTaskParameters(context, jobId, null, taskId) diff --git a/src/Batch/Batch.Test/ScenarioTests/TaskTests.cs b/src/Batch/Batch.Test/ScenarioTests/TaskTests.cs index d9bb46fc9d03..bbe4b42ee6f3 100644 --- a/src/Batch/Batch.Test/ScenarioTests/TaskTests.cs +++ b/src/Batch/Batch.Test/ScenarioTests/TaskTests.cs @@ -12,6 +12,7 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Management.Batch.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Xunit; @@ -105,9 +106,11 @@ public void TestListAllSubtasks() mockContext => { context = new ScenarioTestContext(); + //ScenarioTestHelpers.CreateTestPoolVirtualMachine(this, context, "mpiPool", targetDedicated: 2, targetLowPriority: 0); + ScenarioTestHelpers.CreateMpiPoolIfNotExists(this, context); ScenarioTestHelpers.CreateTestJob(this, context, jobId, ScenarioTestHelpers.MpiPoolId); - ScenarioTestHelpers.CreateTestTask(this, context, jobId, taskId, "cmd /c hostname", numInstances); + ScenarioTestHelpers.CreateTestTask(this, context, jobId, taskId, "/bin/bash -c 'echo task'", numInstances); ScenarioTestHelpers.WaitForTaskCompletion(this, context, jobId, taskId); }, () => diff --git a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestBatchAccountEndToEnd.json b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestBatchAccountEndToEnd.json index 2964110877cb..268c514edf7b 100644 --- a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestBatchAccountEndToEnd.json +++ b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestBatchAccountEndToEnd.json @@ -1,21 +1,21 @@ { "Entries": [ { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/providers/Microsoft.Batch?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Byb3ZpZGVycy9NaWNyb3NvZnQuQmF0Y2g/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/providers/Microsoft.Batch?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQmF0Y2g/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", "RequestMethod": "GET", "RequestHeaders": { "x-ms-client-request-id": [ - "251bddff-3b4e-412a-ade2-fb9a8190d8a9" + "aef7da52-fb43-4362-a0b8-23b4bf7ecfb8" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" ] }, "RequestBody": "", @@ -30,13 +30,13 @@ "11999" ], "x-ms-request-id": [ - "a796fd76-3941-410d-826e-0ac2298463d0" + "4cba3248-8259-4998-ae7b-7a14a4018d35" ], "x-ms-correlation-request-id": [ - "a796fd76-3941-410d-826e-0ac2298463d0" + "4cba3248-8259-4998-ae7b-7a14a4018d35" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072719Z:a796fd76-3941-410d-826e-0ac2298463d0" + "WESTUS2:20240321T225736Z:4cba3248-8259-4998-ae7b-7a14a4018d35" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -44,38 +44,44 @@ "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: D404AADBBBE24D7E8CEE624F0C277C5F Ref B: CO6AA3150217027 Ref C: 2024-03-21T22:57:36Z" + ], "Date": [ - "Fri, 16 Jun 2023 07:27:19 GMT" + "Thu, 21 Mar 2024 22:57:35 GMT" + ], + "Content-Length": [ + "14538" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" - ], - "Content-Length": [ - "9611" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"authorization\": {\r\n \"applicationId\": \"ddbf3205-c6bd-46ae-8127-60eb93363864\",\r\n \"roleDefinitionId\": \"b7f84953-1d03-4eab-9ea4-45f065258ff8\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\",\r\n \"2017-01-01\",\r\n \"2015-12-01\",\r\n \"2015-09-01\",\r\n \"2015-07-01\",\r\n \"2014-05-01-privatepreview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"batchAccounts/pools\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"batchAccounts/detectors\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"batchAccounts/certificates\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\",\r\n \"2017-01-01\",\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\",\r\n \"2017-01-01\",\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\",\r\n \"2017-01-01\",\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/checkNameAvailability\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/accountOperationResults\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\",\r\n \"2017-01-01\",\r\n \"2015-12-01\",\r\n \"2015-09-01\",\r\n \"2015-07-01\",\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/virtualMachineSkus\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/cloudServiceSkus\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"authorization\": {\r\n \"applicationId\": \"ddbf3205-c6bd-46ae-8127-60eb93363864\",\r\n \"roleDefinitionId\": \"b7f84953-1d03-4eab-9ea4-45f065258ff8\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\",\r\n \"2017-01-01\",\r\n \"2015-12-01\",\r\n \"2015-09-01\",\r\n \"2015-07-01\",\r\n \"2014-05-01-privatepreview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"batchAccounts/pools\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"batchAccounts/detectors\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"batchAccounts/certificates\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"batchAccounts/operationResults\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\",\r\n \"2017-01-01\",\r\n \"2015-12-01\",\r\n \"2015-09-01\",\r\n \"2015-07-01\",\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"batchAccounts/poolOperationResults\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"batchAccounts/certificateOperationResults\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"batchAccounts/privateEndpointConnectionProxyResults\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"batchAccounts/privateEndpointConnectionResults\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\",\r\n \"2017-01-01\",\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\",\r\n \"2017-01-01\",\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\",\r\n \"2017-01-01\",\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/checkNameAvailability\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/accountOperationResults\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\",\r\n \"2017-01-01\",\r\n \"2015-12-01\",\r\n \"2015-09-01\",\r\n \"2015-07-01\",\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/virtualMachineSkus\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/cloudServiceSkus\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourcegroups/ps2061?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlZ3JvdXBzL3BzMjA2MT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourcegroups/ps1803?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlZ3JvdXBzL3BzMTgwMz9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", "RequestMethod": "PUT", "RequestHeaders": { "x-ms-client-request-id": [ - "b1590dbd-7ca3-4a8e-b096-01604d7f88b2" + "57efa0e6-42ae-4f58-8eb2-9288fec29933" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" ], "Content-Type": [ "application/json; charset=utf-8" @@ -96,13 +102,13 @@ "1199" ], "x-ms-request-id": [ - "69d90843-582a-4cb6-9bfa-39b8dc50db12" + "e026f2e8-8507-4191-b3ab-658f48f0816b" ], "x-ms-correlation-request-id": [ - "69d90843-582a-4cb6-9bfa-39b8dc50db12" + "e026f2e8-8507-4191-b3ab-658f48f0816b" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072723Z:69d90843-582a-4cb6-9bfa-39b8dc50db12" + "WESTUS2:20240321T225736Z:e026f2e8-8507-4191-b3ab-658f48f0816b" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -110,8 +116,14 @@ "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 7FC955A1465840C7BBD9F72139D1EE16 Ref B: CO6AA3150217027 Ref C: 2024-03-21T22:57:36Z" + ], "Date": [ - "Fri, 16 Jun 2023 07:27:22 GMT" + "Thu, 21 Mar 2024 22:57:36 GMT" ], "Content-Length": [ "166" @@ -123,24 +135,24 @@ "-1" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2061\",\r\n \"name\": \"ps2061\",\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1803\",\r\n \"name\": \"ps1803\",\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", "StatusCode": 201 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2061/providers/Microsoft.Batch/batchAccounts/ps3615?api-version=2022-10-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzL3BzMjA2MS9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvcHMzNjE1P2FwaS12ZXJzaW9uPTIwMjItMTAtMDE=", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1803/providers/Microsoft.Batch/batchAccounts/ps9231?api-version=2022-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL3BzMTgwMy9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvcHM5MjMxP2FwaS12ZXJzaW9uPTIwMjItMTAtMDE=", "RequestMethod": "PUT", "RequestHeaders": { "x-ms-client-request-id": [ - "e4ea5f46-d304-482b-9a0e-3718c4dc5380" + "425250c1-0bee-452b-97f7-15bb545f09b0" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Batch.BatchManagementClient/14.2.0.0" ], "Content-Type": [ @@ -159,13 +171,13 @@ "no-cache" ], "Location": [ - "https://management.azure.com/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2061/providers/Microsoft.Batch/batchAccounts/ps3615/operationResults/2eef840a-604c-4cdf-82ad-dc1e2fc3914f?api-version=2022-10-01" + "https://management.azure.com/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1803/providers/Microsoft.Batch/batchAccounts/ps9231/operationResults/ce71546b-7538-43e7-9872-45dfe40b1f70?api-version=2022-10-01&t=638466586584189001&c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOVFiSMi9Sg6cKnrBuPHbDk_Zwa1ZNYHwLVPJArEI9N2bLrgd1mU0ZdNVcdf6rtZCkUUuCe3vxnVTGwufpwH9GPWDgJOpJoL9wgKOzUDiHL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1vShkKYT6P3cfLuJPAy5HZcp24YOyu6XI5Lt9a4qscmeoh2JmKP5gkqc9V0lX2Dl3G5ngSGIA5LyAkoLoZoCgfbWVvZaxf6R_MkvDc2LQTvCYvmHAnkklsZVWUHvNCn8EFnmnDdDPHwo3ccEVKEhtVkw9dE3dvKqhC8Q&h=UrBLQVXV1myxUWzqeFHCF6Uo2d7ya8Cqck9TuMRAiYM" ], "Retry-After": [ "15" ], "x-ms-request-id": [ - "2eef840a-604c-4cdf-82ad-dc1e2fc3914f" + "ce71546b-7538-43e7-9872-45dfe40b1f70" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -173,20 +185,23 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], "x-ms-correlation-request-id": [ - "6e5af401-1c9b-44f5-a577-108192f4978a" + "39838d6b-e688-4f72-89a4-97ca8cc3ee22" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072730Z:6e5af401-1c9b-44f5-a577-108192f4978a" + "WESTUS2:20240321T225738Z:39838d6b-e688-4f72-89a4-97ca8cc3ee22" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 0C47E822AD624B9A89BE4D2796E0015E Ref B: CO6AA3150219053 Ref C: 2024-03-21T22:57:37Z" ], "Date": [ - "Fri, 16 Jun 2023 07:27:30 GMT" + "Thu, 21 Mar 2024 22:57:37 GMT" ], "Expires": [ "-1" @@ -199,20 +214,20 @@ "StatusCode": 202 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2061/providers/Microsoft.Batch/batchAccounts/ps3615?api-version=2022-10-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzL3BzMjA2MS9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvcHMzNjE1P2FwaS12ZXJzaW9uPTIwMjItMTAtMDE=", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1803/providers/Microsoft.Batch/batchAccounts/ps9231?api-version=2022-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL3BzMTgwMy9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvcHM5MjMxP2FwaS12ZXJzaW9uPTIwMjItMTAtMDE=", "RequestMethod": "PUT", "RequestHeaders": { "x-ms-client-request-id": [ - "7daa70c3-7657-4b00-b24c-99899a784b08" + "2e9f25c6-f830-4277-8a47-78fc676bda07" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Batch.BatchManagementClient/14.2.0.0" ], "Content-Type": [ @@ -231,13 +246,10 @@ "no-cache" ], "ETag": [ - "\"0x8DB6E3B2F413DFF\"" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1198" + "\"0x8DC49FA57CD7B64\"" ], "x-ms-request-id": [ - "f63a0190-2515-4920-a5c8-c63c538deaf5" + "7573c73a-336f-4815-ba92-cfaff94763c8" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -245,20 +257,26 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" ], "x-ms-correlation-request-id": [ - "2acecb63-4672-4e91-a988-8f37b82ef352" + "4a37b743-a014-4d0b-aae5-0615de3fc006" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072749Z:2acecb63-4672-4e91-a988-8f37b82ef352" + "WESTUS2:20240321T225754Z:4a37b743-a014-4d0b-aae5-0615de3fc006" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 70DB33E5FCED4E6687B0FAAE491C1C6F Ref B: CO6AA3150219053 Ref C: 2024-03-21T22:57:53Z" ], "Date": [ - "Fri, 16 Jun 2023 07:27:48 GMT" + "Thu, 21 Mar 2024 22:57:53 GMT" ], "Content-Length": [ - "3691" + "3795" ], "Content-Type": [ "application/json; charset=utf-8" @@ -267,24 +285,24 @@ "-1" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:27:47 GMT" + "Thu, 21 Mar 2024 22:57:54 GMT" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2061/providers/Microsoft.Batch/batchAccounts/ps3615\",\r\n \"name\": \"ps3615\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"ps3615.westus2.batch.azure.com\",\r\n \"nodeManagementEndpoint\": \"b9e12a2e-2388-4660-856a-b3de42c6f003.westus2.service.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"dedicatedCoreQuota\": 0,\r\n \"dedicatedCoreQuotaPerVMFamily\": [\r\n {\r\n \"name\": \"standardAv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardESv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardA0_A7Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardA8_A11Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardGFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"basicAFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardMSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardGSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNDSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHCSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBrsv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDAv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDASv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEAv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEASv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardMSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEIv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"Standard NCASv3_T4 Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardXEIDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"Standard NDASv4_A100 Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDCSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNPSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFXMDVSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCADSA100v4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDADSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEADSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"StandardNVADSA10v5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEBDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHXFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLASv3Family\",\r\n \"coreQuota\": 0\r\n }\r\n ],\r\n \"dedicatedCoreQuotaPerVMFamilyEnforced\": true,\r\n \"lowPriorityCoreQuota\": 0,\r\n \"poolQuota\": 100,\r\n \"activeJobAndJobScheduleQuota\": 300,\r\n \"poolAllocationMode\": \"BatchService\",\r\n \"publicNetworkAccess\": \"Enabled\",\r\n \"privateEndpointConnections\": [],\r\n \"encryption\": {\r\n \"keySource\": \"Microsoft.Batch\"\r\n },\r\n \"allowedAuthenticationModes\": [\r\n \"SharedKey\",\r\n \"AAD\",\r\n \"TaskAuthenticationToken\"\r\n ]\r\n },\r\n \"tags\": {\r\n \"tag2\": \"tagValue2\"\r\n },\r\n \"identity\": {\r\n \"type\": \"None\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1803/providers/Microsoft.Batch/batchAccounts/ps9231\",\r\n \"name\": \"ps9231\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"ps9231.westus2.batch.azure.com\",\r\n \"nodeManagementEndpoint\": \"8ff96091-e905-4756-b382-8866f2285b9e.westus2.service.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"dedicatedCoreQuota\": 0,\r\n \"dedicatedCoreQuotaPerVMFamily\": [\r\n {\r\n \"name\": \"standardAv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardESv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardA0_A7Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardA8_A11Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardGFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"basicAFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardMSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardGSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNDSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHCSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBrsv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDAv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDASv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEAv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEASv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardMSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEIv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"Standard NCASv3_T4 Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardXEIDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"Standard NDASv4_A100 Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standard NDAMSv4_A100Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDCSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNPSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFXMDVSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCADSA100v4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDADSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEADSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"StandardNVADSA10v5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEBDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHXFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLASv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNGADSV620v1Family\",\r\n \"coreQuota\": 0\r\n }\r\n ],\r\n \"dedicatedCoreQuotaPerVMFamilyEnforced\": true,\r\n \"lowPriorityCoreQuota\": 0,\r\n \"poolQuota\": 100,\r\n \"activeJobAndJobScheduleQuota\": 300,\r\n \"poolAllocationMode\": \"BatchService\",\r\n \"publicNetworkAccess\": \"Enabled\",\r\n \"privateEndpointConnections\": [],\r\n \"encryption\": {\r\n \"keySource\": \"Microsoft.Batch\"\r\n },\r\n \"allowedAuthenticationModes\": [\r\n \"SharedKey\",\r\n \"AAD\",\r\n \"TaskAuthenticationToken\"\r\n ]\r\n },\r\n \"tags\": {\r\n \"tag2\": \"tagValue2\"\r\n },\r\n \"identity\": {\r\n \"type\": \"None\"\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2061/providers/Microsoft.Batch/batchAccounts/ps3615/operationResults/2eef840a-604c-4cdf-82ad-dc1e2fc3914f?api-version=2022-10-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzL3BzMjA2MS9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvcHMzNjE1L29wZXJhdGlvblJlc3VsdHMvMmVlZjg0MGEtNjA0Yy00Y2RmLTgyYWQtZGMxZTJmYzM5MTRmP2FwaS12ZXJzaW9uPTIwMjItMTAtMDE=", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1803/providers/Microsoft.Batch/batchAccounts/ps9231/operationResults/ce71546b-7538-43e7-9872-45dfe40b1f70?api-version=2022-10-01&t=638466586584189001&c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOVFiSMi9Sg6cKnrBuPHbDk_Zwa1ZNYHwLVPJArEI9N2bLrgd1mU0ZdNVcdf6rtZCkUUuCe3vxnVTGwufpwH9GPWDgJOpJoL9wgKOzUDiHLUeiWPjrK1AoaQVprZgjnzXBIWiZC2tZjbUT9pOI_ixYJJPrsCfLt7HEccnhObROE1mo_hpiPDrtOQDaX-BboNceB8vI1wmSPApGpPRM9hBRQbXgqKFC8094UNsMVkWPCrsPvP5YlMBLARlGf2WTevGKRREjstkApf1Swi7uKnpyhhsidD1yREMU0mWY9wnZfAX0jpEp3p9jKVMPQ3L-m-nSZI4zrtbW0AnI0O3pAEwe0CAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQ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G8wUkdCWEdJYWtiTE1lY18xU0lTOE5kUHNCNmk2WFBqTDJTRGpxS1RhNWNhcjdiVllsWEVWc2dMLTAwMFZGMXQ2eDFJSTNWQk5mc0VKODFDZEp5eGFDSm53dldJNmtIdEN0Slg5UVlLM3FaYWI5UGZaUkJ2Y2V0Sm9QZE1GdkJVJnM9dEFMbkFjRy0wU1A1aWI5RFY2cm5wZk1jR1Y3bTYtR3lvYjdUTkszTE9nb2g1eG5LNS1TbHhibkp6V0J6WnF2M2JUVlg4TlZGd3BEXzJGb2ZBNG9MS0E4Vmt6SEdUQjFRb3hmWEYwX0JZU2xCRkwxc0tsMVNTckJSZndXRXBiNVFuTFBqbU9pTW5PZU90ZWVCdGR0dmN0WWZuZnhhaktHVThFV253WDhRdXI5M3JVTkJiVDF2U2hrS1lUNlAzY2ZMdUpQQXk1SFpjcDI0WU95dTZYSTVMdDlhNHFzY21lb2gySm1LUDVna3FjOVYwbFgyRGwzRzVuZ1NHSUE1THlBa29Mb1pvQ2dmYldWdlpheGY2Ul9Na3ZEYzJMUVR2Q1l2bUhBbmtrbHNaVldVSHZOQ244RUZubW5EZERQSHdvM2NjRVZLRWh0Vmt3OWRFM2R2S3FoQzhRJmg9VXJCTFFWWFYxbXl4VVd6cWVGSENGNlVvMmQ3eWE4Q3FjazlUdU1SQWlZTQ==", "RequestMethod": "GET", "RequestHeaders": { "x-ms-client-request-id": [ - "e4ea5f46-d304-482b-9a0e-3718c4dc5380" + "425250c1-0bee-452b-97f7-15bb545f09b0" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Batch.BatchManagementClient/14.2.0.0" ] }, @@ -297,13 +315,10 @@ "no-cache" ], "ETag": [ - "\"0x8DB6E3B2E5D3EAB\"" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" + "\"0x8DC49FA575F2BAD\"" ], "x-ms-request-id": [ - "7ec7963c-4949-42d4-8d5b-1b0095ce577a" + "436ea226-c78c-4d2c-be10-2eaf71ff6e6f" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -311,20 +326,26 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" ], "x-ms-correlation-request-id": [ - "4634404f-5fa9-4272-9353-9c7b6b968e5b" + "c57ed07f-63e6-48d9-a9dd-7fa4f198c7af" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072746Z:4634404f-5fa9-4272-9353-9c7b6b968e5b" + "WESTUS2:20240321T225753Z:c57ed07f-63e6-48d9-a9dd-7fa4f198c7af" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: D98441E041D04CEA9387CABF725883A9 Ref B: CO6AA3150219053 Ref C: 2024-03-21T22:57:53Z" ], "Date": [ - "Fri, 16 Jun 2023 07:27:45 GMT" + "Thu, 21 Mar 2024 22:57:52 GMT" ], "Content-Length": [ - "3691" + "3795" ], "Content-Type": [ "application/json; charset=utf-8" @@ -333,27 +354,27 @@ "-1" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:27:46 GMT" + "Thu, 21 Mar 2024 22:57:53 GMT" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2061/providers/Microsoft.Batch/batchAccounts/ps3615\",\r\n \"name\": \"ps3615\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"ps3615.westus2.batch.azure.com\",\r\n \"nodeManagementEndpoint\": \"b9e12a2e-2388-4660-856a-b3de42c6f003.westus2.service.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"dedicatedCoreQuota\": 0,\r\n \"dedicatedCoreQuotaPerVMFamily\": [\r\n {\r\n \"name\": \"standardAv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardESv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardA0_A7Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardA8_A11Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardGFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"basicAFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardMSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardGSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNDSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHCSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBrsv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDAv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDASv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEAv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEASv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardMSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEIv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"Standard NCASv3_T4 Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardXEIDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"Standard NDASv4_A100 Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDCSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNPSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFXMDVSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCADSA100v4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDADSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEADSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"StandardNVADSA10v5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEBDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHXFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLASv3Family\",\r\n \"coreQuota\": 0\r\n }\r\n ],\r\n \"dedicatedCoreQuotaPerVMFamilyEnforced\": true,\r\n \"lowPriorityCoreQuota\": 0,\r\n \"poolQuota\": 100,\r\n \"activeJobAndJobScheduleQuota\": 300,\r\n \"poolAllocationMode\": \"BatchService\",\r\n \"publicNetworkAccess\": \"Enabled\",\r\n \"privateEndpointConnections\": [],\r\n \"encryption\": {\r\n \"keySource\": \"Microsoft.Batch\"\r\n },\r\n \"allowedAuthenticationModes\": [\r\n \"SharedKey\",\r\n \"AAD\",\r\n \"TaskAuthenticationToken\"\r\n ]\r\n },\r\n \"tags\": {\r\n \"tag1\": \"tagValue1\"\r\n },\r\n \"identity\": {\r\n \"type\": \"None\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1803/providers/Microsoft.Batch/batchAccounts/ps9231\",\r\n \"name\": \"ps9231\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"ps9231.westus2.batch.azure.com\",\r\n \"nodeManagementEndpoint\": \"8ff96091-e905-4756-b382-8866f2285b9e.westus2.service.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"dedicatedCoreQuota\": 0,\r\n \"dedicatedCoreQuotaPerVMFamily\": [\r\n {\r\n \"name\": \"standardAv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardESv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardA0_A7Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardA8_A11Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardGFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"basicAFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardMSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardGSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNDSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHCSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBrsv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDAv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDASv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEAv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEASv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardMSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEIv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"Standard NCASv3_T4 Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardXEIDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"Standard NDASv4_A100 Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standard NDAMSv4_A100Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDCSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNPSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFXMDVSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCADSA100v4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDADSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEADSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"StandardNVADSA10v5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEBDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHXFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLASv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNGADSV620v1Family\",\r\n \"coreQuota\": 0\r\n }\r\n ],\r\n \"dedicatedCoreQuotaPerVMFamilyEnforced\": true,\r\n \"lowPriorityCoreQuota\": 0,\r\n \"poolQuota\": 100,\r\n \"activeJobAndJobScheduleQuota\": 300,\r\n \"poolAllocationMode\": \"BatchService\",\r\n \"publicNetworkAccess\": \"Enabled\",\r\n \"privateEndpointConnections\": [],\r\n \"encryption\": {\r\n \"keySource\": \"Microsoft.Batch\"\r\n },\r\n \"allowedAuthenticationModes\": [\r\n \"SharedKey\",\r\n \"AAD\",\r\n \"TaskAuthenticationToken\"\r\n ]\r\n },\r\n \"tags\": {\r\n \"tag1\": \"tagValue1\"\r\n },\r\n \"identity\": {\r\n \"type\": \"None\"\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2061/providers/Microsoft.Batch/batchAccounts/ps3615?api-version=2022-10-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzL3BzMjA2MS9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvcHMzNjE1P2FwaS12ZXJzaW9uPTIwMjItMTAtMDE=", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1803/providers/Microsoft.Batch/batchAccounts/ps9231?api-version=2022-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL3BzMTgwMy9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvcHM5MjMxP2FwaS12ZXJzaW9uPTIwMjItMTAtMDE=", "RequestMethod": "GET", "RequestHeaders": { "x-ms-client-request-id": [ - "7daa70c3-7657-4b00-b24c-99899a784b08" + "2e9f25c6-f830-4277-8a47-78fc676bda07" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Batch.BatchManagementClient/14.2.0.0" ] }, @@ -366,13 +387,10 @@ "no-cache" ], "ETag": [ - "\"0x8DB6E3B299ACB7F\"" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" + "\"0x8DC49FA52F73A01\"" ], "x-ms-request-id": [ - "adb88f71-5673-4261-8882-ce63e0fe69b2" + "554d790d-7eef-45fc-85c2-ed05d761ff74" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -380,20 +398,26 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" ], "x-ms-correlation-request-id": [ - "0253f328-3bca-471f-b21b-78a0f18dd772" + "a320b23c-9d96-4896-ad98-211c3d7f5997" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072746Z:0253f328-3bca-471f-b21b-78a0f18dd772" + "WESTUS2:20240321T225753Z:a320b23c-9d96-4896-ad98-211c3d7f5997" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 5628B939A16444C48CBDC7BE556A19A8 Ref B: CO6AA3150219053 Ref C: 2024-03-21T22:57:53Z" ], "Date": [ - "Fri, 16 Jun 2023 07:27:46 GMT" + "Thu, 21 Mar 2024 22:57:53 GMT" ], "Content-Length": [ - "3691" + "3795" ], "Content-Type": [ "application/json; charset=utf-8" @@ -402,27 +426,27 @@ "-1" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:27:38 GMT" + "Thu, 21 Mar 2024 22:57:46 GMT" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2061/providers/Microsoft.Batch/batchAccounts/ps3615\",\r\n \"name\": \"ps3615\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"ps3615.westus2.batch.azure.com\",\r\n \"nodeManagementEndpoint\": \"b9e12a2e-2388-4660-856a-b3de42c6f003.westus2.service.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"dedicatedCoreQuota\": 0,\r\n \"dedicatedCoreQuotaPerVMFamily\": [\r\n {\r\n \"name\": \"standardAv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardESv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardA0_A7Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardA8_A11Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardGFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"basicAFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardMSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardGSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNDSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHCSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBrsv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDAv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDASv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEAv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEASv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardMSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEIv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"Standard NCASv3_T4 Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardXEIDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"Standard NDASv4_A100 Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDCSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNPSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFXMDVSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCADSA100v4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDADSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEADSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"StandardNVADSA10v5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEBDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHXFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLASv3Family\",\r\n \"coreQuota\": 0\r\n }\r\n ],\r\n \"dedicatedCoreQuotaPerVMFamilyEnforced\": true,\r\n \"lowPriorityCoreQuota\": 0,\r\n \"poolQuota\": 100,\r\n \"activeJobAndJobScheduleQuota\": 300,\r\n \"poolAllocationMode\": \"BatchService\",\r\n \"publicNetworkAccess\": \"Enabled\",\r\n \"privateEndpointConnections\": [],\r\n \"encryption\": {\r\n \"keySource\": \"Microsoft.Batch\"\r\n },\r\n \"allowedAuthenticationModes\": [\r\n \"SharedKey\",\r\n \"AAD\",\r\n \"TaskAuthenticationToken\"\r\n ]\r\n },\r\n \"tags\": {\r\n \"tag1\": \"tagValue1\"\r\n },\r\n \"identity\": {\r\n \"type\": \"None\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1803/providers/Microsoft.Batch/batchAccounts/ps9231\",\r\n \"name\": \"ps9231\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"ps9231.westus2.batch.azure.com\",\r\n \"nodeManagementEndpoint\": \"8ff96091-e905-4756-b382-8866f2285b9e.westus2.service.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"dedicatedCoreQuota\": 0,\r\n \"dedicatedCoreQuotaPerVMFamily\": [\r\n {\r\n \"name\": \"standardAv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardESv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardA0_A7Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardA8_A11Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardGFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"basicAFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardMSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardGSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNDSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHCSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBrsv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDAv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDASv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEAv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEASv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardMSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEIv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"Standard NCASv3_T4 Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardXEIDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"Standard NDASv4_A100 Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standard NDAMSv4_A100Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDCSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNPSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFXMDVSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCADSA100v4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDADSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEADSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"StandardNVADSA10v5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEBDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHXFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLASv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNGADSV620v1Family\",\r\n \"coreQuota\": 0\r\n }\r\n ],\r\n \"dedicatedCoreQuotaPerVMFamilyEnforced\": true,\r\n \"lowPriorityCoreQuota\": 0,\r\n \"poolQuota\": 100,\r\n \"activeJobAndJobScheduleQuota\": 300,\r\n \"poolAllocationMode\": \"BatchService\",\r\n \"publicNetworkAccess\": \"Enabled\",\r\n \"privateEndpointConnections\": [],\r\n \"encryption\": {\r\n \"keySource\": \"Microsoft.Batch\"\r\n },\r\n \"allowedAuthenticationModes\": [\r\n \"SharedKey\",\r\n \"AAD\",\r\n \"TaskAuthenticationToken\"\r\n ]\r\n },\r\n \"tags\": {\r\n \"tag1\": \"tagValue1\"\r\n },\r\n \"identity\": {\r\n \"type\": \"None\"\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2061/providers/Microsoft.Batch/batchAccounts/ps3615?api-version=2022-10-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzL3BzMjA2MS9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvcHMzNjE1P2FwaS12ZXJzaW9uPTIwMjItMTAtMDE=", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1803/providers/Microsoft.Batch/batchAccounts/ps9231?api-version=2022-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL3BzMTgwMy9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvcHM5MjMxP2FwaS12ZXJzaW9uPTIwMjItMTAtMDE=", "RequestMethod": "GET", "RequestHeaders": { "x-ms-client-request-id": [ - "24a9f970-96a2-4466-80c3-1c9dc1b26bd7" + "4b857b1a-cc26-47b8-9e1e-52cafa420e25" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Batch.BatchManagementClient/14.2.0.0" ] }, @@ -435,13 +459,10 @@ "no-cache" ], "ETag": [ - "\"0x8DB6E3B2F3CF7BD\"" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" + "\"0x8DC49FA57C9E139\"" ], "x-ms-request-id": [ - "76d28a47-3a75-4722-b7c9-0258a5343c81" + "86a4325a-9a94-482a-9827-636e4029b8f0" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -449,20 +470,26 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" ], "x-ms-correlation-request-id": [ - "fd3f6d40-f99b-4a33-a585-87d113b37787" + "6e97ac59-340b-4ded-a239-fd268394a6e0" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072749Z:fd3f6d40-f99b-4a33-a585-87d113b37787" + "WESTUS2:20240321T225754Z:6e97ac59-340b-4ded-a239-fd268394a6e0" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 6964A27DBD614BCEB4BA877CC9CADBF1 Ref B: CO6AA3150219053 Ref C: 2024-03-21T22:57:54Z" ], "Date": [ - "Fri, 16 Jun 2023 07:27:49 GMT" + "Thu, 21 Mar 2024 22:57:54 GMT" ], "Content-Length": [ - "3691" + "3795" ], "Content-Type": [ "application/json; charset=utf-8" @@ -471,27 +498,27 @@ "-1" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:27:47 GMT" + "Thu, 21 Mar 2024 22:57:54 GMT" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2061/providers/Microsoft.Batch/batchAccounts/ps3615\",\r\n \"name\": \"ps3615\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"ps3615.westus2.batch.azure.com\",\r\n \"nodeManagementEndpoint\": \"b9e12a2e-2388-4660-856a-b3de42c6f003.westus2.service.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"dedicatedCoreQuota\": 0,\r\n \"dedicatedCoreQuotaPerVMFamily\": [\r\n {\r\n \"name\": \"standardAv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardESv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardA0_A7Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardA8_A11Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardGFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"basicAFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardMSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardGSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNDSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHCSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBrsv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDAv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDASv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEAv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEASv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardMSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEIv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"Standard NCASv3_T4 Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardXEIDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"Standard NDASv4_A100 Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDCSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNPSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFXMDVSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCADSA100v4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDADSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEADSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"StandardNVADSA10v5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEBDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHXFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLASv3Family\",\r\n \"coreQuota\": 0\r\n }\r\n ],\r\n \"dedicatedCoreQuotaPerVMFamilyEnforced\": true,\r\n \"lowPriorityCoreQuota\": 0,\r\n \"poolQuota\": 100,\r\n \"activeJobAndJobScheduleQuota\": 300,\r\n \"poolAllocationMode\": \"BatchService\",\r\n \"publicNetworkAccess\": \"Enabled\",\r\n \"privateEndpointConnections\": [],\r\n \"encryption\": {\r\n \"keySource\": \"Microsoft.Batch\"\r\n },\r\n \"allowedAuthenticationModes\": [\r\n \"SharedKey\",\r\n \"AAD\",\r\n \"TaskAuthenticationToken\"\r\n ]\r\n },\r\n \"tags\": {\r\n \"tag2\": \"tagValue2\"\r\n },\r\n \"identity\": {\r\n \"type\": \"None\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1803/providers/Microsoft.Batch/batchAccounts/ps9231\",\r\n \"name\": \"ps9231\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"ps9231.westus2.batch.azure.com\",\r\n \"nodeManagementEndpoint\": \"8ff96091-e905-4756-b382-8866f2285b9e.westus2.service.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"dedicatedCoreQuota\": 0,\r\n \"dedicatedCoreQuotaPerVMFamily\": [\r\n {\r\n \"name\": \"standardAv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardESv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardA0_A7Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardA8_A11Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardGFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"basicAFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardMSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardGSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNDSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHCSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBrsv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDAv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDASv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEAv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEASv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardMSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEIv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"Standard NCASv3_T4 Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardXEIDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"Standard NDASv4_A100 Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standard NDAMSv4_A100Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDCSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNPSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFXMDVSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCADSA100v4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDADSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEADSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"StandardNVADSA10v5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEBDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHXFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLASv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNGADSV620v1Family\",\r\n \"coreQuota\": 0\r\n }\r\n ],\r\n \"dedicatedCoreQuotaPerVMFamilyEnforced\": true,\r\n \"lowPriorityCoreQuota\": 0,\r\n \"poolQuota\": 100,\r\n \"activeJobAndJobScheduleQuota\": 300,\r\n \"poolAllocationMode\": \"BatchService\",\r\n \"publicNetworkAccess\": \"Enabled\",\r\n \"privateEndpointConnections\": [],\r\n \"encryption\": {\r\n \"keySource\": \"Microsoft.Batch\"\r\n },\r\n \"allowedAuthenticationModes\": [\r\n \"SharedKey\",\r\n \"AAD\",\r\n \"TaskAuthenticationToken\"\r\n ]\r\n },\r\n \"tags\": {\r\n \"tag2\": \"tagValue2\"\r\n },\r\n \"identity\": {\r\n \"type\": \"None\"\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2061/providers/Microsoft.Batch/batchAccounts/ps3615?api-version=2022-10-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzL3BzMjA2MS9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvcHMzNjE1P2FwaS12ZXJzaW9uPTIwMjItMTAtMDE=", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1803/providers/Microsoft.Batch/batchAccounts/ps9231?api-version=2022-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL3BzMTgwMy9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvcHM5MjMxP2FwaS12ZXJzaW9uPTIwMjItMTAtMDE=", "RequestMethod": "GET", "RequestHeaders": { "x-ms-client-request-id": [ - "658c029b-4a7b-45ec-8ad7-398314df6326" + "5ced2d96-849f-4969-9cda-7ed897db03b4" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Batch.BatchManagementClient/14.2.0.0" ] }, @@ -504,13 +531,10 @@ "no-cache" ], "ETag": [ - "\"0x8DB6E3B2F3CF7BD\"" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" + "\"0x8DC49FA57C9E139\"" ], "x-ms-request-id": [ - "544fbfb8-5793-4665-99e6-21d581a0638e" + "a189903f-3c5e-419e-b494-8a2ad8e936ff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -518,20 +542,26 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" ], "x-ms-correlation-request-id": [ - "09f01b17-8daa-40fd-a79d-ff6deab30218" + "94ae2dd2-9daf-4d40-a316-b75b3c644d21" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072750Z:09f01b17-8daa-40fd-a79d-ff6deab30218" + "WESTUS2:20240321T225755Z:94ae2dd2-9daf-4d40-a316-b75b3c644d21" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 94BEFBF8A4EB420AA26D318F67F6FD9F Ref B: CO6AA3150219053 Ref C: 2024-03-21T22:57:55Z" ], "Date": [ - "Fri, 16 Jun 2023 07:27:49 GMT" + "Thu, 21 Mar 2024 22:57:54 GMT" ], "Content-Length": [ - "3691" + "3795" ], "Content-Type": [ "application/json; charset=utf-8" @@ -540,27 +570,27 @@ "-1" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:27:47 GMT" + "Thu, 21 Mar 2024 22:57:54 GMT" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2061/providers/Microsoft.Batch/batchAccounts/ps3615\",\r\n \"name\": \"ps3615\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"ps3615.westus2.batch.azure.com\",\r\n \"nodeManagementEndpoint\": \"b9e12a2e-2388-4660-856a-b3de42c6f003.westus2.service.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"dedicatedCoreQuota\": 0,\r\n \"dedicatedCoreQuotaPerVMFamily\": [\r\n {\r\n \"name\": \"standardAv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardESv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardA0_A7Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardA8_A11Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardGFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"basicAFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardMSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardGSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNDSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHCSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBrsv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDAv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDASv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEAv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEASv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardMSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEIv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"Standard NCASv3_T4 Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardXEIDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"Standard NDASv4_A100 Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDCSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNPSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFXMDVSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCADSA100v4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDADSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEADSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"StandardNVADSA10v5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEBDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHXFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLASv3Family\",\r\n \"coreQuota\": 0\r\n }\r\n ],\r\n \"dedicatedCoreQuotaPerVMFamilyEnforced\": true,\r\n \"lowPriorityCoreQuota\": 0,\r\n \"poolQuota\": 100,\r\n \"activeJobAndJobScheduleQuota\": 300,\r\n \"poolAllocationMode\": \"BatchService\",\r\n \"publicNetworkAccess\": \"Enabled\",\r\n \"privateEndpointConnections\": [],\r\n \"encryption\": {\r\n \"keySource\": \"Microsoft.Batch\"\r\n },\r\n \"allowedAuthenticationModes\": [\r\n \"SharedKey\",\r\n \"AAD\",\r\n \"TaskAuthenticationToken\"\r\n ]\r\n },\r\n \"tags\": {\r\n \"tag2\": \"tagValue2\"\r\n },\r\n \"identity\": {\r\n \"type\": \"None\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1803/providers/Microsoft.Batch/batchAccounts/ps9231\",\r\n \"name\": \"ps9231\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"ps9231.westus2.batch.azure.com\",\r\n \"nodeManagementEndpoint\": \"8ff96091-e905-4756-b382-8866f2285b9e.westus2.service.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"dedicatedCoreQuota\": 0,\r\n \"dedicatedCoreQuotaPerVMFamily\": [\r\n {\r\n \"name\": \"standardAv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardESv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardA0_A7Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardA8_A11Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardGFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"basicAFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardMSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardGSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNDSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHCSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBrsv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDAv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDASv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEAv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEASv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardMSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEIv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"Standard NCASv3_T4 Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardXEIDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"Standard NDASv4_A100 Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standard NDAMSv4_A100Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDCSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNPSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFXMDVSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCADSA100v4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDADSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEADSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"StandardNVADSA10v5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEBDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHXFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLASv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNGADSV620v1Family\",\r\n \"coreQuota\": 0\r\n }\r\n ],\r\n \"dedicatedCoreQuotaPerVMFamilyEnforced\": true,\r\n \"lowPriorityCoreQuota\": 0,\r\n \"poolQuota\": 100,\r\n \"activeJobAndJobScheduleQuota\": 300,\r\n \"poolAllocationMode\": \"BatchService\",\r\n \"publicNetworkAccess\": \"Enabled\",\r\n \"privateEndpointConnections\": [],\r\n \"encryption\": {\r\n \"keySource\": \"Microsoft.Batch\"\r\n },\r\n \"allowedAuthenticationModes\": [\r\n \"SharedKey\",\r\n \"AAD\",\r\n \"TaskAuthenticationToken\"\r\n ]\r\n },\r\n \"tags\": {\r\n \"tag2\": \"tagValue2\"\r\n },\r\n \"identity\": {\r\n \"type\": \"None\"\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2061/providers/Microsoft.Batch/batchAccounts/ps3615?api-version=2022-10-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzL3BzMjA2MS9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvcHMzNjE1P2FwaS12ZXJzaW9uPTIwMjItMTAtMDE=", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1803/providers/Microsoft.Batch/batchAccounts/ps9231?api-version=2022-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL3BzMTgwMy9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvcHM5MjMxP2FwaS12ZXJzaW9uPTIwMjItMTAtMDE=", "RequestMethod": "GET", "RequestHeaders": { "x-ms-client-request-id": [ - "2d921c8d-0c42-4c5e-a1ae-04ea6a4f4142" + "b1fe3b02-f1f6-43b0-9b57-afd2bb5d844a" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Batch.BatchManagementClient/14.2.0.0" ] }, @@ -573,13 +603,10 @@ "no-cache" ], "ETag": [ - "\"0x8DB6E3B2F3CF7BD\"" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" + "\"0x8DC49FA57C9E139\"" ], "x-ms-request-id": [ - "5873f008-82c1-471f-ab72-3ba9816c22c9" + "00e4ea01-4695-4417-a097-fe0e1022dc12" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -587,20 +614,26 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" ], "x-ms-correlation-request-id": [ - "4714bdba-0dfc-466d-8b5d-df775dcd04d6" + "9bb5dbbe-cdb0-41ca-a705-4bfa08e24c93" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072751Z:4714bdba-0dfc-466d-8b5d-df775dcd04d6" + "WESTUS2:20240321T225755Z:9bb5dbbe-cdb0-41ca-a705-4bfa08e24c93" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 3C72C3597E444950901C80FB9BE75F2C Ref B: CO6AA3150219053 Ref C: 2024-03-21T22:57:55Z" ], "Date": [ - "Fri, 16 Jun 2023 07:27:50 GMT" + "Thu, 21 Mar 2024 22:57:55 GMT" ], "Content-Length": [ - "3691" + "3795" ], "Content-Type": [ "application/json; charset=utf-8" @@ -609,27 +642,27 @@ "-1" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:27:47 GMT" + "Thu, 21 Mar 2024 22:57:54 GMT" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2061/providers/Microsoft.Batch/batchAccounts/ps3615\",\r\n \"name\": \"ps3615\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"ps3615.westus2.batch.azure.com\",\r\n \"nodeManagementEndpoint\": \"b9e12a2e-2388-4660-856a-b3de42c6f003.westus2.service.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"dedicatedCoreQuota\": 0,\r\n \"dedicatedCoreQuotaPerVMFamily\": [\r\n {\r\n \"name\": \"standardAv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardESv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardA0_A7Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardA8_A11Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardGFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"basicAFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardMSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardGSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNDSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHCSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBrsv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDAv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDASv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEAv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEASv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardMSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEIv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"Standard NCASv3_T4 Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardXEIDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"Standard NDASv4_A100 Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDCSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNPSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFXMDVSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCADSA100v4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDADSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEADSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"StandardNVADSA10v5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEBDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHXFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLASv3Family\",\r\n \"coreQuota\": 0\r\n }\r\n ],\r\n \"dedicatedCoreQuotaPerVMFamilyEnforced\": true,\r\n \"lowPriorityCoreQuota\": 0,\r\n \"poolQuota\": 100,\r\n \"activeJobAndJobScheduleQuota\": 300,\r\n \"poolAllocationMode\": \"BatchService\",\r\n \"publicNetworkAccess\": \"Enabled\",\r\n \"privateEndpointConnections\": [],\r\n \"encryption\": {\r\n \"keySource\": \"Microsoft.Batch\"\r\n },\r\n \"allowedAuthenticationModes\": [\r\n \"SharedKey\",\r\n \"AAD\",\r\n \"TaskAuthenticationToken\"\r\n ]\r\n },\r\n \"tags\": {\r\n \"tag2\": \"tagValue2\"\r\n },\r\n \"identity\": {\r\n \"type\": \"None\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1803/providers/Microsoft.Batch/batchAccounts/ps9231\",\r\n \"name\": \"ps9231\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"ps9231.westus2.batch.azure.com\",\r\n \"nodeManagementEndpoint\": \"8ff96091-e905-4756-b382-8866f2285b9e.westus2.service.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"dedicatedCoreQuota\": 0,\r\n \"dedicatedCoreQuotaPerVMFamily\": [\r\n {\r\n \"name\": \"standardAv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardESv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardA0_A7Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardA8_A11Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardGFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"basicAFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardMSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardGSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNDSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHCSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBrsv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDAv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDASv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEAv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEASv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardMSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEIv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"Standard NCASv3_T4 Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardXEIDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"Standard NDASv4_A100 Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standard NDAMSv4_A100Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDCSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNPSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFXMDVSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCADSA100v4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDADSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEADSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"StandardNVADSA10v5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEBDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHXFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLASv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNGADSV620v1Family\",\r\n \"coreQuota\": 0\r\n }\r\n ],\r\n \"dedicatedCoreQuotaPerVMFamilyEnforced\": true,\r\n \"lowPriorityCoreQuota\": 0,\r\n \"poolQuota\": 100,\r\n \"activeJobAndJobScheduleQuota\": 300,\r\n \"poolAllocationMode\": \"BatchService\",\r\n \"publicNetworkAccess\": \"Enabled\",\r\n \"privateEndpointConnections\": [],\r\n \"encryption\": {\r\n \"keySource\": \"Microsoft.Batch\"\r\n },\r\n \"allowedAuthenticationModes\": [\r\n \"SharedKey\",\r\n \"AAD\",\r\n \"TaskAuthenticationToken\"\r\n ]\r\n },\r\n \"tags\": {\r\n \"tag2\": \"tagValue2\"\r\n },\r\n \"identity\": {\r\n \"type\": \"None\"\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2061/providers/Microsoft.Batch/batchAccounts/ps3615?api-version=2022-10-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzL3BzMjA2MS9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvcHMzNjE1P2FwaS12ZXJzaW9uPTIwMjItMTAtMDE=", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1803/providers/Microsoft.Batch/batchAccounts/ps9231?api-version=2022-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL3BzMTgwMy9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvcHM5MjMxP2FwaS12ZXJzaW9uPTIwMjItMTAtMDE=", "RequestMethod": "GET", "RequestHeaders": { "x-ms-client-request-id": [ - "3f37d66d-ce40-4f91-821a-3d6faa1c3545" + "8d5dadba-a6ba-4ec7-9c94-e92f926c0838" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Batch.BatchManagementClient/14.2.0.0" ] }, @@ -642,13 +675,10 @@ "no-cache" ], "ETag": [ - "\"0x8DB6E3B31F1178E\"" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" + "\"0x8DC49FA58D6EB4B\"" ], "x-ms-request-id": [ - "e6faa5c7-66d3-49dc-a4aa-1f92356d82d2" + "7eae9d1e-5bab-494e-9571-bfdd4bb1aa6c" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -656,20 +686,26 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" ], "x-ms-correlation-request-id": [ - "bfc386c3-44bf-4621-8d53-8d6b2ef9f56b" + "aafa3b21-5992-449f-ab23-2431accdd6d9" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072752Z:bfc386c3-44bf-4621-8d53-8d6b2ef9f56b" + "WESTUS2:20240321T225756Z:aafa3b21-5992-449f-ab23-2431accdd6d9" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 8327A029BDCF4BE3B2700DB50B13BB64 Ref B: CO6AA3150219053 Ref C: 2024-03-21T22:57:56Z" ], "Date": [ - "Fri, 16 Jun 2023 07:27:52 GMT" + "Thu, 21 Mar 2024 22:57:55 GMT" ], "Content-Length": [ - "3691" + "3795" ], "Content-Type": [ "application/json; charset=utf-8" @@ -678,27 +714,27 @@ "-1" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:27:52 GMT" + "Thu, 21 Mar 2024 22:57:56 GMT" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2061/providers/Microsoft.Batch/batchAccounts/ps3615\",\r\n \"name\": \"ps3615\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"ps3615.westus2.batch.azure.com\",\r\n \"nodeManagementEndpoint\": \"b9e12a2e-2388-4660-856a-b3de42c6f003.westus2.service.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"dedicatedCoreQuota\": 0,\r\n \"dedicatedCoreQuotaPerVMFamily\": [\r\n {\r\n \"name\": \"standardAv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardESv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardA0_A7Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardA8_A11Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardGFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"basicAFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardMSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardGSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNDSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHCSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBrsv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDAv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDASv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEAv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEASv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardMSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEIv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"Standard NCASv3_T4 Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardXEIDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"Standard NDASv4_A100 Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDCSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNPSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFXMDVSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCADSA100v4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDADSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEADSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"StandardNVADSA10v5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEBDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHXFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLASv3Family\",\r\n \"coreQuota\": 0\r\n }\r\n ],\r\n \"dedicatedCoreQuotaPerVMFamilyEnforced\": true,\r\n \"lowPriorityCoreQuota\": 0,\r\n \"poolQuota\": 100,\r\n \"activeJobAndJobScheduleQuota\": 300,\r\n \"poolAllocationMode\": \"BatchService\",\r\n \"publicNetworkAccess\": \"Enabled\",\r\n \"privateEndpointConnections\": [],\r\n \"encryption\": {\r\n \"keySource\": \"Microsoft.Batch\"\r\n },\r\n \"allowedAuthenticationModes\": [\r\n \"SharedKey\",\r\n \"AAD\",\r\n \"TaskAuthenticationToken\"\r\n ]\r\n },\r\n \"tags\": {\r\n \"tag2\": \"tagValue2\"\r\n },\r\n \"identity\": {\r\n \"type\": \"None\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1803/providers/Microsoft.Batch/batchAccounts/ps9231\",\r\n \"name\": \"ps9231\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"ps9231.westus2.batch.azure.com\",\r\n \"nodeManagementEndpoint\": \"8ff96091-e905-4756-b382-8866f2285b9e.westus2.service.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"dedicatedCoreQuota\": 0,\r\n \"dedicatedCoreQuotaPerVMFamily\": [\r\n {\r\n \"name\": \"standardAv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardESv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardA0_A7Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardA8_A11Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardGFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"basicAFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardMSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardGSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNDSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHCSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBrsv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDAv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDASv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEAv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEASv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardMSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEIv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"Standard NCASv3_T4 Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardXEIDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"Standard NDASv4_A100 Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standard NDAMSv4_A100Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDCSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNPSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFXMDVSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCADSA100v4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDADSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEADSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"StandardNVADSA10v5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEBDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHXFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLASv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNGADSV620v1Family\",\r\n \"coreQuota\": 0\r\n }\r\n ],\r\n \"dedicatedCoreQuotaPerVMFamilyEnforced\": true,\r\n \"lowPriorityCoreQuota\": 0,\r\n \"poolQuota\": 100,\r\n \"activeJobAndJobScheduleQuota\": 300,\r\n \"poolAllocationMode\": \"BatchService\",\r\n \"publicNetworkAccess\": \"Enabled\",\r\n \"privateEndpointConnections\": [],\r\n \"encryption\": {\r\n \"keySource\": \"Microsoft.Batch\"\r\n },\r\n \"allowedAuthenticationModes\": [\r\n \"SharedKey\",\r\n \"AAD\",\r\n \"TaskAuthenticationToken\"\r\n ]\r\n },\r\n \"tags\": {\r\n \"tag2\": \"tagValue2\"\r\n },\r\n \"identity\": {\r\n \"type\": \"None\"\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2061/providers/Microsoft.Batch/batchAccounts/ps3615?api-version=2022-10-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzL3BzMjA2MS9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvcHMzNjE1P2FwaS12ZXJzaW9uPTIwMjItMTAtMDE=", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1803/providers/Microsoft.Batch/batchAccounts/ps9231?api-version=2022-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL3BzMTgwMy9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvcHM5MjMxP2FwaS12ZXJzaW9uPTIwMjItMTAtMDE=", "RequestMethod": "GET", "RequestHeaders": { "x-ms-client-request-id": [ - "8fc909cf-5309-41a0-88a4-fc56c8bb6f46" + "66ee9244-f1e8-46d4-8e9c-943a1a951fa1" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Batch.BatchManagementClient/14.2.0.0" ] }, @@ -711,10 +747,10 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" + "11999" ], "x-ms-request-id": [ - "85d1d245-45fe-4d47-a5c6-11a61ae9c99d" + "68de2146-ad82-4414-a70a-0d29d480158f" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -722,17 +758,20 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], "x-ms-correlation-request-id": [ - "2fe152f6-2498-4375-ad70-2f5f4edefbe3" + "432593d3-5816-4529-8d75-edfe450795f2" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072809Z:2fe152f6-2498-4375-ad70-2f5f4edefbe3" + "WESTUS2:20240321T225812Z:432593d3-5816-4529-8d75-edfe450795f2" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 2FF345D23DCC43E2B565CF974C11232B Ref B: CO6AA3150219053 Ref C: 2024-03-21T22:58:11Z" ], "Date": [ - "Fri, 16 Jun 2023 07:28:08 GMT" + "Thu, 21 Mar 2024 22:58:11 GMT" ], "Content-Length": [ "193" @@ -744,25 +783,25 @@ "-1" ] }, - "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"AccountNotFound\",\r\n \"message\": \"The specified account does not exist.\\nRequestId:85d1d245-45fe-4d47-a5c6-11a61ae9c99d\\nTime:2023-06-16T07:28:09.6308041Z\",\r\n \"target\": \"BatchAccount\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"AccountNotFound\",\r\n \"message\": \"The specified account does not exist.\\nRequestId:68de2146-ad82-4414-a70a-0d29d480158f\\nTime:2024-03-21T22:58:12.0193615Z\",\r\n \"target\": \"BatchAccount\"\r\n }\r\n}", "StatusCode": 404 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTYtMDktMDE=", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTYtMDktMDE=", "RequestMethod": "GET", "RequestHeaders": { "x-ms-client-request-id": [ - "658c029b-4a7b-45ec-8ad7-398314df6326" + "5ced2d96-849f-4969-9cda-7ed897db03b4" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" ] }, "RequestBody": "", @@ -774,16 +813,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" + "11999" ], "x-ms-request-id": [ - "40e74774-7a95-48a6-bb16-a17a79c03b70" + "84197d16-df09-4229-b5b0-63ad0d8da8bd" ], "x-ms-correlation-request-id": [ - "40e74774-7a95-48a6-bb16-a17a79c03b70" + "84197d16-df09-4229-b5b0-63ad0d8da8bd" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072750Z:40e74774-7a95-48a6-bb16-a17a79c03b70" + "WESTUS2:20240321T225755Z:84197d16-df09-4229-b5b0-63ad0d8da8bd" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -791,37 +830,43 @@ "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 5DF93A54F0404357B72A27B12F2EE06C Ref B: CO6AA3150217027 Ref C: 2024-03-21T22:57:54Z" + ], "Date": [ - "Fri, 16 Jun 2023 07:27:49 GMT" + "Thu, 21 Mar 2024 22:57:54 GMT" + ], + "Content-Length": [ + "1431" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" - ], - "Content-Length": [ - "30499" ] }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/Accessibility/providers/Microsoft.Batch/batchAccounts/accessbilitytest\",\r\n \"name\": \"accessbilitytest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/rechentest/providers/Microsoft.Batch/batchAccounts/0prodtest\",\r\n \"name\": \"0prodtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/BatchDNCrg/providers/Microsoft.Batch/batchAccounts/adfrolling2\",\r\n \"name\": \"adfrolling2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengscus\",\r\n \"name\": \"zfengscus\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"southcentralus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/zfengbyos\",\r\n \"name\": \"zfengbyos\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/zfengtest1\",\r\n \"name\": \"zfengtest1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/zfengtest\",\r\n \"name\": \"zfengtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/zfengtest4\",\r\n \"name\": \"zfengtest4\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/abc/providers/Microsoft.Batch/batchAccounts/prodtest6\",\r\n \"name\": \"prodtest6\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"francecentral\",\r\n \"tags\": {\r\n \"test3\": \"true\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/Accessibility/providers/Microsoft.Batch/batchAccounts/a11ytest\",\r\n \"name\": \"a11ytest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westcentralus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/canary/providers/Microsoft.Batch/batchAccounts/testcanary\",\r\n \"name\": \"testcanary\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"centraluseuap\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/prodtest1/providers/Microsoft.Batch/batchAccounts/prodtest1\",\r\n \"name\": \"prodtest1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"brazilsouth\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/prodtest3/providers/Microsoft.Batch/batchAccounts/prodtest3\",\r\n \"name\": \"prodtest3\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"southcentralus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/prodtest4/providers/Microsoft.Batch/batchAccounts/prodtest4\",\r\n \"name\": \"prodtest4\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"centralus\",\r\n \"tags\": {\r\n \"test\": \"true\",\r\n \"test2\": \"true\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/prodtest5/providers/Microsoft.Batch/batchAccounts/prodtest5\",\r\n \"name\": \"prodtest5\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus2\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/rechentest/providers/Microsoft.Batch/batchAccounts/testing\",\r\n \"name\": \"testing\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/rechentest/providers/Microsoft.Batch/batchAccounts/testunusablenodes\",\r\n \"name\": \"testunusablenodes\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/twacdmtestRG/providers/Microsoft.Batch/batchAccounts/twacdmbatchacct\",\r\n \"name\": \"twacdmbatchacct\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"centraluseuap\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/canary/providers/Microsoft.Batch/batchAccounts/mikebatchcanary\",\r\n \"name\": \"mikebatchcanary\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus2euap\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/canary/providers/Microsoft.Batch/batchAccounts/com1\",\r\n \"name\": \"com1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/prodtest2/providers/Microsoft.Batch/batchAccounts/prodtest6\",\r\n \"name\": \"prodtest6\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus2\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/prodtest2/providers/Microsoft.Batch/batchAccounts/a100test\",\r\n \"name\": \"a100test\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/shpaster-scus/providers/Microsoft.Batch/batchAccounts/shpasterbatch2\",\r\n \"name\": \"shpasterbatch2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"southcentralus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/rechentest/providers/Microsoft.Batch/batchAccounts/testdeletebatchaccounts\",\r\n \"name\": \"testdeletebatchaccounts\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/doAzureParallel/providers/Microsoft.Batch/batchAccounts/azurecsstest\",\r\n \"name\": \"azurecsstest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"ukwest\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengeastus\",\r\n \"name\": \"zfengeastus\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\",\r\n \"identity\": {\r\n \"principalId\": \"32ec4da8-e86d-4e9d-bc2d-0d854e385d41\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/doAzureParallel/providers/Microsoft.Batch/batchAccounts/nvv4\",\r\n \"name\": \"nvv4\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"uksouth\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/doAzureParallel/providers/Microsoft.Batch/batchAccounts/ndv4testaccount\",\r\n \"name\": \"ndv4testaccount\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengpilotprod1\",\r\n \"name\": \"zfengpilotprod1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus2euap\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengumi\",\r\n \"name\": \"zfengumi\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus2euap\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengumi1\",\r\n \"name\": \"zfengumi1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"centraluseuap\",\r\n \"identity\": {\r\n \"principalId\": \"9611c109-57ad-4cde-9f0c-37dd67edce2b\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengscusumi\",\r\n \"name\": \"zfengscusumi\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"southcentralus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfscusumi\",\r\n \"name\": \"zfscusumi\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"southcentralus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfwestus2\",\r\n \"name\": \"zfwestus2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus2\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengbrazilsoutheast\",\r\n \"name\": \"zfengbrazilsoutheast\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"brazilsoutheast\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengnortheurope\",\r\n \"name\": \"zfengnortheurope\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"northeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengnorwayeast\",\r\n \"name\": \"zfengnorwayeast\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"norwayeast\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/rechentest/providers/Microsoft.Batch/batchAccounts/tskapurtest1\",\r\n \"name\": \"tskapurtest1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengjapaneast\",\r\n \"name\": \"zfengjapaneast\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"japaneast\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengbyoseastus\",\r\n \"name\": \"zfengbyoseastus\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\",\r\n \"identity\": {\r\n \"principalId\": \"dbf81403-66ec-454a-9f4e-a99ccd81b23b\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengeastus2\",\r\n \"name\": \"zfengeastus2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/canarytest1/providers/Microsoft.Batch/batchAccounts/e80idstest\",\r\n \"name\": \"e80idstest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus2\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/azsmnet137/providers/Microsoft.Batch/batchAccounts/azsmnet9299\",\r\n \"name\": \"azsmnet9299\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/shpaster/providers/Microsoft.Batch/batchAccounts/shpasterbatch1\",\r\n \"name\": \"shpasterbatch1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/azsmnet7742/providers/Microsoft.Batch/batchAccounts/azsmnet3490\",\r\n \"name\": \"azsmnet3490\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/rechentest/providers/Microsoft.Batch/batchAccounts/azcliexttesting\",\r\n \"name\": \"azcliexttesting\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengwestus3\",\r\n \"name\": \"zfengwestus3\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus3\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/mytest/providers/Microsoft.Batch/batchAccounts/mybatchaccount\",\r\n \"name\": \"mybatchaccount\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus2\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/canarytest1/providers/Microsoft.Batch/batchAccounts/testcentralcanary\",\r\n \"name\": \"testcentralcanary\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"centraluseuap\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/test/providers/Microsoft.Batch/batchAccounts/com10\",\r\n \"name\": \"com10\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/akjtest/providers/Microsoft.Batch/batchAccounts/akjtestportal\",\r\n \"name\": \"akjtestportal\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/xingwu/providers/Microsoft.Batch/batchAccounts/testxomg\",\r\n \"name\": \"testxomg\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus2euap\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengjjoindiawest\",\r\n \"name\": \"zfengjjoindiawest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"jioindiawest\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengplinkcentralindia\",\r\n \"name\": \"zfengplinkcentralindia\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"centralindia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfplinkgermanwestcentral\",\r\n \"name\": \"zfplinkgermanwestcentral\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"germanywestcentral\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/abc/providers/Microsoft.Batch/batchAccounts/zfengprivatelink\",\r\n \"name\": \"zfengprivatelink\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/abc/providers/Microsoft.Batch/batchAccounts/zfengpna1\",\r\n \"name\": \"zfengpna1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/abc/providers/Microsoft.Batch/batchAccounts/zfengcontaineridentity\",\r\n \"name\": \"zfengcontaineridentity\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/mmtest/providers/Microsoft.Batch/batchAccounts/mmpp2ba\",\r\n \"name\": \"mmpp2ba\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/npipv2/providers/Microsoft.Batch/batchAccounts/pp2jingjli\",\r\n \"name\": \"pp2jingjli\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/npipv2/providers/Microsoft.Batch/batchAccounts/jingjlibyos\",\r\n \"name\": \"jingjlibyos\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/akjtest/providers/Microsoft.Batch/batchAccounts/akjshoeboxtest\",\r\n \"name\": \"akjshoeboxtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/accessibility\",\r\n \"name\": \"accessibility\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/test/providers/Microsoft.Batch/batchAccounts/zfengidentityrefumi\",\r\n \"name\": \"zfengidentityrefumi\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/zfengsdk\",\r\n \"name\": \"zfengsdk\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/test/providers/Microsoft.Batch/batchAccounts/zfengjobpreptask\",\r\n \"name\": \"zfengjobpreptask\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/test/providers/Microsoft.Batch/batchAccounts/zfeng521\",\r\n \"name\": \"zfeng521\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/zfengwus\",\r\n \"name\": \"zfengwus\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"identity\": {\r\n \"principalId\": \"0afcee94-2357-4d05-9f31-42a27a040ae5\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/test/providers/Microsoft.Batch/batchAccounts/zfengarm\",\r\n \"name\": \"zfengarm\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/test/providers/Microsoft.Batch/batchAccounts/zfengpna\",\r\n \"name\": \"zfengpna\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/zfengeastasia\",\r\n \"name\": \"zfengeastasia\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/brkleinpilotprod/providers/Microsoft.Batch/batchAccounts/tippremium\",\r\n \"name\": \"tippremium\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus2euap\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/brkleinpilotprod/providers/Microsoft.Batch/batchAccounts/tippremiumpage\",\r\n \"name\": \"tippremiumpage\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus2euap\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/rechentest/providers/Microsoft.Batch/batchAccounts/localaccounttest\",\r\n \"name\": \"localaccounttest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/rechentest/providers/Microsoft.Batch/batchAccounts/random\",\r\n \"name\": \"random\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/rechentest/providers/Microsoft.Batch/batchAccounts/potato\",\r\n \"name\": \"potato\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/zfengapppkgaad\",\r\n \"name\": \"zfengapppkgaad\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"southeastasia\",\r\n \"identity\": {\r\n \"principalId\": \"e5f726d5-3581-4c93-93d6-bd9882ec88a3\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/zfengmetrics\",\r\n \"name\": \"zfengmetrics\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/zfplinkv2\",\r\n \"name\": \"zfplinkv2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/zfplinkv2a\",\r\n \"name\": \"zfplinkv2a\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/zfplinkv2b\",\r\n \"name\": \"zfplinkv2b\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\",\r\n \"identity\": {\r\n \"principalId\": \"3708965e-3105-4425-ab9f-7bb8d382865b\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/zfplinkv2c\",\r\n \"name\": \"zfplinkv2c\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/zfpinkv2d\",\r\n \"name\": \"zfpinkv2d\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/zfplinkv2f\",\r\n \"name\": \"zfplinkv2f\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/zfplinkv2g\",\r\n \"name\": \"zfplinkv2g\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/zfplinkv2h\",\r\n \"name\": \"zfplinkv2h\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/zfplinkv2i\",\r\n \"name\": \"zfplinkv2i\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/zfplinkv2j\",\r\n \"name\": \"zfplinkv2j\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/zfplinkv2k\",\r\n \"name\": \"zfplinkv2k\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/zfplinkv2l\",\r\n \"name\": \"zfplinkv2l\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/zfplinkv2m\",\r\n \"name\": \"zfplinkv2m\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/zfplink\",\r\n \"name\": \"zfplink\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/zfplinkeu\",\r\n \"name\": \"zfplinkeu\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/prodtest2/providers/Microsoft.Batch/batchAccounts/testbyovnet\",\r\n \"name\": \"testbyovnet\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/zfplinkv2kk\",\r\n \"name\": \"zfplinkv2kk\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/zfwestus\",\r\n \"name\": \"zfwestus\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/zfengkvcert\",\r\n \"name\": \"zfengkvcert\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/zfen\",\r\n \"name\": \"zfen\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/npipv2/providers/Microsoft.Batch/batchAccounts/sanj5324\",\r\n \"name\": \"sanj5324\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/zfengtestw\",\r\n \"name\": \"zfengtestw\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/test/providers/Microsoft.Batch/batchAccounts/lchencentraluseuap\",\r\n \"name\": \"lchencentraluseuap\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"centraluseuap\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/zfwestus1\",\r\n \"name\": \"zfwestus1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/zzzzvb\",\r\n \"name\": \"zzzzvb\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/zzzzffff\",\r\n \"name\": \"zzzzffff\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/zzzfff\",\r\n \"name\": \"zzzfff\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/zzzkv\",\r\n \"name\": \"zzzkv\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/zfengapppkg\",\r\n \"name\": \"zfengapppkg\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/npipv2/providers/Microsoft.Batch/batchAccounts/testaccountcbn\",\r\n \"name\": \"testaccountcbn\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus2euap\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengcmk\",\r\n \"name\": \"zfengcmk\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengcmk1\",\r\n \"name\": \"zfengcmk1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengcmk2\",\r\n \"name\": \"zfengcmk2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengcmkbyos\",\r\n \"name\": \"zfengcmkbyos\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2061/providers/Microsoft.Batch/batchAccounts/ps3615\",\r\n \"name\": \"ps3615\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus2\",\r\n \"tags\": {\r\n \"tag2\": \"tagValue2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/ates\",\r\n \"name\": \"ates\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/hoppeuser\",\r\n \"name\": \"hoppeuser\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"centralus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/hoppesys\",\r\n \"name\": \"hoppesys\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westcentralus\",\r\n \"identity\": {\r\n \"principalId\": \"66a43f55-cbb6-4411-8e72-7ff72cb5e4c1\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/rechentest/providers/Microsoft.Batch/batchAccounts/randomtestaccount\",\r\n \"name\": \"randomtestaccount\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus3\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/BatchDNCrg/providers/Microsoft.Batch/batchAccounts/adfrolling1\",\r\n \"name\": \"adfrolling1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus2euap\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/zfengcmk3\",\r\n \"name\": \"zfengcmk3\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/zfengcmk4\",\r\n \"name\": \"zfengcmk4\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/zfengcmk5\",\r\n \"name\": \"zfengcmk5\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/zfengcmkbyos1\",\r\n \"name\": \"zfengcmkbyos1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/zfengcmk6\",\r\n \"name\": \"zfengcmk6\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"identity\": {\r\n \"principalId\": \"9e06a541-7a54-4f43-99cb-1486eb85f9d0\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/zfengcmk7\",\r\n \"name\": \"zfengcmk7\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/zfengcmk8\",\r\n \"name\": \"zfengcmk8\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/zfengcmk9\",\r\n \"name\": \"zfengcmk9\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/victorli/providers/Microsoft.Batch/batchAccounts/victortesteastus2\",\r\n \"name\": \"victortesteastus2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus2\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/zfght\",\r\n \"name\": \"zfght\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/zfengquotatest\",\r\n \"name\": \"zfengquotatest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/zfengkorencentral\",\r\n \"name\": \"zfengkorencentral\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"koreacentral\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/npipv2/providers/Microsoft.Batch/batchAccounts/sktest2\",\r\n \"name\": \"sktest2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"centralus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/hoppesdk\",\r\n \"name\": \"hoppesdk\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus2\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/zfengvmext\",\r\n \"name\": \"zfengvmext\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"norwayeast\",\r\n \"identity\": {\r\n \"principalId\": \"17b1614c-0806-4fa0-a96e-d0492bffb6eb\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/hoppeeastasia2\",\r\n \"name\": \"hoppeeastasia2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\",\r\n \"identity\": {\r\n \"principalId\": \"91248766-5d90-412c-a3a7-792c4ef92a2e\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/rg-wiborisbatch/providers/Microsoft.Batch/batchAccounts/dotnotsdkbatchaccount1\",\r\n \"name\": \"dotnotsdkbatchaccount1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/automation/providers/Microsoft.Batch/batchAccounts/billstestba24326\",\r\n \"name\": \"billstestba24326\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"uksouth\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1803/providers/Microsoft.Batch/batchAccounts/ps9231\",\r\n \"name\": \"ps9231\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus2\",\r\n \"tags\": {\r\n \"tag2\": \"tagValue2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/twamovebatchacct/providers/Microsoft.Batch/batchAccounts/twabatchinch1\",\r\n \"name\": \"twabatchinch1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"northcentralus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/CLIAutomation/providers/Microsoft.Batch/batchAccounts/cliautomationba\",\r\n \"name\": \"cliautomationba\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus3\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/automationusersub/providers/Microsoft.Batch/batchAccounts/wiborisbatchusersub\",\r\n \"name\": \"wiborisbatchusersub\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n }\r\n ]\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2061/providers/Microsoft.Batch/batchAccounts/ps3615/listKeys?api-version=2022-10-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzL3BzMjA2MS9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvcHMzNjE1L2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMjItMTAtMDE=", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1803/providers/Microsoft.Batch/batchAccounts/ps9231/listKeys?api-version=2022-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL3BzMTgwMy9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvcHM5MjMxL2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMjItMTAtMDE=", "RequestMethod": "POST", "RequestHeaders": { "x-ms-client-request-id": [ - "658c029b-4a7b-45ec-8ad7-398314df6326" + "5ced2d96-849f-4969-9cda-7ed897db03b4" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Batch.BatchManagementClient/14.2.0.0" ] }, @@ -833,11 +878,8 @@ "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], "x-ms-request-id": [ - "18b0cc30-8ef0-4ca8-9e71-c528221a92f4" + "9529f399-a4a1-4bd8-bd36-e6a5184f2b5d" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -845,17 +887,23 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" ], "x-ms-correlation-request-id": [ - "809bcac3-fe38-41fc-90a7-e3bc2f3ae50e" + "b3af42f4-ba2a-450b-be38-13215fec7b33" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072750Z:809bcac3-fe38-41fc-90a7-e3bc2f3ae50e" + "WESTUS2:20240321T225755Z:b3af42f4-ba2a-450b-be38-13215fec7b33" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: B8D48EC19EE14FFB8476AD16BA04549F Ref B: CO6AA3150219053 Ref C: 2024-03-21T22:57:55Z" ], "Date": [ - "Fri, 16 Jun 2023 07:27:50 GMT" + "Thu, 21 Mar 2024 22:57:55 GMT" ], "Content-Length": [ "228" @@ -867,24 +915,24 @@ "-1" ] }, - "ResponseBody": "{\r\n \"accountName\": \"ps3615\",\r\n \"primary\": \"/HzFRiehkAMcs89kE7FCjNrH20xyfdGM0ofFKdjpNFbTECiUKg3AwPRdhdW6pMj7v8/tQMNcjAWf+ABaCgIlIg==\",\r\n \"secondary\": \"i1VituFC4ZDnjqydx4KTiYCdABKYBJQBxurbUA726ReyVCnNl0MwawSn9TtMG7xJflJlzqqdUsBM+ABa2aft5g==\"\r\n}", + "ResponseBody": "{\r\n \"accountName\": \"ps9231\",\r\n \"primary\": \"secret\",\r\n \"secondary\": \"secret\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2061/providers/Microsoft.Batch/batchAccounts/ps3615/listKeys?api-version=2022-10-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzL3BzMjA2MS9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvcHMzNjE1L2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMjItMTAtMDE=", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1803/providers/Microsoft.Batch/batchAccounts/ps9231/listKeys?api-version=2022-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL3BzMTgwMy9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvcHM5MjMxL2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMjItMTAtMDE=", "RequestMethod": "POST", "RequestHeaders": { "x-ms-client-request-id": [ - "2d921c8d-0c42-4c5e-a1ae-04ea6a4f4142" + "b1fe3b02-f1f6-43b0-9b57-afd2bb5d844a" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Batch.BatchManagementClient/14.2.0.0" ] }, @@ -896,11 +944,8 @@ "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1198" - ], "x-ms-request-id": [ - "8d7eb752-4d44-44e4-9dc4-13972e5a91be" + "2f574245-8a07-4860-9187-c4ca18dc9335" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -908,17 +953,23 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" ], "x-ms-correlation-request-id": [ - "bcf8f866-92b4-4d2e-b3c3-1419375fcff8" + "df317511-59fc-47b0-82aa-c1f2c38c3b2e" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072751Z:bcf8f866-92b4-4d2e-b3c3-1419375fcff8" + "WESTUS2:20240321T225755Z:df317511-59fc-47b0-82aa-c1f2c38c3b2e" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: DFA601693887419AB1272ABDAB374F28 Ref B: CO6AA3150219053 Ref C: 2024-03-21T22:57:55Z" ], "Date": [ - "Fri, 16 Jun 2023 07:27:51 GMT" + "Thu, 21 Mar 2024 22:57:55 GMT" ], "Content-Length": [ "228" @@ -930,24 +981,24 @@ "-1" ] }, - "ResponseBody": "{\r\n \"accountName\": \"ps3615\",\r\n \"primary\": \"/HzFRiehkAMcs89kE7FCjNrH20xyfdGM0ofFKdjpNFbTECiUKg3AwPRdhdW6pMj7v8/tQMNcjAWf+ABaCgIlIg==\",\r\n \"secondary\": \"i1VituFC4ZDnjqydx4KTiYCdABKYBJQBxurbUA726ReyVCnNl0MwawSn9TtMG7xJflJlzqqdUsBM+ABa2aft5g==\"\r\n}", + "ResponseBody": "{\r\n \"accountName\": \"ps9231\",\r\n \"primary\": \"newsecret\",\r\n \"secondary\": \"secret\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2061/providers/Microsoft.Batch/batchAccounts/ps3615/regenerateKeys?api-version=2022-10-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzL3BzMjA2MS9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvcHMzNjE1L3JlZ2VuZXJhdGVLZXlzP2FwaS12ZXJzaW9uPTIwMjItMTAtMDE=", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1803/providers/Microsoft.Batch/batchAccounts/ps9231/regenerateKeys?api-version=2022-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL3BzMTgwMy9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvcHM5MjMxL3JlZ2VuZXJhdGVLZXlzP2FwaS12ZXJzaW9uPTIwMjItMTAtMDE=", "RequestMethod": "POST", "RequestHeaders": { "x-ms-client-request-id": [ - "3f37d66d-ce40-4f91-821a-3d6faa1c3545" + "8d5dadba-a6ba-4ec7-9c94-e92f926c0838" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Batch.BatchManagementClient/14.2.0.0" ], "Content-Type": [ @@ -965,11 +1016,8 @@ "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1197" - ], "x-ms-request-id": [ - "6063a0ae-b362-49fc-b924-91823e8d3ebb" + "702b5356-9114-4e26-89cd-2ffdffcac305" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -977,17 +1025,23 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" ], "x-ms-correlation-request-id": [ - "d167cf69-3cda-40a4-9fbf-abd552219803" + "4e4205e3-ca60-4bea-9528-418c11e35e1d" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072752Z:d167cf69-3cda-40a4-9fbf-abd552219803" + "WESTUS2:20240321T225756Z:4e4205e3-ca60-4bea-9528-418c11e35e1d" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 5EDDA2D50B48417ABB5005D0A623478B Ref B: CO6AA3150219053 Ref C: 2024-03-21T22:57:55Z" ], "Date": [ - "Fri, 16 Jun 2023 07:27:51 GMT" + "Thu, 21 Mar 2024 22:57:55 GMT" ], "Content-Length": [ "228" @@ -999,24 +1053,24 @@ "-1" ] }, - "ResponseBody": "{\r\n \"accountName\": \"ps3615\",\r\n \"primary\": \"yeJAoC4zFpcb81WGRz7YKbbDfKiOs4JKjHb0udj/LZ7Df+0VvwIXZcW0FEr0TN32O9y88nB1XBUC+ABaGa2xfw==\",\r\n \"secondary\": \"i1VituFC4ZDnjqydx4KTiYCdABKYBJQBxurbUA726ReyVCnNl0MwawSn9TtMG7xJflJlzqqdUsBM+ABa2aft5g==\"\r\n}", + "ResponseBody": "{\r\n \"accountName\": \"ps9231\",\r\n \"primary\": \"secret\",\r\n \"secondary\": \"secret\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2061/providers/Microsoft.Batch/batchAccounts/ps3615?api-version=2022-10-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzL3BzMjA2MS9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvcHMzNjE1P2FwaS12ZXJzaW9uPTIwMjItMTAtMDE=", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1803/providers/Microsoft.Batch/batchAccounts/ps9231?api-version=2022-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL3BzMTgwMy9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvcHM5MjMxP2FwaS12ZXJzaW9uPTIwMjItMTAtMDE=", "RequestMethod": "DELETE", "RequestHeaders": { "x-ms-client-request-id": [ - "bc842315-7683-4c09-a108-473374c8bf34" + "dfad45a9-17b4-498a-a879-1f0c3357b8f8" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Batch.BatchManagementClient/14.2.0.0" ] }, @@ -1029,13 +1083,13 @@ "no-cache" ], "Location": [ - "https://management.azure.com/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/providers/Microsoft.Batch/locations/westus2/accountOperationResults/ps3615-b597b4ff-769c-4859-ae97-4e253fd5f13a?api-version=2022-10-01" + "https://management.azure.com/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/providers/Microsoft.Batch/locations/westus2/accountOperationResults/ps9231-a4b93f88-7e2f-4f12-a31a-c79860a9f35b?api-version=2022-10-01&t=638466586766955242&c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJ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83EiB57Lm1FZEOZS2sOod4u9e7VYe4jlYvcF3hNq0iMBSs1XRkcYACJkAKJimhxRzxYYoA97Fis7aVY5IHpeuE6N9MvcNgSkI-WeV3xSCiqfL4t0k4HX2B7lIbcHYQuOGouOdQWHP8p76d4RHGdPsDJ7Af1oLlHkHpCjwUA2ca-5B7G0aBP2_j65uk5yidR7t0fJkVF44cOsaCG7pulYO2OvasC87pNor6eRCR18WZPZyzLUTRuTZscpxBa3BzVOLPasy33CBwRn2fNwvO1QqZoNnV018q3It9WRNsEmrWquRPuUPp7tx-TumQdhXF4yZg&h=_PVuj4SnKPdhCBkoPUse2t77DzUQShrv5yHkao4PmBU" ], "Retry-After": [ "15" ], "x-ms-request-id": [ - "b597b4ff-769c-4859-ae97-4e253fd5f13a" + "a4b93f88-7e2f-4f12-a31a-c79860a9f35b" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1043,20 +1097,23 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], "x-ms-correlation-request-id": [ - "471a2446-05d8-40b6-8baf-a4a7e86ce4ea" + "02faf18d-2f53-44db-8b3c-3f2f59251930" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072753Z:471a2446-05d8-40b6-8baf-a4a7e86ce4ea" + "WESTUS2:20240321T225756Z:02faf18d-2f53-44db-8b3c-3f2f59251930" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: FEF5FA7EE02F42DDB772895CDF0C38B2 Ref B: CO6AA3150219053 Ref C: 2024-03-21T22:57:56Z" ], "Date": [ - "Fri, 16 Jun 2023 07:27:52 GMT" + "Thu, 21 Mar 2024 22:57:56 GMT" ], "Expires": [ "-1" @@ -1069,17 +1126,17 @@ "StatusCode": 202 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/providers/Microsoft.Batch/locations/westus2/accountOperationResults/ps3615-b597b4ff-769c-4859-ae97-4e253fd5f13a?api-version=2022-10-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Byb3ZpZGVycy9NaWNyb3NvZnQuQmF0Y2gvbG9jYXRpb25zL3dlc3R1czIvYWNjb3VudE9wZXJhdGlvblJlc3VsdHMvcHMzNjE1LWI1OTdiNGZmLTc2OWMtNDg1OS1hZTk3LTRlMjUzZmQ1ZjEzYT9hcGktdmVyc2lvbj0yMDIyLTEwLTAx", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/providers/Microsoft.Batch/locations/westus2/accountOperationResults/ps9231-a4b93f88-7e2f-4f12-a31a-c79860a9f35b?api-version=2022-10-01&t=638466586766955242&c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOVFiSMi9Sg6cKnrBuPHbDk_Zwa1ZNYHwLVPJArEI9N2bLrgd1mU0ZdNVcdf6rtZCkUUuCe3vxnVTGwufpwH9GPWDgJOpJoL9wgKOzUDiHLUeiWPjrK1AoaQVprZgjnzXBIWiZC2tZjbUT9pOI_ixYJJPrsCfLt7HEccnhObROE1mo_hpiPDrtOQDaX-BboNceB8vI1wmSPApGpPRM9hBRQbXgqKFC8094UNsMVkWPCrsPvP5YlMBLARlGf2WTevGKRREjst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Version/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Batch.BatchManagementClient/14.2.0.0" ] }, @@ -1092,7 +1149,7 @@ "no-cache" ], "x-ms-request-id": [ - "e0c5d69f-3e1d-4669-9dfa-4b4dd8ef8218" + "2e63f419-02ac-4bc3-bb96-86c415545a66" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1100,20 +1157,23 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" + "11999" ], "x-ms-correlation-request-id": [ - "d605deec-6d3e-45f4-9a92-4e1ba6c91347" + "633534aa-1d78-4fe0-9b14-30a853207ee0" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072808Z:d605deec-6d3e-45f4-9a92-4e1ba6c91347" + "WESTUS2:20240321T225811Z:633534aa-1d78-4fe0-9b14-30a853207ee0" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 67E6E81C87D04BF5B2109BBB2CDFB112 Ref B: CO6AA3150219053 Ref C: 2024-03-21T22:58:11Z" ], "Date": [ - "Fri, 16 Jun 2023 07:28:07 GMT" + "Thu, 21 Mar 2024 22:58:11 GMT" ], "Expires": [ "-1" @@ -1126,17 +1186,17 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/providers/Microsoft.Batch/locations/westus2/accountOperationResults/ps3615-b597b4ff-769c-4859-ae97-4e253fd5f13a?api-version=2022-10-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Byb3ZpZGVycy9NaWNyb3NvZnQuQmF0Y2gvbG9jYXRpb25zL3dlc3R1czIvYWNjb3VudE9wZXJhdGlvblJlc3VsdHMvcHMzNjE1LWI1OTdiNGZmLTc2OWMtNDg1OS1hZTk3LTRlMjUzZmQ1ZjEzYT9hcGktdmVyc2lvbj0yMDIyLTEwLTAx", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/providers/Microsoft.Batch/locations/westus2/accountOperationResults/ps9231-a4b93f88-7e2f-4f12-a31a-c79860a9f35b?api-version=2022-10-01&t=638466586766955242&c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOVFiSMi9Sg6cKnrBuPHbDk_Zwa1ZNYHwLVPJArEI9N2bLrgd1mU0ZdNVcdf6rtZCkUUuCe3vxnVTGwufpwH9GPWDgJOpJoL9wgKOzUDiHLUeiWPjrK1AoaQVprZgjnzXBIWiZC2tZjbUT9pOI_ixYJJPrsCfLt7HEccnhObROE1mo_hpiPDrtOQDaX-BboNceB8vI1wmSPApGpPRM9hBRQbXgqKFC8094UNsMVkWPCrsPvP5YlMBLARlGf2WTevGKRREjstkApf1Swi7uKnpyhhsidD1yREMU0mWY9wnZfAX0jpEp3p9jKVMPQ3L-m-nSZI4zrtbW0AnI0O3pAEwe0CAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX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hHSWFrYkxNZWNfMVNJUzhOZFBzQjZpNlhQakwyU0RqcUtUYTVjYXI3YlZZbFhFVnNnTC0wMDBWRjF0NngxSUkzVkJOZnNFSjgxQ2RKeXhhQ0pud3ZXSTZrSHRDdEpYOVFZSzNxWmFiOVBmWlJCdmNldEpvUGRNRnZCVSZzPUxRZTl5elI1UmVsUlNyZ1JJeVFQODNFaUI1N0xtMUZaRU9aUzJzT29kNHU5ZTdWWWU0amxZdmNGM2hOcTBpTUJTczFYUmtjWUFDSmtBS0ppbWh4Unp4WVlvQTk3RmlzN2FWWTVJSHBldUU2TjlNdmNOZ1NrSS1XZVYzeFNDaXFmTDR0MGs0SFgyQjdsSWJjSFlRdU9Hb3VPZFFXSFA4cDc2ZDRSSEdkUHNESjdBZjFvTGxIa0hwQ2p3VUEyY2EtNUI3RzBhQlAyX2o2NXVrNXlpZFI3dDBmSmtWRjQ0Y09zYUNHN3B1bFlPMk92YXNDODdwTm9yNmVSQ1IxOFdaUFp5ekxVVFJ1VFpzY3B4QmEzQnpWT0xQYXN5MzNDQndSbjJmTnd2TzFRcVpvTm5WMDE4cTNJdDlXUk5zRW1yV3F1UlB1VVBwN3R4LVR1bVFkaFhGNHlaZyZoPV9QVnVqNFNuS1BkaENCa29QVXNlMnQ3N0R6VVFTaHJ2NXlIa2FvNFBtQlU=", "RequestMethod": "GET", "RequestHeaders": { "x-ms-client-request-id": [ - "bc842315-7683-4c09-a108-473374c8bf34" + "dfad45a9-17b4-498a-a879-1f0c3357b8f8" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Batch.BatchManagementClient/14.2.0.0" ] }, @@ -1149,7 +1209,7 @@ "no-cache" ], "x-ms-request-id": [ - "8c02802f-56c1-4756-87f9-bfc477e58e52" + "1c70cbe6-8500-4c89-9071-955e134c05fe" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1157,20 +1217,23 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" + "11999" ], "x-ms-correlation-request-id": [ - "c481cec7-9ad5-4818-b8b5-2875cdcb7ef6" + "d63400ed-f1be-47d2-bbe2-0627d458490f" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072809Z:c481cec7-9ad5-4818-b8b5-2875cdcb7ef6" + "WESTUS2:20240321T225811Z:d63400ed-f1be-47d2-bbe2-0627d458490f" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 187DC86F843443E598F1B0759D4E3FCA Ref B: CO6AA3150219053 Ref C: 2024-03-21T22:58:11Z" ], "Date": [ - "Fri, 16 Jun 2023 07:28:08 GMT" + "Thu, 21 Mar 2024 22:58:11 GMT" ], "Expires": [ "-1" @@ -1183,21 +1246,21 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourcegroups/ps2061?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlZ3JvdXBzL3BzMjA2MT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourcegroups/ps1803?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlZ3JvdXBzL3BzMTgwMz9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", "RequestMethod": "DELETE", "RequestHeaders": { "x-ms-client-request-id": [ - "b4c461b3-9576-4b2c-b578-f8ee311da1ac" + "2de2baee-60e2-4a66-bb80-530c6087df69" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" ] }, "RequestBody": "", @@ -1209,7 +1272,7 @@ "no-cache" ], "Location": [ - "https://management.azure.com/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwNjEtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01" + "https://management.azure.com/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzE4MDMtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01&t=638466586922310500&c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOVFiSMi9Sg6cKnrBuPHbDk_Zwa1ZNYHwLVPJArEI9N2bLrgd1mU0ZdNVcdf6rtZCkUUuCe3vxnVTGwufpwH9GPWDgJOpJoL9wgKOzUDiHLUeiW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T0BDH38O07IV1wvCAaRAmVq6BDgTvVFPCYQMiYDo65xIQW2AzwB77XU_Jhj3cenoKCcJWx-Yd-RzMQSiQuP5ft8umN8s_8CQQ7-z_ouQn55Uybe__usjqyftIE4thbeEf0OmYXHZrmk7xedk4etGqNQKA&h=YPD9Ud-jftITNav1SuezbRZWhgfhKY-9TEd1gAwQfQ4" ], "Retry-After": [ "15" @@ -1218,13 +1281,13 @@ "14999" ], "x-ms-request-id": [ - "ca0d28d2-ed71-441a-9cd7-b00d8dfb0b53" + "47d708c7-571e-474a-ade0-117afdd9d821" ], "x-ms-correlation-request-id": [ - "ca0d28d2-ed71-441a-9cd7-b00d8dfb0b53" + "47d708c7-571e-474a-ade0-117afdd9d821" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072812Z:ca0d28d2-ed71-441a-9cd7-b00d8dfb0b53" + "WESTUS2:20240321T225812Z:47d708c7-571e-474a-ade0-117afdd9d821" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1232,65 +1295,14 @@ "X-Content-Type-Options": [ "nosniff" ], - "Date": [ - "Fri, 16 Jun 2023 07:28:12 GMT" + "X-Cache": [ + "CONFIG_NOCACHE" ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwNjEtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJd05qRXRWMFZUVkZWVE1pSXNJbXB2WWt4dlkyRjBhVzl1SWpvaWQyVnpkSFZ6TWlKOT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "GET", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwNjEtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-request-id": [ - "246e4805-49c9-4b2a-9139-a51271040daa" - ], - "x-ms-correlation-request-id": [ - "246e4805-49c9-4b2a-9139-a51271040daa" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072828Z:246e4805-49c9-4b2a-9139-a51271040daa" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" + "X-MSEdge-Ref": [ + "Ref A: 751DDA7E977C47A59F16EA0F2F8B5683 Ref B: CO6AA3150217027 Ref C: 2024-03-21T22:58:12Z" ], "Date": [ - "Fri, 16 Jun 2023 07:28:27 GMT" + "Thu, 21 Mar 2024 22:58:11 GMT" ], "Expires": [ "-1" @@ -1303,15 +1315,15 @@ "StatusCode": 202 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwNjEtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJd05qRXRWMFZUVkZWVE1pSXNJbXB2WWt4dlkyRjBhVzl1SWpvaWQyVnpkSFZ6TWlKOT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzE4MDMtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01&t=638466586922310500&c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOVFiSMi9Sg6cKnrBuPHbDk_Zwa1ZNYHwLVPJArEI9N2bLrgd1mU0ZdNVcdf6rtZCkUUuCe3vxnVTGwufpwH9GPWDgJOpJoL9wgKOzUDiHLUeiWPjrK1AoaQVprZgjnzXBIWiZC2tZjbUT9pOI_ixYJJPrsCfLt7HEccnhObROE1mo_hpiPDrtOQDaX-BboNceB8vI1wmSPApGpPRM9hBRQbXgqKFC8094UNsMVkWPCrsPvP5YlMBLAR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", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" ] }, "RequestBody": "", @@ -1322,80 +1334,17 @@ "Pragma": [ "no-cache" ], - "Location": [ - "https://management.azure.com/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwNjEtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-request-id": [ - "3623f1f3-1435-47e9-9bcc-4815e17296b1" - ], - "x-ms-correlation-request-id": [ - "3623f1f3-1435-47e9-9bcc-4815e17296b1" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072843Z:3623f1f3-1435-47e9-9bcc-4815e17296b1" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Fri, 16 Jun 2023 07:28:42 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwNjEtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJd05qRXRWMFZUVkZWVE1pSXNJbXB2WWt4dlkyRjBhVzl1SWpvaWQyVnpkSFZ6TWlKOT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "GET", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwNjEtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" + "11999" ], "x-ms-request-id": [ - "f5a007a7-80fe-4a47-b2e8-df32cc9ddad6" + "aa616be5-b687-42df-99a2-9f4222ba17c0" ], "x-ms-correlation-request-id": [ - "f5a007a7-80fe-4a47-b2e8-df32cc9ddad6" + "aa616be5-b687-42df-99a2-9f4222ba17c0" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072859Z:f5a007a7-80fe-4a47-b2e8-df32cc9ddad6" + "WESTUS2:20240321T225827Z:aa616be5-b687-42df-99a2-9f4222ba17c0" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1403,65 +1352,14 @@ "X-Content-Type-Options": [ "nosniff" ], - "Date": [ - "Fri, 16 Jun 2023 07:28:59 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwNjEtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJd05qRXRWMFZUVkZWVE1pSXNJbXB2WWt4dlkyRjBhVzl1SWpvaWQyVnpkSFZ6TWlKOT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "GET", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwNjEtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01" + "X-Cache": [ + "CONFIG_NOCACHE" ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-request-id": [ - "bb5a4442-8d46-4fe4-bf50-f930336272f3" - ], - "x-ms-correlation-request-id": [ - "bb5a4442-8d46-4fe4-bf50-f930336272f3" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072914Z:bb5a4442-8d46-4fe4-bf50-f930336272f3" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" + "X-MSEdge-Ref": [ + "Ref A: 8B1B669732CF49868320F0616790105F Ref B: CO6AA3150217027 Ref C: 2024-03-21T22:58:27Z" ], "Date": [ - "Fri, 16 Jun 2023 07:29:14 GMT" + "Thu, 21 Mar 2024 22:58:26 GMT" ], "Expires": [ "-1" @@ -1471,18 +1369,18 @@ ] }, "ResponseBody": "", - "StatusCode": 202 + "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwNjEtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJd05qRXRWMFZUVkZWVE1pSXNJbXB2WWt4dlkyRjBhVzl1SWpvaWQyVnpkSFZ6TWlKOT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzE4MDMtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01&t=638466586922310500&c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ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TWlZRG82NXhJUVcyQXp3Qjc3WFVfSmhqM2Nlbm9LQ2NKV3gtWWQtUnpNUVNpUXVQNWZ0OHVtTjhzXzhDUVE3LXpfb3VRbjU1VXliZV9fdXNqcXlmdElFNHRoYmVFZjBPbVlYSFpybWs3eGVkazRldEdxTlFLQSZoPVlQRDlVZC1qZnRJVE5hdjFTdWV6YlJaV2hnZmhLWS05VEVkMWdBd1FmUTQ=", "RequestMethod": "GET", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" ] }, "RequestBody": "", @@ -1494,16 +1392,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" + "11999" ], "x-ms-request-id": [ - "5864972e-3c28-4e7b-a509-83e67ec6b736" + "ab69816d-1126-405b-922f-8c92f7ac549e" ], "x-ms-correlation-request-id": [ - "5864972e-3c28-4e7b-a509-83e67ec6b736" + "ab69816d-1126-405b-922f-8c92f7ac549e" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072930Z:5864972e-3c28-4e7b-a509-83e67ec6b736" + "WESTUS2:20240321T225827Z:ab69816d-1126-405b-922f-8c92f7ac549e" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1511,59 +1409,14 @@ "X-Content-Type-Options": [ "nosniff" ], - "Date": [ - "Fri, 16 Jun 2023 07:29:29 GMT" - ], - "Expires": [ - "-1" + "X-Cache": [ + "CONFIG_NOCACHE" ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwNjEtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJd05qRXRWMFZUVkZWVE1pSXNJbXB2WWt4dlkyRjBhVzl1SWpvaWQyVnpkSFZ6TWlKOT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "GET", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-request-id": [ - "96e7a0e9-acfa-4f83-853e-e606db8ff95a" - ], - "x-ms-correlation-request-id": [ - "96e7a0e9-acfa-4f83-853e-e606db8ff95a" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072930Z:96e7a0e9-acfa-4f83-853e-e606db8ff95a" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" + "X-MSEdge-Ref": [ + "Ref A: 593C410B828F483A912217B31907C73A Ref B: CO6AA3150217027 Ref C: 2024-03-21T22:58:27Z" ], "Date": [ - "Fri, 16 Jun 2023 07:29:29 GMT" + "Thu, 21 Mar 2024 22:58:26 GMT" ], "Expires": [ "-1" @@ -1578,14 +1431,14 @@ ], "Names": { "Test-BatchAccountEndToEnd": [ - "ps3615", - "ps2061" + "ps9231", + "ps1803" ] }, "Variables": { - "SubscriptionId": "21abd678-18c5-4660-9fdd-8c5ba6b6fe1f", - "AZURE_BATCH_ACCOUNT": "hoppeeastasia2", - "AZURE_BATCH_ENDPOINT": "https://hoppeeastasia2.eastasia.batch.azure.com", - "AZURE_BATCH_RESOURCE_GROUP": "123" + "SubscriptionId": "6602ac9a-5dad-41bd-a792-592c704b6a31", + "AZURE_BATCH_ACCOUNT": "billstestba24326", + "AZURE_BATCH_ENDPOINT": "https://billstestba24326.uksouth.batch.azure.com", + "AZURE_BATCH_RESOURCE_GROUP": "automation" } } \ No newline at end of file diff --git a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestCreateNewBatchAccountWithNoPublicIp.json b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestCreateNewBatchAccountWithNoPublicIp.json index 44a776ee1651..b67655dc6892 100644 --- a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestCreateNewBatchAccountWithNoPublicIp.json +++ b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestCreateNewBatchAccountWithNoPublicIp.json @@ -1,21 +1,21 @@ { "Entries": [ { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/providers/Microsoft.Batch?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Byb3ZpZGVycy9NaWNyb3NvZnQuQmF0Y2g/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/providers/Microsoft.Batch?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQmF0Y2g/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", "RequestMethod": "GET", "RequestHeaders": { "x-ms-client-request-id": [ - "86e5605f-e99b-4c92-96ae-56dd9d1c9eb1" + "8f82b428-3938-4652-85c4-be94d1402b34" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" ] }, "RequestBody": "", @@ -30,13 +30,13 @@ "11999" ], "x-ms-request-id": [ - "ab0812d9-67b6-4f73-a52a-86a09ca95d91" + "2401914c-3fcc-4753-b3eb-807104a76b4c" ], "x-ms-correlation-request-id": [ - "ab0812d9-67b6-4f73-a52a-86a09ca95d91" + "2401914c-3fcc-4753-b3eb-807104a76b4c" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T073122Z:ab0812d9-67b6-4f73-a52a-86a09ca95d91" + "WESTUS2:20240321T230210Z:2401914c-3fcc-4753-b3eb-807104a76b4c" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -44,38 +44,44 @@ "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: A5F9E31F4EC5475E85D8D04BEFE1903F Ref B: CO6AA3150219051 Ref C: 2024-03-21T23:02:10Z" + ], "Date": [ - "Fri, 16 Jun 2023 07:31:22 GMT" + "Thu, 21 Mar 2024 23:02:10 GMT" + ], + "Content-Length": [ + "14538" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" - ], - "Content-Length": [ - "9611" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"authorization\": {\r\n \"applicationId\": \"ddbf3205-c6bd-46ae-8127-60eb93363864\",\r\n \"roleDefinitionId\": \"b7f84953-1d03-4eab-9ea4-45f065258ff8\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\",\r\n \"2017-01-01\",\r\n \"2015-12-01\",\r\n \"2015-09-01\",\r\n \"2015-07-01\",\r\n \"2014-05-01-privatepreview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"batchAccounts/pools\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"batchAccounts/detectors\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"batchAccounts/certificates\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\",\r\n \"2017-01-01\",\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\",\r\n \"2017-01-01\",\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\",\r\n \"2017-01-01\",\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/checkNameAvailability\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/accountOperationResults\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\",\r\n \"2017-01-01\",\r\n \"2015-12-01\",\r\n \"2015-09-01\",\r\n \"2015-07-01\",\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/virtualMachineSkus\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/cloudServiceSkus\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"authorization\": {\r\n \"applicationId\": \"ddbf3205-c6bd-46ae-8127-60eb93363864\",\r\n \"roleDefinitionId\": \"b7f84953-1d03-4eab-9ea4-45f065258ff8\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\",\r\n \"2017-01-01\",\r\n \"2015-12-01\",\r\n \"2015-09-01\",\r\n \"2015-07-01\",\r\n \"2014-05-01-privatepreview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"batchAccounts/pools\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"batchAccounts/detectors\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"batchAccounts/certificates\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"batchAccounts/operationResults\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\",\r\n \"2017-01-01\",\r\n \"2015-12-01\",\r\n \"2015-09-01\",\r\n \"2015-07-01\",\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"batchAccounts/poolOperationResults\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"batchAccounts/certificateOperationResults\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"batchAccounts/privateEndpointConnectionProxyResults\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"batchAccounts/privateEndpointConnectionResults\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\",\r\n \"2017-01-01\",\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\",\r\n \"2017-01-01\",\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\",\r\n \"2017-01-01\",\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/checkNameAvailability\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/accountOperationResults\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\",\r\n \"2017-01-01\",\r\n \"2015-12-01\",\r\n \"2015-09-01\",\r\n \"2015-07-01\",\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/virtualMachineSkus\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/cloudServiceSkus\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourcegroups/ps2300?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlZ3JvdXBzL3BzMjMwMD9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourcegroups/ps1360?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlZ3JvdXBzL3BzMTM2MD9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", "RequestMethod": "PUT", "RequestHeaders": { "x-ms-client-request-id": [ - "5b4ce592-4a03-4ef7-bc00-c3aef1adcc08" + "9460f53c-b2a8-45bf-b0e0-952d9d52ecd0" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" ], "Content-Type": [ "application/json; charset=utf-8" @@ -96,13 +102,13 @@ "1199" ], "x-ms-request-id": [ - "f67c24e8-9ae6-4bb5-841e-311613de4802" + "fb7b9a1b-0610-41ac-8164-2bb3f7a25491" ], "x-ms-correlation-request-id": [ - "f67c24e8-9ae6-4bb5-841e-311613de4802" + "fb7b9a1b-0610-41ac-8164-2bb3f7a25491" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T073124Z:f67c24e8-9ae6-4bb5-841e-311613de4802" + "WESTUS2:20240321T230211Z:fb7b9a1b-0610-41ac-8164-2bb3f7a25491" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -110,8 +116,14 @@ "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 3AC18450D686437FAFAC1814E8509D64 Ref B: CO6AA3150219051 Ref C: 2024-03-21T23:02:10Z" + ], "Date": [ - "Fri, 16 Jun 2023 07:31:24 GMT" + "Thu, 21 Mar 2024 23:02:10 GMT" ], "Content-Length": [ "166" @@ -123,24 +135,24 @@ "-1" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2300\",\r\n \"name\": \"ps2300\",\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1360\",\r\n \"name\": \"ps1360\",\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", "StatusCode": 201 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2300/providers/Microsoft.Batch/batchAccounts/ps2825?api-version=2022-10-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzL3BzMjMwMC9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvcHMyODI1P2FwaS12ZXJzaW9uPTIwMjItMTAtMDE=", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1360/providers/Microsoft.Batch/batchAccounts/ps2880?api-version=2022-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL3BzMTM2MC9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvcHMyODgwP2FwaS12ZXJzaW9uPTIwMjItMTAtMDE=", "RequestMethod": "PUT", "RequestHeaders": { "x-ms-client-request-id": [ - "9a3c3ed5-d4d6-467b-8905-2d882fd087f5" + "b54b3b71-80b1-4b99-b4f6-6983d2fcaf87" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Batch.BatchManagementClient/14.2.0.0" ], "Content-Type": [ @@ -159,13 +171,13 @@ "no-cache" ], "Location": [ - "https://management.azure.com/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2300/providers/Microsoft.Batch/batchAccounts/ps2825/operationResults/af4130b9-0899-4bd7-8d2c-fd14a2b170c6?api-version=2022-10-01" + "https://management.azure.com/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1360/providers/Microsoft.Batch/batchAccounts/ps2880/operationResults/9aaaef7f-2d21-480d-a8d6-b38d1479f143?api-version=2022-10-01&t=638466589321012707&c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOVFiSMi9Sg6cKnrBuPHbDk_Zwa1ZNYHwLVPJArEI9N2bLrgd1mU0ZdNVcdf6rtZCkUUuCe3vxnVTGwufpwH9GPWDgJOpJoL9wgKOzUDiHLUeiWPjrK1AoaQVprZgjnzXBIWiZC2tZjbUT9pOI_ixYJJPrsCfLt7HEccnhObROE1mo_hpiPDrtOQDaX-BboNceB8vI1wmSPApGpPRM9hBRQbXgqKFC8094UNsMVkWPCrsPvP5YlMBLARlGf2WTevGKRREjstkApf1Swi7uKnpyhhsidD1yREMU0mWY9wnZfAX0jpEp3p9jKVMPQ3L-m-nSZI4zrtbW0AnI0O3pAEwe0CAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3Js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SMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBADNBZjhX44bpBtC8kogZJGe4lYeHX95whfZ7X_CMSUuZRbQQ_b6raUpp8V8eF0YUa9b3Oa-DGrs5WfzogCuGcJPeoEVnDYzc1jlKubSIpGw73aGZzhbTjJeNf-Qe-5vTG-GcNzVtIcrwi93YSiK2LSbgrLpTL7T7znjePcGRRkCBjAslrV5SqufcsrpGmqvPAVKXRV-OIOzvXy6qmn9CHmdo0RGBXGIakbLMec_1SIS8NdPsB6i6XPjL2SDjqKTa5car7bVYlXEVsgL-000VF1t6x1II3VBNfsEJ81CdJyxaCJnwvWI6kHtCtJX9QYK3qZab9PfZRBvcetJoPdMFvBU&s=WiAF_t4pUbVd-qqUd3imWisN2Nz3bPsadRGVoJxwkxQALhboQYJpv9kNdvGhalmNZTAAwRID3RHhMMGGJGRJe231ISGkYsXE-tOl4fhvdoS4bd3n4QVeFbO2NUWOmxDAAZUIfiqbPPIVkyYkA95qjiX3VBv8ocMfKcVJq-bPaUg6RDkijmJa0UPHGTjA-Md3w_mgYxqnDaG9ZKkcHtqxFutjTohS0tjpxvDc81mVayU24O0BRFRYT72fM7vHEykzpLbM_2CQ2UovIg4FHaarIFscgU47FX06iCsA3T8tqZaKJJqKF1mYnTtcePJJEEYPYyc9ALXPV3oPSiuqUV2flQ&h=x4fD9iFnccrg-aILVak8ycnD9_4w8a2NQab_tFBY66M" ], "Retry-After": [ "15" ], "x-ms-request-id": [ - "af4130b9-0899-4bd7-8d2c-fd14a2b170c6" + "9aaaef7f-2d21-480d-a8d6-b38d1479f143" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -173,20 +185,23 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1198" + "1199" ], "x-ms-correlation-request-id": [ - "1a1e9d7e-ac63-4e25-a96e-656d1d145eeb" + "481c48db-665b-480e-bae1-58c8cec9894b" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T073131Z:1a1e9d7e-ac63-4e25-a96e-656d1d145eeb" + "WESTUS2:20240321T230212Z:481c48db-665b-480e-bae1-58c8cec9894b" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: B20E2E80D0ED4886BD115217C93E4CE0 Ref B: CO6AA3150218021 Ref C: 2024-03-21T23:02:11Z" ], "Date": [ - "Fri, 16 Jun 2023 07:31:30 GMT" + "Thu, 21 Mar 2024 23:02:11 GMT" ], "Expires": [ "-1" @@ -199,17 +214,17 @@ "StatusCode": 202 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2300/providers/Microsoft.Batch/batchAccounts/ps2825/operationResults/af4130b9-0899-4bd7-8d2c-fd14a2b170c6?api-version=2022-10-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzL3BzMjMwMC9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvcHMyODI1L29wZXJhdGlvblJlc3VsdHMvYWY0MTMwYjktMDg5OS00YmQ3LThkMmMtZmQxNGEyYjE3MGM2P2FwaS12ZXJzaW9uPTIwMjItMTAtMDE=", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1360/providers/Microsoft.Batch/batchAccounts/ps2880/operationResults/9aaaef7f-2d21-480d-a8d6-b38d1479f143?api-version=2022-10-01&t=638466589321012707&c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPy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k8yTlVXT214REFBWlVJZmlxYlBQSVZreVlrQTk1cWppWDNWQnY4b2NNZktjVkpxLWJQYVVnNlJEa2lqbUphMFVQSEdUakEtTWQzd19tZ1l4cW5EYUc5WktrY0h0cXhGdXRqVG9oUzB0anB4dkRjODFtVmF5VTI0TzBCUkZSWVQ3MmZNN3ZIRXlrenBMYk1fMkNRMlVvdklnNEZIYWFySUZzY2dVNDdGWDA2aUNzQTNUOHRxWmFLSkpxS0YxbVluVHRjZVBKSkVFWVBZeWM5QUxYUFYzb1BTaXVxVVYyZmxRJmg9eDRmRDlpRm5jY3JnLWFJTFZhazh5Y25EOV80dzhhMk5RYWJfdEZCWTY2TQ==", "RequestMethod": "GET", "RequestHeaders": { "x-ms-client-request-id": [ - "9a3c3ed5-d4d6-467b-8905-2d882fd087f5" + "b54b3b71-80b1-4b99-b4f6-6983d2fcaf87" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Batch.BatchManagementClient/14.2.0.0" ] }, @@ -222,13 +237,10 @@ "no-cache" ], "ETag": [ - "\"0x8DB6E3BBDB325A4\"" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" + "\"0x8DC49FAFA78BD8E\"" ], "x-ms-request-id": [ - "8aad6a0f-1dac-4b96-8e51-b8f50d6e4897" + "2a9dac22-a0fd-43cb-8fa3-d1efda41ed4b" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -236,20 +248,26 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" ], "x-ms-correlation-request-id": [ - "b1f3e37e-b764-41e4-a4dd-10ddbcb9850f" + "aabed0ee-9766-4902-a11d-eb4f758fde11" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T073146Z:b1f3e37e-b764-41e4-a4dd-10ddbcb9850f" + "WESTUS2:20240321T230227Z:aabed0ee-9766-4902-a11d-eb4f758fde11" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: BE4A7671C2F145A0B959A4CCB5B11714 Ref B: CO6AA3150218021 Ref C: 2024-03-21T23:02:27Z" ], "Date": [ - "Fri, 16 Jun 2023 07:31:46 GMT" + "Thu, 21 Mar 2024 23:02:26 GMT" ], "Content-Length": [ - "3664" + "3768" ], "Content-Type": [ "application/json; charset=utf-8" @@ -258,27 +276,27 @@ "-1" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:31:46 GMT" + "Thu, 21 Mar 2024 23:02:27 GMT" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2300/providers/Microsoft.Batch/batchAccounts/ps2825\",\r\n \"name\": \"ps2825\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"ps2825.westus2.batch.azure.com\",\r\n \"nodeManagementEndpoint\": \"63e190ed-1a26-4be8-a41c-e1ee0cf955e0.westus2.service.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"dedicatedCoreQuota\": 0,\r\n \"dedicatedCoreQuotaPerVMFamily\": [\r\n {\r\n \"name\": \"standardAv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardESv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardA0_A7Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardA8_A11Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardGFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"basicAFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardMSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardGSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNDSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHCSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBrsv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDAv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDASv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEAv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEASv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardMSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEIv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"Standard NCASv3_T4 Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardXEIDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"Standard NDASv4_A100 Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDCSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNPSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFXMDVSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCADSA100v4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDADSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEADSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"StandardNVADSA10v5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEBDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHXFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLASv3Family\",\r\n \"coreQuota\": 0\r\n }\r\n ],\r\n \"dedicatedCoreQuotaPerVMFamilyEnforced\": true,\r\n \"lowPriorityCoreQuota\": 0,\r\n \"poolQuota\": 100,\r\n \"activeJobAndJobScheduleQuota\": 300,\r\n \"poolAllocationMode\": \"BatchService\",\r\n \"publicNetworkAccess\": \"Disabled\",\r\n \"privateEndpointConnections\": [],\r\n \"encryption\": {\r\n \"keySource\": \"Microsoft.Batch\"\r\n },\r\n \"allowedAuthenticationModes\": [\r\n \"SharedKey\",\r\n \"AAD\",\r\n \"TaskAuthenticationToken\"\r\n ]\r\n },\r\n \"identity\": {\r\n \"type\": \"None\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1360/providers/Microsoft.Batch/batchAccounts/ps2880\",\r\n \"name\": \"ps2880\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"ps2880.westus2.batch.azure.com\",\r\n \"nodeManagementEndpoint\": \"8c675f20-1a1f-4efd-8e3b-57f1c5179f74.westus2.service.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"dedicatedCoreQuota\": 0,\r\n \"dedicatedCoreQuotaPerVMFamily\": [\r\n {\r\n \"name\": \"standardAv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardESv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardA0_A7Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardA8_A11Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardGFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"basicAFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardMSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardGSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNDSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHCSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBrsv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDAv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDASv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEAv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEASv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardMSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEIv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"Standard NCASv3_T4 Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardXEIDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"Standard NDASv4_A100 Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standard NDAMSv4_A100Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDCSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNPSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFXMDVSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCADSA100v4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDADSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEADSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"StandardNVADSA10v5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEBDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHXFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLASv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNGADSV620v1Family\",\r\n \"coreQuota\": 0\r\n }\r\n ],\r\n \"dedicatedCoreQuotaPerVMFamilyEnforced\": true,\r\n \"lowPriorityCoreQuota\": 0,\r\n \"poolQuota\": 100,\r\n \"activeJobAndJobScheduleQuota\": 300,\r\n \"poolAllocationMode\": \"BatchService\",\r\n \"publicNetworkAccess\": \"Disabled\",\r\n \"privateEndpointConnections\": [],\r\n \"encryption\": {\r\n \"keySource\": \"Microsoft.Batch\"\r\n },\r\n \"allowedAuthenticationModes\": [\r\n \"SharedKey\",\r\n \"AAD\",\r\n \"TaskAuthenticationToken\"\r\n ]\r\n },\r\n \"identity\": {\r\n \"type\": \"None\"\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2300/providers/Microsoft.Network/virtualNetworks/myvnet?api-version=2022-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzL3BzMjMwMC9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvdmlydHVhbE5ldHdvcmtzL215dm5ldD9hcGktdmVyc2lvbj0yMDIyLTExLTAx", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1360/providers/Microsoft.Network/virtualNetworks/myvnet?api-version=2023-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL3BzMTM2MC9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvdmlydHVhbE5ldHdvcmtzL215dm5ldD9hcGktdmVyc2lvbj0yMDIzLTA5LTAx", "RequestMethod": "GET", "RequestHeaders": { "x-ms-client-request-id": [ - "c0b45e48-f384-4f1d-ba5a-fdec8ee4d4fd" + "cd457a55-8ec5-43dc-bf67-b907e3336bbf" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" ] }, @@ -294,13 +312,13 @@ "gateway" ], "x-ms-request-id": [ - "96c9141d-106d-4161-86a4-40134a7baa02" + "a6cbfe0b-e4bd-4881-82f2-333b9cfc3fc5" ], "x-ms-correlation-request-id": [ - "96c9141d-106d-4161-86a4-40134a7baa02" + "a6cbfe0b-e4bd-4881-82f2-333b9cfc3fc5" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T073148Z:96c9141d-106d-4161-86a4-40134a7baa02" + "WESTUS2:20240321T230227Z:a6cbfe0b-e4bd-4881-82f2-333b9cfc3fc5" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -308,34 +326,40 @@ "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 102B5BCF270049AA9D1783B8051C094E Ref B: CO6AA3150219039 Ref C: 2024-03-21T23:02:27Z" + ], "Date": [ - "Fri, 16 Jun 2023 07:31:47 GMT" + "Thu, 21 Mar 2024 23:02:27 GMT" + ], + "Content-Length": [ + "218" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" - ], - "Content-Length": [ - "218" ] }, - "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"The Resource 'Microsoft.Network/virtualNetworks/myvnet' under resource group 'ps2300' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"The Resource 'Microsoft.Network/virtualNetworks/myvnet' under resource group 'ps1360' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix\"\r\n }\r\n}", "StatusCode": 404 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2300/providers/Microsoft.Network/virtualNetworks/myvnet?api-version=2022-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzL3BzMjMwMC9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvdmlydHVhbE5ldHdvcmtzL215dm5ldD9hcGktdmVyc2lvbj0yMDIyLTExLTAx", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1360/providers/Microsoft.Network/virtualNetworks/myvnet?api-version=2023-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL3BzMTM2MC9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvdmlydHVhbE5ldHdvcmtzL215dm5ldD9hcGktdmVyc2lvbj0yMDIzLTA5LTAx", "RequestMethod": "GET", "RequestHeaders": { "x-ms-client-request-id": [ - "c0b45e48-f384-4f1d-ba5a-fdec8ee4d4fd" + "cd457a55-8ec5-43dc-bf67-b907e3336bbf" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" ] }, @@ -348,35 +372,37 @@ "no-cache" ], "ETag": [ - "W/\"6a6c8deb-5a87-4120-b97c-815f0558fa52\"" + "W/\"8e779515-386d-42ad-8b8e-39d4eebb0700\"" ], "x-ms-request-id": [ - "b954854b-3305-43b2-ab85-bf6331aee117" + "a2122aa1-5600-4522-9728-ffef395d0afb" ], "x-ms-correlation-request-id": [ - "1a701704-0e96-4406-90d8-369b630ef73c" + "99c60a7a-2685-4440-9a43-2768b0035471" ], "x-ms-arm-service-request-id": [ - "6bb968a2-134d-49cd-8202-2fdf5691df1b" + "e92f4094-240b-4660-9726-f93e31c7da28" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Server": [ - "Microsoft-HTTPAPI/2.0", - "Microsoft-HTTPAPI/2.0" - ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" + "11999" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T073157Z:1a701704-0e96-4406-90d8-369b630ef73c" + "WESTUS2:20240321T230233Z:99c60a7a-2685-4440-9a43-2768b0035471" ], "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: F364631804F949E08EEB0F7A31BB48F4 Ref B: CO6AA3150219039 Ref C: 2024-03-21T23:02:33Z" + ], "Date": [ - "Fri, 16 Jun 2023 07:31:57 GMT" + "Thu, 21 Mar 2024 23:02:32 GMT" ], "Content-Length": [ "964" @@ -388,24 +414,24 @@ "-1" ] }, - "ResponseBody": "{\r\n \"name\": \"myvnet\",\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2300/providers/Microsoft.Network/virtualNetworks/myvnet\",\r\n \"etag\": \"W/\\\"6a6c8deb-5a87-4120-b97c-815f0558fa52\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"1027f155-a7d8-407e-948a-180dcb75a973\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"11.0.0.0/16\"\r\n ]\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"mysubnet\",\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2300/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet\",\r\n \"etag\": \"W/\\\"6a6c8deb-5a87-4120-b97c-815f0558fa52\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": \"11.0.1.0/24\",\r\n \"serviceEndpoints\": [],\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Disabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false\r\n }\r\n}", + "ResponseBody": "{\r\n \"name\": \"myvnet\",\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1360/providers/Microsoft.Network/virtualNetworks/myvnet\",\r\n \"etag\": \"W/\\\"8e779515-386d-42ad-8b8e-39d4eebb0700\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"db573814-47f9-4458-b918-5e0c76f8b3d4\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"11.0.0.0/16\"\r\n ]\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"mysubnet\",\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1360/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet\",\r\n \"etag\": \"W/\\\"8e779515-386d-42ad-8b8e-39d4eebb0700\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": \"11.0.1.0/24\",\r\n \"serviceEndpoints\": [],\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Disabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2300/providers/Microsoft.Network/virtualNetworks/myvnet?api-version=2022-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzL3BzMjMwMC9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvdmlydHVhbE5ldHdvcmtzL215dm5ldD9hcGktdmVyc2lvbj0yMDIyLTExLTAx", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1360/providers/Microsoft.Network/virtualNetworks/myvnet?api-version=2023-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL3BzMTM2MC9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvdmlydHVhbE5ldHdvcmtzL215dm5ldD9hcGktdmVyc2lvbj0yMDIzLTA5LTAx", "RequestMethod": "GET", "RequestHeaders": { "x-ms-client-request-id": [ - "c0b45e48-f384-4f1d-ba5a-fdec8ee4d4fd" + "cd457a55-8ec5-43dc-bf67-b907e3336bbf" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" ] }, @@ -418,35 +444,37 @@ "no-cache" ], "ETag": [ - "W/\"6a6c8deb-5a87-4120-b97c-815f0558fa52\"" + "W/\"8e779515-386d-42ad-8b8e-39d4eebb0700\"" ], "x-ms-request-id": [ - "a3cc2fa1-4bde-4d99-9e78-9d516a5098e4" + "46ee6e60-80c6-4602-b6cd-3160f38af762" ], "x-ms-correlation-request-id": [ - "dce4b576-7412-42f5-bef5-56c9f874fce2" + "3f0003b5-15dd-4658-8627-0740d36e69cd" ], "x-ms-arm-service-request-id": [ - "187fb2f7-9e41-4fd2-b03e-b48318d9d33f" + "0bbd8a9d-81fe-4d70-a764-95d36db60502" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Server": [ - "Microsoft-HTTPAPI/2.0", - "Microsoft-HTTPAPI/2.0" - ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" + "11999" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T073158Z:dce4b576-7412-42f5-bef5-56c9f874fce2" + "WESTUS2:20240321T230233Z:3f0003b5-15dd-4658-8627-0740d36e69cd" ], "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 85DC9AA8F3F4456696FE407673B4CF95 Ref B: CO6AA3150219039 Ref C: 2024-03-21T23:02:33Z" + ], "Date": [ - "Fri, 16 Jun 2023 07:31:57 GMT" + "Thu, 21 Mar 2024 23:02:32 GMT" ], "Content-Length": [ "964" @@ -458,24 +486,24 @@ "-1" ] }, - "ResponseBody": "{\r\n \"name\": \"myvnet\",\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2300/providers/Microsoft.Network/virtualNetworks/myvnet\",\r\n \"etag\": \"W/\\\"6a6c8deb-5a87-4120-b97c-815f0558fa52\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"1027f155-a7d8-407e-948a-180dcb75a973\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"11.0.0.0/16\"\r\n ]\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"mysubnet\",\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2300/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet\",\r\n \"etag\": \"W/\\\"6a6c8deb-5a87-4120-b97c-815f0558fa52\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": \"11.0.1.0/24\",\r\n \"serviceEndpoints\": [],\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Disabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false\r\n }\r\n}", + "ResponseBody": "{\r\n \"name\": \"myvnet\",\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1360/providers/Microsoft.Network/virtualNetworks/myvnet\",\r\n \"etag\": \"W/\\\"8e779515-386d-42ad-8b8e-39d4eebb0700\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"db573814-47f9-4458-b918-5e0c76f8b3d4\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"11.0.0.0/16\"\r\n ]\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"mysubnet\",\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1360/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet\",\r\n \"etag\": \"W/\\\"8e779515-386d-42ad-8b8e-39d4eebb0700\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": \"11.0.1.0/24\",\r\n \"serviceEndpoints\": [],\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Disabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2300/providers/Microsoft.Network/virtualNetworks/myvnet?api-version=2022-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzL3BzMjMwMC9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvdmlydHVhbE5ldHdvcmtzL215dm5ldD9hcGktdmVyc2lvbj0yMDIyLTExLTAx", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1360/providers/Microsoft.Network/virtualNetworks/myvnet?api-version=2023-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL3BzMTM2MC9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvdmlydHVhbE5ldHdvcmtzL215dm5ldD9hcGktdmVyc2lvbj0yMDIzLTA5LTAx", "RequestMethod": "GET", "RequestHeaders": { "x-ms-client-request-id": [ - "cade130c-d7f1-4a01-95db-5880a54510fa" + "a5ae3ea0-06e8-4fe4-ba37-36ca3fd6496a" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" ] }, @@ -488,35 +516,37 @@ "no-cache" ], "ETag": [ - "W/\"6a6c8deb-5a87-4120-b97c-815f0558fa52\"" + "W/\"8e779515-386d-42ad-8b8e-39d4eebb0700\"" ], "x-ms-request-id": [ - "fa4543df-71db-4c51-a8e7-fad3a42c01db" + "c940da8e-c6e2-4a4b-81d4-f1738eebf50d" ], "x-ms-correlation-request-id": [ - "d516e197-490e-440f-927a-6aa966acb8ae" + "dc65f2c6-13eb-43c1-a6f2-26cc907057d1" ], "x-ms-arm-service-request-id": [ - "f5e5e949-8fcf-4922-895f-8788570ffcbb" + "f4d3370e-212f-4223-8d4b-8afd3dd4ff41" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Server": [ - "Microsoft-HTTPAPI/2.0", - "Microsoft-HTTPAPI/2.0" - ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" + "11998" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T073158Z:d516e197-490e-440f-927a-6aa966acb8ae" + "WESTUS2:20240321T230233Z:dc65f2c6-13eb-43c1-a6f2-26cc907057d1" ], "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 1A7E0660C57947E98F2E432B8FA6DF64 Ref B: CO6AA3150219039 Ref C: 2024-03-21T23:02:33Z" + ], "Date": [ - "Fri, 16 Jun 2023 07:31:58 GMT" + "Thu, 21 Mar 2024 23:02:33 GMT" ], "Content-Length": [ "964" @@ -528,24 +558,24 @@ "-1" ] }, - "ResponseBody": "{\r\n \"name\": \"myvnet\",\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2300/providers/Microsoft.Network/virtualNetworks/myvnet\",\r\n \"etag\": \"W/\\\"6a6c8deb-5a87-4120-b97c-815f0558fa52\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"1027f155-a7d8-407e-948a-180dcb75a973\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"11.0.0.0/16\"\r\n ]\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"mysubnet\",\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2300/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet\",\r\n \"etag\": \"W/\\\"6a6c8deb-5a87-4120-b97c-815f0558fa52\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": \"11.0.1.0/24\",\r\n \"serviceEndpoints\": [],\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Disabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false\r\n }\r\n}", + "ResponseBody": "{\r\n \"name\": \"myvnet\",\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1360/providers/Microsoft.Network/virtualNetworks/myvnet\",\r\n \"etag\": \"W/\\\"8e779515-386d-42ad-8b8e-39d4eebb0700\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"db573814-47f9-4458-b918-5e0c76f8b3d4\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"11.0.0.0/16\"\r\n ]\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"mysubnet\",\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1360/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet\",\r\n \"etag\": \"W/\\\"8e779515-386d-42ad-8b8e-39d4eebb0700\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": \"11.0.1.0/24\",\r\n \"serviceEndpoints\": [],\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Disabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2300/providers/Microsoft.Network/virtualNetworks/myvnet?api-version=2022-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzL3BzMjMwMC9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvdmlydHVhbE5ldHdvcmtzL215dm5ldD9hcGktdmVyc2lvbj0yMDIyLTExLTAx", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1360/providers/Microsoft.Network/virtualNetworks/myvnet?api-version=2023-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL3BzMTM2MC9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvdmlydHVhbE5ldHdvcmtzL215dm5ldD9hcGktdmVyc2lvbj0yMDIzLTA5LTAx", "RequestMethod": "PUT", "RequestHeaders": { "x-ms-client-request-id": [ - "c0b45e48-f384-4f1d-ba5a-fdec8ee4d4fd" + "cd457a55-8ec5-43dc-bf67-b907e3336bbf" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" ], "Content-Type": [ @@ -555,7 +585,7 @@ "734" ] }, - "RequestBody": "{\r\n \"properties\": {\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"11.0.0.0/16\"\r\n ]\r\n },\r\n \"subnets\": [\r\n {\r\n \"properties\": {\r\n \"addressPrefix\": \"11.0.1.0/24\",\r\n \"addressPrefixes\": [],\r\n \"serviceEndpoints\": [],\r\n \"serviceEndpointPolicies\": [],\r\n \"ipAllocations\": [],\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Disabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\",\r\n \"applicationGatewayIPConfigurations\": []\r\n },\r\n \"name\": \"mysubnet\"\r\n }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false,\r\n \"ipAllocations\": []\r\n },\r\n \"location\": \"westus2\"\r\n}", + "RequestBody": "{\r\n \"properties\": {\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"11.0.0.0/16\"\r\n ]\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"mysubnet\",\r\n \"properties\": {\r\n \"addressPrefix\": \"11.0.1.0/24\",\r\n \"addressPrefixes\": [],\r\n \"serviceEndpoints\": [],\r\n \"serviceEndpointPolicies\": [],\r\n \"ipAllocations\": [],\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Disabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\",\r\n \"applicationGatewayIPConfigurations\": []\r\n }\r\n }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false,\r\n \"ipAllocations\": []\r\n },\r\n \"location\": \"westus2\"\r\n}", "ResponseHeaders": { "Cache-Control": [ "no-cache" @@ -567,38 +597,40 @@ "3" ], "x-ms-request-id": [ - "3edd2070-3e23-45d7-b7de-dd7250bf640c" + "e7debbbb-043a-4273-8a88-af022184dba3" ], "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/providers/Microsoft.Network/locations/westus2/operations/3edd2070-3e23-45d7-b7de-dd7250bf640c?api-version=2022-11-01" + "https://management.azure.com/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/providers/Microsoft.Network/locations/westus2/operations/e7debbbb-043a-4273-8a88-af022184dba3?api-version=2023-09-01&t=638466589498160261&c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOVFiSMi9Sg6cKnrBuPHbDk_Zwa1ZNYHwLVPJArEI9N2bLrgd1mU0ZdNVcdf6rtZCkU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9TJ2A3k17c0CMP7k423M0qyuv0E5B8CdrHsaTizyGXLJ6NAnOCGrvldLyVT17b3usnMlGVLPvVV1mdORUvM5NwVW3K3QaQw-71B-gdOSzXK7WlIRwQApQItrom7b7yyuCwiVwXUTylCp7XPPjRY27iLpWd0x8G8e-bSwivQgTl_xvgdiYcKLpvsYqVU712-Gh606HA_UFw&h=sJXX_o0oDeflUaJgOfe_Q10oL7j9he21ro2pkgbdYnA" ], "x-ms-correlation-request-id": [ - "fedb3d91-3ff5-4836-a5c5-94d2d0b71e1b" + "436f2730-f323-4bd6-bcd8-4df9564eb867" ], "Azure-AsyncNotification": [ "Enabled" ], "x-ms-arm-service-request-id": [ - "64fb6b7d-4822-446c-aefa-97fa7d1992ba" + "71f5cd85-d1d8-4368-a967-bed2b73f4e69" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Server": [ - "Microsoft-HTTPAPI/2.0", - "Microsoft-HTTPAPI/2.0" - ], "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T073154Z:fedb3d91-3ff5-4836-a5c5-94d2d0b71e1b" + "WESTUS2:20240321T230229Z:436f2730-f323-4bd6-bcd8-4df9564eb867" ], "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 3F0AA8DAF469456F9417ADE47EC46B65 Ref B: CO6AA3150219039 Ref C: 2024-03-21T23:02:29Z" + ], "Date": [ - "Fri, 16 Jun 2023 07:31:53 GMT" + "Thu, 21 Mar 2024 23:02:29 GMT" ], "Content-Length": [ "962" @@ -610,21 +642,21 @@ "-1" ] }, - "ResponseBody": "{\r\n \"name\": \"myvnet\",\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2300/providers/Microsoft.Network/virtualNetworks/myvnet\",\r\n \"etag\": \"W/\\\"d75f4e2d-0087-436d-b875-4d63d38c953c\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": \"1027f155-a7d8-407e-948a-180dcb75a973\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"11.0.0.0/16\"\r\n ]\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"mysubnet\",\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2300/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet\",\r\n \"etag\": \"W/\\\"d75f4e2d-0087-436d-b875-4d63d38c953c\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"addressPrefix\": \"11.0.1.0/24\",\r\n \"serviceEndpoints\": [],\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Disabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false\r\n }\r\n}", + "ResponseBody": "{\r\n \"name\": \"myvnet\",\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1360/providers/Microsoft.Network/virtualNetworks/myvnet\",\r\n \"etag\": \"W/\\\"cf224a8e-8cd5-4641-ac17-5ccedc4f1538\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": \"db573814-47f9-4458-b918-5e0c76f8b3d4\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"11.0.0.0/16\"\r\n ]\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"mysubnet\",\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1360/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet\",\r\n \"etag\": \"W/\\\"cf224a8e-8cd5-4641-ac17-5ccedc4f1538\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"addressPrefix\": \"11.0.1.0/24\",\r\n \"serviceEndpoints\": [],\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Disabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false\r\n }\r\n}", "StatusCode": 201 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/providers/Microsoft.Network/locations/westus2/operations/3edd2070-3e23-45d7-b7de-dd7250bf640c?api-version=2022-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Byb3ZpZGVycy9NaWNyb3NvZnQuTmV0d29yay9sb2NhdGlvbnMvd2VzdHVzMi9vcGVyYXRpb25zLzNlZGQyMDcwLTNlMjMtNDVkNy1iN2RlLWRkNzI1MGJmNjQwYz9hcGktdmVyc2lvbj0yMDIyLTExLTAx", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/providers/Microsoft.Network/locations/westus2/operations/e7debbbb-043a-4273-8a88-af022184dba3?api-version=2023-09-01&t=638466589498160261&c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPA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FhUXctNzFCLWdkT1N6WEs3V2xJUndRQXBRSXRyb203Yjd5eXVDd2lWd1hVVHlsQ3A3WFBQalJZMjdpTHBXZDB4OEc4ZS1iU3dpdlFnVGxfeHZnZGlZY0tMcHZzWXFWVTcxMi1HaDYwNkhBX1VGdyZoPXNKWFhfbzBvRGVmbFVhSmdPZmVfUTEwb0w3ajloZTIxcm8ycGtnYmRZbkE=", "RequestMethod": "GET", "RequestHeaders": { "x-ms-client-request-id": [ - "c0b45e48-f384-4f1d-ba5a-fdec8ee4d4fd" + "cd457a55-8ec5-43dc-bf67-b907e3336bbf" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" ] }, @@ -637,32 +669,34 @@ "no-cache" ], "x-ms-request-id": [ - "582802f6-5c50-4aa4-ba18-a9f52305eefc" + "931e152d-577d-450c-9cb2-af9eebfd4515" ], "x-ms-correlation-request-id": [ - "ba4fd248-ff31-4192-99f2-b550f8c9b7fe" + "53187874-7569-4e3d-9706-14a1bb9b90ab" ], "x-ms-arm-service-request-id": [ - "7713485e-c704-4f2c-9ff1-2efa5b892823" + "e4f6af66-5733-4ab0-a6b7-29394f486cd2" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Server": [ - "Microsoft-HTTPAPI/2.0", - "Microsoft-HTTPAPI/2.0" - ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" + "11999" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T073157Z:ba4fd248-ff31-4192-99f2-b550f8c9b7fe" + "WESTUS2:20240321T230232Z:53187874-7569-4e3d-9706-14a1bb9b90ab" ], "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 1F9422AB6C524B698B5B1F32D2C0D973 Ref B: CO6AA3150219039 Ref C: 2024-03-21T23:02:32Z" + ], "Date": [ - "Fri, 16 Jun 2023 07:31:57 GMT" + "Thu, 21 Mar 2024 23:02:32 GMT" ], "Content-Length": [ "22" @@ -678,21 +712,21 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2300/providers/Microsoft.Batch/batchAccounts/ps2825/privateLinkResources?api-version=2022-06-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzL3BzMjMwMC9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvcHMyODI1L3ByaXZhdGVMaW5rUmVzb3VyY2VzP2FwaS12ZXJzaW9uPTIwMjItMDYtMDE=", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1360/providers/Microsoft.Batch/batchAccounts/ps2880/privateLinkResources?api-version=2022-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL3BzMTM2MC9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvcHMyODgwL3ByaXZhdGVMaW5rUmVzb3VyY2VzP2FwaS12ZXJzaW9uPTIwMjItMDYtMDE=", "RequestMethod": "GET", "RequestHeaders": { "x-ms-client-request-id": [ - "316d92b1-c7ef-4e20-83da-c164598fb476" + "128d8ae5-69af-4923-8762-f3aa5357cb2a" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Internal.Common.AzureRestClient/1.3.76" + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Internal.Common.AzureRestClient/1.3.91" ] }, "RequestBody": "", @@ -703,11 +737,8 @@ "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], "x-ms-request-id": [ - "dd1d2317-d0bf-4f15-a71d-370060f848b1" + "fa8fb9c0-f340-45c7-8fde-e106073d4cde" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -715,17 +746,23 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" ], "x-ms-correlation-request-id": [ - "798964a8-b3a4-4cc1-a394-8d45ab46415b" + "2d0423bb-ee3d-45d6-a806-36002d8ef71a" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T073200Z:798964a8-b3a4-4cc1-a394-8d45ab46415b" + "WESTUS2:20240321T230233Z:2d0423bb-ee3d-45d6-a806-36002d8ef71a" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: E7F0868FC95C46A4B650B96F356CA3CF Ref B: CO6AA3150217011 Ref C: 2024-03-21T23:02:33Z" ], "Date": [ - "Fri, 16 Jun 2023 07:32:00 GMT" + "Thu, 21 Mar 2024 23:02:32 GMT" ], "Content-Length": [ "765" @@ -737,24 +774,24 @@ "-1" ] }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2300/providers/Microsoft.Batch/batchAccounts/ps2825/privateLinkResources/batchAccount\",\r\n \"name\": \"batchAccount\",\r\n \"type\": \"Microsoft.Batch/batchAccounts/privateLinkResources\",\r\n \"properties\": {\r\n \"groupId\": \"batchAccount\",\r\n \"requiredMembers\": [\r\n \"batchAccount\"\r\n ],\r\n \"requiredZoneNames\": [\r\n \"privatelink.batch.azure.com\"\r\n ]\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2300/providers/Microsoft.Batch/batchAccounts/ps2825/privateLinkResources/nodeManagement\",\r\n \"name\": \"nodeManagement\",\r\n \"type\": \"Microsoft.Batch/batchAccounts/privateLinkResources\",\r\n \"properties\": {\r\n \"groupId\": \"nodeManagement\",\r\n \"requiredMembers\": [\r\n \"nodeManagement\"\r\n ],\r\n \"requiredZoneNames\": [\r\n \"privatelink.batch.azure.com\"\r\n ]\r\n }\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1360/providers/Microsoft.Batch/batchAccounts/ps2880/privateLinkResources/batchAccount\",\r\n \"name\": \"batchAccount\",\r\n \"type\": \"Microsoft.Batch/batchAccounts/privateLinkResources\",\r\n \"properties\": {\r\n \"groupId\": \"batchAccount\",\r\n \"requiredMembers\": [\r\n \"batchAccount\"\r\n ],\r\n \"requiredZoneNames\": [\r\n \"privatelink.batch.azure.com\"\r\n ]\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1360/providers/Microsoft.Batch/batchAccounts/ps2880/privateLinkResources/nodeManagement\",\r\n \"name\": \"nodeManagement\",\r\n \"type\": \"Microsoft.Batch/batchAccounts/privateLinkResources\",\r\n \"properties\": {\r\n \"groupId\": \"nodeManagement\",\r\n \"requiredMembers\": [\r\n \"nodeManagement\"\r\n ],\r\n \"requiredZoneNames\": [\r\n \"privatelink.batch.azure.com\"\r\n ]\r\n }\r\n }\r\n ]\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2300/providers/Microsoft.Network/privateEndpoints/mypec?api-version=2022-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzL3BzMjMwMC9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvcHJpdmF0ZUVuZHBvaW50cy9teXBlYz9hcGktdmVyc2lvbj0yMDIyLTExLTAx", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1360/providers/Microsoft.Network/privateEndpoints/mypec?api-version=2023-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL3BzMTM2MC9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvcHJpdmF0ZUVuZHBvaW50cy9teXBlYz9hcGktdmVyc2lvbj0yMDIzLTA5LTAx", "RequestMethod": "GET", "RequestHeaders": { "x-ms-client-request-id": [ - "38b2d941-eee3-4707-a720-db50312797f8" + "06184ec1-3750-4b69-bca5-1bbf9e7beb0b" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" ] }, @@ -770,13 +807,13 @@ "gateway" ], "x-ms-request-id": [ - "6871688c-a75d-400a-b7b4-848f4e9433e0" + "be562678-54d2-4f10-8ef8-085c52a1f95f" ], "x-ms-correlation-request-id": [ - "6871688c-a75d-400a-b7b4-848f4e9433e0" + "be562678-54d2-4f10-8ef8-085c52a1f95f" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T073200Z:6871688c-a75d-400a-b7b4-848f4e9433e0" + "WESTUS2:20240321T230233Z:be562678-54d2-4f10-8ef8-085c52a1f95f" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -784,34 +821,40 @@ "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 2DB9E4A79B1243D893909D2BCFCFC1FF Ref B: CO6AA3150219039 Ref C: 2024-03-21T23:02:33Z" + ], "Date": [ - "Fri, 16 Jun 2023 07:32:00 GMT" + "Thu, 21 Mar 2024 23:02:33 GMT" + ], + "Content-Length": [ + "218" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" - ], - "Content-Length": [ - "218" ] }, - "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"The Resource 'Microsoft.Network/privateEndpoints/mypec' under resource group 'ps2300' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"The Resource 'Microsoft.Network/privateEndpoints/mypec' under resource group 'ps1360' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix\"\r\n }\r\n}", "StatusCode": 404 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2300/providers/Microsoft.Network/privateEndpoints/mypec?api-version=2022-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzL3BzMjMwMC9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvcHJpdmF0ZUVuZHBvaW50cy9teXBlYz9hcGktdmVyc2lvbj0yMDIyLTExLTAx", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1360/providers/Microsoft.Network/privateEndpoints/mypec?api-version=2023-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL3BzMTM2MC9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvcHJpdmF0ZUVuZHBvaW50cy9teXBlYz9hcGktdmVyc2lvbj0yMDIzLTA5LTAx", "RequestMethod": "GET", "RequestHeaders": { "x-ms-client-request-id": [ - "38b2d941-eee3-4707-a720-db50312797f8" + "06184ec1-3750-4b69-bca5-1bbf9e7beb0b" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" ] }, @@ -824,35 +867,37 @@ "no-cache" ], "ETag": [ - "W/\"9bc7e6d4-f34f-4004-9c01-17ebaaba5997\"" + "W/\"b3728862-248e-4709-92ca-51528efb802f\"" ], "x-ms-request-id": [ - "a4887713-f9e2-41b6-a46f-0c85b51d68a9" + "0bc953c6-3234-47d6-9bb7-e7a798ad805f" ], "x-ms-correlation-request-id": [ - "b53e1ccf-c8da-4005-a38a-3a24691b340b" + "7f800e9a-f466-4ef6-acc1-700d4eb2e79f" ], "x-ms-arm-service-request-id": [ - "92fb0d38-4b13-4420-9b30-b03d8b8bc785" + "6a11f8f1-dd74-4308-b024-94b0f6da65aa" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Server": [ - "Microsoft-HTTPAPI/2.0", - "Microsoft-HTTPAPI/2.0" - ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" + "11999" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T073245Z:b53e1ccf-c8da-4005-a38a-3a24691b340b" + "WESTUS2:20240321T230315Z:7f800e9a-f466-4ef6-acc1-700d4eb2e79f" ], "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 5ACB37A7B58F4889893DE308C5D54410 Ref B: CO6AA3150219039 Ref C: 2024-03-21T23:03:14Z" + ], "Date": [ - "Fri, 16 Jun 2023 07:32:44 GMT" + "Thu, 21 Mar 2024 23:03:14 GMT" ], "Content-Length": [ "1588" @@ -864,24 +909,24 @@ "-1" ] }, - "ResponseBody": "{\r\n \"name\": \"mypec\",\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2300/providers/Microsoft.Network/privateEndpoints/mypec\",\r\n \"etag\": \"W/\\\"9bc7e6d4-f34f-4004-9c01-17ebaaba5997\\\"\",\r\n \"type\": \"Microsoft.Network/privateEndpoints\",\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"7515511d-4ae3-45dd-a139-f8730b735a1d\",\r\n \"privateLinkServiceConnections\": [],\r\n \"manualPrivateLinkServiceConnections\": [\r\n {\r\n \"name\": \"myplsconnection\",\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2300/providers/Microsoft.Network/privateEndpoints/mypec/manualPrivateLinkServiceConnections/myplsconnection\",\r\n \"etag\": \"W/\\\"9bc7e6d4-f34f-4004-9c01-17ebaaba5997\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"privateLinkServiceId\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2300/providers/Microsoft.Batch/batchAccounts/ps2825\",\r\n \"groupIds\": [\r\n \"batchAccount\"\r\n ],\r\n \"privateLinkServiceConnectionState\": {\r\n \"status\": \"Pending\",\r\n \"description\": \"Manual approval still required\",\r\n \"actionsRequired\": \"Manual approval required\"\r\n }\r\n },\r\n \"type\": \"Microsoft.Network/privateEndpoints/manualPrivateLinkServiceConnections\"\r\n }\r\n ],\r\n \"customNetworkInterfaceName\": \"\",\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2300/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet\"\r\n },\r\n \"ipConfigurations\": [],\r\n \"networkInterfaces\": [\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2300/providers/Microsoft.Network/networkInterfaces/mypec.nic.5eec2fe4-ce2f-45bb-829a-3f4731534277\"\r\n }\r\n ],\r\n \"customDnsConfigs\": []\r\n }\r\n}", + "ResponseBody": "{\r\n \"name\": \"mypec\",\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1360/providers/Microsoft.Network/privateEndpoints/mypec\",\r\n \"etag\": \"W/\\\"b3728862-248e-4709-92ca-51528efb802f\\\"\",\r\n \"type\": \"Microsoft.Network/privateEndpoints\",\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"3bcddd97-a407-4405-89e2-61b7fd8eceac\",\r\n \"privateLinkServiceConnections\": [],\r\n \"manualPrivateLinkServiceConnections\": [\r\n {\r\n \"name\": \"myplsconnection\",\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1360/providers/Microsoft.Network/privateEndpoints/mypec/manualPrivateLinkServiceConnections/myplsconnection\",\r\n \"etag\": \"W/\\\"b3728862-248e-4709-92ca-51528efb802f\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"privateLinkServiceId\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1360/providers/Microsoft.Batch/batchAccounts/ps2880\",\r\n \"groupIds\": [\r\n \"batchAccount\"\r\n ],\r\n \"privateLinkServiceConnectionState\": {\r\n \"status\": \"Pending\",\r\n \"description\": \"Manual approval still required\",\r\n \"actionsRequired\": \"Manual approval required\"\r\n }\r\n },\r\n \"type\": \"Microsoft.Network/privateEndpoints/manualPrivateLinkServiceConnections\"\r\n }\r\n ],\r\n \"customNetworkInterfaceName\": \"\",\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1360/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet\"\r\n },\r\n \"ipConfigurations\": [],\r\n \"networkInterfaces\": [\r\n {\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1360/providers/Microsoft.Network/networkInterfaces/mypec.nic.8e753525-225b-4651-8840-f2f148805391\"\r\n }\r\n ],\r\n \"customDnsConfigs\": []\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2300/providers/Microsoft.Network/privateEndpoints/mypec?api-version=2022-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzL3BzMjMwMC9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvcHJpdmF0ZUVuZHBvaW50cy9teXBlYz9hcGktdmVyc2lvbj0yMDIyLTExLTAx", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1360/providers/Microsoft.Network/privateEndpoints/mypec?api-version=2023-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL3BzMTM2MC9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvcHJpdmF0ZUVuZHBvaW50cy9teXBlYz9hcGktdmVyc2lvbj0yMDIzLTA5LTAx", "RequestMethod": "GET", "RequestHeaders": { "x-ms-client-request-id": [ - "38b2d941-eee3-4707-a720-db50312797f8" + "06184ec1-3750-4b69-bca5-1bbf9e7beb0b" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" ] }, @@ -894,35 +939,37 @@ "no-cache" ], "ETag": [ - "W/\"9bc7e6d4-f34f-4004-9c01-17ebaaba5997\"" + "W/\"b3728862-248e-4709-92ca-51528efb802f\"" ], "x-ms-request-id": [ - "bd7c14b0-4539-4eb1-a627-a3e73446c0a6" + "05862a93-8ad3-4abf-aca5-2b624090a910" ], "x-ms-correlation-request-id": [ - "712060f9-43c7-4dd5-9d52-96e09377d667" + "5d704412-d06a-4cf9-a411-dc4af6880192" ], "x-ms-arm-service-request-id": [ - "a42b054a-86b9-4cc6-983b-1db789281682" + "c714ba5f-2a82-4a9e-8133-6364fe61cedf" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Server": [ - "Microsoft-HTTPAPI/2.0", - "Microsoft-HTTPAPI/2.0" - ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" + "11999" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T073245Z:712060f9-43c7-4dd5-9d52-96e09377d667" + "WESTUS2:20240321T230315Z:5d704412-d06a-4cf9-a411-dc4af6880192" ], "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 67BE24B306D94B7B9CD1CFE7E9D68401 Ref B: CO6AA3150219039 Ref C: 2024-03-21T23:03:15Z" + ], "Date": [ - "Fri, 16 Jun 2023 07:32:45 GMT" + "Thu, 21 Mar 2024 23:03:14 GMT" ], "Content-Length": [ "1588" @@ -934,24 +981,24 @@ "-1" ] }, - "ResponseBody": "{\r\n \"name\": \"mypec\",\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2300/providers/Microsoft.Network/privateEndpoints/mypec\",\r\n \"etag\": \"W/\\\"9bc7e6d4-f34f-4004-9c01-17ebaaba5997\\\"\",\r\n \"type\": \"Microsoft.Network/privateEndpoints\",\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"7515511d-4ae3-45dd-a139-f8730b735a1d\",\r\n \"privateLinkServiceConnections\": [],\r\n \"manualPrivateLinkServiceConnections\": [\r\n {\r\n \"name\": \"myplsconnection\",\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2300/providers/Microsoft.Network/privateEndpoints/mypec/manualPrivateLinkServiceConnections/myplsconnection\",\r\n \"etag\": \"W/\\\"9bc7e6d4-f34f-4004-9c01-17ebaaba5997\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"privateLinkServiceId\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2300/providers/Microsoft.Batch/batchAccounts/ps2825\",\r\n \"groupIds\": [\r\n \"batchAccount\"\r\n ],\r\n \"privateLinkServiceConnectionState\": {\r\n \"status\": \"Pending\",\r\n \"description\": \"Manual approval still required\",\r\n \"actionsRequired\": \"Manual approval required\"\r\n }\r\n },\r\n \"type\": \"Microsoft.Network/privateEndpoints/manualPrivateLinkServiceConnections\"\r\n }\r\n ],\r\n \"customNetworkInterfaceName\": \"\",\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2300/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet\"\r\n },\r\n \"ipConfigurations\": [],\r\n \"networkInterfaces\": [\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2300/providers/Microsoft.Network/networkInterfaces/mypec.nic.5eec2fe4-ce2f-45bb-829a-3f4731534277\"\r\n }\r\n ],\r\n \"customDnsConfigs\": []\r\n }\r\n}", + "ResponseBody": "{\r\n \"name\": \"mypec\",\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1360/providers/Microsoft.Network/privateEndpoints/mypec\",\r\n \"etag\": \"W/\\\"b3728862-248e-4709-92ca-51528efb802f\\\"\",\r\n \"type\": \"Microsoft.Network/privateEndpoints\",\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"3bcddd97-a407-4405-89e2-61b7fd8eceac\",\r\n \"privateLinkServiceConnections\": [],\r\n \"manualPrivateLinkServiceConnections\": [\r\n {\r\n \"name\": \"myplsconnection\",\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1360/providers/Microsoft.Network/privateEndpoints/mypec/manualPrivateLinkServiceConnections/myplsconnection\",\r\n \"etag\": \"W/\\\"b3728862-248e-4709-92ca-51528efb802f\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"privateLinkServiceId\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1360/providers/Microsoft.Batch/batchAccounts/ps2880\",\r\n \"groupIds\": [\r\n \"batchAccount\"\r\n ],\r\n \"privateLinkServiceConnectionState\": {\r\n \"status\": \"Pending\",\r\n \"description\": \"Manual approval still required\",\r\n \"actionsRequired\": \"Manual approval required\"\r\n }\r\n },\r\n \"type\": \"Microsoft.Network/privateEndpoints/manualPrivateLinkServiceConnections\"\r\n }\r\n ],\r\n \"customNetworkInterfaceName\": \"\",\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1360/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet\"\r\n },\r\n \"ipConfigurations\": [],\r\n \"networkInterfaces\": [\r\n {\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1360/providers/Microsoft.Network/networkInterfaces/mypec.nic.8e753525-225b-4651-8840-f2f148805391\"\r\n }\r\n ],\r\n \"customDnsConfigs\": []\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2300/providers/Microsoft.Network/privateEndpoints/mypec?api-version=2022-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzL3BzMjMwMC9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvcHJpdmF0ZUVuZHBvaW50cy9teXBlYz9hcGktdmVyc2lvbj0yMDIyLTExLTAx", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1360/providers/Microsoft.Network/privateEndpoints/mypec?api-version=2023-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL3BzMTM2MC9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvcHJpdmF0ZUVuZHBvaW50cy9teXBlYz9hcGktdmVyc2lvbj0yMDIzLTA5LTAx", "RequestMethod": "PUT", "RequestHeaders": { "x-ms-client-request-id": [ - "38b2d941-eee3-4707-a720-db50312797f8" + "06184ec1-3750-4b69-bca5-1bbf9e7beb0b" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" ], "Content-Type": [ @@ -961,7 +1008,7 @@ "1168" ] }, - "RequestBody": "{\r\n \"properties\": {\r\n \"subnet\": {\r\n \"properties\": {\r\n \"addressPrefix\": \"11.0.1.0/24\",\r\n \"addressPrefixes\": [],\r\n \"serviceEndpoints\": [],\r\n \"serviceEndpointPolicies\": [],\r\n \"ipAllocations\": [],\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Disabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\",\r\n \"applicationGatewayIPConfigurations\": []\r\n },\r\n \"name\": \"mysubnet\",\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2300/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet\"\r\n },\r\n \"privateLinkServiceConnections\": [],\r\n \"manualPrivateLinkServiceConnections\": [\r\n {\r\n \"properties\": {\r\n \"privateLinkServiceId\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2300/providers/Microsoft.Batch/batchAccounts/ps2825\",\r\n \"groupIds\": [\r\n \"batchAccount\"\r\n ]\r\n },\r\n \"name\": \"myplsconnection\"\r\n }\r\n ],\r\n \"customDnsConfigs\": [],\r\n \"applicationSecurityGroups\": [],\r\n \"ipConfigurations\": []\r\n },\r\n \"location\": \"westus2\"\r\n}", + "RequestBody": "{\r\n \"properties\": {\r\n \"subnet\": {\r\n \"name\": \"mysubnet\",\r\n \"properties\": {\r\n \"addressPrefix\": \"11.0.1.0/24\",\r\n \"addressPrefixes\": [],\r\n \"serviceEndpoints\": [],\r\n \"serviceEndpointPolicies\": [],\r\n \"ipAllocations\": [],\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Disabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\",\r\n \"applicationGatewayIPConfigurations\": []\r\n },\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1360/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet\"\r\n },\r\n \"privateLinkServiceConnections\": [],\r\n \"manualPrivateLinkServiceConnections\": [\r\n {\r\n \"name\": \"myplsconnection\",\r\n \"properties\": {\r\n \"privateLinkServiceId\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1360/providers/Microsoft.Batch/batchAccounts/ps2880\",\r\n \"groupIds\": [\r\n \"batchAccount\"\r\n ]\r\n }\r\n }\r\n ],\r\n \"customDnsConfigs\": [],\r\n \"applicationSecurityGroups\": [],\r\n \"ipConfigurations\": []\r\n },\r\n \"location\": \"westus2\"\r\n}", "ResponseHeaders": { "Cache-Control": [ "no-cache" @@ -973,38 +1020,40 @@ "10" ], "x-ms-request-id": [ - "12daa783-16e0-48cf-a627-3e5ef41396e2" + "b12dcacb-a3b4-4a99-9fa8-ee3c571e512b" ], "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/providers/Microsoft.Network/locations/westus2/operations/12daa783-16e0-48cf-a627-3e5ef41396e2?api-version=2022-11-01" + "https://management.azure.com/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/providers/Microsoft.Network/locations/westus2/operations/b12dcacb-a3b4-4a99-9fa8-ee3c571e512b?api-version=2023-09-01&t=638466589544155433&c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAO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BocTtub7hJ60c6baWggx1pDYEQFovTdTsz2_RhXhwR9vg0LPAebvmZrJmA36J29z0OcJPUzHWpI8v4fM-N5E18Qf3bkmw5_knc3yECG4a7CqpyZm3BcwUlX2tHYTDExORSqdDCNvymQuNBkL4Rd9wBiYTal9HK2YYNtvPwNB9JTAGyhyfEp5ACzghM0kx0uQJmGjVYWZLhHKjeaLs2NEv625D8c7sujTYHUqRr1D4uLmSVgMNAuoWmoekNpi5I-rZf3KhHwUpvLLnOj7xA&h=UvQSyk6PYpnFWV7ZRClod3IE5syCEMBIisnM_hjMo3g" ], "x-ms-correlation-request-id": [ - "c1213f00-7824-4201-9238-86a264b73471" + "8016d36c-dfad-40b3-946e-53c340f896ec" ], "Azure-AsyncNotification": [ "Enabled" ], "x-ms-arm-service-request-id": [ - "d3e62ce6-3525-4d0d-9a57-594cc14ae3cb" + "21c8dec3-9ca4-4d06-af73-1722d7e9f2c2" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Server": [ - "Microsoft-HTTPAPI/2.0", - "Microsoft-HTTPAPI/2.0" - ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1198" + "1199" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T073204Z:c1213f00-7824-4201-9238-86a264b73471" + "WESTUS2:20240321T230234Z:8016d36c-dfad-40b3-946e-53c340f896ec" ], "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 9D1600A467894BAAAEFEFAE896C9C16F Ref B: CO6AA3150219039 Ref C: 2024-03-21T23:02:33Z" + ], "Date": [ - "Fri, 16 Jun 2023 07:32:03 GMT" + "Thu, 21 Mar 2024 23:02:34 GMT" ], "Content-Length": [ "1554" @@ -1016,21 +1065,21 @@ "-1" ] }, - "ResponseBody": "{\r\n \"name\": \"mypec\",\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2300/providers/Microsoft.Network/privateEndpoints/mypec\",\r\n \"etag\": \"W/\\\"539f128a-3461-4ced-a7ad-63a666f8e138\\\"\",\r\n \"type\": \"Microsoft.Network/privateEndpoints\",\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": \"7515511d-4ae3-45dd-a139-f8730b735a1d\",\r\n \"privateLinkServiceConnections\": [],\r\n \"manualPrivateLinkServiceConnections\": [\r\n {\r\n \"name\": \"myplsconnection\",\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2300/providers/Microsoft.Network/privateEndpoints/mypec/manualPrivateLinkServiceConnections/myplsconnection\",\r\n \"etag\": \"W/\\\"539f128a-3461-4ced-a7ad-63a666f8e138\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"privateLinkServiceId\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2300/providers/Microsoft.Batch/batchAccounts/ps2825\",\r\n \"groupIds\": [\r\n \"batchAccount\"\r\n ],\r\n \"privateLinkServiceConnectionState\": {\r\n \"status\": \"Pending\",\r\n \"description\": \"Awaiting Approval\",\r\n \"actionsRequired\": \"None\"\r\n }\r\n },\r\n \"type\": \"Microsoft.Network/privateEndpoints/manualPrivateLinkServiceConnections\"\r\n }\r\n ],\r\n \"customNetworkInterfaceName\": \"\",\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2300/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet\"\r\n },\r\n \"ipConfigurations\": [],\r\n \"networkInterfaces\": [\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2300/providers/Microsoft.Network/networkInterfaces/mypec.nic.5eec2fe4-ce2f-45bb-829a-3f4731534277\"\r\n }\r\n ],\r\n \"customDnsConfigs\": []\r\n }\r\n}", + "ResponseBody": "{\r\n \"name\": \"mypec\",\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1360/providers/Microsoft.Network/privateEndpoints/mypec\",\r\n \"etag\": \"W/\\\"d6eb903e-7d93-42c0-ae3c-839900d209d7\\\"\",\r\n \"type\": \"Microsoft.Network/privateEndpoints\",\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": \"3bcddd97-a407-4405-89e2-61b7fd8eceac\",\r\n \"privateLinkServiceConnections\": [],\r\n \"manualPrivateLinkServiceConnections\": [\r\n {\r\n \"name\": \"myplsconnection\",\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1360/providers/Microsoft.Network/privateEndpoints/mypec/manualPrivateLinkServiceConnections/myplsconnection\",\r\n \"etag\": \"W/\\\"d6eb903e-7d93-42c0-ae3c-839900d209d7\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"privateLinkServiceId\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1360/providers/Microsoft.Batch/batchAccounts/ps2880\",\r\n \"groupIds\": [\r\n \"batchAccount\"\r\n ],\r\n \"privateLinkServiceConnectionState\": {\r\n \"status\": \"Pending\",\r\n \"description\": \"Awaiting Approval\",\r\n \"actionsRequired\": \"None\"\r\n }\r\n },\r\n \"type\": \"Microsoft.Network/privateEndpoints/manualPrivateLinkServiceConnections\"\r\n }\r\n ],\r\n \"customNetworkInterfaceName\": \"\",\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1360/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet\"\r\n },\r\n \"ipConfigurations\": [],\r\n \"networkInterfaces\": [\r\n {\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1360/providers/Microsoft.Network/networkInterfaces/mypec.nic.8e753525-225b-4651-8840-f2f148805391\"\r\n }\r\n ],\r\n \"customDnsConfigs\": []\r\n }\r\n}", "StatusCode": 201 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/providers/Microsoft.Network/locations/westus2/operations/12daa783-16e0-48cf-a627-3e5ef41396e2?api-version=2022-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Byb3ZpZGVycy9NaWNyb3NvZnQuTmV0d29yay9sb2NhdGlvbnMvd2VzdHVzMi9vcGVyYXRpb25zLzEyZGFhNzgzLTE2ZTAtNDhjZi1hNjI3LTNlNWVmNDEzOTZlMj9hcGktdmVyc2lvbj0yMDIyLTExLTAx", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/providers/Microsoft.Network/locations/westus2/operations/b12dcacb-a3b4-4a99-9fa8-ee3c571e512b?api-version=2023-09-01&t=638466589544155433&c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOVFiSMi9Sg6cKnrBuPHbDk_Zwa1ZNYHwLVPJArEI9N2bLrgd1mU0ZdNVcdf6rtZCkUUuCe3vxnVTGwufpwH9GPWDgJOpJoL9wgKOzUDiHLUeiWPjrK1AoaQVpr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"38b2d941-eee3-4707-a720-db50312797f8" + "06184ec1-3750-4b69-bca5-1bbf9e7beb0b" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" ] }, @@ -1046,32 +1095,34 @@ "10" ], "x-ms-request-id": [ - "61e9c7a3-6aa2-43f9-a7ff-e57fd957d910" + "a40b95bc-1658-4bf4-a394-780f798d8eb3" ], "x-ms-correlation-request-id": [ - "bc930162-ac9b-4c16-8ad2-e987b241e740" + "a4ccea97-be32-4f1e-8486-ea730079f3be" ], "x-ms-arm-service-request-id": [ - "8acbd4fd-c602-4aa3-9fa5-e28cb835dc32" + "5f56fe22-dcb3-4914-b524-cb18dfe63c06" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Server": [ - "Microsoft-HTTPAPI/2.0", - "Microsoft-HTTPAPI/2.0" - ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" + "11999" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T073214Z:bc930162-ac9b-4c16-8ad2-e987b241e740" + "WESTUS2:20240321T230244Z:a4ccea97-be32-4f1e-8486-ea730079f3be" ], "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 762D41F039B243D6A5CC30F5DAF3FD23 Ref B: CO6AA3150219039 Ref C: 2024-03-21T23:02:44Z" + ], "Date": [ - "Fri, 16 Jun 2023 07:32:13 GMT" + "Thu, 21 Mar 2024 23:02:44 GMT" ], "Content-Length": [ "23" @@ -1087,17 +1138,17 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/providers/Microsoft.Network/locations/westus2/operations/12daa783-16e0-48cf-a627-3e5ef41396e2?api-version=2022-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Byb3ZpZGVycy9NaWNyb3NvZnQuTmV0d29yay9sb2NhdGlvbnMvd2VzdHVzMi9vcGVyYXRpb25zLzEyZGFhNzgzLTE2ZTAtNDhjZi1hNjI3LTNlNWVmNDEzOTZlMj9hcGktdmVyc2lvbj0yMDIyLTExLTAx", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/providers/Microsoft.Network/locations/westus2/operations/b12dcacb-a3b4-4a99-9fa8-ee3c571e512b?api-version=2023-09-01&t=638466589544155433&c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOVFiSMi9Sg6cKnrBuPHbDk_Zwa1ZNYHwLVPJArEI9N2bLrgd1mU0ZdNVcdf6rtZCkUUuCe3vxnVTGwufpwH9GPWDgJOpJoL9wgKOzUDiHLUeiWPjrK1AoaQVprZgjnzXBIWiZC2tZjbUT9pOI_ixYJJPrsCfLt7HEccnhObROE1mo_hpiPDrtOQDaX-BboNceB8vI1wmSPApGpPRM9hBRQbXgqKFC8094UNsMVkWPCrsPvP5YlMBLARlGf2WTevGKRREjstkApf1Swi7uKnpyhhsidD1yREMU0mWY9wnZfAX0jpEp3p9jKVMPQ3L-m-nSZI4zrtbW0AnI0O3pAEwe0CAwEAAaOCA-0wggPpMCcGCSs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kxTYmdyTHBUTDdUN3puamVQY0dSUmtDQmpBc2xyVjVTcXVmY3NycEdtcXZQQVZLWFJWLU9JT3p2WHk2cW1uOUNIbWRvMFJHQlhHSWFrYkxNZWNfMVNJUzhOZFBzQjZpNlhQakwyU0RqcUtUYTVjYXI3YlZZbFhFVnNnTC0wMDBWRjF0NngxSUkzVkJOZnNFSjgxQ2RKeXhhQ0pud3ZXSTZrSHRDdEpYOVFZSzNxWmFiOVBmWlJCdmNldEpvUGRNRnZCVSZzPXcwLW5Icy13Q1VLeU92QU8yQXQ2a3JSdEhfcF9wVXZhYVczcUxCZ0V5LVhBZkxHMUc2N09RWUc3UnJXQlFYUXZHd2RjQm9jVHR1YjdoSjYwYzZiYVdnZ3gxcERZRVFGb3ZUZFRzejJfUmhYaHdSOXZnMExQQWVidm1ackptQTM2SjI5ejBPY0pQVXpIV3BJOHY0Zk0tTjVFMThRZjNia213NV9rbmMzeUVDRzRhN0NxcHlabTNCY3dVbFgydEhZVERFeE9SU3FkRENOdnltUXVOQmtMNFJkOXdCaVlUYWw5SEsyWVlOdHZQd05COUpUQUd5aHlmRXA1QUN6Z2hNMGt4MHVRSm1HalZZV1pMaEhLamVhTHMyTkV2NjI1RDhjN3N1alRZSFVxUnIxRDR1TG1TVmdNTkF1b1dtb2VrTnBpNUktclpmM0toSHdVcHZMTG5Pajd4QSZoPVV2UVN5azZQWXBuRldWN1pSQ2xvZDNJRTVzeUNFTUJJaXNuTV9oak1vM2c=", "RequestMethod": "GET", "RequestHeaders": { "x-ms-client-request-id": [ - "38b2d941-eee3-4707-a720-db50312797f8" + "06184ec1-3750-4b69-bca5-1bbf9e7beb0b" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" ] }, @@ -1113,32 +1164,34 @@ "20" ], "x-ms-request-id": [ - "8ce90509-2f2d-4115-b2d3-5a14eee46dc9" + "b2440ad6-8040-4ecd-83e1-0c10c43be062" ], "x-ms-correlation-request-id": [ - "44ef146c-13b4-4c76-b712-065e8995f92c" + "e7486260-287c-472e-9b6c-bdaf65fcc061" ], "x-ms-arm-service-request-id": [ - "21636954-f9a0-4f63-8097-e27ac5b75912" + "9d83d756-3eed-4509-a8d5-c5a58b538e83" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Server": [ - "Microsoft-HTTPAPI/2.0", - "Microsoft-HTTPAPI/2.0" - ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" + "11999" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T073224Z:44ef146c-13b4-4c76-b712-065e8995f92c" + "WESTUS2:20240321T230254Z:e7486260-287c-472e-9b6c-bdaf65fcc061" ], "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: EAA371DC4A094F7FA19AE55D3FB1CAD8 Ref B: CO6AA3150219039 Ref C: 2024-03-21T23:02:54Z" + ], "Date": [ - "Fri, 16 Jun 2023 07:32:24 GMT" + "Thu, 21 Mar 2024 23:02:54 GMT" ], "Content-Length": [ "23" @@ -1154,17 +1207,17 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/providers/Microsoft.Network/locations/westus2/operations/12daa783-16e0-48cf-a627-3e5ef41396e2?api-version=2022-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Byb3ZpZGVycy9NaWNyb3NvZnQuTmV0d29yay9sb2NhdGlvbnMvd2VzdHVzMi9vcGVyYXRpb25zLzEyZGFhNzgzLTE2ZTAtNDhjZi1hNjI3LTNlNWVmNDEzOTZlMj9hcGktdmVyc2lvbj0yMDIyLTExLTAx", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/providers/Microsoft.Network/locations/westus2/operations/b12dcacb-a3b4-4a99-9fa8-ee3c571e512b?api-version=2023-09-01&t=638466589544155433&c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOVFiSMi9Sg6cKnrBuPHbDk_Zwa1ZNYHwLVPJArEI9N2bLrgd1mU0ZdNVcdf6rtZCkUUuCe3vxnVTGwufpwH9GPWDgJOpJoL9wgKOzUDiHLUeiWPjrK1AoaQVprZgjnzXBIWiZC2tZjbUT9pOI_ixYJJPrsCfLt7HEccnhObROE1mo_hpiPDrtOQDaX-BboNceB8vI1wmSPApGpPRM9hBRQbXgqKFC8094UNsMVkWPCrsPvP5YlMBLARlGf2WTevGKRREjstkApf1Swi7uKnpyhhsidD1yREMU0mWY9wnZfAX0jpEp3p9jKVMPQ3L-m-nSZI4zrtbW0AnI0O3pAEwe0CAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQ08xUEtJSU5U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WlJCdmNldEpvUGRNRnZCVSZzPXcwLW5Icy13Q1VLeU92QU8yQXQ2a3JSdEhfcF9wVXZhYVczcUxCZ0V5LVhBZkxHMUc2N09RWUc3UnJXQlFYUXZHd2RjQm9jVHR1YjdoSjYwYzZiYVdnZ3gxcERZRVFGb3ZUZFRzejJfUmhYaHdSOXZnMExQQWVidm1ackptQTM2SjI5ejBPY0pQVXpIV3BJOHY0Zk0tTjVFMThRZjNia213NV9rbmMzeUVDRzRhN0NxcHlabTNCY3dVbFgydEhZVERFeE9SU3FkRENOdnltUXVOQmtMNFJkOXdCaVlUYWw5SEsyWVlOdHZQd05COUpUQUd5aHlmRXA1QUN6Z2hNMGt4MHVRSm1HalZZV1pMaEhLamVhTHMyTkV2NjI1RDhjN3N1alRZSFVxUnIxRDR1TG1TVmdNTkF1b1dtb2VrTnBpNUktclpmM0toSHdVcHZMTG5Pajd4QSZoPVV2UVN5azZQWXBuRldWN1pSQ2xvZDNJRTVzeUNFTUJJaXNuTV9oak1vM2c=", "RequestMethod": "GET", "RequestHeaders": { "x-ms-client-request-id": [ - "38b2d941-eee3-4707-a720-db50312797f8" + "06184ec1-3750-4b69-bca5-1bbf9e7beb0b" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" ] }, @@ -1177,32 +1230,34 @@ "no-cache" ], "x-ms-request-id": [ - "3ce247d2-3a03-4af3-b5d0-7e0739b71b3c" + "d7954a4c-3191-4a85-b5fe-8c859661134f" ], "x-ms-correlation-request-id": [ - "9ea3e002-0467-4e33-a303-df1731388849" + "f5e27d94-645e-4cc7-8071-4f72883ae29a" ], "x-ms-arm-service-request-id": [ - "7ea30267-23d1-4591-9e18-d761553d05de" + "fa911403-2edc-4349-bd1d-850ccc277fc4" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Server": [ - "Microsoft-HTTPAPI/2.0", - "Microsoft-HTTPAPI/2.0" - ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" + "11998" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T073245Z:9ea3e002-0467-4e33-a303-df1731388849" + "WESTUS2:20240321T230314Z:f5e27d94-645e-4cc7-8071-4f72883ae29a" ], "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 8735ECE0277D40298FA4E2D56CE55DDA Ref B: CO6AA3150219039 Ref C: 2024-03-21T23:03:14Z" + ], "Date": [ - "Fri, 16 Jun 2023 07:32:44 GMT" + "Thu, 21 Mar 2024 23:03:14 GMT" ], "Content-Length": [ "22" @@ -1218,21 +1273,21 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2300/providers/Microsoft.Batch/batchAccounts/ps2825/privateEndpointConnections?api-version=2022-06-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzL3BzMjMwMC9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvcHMyODI1L3ByaXZhdGVFbmRwb2ludENvbm5lY3Rpb25zP2FwaS12ZXJzaW9uPTIwMjItMDYtMDE=", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1360/providers/Microsoft.Batch/batchAccounts/ps2880/privateEndpointConnections?api-version=2022-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL3BzMTM2MC9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvcHMyODgwL3ByaXZhdGVFbmRwb2ludENvbm5lY3Rpb25zP2FwaS12ZXJzaW9uPTIwMjItMDYtMDE=", "RequestMethod": "GET", "RequestHeaders": { "x-ms-client-request-id": [ - "adc824c3-f685-4d89-89d8-149070319068" + "469903e2-f757-4e89-bc51-4fc01fd253d7" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Internal.Common.AzureRestClient/1.3.76" + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Internal.Common.AzureRestClient/1.3.91" ] }, "RequestBody": "", @@ -1243,11 +1298,8 @@ "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], "x-ms-request-id": [ - "99687e65-b30e-4608-b1cb-92d4edd14e31" + "065a7560-b494-498f-a5ea-7500d2d0abd0" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1255,17 +1307,23 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" ], "x-ms-correlation-request-id": [ - "cf3f1209-6f0f-4245-bee5-dca46a969fc9" + "c23bb674-5f21-44a7-a407-6c41fb14a8ca" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T073246Z:cf3f1209-6f0f-4245-bee5-dca46a969fc9" + "WESTUS2:20240321T230315Z:c23bb674-5f21-44a7-a407-6c41fb14a8ca" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 30FAC5541C464536A0EC26A650E318FD Ref B: CO6AA3150217011 Ref C: 2024-03-21T23:03:15Z" ], "Date": [ - "Fri, 16 Jun 2023 07:32:45 GMT" + "Thu, 21 Mar 2024 23:03:14 GMT" ], "Content-Length": [ "738" @@ -1277,25 +1335,25 @@ "-1" ] }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2300/providers/Microsoft.Batch/batchAccounts/ps2825/privateEndpointConnections/mypec.7515511d-4ae3-45dd-a139-f8730b735a1d\",\r\n \"name\": \"mypec.7515511d-4ae3-45dd-a139-f8730b735a1d\",\r\n \"type\": \"Microsoft.Batch/batchAccounts/privateEndpointConnections\",\r\n \"etag\": \"W/\\\"0x8DB6E3BCE7E3BF8\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"privateEndpoint\": {\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2300/providers/Microsoft.Network/privateEndpoints/mypec\"\r\n },\r\n \"privateLinkServiceConnectionState\": {\r\n \"status\": \"Pending\",\r\n \"description\": \"Manual approval still required\",\r\n \"actionsRequired\": \"Manual approval required\"\r\n },\r\n \"groupIds\": [\r\n \"batchAccount\"\r\n ]\r\n }\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1360/providers/Microsoft.Batch/batchAccounts/ps2880/privateEndpointConnections/mypec.3bcddd97-a407-4405-89e2-61b7fd8eceac\",\r\n \"name\": \"mypec.3bcddd97-a407-4405-89e2-61b7fd8eceac\",\r\n \"type\": \"Microsoft.Batch/batchAccounts/privateEndpointConnections\",\r\n \"etag\": \"W/\\\"0x8DC49FB05BFB30F\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"privateEndpoint\": {\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps1360/providers/Microsoft.Network/privateEndpoints/mypec\"\r\n },\r\n \"privateLinkServiceConnectionState\": {\r\n \"status\": \"Pending\",\r\n \"description\": \"Manual approval still required\",\r\n \"actionsRequired\": \"Manual approval required\"\r\n },\r\n \"groupIds\": [\r\n \"batchAccount\"\r\n ]\r\n }\r\n }\r\n ]\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourcegroups/ps2300?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlZ3JvdXBzL3BzMjMwMD9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourcegroups/ps1360?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlZ3JvdXBzL3BzMTM2MD9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", "RequestMethod": "DELETE", "RequestHeaders": { "x-ms-client-request-id": [ - "cb6a38e4-69db-4890-ae03-e7acd557e139" + "88654f95-02ac-44fc-9c99-09785dc87cd0" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" ] }, "RequestBody": "", @@ -1307,7 +1365,7 @@ "no-cache" ], "Location": [ - "https://management.azure.com/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIzMDAtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01" + "https://management.azure.com/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEzNjAtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01&t=638466589955945088&c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOVFiSMi9Sg6cKnrBuPHbDk_Zwa1ZNYHwLVPJArEI9N2bLrgd1mU0ZdNVcdf6rtZCkUUuCe3vxnVTGwufpwH9GPWDgJOpJoL9wgKOzUDiHLUeiWPjrK1AoaQVprZgjnzXBIWiZC2tZjbUT9pOI_ixYJJPrsCfLt7HEccnhObROE1mo_hpiPDrtOQDaX-BboNceB8vI1wmSPApGpPRM9hBRQbXgqKFC8094UNsMVkWPCrsPvP5YlMBLARlGf2WTevGKRREjstkApf1Swi7uKnpyhhsidD1yREMU0mWY9wnZfAX0jpEp3p9jKVMPQ3L-m-nSZI4zrtbW0AnI0O3pAEwe0CAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8v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gNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBADNBZjhX44bpBtC8kogZJGe4lYeHX95whfZ7X_CMSUuZRbQQ_b6raUpp8V8eF0YUa9b3Oa-DGrs5WfzogCuGcJPeoEVnDYzc1jlKubSIpGw73aGZzhbTjJeNf-Qe-5vTG-GcNzVtIcrwi93YSiK2LSbgrLpTL7T7znjePcGRRkCBjAslrV5SqufcsrpGmqvPAVKXRV-OIOzvXy6qmn9CHmdo0RGBXGIakbLMec_1SIS8NdPsB6i6XPjL2SDjqKTa5car7bVYlXEVsgL-000VF1t6x1II3VBNfsEJ81CdJyxaCJnwvWI6kHtCtJX9QYK3qZab9PfZRBvcetJoPdMFvBU&s=bCJNDOXUMoIFsWal7-C3I0B3JI7TKjGNNZ6QyBvzQy8gXcacXGUu3lytzSq1pcKAaXSMmUaJPYPoH8sqTwMOwom19HHkZ5is3sRj98v5qsXaQdv89YHbBq_LSSrfS2TyTKmWg-5YKhFsyCnKyd_O1KoSVnrP0d5N0lmd9xGONxNF_8bJpNdTEF6nbTXB0ver4TG4n4Ou0Xvgm-LuS-7WpgdHG0hvUg2uYCZjfa939KrPC6w5pCuZSInkNtg4YLE5FOIsUxrtmatt4vQZRXImMs6_RcGChGEH5uBNZBmX8IhRFZ2Q_Ct1eCu3Cc8Z89bNvmVcVeoUlT3UN1a_oDY0GQ&h=zpXUzGHQXh_ZQrU606xbHY-RyFej2yNhp5mHNawPVwo" ], "Retry-After": [ "15" @@ -1316,13 +1374,13 @@ "14999" ], "x-ms-request-id": [ - "ed0e6ae2-34d8-42b9-b916-db5264feef89" + "0e3878f1-0195-4ea7-a56f-2ca839889fc7" ], "x-ms-correlation-request-id": [ - "ed0e6ae2-34d8-42b9-b916-db5264feef89" + "0e3878f1-0195-4ea7-a56f-2ca839889fc7" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T073249Z:ed0e6ae2-34d8-42b9-b916-db5264feef89" + "WESTUS2:20240321T230315Z:0e3878f1-0195-4ea7-a56f-2ca839889fc7" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1330,65 +1388,14 @@ "X-Content-Type-Options": [ "nosniff" ], - "Date": [ - "Fri, 16 Jun 2023 07:32:49 GMT" + "X-Cache": [ + "CONFIG_NOCACHE" ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIzMDAtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJek1EQXRWMFZUVkZWVE1pSXNJbXB2WWt4dlkyRjBhVzl1SWpvaWQyVnpkSFZ6TWlKOT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "GET", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIzMDAtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "f0cf698a-fb99-49c5-80fd-0a22a6d798f3" - ], - "x-ms-correlation-request-id": [ - "f0cf698a-fb99-49c5-80fd-0a22a6d798f3" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T073305Z:f0cf698a-fb99-49c5-80fd-0a22a6d798f3" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" + "X-MSEdge-Ref": [ + "Ref A: 21A7E498A6874E7389F16DDD7715F686 Ref B: CO6AA3150219051 Ref C: 2024-03-21T23:03:15Z" ], "Date": [ - "Fri, 16 Jun 2023 07:33:04 GMT" + "Thu, 21 Mar 2024 23:03:15 GMT" ], "Expires": [ "-1" @@ -1401,15 +1408,15 @@ "StatusCode": 202 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIzMDAtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJek1EQXRWMFZUVkZWVE1pSXNJbXB2WWt4dlkyRjBhVzl1SWpvaWQyVnpkSFZ6TWlKOT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzE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BmWlJCdmNldEpvUGRNRnZCVSZzPWJDSk5ET1hVTW9JRnNXYWw3LUMzSTBCM0pJN1RLakdOTlo2UXlCdnpReThnWGNhY1hHVXUzbHl0elNxMXBjS0FhWFNNbVVhSlBZUG9IOHNxVHdNT3dvbTE5SEhrWjVpczNzUmo5OHY1cXNYYVFkdjg5WUhiQnFfTFNTcmZTMlR5VEttV2ctNVlLaEZzeUNuS3lkX08xS29TVm5yUDBkNU4wbG1kOXhHT054TkZfOGJKcE5kVEVGNm5iVFhCMHZlcjRURzRuNE91MFh2Z20tTHVTLTdXcGdkSEcwaHZVZzJ1WUNaamZhOTM5S3JQQzZ3NXBDdVpTSW5rTnRnNFlMRTVGT0lzVXhydG1hdHQ0dlFaUlhJbU1zNl9SY0dDaEdFSDV1Qk5aQm1YOEloUkZaMlFfQ3QxZUN1M0NjOFo4OWJOdm1WY1Zlb1VsVDNVTjFhX29EWTBHUSZoPXpwWFV6R0hRWGhfWlFyVTYwNnhiSFktUnlGZWoyeU5ocDVtSE5hd1BWd28=", "RequestMethod": "GET", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" ] }, "RequestBody": "", @@ -1421,22 +1428,22 @@ "no-cache" ], "Location": [ - "https://management.azure.com/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIzMDAtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01" + "https://management.azure.com/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxF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IhvcNAQELBQADggEBADNBZjhX44bpBtC8kogZJGe4lYeHX95whfZ7X_CMSUuZRbQQ_b6raUpp8V8eF0YUa9b3Oa-DGrs5WfzogCuGcJPeoEVnDYzc1jlKubSIpGw73aGZzhbTjJeNf-Qe-5vTG-GcNzVtIcrwi93YSiK2LSbgrLpTL7T7znjePcGRRkCBjAslrV5SqufcsrpGmqvPAVKXRV-OIOzvXy6qmn9CHmdo0RGBXGIakbLMec_1SIS8NdPsB6i6XPjL2SDjqKTa5car7bVYlXEVsgL-000VF1t6x1II3VBNfsEJ81CdJyxaCJnwvWI6kHtCtJX9QYK3qZab9PfZRBvcetJoPdMFvBU&s=07l6imbxP48QxJz6HMws5m2yKHPPSOSdEhA8rfybv-WW6puRx25wPodWGo2ZXgxno3US7EbcuM-0EGbalytrsWYBr3R7LmJcahxIjrRYKgeipFSBFXVdEKMk-Fu6yj6og0v7H1ic-KGrwhsCJ4KJfgqCZ6VueGPJk0VNA-sz4zqxcsZunt4pSEizy7IcpkLVx-YVWsk9gLAIstmz0B0L3xJDf9aVhtt_AzoREVESxQC52IUExO5eLSz_1TDWoSpitw-S786SkXYB-28ftDi93Q2LYglO6gWF792vHYN1QU97-gK_iWOCQFu3jteIA69MbsftdDNUt2HEiAN5brR5sw&h=bGUGZRtQvzqRNvimaA0YcwABM6szl-cfruqZm_q8XzU" ], "Retry-After": [ "15" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" + "11999" ], "x-ms-request-id": [ - "2804a013-77aa-4fa0-963d-4473ee15949b" + "1882784e-7a36-483d-be2c-0f8c88f10ab5" ], "x-ms-correlation-request-id": [ - "2804a013-77aa-4fa0-963d-4473ee15949b" + "1882784e-7a36-483d-be2c-0f8c88f10ab5" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T073320Z:2804a013-77aa-4fa0-963d-4473ee15949b" + "WESTUS2:20240321T230330Z:1882784e-7a36-483d-be2c-0f8c88f10ab5" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1444,65 +1451,14 @@ "X-Content-Type-Options": [ "nosniff" ], - "Date": [ - "Fri, 16 Jun 2023 07:33:19 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIzMDAtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJek1EQXRWMFZUVkZWVE1pSXNJbXB2WWt4dlkyRjBhVzl1SWpvaWQyVnpkSFZ6TWlKOT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "GET", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIzMDAtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-request-id": [ - "01c6eb58-b438-406b-8886-3210f75a0e62" + "X-Cache": [ + "CONFIG_NOCACHE" ], - "x-ms-correlation-request-id": [ - "01c6eb58-b438-406b-8886-3210f75a0e62" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T073335Z:01c6eb58-b438-406b-8886-3210f75a0e62" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" + "X-MSEdge-Ref": [ + "Ref A: 61F8EACF2494408F86148A5B6866A850 Ref B: CO6AA3150219051 Ref C: 2024-03-21T23:03:30Z" ], "Date": [ - "Fri, 16 Jun 2023 07:33:35 GMT" + "Thu, 21 Mar 2024 23:03:30 GMT" ], "Expires": [ "-1" @@ -1515,15 +1471,15 @@ "StatusCode": 202 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIzMDAtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJek1EQXRWMFZUVkZWVE1pSXNJbXB2WWt4dlkyRjBhVzl1SWpvaWQyVnpkSFZ6TWlKOT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEzNjAtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01&t=638466590106769685&c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqh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1I3TG1KY2FoeElqclJZS2dlaXBGU0JGWFZkRUtNay1GdTZ5ajZvZzB2N0gxaWMtS0dyd2hzQ0o0S0pmZ3FDWjZWdWVHUEprMFZOQS1zejR6cXhjc1p1bnQ0cFNFaXp5N0ljcGtMVngtWVZXc2s5Z0xBSXN0bXowQjBMM3hKRGY5YVZodHRfQXpvUkVWRVN4UUM1MklVRXhPNWVMU3pfMVREV29TcGl0dy1TNzg2U2tYWUItMjhmdERpOTNRMkxZZ2xPNmdXRjc5MnZIWU4xUVU5Ny1nS19pV09DUUZ1M2p0ZUlBNjlNYnNmdGRETlV0MkhFaUFONWJyUjVzdyZoPWJHVUdaUnRRdnpxUk52aW1hQTBZY3dBQk02c3psLWNmcnVxWm1fcThYelU=", "RequestMethod": "GET", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" ] }, "RequestBody": "", @@ -1535,22 +1491,22 @@ "no-cache" ], "Location": [ - "https://management.azure.com/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIzMDAtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01" + "https://management.azure.com/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEzNjAtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01&t=638466590257754657&c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEM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rwi93YSiK2LSbgrLpTL7T7znjePcGRRkCBjAslrV5SqufcsrpGmqvPAVKXRV-OIOzvXy6qmn9CHmdo0RGBXGIakbLMec_1SIS8NdPsB6i6XPjL2SDjqKTa5car7bVYlXEVsgL-000VF1t6x1II3VBNfsEJ81CdJyxaCJnwvWI6kHtCtJX9QYK3qZab9PfZRBvcetJoPdMFvBU&s=Rns2fW1EoywwA2357rn5df99naRboV1V1pPJdQmWYB-pwCRe-ghk_ve5BzyZLXfn-XelwUJh2ZqcsR5RIrNOP-_ToAOZTk1CUnGGcPERKsCmExG-DwoxclzpBGpGXzcm2UBr5tplZG5P8Pa6X0cNKPIivgXtPOI7PDD2Jl9p1KKKIL-_fpCtys1YJ8eO-UFc4mHn7A4YuxKz93lnJROZbhv_DQmRp5ryZHfYTpI5xzsKvHW_dIkvSzzgke9T80ottiwpBfU32P5KyktgzY7YKHu3NfBBXHqYc6ikLBhoQQw3VUxEz3EmUR6q6Jfd9wCaNaiwZXw8cbtwYhTI2zZe3g&h=ZxLs1Kl4YT8uNgnaVqMvMesDIR0dZD4BJXDx4AGnegA" ], "Retry-After": [ "15" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" + "11999" ], "x-ms-request-id": [ - "35069116-7ddd-48e6-886c-92b033a2d435" + "bfbaa868-41d6-4ae1-9afa-92559f6e83d8" ], "x-ms-correlation-request-id": [ - "35069116-7ddd-48e6-886c-92b033a2d435" + "bfbaa868-41d6-4ae1-9afa-92559f6e83d8" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T073351Z:35069116-7ddd-48e6-886c-92b033a2d435" + "WESTUS2:20240321T230345Z:bfbaa868-41d6-4ae1-9afa-92559f6e83d8" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1558,65 +1514,14 @@ "X-Content-Type-Options": [ "nosniff" ], - "Date": [ - "Fri, 16 Jun 2023 07:33:50 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIzMDAtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJek1EQXRWMFZUVkZWVE1pSXNJbXB2WWt4dlkyRjBhVzl1SWpvaWQyVnpkSFZ6TWlKOT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "GET", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIzMDAtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-request-id": [ - "7494e58a-fce2-403d-95ed-df41f7ff95c4" - ], - "x-ms-correlation-request-id": [ - "7494e58a-fce2-403d-95ed-df41f7ff95c4" + "X-Cache": [ + "CONFIG_NOCACHE" ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T073406Z:7494e58a-fce2-403d-95ed-df41f7ff95c4" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" + "X-MSEdge-Ref": [ + "Ref A: D4D8474E96064E2ABB95B1B0416FC8C7 Ref B: CO6AA3150219051 Ref C: 2024-03-21T23:03:45Z" ], "Date": [ - "Fri, 16 Jun 2023 07:34:06 GMT" + "Thu, 21 Mar 2024 23:03:45 GMT" ], "Expires": [ "-1" @@ -1629,15 +1534,15 @@ "StatusCode": 202 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIzMDAtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJek1EQXRWMFZUVkZWVE1pSXNJbXB2WWt4dlkyRjBhVzl1SWpvaWQyVnpkSFZ6TWlKOT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEzNjAtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01&t=638466590257754657&c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMT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mw5cDFLS0tJTC1fZnBDdHlzMVlKOGVPLVVGYzRtSG43QTRZdXhLejkzbG5KUk9aYmh2X0RRbVJwNXJ5WkhmWVRwSTV4enNLdkhXX2RJa3ZTenpna2U5VDgwb3R0aXdwQmZVMzJQNUt5a3Rnelk3WUtIdTNOZkJCWEhxWWM2aWtMQmhvUVF3M1ZVeEV6M0VtVVI2cTZKZmQ5d0NhTmFpd1pYdzhjYnR3WWhUSTJ6WmUzZyZoPVp4THMxS2w0WVQ4dU5nbmFWcU12TWVzRElSMGRaRDRCSlhEeDRBR25lZ0E=", "RequestMethod": "GET", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" ] }, "RequestBody": "", @@ -1649,22 +1554,22 @@ "no-cache" ], "Location": [ - "https://management.azure.com/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIzMDAtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01" + "https://management.azure.com/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEzNjAtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01&t=638466590408215849&c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDU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S8NdPsB6i6XPjL2SDjqKTa5car7bVYlXEVsgL-000VF1t6x1II3VBNfsEJ81CdJyxaCJnwvWI6kHtCtJX9QYK3qZab9PfZRBvcetJoPdMFvBU&s=I7zvH4AOhHM8DnKp8-Hfa8JTnMhDcPK8Mzb4lNZpsDXSiW9OyUgsTRYN3gbkjrkdevdGIR3hhHAIr0arWKj3dc0JSwjkxMDfxnCZSz9G3Tk7m_dvLXES3WB27mVxeOjUBkTmUopao0HShUXAUq8aebzg7J2N00G10s9MSpXB540Oo8iidS75CtgsYlCvls1UHzEd-w9c4mrwuH_JGs8Mp3Do2htgQ1TTjtjIqJP4MSdcfkzaqK1yRRvmi49LpgXoq-qg4QK3QeyfpTOGFMS-IA3yNzGxSKtdFZhxjrfKaoFI18EGFD138zWAhhF-rx8r9d7IJhnOo3qzQp6dZVzrkg&h=hS78uadrRjyV9RJCdClpJiCpmBWp_F4JMVrWxaqtt7o" ], "Retry-After": [ "15" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" + "11998" ], "x-ms-request-id": [ - "0e1c51fd-34f7-4816-973e-ff8101a24680" + "773ef890-df86-4e59-8dbb-5a89f6e06c61" ], "x-ms-correlation-request-id": [ - "0e1c51fd-34f7-4816-973e-ff8101a24680" + "773ef890-df86-4e59-8dbb-5a89f6e06c61" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T073422Z:0e1c51fd-34f7-4816-973e-ff8101a24680" + "WESTUS2:20240321T230400Z:773ef890-df86-4e59-8dbb-5a89f6e06c61" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1672,65 +1577,14 @@ "X-Content-Type-Options": [ "nosniff" ], - "Date": [ - "Fri, 16 Jun 2023 07:34:21 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIzMDAtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJek1EQXRWMFZUVkZWVE1pSXNJbXB2WWt4dlkyRjBhVzl1SWpvaWQyVnpkSFZ6TWlKOT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "GET", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" + "X-Cache": [ + "CONFIG_NOCACHE" ], - "Location": [ - "https://management.azure.com/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIzMDAtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-request-id": [ - "67ed8196-b07d-4369-8031-5f82051db54c" - ], - "x-ms-correlation-request-id": [ - "67ed8196-b07d-4369-8031-5f82051db54c" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T073437Z:67ed8196-b07d-4369-8031-5f82051db54c" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" + "X-MSEdge-Ref": [ + "Ref A: B46C41BBBEDA4BCEBF2B1DEB9577CCD4 Ref B: CO6AA3150219051 Ref C: 2024-03-21T23:04:00Z" ], "Date": [ - "Fri, 16 Jun 2023 07:34:37 GMT" + "Thu, 21 Mar 2024 23:04:00 GMT" ], "Expires": [ "-1" @@ -1743,15 +1597,15 @@ "StatusCode": 202 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIzMDAtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJek1EQXRWMFZUVkZWVE1pSXNJbXB2WWt4dlkyRjBhVzl1SWpvaWQyVnpkSFZ6TWlKOT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEzNjAtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01&t=638466590408215849&c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tY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XlSUnZtaTQ5THBnWG9xLXFnNFFLM1FleWZwVE9HRk1TLUlBM3lOekd4U0t0ZEZaaHhqcmZLYW9GSTE4RUdGRDEzOHpXQWhoRi1yeDhyOWQ3SUpobk9vM3F6UXA2ZFpWenJrZyZoPWhTNzh1YWRyUmp5VjlSSkNkQ2xwSmlDcG1CV3BfRjRKTVZyV3hhcXR0N28=", "RequestMethod": "GET", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" ] }, "RequestBody": "", @@ -1763,22 +1617,22 @@ "no-cache" ], "Location": [ - "https://management.azure.com/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIzMDAtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01" + "https://management.azure.com/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEzNjAtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01&t=638466590559076114&c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS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s=x7jhgljObZWiBJInNkXh6e0gLwg3NTREHWM8CiEmW01ORmNoBBuFMrfIXtnDdjjFlqIKdS8NG6ULH1t3MPBWl3f2CSyvAHFyMYW5K7qhqBusD928nScIL-CTXnpv6DGv5rLcfgIszcI3ZE71LgA0sAAorJD9tDsx76zGSr-XTuTA8k1ETqEK7ut4rNWciTaLaTl-qlEDotIZq9DLcd7tt7jT9byD87IxqRe7zdJfGDPxagqRA_ywkhU-HR9t60u0k7N4QkxNSMR4MZEMM2ud6ig2wNExkRfq_rhCcqCDIoR5SdWxyPSypbchvrP7jgn2HNpIUKp09UF0QsC-t_qO1A&h=WD4cNZHBLLESUFlnOlDIQFdWxbTKXbVvI43qKMHwKVI" ], "Retry-After": [ "15" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" + "11999" ], "x-ms-request-id": [ - "b57eabcc-00e8-41ff-8dd2-eecc9cfbf47c" + "0e1e65bf-5a20-48f8-8430-348802fe7a77" ], "x-ms-correlation-request-id": [ - "b57eabcc-00e8-41ff-8dd2-eecc9cfbf47c" + "0e1e65bf-5a20-48f8-8430-348802fe7a77" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T073453Z:b57eabcc-00e8-41ff-8dd2-eecc9cfbf47c" + "WESTUS2:20240321T230415Z:0e1e65bf-5a20-48f8-8430-348802fe7a77" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1786,65 +1640,14 @@ "X-Content-Type-Options": [ "nosniff" ], - "Date": [ - "Fri, 16 Jun 2023 07:34:52 GMT" + "X-Cache": [ + "CONFIG_NOCACHE" ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIzMDAtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJek1EQXRWMFZUVkZWVE1pSXNJbXB2WWt4dlkyRjBhVzl1SWpvaWQyVnpkSFZ6TWlKOT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "GET", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIzMDAtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-request-id": [ - "b3a1b77f-70ca-4514-818e-47303feb35e4" - ], - "x-ms-correlation-request-id": [ - "b3a1b77f-70ca-4514-818e-47303feb35e4" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T073508Z:b3a1b77f-70ca-4514-818e-47303feb35e4" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" + "X-MSEdge-Ref": [ + "Ref A: 647DD207109F41CD8E7F88B848FD1FBB Ref B: CO6AA3150219051 Ref C: 2024-03-21T23:04:15Z" ], "Date": [ - "Fri, 16 Jun 2023 07:35:08 GMT" + "Thu, 21 Mar 2024 23:04:15 GMT" ], "Expires": [ "-1" @@ -1857,15 +1660,15 @@ "StatusCode": 202 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIzMDAtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJek1EQXRWMFZUVkZWVE1pSXNJbXB2WWt4dlkyRjBhVzl1SWpvaWQyVnpkSFZ6TWlKOT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEzNjAtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01&t=638466590559076114&c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOVFiSMi9Sg6cKnrBuPHbDk_Zwa1ZN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HZyUDdqZ24ySE5wSVVLcDA5VUYwUXNDLXRfcU8xQSZoPVdENGNOWkhCTExFU1VGbG5PbERJUUZkV3hiVEtYYlZ2STQzcUtNSHdLVkk=", "RequestMethod": "GET", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" ] }, "RequestBody": "", @@ -1876,23 +1679,17 @@ "Pragma": [ "no-cache" ], - "Location": [ - "https://management.azure.com/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIzMDAtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" + "11999" ], "x-ms-request-id": [ - "d0269a39-ae22-476f-9ba7-d6d56c054bec" + "ef366bba-3244-4986-ae05-b24cb2e63789" ], "x-ms-correlation-request-id": [ - "d0269a39-ae22-476f-9ba7-d6d56c054bec" + "ef366bba-3244-4986-ae05-b24cb2e63789" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T073523Z:d0269a39-ae22-476f-9ba7-d6d56c054bec" + "WESTUS2:20240321T230431Z:ef366bba-3244-4986-ae05-b24cb2e63789" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1900,65 +1697,14 @@ "X-Content-Type-Options": [ "nosniff" ], - "Date": [ - "Fri, 16 Jun 2023 07:35:23 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIzMDAtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJek1EQXRWMFZUVkZWVE1pSXNJbXB2WWt4dlkyRjBhVzl1SWpvaWQyVnpkSFZ6TWlKOT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "GET", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIzMDAtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11988" - ], - "x-ms-request-id": [ - "9d63d9b7-e4e8-470a-830a-3f942a8165df" - ], - "x-ms-correlation-request-id": [ - "9d63d9b7-e4e8-470a-830a-3f942a8165df" + "X-Cache": [ + "CONFIG_NOCACHE" ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T073539Z:9d63d9b7-e4e8-470a-830a-3f942a8165df" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" + "X-MSEdge-Ref": [ + "Ref A: 19839982B608446788ACC188E8A00723 Ref B: CO6AA3150219051 Ref C: 2024-03-21T23:04:31Z" ], "Date": [ - "Fri, 16 Jun 2023 07:35:38 GMT" + "Thu, 21 Mar 2024 23:04:30 GMT" ], "Expires": [ "-1" @@ -1968,18 +1714,18 @@ ] }, "ResponseBody": "", - "StatusCode": 202 + "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIzMDAtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJek1EQXRWMFZUVkZWVE1pSXNJbXB2WWt4dlkyRjBhVzl1SWpvaWQyVnpkSFZ6TWlKOT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEzNjAtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01&t=638466590559076114&c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA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VRhTGFUbC1xbEVEb3RJWnE5RExjZDd0dDdqVDlieUQ4N0l4cVJlN3pkSmZHRFB4YWdxUkFfeXdraFUtSFI5dDYwdTBrN040UWt4TlNNUjRNWkVNTTJ1ZDZpZzJ3TkV4a1JmcV9yaENjcUNESW9SNVNkV3h5UFN5cGJjaHZyUDdqZ24ySE5wSVVLcDA5VUYwUXNDLXRfcU8xQSZoPVdENGNOWkhCTExFU1VGbG5PbERJUUZkV3hiVEtYYlZ2STQzcUtNSHdLVkk=", "RequestMethod": "GET", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" ] }, "RequestBody": "", @@ -1991,16 +1737,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11987" + "11999" ], "x-ms-request-id": [ - "43dba672-b1aa-4b0f-9e0d-d0c23bb1e2ac" + "a58fe577-6506-414f-8eb5-41e8b9478519" ], "x-ms-correlation-request-id": [ - "43dba672-b1aa-4b0f-9e0d-d0c23bb1e2ac" + "a58fe577-6506-414f-8eb5-41e8b9478519" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T073554Z:43dba672-b1aa-4b0f-9e0d-d0c23bb1e2ac" + "WESTUS2:20240321T230431Z:a58fe577-6506-414f-8eb5-41e8b9478519" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -2008,59 +1754,14 @@ "X-Content-Type-Options": [ "nosniff" ], - "Date": [ - "Fri, 16 Jun 2023 07:35:54 GMT" - ], - "Expires": [ - "-1" + "X-Cache": [ + "CONFIG_NOCACHE" ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIzMDAtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJek1EQXRWMFZUVkZWVE1pSXNJbXB2WWt4dlkyRjBhVzl1SWpvaWQyVnpkSFZ6TWlKOT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "GET", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11986" - ], - "x-ms-request-id": [ - "91fe8852-41ca-459c-a7cb-71c5deb99e34" - ], - "x-ms-correlation-request-id": [ - "91fe8852-41ca-459c-a7cb-71c5deb99e34" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T073555Z:91fe8852-41ca-459c-a7cb-71c5deb99e34" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" + "X-MSEdge-Ref": [ + "Ref A: 65CCC1D55FA74DEF9BBEB036711E75ED Ref B: CO6AA3150219051 Ref C: 2024-03-21T23:04:31Z" ], "Date": [ - "Fri, 16 Jun 2023 07:35:54 GMT" + "Thu, 21 Mar 2024 23:04:30 GMT" ], "Expires": [ "-1" @@ -2075,14 +1776,14 @@ ], "Names": { "Test-CreateNewBatchAccountWithNoPublicIp": [ - "ps2825", - "ps2300" + "ps2880", + "ps1360" ] }, "Variables": { - "SubscriptionId": "21abd678-18c5-4660-9fdd-8c5ba6b6fe1f", - "AZURE_BATCH_ACCOUNT": "hoppeeastasia2", - "AZURE_BATCH_ENDPOINT": "https://hoppeeastasia2.eastasia.batch.azure.com", - "AZURE_BATCH_RESOURCE_GROUP": "123" + "SubscriptionId": "6602ac9a-5dad-41bd-a792-592c704b6a31", + "AZURE_BATCH_ACCOUNT": "billstestba24326", + "AZURE_BATCH_ENDPOINT": "https://billstestba24326.uksouth.batch.azure.com", + "AZURE_BATCH_RESOURCE_GROUP": "automation" } } \ No newline at end of file diff --git a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestCreateNewBatchAccountWithSystemIdentity.json b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestCreateNewBatchAccountWithSystemIdentity.json index 13927a65d80e..9110958582ee 100644 --- a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestCreateNewBatchAccountWithSystemIdentity.json +++ b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestCreateNewBatchAccountWithSystemIdentity.json @@ -1,21 +1,21 @@ { "Entries": [ { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/providers/Microsoft.Batch?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Byb3ZpZGVycy9NaWNyb3NvZnQuQmF0Y2g/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/providers/Microsoft.Batch?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQmF0Y2g/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", "RequestMethod": "GET", "RequestHeaders": { "x-ms-client-request-id": [ - "9934fc40-dcb3-462b-bcf0-e541cd9b69f4" + "3b9e0ba7-e6a1-4cd7-b105-48305fd6b88b" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" ] }, "RequestBody": "", @@ -30,13 +30,13 @@ "11999" ], "x-ms-request-id": [ - "acfdd371-efe5-4d2d-aa29-e3234733e72c" + "a09eca42-f140-4088-986e-a305bc2661c8" ], "x-ms-correlation-request-id": [ - "acfdd371-efe5-4d2d-aa29-e3234733e72c" + "a09eca42-f140-4088-986e-a305bc2661c8" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072933Z:acfdd371-efe5-4d2d-aa29-e3234733e72c" + "WESTUS2:20240321T230035Z:a09eca42-f140-4088-986e-a305bc2661c8" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -44,38 +44,44 @@ "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 2257DF716FB34E3AAFF24F1A89461230 Ref B: CO6AA3150220053 Ref C: 2024-03-21T23:00:35Z" + ], "Date": [ - "Fri, 16 Jun 2023 07:29:32 GMT" + "Thu, 21 Mar 2024 23:00:34 GMT" + ], + "Content-Length": [ + "14538" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" - ], - "Content-Length": [ - "9611" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"authorization\": {\r\n \"applicationId\": \"ddbf3205-c6bd-46ae-8127-60eb93363864\",\r\n \"roleDefinitionId\": \"b7f84953-1d03-4eab-9ea4-45f065258ff8\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\",\r\n \"2017-01-01\",\r\n \"2015-12-01\",\r\n \"2015-09-01\",\r\n \"2015-07-01\",\r\n \"2014-05-01-privatepreview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"batchAccounts/pools\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"batchAccounts/detectors\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"batchAccounts/certificates\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\",\r\n \"2017-01-01\",\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\",\r\n \"2017-01-01\",\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\",\r\n \"2017-01-01\",\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/checkNameAvailability\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/accountOperationResults\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\",\r\n \"2017-01-01\",\r\n \"2015-12-01\",\r\n \"2015-09-01\",\r\n \"2015-07-01\",\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/virtualMachineSkus\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/cloudServiceSkus\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"authorization\": {\r\n \"applicationId\": \"ddbf3205-c6bd-46ae-8127-60eb93363864\",\r\n \"roleDefinitionId\": \"b7f84953-1d03-4eab-9ea4-45f065258ff8\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\",\r\n \"2017-01-01\",\r\n \"2015-12-01\",\r\n \"2015-09-01\",\r\n \"2015-07-01\",\r\n \"2014-05-01-privatepreview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"batchAccounts/pools\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"batchAccounts/detectors\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"batchAccounts/certificates\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"batchAccounts/operationResults\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\",\r\n \"2017-01-01\",\r\n \"2015-12-01\",\r\n \"2015-09-01\",\r\n \"2015-07-01\",\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"batchAccounts/poolOperationResults\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"batchAccounts/certificateOperationResults\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"batchAccounts/privateEndpointConnectionProxyResults\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"batchAccounts/privateEndpointConnectionResults\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\",\r\n \"2017-01-01\",\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\",\r\n \"2017-01-01\",\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\",\r\n \"2017-01-01\",\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/checkNameAvailability\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/accountOperationResults\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\",\r\n \"2017-01-01\",\r\n \"2015-12-01\",\r\n \"2015-09-01\",\r\n \"2015-07-01\",\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/virtualMachineSkus\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/cloudServiceSkus\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourcegroups/ps2216?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlZ3JvdXBzL3BzMjIxNj9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourcegroups/ps9747?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlZ3JvdXBzL3BzOTc0Nz9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", "RequestMethod": "PUT", "RequestHeaders": { "x-ms-client-request-id": [ - "8d81131d-e34b-4a56-ad01-f84aaa039a9f" + "75029dec-a47b-45a9-9f0e-de2d2480ec7e" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" ], "Content-Type": [ "application/json; charset=utf-8" @@ -96,13 +102,13 @@ "1199" ], "x-ms-request-id": [ - "5b09e04b-5773-4c80-9207-545d869e60b1" + "f9e79ab0-1e49-48d9-9f0c-035f3802cbca" ], "x-ms-correlation-request-id": [ - "5b09e04b-5773-4c80-9207-545d869e60b1" + "f9e79ab0-1e49-48d9-9f0c-035f3802cbca" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072936Z:5b09e04b-5773-4c80-9207-545d869e60b1" + "WESTUS2:20240321T230035Z:f9e79ab0-1e49-48d9-9f0c-035f3802cbca" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -110,8 +116,14 @@ "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 90848546143D4C02AF00CBD5723713D6 Ref B: CO6AA3150220053 Ref C: 2024-03-21T23:00:35Z" + ], "Date": [ - "Fri, 16 Jun 2023 07:29:35 GMT" + "Thu, 21 Mar 2024 23:00:34 GMT" ], "Content-Length": [ "166" @@ -123,24 +135,24 @@ "-1" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2216\",\r\n \"name\": \"ps2216\",\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps9747\",\r\n \"name\": \"ps9747\",\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", "StatusCode": 201 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2216/providers/Microsoft.Batch/batchAccounts/ps7122?api-version=2022-10-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzL3BzMjIxNi9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvcHM3MTIyP2FwaS12ZXJzaW9uPTIwMjItMTAtMDE=", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps9747/providers/Microsoft.Batch/batchAccounts/ps6994?api-version=2022-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL3BzOTc0Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvcHM2OTk0P2FwaS12ZXJzaW9uPTIwMjItMTAtMDE=", "RequestMethod": "PUT", "RequestHeaders": { "x-ms-client-request-id": [ - "44d90803-3256-41a3-a826-1d2a94b3258b" + "03143a67-8cb7-411f-9817-aed7fe8fb432" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Batch.BatchManagementClient/14.2.0.0" ], "Content-Type": [ @@ -159,13 +171,13 @@ "no-cache" ], "Location": [ - "https://management.azure.com/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2216/providers/Microsoft.Batch/batchAccounts/ps7122/operationResults/ca9fcfc5-d752-4115-84c3-ab4d3eb9325a?api-version=2022-10-01" + "https://management.azure.com/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps9747/providers/Microsoft.Batch/batchAccounts/ps6994/operationResults/6d50409a-218c-480d-ae1c-3a9ef7da1d93?api-version=2022-10-01&t=638466588370734108&c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOVFiSMi9Sg6cKnrBuPHbDk_Zwa1ZNYHwLVPJArEI9N2bLrgd1mU0ZdNVcdf6rtZCkUUuCe3vxnVTGwufpwH9GPWDgJOpJoL9wgKOzUDiHLUeiWPjrK1AoaQVprZgjnzXBIWiZC2tZjbUT9pOI_ixYJJPrsCfLt7HEccnhObROE1mo_hpiPDrtOQDaX-BboNceB8vI1wmSPApGpPRM9hBRQbXgqKFC8094UNsMVkWPCrsPvP5YlMBLARlGf2WTevGKRREjstkApf1Swi7uKnpyhhsidD1yREMU0mWY9wnZfAX0jpEp3p9jKVMPQ3L-m-nSZI4zrtbW0AnI0O3pAEwe0CAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQC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UyMENBJTIwMDUuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBADNBZjhX44bpBtC8kogZJGe4lYeHX95whfZ7X_CMSUuZRbQQ_b6raUpp8V8eF0YUa9b3Oa-DGrs5WfzogCuGcJPeoEVnDYzc1jlKubSIpGw73aGZzhbTjJeNf-Qe-5vTG-GcNzVtIcrwi93YSiK2LSbgrLpTL7T7znjePcGRRkCBjAslrV5SqufcsrpGmqvPAVKXRV-OIOzvXy6qmn9CHmdo0RGBXGIakbLMec_1SIS8NdPsB6i6XPjL2SDjqKTa5car7bVYlXEVsgL-000VF1t6x1II3VBNfsEJ81CdJyxaCJnwvWI6kHtCtJX9QYK3qZab9PfZRBvcetJoPdMFvBU&s=3K0n4FFxP48yKOHdhltI3oQojbGTHclz2w1SEPPMhruS_jSnQ8KAks8sulRU4u11Xh3yQpykOdSSEz17sHOccmm6RNdy1q3yXEwm6oznPH8x6EUeWypxE5WY36kp5ZsijmfmyKeHJh-oaw-ib8NPNy2q22t4YRBpmQAAZehPXhP99KecmdoONMGxbikgSKPEsPXhjItQenNA7F4Ke115s7puLR6oLoHJtEXOqfSyh6ilWEtYm849F8Oa-38WbpfwoImTtKiqtVceQF9bF0--KoqFoG3IJ_jmaPkr3QKVtUxBjT6u5lSCvB1IlmMjXGktAUzmzeJVRsXXkGw0MMzXsQ&h=IzmQcD4kraBsCQava87Ne9_LM9V0vzni96ZwAqADWLU" ], "Retry-After": [ "15" ], "x-ms-request-id": [ - "ca9fcfc5-d752-4115-84c3-ab4d3eb9325a" + "6d50409a-218c-480d-ae1c-3a9ef7da1d93" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -173,20 +185,23 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], "x-ms-correlation-request-id": [ - "70a6f9a5-883e-45e7-86d3-288a8f83a135" + "5076f68d-a762-4616-83c8-b3618c40c37a" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072944Z:70a6f9a5-883e-45e7-86d3-288a8f83a135" + "WESTUS2:20240321T230037Z:5076f68d-a762-4616-83c8-b3618c40c37a" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: DA915692C588407291D1A5AF4C7ED7A4 Ref B: CO6AA3150217051 Ref C: 2024-03-21T23:00:35Z" ], "Date": [ - "Fri, 16 Jun 2023 07:29:43 GMT" + "Thu, 21 Mar 2024 23:00:36 GMT" ], "Expires": [ "-1" @@ -199,17 +214,17 @@ "StatusCode": 202 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2216/providers/Microsoft.Batch/batchAccounts/ps7122/operationResults/ca9fcfc5-d752-4115-84c3-ab4d3eb9325a?api-version=2022-10-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzL3BzMjIxNi9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvcHM3MTIyL29wZXJhdGlvblJlc3VsdHMvY2E5ZmNmYzUtZDc1Mi00MTE1LTg0YzMtYWI0ZDNlYjkzMjVhP2FwaS12ZXJzaW9uPTIwMjItMTAtMDE=", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps9747/providers/Microsoft.Batch/batchAccounts/ps6994/operationResults/6d50409a-218c-480d-ae1c-3a9ef7da1d93?api-version=2022-10-01&t=638466588370734108&c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BA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tNlJOZHkxcTN5WEV3bTZvem5QSDh4NkVVZVd5cHhFNVdZMzZrcDVac2lqbWZteUtlSEpoLW9hdy1pYjhOUE55MnEyMnQ0WVJCcG1RQUFaZWhQWGhQOTlLZWNtZG9PTk1HeGJpa2dTS1BFc1BYaGpJdFFlbk5BN0Y0S2UxMTVzN3B1TFI2b0xvSEp0RVhPcWZTeWg2aWxXRXRZbTg0OUY4T2EtMzhXYnBmd29JbVR0S2lxdFZjZVFGOWJGMC0tS29xRm9HM0lKX2ptYVBrcjNRS1Z0VXhCalQ2dTVsU0N2QjFJbG1NalhHa3RBVXptemVKVlJzWFhrR3cwTU16WHNRJmg9SXptUWNENGtyYUJzQ1FhdmE4N05lOV9MTTlWMHZ6bmk5Nlp3QXFBRFdMVQ==", "RequestMethod": "GET", "RequestHeaders": { "x-ms-client-request-id": [ - "44d90803-3256-41a3-a826-1d2a94b3258b" + "03143a67-8cb7-411f-9817-aed7fe8fb432" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Batch.BatchManagementClient/14.2.0.0" ] }, @@ -222,13 +237,10 @@ "no-cache" ], "ETag": [ - "\"0x8DB6E3B7DD88BAB\"" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" + "\"0x8DC49FAC1D2760D\"" ], "x-ms-request-id": [ - "b7c7e7d2-1c46-4bb9-9ef1-4779366044a8" + "29f6f88d-009e-427e-bc5f-fe7dd216c840" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -236,20 +248,26 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" ], "x-ms-correlation-request-id": [ - "dd54a4a5-6db5-469c-b0f8-4a698bdcac91" + "2e5b9ec7-755c-48dd-9e07-42d135b7417e" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072959Z:dd54a4a5-6db5-469c-b0f8-4a698bdcac91" + "WESTUS2:20240321T230052Z:2e5b9ec7-755c-48dd-9e07-42d135b7417e" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 9CCCC6E549CF445EA116B5E8D539757E Ref B: CO6AA3150217051 Ref C: 2024-03-21T23:00:52Z" ], "Date": [ - "Fri, 16 Jun 2023 07:29:59 GMT" + "Thu, 21 Mar 2024 23:00:51 GMT" ], "Content-Length": [ - "3776" + "3880" ], "Content-Type": [ "application/json; charset=utf-8" @@ -258,28 +276,28 @@ "-1" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:29:59 GMT" + "Thu, 21 Mar 2024 23:00:52 GMT" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/ps2216/providers/Microsoft.Batch/batchAccounts/ps7122\",\r\n \"name\": \"ps7122\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"ps7122.westus2.batch.azure.com\",\r\n \"nodeManagementEndpoint\": \"81c3d72d-bc59-48d3-a4f0-48275a18c182.westus2.service.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"dedicatedCoreQuota\": 0,\r\n \"dedicatedCoreQuotaPerVMFamily\": [\r\n {\r\n \"name\": \"standardAv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardESv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardA0_A7Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardA8_A11Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardGFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"basicAFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardMSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardGSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNDSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHCSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBrsv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDAv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDASv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEAv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEASv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardMSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEIv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"Standard NCASv3_T4 Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardXEIDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"Standard NDASv4_A100 Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDCSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNPSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFXMDVSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCADSA100v4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDADSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEADSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"StandardNVADSA10v5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEBDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHXFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLASv3Family\",\r\n \"coreQuota\": 0\r\n }\r\n ],\r\n \"dedicatedCoreQuotaPerVMFamilyEnforced\": true,\r\n \"lowPriorityCoreQuota\": 0,\r\n \"poolQuota\": 100,\r\n \"activeJobAndJobScheduleQuota\": 300,\r\n \"poolAllocationMode\": \"BatchService\",\r\n \"publicNetworkAccess\": \"Enabled\",\r\n \"privateEndpointConnections\": [],\r\n \"encryption\": {\r\n \"keySource\": \"Microsoft.Batch\"\r\n },\r\n \"allowedAuthenticationModes\": [\r\n \"SharedKey\",\r\n \"AAD\",\r\n \"TaskAuthenticationToken\"\r\n ]\r\n },\r\n \"identity\": {\r\n \"principalId\": \"72395c4c-8ce8-4f70-8b87-b09c7f660453\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/ps9747/providers/Microsoft.Batch/batchAccounts/ps6994\",\r\n \"name\": \"ps6994\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"ps6994.westus2.batch.azure.com\",\r\n \"nodeManagementEndpoint\": \"358aa26d-e95c-41d7-9915-6369ceebca51.westus2.service.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"dedicatedCoreQuota\": 0,\r\n \"dedicatedCoreQuotaPerVMFamily\": [\r\n {\r\n \"name\": \"standardAv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardESv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardA0_A7Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardA8_A11Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardGFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"basicAFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHPromoFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardMSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardGSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNDSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHCSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBrsv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDAv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDASv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEAv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEASv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardMSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEIv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNVSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"Standard NCASv3_T4 Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardXEIDSv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"Standard NDASv4_A100 Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standard NDAMSv4_A100Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDCSv2Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNPSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardFXMDVSFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNCADSA100v4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardDADSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEADSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"StandardNVADSA10v5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardEBDSv5Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHBv4Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardHXFamily\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLSv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardLASv3Family\",\r\n \"coreQuota\": 0\r\n },\r\n {\r\n \"name\": \"standardNGADSV620v1Family\",\r\n \"coreQuota\": 0\r\n }\r\n ],\r\n \"dedicatedCoreQuotaPerVMFamilyEnforced\": true,\r\n \"lowPriorityCoreQuota\": 0,\r\n \"poolQuota\": 100,\r\n \"activeJobAndJobScheduleQuota\": 300,\r\n \"poolAllocationMode\": \"BatchService\",\r\n \"publicNetworkAccess\": \"Enabled\",\r\n \"privateEndpointConnections\": [],\r\n \"encryption\": {\r\n \"keySource\": \"Microsoft.Batch\"\r\n },\r\n \"allowedAuthenticationModes\": [\r\n \"SharedKey\",\r\n \"AAD\",\r\n \"TaskAuthenticationToken\"\r\n ]\r\n },\r\n \"identity\": {\r\n \"principalId\": \"01395d47-83ea-492f-8509-da665f9b1ffc\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourcegroups/ps2216?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlZ3JvdXBzL3BzMjIxNj9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourcegroups/ps9747?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlZ3JvdXBzL3BzOTc0Nz9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", "RequestMethod": "DELETE", "RequestHeaders": { "x-ms-client-request-id": [ - "758871bc-bc98-4c0f-9857-def039c8b9df" + "3dd31a79-c1cd-41c2-beec-b6795c966ccb" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" ] }, "RequestBody": "", @@ -291,7 +309,7 @@ "no-cache" ], "Location": [ - "https://management.azure.com/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIyMTYtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01" + "https://management.azure.com/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzk3NDctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01&t=638466588524773560&c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMx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L2SDjqKTa5car7bVYlXEVsgL-000VF1t6x1II3VBNfsEJ81CdJyxaCJnwvWI6kHtCtJX9QYK3qZab9PfZRBvcetJoPdMFvBU&s=L_2h-Qjb00FN4RSSAIx1wcYUHeQQIlFnfQEtknajbnfovmKjzUBgZKcQRgvpgDsgytJeNdG85nI-hqmb-DozRWp8V3A1qky2e6SUK-kt-IS7HA_CGduSQ2jjljXzQpKD4NDd4xfFnQPJRRw2WkA1F34mm_1YaGIoDDvX7I0BsqPNyrDkXHMi3RPc1aYHwVBvj902nxynRPrjzpq3gmpfITI7kTRGbgl92i7WWy53IhDacv66tvTCdBJK5fEpXkVh3IkZ7-M3eHT9pwWYwlyrn2ItvBR3p7lR248s-f4wsNM2nWW9ye3QspTghokO48DBjZ5HQd1m_Iw4O8EtW8jSwA&h=Rq-EyuN_EFAZ6ckvtqW7UKFX0QVP9znQZhNjpFVQVv8" ], "Retry-After": [ "15" @@ -300,13 +318,13 @@ "14999" ], "x-ms-request-id": [ - "1852e5b8-741d-441e-8394-0a8babeaa502" + "9f2b5653-86b9-48d6-bf81-c41041367f99" ], "x-ms-correlation-request-id": [ - "1852e5b8-741d-441e-8394-0a8babeaa502" + "9f2b5653-86b9-48d6-bf81-c41041367f99" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T073001Z:1852e5b8-741d-441e-8394-0a8babeaa502" + "WESTUS2:20240321T230052Z:9f2b5653-86b9-48d6-bf81-c41041367f99" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -314,8 +332,14 @@ "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 11439897490A4C53913309920FF5DD9E Ref B: CO6AA3150220053 Ref C: 2024-03-21T23:00:52Z" + ], "Date": [ - "Fri, 16 Jun 2023 07:30:01 GMT" + "Thu, 21 Mar 2024 23:00:51 GMT" ], "Expires": [ "-1" @@ -328,15 +352,15 @@ "StatusCode": 202 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIyMTYtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJeU1UWXRWMFZUVkZWVE1pSXNJbXB2WWt4dlkyRjBhVzl1SWpvaWQyVnpkSFZ6TWlKOT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzk3NDctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01&t=638466588524773560&c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOVFiSMi9Sg6cKnrBuPHbDk_Zwa1ZNYHwLVPJArEI9N2bLrgd1mU0ZdNVcdf6rtZCkUUuCe3vxnVTGwufpwH9GPWDgJOpJoL9wgKOzUDiHLUe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mhOanBGVlFWdjg=", "RequestMethod": "GET", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" ] }, "RequestBody": "", @@ -348,22 +372,22 @@ "no-cache" ], "Location": [ - "https://management.azure.com/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIyMTYtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01" + "https://management.azure.com/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzk3NDctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01&t=638466588675606099&c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOVFiSMi9Sg6cKnrBuPHbDk_Zwa1ZNYHwLVPJArEI9N2bLrgd1mU0ZdNVcdf6rtZCkUUuCe3vxnVTGwufpwH9GPWDgJOpJoL9wgKOzUDiHLUeiWPjrK1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YTg0xqJyc5VWjGWmHwZuaQ0dm5d9L6f8tDtJEIWkEPCBPAx1fmpGF394NftI2k6W_H_JkLOkrq7o64e3yrxLc5qZraLvNU7CaBbkMEX_rT0HtIbMgZTN1sy0CP5pDaRkPnQkWyDojHT7-Pz5_ng&h=o3gthB9uv7_N4CavjeBZ1t9SoBVUNms65cASo_fLeUM" ], "Retry-After": [ "15" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" + "11999" ], "x-ms-request-id": [ - "2c0e7088-66ed-4060-9a09-7d22dcfccbd2" + "0b74846c-f141-4fe7-8ac9-9447eafc34cb" ], "x-ms-correlation-request-id": [ - "2c0e7088-66ed-4060-9a09-7d22dcfccbd2" + "0b74846c-f141-4fe7-8ac9-9447eafc34cb" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T073017Z:2c0e7088-66ed-4060-9a09-7d22dcfccbd2" + "WESTUS2:20240321T230107Z:0b74846c-f141-4fe7-8ac9-9447eafc34cb" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -371,8 +395,14 @@ "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 90D504E1F791434A9FAB4BDAA22D36E7 Ref B: CO6AA3150220053 Ref C: 2024-03-21T23:01:07Z" + ], "Date": [ - "Fri, 16 Jun 2023 07:30:16 GMT" + "Thu, 21 Mar 2024 23:01:06 GMT" ], "Expires": [ "-1" @@ -385,15 +415,15 @@ "StatusCode": 202 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIyMTYtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2Y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RqSmVOZi1RZS01dlRHLUdjTnpWdEljcndpOTNZU2lLMkxTYmdyTHBUTDdUN3puamVQY0dSUmtDQmpBc2xyVjVTcXVmY3NycEdtcXZQQVZLWFJWLU9JT3p2WHk2cW1uOUNIbWRvMFJHQlhHSWFrYkxNZWNfMVNJUzhOZFBzQjZpNlhQakwyU0RqcUtUYTVjYXI3YlZZbFhFVnNnTC0wMDBWRjF0NngxSUkzVkJOZnNFSjgxQ2RKeXhhQ0pud3ZXSTZrSHRDdEpYOVFZSzNxWmFiOVBmWlJCdmNldEpvUGRNRnZCVSZzPVVPU0RCLU9aWkxYMjM0SlRMVk5WTkkxMEFxeV9WSU9DWmtqYVNJM0RoMDl6LVZtano1SlZFUkM4WDVDdEJsMy1uWnJ4SlhjTEpYa21xcE9tZ3kzNHZKUjB6U01UalF4WnU4c3YzcHB0em41eGJBU1lHOUpCVjcxTFBrZUZVeDdKbE5ZanY4WExPSm1pV0E3bExiMzBxY2FocTFUOTlmRjg1LTZXb0U2OTJ3OG5ma1VaMzNqdXBJQTMxejZQM3RZX3VCVFlUZzB4cUp5YzVWV2pHV21Id1p1YVEwZG01ZDlMNmY4dER0SkVJV2tFUENCUEF4MWZtcEdGMzk0TmZ0STJrNldfSF9Ka0xPa3JxN282NGUzeXJ4TGM1cVpyYUx2TlU3Q2FCYmtNRVhfclQwSHRJYk1nWlROMXN5MENQNXBEYVJrUG5Ra1d5RG9qSFQ3LVB6NV9uZyZoPW8zZ3RoQjl1djdfTjRDYXZqZUJaMXQ5U29CVlVObXM2NWNBU29fZkxlVU0=", "RequestMethod": "GET", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" ] }, "RequestBody": "", @@ -405,22 +435,22 @@ "no-cache" ], "Location": [ - "https://management.azure.com/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIyMTYtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01" + "https://management.azure.com/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzk3NDctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01&t=638466588826525453&c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOVFiSMi9Sg6cKnrBuPHbDk_Zwa1ZNYHwLVPJArEI9N2bLrgd1mU0ZdNVcdf6rtZCkUUuCe3vxnVTGwufpwH9GPWDgJOpJoL9wgKOzUDiHLUeiWPjrK1AoaQVprZgjnzXBIWiZC2tZjbUT9pOI_ixYJJPrsCfLt7HEccnhObROE1mo_hpiPDrtOQDaX-BboNceB8vI1wmSPApGpPRM9hBRQbXgqKFC8094UNsMVkWPCrsPvP5YlMBLARlGf2WTevGKRREjstkApf1Swi7uKnpyhhsidD1yREMU0mWY9wnZfAX0jpEp3p9jKVMPQ3L-m-nSZI4zrtbW0AnI0O3pAEwe0CAwEAAaOCA-0wggPpMCcGC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ads": [ - "11997" + "11999" ], "x-ms-request-id": [ - "c9d7f518-46de-4ce2-a4df-abe4bdd88c2e" + "95d8d35c-0fd7-443f-924b-c6e94c92a2d9" ], "x-ms-correlation-request-id": [ - "c9d7f518-46de-4ce2-a4df-abe4bdd88c2e" + "95d8d35c-0fd7-443f-924b-c6e94c92a2d9" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T073032Z:c9d7f518-46de-4ce2-a4df-abe4bdd88c2e" + "WESTUS2:20240321T230122Z:95d8d35c-0fd7-443f-924b-c6e94c92a2d9" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -428,8 +458,14 @@ "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: FA79BDB4F9664E90B78760FAE4091614 Ref B: CO6AA3150220053 Ref C: 2024-03-21T23:01:22Z" + ], "Date": [ - "Fri, 16 Jun 2023 07:30:32 GMT" + "Thu, 21 Mar 2024 23:01:21 GMT" ], "Expires": [ "-1" @@ -442,15 +478,15 @@ "StatusCode": 202 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIyMTYtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJeU1UWXRWMFZUVkZWVE1pSXNJbXB2WWt4dlkyRjBhVzl1SWpvaWQyVnpkSFZ6TWlKOT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", + "RequestUri": "/subscriptions/6602ac9a-5dad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0NngxSUkzVkJOZnNFSjgxQ2RKeXhhQ0pud3ZXSTZrSHRDdEpYOVFZSzNxWmFiOVBmWlJCdmNldEpvUGRNRnZCVSZzPVZPS1BiYzdoVTlUVmhZSWVTcmRXVDFtQnZxQ1VsajZ5dFR1bXJUN0JIbTRnZVZyb2MyU182WktmRjNiYUNJeFBRN1R2ZmpBcnF3SjBiRFl2THJRV2dTRmFNSE12M0dGQkVKcElibHVsODMweXhlVlVBbk5meGtoUzdCWVlIdlh3dHE2UVlOMnFqZkxUZERQSWFfUVd2Ul9HeXpIWEstUDVyZzJfVHlqTjUxNUppOEVhLTd2UkVNbWlfUjFuUWJwT0ZWYnFMbXU5QlVtaDZxX3NJSElIRnhodjJHWjJjUzd5T2x5WTN4LVFCRGw1bUR6LXR5RV9qc1VJa19kSUJnTjlRN0lxeXRtZ1hYZV9hZ2RoanJhTjVzVTJXS0NGVmhUYXFmaXNvRks5VEhwdDA4aDRlU2VHRERBUkJnOHRaSlZvWkExV1FOaFlwTTFzanJkYldtNFljZyZoPWxhYndjSHhMSDZBUFMyQnNTMmRiVlVKTl90LXI3dkRiNlpROWxNZmNfLTQ=", "RequestMethod": "GET", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" ] }, "RequestBody": "", @@ -462,22 +498,22 @@ "no-cache" ], "Location": [ - "https://management.azure.com/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIyMTYtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01" + "https://management.azure.com/subscriptions/6602ac9a-5dad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BUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBADNBZjhX44bpBtC8kogZJGe4lYeHX95whfZ7X_CMSUuZRbQQ_b6raUpp8V8eF0YUa9b3Oa-DGrs5WfzogCuGcJPeoEVnDYzc1jlKubSIpGw73aGZzhbTjJeNf-Qe-5vTG-GcNzVtIcrwi93YSiK2LSbgrLpTL7T7znjePcGRRkCBjAslrV5SqufcsrpGmqvPAVKXRV-OIOzvXy6qmn9CHmdo0RGBXGIakbLMec_1SIS8NdPsB6i6XPjL2SDjqKTa5car7bVYlXEVsgL-000VF1t6x1II3VBNfsEJ81CdJyxaCJnwvWI6kHtCtJX9QYK3qZab9PfZRBvcetJoPdMFvBU&s=lOQ_ppDnHkNzxbZEM4GpSJmaGF6UtEHkt4TmA8XwH9I1WWzxk4kWTUIWmY6jf0bZ7DlqC_90qIP3JgvHcq0gpp8Ewkc01wd2P2xQmVZAUCbiRWrCkp6x28YuynCa1DvUCMRpdo171k1obQP4WB7I0L8yc2dK3WAZXza6c-1KHm4hP2tir7OOFrzb9BJY50zXYVpfrdsKLafXwBMsR6zDWKeYpe9U3WRNMPrOMXHcW32zlVILfHq_NGtz9s3ihfm78CfiYZ6w66K6WOIN_aF-_JKp_EyvvQ8HzEHQ-GmBm_ERiCnSulGHP73qQ1x9C0D54vpVlOeOyIwmAUvu0xajAg&h=C1ix8TSIakLDbHErQQllclUbohKuBqZPUKrOTh0eHfM" ], "Retry-After": [ "15" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" + "11999" ], "x-ms-request-id": [ - "8cd2e239-389d-4ae5-b563-8fa403f168e1" + "0c971797-ec57-4847-89df-dcc16948cea2" ], "x-ms-correlation-request-id": [ - "8cd2e239-389d-4ae5-b563-8fa403f168e1" + "0c971797-ec57-4847-89df-dcc16948cea2" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T073048Z:8cd2e239-389d-4ae5-b563-8fa403f168e1" + "WESTUS2:20240321T230137Z:0c971797-ec57-4847-89df-dcc16948cea2" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -485,8 +521,14 @@ "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 557D3DF6784A47CEB6C52F35498D2279 Ref B: CO6AA3150220053 Ref C: 2024-03-21T23:01:37Z" + ], "Date": [ - "Fri, 16 Jun 2023 07:30:47 GMT" + "Thu, 21 Mar 2024 23:01:36 GMT" ], "Expires": [ "-1" @@ -499,15 +541,15 @@ "StatusCode": 202 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIyMTYtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJeU1UWXRWMFZUVkZWVE1pSXNJbXB2WWt4dlkyRjBhVzl1SWpvaWQyVnpkSFZ6TWlKOT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzk3NDctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01&t=638466588977111443&c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyL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XluQ2ExRHZVQ01ScGRvMTcxazFvYlFQNFdCN0kwTDh5YzJkSzNXQVpYemE2Yy0xS0htNGhQMnRpcjdPT0ZyemI5QkpZNTB6WFlWcGZyZHNLTGFmWHdCTXNSNnpEV0tlWXBlOVUzV1JOTVByT01YSGNXMzJ6bFZJTGZIcV9OR3R6OXMzaWhmbTc4Q2ZpWVo2dzY2SzZXT0lOX2FGLV9KS3BfRXl2dlE4SHpFSFEtR21CbV9FUmlDblN1bEdIUDczcVExeDlDMEQ1NHZwVmxPZU95SXdtQVV2dTB4YWpBZyZoPUMxaXg4VFNJYWtMRGJIRXJRUWxsY2xVYm9oS3VCcVpQVUtyT1RoMGVIZk0=", "RequestMethod": "GET", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" ] }, "RequestBody": "", @@ -519,22 +561,22 @@ "no-cache" ], "Location": [ - "https://management.azure.com/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIyMTYtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01" + "https://management.azure.com/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzk3NDctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01&t=638466589127911275&c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKC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V5SqufcsrpGmqvPAVKXRV-OIOzvXy6qmn9CHmdo0RGBXGIakbLMec_1SIS8NdPsB6i6XPjL2SDjqKTa5car7bVYlXEVsgL-000VF1t6x1II3VBNfsEJ81CdJyxaCJnwvWI6kHtCtJX9QYK3qZab9PfZRBvcetJoPdMFvBU&s=S_uqe3LDeJFyca9elMsZI4w7eG8a8o1U0MW3zYKtPQYkxDRQXjDPXNozRg0y4jR2-WV0RkYO_cRRCZMPF5nXVuByYKH5B4B6cn3q-jUsHvp-9_1EZ6zI2lAMH3w6S0LVdpPHArhIQUc_tx0UOBlAIJMUW5lqtWMHNnfutW5jyanYuA23iacU-nWryll6-B83Qj4OKENHJyNrh9kj5A58t3SRuvpR47rtvmDYPzbHAs-0hOsHUKEA7H7wiEi8p6UY2XH2rKECkVIRTsiEFscdlo6AjC1_uuo1HcqPEf6453n57WdxYqti7IOBzwHU02_pI0Fcvj_KlOY_zu5qev9xwA&h=7x8IUNlzedH6CBhySC4fyEBPYQY4MvYtXqRTa9nRJa8" ], "Retry-After": [ "15" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" + "11999" ], "x-ms-request-id": [ - "8e23af6a-2b79-48c4-8013-63eeee9bbe37" + "5a88a2ba-96cd-4b6d-bce1-7bd7f4d57434" ], "x-ms-correlation-request-id": [ - "8e23af6a-2b79-48c4-8013-63eeee9bbe37" + "5a88a2ba-96cd-4b6d-bce1-7bd7f4d57434" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T073103Z:8e23af6a-2b79-48c4-8013-63eeee9bbe37" + "WESTUS2:20240321T230152Z:5a88a2ba-96cd-4b6d-bce1-7bd7f4d57434" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -542,8 +584,14 @@ "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: B0FFE2455BF249BC8661B6F4294F8653 Ref B: CO6AA3150220053 Ref C: 2024-03-21T23:01:52Z" + ], "Date": [ - "Fri, 16 Jun 2023 07:31:02 GMT" + "Thu, 21 Mar 2024 23:01:51 GMT" ], "Expires": [ "-1" @@ -556,15 +604,15 @@ "StatusCode": 202 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIyMTYtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJeU1UWXRWMFZUVkZWVE1pSXNJbXB2WWt4dlkyRjBhVzl1SWpvaWQyVnpkSFZ6TWlKOT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzk3NDctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01&t=638466589127911275&c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAO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NTNuNTdXZHhZcXRpN0lPQnp3SFUwMl9wSTBGY3ZqX0tsT1lfenU1cWV2OXh3QSZoPTd4OElVTmx6ZWRINkNCaHlTQzRmeUVCUFlRWTRNdll0WHFSVGE5blJKYTg=", "RequestMethod": "GET", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" ] }, "RequestBody": "", @@ -576,16 +624,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" + "11999" ], "x-ms-request-id": [ - "c9afe245-6711-436a-8bc9-9d10dddd183e" + "fd802d5e-4032-4da1-84a4-90444bf32908" ], "x-ms-correlation-request-id": [ - "c9afe245-6711-436a-8bc9-9d10dddd183e" + "fd802d5e-4032-4da1-84a4-90444bf32908" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T073118Z:c9afe245-6711-436a-8bc9-9d10dddd183e" + "WESTUS2:20240321T230207Z:fd802d5e-4032-4da1-84a4-90444bf32908" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -593,8 +641,14 @@ "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 8D6F95ACD8654E24946CFE4AC6C97C6A Ref B: CO6AA3150220053 Ref C: 2024-03-21T23:02:07Z" + ], "Date": [ - "Fri, 16 Jun 2023 07:31:18 GMT" + "Thu, 21 Mar 2024 23:02:07 GMT" ], "Expires": [ "-1" @@ -607,15 +661,15 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIyMTYtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJeU1UWXRWMFZUVkZWVE1pSXNJbXB2WWt4dlkyRjBhVzl1SWpvaWQyVnpkSFZ6TWlKOT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzk3NDctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01&t=638466589127911275&c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOVFiSMi9Sg6cKnrBuPHbDk_Zwa1ZNYHwLVPJArEI9N2bLrgd1mU0ZdNVcdf6rtZCkUUuCe3vxnVTGwufpwH9GPWDgJOpJoL9wgKOzUDiHLUeiWPjrK1AoaQVprZgjnzXBIWiZC2tZjbUT9pOI_ixYJJPrsCfLt7HEccnhObROE1mo_hpiPDrtOQDaX-BboNceB8vI1wmSPApGpP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Version/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" ] }, "RequestBody": "", @@ -627,16 +681,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" + "11999" ], "x-ms-request-id": [ - "0af88cc9-3dd2-408d-80ca-40da4f5863c5" + "9f099aba-3a31-445e-9934-621395d38160" ], "x-ms-correlation-request-id": [ - "0af88cc9-3dd2-408d-80ca-40da4f5863c5" + "9f099aba-3a31-445e-9934-621395d38160" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T073119Z:0af88cc9-3dd2-408d-80ca-40da4f5863c5" + "WESTUS2:20240321T230207Z:9f099aba-3a31-445e-9934-621395d38160" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -644,8 +698,14 @@ "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: E6EDB4A9C96B4C82A9A6FD95798B0C3E Ref B: CO6AA3150220053 Ref C: 2024-03-21T23:02:07Z" + ], "Date": [ - "Fri, 16 Jun 2023 07:31:19 GMT" + "Thu, 21 Mar 2024 23:02:07 GMT" ], "Expires": [ "-1" @@ -660,14 +720,14 @@ ], "Names": { "Test-CreateNewBatchAccountWithSystemIdentity": [ - "ps7122", - "ps2216" + "ps6994", + "ps9747" ] }, "Variables": { - "SubscriptionId": "21abd678-18c5-4660-9fdd-8c5ba6b6fe1f", - "AZURE_BATCH_ACCOUNT": "hoppeeastasia2", - "AZURE_BATCH_ENDPOINT": "https://hoppeeastasia2.eastasia.batch.azure.com", - "AZURE_BATCH_RESOURCE_GROUP": "123" + "SubscriptionId": "6602ac9a-5dad-41bd-a792-592c704b6a31", + "AZURE_BATCH_ACCOUNT": "billstestba24326", + "AZURE_BATCH_ENDPOINT": "https://billstestba24326.uksouth.batch.azure.com", + "AZURE_BATCH_RESOURCE_GROUP": "automation" } } \ No newline at end of file diff --git a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestGetBatchSupportedImages.json b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestGetBatchSupportedImages.json index a8b6dbd08039..6118e661af3b 100644 --- a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestGetBatchSupportedImages.json +++ b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestGetBatchSupportedImages.json @@ -1,27 +1,27 @@ { "Entries": [ { - "RequestUri": "/supportedimages?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3N1cHBvcnRlZGltYWdlcz9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjA=", + "RequestUri": "/supportedimages?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3N1cHBvcnRlZGltYWdlcz9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "b82635f6-ef44-404e-822c-c35d49d4d2b8" + "09e5b573-f04e-436f-b149-3b8ce4bc744b" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:27:15 GMT" + "Thu, 21 Mar 2024 23:00:31 GMT" ], "x-ms-client-request-id": [ - "1f2f09d4-8912-45cb-8bad-c696c0898e7a" + "6cad8654-221e-4f3e-aebf-071896a94459" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -34,7 +34,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "6a482eab-96c8-4d52-a256-147fdb176373" + "e617d511-a7a2-4018-86a1-3b2d4c0b0df1" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -46,21 +46,21 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:27:16 GMT" + "Thu, 21 Mar 2024 23:00:32 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#supportedimages\",\r\n \"value\": [\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"almalinux\",\r\n \"offer\": \"almalinux\",\r\n \"sku\": \"8_4\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.el 8\",\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"almalinux\",\r\n \"offer\": \"almalinux\",\r\n \"sku\": \"8_4-gen2\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.el 8\",\r\n \"capabilities\": [\r\n \"Generation2VMImage\"\r\n ],\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"almalinux\",\r\n \"offer\": \"almalinux\",\r\n \"sku\": \"8_5\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.el 8\",\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"almalinux\",\r\n \"offer\": \"almalinux\",\r\n \"sku\": \"8_5-gen2\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.el 8\",\r\n \"capabilities\": [\r\n \"Generation2VMImage\"\r\n ],\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"almalinux\",\r\n \"offer\": \"almalinux\",\r\n \"sku\": \"9-gen1\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.el 9\",\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"almalinux\",\r\n \"offer\": \"almalinux\",\r\n \"sku\": \"9-gen2\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.el 9\",\r\n \"capabilities\": [\r\n \"Generation2VMImage\"\r\n ],\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"almalinux\",\r\n \"offer\": \"almalinux-hpc\",\r\n \"sku\": \"8_5-hpc\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.el 8\",\r\n \"capabilities\": [\r\n \"SupportsRDMAOnly\",\r\n \"IntelMPIRuntimeInstalled\"\r\n ],\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"almalinux\",\r\n \"offer\": \"almalinux-hpc\",\r\n \"sku\": \"8_5-hpc-gen2\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.el 8\",\r\n \"capabilities\": [\r\n \"SupportsRDMAOnly\",\r\n \"IntelMPIRuntimeInstalled\",\r\n \"Generation2VMImage\"\r\n ],\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"batch\",\r\n \"offer\": \"rendering-centos73\",\r\n \"sku\": \"rendering\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.centos 7\",\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"batch\",\r\n \"offer\": \"rendering-windows2016\",\r\n \"sku\": \"rendering\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts-gen2\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"capabilities\": [\r\n \"Generation2VMImage\"\r\n ],\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-jammy\",\r\n \"sku\": \"22_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 22.04\",\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-jammy\",\r\n \"sku\": \"22_04-lts-gen2\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 22.04\",\r\n \"capabilities\": [\r\n \"Generation2VMImage\"\r\n ],\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"ubuntuserver\",\r\n \"sku\": \"18.04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 18.04\",\r\n \"batchSupportEndOfLife\": \"2023-05-30T00:00:00Z\",\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"ubuntuserver\",\r\n \"sku\": \"18_04-lts-gen2\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 18.04\",\r\n \"capabilities\": [\r\n \"Generation2VMImage\"\r\n ],\r\n \"batchSupportEndOfLife\": \"2023-05-30T00:00:00Z\",\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"debian\",\r\n \"offer\": \"debian-10\",\r\n \"sku\": \"10\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.debian 10\",\r\n \"batchSupportEndOfLife\": \"2022-09-30T00:00:00Z\",\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoft-azure-batch\",\r\n \"offer\": \"centos-container\",\r\n \"sku\": \"7-9\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.centos 7\",\r\n \"capabilities\": [\r\n \"DockerCompatible\",\r\n \"NvidiaTeslaDriverInstalled\",\r\n \"NvidiaGridDriverInstalled\"\r\n ],\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoft-azure-batch\",\r\n \"offer\": \"centos-container-rdma\",\r\n \"sku\": \"7-9\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.centos 7\",\r\n \"capabilities\": [\r\n \"DockerCompatible\",\r\n \"NvidiaTeslaDriverInstalled\",\r\n \"SupportsRDMAOnly\",\r\n \"IntelMPIRuntimeInstalled\"\r\n ],\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoft-azure-batch\",\r\n \"offer\": \"ubuntu-server-container\",\r\n \"sku\": \"20-04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"capabilities\": [\r\n \"DockerCompatible\",\r\n \"NvidiaTeslaDriverInstalled\",\r\n \"NvidiaGridDriverInstalled\"\r\n ],\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoft-azure-batch\",\r\n \"offer\": \"ubuntu-server-container-rdma\",\r\n \"sku\": \"20-04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"capabilities\": [\r\n \"DockerCompatible\",\r\n \"NvidiaTeslaDriverInstalled\",\r\n \"SupportsRDMAOnly\",\r\n \"IntelMPIRuntimeInstalled\"\r\n ],\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoft-dsvm\",\r\n \"offer\": \"dsvm-win-2019\",\r\n \"sku\": \"winserver-2019\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoft-dsvm\",\r\n \"offer\": \"ubuntu-1804\",\r\n \"sku\": \"1804\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 18.04\",\r\n \"capabilities\": [\r\n \"NvidiaTeslaDriverInstalled\"\r\n ],\r\n \"batchSupportEndOfLife\": \"2023-05-30T00:00:00Z\",\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoft-dsvm\",\r\n \"offer\": \"ubuntu-2004\",\r\n \"sku\": \"2004\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"capabilities\": [\r\n \"NvidiaTeslaDriverInstalled\"\r\n ],\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoft-dsvm\",\r\n \"offer\": \"ubuntu-2004\",\r\n \"sku\": \"2004-gen2\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"capabilities\": [\r\n \"NvidiaTeslaDriverInstalled\"\r\n ],\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoft-dsvm\",\r\n \"offer\": \"ubuntu-hpc\",\r\n \"sku\": \"1804\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 18.04\",\r\n \"capabilities\": [\r\n \"SupportsRDMAOnly\",\r\n \"Generation2VMImage\",\r\n \"IntelMPIRuntimeInstalled\"\r\n ],\r\n \"batchSupportEndOfLife\": \"2023-05-30T00:00:00Z\",\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoft-dsvm\",\r\n \"offer\": \"ubuntu-hpc\",\r\n \"sku\": \"2004\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"capabilities\": [\r\n \"DockerCompatible\",\r\n \"SupportsRDMAOnly\",\r\n \"Generation2VMImage\",\r\n \"IntelMPIRuntimeInstalled\"\r\n ],\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftcblmariner\",\r\n \"offer\": \"cbl-mariner\",\r\n \"sku\": \"cbl-mariner-2\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.mariner 2.0\",\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftcblmariner\",\r\n \"offer\": \"cbl-mariner\",\r\n \"sku\": \"cbl-mariner-2-gen2\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.mariner 2.0\",\r\n \"capabilities\": [\r\n \"Generation2VMImage\"\r\n ],\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2008-r2-sp1\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2008-r2-sp1-smalldisk\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2012-datacenter\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2012-datacenter-smalldisk\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2012-r2-datacenter\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2012-r2-datacenter-smalldisk\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2016-datacenter\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2016-datacenter-gensecond\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"capabilities\": [\r\n \"Generation2VMImage\"\r\n ],\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2016-datacenter-gs\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2016-datacenter-smalldisk\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2016-datacenter-smalldisk-g2\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"capabilities\": [\r\n \"Generation2VMImage\"\r\n ],\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2016-datacenter-with-containers\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"capabilities\": [\r\n \"DockerCompatible\"\r\n ],\r\n \"batchSupportEndOfLife\": \"2022-09-30T00:00:00Z\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2016-datacenter-with-containers-gs\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"capabilities\": [\r\n \"DockerCompatible\"\r\n ],\r\n \"batchSupportEndOfLife\": \"2022-09-30T00:00:00Z\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2019-datacenter\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2019-datacenter-core\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2019-datacenter-core-g2\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"capabilities\": [\r\n \"Generation2VMImage\"\r\n ],\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2019-datacenter-core-smalldisk\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2019-datacenter-core-smalldisk-g2\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"capabilities\": [\r\n \"Generation2VMImage\"\r\n ],\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2019-datacenter-core-with-containers\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"capabilities\": [\r\n \"DockerCompatible\"\r\n ],\r\n \"batchSupportEndOfLife\": \"2022-09-30T00:00:00Z\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2019-datacenter-core-with-containers-g2\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"capabilities\": [\r\n \"DockerCompatible\",\r\n \"Generation2VMImage\"\r\n ],\r\n \"batchSupportEndOfLife\": \"2022-09-30T00:00:00Z\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2019-datacenter-core-with-containers-smalldisk\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"capabilities\": [\r\n \"DockerCompatible\"\r\n ],\r\n \"batchSupportEndOfLife\": \"2022-09-30T00:00:00Z\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2019-datacenter-gensecond\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"capabilities\": [\r\n \"Generation2VMImage\"\r\n ],\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2019-datacenter-gs\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2019-datacenter-smalldisk\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2019-datacenter-smalldisk-g2\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"capabilities\": [\r\n \"Generation2VMImage\"\r\n ],\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2019-datacenter-with-containers\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"capabilities\": [\r\n \"DockerCompatible\"\r\n ],\r\n \"batchSupportEndOfLife\": \"2022-09-30T00:00:00Z\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2019-datacenter-with-containers-g2\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"capabilities\": [\r\n \"DockerCompatible\",\r\n \"Generation2VMImage\"\r\n ],\r\n \"batchSupportEndOfLife\": \"2022-09-30T00:00:00Z\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2019-datacenter-with-containers-gs\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"capabilities\": [\r\n \"DockerCompatible\"\r\n ],\r\n \"batchSupportEndOfLife\": \"2022-09-30T00:00:00Z\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2019-datacenter-with-containers-smalldisk\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"capabilities\": [\r\n \"DockerCompatible\"\r\n ],\r\n \"batchSupportEndOfLife\": \"2022-09-30T00:00:00Z\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2022-datacenter\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2022-datacenter-core\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2022-datacenter-core-g2\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"capabilities\": [\r\n \"Generation2VMImage\"\r\n ],\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2022-datacenter-core-smalldisk\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2022-datacenter-core-smalldisk-g2\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"capabilities\": [\r\n \"Generation2VMImage\"\r\n ],\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2022-datacenter-g2\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"capabilities\": [\r\n \"Generation2VMImage\"\r\n ],\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2022-datacenter-smalldisk\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2022-datacenter-smalldisk-g2\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"capabilities\": [\r\n \"Generation2VMImage\"\r\n ],\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"openlogic\",\r\n \"offer\": \"centos\",\r\n \"sku\": \"7_9\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.centos 7\",\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"openlogic\",\r\n \"offer\": \"centos\",\r\n \"sku\": \"7_9-gen2\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.centos 7\",\r\n \"capabilities\": [\r\n \"Generation2VMImage\"\r\n ],\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"openlogic\",\r\n \"offer\": \"centos-hpc\",\r\n \"sku\": \"7_9\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.centos 7\",\r\n \"capabilities\": [\r\n \"SupportsRDMAOnly\",\r\n \"IntelMPIRuntimeInstalled\"\r\n ],\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"openlogic\",\r\n \"offer\": \"centos-hpc\",\r\n \"sku\": \"7_9-gen2\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.centos 7\",\r\n \"capabilities\": [\r\n \"SupportsRDMAOnly\",\r\n \"IntelMPIRuntimeInstalled\",\r\n \"Generation2VMImage\"\r\n ],\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"oracle\",\r\n \"offer\": \"oracle-linux\",\r\n \"sku\": \"7.4\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.centos 7\",\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"oracle\",\r\n \"offer\": \"oracle-linux\",\r\n \"sku\": \"78\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.centos 7\",\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"oracle\",\r\n \"offer\": \"oracle-linux\",\r\n \"sku\": \"81\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.el 8\",\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"xilinx\",\r\n \"offer\": \"xilinx_alveo_u250_deployment_vm_centos78_032321\",\r\n \"sku\": \"xilinx_alveo_u250_deployment_vm_centos78_032321\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.centos 7\",\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"xilinx\",\r\n \"offer\": \"xilinx_alveo_u250_deployment_vm_ubuntu1804_032321\",\r\n \"sku\": \"xilinx_alveo_u250_deployment_vm_ubuntu_1804_032321\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 18.04\",\r\n \"batchSupportEndOfLife\": \"2023-05-30T00:00:00Z\",\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"xilinx\",\r\n \"offer\": \"xilinx_alveo_u250_deployment_vm_ubuntu2004_062421\",\r\n \"sku\": \"xilinx_alveo_u250_deployment_vm_ubuntu_2004_062421\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"osType\": \"linux\"\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#supportedimages\",\r\n \"value\": [\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"almalinux\",\r\n \"offer\": \"almalinux\",\r\n \"sku\": \"8-gen1\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.el 8\",\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"almalinux\",\r\n \"offer\": \"almalinux\",\r\n \"sku\": \"8-gen2\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.el 8\",\r\n \"capabilities\": [\r\n \"Generation2VMImage\"\r\n ],\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"almalinux\",\r\n \"offer\": \"almalinux\",\r\n \"sku\": \"8_5\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.el 8\",\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"almalinux\",\r\n \"offer\": \"almalinux\",\r\n \"sku\": \"8_5-gen2\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.el 8\",\r\n \"capabilities\": [\r\n \"Generation2VMImage\"\r\n ],\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"almalinux\",\r\n \"offer\": \"almalinux\",\r\n \"sku\": \"9-gen1\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.el 9\",\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"almalinux\",\r\n \"offer\": \"almalinux\",\r\n \"sku\": \"9-gen2\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.el 9\",\r\n \"capabilities\": [\r\n \"Generation2VMImage\"\r\n ],\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"almalinux\",\r\n \"offer\": \"almalinux-hpc\",\r\n \"sku\": \"8-hpc-gen1\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.el 8\",\r\n \"capabilities\": [\r\n \"SupportsRDMAOnly\",\r\n \"IntelMPIRuntimeInstalled\"\r\n ],\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"almalinux\",\r\n \"offer\": \"almalinux-hpc\",\r\n \"sku\": \"8-hpc-gen2\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.el 8\",\r\n \"capabilities\": [\r\n \"SupportsRDMAOnly\",\r\n \"IntelMPIRuntimeInstalled\",\r\n \"Generation2VMImage\"\r\n ],\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"almalinux\",\r\n \"offer\": \"almalinux-hpc\",\r\n \"sku\": \"8_5-hpc\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.el 8\",\r\n \"capabilities\": [\r\n \"SupportsRDMAOnly\",\r\n \"IntelMPIRuntimeInstalled\"\r\n ],\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"almalinux\",\r\n \"offer\": \"almalinux-hpc\",\r\n \"sku\": \"8_5-hpc-gen2\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.el 8\",\r\n \"capabilities\": [\r\n \"SupportsRDMAOnly\",\r\n \"IntelMPIRuntimeInstalled\",\r\n \"Generation2VMImage\"\r\n ],\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"almalinux\",\r\n \"offer\": \"almalinux-hpc\",\r\n \"sku\": \"8_6-hpc\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.el 8\",\r\n \"capabilities\": [\r\n \"SupportsRDMAOnly\",\r\n \"IntelMPIRuntimeInstalled\"\r\n ],\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"almalinux\",\r\n \"offer\": \"almalinux-hpc\",\r\n \"sku\": \"8_6-hpc-gen2\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.el 8\",\r\n \"capabilities\": [\r\n \"SupportsRDMAOnly\",\r\n \"IntelMPIRuntimeInstalled\",\r\n \"Generation2VMImage\"\r\n ],\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"batch\",\r\n \"offer\": \"rendering-centos73\",\r\n \"sku\": \"rendering\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.centos 7\",\r\n \"batchSupportEndOfLife\": \"2024-02-29T00:00:00Z\",\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"batch\",\r\n \"offer\": \"rendering-windows2016\",\r\n \"sku\": \"rendering\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"batchSupportEndOfLife\": \"2024-02-29T00:00:00Z\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts-gen2\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"capabilities\": [\r\n \"Generation2VMImage\"\r\n ],\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-jammy\",\r\n \"sku\": \"22_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 22.04\",\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-jammy\",\r\n \"sku\": \"22_04-lts-gen2\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 22.04\",\r\n \"capabilities\": [\r\n \"Generation2VMImage\"\r\n ],\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoft-azure-batch\",\r\n \"offer\": \"centos-container\",\r\n \"sku\": \"7-9\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.centos 7\",\r\n \"capabilities\": [\r\n \"DockerCompatible\",\r\n \"NvidiaTeslaDriverInstalled\",\r\n \"NvidiaGridDriverInstalled\"\r\n ],\r\n \"batchSupportEndOfLife\": \"2024-06-30T00:00:00Z\",\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoft-azure-batch\",\r\n \"offer\": \"centos-container-rdma\",\r\n \"sku\": \"7-9\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.centos 7\",\r\n \"capabilities\": [\r\n \"DockerCompatible\",\r\n \"NvidiaTeslaDriverInstalled\",\r\n \"SupportsRDMAOnly\",\r\n \"IntelMPIRuntimeInstalled\"\r\n ],\r\n \"batchSupportEndOfLife\": \"2024-06-30T00:00:00Z\",\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoft-azure-batch\",\r\n \"offer\": \"ubuntu-server-container\",\r\n \"sku\": \"20-04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"capabilities\": [\r\n \"DockerCompatible\",\r\n \"NvidiaTeslaDriverInstalled\",\r\n \"NvidiaGridDriverInstalled\"\r\n ],\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoft-azure-batch\",\r\n \"offer\": \"ubuntu-server-container-rdma\",\r\n \"sku\": \"20-04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"capabilities\": [\r\n \"DockerCompatible\",\r\n \"NvidiaTeslaDriverInstalled\",\r\n \"SupportsRDMAOnly\",\r\n \"IntelMPIRuntimeInstalled\"\r\n ],\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoft-dsvm\",\r\n \"offer\": \"dsvm-win-2019\",\r\n \"sku\": \"winserver-2019\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"capabilities\": [\r\n \"DockerCompatible\"\r\n ],\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoft-dsvm\",\r\n \"offer\": \"ubuntu-2004\",\r\n \"sku\": \"2004\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"capabilities\": [\r\n \"NvidiaTeslaDriverInstalled\"\r\n ],\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoft-dsvm\",\r\n \"offer\": \"ubuntu-2004\",\r\n \"sku\": \"2004-gen2\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"capabilities\": [\r\n \"NvidiaTeslaDriverInstalled\"\r\n ],\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoft-dsvm\",\r\n \"offer\": \"ubuntu-hpc\",\r\n \"sku\": \"2004\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"capabilities\": [\r\n \"DockerCompatible\",\r\n \"SupportsRDMAOnly\",\r\n \"Generation2VMImage\",\r\n \"IntelMPIRuntimeInstalled\"\r\n ],\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoft-dsvm\",\r\n \"offer\": \"ubuntu-hpc\",\r\n \"sku\": \"2204\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 22.04\",\r\n \"capabilities\": [\r\n \"DockerCompatible\",\r\n \"SupportsRDMAOnly\",\r\n \"Generation2VMImage\",\r\n \"IntelMPIRuntimeInstalled\"\r\n ],\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftcblmariner\",\r\n \"offer\": \"cbl-mariner\",\r\n \"sku\": \"cbl-mariner-2\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.mariner 2.0\",\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftcblmariner\",\r\n \"offer\": \"cbl-mariner\",\r\n \"sku\": \"cbl-mariner-2-gen2\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.mariner 2.0\",\r\n \"capabilities\": [\r\n \"Generation2VMImage\"\r\n ],\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2008-r2-sp1\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"batchSupportEndOfLife\": \"2024-01-09T00:00:00Z\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2008-r2-sp1-smalldisk\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"batchSupportEndOfLife\": \"2024-01-09T00:00:00Z\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2012-datacenter\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2012-datacenter-smalldisk\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2012-r2-datacenter\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2012-r2-datacenter-smalldisk\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2016-datacenter\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2016-datacenter-gensecond\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"capabilities\": [\r\n \"Generation2VMImage\"\r\n ],\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2016-datacenter-gs\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2016-datacenter-smalldisk\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2016-datacenter-smalldisk-g2\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"capabilities\": [\r\n \"Generation2VMImage\"\r\n ],\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2019-datacenter\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2019-datacenter-core\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2019-datacenter-core-g2\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"capabilities\": [\r\n \"Generation2VMImage\"\r\n ],\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2019-datacenter-core-smalldisk\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2019-datacenter-core-smalldisk-g2\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"capabilities\": [\r\n \"Generation2VMImage\"\r\n ],\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2019-datacenter-gensecond\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"capabilities\": [\r\n \"Generation2VMImage\"\r\n ],\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2019-datacenter-gs\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2019-datacenter-smalldisk\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2019-datacenter-smalldisk-g2\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"capabilities\": [\r\n \"Generation2VMImage\"\r\n ],\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2022-datacenter\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2022-datacenter-azure-edition\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"capabilities\": [\r\n \"Generation2VMImage\"\r\n ],\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2022-datacenter-azure-edition-smalldisk\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"capabilities\": [\r\n \"Generation2VMImage\"\r\n ],\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2022-datacenter-core\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2022-datacenter-core-g2\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"capabilities\": [\r\n \"Generation2VMImage\"\r\n ],\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2022-datacenter-core-smalldisk\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2022-datacenter-core-smalldisk-g2\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"capabilities\": [\r\n \"Generation2VMImage\"\r\n ],\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2022-datacenter-g2\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"capabilities\": [\r\n \"Generation2VMImage\"\r\n ],\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2022-datacenter-smalldisk\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoftwindowsserver\",\r\n \"offer\": \"windowsserver\",\r\n \"sku\": \"2022-datacenter-smalldisk-g2\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.windows amd64\",\r\n \"capabilities\": [\r\n \"Generation2VMImage\"\r\n ],\r\n \"osType\": \"windows\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"openlogic\",\r\n \"offer\": \"centos\",\r\n \"sku\": \"7_9\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.centos 7\",\r\n \"batchSupportEndOfLife\": \"2024-06-30T00:00:00Z\",\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"openlogic\",\r\n \"offer\": \"centos\",\r\n \"sku\": \"7_9-gen2\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"verified\",\r\n \"nodeAgentSKUId\": \"batch.node.centos 7\",\r\n \"capabilities\": [\r\n \"Generation2VMImage\"\r\n ],\r\n \"batchSupportEndOfLife\": \"2024-06-30T00:00:00Z\",\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"openlogic\",\r\n \"offer\": \"centos-hpc\",\r\n \"sku\": \"7_9\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.centos 7\",\r\n \"capabilities\": [\r\n \"SupportsRDMAOnly\",\r\n \"IntelMPIRuntimeInstalled\"\r\n ],\r\n \"batchSupportEndOfLife\": \"2024-06-30T00:00:00Z\",\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"openlogic\",\r\n \"offer\": \"centos-hpc\",\r\n \"sku\": \"7_9-gen2\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.centos 7\",\r\n \"capabilities\": [\r\n \"SupportsRDMAOnly\",\r\n \"IntelMPIRuntimeInstalled\",\r\n \"Generation2VMImage\"\r\n ],\r\n \"batchSupportEndOfLife\": \"2024-06-30T00:00:00Z\",\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"oracle\",\r\n \"offer\": \"oracle-linux\",\r\n \"sku\": \"7.4\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.centos 7\",\r\n \"batchSupportEndOfLife\": \"2024-06-30T00:00:00Z\",\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"oracle\",\r\n \"offer\": \"oracle-linux\",\r\n \"sku\": \"78\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.centos 7\",\r\n \"batchSupportEndOfLife\": \"2024-06-30T00:00:00Z\",\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"oracle\",\r\n \"offer\": \"oracle-linux\",\r\n \"sku\": \"81\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.el 8\",\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"xilinx\",\r\n \"offer\": \"xilinx_alveo_u250_deployment_vm_centos78_032321\",\r\n \"sku\": \"xilinx_alveo_u250_deployment_vm_centos78_032321\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.centos 7\",\r\n \"batchSupportEndOfLife\": \"2024-06-30T00:00:00Z\",\r\n \"osType\": \"linux\"\r\n },\r\n {\r\n \"imageReference\": {\r\n \"publisher\": \"xilinx\",\r\n \"offer\": \"xilinx_alveo_u250_deployment_vm_ubuntu2004_062421\",\r\n \"sku\": \"xilinx_alveo_u250_deployment_vm_ubuntu_2004_062421\",\r\n \"version\": \"latest\"\r\n },\r\n \"verificationType\": \"unverified\",\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"osType\": \"linux\"\r\n }\r\n ]\r\n}", "StatusCode": 200 } ], "Names": {}, "Variables": { - "SubscriptionId": "21abd678-18c5-4660-9fdd-8c5ba6b6fe1f", - "AZURE_BATCH_ACCOUNT": "hoppeeastasia2", - "AZURE_BATCH_ENDPOINT": "https://hoppeeastasia2.eastasia.batch.azure.com", - "AZURE_BATCH_RESOURCE_GROUP": "123" + "SubscriptionId": "6602ac9a-5dad-41bd-a792-592c704b6a31", + "AZURE_BATCH_ACCOUNT": "billstestba24326", + "AZURE_BATCH_ENDPOINT": "https://billstestba24326.uksouth.batch.azure.com", + "AZURE_BATCH_RESOURCE_GROUP": "automation" } } \ No newline at end of file diff --git a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchApplicationPackageTests/TestCreatePoolWithApplicationPackage.json b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchApplicationPackageTests/TestCreatePoolWithApplicationPackage.json index 15f362a82cd8..c576cda7205c 100644 --- a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchApplicationPackageTests/TestCreatePoolWithApplicationPackage.json +++ b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchApplicationPackageTests/TestCreatePoolWithApplicationPackage.json @@ -1,20 +1,20 @@ { "Entries": [ { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/hoppeeastasia2/applications/createPoolWithApplicationPackage/versions/foo?api-version=2022-10-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzLzEyMy9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvaG9wcGVlYXN0YXNpYTIvYXBwbGljYXRpb25zL2NyZWF0ZVBvb2xXaXRoQXBwbGljYXRpb25QYWNrYWdlL3ZlcnNpb25zL2Zvbz9hcGktdmVyc2lvbj0yMDIyLTEwLTAx", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/automation/providers/Microsoft.Batch/batchAccounts/billstestba24326/applications/createPoolWithApplicationPackage/versions/foo?api-version=2022-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24vcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL2JpbGxzdGVzdGJhMjQzMjYvYXBwbGljYXRpb25zL2NyZWF0ZVBvb2xXaXRoQXBwbGljYXRpb25QYWNrYWdlL3ZlcnNpb25zL2Zvbz9hcGktdmVyc2lvbj0yMDIyLTEwLTAx", "RequestMethod": "PUT", "RequestHeaders": { "x-ms-client-request-id": [ - "ac8dcd7f-071e-4b34-878f-cb17f2764396" + "14cfd0c5-0470-4739-9e10-33734325504b" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Batch.BatchManagementClient/14.2.0.0" ] }, @@ -27,13 +27,10 @@ "no-cache" ], "ETag": [ - "W/\"0x8DB6E3A7F37D9C0\"" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1197" + "W/\"0x8DC4AA91587EFDB\"" ], "x-ms-request-id": [ - "38d64437-ecf3-4284-93d4-d96e526165fb" + "3672d998-ab05-4ca5-9854-d7c391ae8f26" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -41,20 +38,26 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" ], "x-ms-correlation-request-id": [ - "c2a41c97-6c99-4ddb-965e-09f80b8834e2" + "e43d60f0-46e3-47c4-8a72-a6a4095027d7" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072252Z:c2a41c97-6c99-4ddb-965e-09f80b8834e2" + "WESTUS2:20240322T194845Z:e43d60f0-46e3-47c4-8a72-a6a4095027d7" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 5BF6B09CF0C346AF8EAE85EC52E15F6B Ref B: CO6AA3150219033 Ref C: 2024-03-22T19:48:44Z" ], "Date": [ - "Fri, 16 Jun 2023 07:22:51 GMT" + "Fri, 22 Mar 2024 19:48:44 GMT" ], "Content-Length": [ - "812" + "657" ], "Content-Type": [ "application/json; charset=utf-8" @@ -63,27 +66,27 @@ "-1" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:22:52 GMT" + "Fri, 22 Mar 2024 19:48:45 GMT" ] }, - "ResponseBody": "{\r\n \"type\": \"Microsoft.Batch/batchAccounts/applications/versions\",\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/hoppeeastasia2/applications/createPoolWithApplicationPackage/versions/foo\",\r\n \"name\": \"foo\",\r\n \"etag\": \"W/\\\"0x8DB6E3A7F37D9C0\\\"\",\r\n \"properties\": {\r\n \"storageUrl\": \"https://hoppeeastasia123.blob.core.windows.net/app-createpoolwithapplicationp-cae3c650ad18410c99607bdbc0934c81/foo?sv=2019-07-07&sr=b&sig=y1c53Wj2yy2I5G%2FIp85Ee6pH1voOJ8ZP9ZUwrT6eQiY%3D&skoid=91248766-5d90-412c-a3a7-792c4ef92a2e&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2023-06-16T07%3A17%3A52Z&ske=2023-06-16T11%3A22%3A52Z&sks=b&skv=2019-07-07&st=2023-06-16T07%3A17%3A52Z&se=2023-06-16T11%3A22%3A52Z&sp=rw\",\r\n \"storageUrlExpiry\": \"2023-06-16T11:22:52.4900719Z\",\r\n \"state\": \"Pending\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"type\": \"Microsoft.Batch/batchAccounts/applications/versions\",\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/automation/providers/Microsoft.Batch/batchAccounts/billstestba24326/applications/createPoolWithApplicationPackage/versions/foo\",\r\n \"name\": \"foo\",\r\n \"etag\": \"W/\\\"0x8DC4AA91587EFDB\\\"\",\r\n \"properties\": {\r\n \"storageUrl\": \"https://billsstorage24326.blob.core.windows.net/app-createpoolwithapplicationp-2846e8f3a68749d99462e6de21f533b1/foo?sv=2018-03-28&sr=b&sig=9P4CmCpjgjTNUcbN4HdYgep4T7YXe0g%2F23MU3yrphcc%3D&st=2024-03-22T19%3A43%3A45Z&se=2024-03-22T23%3A48%3A45Z&sp=rw\",\r\n \"storageUrlExpiry\": \"2024-03-22T23:48:45.1015456Z\",\r\n \"state\": \"Pending\"\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/hoppeeastasia2/applications/createPoolWithApplicationPackage/versions/foo/activate?api-version=2022-10-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzLzEyMy9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvaG9wcGVlYXN0YXNpYTIvYXBwbGljYXRpb25zL2NyZWF0ZVBvb2xXaXRoQXBwbGljYXRpb25QYWNrYWdlL3ZlcnNpb25zL2Zvby9hY3RpdmF0ZT9hcGktdmVyc2lvbj0yMDIyLTEwLTAx", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/automation/providers/Microsoft.Batch/batchAccounts/billstestba24326/applications/createPoolWithApplicationPackage/versions/foo/activate?api-version=2022-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24vcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL2JpbGxzdGVzdGJhMjQzMjYvYXBwbGljYXRpb25zL2NyZWF0ZVBvb2xXaXRoQXBwbGljYXRpb25QYWNrYWdlL3ZlcnNpb25zL2Zvby9hY3RpdmF0ZT9hcGktdmVyc2lvbj0yMDIyLTEwLTAx", "RequestMethod": "POST", "RequestHeaders": { "x-ms-client-request-id": [ - "e0913b45-720e-4f2a-88e0-e80823be51b7" + "58c23f17-9ca3-4610-a4a0-8dda42c492e8" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Batch.BatchManagementClient/14.2.0.0" ], "Content-Type": [ @@ -102,13 +105,10 @@ "no-cache" ], "ETag": [ - "W/\"0x8DB6E3A80426C57\"" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1198" + "W/\"0x8DC4AA91A2D0510\"" ], "x-ms-request-id": [ - "e62e9405-fbd6-47ad-9478-dca8038e7c50" + "f4c62741-ea49-46ea-87ba-60f5588e22ae" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -116,20 +116,26 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" ], "x-ms-correlation-request-id": [ - "8f7bbd52-5fab-485f-a060-66c28418c90f" + "d35571a3-4ba0-46bd-93f5-33f99d9ea370" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072254Z:8f7bbd52-5fab-485f-a060-66c28418c90f" + "WESTUS2:20240322T194852Z:d35571a3-4ba0-46bd-93f5-33f99d9ea370" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 2D412A0AEBE747088FB0BA2BD5084043 Ref B: CO6AA3150219033 Ref C: 2024-03-22T19:48:52Z" ], "Date": [ - "Fri, 16 Jun 2023 07:22:53 GMT" + "Fri, 22 Mar 2024 19:48:52 GMT" ], "Content-Length": [ - "880" + "725" ], "Content-Type": [ "application/json; charset=utf-8" @@ -138,27 +144,27 @@ "-1" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:22:54 GMT" + "Fri, 22 Mar 2024 19:48:52 GMT" ] }, - "ResponseBody": "{\r\n \"type\": \"Microsoft.Batch/batchAccounts/applications/versions\",\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/hoppeeastasia2/applications/createPoolWithApplicationPackage/versions/foo\",\r\n \"name\": \"foo\",\r\n \"etag\": \"W/\\\"0x8DB6E3A80426C57\\\"\",\r\n \"properties\": {\r\n \"storageUrl\": \"https://hoppeeastasia123.blob.core.windows.net/app-createpoolwithapplicationp-cae3c650ad18410c99607bdbc0934c81/foo?sv=2019-07-07&sr=b&sig=YLMMa8y0IUSiQLO%2Fj%2FhHNRlQPT8scnbERs1oGLeiOsE%3D&skoid=91248766-5d90-412c-a3a7-792c4ef92a2e&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2023-06-16T07%3A17%3A54Z&ske=2023-06-16T11%3A22%3A54Z&sks=b&skv=2019-07-07&st=2023-06-16T07%3A17%3A54Z&se=2023-06-16T11%3A22%3A54Z&sp=rw\",\r\n \"storageUrlExpiry\": \"2023-06-16T11:22:54.2459774Z\",\r\n \"state\": \"Active\",\r\n \"format\": \"zip\",\r\n \"lastActivationTime\": \"2023-06-16T07:22:54.1793846Z\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"type\": \"Microsoft.Batch/batchAccounts/applications/versions\",\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/automation/providers/Microsoft.Batch/batchAccounts/billstestba24326/applications/createPoolWithApplicationPackage/versions/foo\",\r\n \"name\": \"foo\",\r\n \"etag\": \"W/\\\"0x8DC4AA91A2D0510\\\"\",\r\n \"properties\": {\r\n \"storageUrl\": \"https://billsstorage24326.blob.core.windows.net/app-createpoolwithapplicationp-2846e8f3a68749d99462e6de21f533b1/foo?sv=2018-03-28&sr=b&sig=QDhYrHf%2FUvKAKQv8KXU7fba%2F85EbYOkB0xhoZ2KWkuk%3D&st=2024-03-22T19%3A43%3A52Z&se=2024-03-22T23%3A48%3A52Z&sp=rw\",\r\n \"storageUrlExpiry\": \"2024-03-22T23:48:52.9078419Z\",\r\n \"state\": \"Active\",\r\n \"format\": \"zip\",\r\n \"lastActivationTime\": \"2024-03-22T19:48:52.8807953Z\"\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/hoppeeastasia2/applications/createPoolWithApplicationPackage/versions/foo?api-version=2022-10-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzLzEyMy9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvaG9wcGVlYXN0YXNpYTIvYXBwbGljYXRpb25zL2NyZWF0ZVBvb2xXaXRoQXBwbGljYXRpb25QYWNrYWdlL3ZlcnNpb25zL2Zvbz9hcGktdmVyc2lvbj0yMDIyLTEwLTAx", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/automation/providers/Microsoft.Batch/batchAccounts/billstestba24326/applications/createPoolWithApplicationPackage/versions/foo?api-version=2022-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24vcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL2JpbGxzdGVzdGJhMjQzMjYvYXBwbGljYXRpb25zL2NyZWF0ZVBvb2xXaXRoQXBwbGljYXRpb25QYWNrYWdlL3ZlcnNpb25zL2Zvbz9hcGktdmVyc2lvbj0yMDIyLTEwLTAx", "RequestMethod": "GET", "RequestHeaders": { "x-ms-client-request-id": [ - "e0913b45-720e-4f2a-88e0-e80823be51b7" + "58c23f17-9ca3-4610-a4a0-8dda42c492e8" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Batch.BatchManagementClient/14.2.0.0" ] }, @@ -171,13 +177,10 @@ "no-cache" ], "ETag": [ - "W/\"0x8DB6E3A80426C57\"" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" + "W/\"0x8DC4AA91A2D0510\"" ], "x-ms-request-id": [ - "936e142d-882a-4fa3-93b7-25b2839214a4" + "aa864049-e077-49a4-b5c6-9024ab1dbb58" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -185,20 +188,26 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" ], "x-ms-correlation-request-id": [ - "e34465aa-1458-41b8-bfea-604df879f608" + "eb400451-3f21-4abc-a8b0-e9fb7885317f" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072254Z:e34465aa-1458-41b8-bfea-604df879f608" + "WESTUS2:20240322T194853Z:eb400451-3f21-4abc-a8b0-e9fb7885317f" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: B5B44A9115834EC093481C65F781B549 Ref B: CO6AA3150219033 Ref C: 2024-03-22T19:48:53Z" ], "Date": [ - "Fri, 16 Jun 2023 07:22:53 GMT" + "Fri, 22 Mar 2024 19:48:53 GMT" ], "Content-Length": [ - "880" + "727" ], "Content-Type": [ "application/json; charset=utf-8" @@ -207,59 +216,59 @@ "-1" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:22:54 GMT" + "Fri, 22 Mar 2024 19:48:52 GMT" ] }, - "ResponseBody": "{\r\n \"type\": \"Microsoft.Batch/batchAccounts/applications/versions\",\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/hoppeeastasia2/applications/createPoolWithApplicationPackage/versions/foo\",\r\n \"name\": \"foo\",\r\n \"etag\": \"W/\\\"0x8DB6E3A80426C57\\\"\",\r\n \"properties\": {\r\n \"storageUrl\": \"https://hoppeeastasia123.blob.core.windows.net/app-createpoolwithapplicationp-cae3c650ad18410c99607bdbc0934c81/foo?sv=2019-07-07&sr=b&sig=YLMMa8y0IUSiQLO%2Fj%2FhHNRlQPT8scnbERs1oGLeiOsE%3D&skoid=91248766-5d90-412c-a3a7-792c4ef92a2e&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2023-06-16T07%3A17%3A54Z&ske=2023-06-16T11%3A22%3A54Z&sks=b&skv=2019-07-07&st=2023-06-16T07%3A17%3A54Z&se=2023-06-16T11%3A22%3A54Z&sp=rw\",\r\n \"storageUrlExpiry\": \"2023-06-16T11:22:54.5843215Z\",\r\n \"state\": \"Active\",\r\n \"format\": \"zip\",\r\n \"lastActivationTime\": \"2023-06-16T07:22:54.1793846Z\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"type\": \"Microsoft.Batch/batchAccounts/applications/versions\",\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/automation/providers/Microsoft.Batch/batchAccounts/billstestba24326/applications/createPoolWithApplicationPackage/versions/foo\",\r\n \"name\": \"foo\",\r\n \"etag\": \"W/\\\"0x8DC4AA91A2D0510\\\"\",\r\n \"properties\": {\r\n \"storageUrl\": \"https://billsstorage24326.blob.core.windows.net/app-createpoolwithapplicationp-2846e8f3a68749d99462e6de21f533b1/foo?sv=2018-03-28&sr=b&sig=ZdXwkr1yN%2Fxz9DQLNI9BYY%2BM5zUQfAvtMGQw9Pi%2Fv6A%3D&st=2024-03-22T19%3A43%3A53Z&se=2024-03-22T23%3A48%3A53Z&sp=rw\",\r\n \"storageUrlExpiry\": \"2024-03-22T23:48:53.6754564Z\",\r\n \"state\": \"Active\",\r\n \"format\": \"zip\",\r\n \"lastActivationTime\": \"2024-03-22T19:48:52.8807953Z\"\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", + "RequestUri": "/pools?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "4ce8d3ec-3556-4ce4-b8ef-4c2ce0f98d4f" + "ba38e3cf-b52b-494d-90e4-e35013dc85a8" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:22:53 GMT" + "Fri, 22 Mar 2024 19:48:53 GMT" ], "x-ms-client-request-id": [ - "689930b3-3450-4858-b636-970ca12a9c5d" + "70d40920-b73c-4c90-9303-154f163b1c44" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Type": [ "application/json; odata=minimalmetadata; charset=utf-8" ], "Content-Length": [ - "409" + "572" ] }, - "RequestBody": "{\r\n \"id\": \"testCreatePoolWithAppPackages\",\r\n \"vmSize\": \"small\",\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"4\",\r\n \"osVersion\": \"*\"\r\n },\r\n \"targetDedicatedNodes\": 3,\r\n \"enableInterNodeCommunication\": false,\r\n \"applicationPackageReferences\": [\r\n {\r\n \"applicationId\": \"createPoolWithApplicationPackage\",\r\n \"version\": \"foo\"\r\n }\r\n ],\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", + "RequestBody": "{\r\n \"id\": \"testCreatePoolWithAppPackages\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoft-azure-batch\",\r\n \"offer\": \"ubuntu-server-container\",\r\n \"sku\": \"20-04-lts\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\"\r\n },\r\n \"targetDedicatedNodes\": 3,\r\n \"enableInterNodeCommunication\": false,\r\n \"applicationPackageReferences\": [\r\n {\r\n \"applicationId\": \"createPoolWithApplicationPackage\",\r\n \"version\": \"foo\"\r\n }\r\n ],\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", "ResponseHeaders": { "Transfer-Encoding": [ "chunked" ], "ETag": [ - "0x8DB6E3A80BEC448" + "0x8DC4AA91B23849D" ], "Location": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/pools/testCreatePoolWithAppPackages" + "https://billstestba24326.uksouth.batch.azure.com/pools/testCreatePoolWithAppPackages" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "abae4d71-d05f-4c70-9eb6-5e9ce4566584" + "edd57b46-8fdc-491e-b850-90275fe3ed93" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -271,33 +280,33 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/pools/testCreatePoolWithAppPackages" + "https://billstestba24326.uksouth.batch.azure.com/pools/testCreatePoolWithAppPackages" ], "Date": [ - "Fri, 16 Jun 2023 07:22:54 GMT" + "Fri, 22 Mar 2024 19:48:54 GMT" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:22:55 GMT" + "Fri, 22 Mar 2024 19:48:54 GMT" ] }, "ResponseBody": "", "StatusCode": 201 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/hoppeeastasia2/applications/createPoolWithApplicationPackage/versions/foo?api-version=2022-10-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzLzEyMy9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvaG9wcGVlYXN0YXNpYTIvYXBwbGljYXRpb25zL2NyZWF0ZVBvb2xXaXRoQXBwbGljYXRpb25QYWNrYWdlL3ZlcnNpb25zL2Zvbz9hcGktdmVyc2lvbj0yMDIyLTEwLTAx", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/automation/providers/Microsoft.Batch/batchAccounts/billstestba24326/applications/createPoolWithApplicationPackage/versions/foo?api-version=2022-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24vcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL2JpbGxzdGVzdGJhMjQzMjYvYXBwbGljYXRpb25zL2NyZWF0ZVBvb2xXaXRoQXBwbGljYXRpb25QYWNrYWdlL3ZlcnNpb25zL2Zvbz9hcGktdmVyc2lvbj0yMDIyLTEwLTAx", "RequestMethod": "DELETE", "RequestHeaders": { "x-ms-client-request-id": [ - "673838ab-a671-4869-9153-3c2c28b495df" + "d20fc548-0d4d-4867-a58a-40416eab729b" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Batch.BatchManagementClient/14.2.0.0" ] }, @@ -310,7 +319,7 @@ "no-cache" ], "x-ms-request-id": [ - "ac139d21-9b06-4022-a850-9ac3943d538c" + "bfc85319-4388-4343-b856-4979f837af0d" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -318,20 +327,23 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], "x-ms-ratelimit-remaining-subscription-deletes": [ - "14997" + "14999" ], "x-ms-correlation-request-id": [ - "16359351-db8f-4e60-8d22-360cae0cde67" + "1ea3fd4d-7e14-40e2-a666-adf5e420938f" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072255Z:16359351-db8f-4e60-8d22-360cae0cde67" + "WESTUS2:20240322T194855Z:1ea3fd4d-7e14-40e2-a666-adf5e420938f" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: C1641069BC864EC48273D008E0266697 Ref B: CO6AA3150219033 Ref C: 2024-03-22T19:48:54Z" ], "Date": [ - "Fri, 16 Jun 2023 07:22:54 GMT" + "Fri, 22 Mar 2024 19:48:54 GMT" ], "Expires": [ "-1" @@ -344,20 +356,20 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/hoppeeastasia2/applications/createPoolWithApplicationPackage?api-version=2022-10-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzLzEyMy9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvaG9wcGVlYXN0YXNpYTIvYXBwbGljYXRpb25zL2NyZWF0ZVBvb2xXaXRoQXBwbGljYXRpb25QYWNrYWdlP2FwaS12ZXJzaW9uPTIwMjItMTAtMDE=", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/automation/providers/Microsoft.Batch/batchAccounts/billstestba24326/applications/createPoolWithApplicationPackage?api-version=2022-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24vcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL2JpbGxzdGVzdGJhMjQzMjYvYXBwbGljYXRpb25zL2NyZWF0ZVBvb2xXaXRoQXBwbGljYXRpb25QYWNrYWdlP2FwaS12ZXJzaW9uPTIwMjItMTAtMDE=", "RequestMethod": "DELETE", "RequestHeaders": { "x-ms-client-request-id": [ - "a3acb2bb-195a-460d-a6a8-4e84ae3e1b1b" + "b9a64bd2-6350-498e-bece-99bab6dda558" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Batch.BatchManagementClient/14.2.0.0" ] }, @@ -370,7 +382,7 @@ "no-cache" ], "x-ms-request-id": [ - "f17bb341-81a3-4282-b0da-d0aac3591d1c" + "ccd4025e-4fe0-4fd0-9f8e-b45f8a0c497c" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -378,20 +390,23 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], "x-ms-ratelimit-remaining-subscription-deletes": [ - "14996" + "14999" ], "x-ms-correlation-request-id": [ - "a4f08b2e-a930-4bc1-a258-58552d9a4f30" + "41e19d37-3c10-406f-b419-0e28e7b69ac9" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072255Z:a4f08b2e-a930-4bc1-a258-58552d9a4f30" + "WESTUS2:20240322T194856Z:41e19d37-3c10-406f-b419-0e28e7b69ac9" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: B6C91A7C531643928475FD4AD6CC3E92 Ref B: CO6AA3150219033 Ref C: 2024-03-22T19:48:55Z" ], "Date": [ - "Fri, 16 Jun 2023 07:22:54 GMT" + "Fri, 22 Mar 2024 19:48:55 GMT" ], "Expires": [ "-1" @@ -404,27 +419,27 @@ "StatusCode": 200 }, { - "RequestUri": "/pools/testCreatePoolWithAppPackages?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RDcmVhdGVQb29sV2l0aEFwcFBhY2thZ2VzP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", + "RequestUri": "/pools/testCreatePoolWithAppPackages?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3Rlc3RDcmVhdGVQb29sV2l0aEFwcFBhY2thZ2VzP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", "RequestMethod": "DELETE", "RequestHeaders": { "client-request-id": [ - "d1107215-339b-4f92-835f-534bba4e1d28" + "4156d0fe-2403-4c78-8fc4-487b50222c01" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:22:54 GMT" + "Fri, 22 Mar 2024 19:48:56 GMT" ], "x-ms-client-request-id": [ - "6acdb43b-f280-4796-a788-3ba3ca9c2f6e" + "c1f797d7-4fcc-4ae2-9259-e93422b6c1e7" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Length": [ @@ -440,7 +455,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "a2798591-31df-4edc-b7d6-bd08c10d616a" + "4d1301da-16e6-4aa4-900f-978abd8b354c" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -452,7 +467,7 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:22:55 GMT" + "Fri, 22 Mar 2024 19:48:56 GMT" ] }, "ResponseBody": "", @@ -461,9 +476,9 @@ ], "Names": {}, "Variables": { - "SubscriptionId": "21abd678-18c5-4660-9fdd-8c5ba6b6fe1f", - "AZURE_BATCH_ACCOUNT": "hoppeeastasia2", - "AZURE_BATCH_ENDPOINT": "https://hoppeeastasia2.eastasia.batch.azure.com", - "AZURE_BATCH_RESOURCE_GROUP": "123" + "SubscriptionId": "6602ac9a-5dad-41bd-a792-592c704b6a31", + "AZURE_BATCH_ACCOUNT": "billstestba24326", + "AZURE_BATCH_ENDPOINT": "https://billstestba24326.uksouth.batch.azure.com", + "AZURE_BATCH_RESOURCE_GROUP": "automation" } } \ No newline at end of file diff --git a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchApplicationPackageTests/TestUpdateApplicationPackage.json b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchApplicationPackageTests/TestUpdateApplicationPackage.json index 4fd2d5883998..4a3cc9f961cb 100644 --- a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchApplicationPackageTests/TestUpdateApplicationPackage.json +++ b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchApplicationPackageTests/TestUpdateApplicationPackage.json @@ -1,20 +1,20 @@ { "Entries": [ { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/hoppeeastasia2/applications/updateApplicationPackage/versions/foo?api-version=2022-10-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzLzEyMy9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvaG9wcGVlYXN0YXNpYTIvYXBwbGljYXRpb25zL3VwZGF0ZUFwcGxpY2F0aW9uUGFja2FnZS92ZXJzaW9ucy9mb28/YXBpLXZlcnNpb249MjAyMi0xMC0wMQ==", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/automation/providers/Microsoft.Batch/batchAccounts/billstestba24326/applications/updateApplicationPackage/versions/foo?api-version=2022-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24vcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL2JpbGxzdGVzdGJhMjQzMjYvYXBwbGljYXRpb25zL3VwZGF0ZUFwcGxpY2F0aW9uUGFja2FnZS92ZXJzaW9ucy9mb28/YXBpLXZlcnNpb249MjAyMi0xMC0wMQ==", "RequestMethod": "PUT", "RequestHeaders": { "x-ms-client-request-id": [ - "3ee66152-6901-4309-9ec1-562d7deb80cc" + "c91af456-c505-42b9-adc2-de784c154494" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Batch.BatchManagementClient/14.2.0.0" ] }, @@ -27,13 +27,10 @@ "no-cache" ], "ETag": [ - "W/\"0x8DB6E3A8365F43B\"" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" + "W/\"0x8DC49FBB185D131\"" ], "x-ms-request-id": [ - "a2e80d08-c183-49ce-9966-f3d65e2d0489" + "bbe63fd2-3587-4867-9074-3720313f28c4" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -41,20 +38,26 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" ], "x-ms-correlation-request-id": [ - "44b29ffd-0f09-4895-aacf-9d9a2f095aec" + "9e15974c-6278-4c25-a4b2-f48b6e60a557" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072259Z:44b29ffd-0f09-4895-aacf-9d9a2f095aec" + "WESTUS2:20240321T230734Z:9e15974c-6278-4c25-a4b2-f48b6e60a557" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 07FC56EF677A46B79F400F24621552DD Ref B: CO6AA3150218025 Ref C: 2024-03-21T23:07:33Z" ], "Date": [ - "Fri, 16 Jun 2023 07:22:59 GMT" + "Thu, 21 Mar 2024 23:07:33 GMT" ], "Content-Length": [ - "804" + "645" ], "Content-Type": [ "application/json; charset=utf-8" @@ -63,27 +66,27 @@ "-1" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:22:59 GMT" + "Thu, 21 Mar 2024 23:07:34 GMT" ] }, - "ResponseBody": "{\r\n \"type\": \"Microsoft.Batch/batchAccounts/applications/versions\",\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/hoppeeastasia2/applications/updateApplicationPackage/versions/foo\",\r\n \"name\": \"foo\",\r\n \"etag\": \"W/\\\"0x8DB6E3A8365F43B\\\"\",\r\n \"properties\": {\r\n \"storageUrl\": \"https://hoppeeastasia123.blob.core.windows.net/app-updateapplicationpackage-53f5e444115a47e4bdc2e7cc959b4141/foo?sv=2019-07-07&sr=b&sig=QY%2FZYYv%2FEhjzU6vb94aHrcnc6qD51MTnYcS7hvsq2r0%3D&skoid=91248766-5d90-412c-a3a7-792c4ef92a2e&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2023-06-16T07%3A17%3A59Z&ske=2023-06-16T11%3A22%3A59Z&sks=b&skv=2019-07-07&st=2023-06-16T07%3A17%3A59Z&se=2023-06-16T11%3A22%3A59Z&sp=rw\",\r\n \"storageUrlExpiry\": \"2023-06-16T11:22:59.4809791Z\",\r\n \"state\": \"Pending\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"type\": \"Microsoft.Batch/batchAccounts/applications/versions\",\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/automation/providers/Microsoft.Batch/batchAccounts/billstestba24326/applications/updateApplicationPackage/versions/foo\",\r\n \"name\": \"foo\",\r\n \"etag\": \"W/\\\"0x8DC49FBB185D131\\\"\",\r\n \"properties\": {\r\n \"storageUrl\": \"https://billsstorage24326.blob.core.windows.net/app-updateapplicationpackage-9d12e3ed2beb4978ba1681c75071685f/foo?sv=2018-03-28&sr=b&sig=vF6w5IdPQEGjhE5G22VGUhNpELUxQFLLaVbcpBnFgkA%3D&st=2024-03-21T23%3A02%3A34Z&se=2024-03-22T03%3A07%3A34Z&sp=rw\",\r\n \"storageUrlExpiry\": \"2024-03-22T03:07:34.3901393Z\",\r\n \"state\": \"Pending\"\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/hoppeeastasia2/applications/updateApplicationPackage?api-version=2022-10-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzLzEyMy9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvaG9wcGVlYXN0YXNpYTIvYXBwbGljYXRpb25zL3VwZGF0ZUFwcGxpY2F0aW9uUGFja2FnZT9hcGktdmVyc2lvbj0yMDIyLTEwLTAx", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/automation/providers/Microsoft.Batch/batchAccounts/billstestba24326/applications/updateApplicationPackage?api-version=2022-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24vcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL2JpbGxzdGVzdGJhMjQzMjYvYXBwbGljYXRpb25zL3VwZGF0ZUFwcGxpY2F0aW9uUGFja2FnZT9hcGktdmVyc2lvbj0yMDIyLTEwLTAx", "RequestMethod": "GET", "RequestHeaders": { "x-ms-client-request-id": [ - "0b45c0bb-3586-4bf2-ae19-95292a58b1a8" + "19b8291c-1253-4550-b289-2857709d6669" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Batch.BatchManagementClient/14.2.0.0" ] }, @@ -96,13 +99,10 @@ "no-cache" ], "ETag": [ - "W/\"0x8DB6E3A83645614\"" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" + "W/\"0x8DC49FBB1805DF4\"" ], "x-ms-request-id": [ - "6205e3c8-cde5-4b89-8c8b-72a2e69f5d69" + "42b4fb90-3f7a-4a8f-a4ca-f0a763add61e" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -110,20 +110,26 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" ], "x-ms-correlation-request-id": [ - "9a08de1d-bae8-43d2-b6a2-3c6cf8a6250b" + "e72d5a76-2a8a-4044-9e20-35063975178c" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072300Z:9a08de1d-bae8-43d2-b6a2-3c6cf8a6250b" + "WESTUS2:20240321T230735Z:e72d5a76-2a8a-4044-9e20-35063975178c" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 4A8C53BEC2F0474FAB5681E90D30EBD9 Ref B: CO6AA3150218025 Ref C: 2024-03-21T23:07:35Z" ], "Date": [ - "Fri, 16 Jun 2023 07:23:00 GMT" + "Thu, 21 Mar 2024 23:07:35 GMT" ], "Content-Length": [ - "326" + "335" ], "Content-Type": [ "application/json; charset=utf-8" @@ -132,27 +138,27 @@ "-1" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:22:59 GMT" + "Thu, 21 Mar 2024 23:07:34 GMT" ] }, - "ResponseBody": "{\r\n \"type\": \"Microsoft.Batch/batchAccounts/applications\",\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/hoppeeastasia2/applications/updateApplicationPackage\",\r\n \"name\": \"updateApplicationPackage\",\r\n \"etag\": \"W/\\\"0x8DB6E3A83645614\\\"\",\r\n \"properties\": {\r\n \"allowUpdates\": true\r\n }\r\n}", + "ResponseBody": "{\r\n \"type\": \"Microsoft.Batch/batchAccounts/applications\",\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/automation/providers/Microsoft.Batch/batchAccounts/billstestba24326/applications/updateApplicationPackage\",\r\n \"name\": \"updateApplicationPackage\",\r\n \"etag\": \"W/\\\"0x8DC49FBB1805DF4\\\"\",\r\n \"properties\": {\r\n \"allowUpdates\": true\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/hoppeeastasia2/applications/updateApplicationPackage?api-version=2022-10-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzLzEyMy9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvaG9wcGVlYXN0YXNpYTIvYXBwbGljYXRpb25zL3VwZGF0ZUFwcGxpY2F0aW9uUGFja2FnZT9hcGktdmVyc2lvbj0yMDIyLTEwLTAx", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/automation/providers/Microsoft.Batch/batchAccounts/billstestba24326/applications/updateApplicationPackage?api-version=2022-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24vcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL2JpbGxzdGVzdGJhMjQzMjYvYXBwbGljYXRpb25zL3VwZGF0ZUFwcGxpY2F0aW9uUGFja2FnZT9hcGktdmVyc2lvbj0yMDIyLTEwLTAx", "RequestMethod": "GET", "RequestHeaders": { "x-ms-client-request-id": [ - "1586683e-e1fb-4989-afa3-c348b31424fd" + "b983fbc7-2c3a-4d66-b2aa-240f10cd5aeb" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Batch.BatchManagementClient/14.2.0.0" ] }, @@ -165,13 +171,10 @@ "no-cache" ], "ETag": [ - "W/\"0x8DB6E3A8501B54C\"" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" + "W/\"0x8DC49FBB392B3B3\"" ], "x-ms-request-id": [ - "5efe6657-d8e9-4172-9f74-c4e39db59ae8" + "8bbd29a4-ca06-4c76-bd22-b38f70b7bdcc" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -179,20 +182,26 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" ], "x-ms-correlation-request-id": [ - "89d9fd6a-8c32-4447-a0d4-b7142c8e622c" + "1dcab761-4980-4874-8bb3-3ffde2885b01" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072302Z:89d9fd6a-8c32-4447-a0d4-b7142c8e622c" + "WESTUS2:20240321T230738Z:1dcab761-4980-4874-8bb3-3ffde2885b01" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 18FDB5A0D39C493A94B767D330C7A7D9 Ref B: CO6AA3150218025 Ref C: 2024-03-21T23:07:37Z" ], "Date": [ - "Fri, 16 Jun 2023 07:23:02 GMT" + "Thu, 21 Mar 2024 23:07:37 GMT" ], "Content-Length": [ - "390" + "399" ], "Content-Type": [ "application/json; charset=utf-8" @@ -201,27 +210,27 @@ "-1" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:23:02 GMT" + "Thu, 21 Mar 2024 23:07:37 GMT" ] }, - "ResponseBody": "{\r\n \"type\": \"Microsoft.Batch/batchAccounts/applications\",\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/hoppeeastasia2/applications/updateApplicationPackage\",\r\n \"name\": \"updateApplicationPackage\",\r\n \"etag\": \"W/\\\"0x8DB6E3A8501B54C\\\"\",\r\n \"properties\": {\r\n \"displayName\": \"application-display-name\",\r\n \"allowUpdates\": true,\r\n \"defaultVersion\": \"foo\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"type\": \"Microsoft.Batch/batchAccounts/applications\",\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/automation/providers/Microsoft.Batch/batchAccounts/billstestba24326/applications/updateApplicationPackage\",\r\n \"name\": \"updateApplicationPackage\",\r\n \"etag\": \"W/\\\"0x8DC49FBB392B3B3\\\"\",\r\n \"properties\": {\r\n \"displayName\": \"application-display-name\",\r\n \"allowUpdates\": true,\r\n \"defaultVersion\": \"foo\"\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/hoppeeastasia2/applications/updateApplicationPackage/versions/foo/activate?api-version=2022-10-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzLzEyMy9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvaG9wcGVlYXN0YXNpYTIvYXBwbGljYXRpb25zL3VwZGF0ZUFwcGxpY2F0aW9uUGFja2FnZS92ZXJzaW9ucy9mb28vYWN0aXZhdGU/YXBpLXZlcnNpb249MjAyMi0xMC0wMQ==", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/automation/providers/Microsoft.Batch/batchAccounts/billstestba24326/applications/updateApplicationPackage/versions/foo/activate?api-version=2022-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24vcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL2JpbGxzdGVzdGJhMjQzMjYvYXBwbGljYXRpb25zL3VwZGF0ZUFwcGxpY2F0aW9uUGFja2FnZS92ZXJzaW9ucy9mb28vYWN0aXZhdGU/YXBpLXZlcnNpb249MjAyMi0xMC0wMQ==", "RequestMethod": "POST", "RequestHeaders": { "x-ms-client-request-id": [ - "c81ec310-0c8b-417c-8440-744fcb36e775" + "b42ee81b-8eb6-4e74-b791-822e9a49ce3e" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Batch.BatchManagementClient/14.2.0.0" ], "Content-Type": [ @@ -240,13 +249,10 @@ "no-cache" ], "ETag": [ - "W/\"0x8DB6E3A84878DFE\"" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" + "W/\"0x8DC49FBB2DD4F1F\"" ], "x-ms-request-id": [ - "d3019982-6dad-45b0-95f3-3c1493cadc5c" + "c6a68fb5-aa5b-436f-ae23-a4f75f6f61fd" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -254,20 +260,26 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" ], "x-ms-correlation-request-id": [ - "23615d3f-99b8-496a-a8ae-97a54a9e8e82" + "fbd88377-a994-44c8-9897-733d27eaab52" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072301Z:23615d3f-99b8-496a-a8ae-97a54a9e8e82" + "WESTUS2:20240321T230736Z:fbd88377-a994-44c8-9897-733d27eaab52" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 1276947F99B1453A86C13D7ACBBCC751 Ref B: CO6AA3150218025 Ref C: 2024-03-21T23:07:35Z" ], "Date": [ - "Fri, 16 Jun 2023 07:23:01 GMT" + "Thu, 21 Mar 2024 23:07:36 GMT" ], "Content-Length": [ - "866" + "721" ], "Content-Type": [ "application/json; charset=utf-8" @@ -276,27 +288,27 @@ "-1" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:23:01 GMT" + "Thu, 21 Mar 2024 23:07:36 GMT" ] }, - "ResponseBody": "{\r\n \"type\": \"Microsoft.Batch/batchAccounts/applications/versions\",\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/hoppeeastasia2/applications/updateApplicationPackage/versions/foo\",\r\n \"name\": \"foo\",\r\n \"etag\": \"W/\\\"0x8DB6E3A84878DFE\\\"\",\r\n \"properties\": {\r\n \"storageUrl\": \"https://hoppeeastasia123.blob.core.windows.net/app-updateapplicationpackage-53f5e444115a47e4bdc2e7cc959b4141/foo?sv=2019-07-07&sr=b&sig=1b7S2r4AyXoxwFrvAMQXF9yofdMPHCV7L6cQ94phm80%3D&skoid=91248766-5d90-412c-a3a7-792c4ef92a2e&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2023-06-16T07%3A18%3A01Z&ske=2023-06-16T11%3A23%3A01Z&sks=b&skv=2019-07-07&st=2023-06-16T07%3A18%3A01Z&se=2023-06-16T11%3A23%3A01Z&sp=rw\",\r\n \"storageUrlExpiry\": \"2023-06-16T11:23:01.4062007Z\",\r\n \"state\": \"Active\",\r\n \"format\": \"zip\",\r\n \"lastActivationTime\": \"2023-06-16T07:23:01.3622389Z\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"type\": \"Microsoft.Batch/batchAccounts/applications/versions\",\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/automation/providers/Microsoft.Batch/batchAccounts/billstestba24326/applications/updateApplicationPackage/versions/foo\",\r\n \"name\": \"foo\",\r\n \"etag\": \"W/\\\"0x8DC49FBB2DD4F1F\\\"\",\r\n \"properties\": {\r\n \"storageUrl\": \"https://billsstorage24326.blob.core.windows.net/app-updateapplicationpackage-9d12e3ed2beb4978ba1681c75071685f/foo?sv=2018-03-28&sr=b&sig=%2FrYrR1TtfKB%2Fw1p%2Fc%2F%2FU6YmBANzeXWkai4neiRnxrA0%3D&st=2024-03-21T23%3A02%3A36Z&se=2024-03-22T03%3A07%3A36Z&sp=rw\",\r\n \"storageUrlExpiry\": \"2024-03-22T03:07:36.6538679Z\",\r\n \"state\": \"Active\",\r\n \"format\": \"zip\",\r\n \"lastActivationTime\": \"2024-03-21T23:07:36.6076724Z\"\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/hoppeeastasia2/applications/updateApplicationPackage/versions/foo?api-version=2022-10-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzLzEyMy9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvaG9wcGVlYXN0YXNpYTIvYXBwbGljYXRpb25zL3VwZGF0ZUFwcGxpY2F0aW9uUGFja2FnZS92ZXJzaW9ucy9mb28/YXBpLXZlcnNpb249MjAyMi0xMC0wMQ==", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/automation/providers/Microsoft.Batch/batchAccounts/billstestba24326/applications/updateApplicationPackage/versions/foo?api-version=2022-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24vcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL2JpbGxzdGVzdGJhMjQzMjYvYXBwbGljYXRpb25zL3VwZGF0ZUFwcGxpY2F0aW9uUGFja2FnZS92ZXJzaW9ucy9mb28/YXBpLXZlcnNpb249MjAyMi0xMC0wMQ==", "RequestMethod": "GET", "RequestHeaders": { "x-ms-client-request-id": [ - "c81ec310-0c8b-417c-8440-744fcb36e775" + "b42ee81b-8eb6-4e74-b791-822e9a49ce3e" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Batch.BatchManagementClient/14.2.0.0" ] }, @@ -309,13 +321,10 @@ "no-cache" ], "ETag": [ - "W/\"0x8DB6E3A84878DFE\"" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" + "W/\"0x8DC49FBB2DD4F1F\"" ], "x-ms-request-id": [ - "2a400adb-b7dc-4038-be3d-3c788374958c" + "08b420f4-386c-401a-853c-5c05d42bbc46" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -323,20 +332,26 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" ], "x-ms-correlation-request-id": [ - "41ccbc34-c9a0-4b84-90d9-32d5709c7613" + "76a50bcd-7817-4142-9397-e0267d6206fb" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072301Z:41ccbc34-c9a0-4b84-90d9-32d5709c7613" + "WESTUS2:20240321T230737Z:76a50bcd-7817-4142-9397-e0267d6206fb" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 3D41BF42C7334258B529F72DC9B4CA7E Ref B: CO6AA3150218025 Ref C: 2024-03-21T23:07:36Z" ], "Date": [ - "Fri, 16 Jun 2023 07:23:01 GMT" + "Thu, 21 Mar 2024 23:07:36 GMT" ], "Content-Length": [ - "866" + "721" ], "Content-Type": [ "application/json; charset=utf-8" @@ -345,27 +360,27 @@ "-1" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:23:01 GMT" + "Thu, 21 Mar 2024 23:07:36 GMT" ] }, - "ResponseBody": "{\r\n \"type\": \"Microsoft.Batch/batchAccounts/applications/versions\",\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/hoppeeastasia2/applications/updateApplicationPackage/versions/foo\",\r\n \"name\": \"foo\",\r\n \"etag\": \"W/\\\"0x8DB6E3A84878DFE\\\"\",\r\n \"properties\": {\r\n \"storageUrl\": \"https://hoppeeastasia123.blob.core.windows.net/app-updateapplicationpackage-53f5e444115a47e4bdc2e7cc959b4141/foo?sv=2019-07-07&sr=b&sig=1b7S2r4AyXoxwFrvAMQXF9yofdMPHCV7L6cQ94phm80%3D&skoid=91248766-5d90-412c-a3a7-792c4ef92a2e&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2023-06-16T07%3A18%3A01Z&ske=2023-06-16T11%3A23%3A01Z&sks=b&skv=2019-07-07&st=2023-06-16T07%3A18%3A01Z&se=2023-06-16T11%3A23%3A01Z&sp=rw\",\r\n \"storageUrlExpiry\": \"2023-06-16T11:23:01.7348528Z\",\r\n \"state\": \"Active\",\r\n \"format\": \"zip\",\r\n \"lastActivationTime\": \"2023-06-16T07:23:01.3622389Z\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"type\": \"Microsoft.Batch/batchAccounts/applications/versions\",\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/automation/providers/Microsoft.Batch/batchAccounts/billstestba24326/applications/updateApplicationPackage/versions/foo\",\r\n \"name\": \"foo\",\r\n \"etag\": \"W/\\\"0x8DC49FBB2DD4F1F\\\"\",\r\n \"properties\": {\r\n \"storageUrl\": \"https://billsstorage24326.blob.core.windows.net/app-updateapplicationpackage-9d12e3ed2beb4978ba1681c75071685f/foo?sv=2018-03-28&sr=b&sig=%2FrYrR1TtfKB%2Fw1p%2Fc%2F%2FU6YmBANzeXWkai4neiRnxrA0%3D&st=2024-03-21T23%3A02%3A36Z&se=2024-03-22T03%3A07%3A36Z&sp=rw\",\r\n \"storageUrlExpiry\": \"2024-03-22T03:07:36.9983176Z\",\r\n \"state\": \"Active\",\r\n \"format\": \"zip\",\r\n \"lastActivationTime\": \"2024-03-21T23:07:36.6076724Z\"\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/hoppeeastasia2/applications/updateApplicationPackage?api-version=2022-10-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzLzEyMy9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvaG9wcGVlYXN0YXNpYTIvYXBwbGljYXRpb25zL3VwZGF0ZUFwcGxpY2F0aW9uUGFja2FnZT9hcGktdmVyc2lvbj0yMDIyLTEwLTAx", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/automation/providers/Microsoft.Batch/batchAccounts/billstestba24326/applications/updateApplicationPackage?api-version=2022-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24vcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL2JpbGxzdGVzdGJhMjQzMjYvYXBwbGljYXRpb25zL3VwZGF0ZUFwcGxpY2F0aW9uUGFja2FnZT9hcGktdmVyc2lvbj0yMDIyLTEwLTAx", "RequestMethod": "PATCH", "RequestHeaders": { "x-ms-client-request-id": [ - "7707f6c3-2402-4f66-a5f2-e72a24ab9c07" + "33c48205-9310-4ba0-97a3-4c13c749af13" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Batch.BatchManagementClient/14.2.0.0" ], "Content-Type": [ @@ -384,13 +399,10 @@ "no-cache" ], "ETag": [ - "W/\"0x8DB6E3A8501B54C\"" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1198" + "W/\"0x8DC49FBB392B3B3\"" ], "x-ms-request-id": [ - "3889fee1-6ab1-4602-8141-f4f7a1a3d4e9" + "01494427-fc6c-4f6a-b0f4-5c9c1a34a8d0" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -398,20 +410,26 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" ], "x-ms-correlation-request-id": [ - "0d8c4e86-de97-42c8-b759-760ea7f4eb25" + "0432f4a3-01d5-4416-891b-8275509b64cf" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072302Z:0d8c4e86-de97-42c8-b759-760ea7f4eb25" + "WESTUS2:20240321T230737Z:0432f4a3-01d5-4416-891b-8275509b64cf" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: C882D961B874425090473AD8A56FCD06 Ref B: CO6AA3150218025 Ref C: 2024-03-21T23:07:37Z" ], "Date": [ - "Fri, 16 Jun 2023 07:23:01 GMT" + "Thu, 21 Mar 2024 23:07:37 GMT" ], "Content-Length": [ - "390" + "399" ], "Content-Type": [ "application/json; charset=utf-8" @@ -420,27 +438,27 @@ "-1" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:23:02 GMT" + "Thu, 21 Mar 2024 23:07:37 GMT" ] }, - "ResponseBody": "{\r\n \"type\": \"Microsoft.Batch/batchAccounts/applications\",\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/hoppeeastasia2/applications/updateApplicationPackage\",\r\n \"name\": \"updateApplicationPackage\",\r\n \"etag\": \"W/\\\"0x8DB6E3A8501B54C\\\"\",\r\n \"properties\": {\r\n \"displayName\": \"application-display-name\",\r\n \"allowUpdates\": true,\r\n \"defaultVersion\": \"foo\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"type\": \"Microsoft.Batch/batchAccounts/applications\",\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/automation/providers/Microsoft.Batch/batchAccounts/billstestba24326/applications/updateApplicationPackage\",\r\n \"name\": \"updateApplicationPackage\",\r\n \"etag\": \"W/\\\"0x8DC49FBB392B3B3\\\"\",\r\n \"properties\": {\r\n \"displayName\": \"application-display-name\",\r\n \"allowUpdates\": true,\r\n \"defaultVersion\": \"foo\"\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/hoppeeastasia2/applications/updateApplicationPackage/versions/foo?api-version=2022-10-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzLzEyMy9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvaG9wcGVlYXN0YXNpYTIvYXBwbGljYXRpb25zL3VwZGF0ZUFwcGxpY2F0aW9uUGFja2FnZS92ZXJzaW9ucy9mb28/YXBpLXZlcnNpb249MjAyMi0xMC0wMQ==", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/automation/providers/Microsoft.Batch/batchAccounts/billstestba24326/applications/updateApplicationPackage/versions/foo?api-version=2022-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24vcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL2JpbGxzdGVzdGJhMjQzMjYvYXBwbGljYXRpb25zL3VwZGF0ZUFwcGxpY2F0aW9uUGFja2FnZS92ZXJzaW9ucy9mb28/YXBpLXZlcnNpb249MjAyMi0xMC0wMQ==", "RequestMethod": "DELETE", "RequestHeaders": { "x-ms-client-request-id": [ - "077b7c52-9eaf-4387-a0b7-54af51694abe" + "5dc0eb8d-ec3c-4040-ae22-7d1a3f2697fa" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Batch.BatchManagementClient/14.2.0.0" ] }, @@ -453,7 +471,7 @@ "no-cache" ], "x-ms-request-id": [ - "31bc8e55-ad3a-4e3d-8aa4-8a5b2cc86ed1" + "70abf50e-c059-485b-90aa-b1eca24baea1" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -461,20 +479,23 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], "x-ms-correlation-request-id": [ - "450029e8-9e9f-4379-8216-dc562cf79a33" + "bbf7f209-eada-44b4-8509-2523c436fb73" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072302Z:450029e8-9e9f-4379-8216-dc562cf79a33" + "WESTUS2:20240321T230739Z:bbf7f209-eada-44b4-8509-2523c436fb73" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 96ED60B205834EDA9588E02142118C01 Ref B: CO6AA3150218025 Ref C: 2024-03-21T23:07:38Z" ], "Date": [ - "Fri, 16 Jun 2023 07:23:02 GMT" + "Thu, 21 Mar 2024 23:07:38 GMT" ], "Expires": [ "-1" @@ -487,20 +508,20 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/hoppeeastasia2/applications/updateApplicationPackage?api-version=2022-10-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzLzEyMy9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvaG9wcGVlYXN0YXNpYTIvYXBwbGljYXRpb25zL3VwZGF0ZUFwcGxpY2F0aW9uUGFja2FnZT9hcGktdmVyc2lvbj0yMDIyLTEwLTAx", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/automation/providers/Microsoft.Batch/batchAccounts/billstestba24326/applications/updateApplicationPackage?api-version=2022-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24vcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL2JpbGxzdGVzdGJhMjQzMjYvYXBwbGljYXRpb25zL3VwZGF0ZUFwcGxpY2F0aW9uUGFja2FnZT9hcGktdmVyc2lvbj0yMDIyLTEwLTAx", "RequestMethod": "DELETE", "RequestHeaders": { "x-ms-client-request-id": [ - "322cc0d0-6e0a-40cb-8cf5-70a4535fe12b" + "7dcf7d58-eb65-4bf9-8979-b5af2fdc2390" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Batch.BatchManagementClient/14.2.0.0" ] }, @@ -513,7 +534,7 @@ "no-cache" ], "x-ms-request-id": [ - "cfc899f3-4e65-4317-940e-9741f138a22d" + "6c868273-0391-4811-bc0d-f80a6429925e" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -521,20 +542,23 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], "x-ms-ratelimit-remaining-subscription-deletes": [ - "14998" + "14999" ], "x-ms-correlation-request-id": [ - "61a291c8-51df-4af4-b785-842eddd58806" + "2648b3c9-555d-44be-80b8-3cd54516ad37" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072303Z:61a291c8-51df-4af4-b785-842eddd58806" + "WESTUS2:20240321T230740Z:2648b3c9-555d-44be-80b8-3cd54516ad37" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: A69A7299A0704B268908B52C9FB7A71F Ref B: CO6AA3150218025 Ref C: 2024-03-21T23:07:39Z" ], "Date": [ - "Fri, 16 Jun 2023 07:23:03 GMT" + "Thu, 21 Mar 2024 23:07:39 GMT" ], "Expires": [ "-1" @@ -549,9 +573,9 @@ ], "Names": {}, "Variables": { - "SubscriptionId": "21abd678-18c5-4660-9fdd-8c5ba6b6fe1f", - "AZURE_BATCH_ACCOUNT": "hoppeeastasia2", - "AZURE_BATCH_ENDPOINT": "https://hoppeeastasia2.eastasia.batch.azure.com", - "AZURE_BATCH_RESOURCE_GROUP": "123" + "SubscriptionId": "6602ac9a-5dad-41bd-a792-592c704b6a31", + "AZURE_BATCH_ACCOUNT": "billstestba24326", + "AZURE_BATCH_ENDPOINT": "https://billstestba24326.uksouth.batch.azure.com", + "AZURE_BATCH_RESOURCE_GROUP": "automation" } } \ No newline at end of file diff --git a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchApplicationPackageTests/TestUpdatePoolWithApplicationPackage.json b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchApplicationPackageTests/TestUpdatePoolWithApplicationPackage.json index 5e0fe9923a1b..5d96ee3f9225 100644 --- a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchApplicationPackageTests/TestUpdatePoolWithApplicationPackage.json +++ b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchApplicationPackageTests/TestUpdatePoolWithApplicationPackage.json @@ -1,20 +1,20 @@ { "Entries": [ { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/hoppeeastasia2/applications/updatePoolWithApplicationPackage/versions/foo?api-version=2022-10-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzLzEyMy9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvaG9wcGVlYXN0YXNpYTIvYXBwbGljYXRpb25zL3VwZGF0ZVBvb2xXaXRoQXBwbGljYXRpb25QYWNrYWdlL3ZlcnNpb25zL2Zvbz9hcGktdmVyc2lvbj0yMDIyLTEwLTAx", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/automation/providers/Microsoft.Batch/batchAccounts/billstestba24326/applications/updatePoolWithApplicationPackage/versions/foo?api-version=2022-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24vcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL2JpbGxzdGVzdGJhMjQzMjYvYXBwbGljYXRpb25zL3VwZGF0ZVBvb2xXaXRoQXBwbGljYXRpb25QYWNrYWdlL3ZlcnNpb25zL2Zvbz9hcGktdmVyc2lvbj0yMDIyLTEwLTAx", "RequestMethod": "PUT", "RequestHeaders": { "x-ms-client-request-id": [ - "bd7b8d68-03df-4698-9139-1c4a837a793c" + "189b14b1-d5d4-4b99-97cb-54c8c17a64c5" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Batch.BatchManagementClient/14.2.0.0" ] }, @@ -27,13 +27,10 @@ "no-cache" ], "ETag": [ - "W/\"0x8DB6E3A898361F5\"" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" + "W/\"0x8DC4AA6EC73E7FD\"" ], "x-ms-request-id": [ - "c79fa24d-3718-4a1e-a8cc-c12c5cc9a93e" + "fee833d8-8846-4660-992e-2d70aedd9173" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -41,20 +38,26 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" ], "x-ms-correlation-request-id": [ - "ac5714ca-09c3-4a1e-8af1-12e04bc07486" + "1a379142-3642-4257-9d85-571e222f7a26" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072309Z:ac5714ca-09c3-4a1e-8af1-12e04bc07486" + "WESTUS2:20240322T193317Z:1a379142-3642-4257-9d85-571e222f7a26" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: BA7755D395554555895BDA40B96FB17E Ref B: CO6AA3150220053 Ref C: 2024-03-22T19:33:16Z" ], "Date": [ - "Fri, 16 Jun 2023 07:23:09 GMT" + "Fri, 22 Mar 2024 19:33:17 GMT" ], "Content-Length": [ - "809" + "655" ], "Content-Type": [ "application/json; charset=utf-8" @@ -63,56 +66,56 @@ "-1" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:23:09 GMT" + "Fri, 22 Mar 2024 19:33:17 GMT" ] }, - "ResponseBody": "{\r\n \"type\": \"Microsoft.Batch/batchAccounts/applications/versions\",\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/hoppeeastasia2/applications/updatePoolWithApplicationPackage/versions/foo\",\r\n \"name\": \"foo\",\r\n \"etag\": \"W/\\\"0x8DB6E3A898361F5\\\"\",\r\n \"properties\": {\r\n \"storageUrl\": \"https://hoppeeastasia123.blob.core.windows.net/app-updatepoolwithapplicationp-e059ff007cce4a9c9b8ce16f9802a901/foo?sv=2019-07-07&sr=b&sig=1bknvj0ZwPcTM96bAPtY8fE4A42sIYPAwbNETFFsROM%3D&skoid=91248766-5d90-412c-a3a7-792c4ef92a2e&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2023-06-16T07%3A18%3A09Z&ske=2023-06-16T11%3A23%3A09Z&sks=b&skv=2019-07-07&st=2023-06-16T07%3A18%3A09Z&se=2023-06-16T11%3A23%3A09Z&sp=rw\",\r\n \"storageUrlExpiry\": \"2023-06-16T11:23:09.762903Z\",\r\n \"state\": \"Pending\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"type\": \"Microsoft.Batch/batchAccounts/applications/versions\",\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/automation/providers/Microsoft.Batch/batchAccounts/billstestba24326/applications/updatePoolWithApplicationPackage/versions/foo\",\r\n \"name\": \"foo\",\r\n \"etag\": \"W/\\\"0x8DC4AA6EC73E7FD\\\"\",\r\n \"properties\": {\r\n \"storageUrl\": \"https://billsstorage24326.blob.core.windows.net/app-updatepoolwithapplicationp-6afd6a7164304d8d80c796f2d4dd73c6/foo?sv=2018-03-28&sr=b&sig=oWLXem9J1Rok2VJ45xhsnCO1NEsqNZRQYmK2uHyNS2Y%3D&st=2024-03-22T19%3A28%3A17Z&se=2024-03-22T23%3A33%3A17Z&sp=rw\",\r\n \"storageUrlExpiry\": \"2024-03-22T23:33:17.1967418Z\",\r\n \"state\": \"Pending\"\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", + "RequestUri": "/pools?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "11cbc616-0484-470b-b854-fba27653f90e" + "c7b06113-712a-4050-a0eb-b9d173405ae8" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:23:08 GMT" + "Fri, 22 Mar 2024 19:33:17 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Type": [ "application/json; odata=minimalmetadata; charset=utf-8" ], "Content-Length": [ - "308" + "527" ] }, - "RequestBody": "{\r\n \"id\": \"testUpdatePoolWithAppPackages\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"4\",\r\n \"osVersion\": \"*\"\r\n },\r\n \"targetDedicatedNodes\": 1,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableInterNodeCommunication\": true,\r\n \"targetNodeCommunicationMode\": \"classic\"\r\n}", + "RequestBody": "{\r\n \"id\": \"testUpdatePoolWithAppPackages\",\r\n \"vmSize\": \"STANDARD_D2S_V3\",\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"zonal\"\r\n }\r\n },\r\n \"targetDedicatedNodes\": 1,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableInterNodeCommunication\": false,\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", "ResponseHeaders": { "Transfer-Encoding": [ "chunked" ], "ETag": [ - "0x8DB6E3A89D9FE22" + "0x8DC4AA6ED109CDA" ], "Location": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/pools/testUpdatePoolWithAppPackages" + "https://billstestba24326.uksouth.batch.azure.com/pools/testUpdatePoolWithAppPackages" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "77e7bbf2-89c3-475b-b2c7-e31949ab6976" + "cc026161-8346-4f66-8a46-ccbf1dd97d33" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -124,33 +127,33 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/pools/testUpdatePoolWithAppPackages" + "https://billstestba24326.uksouth.batch.azure.com/pools/testUpdatePoolWithAppPackages" ], "Date": [ - "Fri, 16 Jun 2023 07:23:10 GMT" + "Fri, 22 Mar 2024 19:33:18 GMT" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:23:10 GMT" + "Fri, 22 Mar 2024 19:33:18 GMT" ] }, "ResponseBody": "", "StatusCode": 201 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/hoppeeastasia2/applications/updatePoolWithApplicationPackage/versions/foo/activate?api-version=2022-10-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzLzEyMy9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvaG9wcGVlYXN0YXNpYTIvYXBwbGljYXRpb25zL3VwZGF0ZVBvb2xXaXRoQXBwbGljYXRpb25QYWNrYWdlL3ZlcnNpb25zL2Zvby9hY3RpdmF0ZT9hcGktdmVyc2lvbj0yMDIyLTEwLTAx", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/automation/providers/Microsoft.Batch/batchAccounts/billstestba24326/applications/updatePoolWithApplicationPackage/versions/foo/activate?api-version=2022-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24vcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL2JpbGxzdGVzdGJhMjQzMjYvYXBwbGljYXRpb25zL3VwZGF0ZVBvb2xXaXRoQXBwbGljYXRpb25QYWNrYWdlL3ZlcnNpb25zL2Zvby9hY3RpdmF0ZT9hcGktdmVyc2lvbj0yMDIyLTEwLTAx", "RequestMethod": "POST", "RequestHeaders": { "x-ms-client-request-id": [ - "a945446c-3a1f-4046-b70d-451139084a12" + "29559fd6-06b0-4b38-9814-a66949a20eca" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Batch.BatchManagementClient/14.2.0.0" ], "Content-Type": [ @@ -169,13 +172,10 @@ "no-cache" ], "ETag": [ - "W/\"0x8DB6E3A8A4FE318\"" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" + "W/\"0x8DC4AA6EE009216\"" ], "x-ms-request-id": [ - "bbfbcd61-df3e-4f9b-ba7a-0bacf51d82d8" + "1b62c154-2075-41fc-ace2-3ddca33acca3" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -183,20 +183,26 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" ], "x-ms-correlation-request-id": [ - "15f1c884-4d35-4e3f-bfba-3f8f6a4dffbb" + "570c3fd8-04bc-4087-861a-27e8093cd86a" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072311Z:15f1c884-4d35-4e3f-bfba-3f8f6a4dffbb" + "WESTUS2:20240322T193319Z:570c3fd8-04bc-4087-861a-27e8093cd86a" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: D656840C8E2E42CA8FE85A6474CAF502 Ref B: CO6AA3150220053 Ref C: 2024-03-22T19:33:19Z" ], "Date": [ - "Fri, 16 Jun 2023 07:23:11 GMT" + "Fri, 22 Mar 2024 19:33:19 GMT" ], "Content-Length": [ - "880" + "727" ], "Content-Type": [ "application/json; charset=utf-8" @@ -205,27 +211,27 @@ "-1" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:23:11 GMT" + "Fri, 22 Mar 2024 19:33:19 GMT" ] }, - "ResponseBody": "{\r\n \"type\": \"Microsoft.Batch/batchAccounts/applications/versions\",\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/hoppeeastasia2/applications/updatePoolWithApplicationPackage/versions/foo\",\r\n \"name\": \"foo\",\r\n \"etag\": \"W/\\\"0x8DB6E3A8A4FE318\\\"\",\r\n \"properties\": {\r\n \"storageUrl\": \"https://hoppeeastasia123.blob.core.windows.net/app-updatepoolwithapplicationp-e059ff007cce4a9c9b8ce16f9802a901/foo?sv=2019-07-07&sr=b&sig=m2d3UW0LV%2Fa7BmH4BGhDZwDLKqBS4l%2B5yPqpJk31p7g%3D&skoid=91248766-5d90-412c-a3a7-792c4ef92a2e&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2023-06-16T07%3A18%3A11Z&ske=2023-06-16T11%3A23%3A11Z&sks=b&skv=2019-07-07&st=2023-06-16T07%3A18%3A11Z&se=2023-06-16T11%3A23%3A11Z&sp=rw\",\r\n \"storageUrlExpiry\": \"2023-06-16T11:23:11.1121133Z\",\r\n \"state\": \"Active\",\r\n \"format\": \"zip\",\r\n \"lastActivationTime\": \"2023-06-16T07:23:11.0636396Z\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"type\": \"Microsoft.Batch/batchAccounts/applications/versions\",\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/automation/providers/Microsoft.Batch/batchAccounts/billstestba24326/applications/updatePoolWithApplicationPackage/versions/foo\",\r\n \"name\": \"foo\",\r\n \"etag\": \"W/\\\"0x8DC4AA6EE009216\\\"\",\r\n \"properties\": {\r\n \"storageUrl\": \"https://billsstorage24326.blob.core.windows.net/app-updatepoolwithapplicationp-6afd6a7164304d8d80c796f2d4dd73c6/foo?sv=2018-03-28&sr=b&sig=PaE3D2Rne0iCvYi4ZIjqD0i%2BpzpCGsesQi%2Bk%2BJAMPCg%3D&st=2024-03-22T19%3A28%3A19Z&se=2024-03-22T23%3A33%3A19Z&sp=rw\",\r\n \"storageUrlExpiry\": \"2024-03-22T23:33:19.8066702Z\",\r\n \"state\": \"Active\",\r\n \"format\": \"zip\",\r\n \"lastActivationTime\": \"2024-03-22T19:33:19.7737477Z\"\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/hoppeeastasia2/applications/updatePoolWithApplicationPackage/versions/foo?api-version=2022-10-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzLzEyMy9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvaG9wcGVlYXN0YXNpYTIvYXBwbGljYXRpb25zL3VwZGF0ZVBvb2xXaXRoQXBwbGljYXRpb25QYWNrYWdlL3ZlcnNpb25zL2Zvbz9hcGktdmVyc2lvbj0yMDIyLTEwLTAx", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/automation/providers/Microsoft.Batch/batchAccounts/billstestba24326/applications/updatePoolWithApplicationPackage/versions/foo?api-version=2022-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24vcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL2JpbGxzdGVzdGJhMjQzMjYvYXBwbGljYXRpb25zL3VwZGF0ZVBvb2xXaXRoQXBwbGljYXRpb25QYWNrYWdlL3ZlcnNpb25zL2Zvbz9hcGktdmVyc2lvbj0yMDIyLTEwLTAx", "RequestMethod": "GET", "RequestHeaders": { "x-ms-client-request-id": [ - "a945446c-3a1f-4046-b70d-451139084a12" + "29559fd6-06b0-4b38-9814-a66949a20eca" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Batch.BatchManagementClient/14.2.0.0" ] }, @@ -238,13 +244,10 @@ "no-cache" ], "ETag": [ - "W/\"0x8DB6E3A8A4FE318\"" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" + "W/\"0x8DC4AA6EE009216\"" ], "x-ms-request-id": [ - "4258a880-470c-4fa7-870a-d701fce28c84" + "3f834287-eab2-4935-b643-1a25aeab7702" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -252,20 +255,26 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" ], "x-ms-correlation-request-id": [ - "d875a635-5515-4f79-a43d-0f198b3519b0" + "1284573f-74a1-4982-ad97-abed3045d6fa" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072311Z:d875a635-5515-4f79-a43d-0f198b3519b0" + "WESTUS2:20240322T193320Z:1284573f-74a1-4982-ad97-abed3045d6fa" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 4009F293C95E475FB73E55C22726822C Ref B: CO6AA3150220053 Ref C: 2024-03-22T19:33:19Z" ], "Date": [ - "Fri, 16 Jun 2023 07:23:11 GMT" + "Fri, 22 Mar 2024 19:33:20 GMT" ], "Content-Length": [ - "880" + "723" ], "Content-Type": [ "application/json; charset=utf-8" @@ -274,34 +283,34 @@ "-1" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:23:11 GMT" + "Fri, 22 Mar 2024 19:33:19 GMT" ] }, - "ResponseBody": "{\r\n \"type\": \"Microsoft.Batch/batchAccounts/applications/versions\",\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/hoppeeastasia2/applications/updatePoolWithApplicationPackage/versions/foo\",\r\n \"name\": \"foo\",\r\n \"etag\": \"W/\\\"0x8DB6E3A8A4FE318\\\"\",\r\n \"properties\": {\r\n \"storageUrl\": \"https://hoppeeastasia123.blob.core.windows.net/app-updatepoolwithapplicationp-e059ff007cce4a9c9b8ce16f9802a901/foo?sv=2019-07-07&sr=b&sig=m2d3UW0LV%2Fa7BmH4BGhDZwDLKqBS4l%2B5yPqpJk31p7g%3D&skoid=91248766-5d90-412c-a3a7-792c4ef92a2e&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2023-06-16T07%3A18%3A11Z&ske=2023-06-16T11%3A23%3A11Z&sks=b&skv=2019-07-07&st=2023-06-16T07%3A18%3A11Z&se=2023-06-16T11%3A23%3A11Z&sp=rw\",\r\n \"storageUrlExpiry\": \"2023-06-16T11:23:11.4347284Z\",\r\n \"state\": \"Active\",\r\n \"format\": \"zip\",\r\n \"lastActivationTime\": \"2023-06-16T07:23:11.0636396Z\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"type\": \"Microsoft.Batch/batchAccounts/applications/versions\",\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/automation/providers/Microsoft.Batch/batchAccounts/billstestba24326/applications/updatePoolWithApplicationPackage/versions/foo\",\r\n \"name\": \"foo\",\r\n \"etag\": \"W/\\\"0x8DC4AA6EE009216\\\"\",\r\n \"properties\": {\r\n \"storageUrl\": \"https://billsstorage24326.blob.core.windows.net/app-updatepoolwithapplicationp-6afd6a7164304d8d80c796f2d4dd73c6/foo?sv=2018-03-28&sr=b&sig=uLAO4lA%2FzwMih0TdtZRT6Rpoo9OOwzf5bPCyChC6i1I%3D&st=2024-03-22T19%3A28%3A20Z&se=2024-03-22T23%3A33%3A20Z&sp=rw\",\r\n \"storageUrlExpiry\": \"2024-03-22T23:33:20.5771288Z\",\r\n \"state\": \"Active\",\r\n \"format\": \"zip\",\r\n \"lastActivationTime\": \"2024-03-22T19:33:19.7737477Z\"\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/testUpdatePoolWithAppPackages?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RVcGRhdGVQb29sV2l0aEFwcFBhY2thZ2VzP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", + "RequestUri": "/pools/testUpdatePoolWithAppPackages?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3Rlc3RVcGRhdGVQb29sV2l0aEFwcFBhY2thZ2VzP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "659592f9-7f55-409b-ad4c-e2a780599aa9" + "39bc6115-a47a-4ada-b435-33b82b47d115" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:23:10 GMT" + "Fri, 22 Mar 2024 19:33:20 GMT" ], "x-ms-client-request-id": [ - "56116def-2986-4ff0-8d24-eb1649b0a2ed" + "c4676263-44eb-4b26-a2ca-79111049de3d" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -311,13 +320,13 @@ "chunked" ], "ETag": [ - "0x8DB6E3A89D9FE22" + "0x8DC4AA6ED109CDA" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "2e79aa17-f26c-4ca9-af53-d920089efb11" + "2c0fb279-e180-4185-9aca-c531e4398cc8" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -329,40 +338,40 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:23:11 GMT" + "Fri, 22 Mar 2024 19:33:21 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:23:10 GMT" + "Fri, 22 Mar 2024 19:33:18 GMT" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"testUpdatePoolWithAppPackages\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/testUpdatePoolWithAppPackages\",\r\n \"eTag\": \"0x8DB6E3A89D9FE22\",\r\n \"lastModified\": \"2023-06-16T07:23:10.2980642Z\",\r\n \"creationTime\": \"2023-06-16T07:23:10.2980642Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:23:10.2980642Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2023-06-16T07:23:10.2980642Z\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 1,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": true,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"4\",\r\n \"osVersion\": \"*\"\r\n },\r\n \"targetNodeCommunicationMode\": \"classic\"\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"testUpdatePoolWithAppPackages\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/testUpdatePoolWithAppPackages\",\r\n \"eTag\": \"0x8DC4AA6ED109CDA\",\r\n \"lastModified\": \"2024-03-22T19:33:18.208329Z\",\r\n \"creationTime\": \"2024-03-22T19:33:18.2083278Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T19:33:18.2083278Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T19:33:18.2083291Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 1,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/testUpdatePoolWithAppPackages?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RVcGRhdGVQb29sV2l0aEFwcFBhY2thZ2VzP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", + "RequestUri": "/pools/testUpdatePoolWithAppPackages?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3Rlc3RVcGRhdGVQb29sV2l0aEFwcFBhY2thZ2VzP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "ffe9d0cf-eb93-4a9f-a88e-ca0d9bf5e9ac" + "de7d70e0-0716-44a6-83ca-01273deb4213" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:23:10 GMT" + "Fri, 22 Mar 2024 19:33:22 GMT" ], "x-ms-client-request-id": [ - "fffc0e4b-3e23-4e7a-b973-c3da309d215e" + "90cf8ebf-0c17-48a6-bf8d-97e7b04e6dcd" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -372,13 +381,13 @@ "chunked" ], "ETag": [ - "0x8DB6E3A8ADC8EB0" + "0x8DC4AA6EF6FC6E0" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "4e140316-aad1-417a-a2f4-bcb7f994351a" + "6c1957a5-d316-4ee7-b12e-39daba8b0295" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -390,40 +399,40 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:23:11 GMT" + "Fri, 22 Mar 2024 19:33:22 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:23:11 GMT" + "Fri, 22 Mar 2024 19:33:22 GMT" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"testUpdatePoolWithAppPackages\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/testUpdatePoolWithAppPackages\",\r\n \"eTag\": \"0x8DB6E3A8ADC8EB0\",\r\n \"lastModified\": \"2023-06-16T07:23:11.9925936Z\",\r\n \"creationTime\": \"2023-06-16T07:23:10.2980642Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:23:10.2980642Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2023-06-16T07:23:10.2980642Z\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 1,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": true,\r\n \"certificateReferences\": [],\r\n \"applicationPackageReferences\": [\r\n {\r\n \"applicationId\": \"updatepoolwithapplicationpackage\",\r\n \"version\": \"foo\"\r\n }\r\n ],\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"4\",\r\n \"osVersion\": \"*\"\r\n },\r\n \"targetNodeCommunicationMode\": \"classic\"\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"testUpdatePoolWithAppPackages\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/testUpdatePoolWithAppPackages\",\r\n \"eTag\": \"0x8DC4AA6EF6FC6E0\",\r\n \"lastModified\": \"2024-03-22T19:33:22.18744Z\",\r\n \"creationTime\": \"2024-03-22T19:33:18.2083278Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T19:33:18.2083278Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T19:33:18.2083291Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 1,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"certificateReferences\": [],\r\n \"applicationPackageReferences\": [\r\n {\r\n \"applicationId\": \"updatepoolwithapplicationpackage\",\r\n \"version\": \"foo\"\r\n }\r\n ],\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/testUpdatePoolWithAppPackages/updateproperties?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RVcGRhdGVQb29sV2l0aEFwcFBhY2thZ2VzL3VwZGF0ZXByb3BlcnRpZXM/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/pools/testUpdatePoolWithAppPackages/updateproperties?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3Rlc3RVcGRhdGVQb29sV2l0aEFwcFBhY2thZ2VzL3VwZGF0ZXByb3BlcnRpZXM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "9a838e6c-ad3e-4232-a880-3afc30cc0965" + "d9b5215e-3b58-45a7-8897-a565876f03c2" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:23:10 GMT" + "Fri, 22 Mar 2024 19:33:21 GMT" ], "x-ms-client-request-id": [ - "7b355bc7-1476-47c7-b7c2-61c64ad59e1e" + "a0151d1d-39cf-4c2a-9c35-0ba297d9768d" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Type": [ @@ -433,16 +442,16 @@ "240" ] }, - "RequestBody": "{\r\n \"certificateReferences\": [],\r\n \"applicationPackageReferences\": [\r\n {\r\n \"applicationId\": \"updatePoolWithApplicationPackage\",\r\n \"version\": \"foo\"\r\n }\r\n ],\r\n \"metadata\": [],\r\n \"targetNodeCommunicationMode\": \"classic\"\r\n}", + "RequestBody": "{\r\n \"certificateReferences\": [],\r\n \"applicationPackageReferences\": [\r\n {\r\n \"applicationId\": \"updatePoolWithApplicationPackage\",\r\n \"version\": \"foo\"\r\n }\r\n ],\r\n \"metadata\": [],\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", "ResponseHeaders": { "ETag": [ - "0x8DB6E3A8ADC8EB0" + "0x8DC4AA6EF6FC6E0" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "a8b6cc82-9ba5-4a92-9d3e-7976c0828b6c" + "d2d4d3cd-7db8-43d6-abf4-0c237c635e86" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -454,36 +463,36 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/pools/testUpdatePoolWithAppPackages/updateproperties" + "https://billstestba24326.uksouth.batch.azure.com/pools/testUpdatePoolWithAppPackages/updateproperties" ], "Date": [ - "Fri, 16 Jun 2023 07:23:11 GMT" + "Fri, 22 Mar 2024 19:33:22 GMT" ], "Content-Length": [ "0" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:23:11 GMT" + "Fri, 22 Mar 2024 19:33:22 GMT" ] }, "ResponseBody": "", "StatusCode": 204 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/hoppeeastasia2/applications/updatePoolWithApplicationPackage/versions/foo?api-version=2022-10-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzLzEyMy9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvaG9wcGVlYXN0YXNpYTIvYXBwbGljYXRpb25zL3VwZGF0ZVBvb2xXaXRoQXBwbGljYXRpb25QYWNrYWdlL3ZlcnNpb25zL2Zvbz9hcGktdmVyc2lvbj0yMDIyLTEwLTAx", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/automation/providers/Microsoft.Batch/batchAccounts/billstestba24326/applications/updatePoolWithApplicationPackage/versions/foo?api-version=2022-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24vcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL2JpbGxzdGVzdGJhMjQzMjYvYXBwbGljYXRpb25zL3VwZGF0ZVBvb2xXaXRoQXBwbGljYXRpb25QYWNrYWdlL3ZlcnNpb25zL2Zvbz9hcGktdmVyc2lvbj0yMDIyLTEwLTAx", "RequestMethod": "DELETE", "RequestHeaders": { "x-ms-client-request-id": [ - "45745074-6956-42dd-9f0d-1b59e9bce4b9" + "5e3fca4c-9033-4366-9616-25b77bf970af" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Batch.BatchManagementClient/14.2.0.0" ] }, @@ -496,7 +505,7 @@ "no-cache" ], "x-ms-request-id": [ - "bdc48c8d-b3da-43f4-9fc5-d58261f10e7e" + "9475f5a9-9dbb-49cb-ba15-8baee7933f37" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -504,20 +513,23 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], "x-ms-correlation-request-id": [ - "a949023f-1e15-45f5-a211-6c7b2a7f740e" + "0abd472a-31d2-4920-b297-bb3d186dd0d7" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072312Z:a949023f-1e15-45f5-a211-6c7b2a7f740e" + "WESTUS2:20240322T193323Z:0abd472a-31d2-4920-b297-bb3d186dd0d7" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: CE2CBF3B77944840A13BAB78D67FE4E9 Ref B: CO6AA3150220053 Ref C: 2024-03-22T19:33:22Z" ], "Date": [ - "Fri, 16 Jun 2023 07:23:12 GMT" + "Fri, 22 Mar 2024 19:33:22 GMT" ], "Expires": [ "-1" @@ -530,20 +542,20 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/hoppeeastasia2/applications/updatePoolWithApplicationPackage?api-version=2022-10-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzLzEyMy9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvaG9wcGVlYXN0YXNpYTIvYXBwbGljYXRpb25zL3VwZGF0ZVBvb2xXaXRoQXBwbGljYXRpb25QYWNrYWdlP2FwaS12ZXJzaW9uPTIwMjItMTAtMDE=", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/automation/providers/Microsoft.Batch/batchAccounts/billstestba24326/applications/updatePoolWithApplicationPackage?api-version=2022-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24vcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL2JpbGxzdGVzdGJhMjQzMjYvYXBwbGljYXRpb25zL3VwZGF0ZVBvb2xXaXRoQXBwbGljYXRpb25QYWNrYWdlP2FwaS12ZXJzaW9uPTIwMjItMTAtMDE=", "RequestMethod": "DELETE", "RequestHeaders": { "x-ms-client-request-id": [ - "2b5f7129-ac3b-4baf-b1c1-65bc2704042f" + "19500f84-f8fd-4d5e-977e-6c66c48d29bd" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Batch.BatchManagementClient/14.2.0.0" ] }, @@ -556,7 +568,7 @@ "no-cache" ], "x-ms-request-id": [ - "e182258f-6093-418f-8025-7e1aa115b08a" + "7f40db78-474c-4dae-b2bd-3907d8ded9e0" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -564,20 +576,23 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], "x-ms-ratelimit-remaining-subscription-deletes": [ - "14998" + "14999" ], "x-ms-correlation-request-id": [ - "3ef847f2-7dfb-4d9d-8cfa-dec7cd6ac7f4" + "d479e13e-9c34-4e22-a9e8-6cf3a582e6f1" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072312Z:3ef847f2-7dfb-4d9d-8cfa-dec7cd6ac7f4" + "WESTUS2:20240322T193323Z:d479e13e-9c34-4e22-a9e8-6cf3a582e6f1" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 5DC5EDC1F5DE415AB6F3AAEAD5486BBC Ref B: CO6AA3150220053 Ref C: 2024-03-22T19:33:23Z" ], "Date": [ - "Fri, 16 Jun 2023 07:23:12 GMT" + "Fri, 22 Mar 2024 19:33:23 GMT" ], "Expires": [ "-1" @@ -590,24 +605,24 @@ "StatusCode": 200 }, { - "RequestUri": "/pools/testUpdatePoolWithAppPackages?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RVcGRhdGVQb29sV2l0aEFwcFBhY2thZ2VzP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", + "RequestUri": "/pools/testUpdatePoolWithAppPackages?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3Rlc3RVcGRhdGVQb29sV2l0aEFwcFBhY2thZ2VzP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", "RequestMethod": "DELETE", "RequestHeaders": { "client-request-id": [ - "7dfde1d4-81ba-4815-adb6-ba3dc83d493f" + "94afc9f6-ed9b-494b-82bc-16475f10de14" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:23:11 GMT" + "Fri, 22 Mar 2024 19:33:23 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Length": [ @@ -623,7 +638,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "6a44db8b-5569-49a3-b055-8375bf0b4d94" + "9848a0ab-0292-4b19-a1f7-1303d81728a0" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -635,7 +650,7 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:23:12 GMT" + "Fri, 22 Mar 2024 19:33:23 GMT" ] }, "ResponseBody": "", @@ -644,9 +659,9 @@ ], "Names": {}, "Variables": { - "SubscriptionId": "21abd678-18c5-4660-9fdd-8c5ba6b6fe1f", - "AZURE_BATCH_ACCOUNT": "hoppeeastasia2", - "AZURE_BATCH_ENDPOINT": "https://hoppeeastasia2.eastasia.batch.azure.com", - "AZURE_BATCH_RESOURCE_GROUP": "123" + "SubscriptionId": "6602ac9a-5dad-41bd-a792-592c704b6a31", + "AZURE_BATCH_ACCOUNT": "billstestba24326", + "AZURE_BATCH_ENDPOINT": "https://billstestba24326.uksouth.batch.azure.com", + "AZURE_BATCH_RESOURCE_GROUP": "automation" } } \ No newline at end of file diff --git a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchApplicationPackageTests/TestUploadApplicationPackage.json b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchApplicationPackageTests/TestUploadApplicationPackage.json index d13c261dda3f..30c3a9e83122 100644 --- a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchApplicationPackageTests/TestUploadApplicationPackage.json +++ b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchApplicationPackageTests/TestUploadApplicationPackage.json @@ -1,20 +1,20 @@ { "Entries": [ { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/hoppeeastasia2/applications/newApplicationPackage/versions/foo?api-version=2022-10-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzLzEyMy9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvaG9wcGVlYXN0YXNpYTIvYXBwbGljYXRpb25zL25ld0FwcGxpY2F0aW9uUGFja2FnZS92ZXJzaW9ucy9mb28/YXBpLXZlcnNpb249MjAyMi0xMC0wMQ==", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/automation/providers/Microsoft.Batch/batchAccounts/billstestba24326/applications/newApplicationPackage/versions/foo?api-version=2022-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24vcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL2JpbGxzdGVzdGJhMjQzMjYvYXBwbGljYXRpb25zL25ld0FwcGxpY2F0aW9uUGFja2FnZS92ZXJzaW9ucy9mb28/YXBpLXZlcnNpb249MjAyMi0xMC0wMQ==", "RequestMethod": "PUT", "RequestHeaders": { "x-ms-client-request-id": [ - "02e43ca6-f29b-4fbc-826e-a6d60b11a882" + "27156b57-ffe1-4aba-8816-dfbcfabe23af" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Batch.BatchManagementClient/14.2.0.0" ] }, @@ -27,13 +27,10 @@ "no-cache" ], "ETag": [ - "W/\"0x8DB6E3A872000FB\"" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" + "W/\"0x8DC49FBB6868165\"" ], "x-ms-request-id": [ - "659467c7-ea24-4db7-9bc4-4cfbd7af078e" + "06d6fb61-9c01-4158-8800-93bf17dffb3d" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -41,20 +38,26 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" ], "x-ms-correlation-request-id": [ - "869dbee0-2492-4976-b205-92e1e5c05aa4" + "f5507f5e-b99f-4388-8a59-b37c95b93411" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072305Z:869dbee0-2492-4976-b205-92e1e5c05aa4" + "WESTUS2:20240321T230742Z:f5507f5e-b99f-4388-8a59-b37c95b93411" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 72F0604066254976B35C589DB091C7F0 Ref B: CO6AA3150218021 Ref C: 2024-03-21T23:07:41Z" ], "Date": [ - "Fri, 16 Jun 2023 07:23:05 GMT" + "Thu, 21 Mar 2024 23:07:42 GMT" ], "Content-Length": [ - "796" + "639" ], "Content-Type": [ "application/json; charset=utf-8" @@ -63,27 +66,27 @@ "-1" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:23:05 GMT" + "Thu, 21 Mar 2024 23:07:42 GMT" ] }, - "ResponseBody": "{\r\n \"type\": \"Microsoft.Batch/batchAccounts/applications/versions\",\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/hoppeeastasia2/applications/newApplicationPackage/versions/foo\",\r\n \"name\": \"foo\",\r\n \"etag\": \"W/\\\"0x8DB6E3A872000FB\\\"\",\r\n \"properties\": {\r\n \"storageUrl\": \"https://hoppeeastasia123.blob.core.windows.net/app-newapplicationpackage-43886b5010044e639ff291e2c766e583/foo?sv=2019-07-07&sr=b&sig=Hm1twGh8vnh18BYIXkJnUYy7d8s%2BbZofA1WErLjeUs8%3D&skoid=91248766-5d90-412c-a3a7-792c4ef92a2e&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2023-06-16T07%3A18%3A05Z&ske=2023-06-16T11%3A23%3A05Z&sks=b&skv=2019-07-07&st=2023-06-16T07%3A18%3A05Z&se=2023-06-16T11%3A23%3A05Z&sp=rw\",\r\n \"storageUrlExpiry\": \"2023-06-16T11:23:05.7326666Z\",\r\n \"state\": \"Pending\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"type\": \"Microsoft.Batch/batchAccounts/applications/versions\",\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/automation/providers/Microsoft.Batch/batchAccounts/billstestba24326/applications/newApplicationPackage/versions/foo\",\r\n \"name\": \"foo\",\r\n \"etag\": \"W/\\\"0x8DC49FBB6868165\\\"\",\r\n \"properties\": {\r\n \"storageUrl\": \"https://billsstorage24326.blob.core.windows.net/app-newapplicationpackage-7b64ca4997c142418bea46e5fc424265/foo?sv=2018-03-28&sr=b&sig=NlE2lRbK4SCUtKwaVjxo4W6DbQdzPr5ng220dlGSY2E%3D&st=2024-03-21T23%3A02%3A42Z&se=2024-03-22T03%3A07%3A42Z&sp=rw\",\r\n \"storageUrlExpiry\": \"2024-03-22T03:07:42.7823494Z\",\r\n \"state\": \"Pending\"\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/hoppeeastasia2/applications/newApplicationPackage/versions/foo/activate?api-version=2022-10-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzLzEyMy9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvaG9wcGVlYXN0YXNpYTIvYXBwbGljYXRpb25zL25ld0FwcGxpY2F0aW9uUGFja2FnZS92ZXJzaW9ucy9mb28vYWN0aXZhdGU/YXBpLXZlcnNpb249MjAyMi0xMC0wMQ==", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/automation/providers/Microsoft.Batch/batchAccounts/billstestba24326/applications/newApplicationPackage/versions/foo/activate?api-version=2022-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24vcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL2JpbGxzdGVzdGJhMjQzMjYvYXBwbGljYXRpb25zL25ld0FwcGxpY2F0aW9uUGFja2FnZS92ZXJzaW9ucy9mb28vYWN0aXZhdGU/YXBpLXZlcnNpb249MjAyMi0xMC0wMQ==", "RequestMethod": "POST", "RequestHeaders": { "x-ms-client-request-id": [ - "5180d757-1d21-4a32-b70f-3fb80d2021ea" + "611a1509-128c-425e-abef-6bced231e672" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Batch.BatchManagementClient/14.2.0.0" ], "Content-Type": [ @@ -102,13 +105,10 @@ "no-cache" ], "ETag": [ - "W/\"0x8DB6E3A8793999C\"" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" + "W/\"0x8DC49FBB722393E\"" ], "x-ms-request-id": [ - "ababda8f-d0f9-452a-b362-3f2032ac7f9a" + "1874711d-aaaf-4379-9db9-2834720cc969" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -116,20 +116,26 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" ], "x-ms-correlation-request-id": [ - "ae51e97f-1183-4dff-8825-f81fd46e1e2e" + "3e64e1e7-e189-411c-941e-4f7e47073716" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072306Z:ae51e97f-1183-4dff-8825-f81fd46e1e2e" + "WESTUS2:20240321T230743Z:3e64e1e7-e189-411c-941e-4f7e47073716" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 4AB57D9AC4184E67A7802FB249761E42 Ref B: CO6AA3150218021 Ref C: 2024-03-21T23:07:43Z" ], "Date": [ - "Fri, 16 Jun 2023 07:23:05 GMT" + "Thu, 21 Mar 2024 23:07:43 GMT" ], "Content-Length": [ - "866" + "705" ], "Content-Type": [ "application/json; charset=utf-8" @@ -138,27 +144,27 @@ "-1" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:23:06 GMT" + "Thu, 21 Mar 2024 23:07:43 GMT" ] }, - "ResponseBody": "{\r\n \"type\": \"Microsoft.Batch/batchAccounts/applications/versions\",\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/hoppeeastasia2/applications/newApplicationPackage/versions/foo\",\r\n \"name\": \"foo\",\r\n \"etag\": \"W/\\\"0x8DB6E3A8793999C\\\"\",\r\n \"properties\": {\r\n \"storageUrl\": \"https://hoppeeastasia123.blob.core.windows.net/app-newapplicationpackage-43886b5010044e639ff291e2c766e583/foo?sv=2019-07-07&sr=b&sig=kdGS7uQLH%2BzCTzjmzw2%2FbS9XTC2ZOyv1gv%2FTcYjTgdA%3D&skoid=91248766-5d90-412c-a3a7-792c4ef92a2e&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2023-06-16T07%3A18%3A06Z&ske=2023-06-16T11%3A23%3A06Z&sks=b&skv=2019-07-07&st=2023-06-16T07%3A18%3A06Z&se=2023-06-16T11%3A23%3A06Z&sp=rw\",\r\n \"storageUrlExpiry\": \"2023-06-16T11:23:06.5193078Z\",\r\n \"state\": \"Active\",\r\n \"format\": \"zip\",\r\n \"lastActivationTime\": \"2023-06-16T07:23:06.4762873Z\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"type\": \"Microsoft.Batch/batchAccounts/applications/versions\",\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/automation/providers/Microsoft.Batch/batchAccounts/billstestba24326/applications/newApplicationPackage/versions/foo\",\r\n \"name\": \"foo\",\r\n \"etag\": \"W/\\\"0x8DC49FBB722393E\\\"\",\r\n \"properties\": {\r\n \"storageUrl\": \"https://billsstorage24326.blob.core.windows.net/app-newapplicationpackage-7b64ca4997c142418bea46e5fc424265/foo?sv=2018-03-28&sr=b&sig=YnhhZj6P1lyhzxEFWRPSBfgGTbA3VkJlUH8gOVBHvO0%3D&st=2024-03-21T23%3A02%3A43Z&se=2024-03-22T03%3A07%3A43Z&sp=rw\",\r\n \"storageUrlExpiry\": \"2024-03-22T03:07:43.8103238Z\",\r\n \"state\": \"Active\",\r\n \"format\": \"zip\",\r\n \"lastActivationTime\": \"2024-03-21T23:07:43.7733382Z\"\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/hoppeeastasia2/applications/newApplicationPackage/versions/foo?api-version=2022-10-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzLzEyMy9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvaG9wcGVlYXN0YXNpYTIvYXBwbGljYXRpb25zL25ld0FwcGxpY2F0aW9uUGFja2FnZS92ZXJzaW9ucy9mb28/YXBpLXZlcnNpb249MjAyMi0xMC0wMQ==", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/automation/providers/Microsoft.Batch/batchAccounts/billstestba24326/applications/newApplicationPackage/versions/foo?api-version=2022-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24vcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL2JpbGxzdGVzdGJhMjQzMjYvYXBwbGljYXRpb25zL25ld0FwcGxpY2F0aW9uUGFja2FnZS92ZXJzaW9ucy9mb28/YXBpLXZlcnNpb249MjAyMi0xMC0wMQ==", "RequestMethod": "GET", "RequestHeaders": { "x-ms-client-request-id": [ - "5180d757-1d21-4a32-b70f-3fb80d2021ea" + "611a1509-128c-425e-abef-6bced231e672" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Batch.BatchManagementClient/14.2.0.0" ] }, @@ -171,13 +177,10 @@ "no-cache" ], "ETag": [ - "W/\"0x8DB6E3A8793999C\"" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" + "W/\"0x8DC49FBB722393E\"" ], "x-ms-request-id": [ - "83992b0e-3cc8-4ba9-bdc2-e80a3c54eb5a" + "0d0968e0-226d-419b-9088-bfcfa0291f45" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -185,20 +188,26 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" ], "x-ms-correlation-request-id": [ - "1a3bcf6f-b2e9-4726-a15a-420d1688f835" + "3a840f28-8ae3-4e86-9e8c-68b7dbe2e1af" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072306Z:1a3bcf6f-b2e9-4726-a15a-420d1688f835" + "WESTUS2:20240321T230744Z:3a840f28-8ae3-4e86-9e8c-68b7dbe2e1af" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 16D04250C442460DB4DF050DDB6CCBA0 Ref B: CO6AA3150218021 Ref C: 2024-03-21T23:07:44Z" ], "Date": [ - "Fri, 16 Jun 2023 07:23:06 GMT" + "Thu, 21 Mar 2024 23:07:44 GMT" ], "Content-Length": [ - "865" + "707" ], "Content-Type": [ "application/json; charset=utf-8" @@ -207,27 +216,27 @@ "-1" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:23:06 GMT" + "Thu, 21 Mar 2024 23:07:43 GMT" ] }, - "ResponseBody": "{\r\n \"type\": \"Microsoft.Batch/batchAccounts/applications/versions\",\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/hoppeeastasia2/applications/newApplicationPackage/versions/foo\",\r\n \"name\": \"foo\",\r\n \"etag\": \"W/\\\"0x8DB6E3A8793999C\\\"\",\r\n \"properties\": {\r\n \"storageUrl\": \"https://hoppeeastasia123.blob.core.windows.net/app-newapplicationpackage-43886b5010044e639ff291e2c766e583/foo?sv=2019-07-07&sr=b&sig=kdGS7uQLH%2BzCTzjmzw2%2FbS9XTC2ZOyv1gv%2FTcYjTgdA%3D&skoid=91248766-5d90-412c-a3a7-792c4ef92a2e&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2023-06-16T07%3A18%3A06Z&ske=2023-06-16T11%3A23%3A06Z&sks=b&skv=2019-07-07&st=2023-06-16T07%3A18%3A06Z&se=2023-06-16T11%3A23%3A06Z&sp=rw\",\r\n \"storageUrlExpiry\": \"2023-06-16T11:23:06.850825Z\",\r\n \"state\": \"Active\",\r\n \"format\": \"zip\",\r\n \"lastActivationTime\": \"2023-06-16T07:23:06.4762873Z\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"type\": \"Microsoft.Batch/batchAccounts/applications/versions\",\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/automation/providers/Microsoft.Batch/batchAccounts/billstestba24326/applications/newApplicationPackage/versions/foo\",\r\n \"name\": \"foo\",\r\n \"etag\": \"W/\\\"0x8DC49FBB722393E\\\"\",\r\n \"properties\": {\r\n \"storageUrl\": \"https://billsstorage24326.blob.core.windows.net/app-newapplicationpackage-7b64ca4997c142418bea46e5fc424265/foo?sv=2018-03-28&sr=b&sig=ISDV4cELlwBQg1ThFjbX9BCJciT%2Fmfk9hyDJYZ1G81o%3D&st=2024-03-21T23%3A02%3A44Z&se=2024-03-22T03%3A07%3A44Z&sp=rw\",\r\n \"storageUrlExpiry\": \"2024-03-22T03:07:44.7334056Z\",\r\n \"state\": \"Active\",\r\n \"format\": \"zip\",\r\n \"lastActivationTime\": \"2024-03-21T23:07:43.7733382Z\"\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/hoppeeastasia2/applications/newApplicationPackage/versions/foo?api-version=2022-10-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzLzEyMy9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvaG9wcGVlYXN0YXNpYTIvYXBwbGljYXRpb25zL25ld0FwcGxpY2F0aW9uUGFja2FnZS92ZXJzaW9ucy9mb28/YXBpLXZlcnNpb249MjAyMi0xMC0wMQ==", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/automation/providers/Microsoft.Batch/batchAccounts/billstestba24326/applications/newApplicationPackage/versions/foo?api-version=2022-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24vcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL2JpbGxzdGVzdGJhMjQzMjYvYXBwbGljYXRpb25zL25ld0FwcGxpY2F0aW9uUGFja2FnZS92ZXJzaW9ucy9mb28/YXBpLXZlcnNpb249MjAyMi0xMC0wMQ==", "RequestMethod": "DELETE", "RequestHeaders": { "x-ms-client-request-id": [ - "22cfc4f4-bb16-400b-baf0-da90044f443f" + "260169c4-245d-4336-b51b-d6a96103efaf" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Batch.BatchManagementClient/14.2.0.0" ] }, @@ -240,7 +249,7 @@ "no-cache" ], "x-ms-request-id": [ - "0b606a91-604f-40ef-8711-79533a033fd4" + "cbde9566-058c-4806-985b-181712a1080c" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -248,20 +257,23 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], "x-ms-correlation-request-id": [ - "97dd3774-71df-44f4-9fdd-07da65acd57e" + "1c112644-68aa-46f6-a3d6-434844984b0b" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072307Z:97dd3774-71df-44f4-9fdd-07da65acd57e" + "WESTUS2:20240321T230745Z:1c112644-68aa-46f6-a3d6-434844984b0b" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: D0A83C72D2654211B4E1597137D1F28C Ref B: CO6AA3150218021 Ref C: 2024-03-21T23:07:44Z" ], "Date": [ - "Fri, 16 Jun 2023 07:23:06 GMT" + "Thu, 21 Mar 2024 23:07:44 GMT" ], "Expires": [ "-1" @@ -274,20 +286,20 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/hoppeeastasia2/applications/newApplicationPackage?api-version=2022-10-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzLzEyMy9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvaG9wcGVlYXN0YXNpYTIvYXBwbGljYXRpb25zL25ld0FwcGxpY2F0aW9uUGFja2FnZT9hcGktdmVyc2lvbj0yMDIyLTEwLTAx", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/automation/providers/Microsoft.Batch/batchAccounts/billstestba24326/applications/newApplicationPackage?api-version=2022-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24vcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL2JpbGxzdGVzdGJhMjQzMjYvYXBwbGljYXRpb25zL25ld0FwcGxpY2F0aW9uUGFja2FnZT9hcGktdmVyc2lvbj0yMDIyLTEwLTAx", "RequestMethod": "DELETE", "RequestHeaders": { "x-ms-client-request-id": [ - "aafa434c-15e2-4ac0-8e48-69b07b02219f" + "5bf1ada6-7092-4567-8a55-6c413f399dcd" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Batch.BatchManagementClient/14.2.0.0" ] }, @@ -300,7 +312,7 @@ "no-cache" ], "x-ms-request-id": [ - "92a99e69-a71f-4140-9adb-2f3bf706148c" + "2aa33973-bd33-433e-9a4e-525a2768110c" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -308,20 +320,23 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], "x-ms-ratelimit-remaining-subscription-deletes": [ - "14998" + "14999" ], "x-ms-correlation-request-id": [ - "19f22658-ad16-4f56-b525-eeff666ad57d" + "024b7229-42c3-4b08-a317-4fd63e0c9976" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072307Z:19f22658-ad16-4f56-b525-eeff666ad57d" + "WESTUS2:20240321T230746Z:024b7229-42c3-4b08-a317-4fd63e0c9976" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: B0BBDA7796B747929A00AF7EF9005038 Ref B: CO6AA3150218021 Ref C: 2024-03-21T23:07:45Z" ], "Date": [ - "Fri, 16 Jun 2023 07:23:06 GMT" + "Thu, 21 Mar 2024 23:07:45 GMT" ], "Expires": [ "-1" @@ -336,9 +351,9 @@ ], "Names": {}, "Variables": { - "SubscriptionId": "21abd678-18c5-4660-9fdd-8c5ba6b6fe1f", - "AZURE_BATCH_ACCOUNT": "hoppeeastasia2", - "AZURE_BATCH_ENDPOINT": "https://hoppeeastasia2.eastasia.batch.azure.com", - "AZURE_BATCH_RESOURCE_GROUP": "123" + "SubscriptionId": "6602ac9a-5dad-41bd-a792-592c704b6a31", + "AZURE_BATCH_ACCOUNT": "billstestba24326", + "AZURE_BATCH_ENDPOINT": "https://billstestba24326.uksouth.batch.azure.com", + "AZURE_BATCH_RESOURCE_GROUP": "automation" } } \ No newline at end of file diff --git a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchApplicationTests/TestAddApplication.json b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchApplicationTests/TestAddApplication.json index 147c74d39e98..d742608687f7 100644 --- a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchApplicationTests/TestAddApplication.json +++ b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchApplicationTests/TestAddApplication.json @@ -1,20 +1,20 @@ { "Entries": [ { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/hoppeeastasia2/applications/test?api-version=2022-10-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzLzEyMy9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvaG9wcGVlYXN0YXNpYTIvYXBwbGljYXRpb25zL3Rlc3Q/YXBpLXZlcnNpb249MjAyMi0xMC0wMQ==", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/automation/providers/Microsoft.Batch/batchAccounts/billstestba24326/applications/test?api-version=2022-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24vcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL2JpbGxzdGVzdGJhMjQzMjYvYXBwbGljYXRpb25zL3Rlc3Q/YXBpLXZlcnNpb249MjAyMi0xMC0wMQ==", "RequestMethod": "PUT", "RequestHeaders": { "x-ms-client-request-id": [ - "ef6f7076-6eeb-4b6d-ba13-9a9e94bf7759" + "05007648-b1b7-4fd4-a853-1de17e752334" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Batch.BatchManagementClient/14.2.0.0" ], "Content-Type": [ @@ -33,13 +33,10 @@ "no-cache" ], "ETag": [ - "W/\"0x8DB6E3A2954539D\"" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" + "W/\"0x8DC49FBA99F4D65\"" ], "x-ms-request-id": [ - "3b137a4d-7ab8-4643-ae98-116dbad3e219" + "73b45f7a-cb5b-495d-a832-e60aedaf93c6" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -47,20 +44,26 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" ], "x-ms-correlation-request-id": [ - "584867fa-7cbf-40c9-aa52-10823d43e0b8" + "6e06bbbe-c606-4ce5-b926-d3c2221f78e9" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072028Z:584867fa-7cbf-40c9-aa52-10823d43e0b8" + "WESTUS2:20240321T230721Z:6e06bbbe-c606-4ce5-b926-d3c2221f78e9" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: A7C29F8DEDA64E7FAF39C38753F6BD64 Ref B: CO6AA3150219019 Ref C: 2024-03-21T23:07:20Z" ], "Date": [ - "Fri, 16 Jun 2023 07:20:27 GMT" + "Thu, 21 Mar 2024 23:07:20 GMT" ], "Content-Length": [ - "286" + "295" ], "Content-Type": [ "application/json; charset=utf-8" @@ -69,27 +72,27 @@ "-1" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:20:28 GMT" + "Thu, 21 Mar 2024 23:07:21 GMT" ] }, - "ResponseBody": "{\r\n \"type\": \"Microsoft.Batch/batchAccounts/applications\",\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/hoppeeastasia2/applications/test\",\r\n \"name\": \"test\",\r\n \"etag\": \"W/\\\"0x8DB6E3A2954539D\\\"\",\r\n \"properties\": {\r\n \"allowUpdates\": true\r\n }\r\n}", + "ResponseBody": "{\r\n \"type\": \"Microsoft.Batch/batchAccounts/applications\",\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/automation/providers/Microsoft.Batch/batchAccounts/billstestba24326/applications/test\",\r\n \"name\": \"test\",\r\n \"etag\": \"W/\\\"0x8DC49FBA99F4D65\\\"\",\r\n \"properties\": {\r\n \"allowUpdates\": true\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/hoppeeastasia2/applications/test?api-version=2022-10-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzLzEyMy9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvaG9wcGVlYXN0YXNpYTIvYXBwbGljYXRpb25zL3Rlc3Q/YXBpLXZlcnNpb249MjAyMi0xMC0wMQ==", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/automation/providers/Microsoft.Batch/batchAccounts/billstestba24326/applications/test?api-version=2022-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24vcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL2JpbGxzdGVzdGJhMjQzMjYvYXBwbGljYXRpb25zL3Rlc3Q/YXBpLXZlcnNpb249MjAyMi0xMC0wMQ==", "RequestMethod": "GET", "RequestHeaders": { "x-ms-client-request-id": [ - "c489b5aa-fb3b-4f8d-b186-c8706badc550" + "e91075eb-9458-4170-949e-1d6d9b41eac8" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Batch.BatchManagementClient/14.2.0.0" ] }, @@ -102,13 +105,10 @@ "no-cache" ], "ETag": [ - "W/\"0x8DB6E3A2954539D\"" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" + "W/\"0x8DC49FBA99F4D65\"" ], "x-ms-request-id": [ - "0c824c07-e0ec-4249-a4e5-b3f9bd7c5797" + "56309fe4-51f9-4ebd-9739-05821b29defc" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -116,20 +116,26 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" ], "x-ms-correlation-request-id": [ - "44c5cfe9-0c59-470d-9e96-68493dd8208d" + "392637fe-9856-4ee6-b60e-70ee1e6fcbc9" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072028Z:44c5cfe9-0c59-470d-9e96-68493dd8208d" + "WESTUS2:20240321T230721Z:392637fe-9856-4ee6-b60e-70ee1e6fcbc9" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: BC2E9C5654BC4A078B769A100818B922 Ref B: CO6AA3150219019 Ref C: 2024-03-21T23:07:21Z" ], "Date": [ - "Fri, 16 Jun 2023 07:20:27 GMT" + "Thu, 21 Mar 2024 23:07:21 GMT" ], "Content-Length": [ - "286" + "295" ], "Content-Type": [ "application/json; charset=utf-8" @@ -138,27 +144,27 @@ "-1" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:20:28 GMT" + "Thu, 21 Mar 2024 23:07:21 GMT" ] }, - "ResponseBody": "{\r\n \"type\": \"Microsoft.Batch/batchAccounts/applications\",\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/hoppeeastasia2/applications/test\",\r\n \"name\": \"test\",\r\n \"etag\": \"W/\\\"0x8DB6E3A2954539D\\\"\",\r\n \"properties\": {\r\n \"allowUpdates\": true\r\n }\r\n}", + "ResponseBody": "{\r\n \"type\": \"Microsoft.Batch/batchAccounts/applications\",\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/automation/providers/Microsoft.Batch/batchAccounts/billstestba24326/applications/test\",\r\n \"name\": \"test\",\r\n \"etag\": \"W/\\\"0x8DC49FBA99F4D65\\\"\",\r\n \"properties\": {\r\n \"allowUpdates\": true\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/resourceGroups/123/providers/Microsoft.Batch/batchAccounts/hoppeeastasia2/applications/test?api-version=2022-10-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Jlc291cmNlR3JvdXBzLzEyMy9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvaG9wcGVlYXN0YXNpYTIvYXBwbGljYXRpb25zL3Rlc3Q/YXBpLXZlcnNpb249MjAyMi0xMC0wMQ==", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/resourceGroups/automation/providers/Microsoft.Batch/batchAccounts/billstestba24326/applications/test?api-version=2022-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Jlc291cmNlR3JvdXBzL2F1dG9tYXRpb24vcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL2JpbGxzdGVzdGJhMjQzMjYvYXBwbGljYXRpb25zL3Rlc3Q/YXBpLXZlcnNpb249MjAyMi0xMC0wMQ==", "RequestMethod": "DELETE", "RequestHeaders": { "x-ms-client-request-id": [ - "93c2761a-ef9f-4cba-adc9-7a373808dc42" + "06dd277c-0ea2-463e-a766-a965bb82fc27" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Batch.BatchManagementClient/14.2.0.0" ] }, @@ -171,7 +177,7 @@ "no-cache" ], "x-ms-request-id": [ - "e9784036-d63b-48e3-bc0c-c4caec35bbca" + "019523e8-53eb-4546-9600-598ce796eb0e" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -179,20 +185,23 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], "x-ms-correlation-request-id": [ - "14c769a8-1966-4c81-84fd-61890655ab93" + "66b1e442-c612-46b6-b5f6-2bac324e6c72" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072029Z:14c769a8-1966-4c81-84fd-61890655ab93" + "WESTUS2:20240321T230722Z:66b1e442-c612-46b6-b5f6-2bac324e6c72" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 04B0212282C2409A8977BAD4F5BE9760 Ref B: CO6AA3150219019 Ref C: 2024-03-21T23:07:22Z" ], "Date": [ - "Fri, 16 Jun 2023 07:20:29 GMT" + "Thu, 21 Mar 2024 23:07:22 GMT" ], "Expires": [ "-1" @@ -207,9 +216,9 @@ ], "Names": {}, "Variables": { - "SubscriptionId": "21abd678-18c5-4660-9fdd-8c5ba6b6fe1f", - "AZURE_BATCH_ACCOUNT": "hoppeeastasia2", - "AZURE_BATCH_ENDPOINT": "https://hoppeeastasia2.eastasia.batch.azure.com", - "AZURE_BATCH_RESOURCE_GROUP": "123" + "SubscriptionId": "6602ac9a-5dad-41bd-a792-592c704b6a31", + "AZURE_BATCH_ACCOUNT": "billstestba24326", + "AZURE_BATCH_ENDPOINT": "https://billstestba24326.uksouth.batch.azure.com", + "AZURE_BATCH_RESOURCE_GROUP": "automation" } } \ No newline at end of file diff --git a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.CertificateTests/TestCancelCertificateDelete.json b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.CertificateTests/TestCancelCertificateDelete.json index 98b0d1c0e71d..dd44eb33b8d6 100644 --- a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.CertificateTests/TestCancelCertificateDelete.json +++ b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.CertificateTests/TestCancelCertificateDelete.json @@ -1,648 +1,24 @@ { "Entries": [ { - "RequestUri": "/certificates(thumbprintAlgorithm=sha1,thumbprint=C1E494A415149C5F211C4778B52F2E834A07247C)?api-version=2023-05-01.17.0&$select=thumbprint%2Cstate", - "EncodedRequestUri": "L2NlcnRpZmljYXRlcyh0aHVtYnByaW50QWxnb3JpdGhtPXNoYTEsdGh1bWJwcmludD1DMUU0OTRBNDE1MTQ5QzVGMjExQzQ3NzhCNTJGMkU4MzRBMDcyNDdDKT9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjAmJHNlbGVjdD10aHVtYnByaW50JTJDc3RhdGU=", + "RequestUri": "/certificates(thumbprintAlgorithm=sha1,thumbprint=C1E494A415149C5F211C4778B52F2E834A07247C)?api-version=2024-02-01.19.0&$select=thumbprint%2Cstate", + "EncodedRequestUri": "L2NlcnRpZmljYXRlcyh0aHVtYnByaW50QWxnb3JpdGhtPXNoYTEsdGh1bWJwcmludD1DMUU0OTRBNDE1MTQ5QzVGMjExQzQ3NzhCNTJGMkU4MzRBMDcyNDdDKT9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjAmJHNlbGVjdD10aHVtYnByaW50JTJDc3RhdGU=", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "1abc1a42-5eef-40f3-b687-90cf4e334227" + "f144e8c5-04a5-4be0-9504-a99801de5537" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:20:34 GMT" + "Fri, 22 Mar 2024 19:21:08 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", - "AzurePowershell/Az1.0.0" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Transfer-Encoding": [ - "chunked" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "request-id": [ - "48890400-86d6-4e13-8f7b-9bed2a19599c" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "DataServiceVersion": [ - "3.0" - ], - "Date": [ - "Fri, 16 Jun 2023 07:20:34 GMT" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata" - ] - }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#certificates/@Element\",\r\n \"thumbprint\": \"c1e494a415149c5f211c4778b52f2e834a07247c\",\r\n \"state\": \"deleting\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/certificates(thumbprintAlgorithm=sha1,thumbprint=C1E494A415149C5F211C4778B52F2E834A07247C)?api-version=2023-05-01.17.0&$select=thumbprint%2Cstate", - "EncodedRequestUri": "L2NlcnRpZmljYXRlcyh0aHVtYnByaW50QWxnb3JpdGhtPXNoYTEsdGh1bWJwcmludD1DMUU0OTRBNDE1MTQ5QzVGMjExQzQ3NzhCNTJGMkU4MzRBMDcyNDdDKT9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjAmJHNlbGVjdD10aHVtYnByaW50JTJDc3RhdGU=", - "RequestMethod": "GET", - "RequestHeaders": { - "client-request-id": [ - "76620442-23ae-48d5-ae90-4e9c8c2d2f29" - ], - "Accept-Language": [ - "en-US" - ], - "ocp-date": [ - "Fri, 16 Jun 2023 07:20:39 GMT" - ], - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", - "AzurePowershell/Az1.0.0" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Transfer-Encoding": [ - "chunked" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "request-id": [ - "ec50c864-29f6-4106-9847-ca691ce7a7de" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "DataServiceVersion": [ - "3.0" - ], - "Date": [ - "Fri, 16 Jun 2023 07:20:40 GMT" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata" - ] - }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#certificates/@Element\",\r\n \"thumbprint\": \"c1e494a415149c5f211c4778b52f2e834a07247c\",\r\n \"state\": \"deleting\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/certificates(thumbprintAlgorithm=sha1,thumbprint=C1E494A415149C5F211C4778B52F2E834A07247C)?api-version=2023-05-01.17.0&$select=thumbprint%2Cstate", - "EncodedRequestUri": "L2NlcnRpZmljYXRlcyh0aHVtYnByaW50QWxnb3JpdGhtPXNoYTEsdGh1bWJwcmludD1DMUU0OTRBNDE1MTQ5QzVGMjExQzQ3NzhCNTJGMkU4MzRBMDcyNDdDKT9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjAmJHNlbGVjdD10aHVtYnByaW50JTJDc3RhdGU=", - "RequestMethod": "GET", - "RequestHeaders": { - "client-request-id": [ - "1f932c4f-6ebc-4729-874f-54558d842e12" - ], - "Accept-Language": [ - "en-US" - ], - "ocp-date": [ - "Fri, 16 Jun 2023 07:20:44 GMT" - ], - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", - "AzurePowershell/Az1.0.0" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Transfer-Encoding": [ - "chunked" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "request-id": [ - "ad9e2ad2-d37e-4c4e-8499-0c3312e8c446" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "DataServiceVersion": [ - "3.0" - ], - "Date": [ - "Fri, 16 Jun 2023 07:20:46 GMT" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata" - ] - }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#certificates/@Element\",\r\n \"thumbprint\": \"c1e494a415149c5f211c4778b52f2e834a07247c\",\r\n \"state\": \"deleting\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/certificates(thumbprintAlgorithm=sha1,thumbprint=C1E494A415149C5F211C4778B52F2E834A07247C)?api-version=2023-05-01.17.0&$select=thumbprint%2Cstate", - "EncodedRequestUri": "L2NlcnRpZmljYXRlcyh0aHVtYnByaW50QWxnb3JpdGhtPXNoYTEsdGh1bWJwcmludD1DMUU0OTRBNDE1MTQ5QzVGMjExQzQ3NzhCNTJGMkU4MzRBMDcyNDdDKT9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjAmJHNlbGVjdD10aHVtYnByaW50JTJDc3RhdGU=", - "RequestMethod": "GET", - "RequestHeaders": { - "client-request-id": [ - "c256727e-e65c-49f0-805d-9c79073be6f2" - ], - "Accept-Language": [ - "en-US" - ], - "ocp-date": [ - "Fri, 16 Jun 2023 07:20:50 GMT" - ], - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", - "AzurePowershell/Az1.0.0" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Transfer-Encoding": [ - "chunked" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "request-id": [ - "d8196153-6a3e-4279-aebc-1fa5ec55f252" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "DataServiceVersion": [ - "3.0" - ], - "Date": [ - "Fri, 16 Jun 2023 07:20:50 GMT" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata" - ] - }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#certificates/@Element\",\r\n \"thumbprint\": \"c1e494a415149c5f211c4778b52f2e834a07247c\",\r\n \"state\": \"deleting\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/certificates(thumbprintAlgorithm=sha1,thumbprint=C1E494A415149C5F211C4778B52F2E834A07247C)?api-version=2023-05-01.17.0&$select=thumbprint%2Cstate", - "EncodedRequestUri": "L2NlcnRpZmljYXRlcyh0aHVtYnByaW50QWxnb3JpdGhtPXNoYTEsdGh1bWJwcmludD1DMUU0OTRBNDE1MTQ5QzVGMjExQzQ3NzhCNTJGMkU4MzRBMDcyNDdDKT9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjAmJHNlbGVjdD10aHVtYnByaW50JTJDc3RhdGU=", - "RequestMethod": "GET", - "RequestHeaders": { - "client-request-id": [ - "277222fa-76b4-4a4a-8f65-f8ad8d482d4e" - ], - "Accept-Language": [ - "en-US" - ], - "ocp-date": [ - "Fri, 16 Jun 2023 07:20:55 GMT" - ], - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", - "AzurePowershell/Az1.0.0" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Transfer-Encoding": [ - "chunked" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "request-id": [ - "a8569aa8-b28e-4db1-a9e7-647ebcf9da48" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "DataServiceVersion": [ - "3.0" - ], - "Date": [ - "Fri, 16 Jun 2023 07:20:56 GMT" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata" - ] - }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#certificates/@Element\",\r\n \"thumbprint\": \"c1e494a415149c5f211c4778b52f2e834a07247c\",\r\n \"state\": \"deleting\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/certificates(thumbprintAlgorithm=sha1,thumbprint=C1E494A415149C5F211C4778B52F2E834A07247C)?api-version=2023-05-01.17.0&$select=thumbprint%2Cstate", - "EncodedRequestUri": "L2NlcnRpZmljYXRlcyh0aHVtYnByaW50QWxnb3JpdGhtPXNoYTEsdGh1bWJwcmludD1DMUU0OTRBNDE1MTQ5QzVGMjExQzQ3NzhCNTJGMkU4MzRBMDcyNDdDKT9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjAmJHNlbGVjdD10aHVtYnByaW50JTJDc3RhdGU=", - "RequestMethod": "GET", - "RequestHeaders": { - "client-request-id": [ - "dd438a8b-8309-4b9a-ad19-504452ad6f98" - ], - "Accept-Language": [ - "en-US" - ], - "ocp-date": [ - "Fri, 16 Jun 2023 07:21:00 GMT" - ], - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", - "AzurePowershell/Az1.0.0" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Transfer-Encoding": [ - "chunked" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "request-id": [ - "9c1d3211-8adf-4d21-b07b-e5730aff7739" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "DataServiceVersion": [ - "3.0" - ], - "Date": [ - "Fri, 16 Jun 2023 07:21:01 GMT" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata" - ] - }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#certificates/@Element\",\r\n \"thumbprint\": \"c1e494a415149c5f211c4778b52f2e834a07247c\",\r\n \"state\": \"deleting\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/certificates(thumbprintAlgorithm=sha1,thumbprint=C1E494A415149C5F211C4778B52F2E834A07247C)?api-version=2023-05-01.17.0&$select=thumbprint%2Cstate", - "EncodedRequestUri": "L2NlcnRpZmljYXRlcyh0aHVtYnByaW50QWxnb3JpdGhtPXNoYTEsdGh1bWJwcmludD1DMUU0OTRBNDE1MTQ5QzVGMjExQzQ3NzhCNTJGMkU4MzRBMDcyNDdDKT9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjAmJHNlbGVjdD10aHVtYnByaW50JTJDc3RhdGU=", - "RequestMethod": "GET", - "RequestHeaders": { - "client-request-id": [ - "e1a8e57d-f806-4025-9d42-e270eda0beb4" - ], - "Accept-Language": [ - "en-US" - ], - "ocp-date": [ - "Fri, 16 Jun 2023 07:21:05 GMT" - ], - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", - "AzurePowershell/Az1.0.0" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Transfer-Encoding": [ - "chunked" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "request-id": [ - "76ea8ec2-94da-4785-81ff-17759e197b2d" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "DataServiceVersion": [ - "3.0" - ], - "Date": [ - "Fri, 16 Jun 2023 07:21:05 GMT" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata" - ] - }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#certificates/@Element\",\r\n \"thumbprint\": \"c1e494a415149c5f211c4778b52f2e834a07247c\",\r\n \"state\": \"deleting\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/certificates(thumbprintAlgorithm=sha1,thumbprint=C1E494A415149C5F211C4778B52F2E834A07247C)?api-version=2023-05-01.17.0&$select=thumbprint%2Cstate", - "EncodedRequestUri": "L2NlcnRpZmljYXRlcyh0aHVtYnByaW50QWxnb3JpdGhtPXNoYTEsdGh1bWJwcmludD1DMUU0OTRBNDE1MTQ5QzVGMjExQzQ3NzhCNTJGMkU4MzRBMDcyNDdDKT9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjAmJHNlbGVjdD10aHVtYnByaW50JTJDc3RhdGU=", - "RequestMethod": "GET", - "RequestHeaders": { - "client-request-id": [ - "c2c244e0-9fd8-4edc-9613-a1034d1a3456" - ], - "Accept-Language": [ - "en-US" - ], - "ocp-date": [ - "Fri, 16 Jun 2023 07:21:10 GMT" - ], - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", - "AzurePowershell/Az1.0.0" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Transfer-Encoding": [ - "chunked" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "request-id": [ - "e16b8dc1-d246-475d-9f04-6f9da5b482b8" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "DataServiceVersion": [ - "3.0" - ], - "Date": [ - "Fri, 16 Jun 2023 07:21:11 GMT" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata" - ] - }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#certificates/@Element\",\r\n \"thumbprint\": \"c1e494a415149c5f211c4778b52f2e834a07247c\",\r\n \"state\": \"deleting\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/certificates(thumbprintAlgorithm=sha1,thumbprint=C1E494A415149C5F211C4778B52F2E834A07247C)?api-version=2023-05-01.17.0&$select=thumbprint%2Cstate", - "EncodedRequestUri": "L2NlcnRpZmljYXRlcyh0aHVtYnByaW50QWxnb3JpdGhtPXNoYTEsdGh1bWJwcmludD1DMUU0OTRBNDE1MTQ5QzVGMjExQzQ3NzhCNTJGMkU4MzRBMDcyNDdDKT9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjAmJHNlbGVjdD10aHVtYnByaW50JTJDc3RhdGU=", - "RequestMethod": "GET", - "RequestHeaders": { - "client-request-id": [ - "48b227e3-a325-4b7a-b544-6b20c898c1ee" - ], - "Accept-Language": [ - "en-US" - ], - "ocp-date": [ - "Fri, 16 Jun 2023 07:21:15 GMT" - ], - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", - "AzurePowershell/Az1.0.0" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Transfer-Encoding": [ - "chunked" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "request-id": [ - "70ab0ab6-b665-42e7-853c-8d3b86d1d4b5" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "DataServiceVersion": [ - "3.0" - ], - "Date": [ - "Fri, 16 Jun 2023 07:21:16 GMT" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata" - ] - }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#certificates/@Element\",\r\n \"thumbprint\": \"c1e494a415149c5f211c4778b52f2e834a07247c\",\r\n \"state\": \"deleting\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/certificates(thumbprintAlgorithm=sha1,thumbprint=C1E494A415149C5F211C4778B52F2E834A07247C)?api-version=2023-05-01.17.0&$select=thumbprint%2Cstate", - "EncodedRequestUri": "L2NlcnRpZmljYXRlcyh0aHVtYnByaW50QWxnb3JpdGhtPXNoYTEsdGh1bWJwcmludD1DMUU0OTRBNDE1MTQ5QzVGMjExQzQ3NzhCNTJGMkU4MzRBMDcyNDdDKT9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjAmJHNlbGVjdD10aHVtYnByaW50JTJDc3RhdGU=", - "RequestMethod": "GET", - "RequestHeaders": { - "client-request-id": [ - "2c66d72f-55aa-42e9-8830-530804f2f445" - ], - "Accept-Language": [ - "en-US" - ], - "ocp-date": [ - "Fri, 16 Jun 2023 07:21:20 GMT" - ], - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", - "AzurePowershell/Az1.0.0" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Transfer-Encoding": [ - "chunked" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "request-id": [ - "87edb85c-51e5-4f1b-8a49-7a952a2f3893" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "DataServiceVersion": [ - "3.0" - ], - "Date": [ - "Fri, 16 Jun 2023 07:21:21 GMT" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata" - ] - }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#certificates/@Element\",\r\n \"thumbprint\": \"c1e494a415149c5f211c4778b52f2e834a07247c\",\r\n \"state\": \"deleting\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/certificates(thumbprintAlgorithm=sha1,thumbprint=C1E494A415149C5F211C4778B52F2E834A07247C)?api-version=2023-05-01.17.0&$select=thumbprint%2Cstate", - "EncodedRequestUri": "L2NlcnRpZmljYXRlcyh0aHVtYnByaW50QWxnb3JpdGhtPXNoYTEsdGh1bWJwcmludD1DMUU0OTRBNDE1MTQ5QzVGMjExQzQ3NzhCNTJGMkU4MzRBMDcyNDdDKT9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjAmJHNlbGVjdD10aHVtYnByaW50JTJDc3RhdGU=", - "RequestMethod": "GET", - "RequestHeaders": { - "client-request-id": [ - "06f8debd-c669-4561-b59e-36bc5c3bf248" - ], - "Accept-Language": [ - "en-US" - ], - "ocp-date": [ - "Fri, 16 Jun 2023 07:21:25 GMT" - ], - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", - "AzurePowershell/Az1.0.0" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Transfer-Encoding": [ - "chunked" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "request-id": [ - "2ea8c88a-4713-42c0-850c-270c481d32e8" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "DataServiceVersion": [ - "3.0" - ], - "Date": [ - "Fri, 16 Jun 2023 07:21:26 GMT" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata" - ] - }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#certificates/@Element\",\r\n \"thumbprint\": \"c1e494a415149c5f211c4778b52f2e834a07247c\",\r\n \"state\": \"deleting\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/certificates(thumbprintAlgorithm=sha1,thumbprint=C1E494A415149C5F211C4778B52F2E834A07247C)?api-version=2023-05-01.17.0&$select=thumbprint%2Cstate", - "EncodedRequestUri": "L2NlcnRpZmljYXRlcyh0aHVtYnByaW50QWxnb3JpdGhtPXNoYTEsdGh1bWJwcmludD1DMUU0OTRBNDE1MTQ5QzVGMjExQzQ3NzhCNTJGMkU4MzRBMDcyNDdDKT9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjAmJHNlbGVjdD10aHVtYnByaW50JTJDc3RhdGU=", - "RequestMethod": "GET", - "RequestHeaders": { - "client-request-id": [ - "76d6a51a-c0d2-4a41-856b-33e4e6506369" - ], - "Accept-Language": [ - "en-US" - ], - "ocp-date": [ - "Fri, 16 Jun 2023 07:21:31 GMT" - ], - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", - "AzurePowershell/Az1.0.0" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Transfer-Encoding": [ - "chunked" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "request-id": [ - "8bc699cb-e2a1-4520-af2c-da20f6e6ca0b" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "DataServiceVersion": [ - "3.0" - ], - "Date": [ - "Fri, 16 Jun 2023 07:21:31 GMT" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata" - ] - }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#certificates/@Element\",\r\n \"thumbprint\": \"c1e494a415149c5f211c4778b52f2e834a07247c\",\r\n \"state\": \"deleting\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/certificates(thumbprintAlgorithm=sha1,thumbprint=C1E494A415149C5F211C4778B52F2E834A07247C)?api-version=2023-05-01.17.0&$select=thumbprint%2Cstate", - "EncodedRequestUri": "L2NlcnRpZmljYXRlcyh0aHVtYnByaW50QWxnb3JpdGhtPXNoYTEsdGh1bWJwcmludD1DMUU0OTRBNDE1MTQ5QzVGMjExQzQ3NzhCNTJGMkU4MzRBMDcyNDdDKT9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjAmJHNlbGVjdD10aHVtYnByaW50JTJDc3RhdGU=", - "RequestMethod": "GET", - "RequestHeaders": { - "client-request-id": [ - "13d993a0-2ea9-46d2-afe8-0a152c83734a" - ], - "Accept-Language": [ - "en-US" - ], - "ocp-date": [ - "Fri, 16 Jun 2023 07:21:36 GMT" - ], - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -652,7 +28,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "1ab085b3-0e2c-4ff7-b465-9b013c7b6473" + "feb38df3-89aa-4a93-9a55-b137a7ad0c46" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -664,37 +40,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:21:36 GMT" + "Fri, 22 Mar 2024 19:21:08 GMT" ], "Content-Length": [ - "351" + "352" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element\",\r\n \"code\": \"CertificateNotFound\",\r\n \"message\": {\r\n \"lang\": \"en-US\",\r\n \"value\": \"The specified certificate does not exist.\\nRequestId:1ab085b3-0e2c-4ff7-b465-9b013c7b6473\\nTime:2023-06-16T07:21:37.4720538Z\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element\",\r\n \"code\": \"CertificateNotFound\",\r\n \"message\": {\r\n \"lang\": \"en-US\",\r\n \"value\": \"The specified certificate does not exist.\\nRequestId:feb38df3-89aa-4a93-9a55-b137a7ad0c46\\nTime:2024-03-22T19:21:09.4300800Z\"\r\n }\r\n}", "StatusCode": 404 }, { - "RequestUri": "/certificates?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2NlcnRpZmljYXRlcz9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjA=", + "RequestUri": "/certificates?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2NlcnRpZmljYXRlcz9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "2a7231ea-c82f-4ece-97ae-e04a42b18c27" + "edefffda-bc6d-4f5d-ad24-01880eec083f" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:21:36 GMT" + "Fri, 22 Mar 2024 19:21:09 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Type": [ @@ -710,13 +86,13 @@ "chunked" ], "Location": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/certificates(ThumbprintAlgorithm=sha1,Thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)" + "https://billstestba24326.uksouth.batch.azure.com/certificates(ThumbprintAlgorithm=sha1,Thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "34c8eade-5645-4b73-8fc9-454fd5405303" + "be18ed33-d988-4b37-b6e9-4860334161ba" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -728,59 +104,59 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/certificates(ThumbprintAlgorithm=sha1,Thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)" + "https://billstestba24326.uksouth.batch.azure.com/certificates(ThumbprintAlgorithm=sha1,Thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)" ], "Date": [ - "Fri, 16 Jun 2023 07:21:36 GMT" + "Fri, 22 Mar 2024 19:21:09 GMT" ] }, "ResponseBody": "", "StatusCode": 201 }, { - "RequestUri": "/pools?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", + "RequestUri": "/pools?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "5cdd85b0-ed64-43c8-8761-ac19eec0ec33" + "94eba039-fc88-429b-8d4f-04a27341e9fd" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:21:36 GMT" + "Fri, 22 Mar 2024 19:21:09 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Type": [ "application/json; odata=minimalmetadata; charset=utf-8" ], "Content-Length": [ - "553" + "772" ] }, - "RequestBody": "{\r\n \"id\": \"certPool\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"4\",\r\n \"osVersion\": \"*\"\r\n },\r\n \"targetDedicatedNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableInterNodeCommunication\": true,\r\n \"certificateReferences\": [\r\n {\r\n \"thumbprint\": \"c1e494a415149c5f211c4778b52f2e834a07247c\",\r\n \"thumbprintAlgorithm\": \"sha1\",\r\n \"storeLocation\": \"currentuser\",\r\n \"storeName\": \"My\",\r\n \"visibility\": [\r\n \"task\"\r\n ]\r\n }\r\n ],\r\n \"targetNodeCommunicationMode\": \"classic\"\r\n}", + "RequestBody": "{\r\n \"id\": \"certPool\",\r\n \"vmSize\": \"STANDARD_D2S_V3\",\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"zonal\"\r\n }\r\n },\r\n \"targetDedicatedNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableInterNodeCommunication\": false,\r\n \"certificateReferences\": [\r\n {\r\n \"thumbprint\": \"c1e494a415149c5f211c4778b52f2e834a07247c\",\r\n \"thumbprintAlgorithm\": \"sha1\",\r\n \"storeLocation\": \"currentuser\",\r\n \"storeName\": \"My\",\r\n \"visibility\": [\r\n \"task\"\r\n ]\r\n }\r\n ],\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", "ResponseHeaders": { "Transfer-Encoding": [ "chunked" ], "ETag": [ - "0x8DB6E3A52B56FA1" + "0x8DC4AA53B8FB153" ], "Location": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/pools/certPool" + "https://billstestba24326.uksouth.batch.azure.com/pools/certPool" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "5476e489-a066-46d0-8c1a-6e09e2bd7c81" + "36f1050f-c835-4ff9-862a-d8c20e3edba6" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -792,37 +168,37 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/pools/certPool" + "https://billstestba24326.uksouth.batch.azure.com/pools/certPool" ], "Date": [ - "Fri, 16 Jun 2023 07:21:37 GMT" + "Fri, 22 Mar 2024 19:21:10 GMT" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:21:37 GMT" + "Fri, 22 Mar 2024 19:21:10 GMT" ] }, "ResponseBody": "", "StatusCode": 201 }, { - "RequestUri": "/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2NlcnRpZmljYXRlcyh0aHVtYnByaW50QWxnb3JpdGhtPXNoYTEsdGh1bWJwcmludD1jMWU0OTRhNDE1MTQ5YzVmMjExYzQ3NzhiNTJmMmU4MzRhMDcyNDdjKT9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjA=", + "RequestUri": "/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2NlcnRpZmljYXRlcyh0aHVtYnByaW50QWxnb3JpdGhtPXNoYTEsdGh1bWJwcmludD1jMWU0OTRhNDE1MTQ5YzVmMjExYzQ3NzhiNTJmMmU4MzRhMDcyNDdjKT9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", "RequestMethod": "DELETE", "RequestHeaders": { "client-request-id": [ - "8466f88a-8aa6-41cd-ad36-8b21b3559b19" + "5f3e645c-326f-433a-8077-9f330a6fd385" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:21:36 GMT" + "Fri, 22 Mar 2024 19:21:10 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Length": [ @@ -838,7 +214,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "52225455-e49a-4561-962f-6a5d485506d9" + "876bdb56-8fe8-4e76-8c28-476a641c9f2c" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -850,31 +226,31 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:21:37 GMT" + "Fri, 22 Mar 2024 19:21:10 GMT" ] }, "ResponseBody": "", "StatusCode": 202 }, { - "RequestUri": "/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2NlcnRpZmljYXRlcyh0aHVtYnByaW50QWxnb3JpdGhtPXNoYTEsdGh1bWJwcmludD1jMWU0OTRhNDE1MTQ5YzVmMjExYzQ3NzhiNTJmMmU4MzRhMDcyNDdjKT9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjA=", + "RequestUri": "/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2NlcnRpZmljYXRlcyh0aHVtYnByaW50QWxnb3JpdGhtPXNoYTEsdGh1bWJwcmludD1jMWU0OTRhNDE1MTQ5YzVmMjExYzQ3NzhiNTJmMmU4MzRhMDcyNDdjKT9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", "RequestMethod": "DELETE", "RequestHeaders": { "client-request-id": [ - "64bb44af-bc5c-43d6-9bbe-d45381cdd92c" + "0d19c2d7-86da-4b1c-a354-ad4b773de177" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:22:49 GMT" + "Fri, 22 Mar 2024 19:22:17 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Length": [ @@ -890,7 +266,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "c826865b-3bdf-4e74-84aa-1de4d38d776d" + "7cb67df4-0223-4940-bdcb-f77676f749d9" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -902,83 +278,31 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:22:49 GMT" + "Fri, 22 Mar 2024 19:22:17 GMT" ] }, "ResponseBody": "", "StatusCode": 202 }, { - "RequestUri": "/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2NlcnRpZmljYXRlcyh0aHVtYnByaW50QWxnb3JpdGhtPXNoYTEsdGh1bWJwcmludD1jMWU0OTRhNDE1MTQ5YzVmMjExYzQ3NzhiNTJmMmU4MzRhMDcyNDdjKT9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjA=", - "RequestMethod": "GET", - "RequestHeaders": { - "client-request-id": [ - "188066d5-be1b-470c-b057-588301101b98" - ], - "Accept-Language": [ - "en-US" - ], - "ocp-date": [ - "Fri, 16 Jun 2023 07:21:36 GMT" - ], - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", - "AzurePowershell/Az1.0.0" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Transfer-Encoding": [ - "chunked" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "request-id": [ - "9782399c-8f25-40fe-85d4-aca8e57c0d49" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "DataServiceVersion": [ - "3.0" - ], - "Date": [ - "Fri, 16 Jun 2023 07:21:37 GMT" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata" - ] - }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#certificates/@Element\",\r\n \"thumbprint\": \"c1e494a415149c5f211c4778b52f2e834a07247c\",\r\n \"thumbprintAlgorithm\": \"sha1\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)\",\r\n \"state\": \"deleting\",\r\n \"stateTransitionTime\": \"2023-06-16T07:21:37.9301169Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2023-06-16T07:21:37.6012615Z\",\r\n \"publicData\": \"MIIB9DCCAWGgAwIBAgIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC0JhdGNoVGVzdDAxMB4XDTE1MTAwMjE2MjkwNVoXDTM5MTIzMTIzNTk1OVowFjEUMBIGA1UEAxMLQmF0Y2hUZXN0MDEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAM06unpRipn3BmHBM75d0s8w/Wwifci16PoJo4c2V68GwsCCFsNOn5ypo7BBXo1fpBjrnso5w+koaE5LjxkBSVm+TkogwbKlW6WURTM0O5viRVbPnEEU/Y01Pj5cJElFuLEk9Uoe/r/lP8b5A607t1cPjSXkwhEZEYc3LkHDSo0ZAgMBAAGjSzBJMEcGA1UdAQRAMD6AEFRsTAsrvF+FmPuICooZXaKhGDAWMRQwEgYDVQQDEwtCYXRjaFRlc3QwMYIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAA4GBALt0F8Ep+8XVE/M2aNtxzlku72gxiOiAo1HmpUaixXx3gl8kdP3xgoKMaq4JskqdLmbJJUnCQ3wmzsdPwjswsW2ycT12zuBddaiS+id98k8U/KYc6FxMgS+H70FYOxARLn7P4FSSBf/QCyign+BherzezdZ5NBdfzbmWxIMP5iFJ\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2NlcnRpZmljYXRlcyh0aHVtYnByaW50QWxnb3JpdGhtPXNoYTEsdGh1bWJwcmludD1jMWU0OTRhNDE1MTQ5YzVmMjExYzQ3NzhiNTJmMmU4MzRhMDcyNDdjKT9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjA=", + "RequestUri": "/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2NlcnRpZmljYXRlcyh0aHVtYnByaW50QWxnb3JpdGhtPXNoYTEsdGh1bWJwcmludD1jMWU0OTRhNDE1MTQ5YzVmMjExYzQ3NzhiNTJmMmU4MzRhMDcyNDdjKT9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "d776c3c6-8b7e-480d-a572-17a1da3ee2ab" + "9d4487cc-f2c4-4343-9f6e-2c713db3088b" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:21:46 GMT" + "Fri, 22 Mar 2024 19:21:11 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -991,7 +315,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "8908b368-3ab5-41c5-9b61-95f82041c674" + "903b5852-ec4d-46b1-a3ca-d0380b40e211" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1003,34 +327,34 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:21:47 GMT" + "Fri, 22 Mar 2024 19:21:10 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#certificates/@Element\",\r\n \"thumbprint\": \"c1e494a415149c5f211c4778b52f2e834a07247c\",\r\n \"thumbprintAlgorithm\": \"sha1\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)\",\r\n \"state\": \"deleting\",\r\n \"stateTransitionTime\": \"2023-06-16T07:21:37.9301169Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2023-06-16T07:21:37.6012615Z\",\r\n \"publicData\": \"MIIB9DCCAWGgAwIBAgIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC0JhdGNoVGVzdDAxMB4XDTE1MTAwMjE2MjkwNVoXDTM5MTIzMTIzNTk1OVowFjEUMBIGA1UEAxMLQmF0Y2hUZXN0MDEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAM06unpRipn3BmHBM75d0s8w/Wwifci16PoJo4c2V68GwsCCFsNOn5ypo7BBXo1fpBjrnso5w+koaE5LjxkBSVm+TkogwbKlW6WURTM0O5viRVbPnEEU/Y01Pj5cJElFuLEk9Uoe/r/lP8b5A607t1cPjSXkwhEZEYc3LkHDSo0ZAgMBAAGjSzBJMEcGA1UdAQRAMD6AEFRsTAsrvF+FmPuICooZXaKhGDAWMRQwEgYDVQQDEwtCYXRjaFRlc3QwMYIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAA4GBALt0F8Ep+8XVE/M2aNtxzlku72gxiOiAo1HmpUaixXx3gl8kdP3xgoKMaq4JskqdLmbJJUnCQ3wmzsdPwjswsW2ycT12zuBddaiS+id98k8U/KYc6FxMgS+H70FYOxARLn7P4FSSBf/QCyign+BherzezdZ5NBdfzbmWxIMP5iFJ\"\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#certificates/@Element\",\r\n \"thumbprint\": \"c1e494a415149c5f211c4778b52f2e834a07247c\",\r\n \"thumbprintAlgorithm\": \"sha1\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)\",\r\n \"state\": \"deleting\",\r\n \"stateTransitionTime\": \"2024-03-22T19:21:11.303906Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2024-03-22T19:21:09.9900523Z\",\r\n \"publicData\": \"MIIB9DCCAWGgAwIBAgIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC0JhdGNoVGVzdDAxMB4XDTE1MTAwMjE2MjkwNVoXDTM5MTIzMTIzNTk1OVowFjEUMBIGA1UEAxMLQmF0Y2hUZXN0MDEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAM06unpRipn3BmHBM75d0s8w/Wwifci16PoJo4c2V68GwsCCFsNOn5ypo7BBXo1fpBjrnso5w+koaE5LjxkBSVm+TkogwbKlW6WURTM0O5viRVbPnEEU/Y01Pj5cJElFuLEk9Uoe/r/lP8b5A607t1cPjSXkwhEZEYc3LkHDSo0ZAgMBAAGjSzBJMEcGA1UdAQRAMD6AEFRsTAsrvF+FmPuICooZXaKhGDAWMRQwEgYDVQQDEwtCYXRjaFRlc3QwMYIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAA4GBALt0F8Ep+8XVE/M2aNtxzlku72gxiOiAo1HmpUaixXx3gl8kdP3xgoKMaq4JskqdLmbJJUnCQ3wmzsdPwjswsW2ycT12zuBddaiS+id98k8U/KYc6FxMgS+H70FYOxARLn7P4FSSBf/QCyign+BherzezdZ5NBdfzbmWxIMP5iFJ\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2NlcnRpZmljYXRlcyh0aHVtYnByaW50QWxnb3JpdGhtPXNoYTEsdGh1bWJwcmludD1jMWU0OTRhNDE1MTQ5YzVmMjExYzQ3NzhiNTJmMmU4MzRhMDcyNDdjKT9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjA=", + "RequestUri": "/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2NlcnRpZmljYXRlcyh0aHVtYnByaW50QWxnb3JpdGhtPXNoYTEsdGh1bWJwcmludD1jMWU0OTRhNDE1MTQ5YzVmMjExYzQ3NzhiNTJmMmU4MzRhMDcyNDdjKT9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "45d31092-ad31-4fda-b6b4-a54deeff11d3" + "5b94c5a7-645a-4204-8add-a4212028de62" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:21:57 GMT" + "Fri, 22 Mar 2024 19:21:21 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -1043,7 +367,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "6f04bfbc-bf14-44b6-ae96-96d0b2b015c7" + "044908d1-c2b9-43eb-a6c2-87245df30b4e" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1055,34 +379,34 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:21:57 GMT" + "Fri, 22 Mar 2024 19:21:21 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#certificates/@Element\",\r\n \"thumbprint\": \"c1e494a415149c5f211c4778b52f2e834a07247c\",\r\n \"thumbprintAlgorithm\": \"sha1\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)\",\r\n \"state\": \"deleting\",\r\n \"stateTransitionTime\": \"2023-06-16T07:21:37.9301169Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2023-06-16T07:21:37.6012615Z\",\r\n \"publicData\": \"MIIB9DCCAWGgAwIBAgIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC0JhdGNoVGVzdDAxMB4XDTE1MTAwMjE2MjkwNVoXDTM5MTIzMTIzNTk1OVowFjEUMBIGA1UEAxMLQmF0Y2hUZXN0MDEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAM06unpRipn3BmHBM75d0s8w/Wwifci16PoJo4c2V68GwsCCFsNOn5ypo7BBXo1fpBjrnso5w+koaE5LjxkBSVm+TkogwbKlW6WURTM0O5viRVbPnEEU/Y01Pj5cJElFuLEk9Uoe/r/lP8b5A607t1cPjSXkwhEZEYc3LkHDSo0ZAgMBAAGjSzBJMEcGA1UdAQRAMD6AEFRsTAsrvF+FmPuICooZXaKhGDAWMRQwEgYDVQQDEwtCYXRjaFRlc3QwMYIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAA4GBALt0F8Ep+8XVE/M2aNtxzlku72gxiOiAo1HmpUaixXx3gl8kdP3xgoKMaq4JskqdLmbJJUnCQ3wmzsdPwjswsW2ycT12zuBddaiS+id98k8U/KYc6FxMgS+H70FYOxARLn7P4FSSBf/QCyign+BherzezdZ5NBdfzbmWxIMP5iFJ\"\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#certificates/@Element\",\r\n \"thumbprint\": \"c1e494a415149c5f211c4778b52f2e834a07247c\",\r\n \"thumbprintAlgorithm\": \"sha1\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)\",\r\n \"state\": \"deleting\",\r\n \"stateTransitionTime\": \"2024-03-22T19:21:11.303906Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2024-03-22T19:21:09.9900523Z\",\r\n \"publicData\": \"MIIB9DCCAWGgAwIBAgIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC0JhdGNoVGVzdDAxMB4XDTE1MTAwMjE2MjkwNVoXDTM5MTIzMTIzNTk1OVowFjEUMBIGA1UEAxMLQmF0Y2hUZXN0MDEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAM06unpRipn3BmHBM75d0s8w/Wwifci16PoJo4c2V68GwsCCFsNOn5ypo7BBXo1fpBjrnso5w+koaE5LjxkBSVm+TkogwbKlW6WURTM0O5viRVbPnEEU/Y01Pj5cJElFuLEk9Uoe/r/lP8b5A607t1cPjSXkwhEZEYc3LkHDSo0ZAgMBAAGjSzBJMEcGA1UdAQRAMD6AEFRsTAsrvF+FmPuICooZXaKhGDAWMRQwEgYDVQQDEwtCYXRjaFRlc3QwMYIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAA4GBALt0F8Ep+8XVE/M2aNtxzlku72gxiOiAo1HmpUaixXx3gl8kdP3xgoKMaq4JskqdLmbJJUnCQ3wmzsdPwjswsW2ycT12zuBddaiS+id98k8U/KYc6FxMgS+H70FYOxARLn7P4FSSBf/QCyign+BherzezdZ5NBdfzbmWxIMP5iFJ\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2NlcnRpZmljYXRlcyh0aHVtYnByaW50QWxnb3JpdGhtPXNoYTEsdGh1bWJwcmludD1jMWU0OTRhNDE1MTQ5YzVmMjExYzQ3NzhiNTJmMmU4MzRhMDcyNDdjKT9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjA=", + "RequestUri": "/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2NlcnRpZmljYXRlcyh0aHVtYnByaW50QWxnb3JpdGhtPXNoYTEsdGh1bWJwcmludD1jMWU0OTRhNDE1MTQ5YzVmMjExYzQ3NzhiNTJmMmU4MzRhMDcyNDdjKT9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "93b0470c-eb9b-4399-aa21-90c627f24b6c" + "8e1e4c12-89ee-4b71-b50f-c58a5f0fc1ac" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:22:07 GMT" + "Fri, 22 Mar 2024 19:21:31 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -1095,7 +419,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "0cc768f0-724a-450b-a9ff-25d788888765" + "21992926-8cfd-438f-b984-78799e35e373" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1107,34 +431,34 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:22:08 GMT" + "Fri, 22 Mar 2024 19:21:31 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#certificates/@Element\",\r\n \"thumbprint\": \"c1e494a415149c5f211c4778b52f2e834a07247c\",\r\n \"thumbprintAlgorithm\": \"sha1\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)\",\r\n \"state\": \"deleting\",\r\n \"stateTransitionTime\": \"2023-06-16T07:21:37.9301169Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2023-06-16T07:21:37.6012615Z\",\r\n \"publicData\": \"MIIB9DCCAWGgAwIBAgIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC0JhdGNoVGVzdDAxMB4XDTE1MTAwMjE2MjkwNVoXDTM5MTIzMTIzNTk1OVowFjEUMBIGA1UEAxMLQmF0Y2hUZXN0MDEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAM06unpRipn3BmHBM75d0s8w/Wwifci16PoJo4c2V68GwsCCFsNOn5ypo7BBXo1fpBjrnso5w+koaE5LjxkBSVm+TkogwbKlW6WURTM0O5viRVbPnEEU/Y01Pj5cJElFuLEk9Uoe/r/lP8b5A607t1cPjSXkwhEZEYc3LkHDSo0ZAgMBAAGjSzBJMEcGA1UdAQRAMD6AEFRsTAsrvF+FmPuICooZXaKhGDAWMRQwEgYDVQQDEwtCYXRjaFRlc3QwMYIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAA4GBALt0F8Ep+8XVE/M2aNtxzlku72gxiOiAo1HmpUaixXx3gl8kdP3xgoKMaq4JskqdLmbJJUnCQ3wmzsdPwjswsW2ycT12zuBddaiS+id98k8U/KYc6FxMgS+H70FYOxARLn7P4FSSBf/QCyign+BherzezdZ5NBdfzbmWxIMP5iFJ\"\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#certificates/@Element\",\r\n \"thumbprint\": \"c1e494a415149c5f211c4778b52f2e834a07247c\",\r\n \"thumbprintAlgorithm\": \"sha1\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)\",\r\n \"state\": \"deleting\",\r\n \"stateTransitionTime\": \"2024-03-22T19:21:11.303906Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2024-03-22T19:21:09.9900523Z\",\r\n \"publicData\": \"MIIB9DCCAWGgAwIBAgIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC0JhdGNoVGVzdDAxMB4XDTE1MTAwMjE2MjkwNVoXDTM5MTIzMTIzNTk1OVowFjEUMBIGA1UEAxMLQmF0Y2hUZXN0MDEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAM06unpRipn3BmHBM75d0s8w/Wwifci16PoJo4c2V68GwsCCFsNOn5ypo7BBXo1fpBjrnso5w+koaE5LjxkBSVm+TkogwbKlW6WURTM0O5viRVbPnEEU/Y01Pj5cJElFuLEk9Uoe/r/lP8b5A607t1cPjSXkwhEZEYc3LkHDSo0ZAgMBAAGjSzBJMEcGA1UdAQRAMD6AEFRsTAsrvF+FmPuICooZXaKhGDAWMRQwEgYDVQQDEwtCYXRjaFRlc3QwMYIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAA4GBALt0F8Ep+8XVE/M2aNtxzlku72gxiOiAo1HmpUaixXx3gl8kdP3xgoKMaq4JskqdLmbJJUnCQ3wmzsdPwjswsW2ycT12zuBddaiS+id98k8U/KYc6FxMgS+H70FYOxARLn7P4FSSBf/QCyign+BherzezdZ5NBdfzbmWxIMP5iFJ\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2NlcnRpZmljYXRlcyh0aHVtYnByaW50QWxnb3JpdGhtPXNoYTEsdGh1bWJwcmludD1jMWU0OTRhNDE1MTQ5YzVmMjExYzQ3NzhiNTJmMmU4MzRhMDcyNDdjKT9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjA=", + "RequestUri": "/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2NlcnRpZmljYXRlcyh0aHVtYnByaW50QWxnb3JpdGhtPXNoYTEsdGh1bWJwcmludD1jMWU0OTRhNDE1MTQ5YzVmMjExYzQ3NzhiNTJmMmU4MzRhMDcyNDdjKT9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "7ff451e0-917e-4a0a-b513-7f706d5d472e" + "d9b242df-4b41-4546-a9a7-26c37d89c26c" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:22:17 GMT" + "Fri, 22 Mar 2024 19:21:41 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -1147,7 +471,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "67aaa7b5-59a5-4289-b3d5-68c98eda9723" + "42a0618e-4455-468a-b646-641135ca343a" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1159,34 +483,34 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:22:18 GMT" + "Fri, 22 Mar 2024 19:21:41 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#certificates/@Element\",\r\n \"thumbprint\": \"c1e494a415149c5f211c4778b52f2e834a07247c\",\r\n \"thumbprintAlgorithm\": \"sha1\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)\",\r\n \"state\": \"deleting\",\r\n \"stateTransitionTime\": \"2023-06-16T07:21:37.9301169Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2023-06-16T07:21:37.6012615Z\",\r\n \"publicData\": \"MIIB9DCCAWGgAwIBAgIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC0JhdGNoVGVzdDAxMB4XDTE1MTAwMjE2MjkwNVoXDTM5MTIzMTIzNTk1OVowFjEUMBIGA1UEAxMLQmF0Y2hUZXN0MDEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAM06unpRipn3BmHBM75d0s8w/Wwifci16PoJo4c2V68GwsCCFsNOn5ypo7BBXo1fpBjrnso5w+koaE5LjxkBSVm+TkogwbKlW6WURTM0O5viRVbPnEEU/Y01Pj5cJElFuLEk9Uoe/r/lP8b5A607t1cPjSXkwhEZEYc3LkHDSo0ZAgMBAAGjSzBJMEcGA1UdAQRAMD6AEFRsTAsrvF+FmPuICooZXaKhGDAWMRQwEgYDVQQDEwtCYXRjaFRlc3QwMYIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAA4GBALt0F8Ep+8XVE/M2aNtxzlku72gxiOiAo1HmpUaixXx3gl8kdP3xgoKMaq4JskqdLmbJJUnCQ3wmzsdPwjswsW2ycT12zuBddaiS+id98k8U/KYc6FxMgS+H70FYOxARLn7P4FSSBf/QCyign+BherzezdZ5NBdfzbmWxIMP5iFJ\"\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#certificates/@Element\",\r\n \"thumbprint\": \"c1e494a415149c5f211c4778b52f2e834a07247c\",\r\n \"thumbprintAlgorithm\": \"sha1\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)\",\r\n \"state\": \"deleting\",\r\n \"stateTransitionTime\": \"2024-03-22T19:21:11.303906Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2024-03-22T19:21:09.9900523Z\",\r\n \"publicData\": \"MIIB9DCCAWGgAwIBAgIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC0JhdGNoVGVzdDAxMB4XDTE1MTAwMjE2MjkwNVoXDTM5MTIzMTIzNTk1OVowFjEUMBIGA1UEAxMLQmF0Y2hUZXN0MDEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAM06unpRipn3BmHBM75d0s8w/Wwifci16PoJo4c2V68GwsCCFsNOn5ypo7BBXo1fpBjrnso5w+koaE5LjxkBSVm+TkogwbKlW6WURTM0O5viRVbPnEEU/Y01Pj5cJElFuLEk9Uoe/r/lP8b5A607t1cPjSXkwhEZEYc3LkHDSo0ZAgMBAAGjSzBJMEcGA1UdAQRAMD6AEFRsTAsrvF+FmPuICooZXaKhGDAWMRQwEgYDVQQDEwtCYXRjaFRlc3QwMYIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAA4GBALt0F8Ep+8XVE/M2aNtxzlku72gxiOiAo1HmpUaixXx3gl8kdP3xgoKMaq4JskqdLmbJJUnCQ3wmzsdPwjswsW2ycT12zuBddaiS+id98k8U/KYc6FxMgS+H70FYOxARLn7P4FSSBf/QCyign+BherzezdZ5NBdfzbmWxIMP5iFJ\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2NlcnRpZmljYXRlcyh0aHVtYnByaW50QWxnb3JpdGhtPXNoYTEsdGh1bWJwcmludD1jMWU0OTRhNDE1MTQ5YzVmMjExYzQ3NzhiNTJmMmU4MzRhMDcyNDdjKT9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjA=", + "RequestUri": "/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2NlcnRpZmljYXRlcyh0aHVtYnByaW50QWxnb3JpdGhtPXNoYTEsdGh1bWJwcmludD1jMWU0OTRhNDE1MTQ5YzVmMjExYzQ3NzhiNTJmMmU4MzRhMDcyNDdjKT9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "f4ca148f-6234-49a4-9172-18bd94dd0463" + "57974daa-e02d-438c-ba61-0d1c27b87ec5" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:22:27 GMT" + "Fri, 22 Mar 2024 19:21:52 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -1199,7 +523,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "50c03eeb-35b9-457f-857f-a19ec7d60115" + "741bff8b-f599-48a2-aefb-ebe2ae04bd45" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1211,34 +535,34 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:22:27 GMT" + "Fri, 22 Mar 2024 19:21:51 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#certificates/@Element\",\r\n \"thumbprint\": \"c1e494a415149c5f211c4778b52f2e834a07247c\",\r\n \"thumbprintAlgorithm\": \"sha1\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)\",\r\n \"state\": \"deleting\",\r\n \"stateTransitionTime\": \"2023-06-16T07:21:37.9301169Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2023-06-16T07:21:37.6012615Z\",\r\n \"publicData\": \"MIIB9DCCAWGgAwIBAgIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC0JhdGNoVGVzdDAxMB4XDTE1MTAwMjE2MjkwNVoXDTM5MTIzMTIzNTk1OVowFjEUMBIGA1UEAxMLQmF0Y2hUZXN0MDEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAM06unpRipn3BmHBM75d0s8w/Wwifci16PoJo4c2V68GwsCCFsNOn5ypo7BBXo1fpBjrnso5w+koaE5LjxkBSVm+TkogwbKlW6WURTM0O5viRVbPnEEU/Y01Pj5cJElFuLEk9Uoe/r/lP8b5A607t1cPjSXkwhEZEYc3LkHDSo0ZAgMBAAGjSzBJMEcGA1UdAQRAMD6AEFRsTAsrvF+FmPuICooZXaKhGDAWMRQwEgYDVQQDEwtCYXRjaFRlc3QwMYIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAA4GBALt0F8Ep+8XVE/M2aNtxzlku72gxiOiAo1HmpUaixXx3gl8kdP3xgoKMaq4JskqdLmbJJUnCQ3wmzsdPwjswsW2ycT12zuBddaiS+id98k8U/KYc6FxMgS+H70FYOxARLn7P4FSSBf/QCyign+BherzezdZ5NBdfzbmWxIMP5iFJ\"\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#certificates/@Element\",\r\n \"thumbprint\": \"c1e494a415149c5f211c4778b52f2e834a07247c\",\r\n \"thumbprintAlgorithm\": \"sha1\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)\",\r\n \"state\": \"deleting\",\r\n \"stateTransitionTime\": \"2024-03-22T19:21:11.303906Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2024-03-22T19:21:09.9900523Z\",\r\n \"publicData\": \"MIIB9DCCAWGgAwIBAgIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC0JhdGNoVGVzdDAxMB4XDTE1MTAwMjE2MjkwNVoXDTM5MTIzMTIzNTk1OVowFjEUMBIGA1UEAxMLQmF0Y2hUZXN0MDEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAM06unpRipn3BmHBM75d0s8w/Wwifci16PoJo4c2V68GwsCCFsNOn5ypo7BBXo1fpBjrnso5w+koaE5LjxkBSVm+TkogwbKlW6WURTM0O5viRVbPnEEU/Y01Pj5cJElFuLEk9Uoe/r/lP8b5A607t1cPjSXkwhEZEYc3LkHDSo0ZAgMBAAGjSzBJMEcGA1UdAQRAMD6AEFRsTAsrvF+FmPuICooZXaKhGDAWMRQwEgYDVQQDEwtCYXRjaFRlc3QwMYIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAA4GBALt0F8Ep+8XVE/M2aNtxzlku72gxiOiAo1HmpUaixXx3gl8kdP3xgoKMaq4JskqdLmbJJUnCQ3wmzsdPwjswsW2ycT12zuBddaiS+id98k8U/KYc6FxMgS+H70FYOxARLn7P4FSSBf/QCyign+BherzezdZ5NBdfzbmWxIMP5iFJ\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2NlcnRpZmljYXRlcyh0aHVtYnByaW50QWxnb3JpdGhtPXNoYTEsdGh1bWJwcmludD1jMWU0OTRhNDE1MTQ5YzVmMjExYzQ3NzhiNTJmMmU4MzRhMDcyNDdjKT9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjA=", + "RequestUri": "/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2NlcnRpZmljYXRlcyh0aHVtYnByaW50QWxnb3JpdGhtPXNoYTEsdGh1bWJwcmludD1jMWU0OTRhNDE1MTQ5YzVmMjExYzQ3NzhiNTJmMmU4MzRhMDcyNDdjKT9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "75e75eb1-af04-4c1a-a8b2-15dd91fd01d2" + "291ccc53-4e0a-4cb0-a65c-9ddab44c46f7" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:22:37 GMT" + "Fri, 22 Mar 2024 19:22:02 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -1251,7 +575,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "09b9eb4a-5982-49cb-b6ed-9d817d3b5a5e" + "ae26a3c9-50ff-491b-94f6-0d5eb114e345" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1263,34 +587,34 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:22:38 GMT" + "Fri, 22 Mar 2024 19:22:03 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#certificates/@Element\",\r\n \"thumbprint\": \"c1e494a415149c5f211c4778b52f2e834a07247c\",\r\n \"thumbprintAlgorithm\": \"sha1\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)\",\r\n \"state\": \"deleting\",\r\n \"stateTransitionTime\": \"2023-06-16T07:21:37.9301169Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2023-06-16T07:21:37.6012615Z\",\r\n \"publicData\": \"MIIB9DCCAWGgAwIBAgIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC0JhdGNoVGVzdDAxMB4XDTE1MTAwMjE2MjkwNVoXDTM5MTIzMTIzNTk1OVowFjEUMBIGA1UEAxMLQmF0Y2hUZXN0MDEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAM06unpRipn3BmHBM75d0s8w/Wwifci16PoJo4c2V68GwsCCFsNOn5ypo7BBXo1fpBjrnso5w+koaE5LjxkBSVm+TkogwbKlW6WURTM0O5viRVbPnEEU/Y01Pj5cJElFuLEk9Uoe/r/lP8b5A607t1cPjSXkwhEZEYc3LkHDSo0ZAgMBAAGjSzBJMEcGA1UdAQRAMD6AEFRsTAsrvF+FmPuICooZXaKhGDAWMRQwEgYDVQQDEwtCYXRjaFRlc3QwMYIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAA4GBALt0F8Ep+8XVE/M2aNtxzlku72gxiOiAo1HmpUaixXx3gl8kdP3xgoKMaq4JskqdLmbJJUnCQ3wmzsdPwjswsW2ycT12zuBddaiS+id98k8U/KYc6FxMgS+H70FYOxARLn7P4FSSBf/QCyign+BherzezdZ5NBdfzbmWxIMP5iFJ\"\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#certificates/@Element\",\r\n \"thumbprint\": \"c1e494a415149c5f211c4778b52f2e834a07247c\",\r\n \"thumbprintAlgorithm\": \"sha1\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)\",\r\n \"state\": \"deleting\",\r\n \"stateTransitionTime\": \"2024-03-22T19:21:11.303906Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2024-03-22T19:21:09.9900523Z\",\r\n \"publicData\": \"MIIB9DCCAWGgAwIBAgIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC0JhdGNoVGVzdDAxMB4XDTE1MTAwMjE2MjkwNVoXDTM5MTIzMTIzNTk1OVowFjEUMBIGA1UEAxMLQmF0Y2hUZXN0MDEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAM06unpRipn3BmHBM75d0s8w/Wwifci16PoJo4c2V68GwsCCFsNOn5ypo7BBXo1fpBjrnso5w+koaE5LjxkBSVm+TkogwbKlW6WURTM0O5viRVbPnEEU/Y01Pj5cJElFuLEk9Uoe/r/lP8b5A607t1cPjSXkwhEZEYc3LkHDSo0ZAgMBAAGjSzBJMEcGA1UdAQRAMD6AEFRsTAsrvF+FmPuICooZXaKhGDAWMRQwEgYDVQQDEwtCYXRjaFRlc3QwMYIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAA4GBALt0F8Ep+8XVE/M2aNtxzlku72gxiOiAo1HmpUaixXx3gl8kdP3xgoKMaq4JskqdLmbJJUnCQ3wmzsdPwjswsW2ycT12zuBddaiS+id98k8U/KYc6FxMgS+H70FYOxARLn7P4FSSBf/QCyign+BherzezdZ5NBdfzbmWxIMP5iFJ\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2NlcnRpZmljYXRlcyh0aHVtYnByaW50QWxnb3JpdGhtPXNoYTEsdGh1bWJwcmludD1jMWU0OTRhNDE1MTQ5YzVmMjExYzQ3NzhiNTJmMmU4MzRhMDcyNDdjKT9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjA=", + "RequestUri": "/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2NlcnRpZmljYXRlcyh0aHVtYnByaW50QWxnb3JpdGhtPXNoYTEsdGh1bWJwcmludD1jMWU0OTRhNDE1MTQ5YzVmMjExYzQ3NzhiNTJmMmU4MzRhMDcyNDdjKT9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "0fc1bf2d-5a7d-47f8-8b06-e84dd6d07e13" + "f1ed3653-ebc1-4598-8355-4743aedfdcd2" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:22:47 GMT" + "Fri, 22 Mar 2024 19:22:12 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -1303,7 +627,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "9d9b7d82-2e31-4297-859f-26d542484dd9" + "09d84203-d956-44a4-af2c-cd58ff0a83e5" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1315,37 +639,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:22:48 GMT" + "Fri, 22 Mar 2024 19:22:13 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#certificates/@Element\",\r\n \"thumbprint\": \"c1e494a415149c5f211c4778b52f2e834a07247c\",\r\n \"thumbprintAlgorithm\": \"sha1\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)\",\r\n \"state\": \"deletefailed\",\r\n \"stateTransitionTime\": \"2023-06-16T07:22:39.659639Z\",\r\n \"previousState\": \"deleting\",\r\n \"previousStateTransitionTime\": \"2023-06-16T07:21:37.9301169Z\",\r\n \"publicData\": \"MIIB9DCCAWGgAwIBAgIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC0JhdGNoVGVzdDAxMB4XDTE1MTAwMjE2MjkwNVoXDTM5MTIzMTIzNTk1OVowFjEUMBIGA1UEAxMLQmF0Y2hUZXN0MDEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAM06unpRipn3BmHBM75d0s8w/Wwifci16PoJo4c2V68GwsCCFsNOn5ypo7BBXo1fpBjrnso5w+koaE5LjxkBSVm+TkogwbKlW6WURTM0O5viRVbPnEEU/Y01Pj5cJElFuLEk9Uoe/r/lP8b5A607t1cPjSXkwhEZEYc3LkHDSo0ZAgMBAAGjSzBJMEcGA1UdAQRAMD6AEFRsTAsrvF+FmPuICooZXaKhGDAWMRQwEgYDVQQDEwtCYXRjaFRlc3QwMYIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAA4GBALt0F8Ep+8XVE/M2aNtxzlku72gxiOiAo1HmpUaixXx3gl8kdP3xgoKMaq4JskqdLmbJJUnCQ3wmzsdPwjswsW2ycT12zuBddaiS+id98k8U/KYc6FxMgS+H70FYOxARLn7P4FSSBf/QCyign+BherzezdZ5NBdfzbmWxIMP5iFJ\",\r\n \"deleteCertificateError\": {\r\n \"code\": \"PoolsReferencingCertificate\",\r\n \"message\": \"The specified certificate is being used by the below mentioned pool(s)\",\r\n \"values\": [\r\n {\r\n \"name\": \"Pools\",\r\n \"value\": \"certPool\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#certificates/@Element\",\r\n \"thumbprint\": \"c1e494a415149c5f211c4778b52f2e834a07247c\",\r\n \"thumbprintAlgorithm\": \"sha1\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)\",\r\n \"state\": \"deletefailed\",\r\n \"stateTransitionTime\": \"2024-03-22T19:22:11.3742543Z\",\r\n \"previousState\": \"deleting\",\r\n \"previousStateTransitionTime\": \"2024-03-22T19:21:11.303906Z\",\r\n \"publicData\": \"MIIB9DCCAWGgAwIBAgIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC0JhdGNoVGVzdDAxMB4XDTE1MTAwMjE2MjkwNVoXDTM5MTIzMTIzNTk1OVowFjEUMBIGA1UEAxMLQmF0Y2hUZXN0MDEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAM06unpRipn3BmHBM75d0s8w/Wwifci16PoJo4c2V68GwsCCFsNOn5ypo7BBXo1fpBjrnso5w+koaE5LjxkBSVm+TkogwbKlW6WURTM0O5viRVbPnEEU/Y01Pj5cJElFuLEk9Uoe/r/lP8b5A607t1cPjSXkwhEZEYc3LkHDSo0ZAgMBAAGjSzBJMEcGA1UdAQRAMD6AEFRsTAsrvF+FmPuICooZXaKhGDAWMRQwEgYDVQQDEwtCYXRjaFRlc3QwMYIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAA4GBALt0F8Ep+8XVE/M2aNtxzlku72gxiOiAo1HmpUaixXx3gl8kdP3xgoKMaq4JskqdLmbJJUnCQ3wmzsdPwjswsW2ycT12zuBddaiS+id98k8U/KYc6FxMgS+H70FYOxARLn7P4FSSBf/QCyign+BherzezdZ5NBdfzbmWxIMP5iFJ\",\r\n \"deleteCertificateError\": {\r\n \"code\": \"PoolsReferencingCertificate\",\r\n \"message\": \"The specified certificate is being used by the below mentioned pool(s)\",\r\n \"values\": [\r\n {\r\n \"name\": \"Pools\",\r\n \"value\": \"certPool\"\r\n }\r\n ]\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2NlcnRpZmljYXRlcyh0aHVtYnByaW50QWxnb3JpdGhtPXNoYTEsdGh1bWJwcmludD1jMWU0OTRhNDE1MTQ5YzVmMjExYzQ3NzhiNTJmMmU4MzRhMDcyNDdjKT9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjA=", + "RequestUri": "/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2NlcnRpZmljYXRlcyh0aHVtYnByaW50QWxnb3JpdGhtPXNoYTEsdGh1bWJwcmludD1jMWU0OTRhNDE1MTQ5YzVmMjExYzQ3NzhiNTJmMmU4MzRhMDcyNDdjKT9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "eee442cc-17db-4aa5-ace4-e910322b037f" + "edacdbb7-868f-4654-a043-151082a9ae34" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:22:47 GMT" + "Fri, 22 Mar 2024 19:22:15 GMT" ], "x-ms-client-request-id": [ - "1f52b1e9-b27a-4d6e-9837-f7d920269984" + "799e69de-0c7c-4b9a-bd57-cb4cfdf2d707" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -1358,7 +682,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "dc73c014-820e-4467-80fe-a216da8b7e29" + "12383f83-89a3-4b88-abe9-d786f699b71d" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1370,37 +694,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:22:49 GMT" + "Fri, 22 Mar 2024 19:22:16 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#certificates/@Element\",\r\n \"thumbprint\": \"c1e494a415149c5f211c4778b52f2e834a07247c\",\r\n \"thumbprintAlgorithm\": \"sha1\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)\",\r\n \"state\": \"deletefailed\",\r\n \"stateTransitionTime\": \"2023-06-16T07:22:39.659639Z\",\r\n \"previousState\": \"deleting\",\r\n \"previousStateTransitionTime\": \"2023-06-16T07:21:37.9301169Z\",\r\n \"publicData\": \"MIIB9DCCAWGgAwIBAgIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC0JhdGNoVGVzdDAxMB4XDTE1MTAwMjE2MjkwNVoXDTM5MTIzMTIzNTk1OVowFjEUMBIGA1UEAxMLQmF0Y2hUZXN0MDEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAM06unpRipn3BmHBM75d0s8w/Wwifci16PoJo4c2V68GwsCCFsNOn5ypo7BBXo1fpBjrnso5w+koaE5LjxkBSVm+TkogwbKlW6WURTM0O5viRVbPnEEU/Y01Pj5cJElFuLEk9Uoe/r/lP8b5A607t1cPjSXkwhEZEYc3LkHDSo0ZAgMBAAGjSzBJMEcGA1UdAQRAMD6AEFRsTAsrvF+FmPuICooZXaKhGDAWMRQwEgYDVQQDEwtCYXRjaFRlc3QwMYIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAA4GBALt0F8Ep+8XVE/M2aNtxzlku72gxiOiAo1HmpUaixXx3gl8kdP3xgoKMaq4JskqdLmbJJUnCQ3wmzsdPwjswsW2ycT12zuBddaiS+id98k8U/KYc6FxMgS+H70FYOxARLn7P4FSSBf/QCyign+BherzezdZ5NBdfzbmWxIMP5iFJ\",\r\n \"deleteCertificateError\": {\r\n \"code\": \"PoolsReferencingCertificate\",\r\n \"message\": \"The specified certificate is being used by the below mentioned pool(s)\",\r\n \"values\": [\r\n {\r\n \"name\": \"Pools\",\r\n \"value\": \"certPool\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#certificates/@Element\",\r\n \"thumbprint\": \"c1e494a415149c5f211c4778b52f2e834a07247c\",\r\n \"thumbprintAlgorithm\": \"sha1\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)\",\r\n \"state\": \"deletefailed\",\r\n \"stateTransitionTime\": \"2024-03-22T19:22:11.3742543Z\",\r\n \"previousState\": \"deleting\",\r\n \"previousStateTransitionTime\": \"2024-03-22T19:21:11.303906Z\",\r\n \"publicData\": \"MIIB9DCCAWGgAwIBAgIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC0JhdGNoVGVzdDAxMB4XDTE1MTAwMjE2MjkwNVoXDTM5MTIzMTIzNTk1OVowFjEUMBIGA1UEAxMLQmF0Y2hUZXN0MDEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAM06unpRipn3BmHBM75d0s8w/Wwifci16PoJo4c2V68GwsCCFsNOn5ypo7BBXo1fpBjrnso5w+koaE5LjxkBSVm+TkogwbKlW6WURTM0O5viRVbPnEEU/Y01Pj5cJElFuLEk9Uoe/r/lP8b5A607t1cPjSXkwhEZEYc3LkHDSo0ZAgMBAAGjSzBJMEcGA1UdAQRAMD6AEFRsTAsrvF+FmPuICooZXaKhGDAWMRQwEgYDVQQDEwtCYXRjaFRlc3QwMYIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAA4GBALt0F8Ep+8XVE/M2aNtxzlku72gxiOiAo1HmpUaixXx3gl8kdP3xgoKMaq4JskqdLmbJJUnCQ3wmzsdPwjswsW2ycT12zuBddaiS+id98k8U/KYc6FxMgS+H70FYOxARLn7P4FSSBf/QCyign+BherzezdZ5NBdfzbmWxIMP5iFJ\",\r\n \"deleteCertificateError\": {\r\n \"code\": \"PoolsReferencingCertificate\",\r\n \"message\": \"The specified certificate is being used by the below mentioned pool(s)\",\r\n \"values\": [\r\n {\r\n \"name\": \"Pools\",\r\n \"value\": \"certPool\"\r\n }\r\n ]\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2NlcnRpZmljYXRlcyh0aHVtYnByaW50QWxnb3JpdGhtPXNoYTEsdGh1bWJwcmludD1jMWU0OTRhNDE1MTQ5YzVmMjExYzQ3NzhiNTJmMmU4MzRhMDcyNDdjKT9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjA=", + "RequestUri": "/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2NlcnRpZmljYXRlcyh0aHVtYnByaW50QWxnb3JpdGhtPXNoYTEsdGh1bWJwcmludD1jMWU0OTRhNDE1MTQ5YzVmMjExYzQ3NzhiNTJmMmU4MzRhMDcyNDdjKT9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "07f8d789-c597-4a2d-a3ac-f711fe981910" + "9cf99317-18b1-4159-8675-899f4276d15a" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:22:48 GMT" + "Fri, 22 Mar 2024 19:22:16 GMT" ], "x-ms-client-request-id": [ - "680764f4-d1f6-41a6-b6d3-1d44df2f6bb1" + "35ed242b-cfcd-4a88-a344-ca80d381edcb" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -1413,7 +737,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "53a6aaa4-f455-4457-93e7-4195669d715f" + "4fc2c1f5-dbd3-4bb1-bc1c-0f8b19bb6d25" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1425,37 +749,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:22:49 GMT" + "Fri, 22 Mar 2024 19:22:16 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#certificates/@Element\",\r\n \"thumbprint\": \"c1e494a415149c5f211c4778b52f2e834a07247c\",\r\n \"thumbprintAlgorithm\": \"sha1\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)\",\r\n \"state\": \"deletefailed\",\r\n \"stateTransitionTime\": \"2023-06-16T07:22:39.659639Z\",\r\n \"previousState\": \"deleting\",\r\n \"previousStateTransitionTime\": \"2023-06-16T07:21:37.9301169Z\",\r\n \"publicData\": \"MIIB9DCCAWGgAwIBAgIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC0JhdGNoVGVzdDAxMB4XDTE1MTAwMjE2MjkwNVoXDTM5MTIzMTIzNTk1OVowFjEUMBIGA1UEAxMLQmF0Y2hUZXN0MDEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAM06unpRipn3BmHBM75d0s8w/Wwifci16PoJo4c2V68GwsCCFsNOn5ypo7BBXo1fpBjrnso5w+koaE5LjxkBSVm+TkogwbKlW6WURTM0O5viRVbPnEEU/Y01Pj5cJElFuLEk9Uoe/r/lP8b5A607t1cPjSXkwhEZEYc3LkHDSo0ZAgMBAAGjSzBJMEcGA1UdAQRAMD6AEFRsTAsrvF+FmPuICooZXaKhGDAWMRQwEgYDVQQDEwtCYXRjaFRlc3QwMYIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAA4GBALt0F8Ep+8XVE/M2aNtxzlku72gxiOiAo1HmpUaixXx3gl8kdP3xgoKMaq4JskqdLmbJJUnCQ3wmzsdPwjswsW2ycT12zuBddaiS+id98k8U/KYc6FxMgS+H70FYOxARLn7P4FSSBf/QCyign+BherzezdZ5NBdfzbmWxIMP5iFJ\",\r\n \"deleteCertificateError\": {\r\n \"code\": \"PoolsReferencingCertificate\",\r\n \"message\": \"The specified certificate is being used by the below mentioned pool(s)\",\r\n \"values\": [\r\n {\r\n \"name\": \"Pools\",\r\n \"value\": \"certPool\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#certificates/@Element\",\r\n \"thumbprint\": \"c1e494a415149c5f211c4778b52f2e834a07247c\",\r\n \"thumbprintAlgorithm\": \"sha1\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)\",\r\n \"state\": \"deletefailed\",\r\n \"stateTransitionTime\": \"2024-03-22T19:22:11.3742543Z\",\r\n \"previousState\": \"deleting\",\r\n \"previousStateTransitionTime\": \"2024-03-22T19:21:11.303906Z\",\r\n \"publicData\": \"MIIB9DCCAWGgAwIBAgIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC0JhdGNoVGVzdDAxMB4XDTE1MTAwMjE2MjkwNVoXDTM5MTIzMTIzNTk1OVowFjEUMBIGA1UEAxMLQmF0Y2hUZXN0MDEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAM06unpRipn3BmHBM75d0s8w/Wwifci16PoJo4c2V68GwsCCFsNOn5ypo7BBXo1fpBjrnso5w+koaE5LjxkBSVm+TkogwbKlW6WURTM0O5viRVbPnEEU/Y01Pj5cJElFuLEk9Uoe/r/lP8b5A607t1cPjSXkwhEZEYc3LkHDSo0ZAgMBAAGjSzBJMEcGA1UdAQRAMD6AEFRsTAsrvF+FmPuICooZXaKhGDAWMRQwEgYDVQQDEwtCYXRjaFRlc3QwMYIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAA4GBALt0F8Ep+8XVE/M2aNtxzlku72gxiOiAo1HmpUaixXx3gl8kdP3xgoKMaq4JskqdLmbJJUnCQ3wmzsdPwjswsW2ycT12zuBddaiS+id98k8U/KYc6FxMgS+H70FYOxARLn7P4FSSBf/QCyign+BherzezdZ5NBdfzbmWxIMP5iFJ\",\r\n \"deleteCertificateError\": {\r\n \"code\": \"PoolsReferencingCertificate\",\r\n \"message\": \"The specified certificate is being used by the below mentioned pool(s)\",\r\n \"values\": [\r\n {\r\n \"name\": \"Pools\",\r\n \"value\": \"certPool\"\r\n }\r\n ]\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)/canceldelete?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2NlcnRpZmljYXRlcyh0aHVtYnByaW50QWxnb3JpdGhtPXNoYTEsdGh1bWJwcmludD1jMWU0OTRhNDE1MTQ5YzVmMjExYzQ3NzhiNTJmMmU4MzRhMDcyNDdjKS9jYW5jZWxkZWxldGU/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)/canceldelete?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2NlcnRpZmljYXRlcyh0aHVtYnByaW50QWxnb3JpdGhtPXNoYTEsdGh1bWJwcmludD1jMWU0OTRhNDE1MTQ5YzVmMjExYzQ3NzhiNTJmMmU4MzRhMDcyNDdjKS9jYW5jZWxkZWxldGU/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "1d9d9e14-77a5-46c9-b5b1-ded6f0c796f1" + "40d65636-1e0e-4413-a37a-0b40a2712a0c" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:22:48 GMT" + "Fri, 22 Mar 2024 19:22:16 GMT" ], "x-ms-client-request-id": [ - "680764f4-d1f6-41a6-b6d3-1d44df2f6bb1" + "35ed242b-cfcd-4a88-a344-ca80d381edcb" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Length": [ @@ -1468,7 +792,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "2a69fce4-c216-4190-9544-328bc75039a6" + "3b318881-8a37-4140-8123-723f25b37932" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1480,10 +804,10 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)/canceldelete" + "https://billstestba24326.uksouth.batch.azure.com/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)/canceldelete" ], "Date": [ - "Fri, 16 Jun 2023 07:22:49 GMT" + "Fri, 22 Mar 2024 19:22:16 GMT" ], "Content-Length": [ "0" @@ -1493,27 +817,27 @@ "StatusCode": 204 }, { - "RequestUri": "/certificates?api-version=2023-05-01.17.0&$filter=state%20eq%20%27active%27", - "EncodedRequestUri": "L2NlcnRpZmljYXRlcz9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjAmJGZpbHRlcj1zdGF0ZSUyMGVxJTIwJTI3YWN0aXZlJTI3", + "RequestUri": "/certificates?api-version=2024-02-01.19.0&$filter=state%20eq%20%27active%27", + "EncodedRequestUri": "L2NlcnRpZmljYXRlcz9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjAmJGZpbHRlcj1zdGF0ZSUyMGVxJTIwJTI3YWN0aXZlJTI3", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "b14b7c3b-a90d-416f-b23a-f988d552729d" + "11237c3a-b92f-473c-9467-2a83c716afed" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:22:48 GMT" + "Fri, 22 Mar 2024 19:22:16 GMT" ], "x-ms-client-request-id": [ - "48e69577-1b3d-4aae-ab50-088069ad73a3" + "0814ed65-9f29-4e18-96fb-997d2663d7f5" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -1526,7 +850,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "fc690b15-9093-45a1-907a-b0a2b43f6037" + "3e6a8969-b641-4229-b2fb-033ce653694f" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1538,34 +862,34 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:22:49 GMT" + "Fri, 22 Mar 2024 19:22:16 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#certificates\",\r\n \"value\": [\r\n {\r\n \"thumbprint\": \"c1e494a415149c5f211c4778b52f2e834a07247c\",\r\n \"thumbprintAlgorithm\": \"sha1\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:22:49.9173421Z\",\r\n \"previousState\": \"deletefailed\",\r\n \"previousStateTransitionTime\": \"2023-06-16T07:22:39.659639Z\",\r\n \"publicData\": \"MIIB9DCCAWGgAwIBAgIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC0JhdGNoVGVzdDAxMB4XDTE1MTAwMjE2MjkwNVoXDTM5MTIzMTIzNTk1OVowFjEUMBIGA1UEAxMLQmF0Y2hUZXN0MDEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAM06unpRipn3BmHBM75d0s8w/Wwifci16PoJo4c2V68GwsCCFsNOn5ypo7BBXo1fpBjrnso5w+koaE5LjxkBSVm+TkogwbKlW6WURTM0O5viRVbPnEEU/Y01Pj5cJElFuLEk9Uoe/r/lP8b5A607t1cPjSXkwhEZEYc3LkHDSo0ZAgMBAAGjSzBJMEcGA1UdAQRAMD6AEFRsTAsrvF+FmPuICooZXaKhGDAWMRQwEgYDVQQDEwtCYXRjaFRlc3QwMYIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAA4GBALt0F8Ep+8XVE/M2aNtxzlku72gxiOiAo1HmpUaixXx3gl8kdP3xgoKMaq4JskqdLmbJJUnCQ3wmzsdPwjswsW2ycT12zuBddaiS+id98k8U/KYc6FxMgS+H70FYOxARLn7P4FSSBf/QCyign+BherzezdZ5NBdfzbmWxIMP5iFJ\"\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#certificates\",\r\n \"value\": [\r\n {\r\n \"thumbprint\": \"c1e494a415149c5f211c4778b52f2e834a07247c\",\r\n \"thumbprintAlgorithm\": \"sha1\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T19:22:16.7895565Z\",\r\n \"previousState\": \"deletefailed\",\r\n \"previousStateTransitionTime\": \"2024-03-22T19:22:11.3742543Z\",\r\n \"publicData\": \"MIIB9DCCAWGgAwIBAgIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC0JhdGNoVGVzdDAxMB4XDTE1MTAwMjE2MjkwNVoXDTM5MTIzMTIzNTk1OVowFjEUMBIGA1UEAxMLQmF0Y2hUZXN0MDEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAM06unpRipn3BmHBM75d0s8w/Wwifci16PoJo4c2V68GwsCCFsNOn5ypo7BBXo1fpBjrnso5w+koaE5LjxkBSVm+TkogwbKlW6WURTM0O5viRVbPnEEU/Y01Pj5cJElFuLEk9Uoe/r/lP8b5A607t1cPjSXkwhEZEYc3LkHDSo0ZAgMBAAGjSzBJMEcGA1UdAQRAMD6AEFRsTAsrvF+FmPuICooZXaKhGDAWMRQwEgYDVQQDEwtCYXRjaFRlc3QwMYIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAA4GBALt0F8Ep+8XVE/M2aNtxzlku72gxiOiAo1HmpUaixXx3gl8kdP3xgoKMaq4JskqdLmbJJUnCQ3wmzsdPwjswsW2ycT12zuBddaiS+id98k8U/KYc6FxMgS+H70FYOxARLn7P4FSSBf/QCyign+BherzezdZ5NBdfzbmWxIMP5iFJ\"\r\n }\r\n ]\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/certPool?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL2NlcnRQb29sP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", + "RequestUri": "/pools/certPool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL2NlcnRQb29sP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", "RequestMethod": "DELETE", "RequestHeaders": { "client-request-id": [ - "d9346efe-611a-4389-8984-3e1d295f0fff" + "2f9dfa14-f5be-4c5e-aca5-9559db2a76ee" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:22:48 GMT" + "Fri, 22 Mar 2024 19:22:16 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Length": [ @@ -1581,7 +905,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "1f13e2c6-18e5-43d9-a336-8043f0a8dda6" + "dfdf0927-f04b-42b0-8d29-e9ff4f4637a0" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1593,7 +917,7 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:22:49 GMT" + "Fri, 22 Mar 2024 19:22:16 GMT" ] }, "ResponseBody": "", @@ -1602,9 +926,9 @@ ], "Names": {}, "Variables": { - "SubscriptionId": "21abd678-18c5-4660-9fdd-8c5ba6b6fe1f", - "AZURE_BATCH_ACCOUNT": "hoppeeastasia2", - "AZURE_BATCH_ENDPOINT": "https://hoppeeastasia2.eastasia.batch.azure.com", - "AZURE_BATCH_RESOURCE_GROUP": "123" + "SubscriptionId": "6602ac9a-5dad-41bd-a792-592c704b6a31", + "AZURE_BATCH_ACCOUNT": "billstestba24326", + "AZURE_BATCH_ENDPOINT": "https://billstestba24326.uksouth.batch.azure.com", + "AZURE_BATCH_RESOURCE_GROUP": "automation" } } \ No newline at end of file diff --git a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.CertificateTests/TestCertificateCrudOperations.json b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.CertificateTests/TestCertificateCrudOperations.json index 245a76e8fada..66e31d20be78 100644 --- a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.CertificateTests/TestCertificateCrudOperations.json +++ b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.CertificateTests/TestCertificateCrudOperations.json @@ -1,27 +1,27 @@ { "Entries": [ { - "RequestUri": "/certificates?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2NlcnRpZmljYXRlcz9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjA=", + "RequestUri": "/certificates?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2NlcnRpZmljYXRlcz9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "deaa0083-97e8-4150-ae77-2fdbdbb44af4" + "cf7dfbc0-4062-436e-92cb-1997d499a485" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:20:32 GMT" + "Thu, 21 Mar 2024 23:18:58 GMT" ], "x-ms-client-request-id": [ - "c534ed02-05c2-4eee-afec-f43c5b04a42c" + "cefe6a2f-c3ea-4590-aebf-e5b5d84e5cf6" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Type": [ @@ -37,13 +37,13 @@ "chunked" ], "Location": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/certificates(ThumbprintAlgorithm=sha1,Thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)" + "https://billstestba24326.uksouth.batch.azure.com/certificates(ThumbprintAlgorithm=sha1,Thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "1d052299-eee4-455f-93f4-124ddd46f738" + "c92d3535-9812-469b-b779-13db5d59cfc7" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -55,37 +55,37 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/certificates(ThumbprintAlgorithm=sha1,Thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)" + "https://billstestba24326.uksouth.batch.azure.com/certificates(ThumbprintAlgorithm=sha1,Thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)" ], "Date": [ - "Fri, 16 Jun 2023 07:20:32 GMT" + "Thu, 21 Mar 2024 23:18:59 GMT" ] }, "ResponseBody": "", "StatusCode": 201 }, { - "RequestUri": "/certificates(thumbprintAlgorithm=sha1,thumbprint=C1E494A415149C5F211C4778B52F2E834A07247C)?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2NlcnRpZmljYXRlcyh0aHVtYnByaW50QWxnb3JpdGhtPXNoYTEsdGh1bWJwcmludD1DMUU0OTRBNDE1MTQ5QzVGMjExQzQ3NzhCNTJGMkU4MzRBMDcyNDdDKT9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjA=", + "RequestUri": "/certificates(thumbprintAlgorithm=sha1,thumbprint=C1E494A415149C5F211C4778B52F2E834A07247C)?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2NlcnRpZmljYXRlcyh0aHVtYnByaW50QWxnb3JpdGhtPXNoYTEsdGh1bWJwcmludD1DMUU0OTRBNDE1MTQ5QzVGMjExQzQ3NzhCNTJGMkU4MzRBMDcyNDdDKT9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "63e1f224-ad27-43a0-8401-8b9a966da4ec" + "d9ceca0f-e045-4037-b087-5979b3ba5a51" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:20:32 GMT" + "Thu, 21 Mar 2024 23:18:59 GMT" ], "x-ms-client-request-id": [ - "ff35a5d0-d8e2-41f3-9515-dd77198d625f" + "cde8e0f3-9ca6-4400-bf10-45b5b4748b92" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -98,7 +98,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "596bd178-a42e-405e-997f-06a3f9f45cf4" + "741dd55f-ee52-4253-9718-45c80f1c3faf" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -110,37 +110,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:20:32 GMT" + "Thu, 21 Mar 2024 23:18:59 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#certificates/@Element\",\r\n \"thumbprint\": \"c1e494a415149c5f211c4778b52f2e834a07247c\",\r\n \"thumbprintAlgorithm\": \"sha1\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/certificates(thumbprintAlgorithm=sha1,thumbprint=C1E494A415149C5F211C4778B52F2E834A07247C)\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:20:33.6488865Z\",\r\n \"publicData\": \"MIIB9DCCAWGgAwIBAgIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC0JhdGNoVGVzdDAxMB4XDTE1MTAwMjE2MjkwNVoXDTM5MTIzMTIzNTk1OVowFjEUMBIGA1UEAxMLQmF0Y2hUZXN0MDEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAM06unpRipn3BmHBM75d0s8w/Wwifci16PoJo4c2V68GwsCCFsNOn5ypo7BBXo1fpBjrnso5w+koaE5LjxkBSVm+TkogwbKlW6WURTM0O5viRVbPnEEU/Y01Pj5cJElFuLEk9Uoe/r/lP8b5A607t1cPjSXkwhEZEYc3LkHDSo0ZAgMBAAGjSzBJMEcGA1UdAQRAMD6AEFRsTAsrvF+FmPuICooZXaKhGDAWMRQwEgYDVQQDEwtCYXRjaFRlc3QwMYIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAA4GBALt0F8Ep+8XVE/M2aNtxzlku72gxiOiAo1HmpUaixXx3gl8kdP3xgoKMaq4JskqdLmbJJUnCQ3wmzsdPwjswsW2ycT12zuBddaiS+id98k8U/KYc6FxMgS+H70FYOxARLn7P4FSSBf/QCyign+BherzezdZ5NBdfzbmWxIMP5iFJ\"\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#certificates/@Element\",\r\n \"thumbprint\": \"c1e494a415149c5f211c4778b52f2e834a07247c\",\r\n \"thumbprintAlgorithm\": \"sha1\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/certificates(thumbprintAlgorithm=sha1,thumbprint=C1E494A415149C5F211C4778B52F2E834A07247C)\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-21T23:18:59.7669115Z\",\r\n \"publicData\": \"MIIB9DCCAWGgAwIBAgIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC0JhdGNoVGVzdDAxMB4XDTE1MTAwMjE2MjkwNVoXDTM5MTIzMTIzNTk1OVowFjEUMBIGA1UEAxMLQmF0Y2hUZXN0MDEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAM06unpRipn3BmHBM75d0s8w/Wwifci16PoJo4c2V68GwsCCFsNOn5ypo7BBXo1fpBjrnso5w+koaE5LjxkBSVm+TkogwbKlW6WURTM0O5viRVbPnEEU/Y01Pj5cJElFuLEk9Uoe/r/lP8b5A607t1cPjSXkwhEZEYc3LkHDSo0ZAgMBAAGjSzBJMEcGA1UdAQRAMD6AEFRsTAsrvF+FmPuICooZXaKhGDAWMRQwEgYDVQQDEwtCYXRjaFRlc3QwMYIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAA4GBALt0F8Ep+8XVE/M2aNtxzlku72gxiOiAo1HmpUaixXx3gl8kdP3xgoKMaq4JskqdLmbJJUnCQ3wmzsdPwjswsW2ycT12zuBddaiS+id98k8U/KYc6FxMgS+H70FYOxARLn7P4FSSBf/QCyign+BherzezdZ5NBdfzbmWxIMP5iFJ\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2NlcnRpZmljYXRlcyh0aHVtYnByaW50QWxnb3JpdGhtPXNoYTEsdGh1bWJwcmludD1jMWU0OTRhNDE1MTQ5YzVmMjExYzQ3NzhiNTJmMmU4MzRhMDcyNDdjKT9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjA=", + "RequestUri": "/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2NlcnRpZmljYXRlcyh0aHVtYnByaW50QWxnb3JpdGhtPXNoYTEsdGh1bWJwcmludD1jMWU0OTRhNDE1MTQ5YzVmMjExYzQ3NzhiNTJmMmU4MzRhMDcyNDdjKT9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", "RequestMethod": "DELETE", "RequestHeaders": { "client-request-id": [ - "c3177046-bf2e-48a0-961d-ea8d034016ca" + "2b9cf911-462f-4ffe-a118-309ccec26bff" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:20:32 GMT" + "Thu, 21 Mar 2024 23:18:59 GMT" ], "x-ms-client-request-id": [ - "4659c400-1850-4474-aa4e-adc7731768d9" + "bf6e87ae-e138-4133-af81-64d9088dce28" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Length": [ @@ -156,7 +156,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "1f44e8b9-e953-47d1-b43e-449667f224b3" + "ff69bc79-9ee9-4661-96ce-5614166c859b" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -168,34 +168,34 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:20:33 GMT" + "Thu, 21 Mar 2024 23:19:00 GMT" ] }, "ResponseBody": "", "StatusCode": 202 }, { - "RequestUri": "/certificates?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2NlcnRpZmljYXRlcz9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjA=", + "RequestUri": "/certificates?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2NlcnRpZmljYXRlcz9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "7f8728ef-85d3-460a-8852-719da74cb0a3" + "e8aac567-a851-446a-9626-8de41b20489b" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:20:32 GMT" + "Thu, 21 Mar 2024 23:19:00 GMT" ], "x-ms-client-request-id": [ - "43158b0c-3ebc-4961-8f8a-69bb5f0239ed" + "ca9c98b5-9b91-4742-8ffd-cf8c6df68641" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -208,7 +208,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "e9c387fe-420a-46d9-980c-cda52c715842" + "054d0c18-cc0e-43e1-92ab-494f43938f63" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -220,21 +220,21 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:20:33 GMT" + "Thu, 21 Mar 2024 23:19:00 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#certificates\",\r\n \"value\": [\r\n {\r\n \"thumbprint\": \"c1e494a415149c5f211c4778b52f2e834a07247c\",\r\n \"thumbprintAlgorithm\": \"sha1\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)\",\r\n \"state\": \"deleting\",\r\n \"stateTransitionTime\": \"2023-06-16T07:20:33.9628238Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2023-06-16T07:20:33.6488865Z\",\r\n \"publicData\": \"MIIB9DCCAWGgAwIBAgIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC0JhdGNoVGVzdDAxMB4XDTE1MTAwMjE2MjkwNVoXDTM5MTIzMTIzNTk1OVowFjEUMBIGA1UEAxMLQmF0Y2hUZXN0MDEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAM06unpRipn3BmHBM75d0s8w/Wwifci16PoJo4c2V68GwsCCFsNOn5ypo7BBXo1fpBjrnso5w+koaE5LjxkBSVm+TkogwbKlW6WURTM0O5viRVbPnEEU/Y01Pj5cJElFuLEk9Uoe/r/lP8b5A607t1cPjSXkwhEZEYc3LkHDSo0ZAgMBAAGjSzBJMEcGA1UdAQRAMD6AEFRsTAsrvF+FmPuICooZXaKhGDAWMRQwEgYDVQQDEwtCYXRjaFRlc3QwMYIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAA4GBALt0F8Ep+8XVE/M2aNtxzlku72gxiOiAo1HmpUaixXx3gl8kdP3xgoKMaq4JskqdLmbJJUnCQ3wmzsdPwjswsW2ycT12zuBddaiS+id98k8U/KYc6FxMgS+H70FYOxARLn7P4FSSBf/QCyign+BherzezdZ5NBdfzbmWxIMP5iFJ\"\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#certificates\",\r\n \"value\": [\r\n {\r\n \"thumbprint\": \"c1e494a415149c5f211c4778b52f2e834a07247c\",\r\n \"thumbprintAlgorithm\": \"sha1\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c4778b52f2e834a07247c)\",\r\n \"state\": \"deleting\",\r\n \"stateTransitionTime\": \"2024-03-21T23:19:00.3599184Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2024-03-21T23:18:59.7669115Z\",\r\n \"publicData\": \"MIIB9DCCAWGgAwIBAgIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC0JhdGNoVGVzdDAxMB4XDTE1MTAwMjE2MjkwNVoXDTM5MTIzMTIzNTk1OVowFjEUMBIGA1UEAxMLQmF0Y2hUZXN0MDEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAM06unpRipn3BmHBM75d0s8w/Wwifci16PoJo4c2V68GwsCCFsNOn5ypo7BBXo1fpBjrnso5w+koaE5LjxkBSVm+TkogwbKlW6WURTM0O5viRVbPnEEU/Y01Pj5cJElFuLEk9Uoe/r/lP8b5A607t1cPjSXkwhEZEYc3LkHDSo0ZAgMBAAGjSzBJMEcGA1UdAQRAMD6AEFRsTAsrvF+FmPuICooZXaKhGDAWMRQwEgYDVQQDEwtCYXRjaFRlc3QwMYIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAA4GBALt0F8Ep+8XVE/M2aNtxzlku72gxiOiAo1HmpUaixXx3gl8kdP3xgoKMaq4JskqdLmbJJUnCQ3wmzsdPwjswsW2ycT12zuBddaiS+id98k8U/KYc6FxMgS+H70FYOxARLn7P4FSSBf/QCyign+BherzezdZ5NBdfzbmWxIMP5iFJ\"\r\n }\r\n ]\r\n}", "StatusCode": 200 } ], "Names": {}, "Variables": { - "SubscriptionId": "21abd678-18c5-4660-9fdd-8c5ba6b6fe1f", - "AZURE_BATCH_ACCOUNT": "hoppeeastasia2", - "AZURE_BATCH_ENDPOINT": "https://hoppeeastasia2.eastasia.batch.azure.com", - "AZURE_BATCH_RESOURCE_GROUP": "123" + "SubscriptionId": "6602ac9a-5dad-41bd-a792-592c704b6a31", + "AZURE_BATCH_ACCOUNT": "billstestba24326", + "AZURE_BATCH_ENDPOINT": "https://billstestba24326.uksouth.batch.azure.com", + "AZURE_BATCH_RESOURCE_GROUP": "automation" } } \ No newline at end of file diff --git a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ComputeNodeTests/TestDisableAndEnableComputeNodeScheduling.json b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ComputeNodeTests/TestDisableAndEnableComputeNodeScheduling.json index 3f74e289db7c..0ecb4ddf7b4e 100644 --- a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ComputeNodeTests/TestDisableAndEnableComputeNodeScheduling.json +++ b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ComputeNodeTests/TestDisableAndEnableComputeNodeScheduling.json @@ -1,150 +1,49 @@ { "Entries": [ { - "RequestUri": "/pools/testPool/nodes?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", - "RequestMethod": "GET", + "RequestUri": "/pools?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", + "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "8e1b1be3-aa83-48c8-8d9b-f5febb226cfe" + "02832ede-1474-4fff-8b7d-cb687900403d" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:23:22 GMT" - ], - "x-ms-client-request-id": [ - "effa4345-f149-42e1-99f4-fb00e03f4a79" + "Fri, 22 Mar 2024 18:55:00 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Transfer-Encoding": [ - "chunked" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "request-id": [ - "e0df29b4-dd22-4c0a-a34b-480349cce3e9" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "DataServiceVersion": [ - "3.0" - ], - "Date": [ - "Fri, 16 Jun 2023 07:23:23 GMT" ], "Content-Type": [ - "application/json; odata=minimalmetadata" - ] - }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes\",\r\n \"value\": [\r\n {\r\n \"id\": \"tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"state\": \"rebooting\",\r\n \"schedulingState\": \"enabled\",\r\n \"stateTransitionTime\": \"2023-06-16T07:23:21.3771523Z\",\r\n \"lastBootTime\": \"2023-06-16T06:54:12.462819Z\",\r\n \"allocationTime\": \"2023-06-13T07:46:20.7222354Z\",\r\n \"ipAddress\": \"10.218.0.6\",\r\n \"affinityId\": \"TVM:tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"totalTasksRun\": 9,\r\n \"totalTasksSucceeded\": 6,\r\n \"runningTasksCount\": 0,\r\n \"runningTaskSlotsCount\": 0,\r\n \"recentTasks\": [],\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"pool\",\r\n \"elevationLevel\": \"nonadmin\"\r\n }\r\n },\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": true\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2023-06-16T06:54:12.651819Z\",\r\n \"endTime\": \"2023-06-16T06:54:12.729951Z\",\r\n \"exitCode\": 0,\r\n \"result\": \"success\",\r\n \"retryCount\": 0\r\n },\r\n \"certificateReferences\": [],\r\n \"isDedicated\": true,\r\n \"endpointConfiguration\": {\r\n \"inboundEndpoints\": [\r\n {\r\n \"name\": \"Microsoft.WindowsAzure.Plugins.RemoteForwarder.RdpInput\",\r\n \"protocol\": \"tcp\",\r\n \"frontendPort\": 3389,\r\n \"backendPort\": 20000\r\n }\r\n ]\r\n },\r\n \"nodeAgentInfo\": {\r\n \"lastUpdateTime\": \"2023-06-13T07:53:19.121974Z\",\r\n \"version\": \"1.10.0\"\r\n },\r\n \"virtualMachineInfo\": {}\r\n },\r\n {\r\n \"id\": \"tvmps_c3cdeb8c344b8b5cca4c1052f8fd5c239f09cffd64837afc6cbb2e073e15dab3_d\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/testPool/nodes/tvmps_c3cdeb8c344b8b5cca4c1052f8fd5c239f09cffd64837afc6cbb2e073e15dab3_d\",\r\n \"state\": \"reimaging\",\r\n \"schedulingState\": \"enabled\",\r\n \"stateTransitionTime\": \"2023-06-16T07:23:21.7378967Z\",\r\n \"lastBootTime\": \"2023-06-16T06:55:27.593709Z\",\r\n \"allocationTime\": \"2023-06-13T07:46:20.7222354Z\",\r\n \"ipAddress\": \"10.218.0.5\",\r\n \"affinityId\": \"TVM:tvmps_c3cdeb8c344b8b5cca4c1052f8fd5c239f09cffd64837afc6cbb2e073e15dab3_d\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"totalTasksRun\": 7,\r\n \"totalTasksSucceeded\": 3,\r\n \"runningTasksCount\": 0,\r\n \"runningTaskSlotsCount\": 0,\r\n \"recentTasks\": [\r\n {\r\n \"taskUrl\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobs/testTerminateTaskJob/tasks/testTask2\",\r\n \"jobId\": \"testTerminateTaskJob\",\r\n \"taskId\": \"testTask2\",\r\n \"taskState\": \"completed\",\r\n \"executionInfo\": {\r\n \"startTime\": \"2023-06-16T07:06:23.080101Z\",\r\n \"endTime\": \"2023-06-16T07:06:23.572482Z\",\r\n \"exitCode\": -1073741510,\r\n \"failureInfo\": {\r\n \"category\": \"UserError\",\r\n \"code\": \"TaskEnded\",\r\n \"message\": \"Task Was Ended by User Request\",\r\n \"details\": [\r\n {\r\n \"name\": \"AdditionalErrorCode\",\r\n \"value\": \"FailureExitCode\"\r\n }\r\n ]\r\n },\r\n \"result\": \"failure\",\r\n \"retryCount\": 0,\r\n \"requeueCount\": 0\r\n }\r\n }\r\n ],\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"pool\",\r\n \"elevationLevel\": \"nonadmin\"\r\n }\r\n },\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": true\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2023-06-16T06:55:28.965368Z\",\r\n \"endTime\": \"2023-06-16T06:55:29.07475Z\",\r\n \"exitCode\": 0,\r\n \"result\": \"success\",\r\n \"retryCount\": 0\r\n },\r\n \"certificateReferences\": [],\r\n \"isDedicated\": true,\r\n \"endpointConfiguration\": {\r\n \"inboundEndpoints\": [\r\n {\r\n \"name\": \"Microsoft.WindowsAzure.Plugins.RemoteForwarder.RdpInput\",\r\n \"protocol\": \"tcp\",\r\n \"frontendPort\": 3389,\r\n \"backendPort\": 20000\r\n }\r\n ]\r\n },\r\n \"nodeAgentInfo\": {\r\n \"lastUpdateTime\": \"2023-06-13T07:48:55.051071Z\",\r\n \"version\": \"1.10.0\"\r\n },\r\n \"virtualMachineInfo\": {}\r\n },\r\n {\r\n \"id\": \"tvmps_cf431502d0b7a008b6d2fc36bf12888efcbda4c9272347c458f1792e50276106_d\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/testPool/nodes/tvmps_cf431502d0b7a008b6d2fc36bf12888efcbda4c9272347c458f1792e50276106_d\",\r\n \"state\": \"idle\",\r\n \"schedulingState\": \"enabled\",\r\n \"stateTransitionTime\": \"2023-06-16T07:19:26.25374Z\",\r\n \"lastBootTime\": \"2023-06-13T07:52:52.129232Z\",\r\n \"allocationTime\": \"2023-06-13T07:46:20.7222354Z\",\r\n \"ipAddress\": \"10.218.0.4\",\r\n \"affinityId\": \"TVM:tvmps_cf431502d0b7a008b6d2fc36bf12888efcbda4c9272347c458f1792e50276106_d\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"totalTasksRun\": 8,\r\n \"totalTasksSucceeded\": 2,\r\n \"runningTasksCount\": 0,\r\n \"runningTaskSlotsCount\": 0,\r\n \"recentTasks\": [\r\n {\r\n \"taskUrl\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobs/testJobCompletesWhenTaskFails/tasks/taskId-1\",\r\n \"jobId\": \"testJobCompletesWhenTaskFails\",\r\n \"taskId\": \"taskId-1\",\r\n \"taskState\": \"completed\",\r\n \"executionInfo\": {\r\n \"startTime\": \"2023-06-16T07:19:26.144372Z\",\r\n \"endTime\": \"2023-06-16T07:19:26.222489Z\",\r\n \"exitCode\": 3,\r\n \"failureInfo\": {\r\n \"category\": \"UserError\",\r\n \"code\": \"FailureExitCode\",\r\n \"message\": \"The task exited with an exit code representing a failure\",\r\n \"details\": [\r\n {\r\n \"name\": \"Message\",\r\n \"value\": \"The task process exited with an unexpected exit code\"\r\n },\r\n {\r\n \"name\": \"AdditionalErrorCode\",\r\n \"value\": \"FailureExitCode\"\r\n }\r\n ]\r\n },\r\n \"result\": \"failure\",\r\n \"retryCount\": 0,\r\n \"requeueCount\": 0\r\n }\r\n }\r\n ],\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"pool\",\r\n \"elevationLevel\": \"nonadmin\"\r\n }\r\n },\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": true\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2023-06-13T07:52:53.742761Z\",\r\n \"endTime\": \"2023-06-13T07:52:53.805263Z\",\r\n \"exitCode\": 0,\r\n \"result\": \"success\",\r\n \"retryCount\": 0\r\n },\r\n \"certificateReferences\": [],\r\n \"isDedicated\": true,\r\n \"endpointConfiguration\": {\r\n \"inboundEndpoints\": [\r\n {\r\n \"name\": \"Microsoft.WindowsAzure.Plugins.RemoteForwarder.RdpInput\",\r\n \"protocol\": \"tcp\",\r\n \"frontendPort\": 3389,\r\n \"backendPort\": 20000\r\n }\r\n ]\r\n },\r\n \"nodeAgentInfo\": {\r\n \"lastUpdateTime\": \"2023-06-13T07:52:52.129232Z\",\r\n \"version\": \"1.10.0\"\r\n },\r\n \"virtualMachineInfo\": {}\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d?api-version=2023-05-01.17.0&$select=id%2Cstate", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bXBzXzY3NTkwZjZmZmRjMzc4OTFhYTA5ZGUwN2E0ZDE0ZTUxM2NlNzVmMmU5M2M3M2Y3ZjU1NmNkZjAwNzEwZDdiMmRfZD9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjAmJHNlbGVjdD1pZCUyQ3N0YXRl", - "RequestMethod": "GET", - "RequestHeaders": { - "client-request-id": [ - "6f3fa613-09c6-4312-9c6b-421782876521" - ], - "Accept-Language": [ - "en-US" - ], - "ocp-date": [ - "Fri, 16 Jun 2023 07:23:22 GMT" - ], - "x-ms-client-request-id": [ - "15eea783-71ae-499b-bcbd-e71940bb7632" + "application/json; odata=minimalmetadata; charset=utf-8" ], - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", - "AzurePowershell/Az1.0.0" + "Content-Length": [ + "522" ] }, - "RequestBody": "", + "RequestBody": "{\r\n \"id\": \"disableandenablenodepool\",\r\n \"vmSize\": \"STANDARD_D2S_V3\",\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"zonal\"\r\n }\r\n },\r\n \"targetDedicatedNodes\": 2,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableInterNodeCommunication\": false,\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", "ResponseHeaders": { "Transfer-Encoding": [ "chunked" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "request-id": [ - "aede961c-b900-4fc7-886f-fdf3fc17125f" + "ETag": [ + "0x8DC4AA193CA52F9" ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "DataServiceVersion": [ - "3.0" - ], - "Date": [ - "Fri, 16 Jun 2023 07:23:23 GMT" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata" - ] - }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"state\": \"rebooting\",\r\n \"virtualMachineInfo\": {}\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d?api-version=2023-05-01.17.0&$select=id%2Cstate", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bXBzXzY3NTkwZjZmZmRjMzc4OTFhYTA5ZGUwN2E0ZDE0ZTUxM2NlNzVmMmU5M2M3M2Y3ZjU1NmNkZjAwNzEwZDdiMmRfZD9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjAmJHNlbGVjdD1pZCUyQ3N0YXRl", - "RequestMethod": "GET", - "RequestHeaders": { - "client-request-id": [ - "26797784-0390-42fc-8fdc-618af05f7ad1" - ], - "Accept-Language": [ - "en-US" - ], - "ocp-date": [ - "Fri, 16 Jun 2023 07:23:28 GMT" - ], - "x-ms-client-request-id": [ - "1a8c5919-b321-4a2c-958f-c10d1b77ad80" - ], - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", - "AzurePowershell/Az1.0.0" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Transfer-Encoding": [ - "chunked" + "Location": [ + "https://billstestba24326.uksouth.batch.azure.com/pools/disableandenablenodepool" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "0d25138b-6047-4017-9ccd-38f530c99df8" + "9c412be3-518f-4f38-af77-47588d02d470" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -155,93 +54,38 @@ "DataServiceVersion": [ "3.0" ], - "Date": [ - "Fri, 16 Jun 2023 07:23:29 GMT" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata" - ] - }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"state\": \"rebooting\",\r\n \"virtualMachineInfo\": {}\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d?api-version=2023-05-01.17.0&$select=id%2Cstate", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bXBzXzY3NTkwZjZmZmRjMzc4OTFhYTA5ZGUwN2E0ZDE0ZTUxM2NlNzVmMmU5M2M3M2Y3ZjU1NmNkZjAwNzEwZDdiMmRfZD9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjAmJHNlbGVjdD1pZCUyQ3N0YXRl", - "RequestMethod": "GET", - "RequestHeaders": { - "client-request-id": [ - "b1b900cb-10b0-49ab-baa0-e95b71f50568" - ], - "Accept-Language": [ - "en-US" - ], - "ocp-date": [ - "Fri, 16 Jun 2023 07:23:33 GMT" - ], - "x-ms-client-request-id": [ - "951bab78-c160-4f42-8b81-faea9cc02335" - ], - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", - "AzurePowershell/Az1.0.0" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Transfer-Encoding": [ - "chunked" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "request-id": [ - "6df0f3ec-f997-452d-9b9a-322ca6d4fa4d" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "DataServiceVersion": [ - "3.0" + "DataServiceId": [ + "https://billstestba24326.uksouth.batch.azure.com/pools/disableandenablenodepool" ], "Date": [ - "Fri, 16 Jun 2023 07:23:33 GMT" + "Fri, 22 Mar 2024 18:55:00 GMT" ], - "Content-Type": [ - "application/json; odata=minimalmetadata" + "Last-Modified": [ + "Fri, 22 Mar 2024 18:55:00 GMT" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"state\": \"rebooting\",\r\n \"virtualMachineInfo\": {}\r\n}", - "StatusCode": 200 + "ResponseBody": "", + "StatusCode": 201 }, { - "RequestUri": "/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d?api-version=2023-05-01.17.0&$select=id%2Cstate", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bXBzXzY3NTkwZjZmZmRjMzc4OTFhYTA5ZGUwN2E0ZDE0ZTUxM2NlNzVmMmU5M2M3M2Y3ZjU1NmNkZjAwNzEwZDdiMmRfZD9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjAmJHNlbGVjdD1pZCUyQ3N0YXRl", + "RequestUri": "/pools/disableandenablenodepool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL2Rpc2FibGVhbmRlbmFibGVub2RlcG9vbD9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "b594304d-16dc-4d44-bbb2-17f81955de55" + "6e29b5ce-da13-43db-bd81-81a1274824d7" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:23:38 GMT" - ], - "x-ms-client-request-id": [ - "23cb9874-5ce8-4b3d-b6f1-184c6782ce06" + "Fri, 22 Mar 2024 18:55:00 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -250,66 +94,14 @@ "Transfer-Encoding": [ "chunked" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "request-id": [ - "350e315d-3806-4177-9d09-b25eced4300d" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "DataServiceVersion": [ - "3.0" - ], - "Date": [ - "Fri, 16 Jun 2023 07:23:39 GMT" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata" - ] - }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"state\": \"rebooting\",\r\n \"virtualMachineInfo\": {}\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d?api-version=2023-05-01.17.0&$select=id%2Cstate", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bXBzXzY3NTkwZjZmZmRjMzc4OTFhYTA5ZGUwN2E0ZDE0ZTUxM2NlNzVmMmU5M2M3M2Y3ZjU1NmNkZjAwNzEwZDdiMmRfZD9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjAmJHNlbGVjdD1pZCUyQ3N0YXRl", - "RequestMethod": "GET", - "RequestHeaders": { - "client-request-id": [ - "a9d44edc-a66b-4823-9a68-bfce9ab96963" - ], - "Accept-Language": [ - "en-US" - ], - "ocp-date": [ - "Fri, 16 Jun 2023 07:23:43 GMT" - ], - "x-ms-client-request-id": [ - "3ddc2628-2fad-4a96-95a7-3a8a3526f680" - ], - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", - "AzurePowershell/Az1.0.0" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Transfer-Encoding": [ - "chunked" + "ETag": [ + "0x8DC4AA193CA52F9" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "e5b0a5dd-26fe-4f89-bc8f-d932f7cbab80" + "c8eda1ad-26fd-4f7b-abf6-17317382f5ac" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -321,92 +113,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:23:44 GMT" + "Fri, 22 Mar 2024 18:55:00 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" - ] - }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"state\": \"rebooting\",\r\n \"virtualMachineInfo\": {}\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d?api-version=2023-05-01.17.0&$select=id%2Cstate", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bXBzXzY3NTkwZjZmZmRjMzc4OTFhYTA5ZGUwN2E0ZDE0ZTUxM2NlNzVmMmU5M2M3M2Y3ZjU1NmNkZjAwNzEwZDdiMmRfZD9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjAmJHNlbGVjdD1pZCUyQ3N0YXRl", - "RequestMethod": "GET", - "RequestHeaders": { - "client-request-id": [ - "8e6d4c8b-eb91-4544-90cd-505849c7eb1d" - ], - "Accept-Language": [ - "en-US" - ], - "ocp-date": [ - "Fri, 16 Jun 2023 07:23:48 GMT" - ], - "x-ms-client-request-id": [ - "40974df9-b810-4ff7-9189-881caae6ec2e" ], - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", - "AzurePowershell/Az1.0.0" + "Last-Modified": [ + "Fri, 22 Mar 2024 18:55:00 GMT" ] }, - "RequestBody": "", - "ResponseHeaders": { - "Transfer-Encoding": [ - "chunked" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "request-id": [ - "cc5cd6e0-6573-41b8-a2bb-44f57c5e60d3" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "DataServiceVersion": [ - "3.0" - ], - "Date": [ - "Fri, 16 Jun 2023 07:23:49 GMT" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata" - ] - }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"state\": \"rebooting\",\r\n \"virtualMachineInfo\": {}\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"disableandenablenodepool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/disableandenablenodepool\",\r\n \"eTag\": \"0x8DC4AA193CA52F9\",\r\n \"lastModified\": \"2024-03-22T18:55:00.9468153Z\",\r\n \"creationTime\": \"2024-03-22T18:55:00.9468142Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T18:55:00.9468142Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T18:55:00.9468153Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d?api-version=2023-05-01.17.0&$select=id%2Cstate", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bXBzXzY3NTkwZjZmZmRjMzc4OTFhYTA5ZGUwN2E0ZDE0ZTUxM2NlNzVmMmU5M2M3M2Y3ZjU1NmNkZjAwNzEwZDdiMmRfZD9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjAmJHNlbGVjdD1pZCUyQ3N0YXRl", + "RequestUri": "/pools/disableandenablenodepool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL2Rpc2FibGVhbmRlbmFibGVub2RlcG9vbD9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "f12d13d4-978f-4a7f-996a-5ae6844e3851" + "d15b40ea-a02c-43d0-8ff8-9795472bc96b" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:23:53 GMT" - ], - "x-ms-client-request-id": [ - "d6b92d91-ab74-4fb4-9c9e-e794d0b0d621" + "Fri, 22 Mar 2024 18:55:06 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -415,66 +152,14 @@ "Transfer-Encoding": [ "chunked" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "request-id": [ - "8c2789cc-e82d-4983-86fd-ae1069c2a602" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "DataServiceVersion": [ - "3.0" - ], - "Date": [ - "Fri, 16 Jun 2023 07:23:54 GMT" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata" - ] - }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"state\": \"rebooting\",\r\n \"virtualMachineInfo\": {}\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d?api-version=2023-05-01.17.0&$select=id%2Cstate", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bXBzXzY3NTkwZjZmZmRjMzc4OTFhYTA5ZGUwN2E0ZDE0ZTUxM2NlNzVmMmU5M2M3M2Y3ZjU1NmNkZjAwNzEwZDdiMmRfZD9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjAmJHNlbGVjdD1pZCUyQ3N0YXRl", - "RequestMethod": "GET", - "RequestHeaders": { - "client-request-id": [ - "698800a3-46e6-47c7-b9de-4d6809c1af61" - ], - "Accept-Language": [ - "en-US" - ], - "ocp-date": [ - "Fri, 16 Jun 2023 07:23:58 GMT" - ], - "x-ms-client-request-id": [ - "3f2a43c4-f299-4b54-9812-12040e1a6d3e" - ], - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", - "AzurePowershell/Az1.0.0" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Transfer-Encoding": [ - "chunked" + "ETag": [ + "0x8DC4AA193CA52F9" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "a82cb02f-f1d3-49b4-ace3-dbbcd8703efb" + "c223545f-df6e-44f1-95b7-2b7df956b4e4" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -486,92 +171,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:23:59 GMT" + "Fri, 22 Mar 2024 18:55:06 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" - ] - }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"state\": \"rebooting\",\r\n \"virtualMachineInfo\": {}\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d?api-version=2023-05-01.17.0&$select=id%2Cstate", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bXBzXzY3NTkwZjZmZmRjMzc4OTFhYTA5ZGUwN2E0ZDE0ZTUxM2NlNzVmMmU5M2M3M2Y3ZjU1NmNkZjAwNzEwZDdiMmRfZD9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjAmJHNlbGVjdD1pZCUyQ3N0YXRl", - "RequestMethod": "GET", - "RequestHeaders": { - "client-request-id": [ - "0c9a5660-cb8b-42fb-8697-8d7fa83d3955" - ], - "Accept-Language": [ - "en-US" - ], - "ocp-date": [ - "Fri, 16 Jun 2023 07:24:04 GMT" ], - "x-ms-client-request-id": [ - "ec226f5e-f8b2-4aea-aa1c-9332a0f1a02c" - ], - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", - "AzurePowershell/Az1.0.0" + "Last-Modified": [ + "Fri, 22 Mar 2024 18:55:00 GMT" ] }, - "RequestBody": "", - "ResponseHeaders": { - "Transfer-Encoding": [ - "chunked" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "request-id": [ - "ec45330f-796a-4d88-857c-46faeedf2a1f" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "DataServiceVersion": [ - "3.0" - ], - "Date": [ - "Fri, 16 Jun 2023 07:24:05 GMT" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata" - ] - }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"state\": \"rebooting\",\r\n \"virtualMachineInfo\": {}\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"disableandenablenodepool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/disableandenablenodepool\",\r\n \"eTag\": \"0x8DC4AA193CA52F9\",\r\n \"lastModified\": \"2024-03-22T18:55:00.9468153Z\",\r\n \"creationTime\": \"2024-03-22T18:55:00.9468142Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T18:55:00.9468142Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T18:55:00.9468153Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d?api-version=2023-05-01.17.0&$select=id%2Cstate", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bXBzXzY3NTkwZjZmZmRjMzc4OTFhYTA5ZGUwN2E0ZDE0ZTUxM2NlNzVmMmU5M2M3M2Y3ZjU1NmNkZjAwNzEwZDdiMmRfZD9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjAmJHNlbGVjdD1pZCUyQ3N0YXRl", + "RequestUri": "/pools/disableandenablenodepool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL2Rpc2FibGVhbmRlbmFibGVub2RlcG9vbD9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "63446f58-86b5-4d5c-833e-67cc52cdf69d" + "6e10d271-d8ad-4098-a7d8-2020479b1954" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:24:09 GMT" - ], - "x-ms-client-request-id": [ - "f3a55501-ee35-4e35-b21d-b40c2e91b098" + "Fri, 22 Mar 2024 18:55:11 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -580,66 +210,14 @@ "Transfer-Encoding": [ "chunked" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "request-id": [ - "acc9c774-b192-4adc-a0e5-88757e2ee7f7" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "DataServiceVersion": [ - "3.0" - ], - "Date": [ - "Fri, 16 Jun 2023 07:24:10 GMT" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata" - ] - }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"state\": \"rebooting\",\r\n \"virtualMachineInfo\": {}\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d?api-version=2023-05-01.17.0&$select=id%2Cstate", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bXBzXzY3NTkwZjZmZmRjMzc4OTFhYTA5ZGUwN2E0ZDE0ZTUxM2NlNzVmMmU5M2M3M2Y3ZjU1NmNkZjAwNzEwZDdiMmRfZD9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjAmJHNlbGVjdD1pZCUyQ3N0YXRl", - "RequestMethod": "GET", - "RequestHeaders": { - "client-request-id": [ - "688f5889-15f0-40f5-8a03-a4c181f8e78b" - ], - "Accept-Language": [ - "en-US" - ], - "ocp-date": [ - "Fri, 16 Jun 2023 07:24:14 GMT" - ], - "x-ms-client-request-id": [ - "65baff11-5ee3-4530-aecb-7a76969740ec" - ], - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", - "AzurePowershell/Az1.0.0" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Transfer-Encoding": [ - "chunked" + "ETag": [ + "0x8DC4AA193CA52F9" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "0614e06b-274d-49bd-88f6-36cc9ff78747" + "8f773988-c0de-4291-b502-1ba20fc72adc" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -651,92 +229,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:24:15 GMT" + "Fri, 22 Mar 2024 18:55:11 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" - ] - }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"state\": \"rebooting\",\r\n \"virtualMachineInfo\": {}\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d?api-version=2023-05-01.17.0&$select=id%2Cstate", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bXBzXzY3NTkwZjZmZmRjMzc4OTFhYTA5ZGUwN2E0ZDE0ZTUxM2NlNzVmMmU5M2M3M2Y3ZjU1NmNkZjAwNzEwZDdiMmRfZD9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjAmJHNlbGVjdD1pZCUyQ3N0YXRl", - "RequestMethod": "GET", - "RequestHeaders": { - "client-request-id": [ - "b76c1511-11b5-4a9f-8edd-bc4abd85f4fd" - ], - "Accept-Language": [ - "en-US" - ], - "ocp-date": [ - "Fri, 16 Jun 2023 07:24:19 GMT" - ], - "x-ms-client-request-id": [ - "8f1afbee-6270-47bb-9399-6a11ab43daa1" ], - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", - "AzurePowershell/Az1.0.0" + "Last-Modified": [ + "Fri, 22 Mar 2024 18:55:00 GMT" ] }, - "RequestBody": "", - "ResponseHeaders": { - "Transfer-Encoding": [ - "chunked" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "request-id": [ - "69280f1b-6756-44d0-924a-57e6fe9a9d10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "DataServiceVersion": [ - "3.0" - ], - "Date": [ - "Fri, 16 Jun 2023 07:24:20 GMT" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata" - ] - }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"state\": \"rebooting\",\r\n \"virtualMachineInfo\": {}\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"disableandenablenodepool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/disableandenablenodepool\",\r\n \"eTag\": \"0x8DC4AA193CA52F9\",\r\n \"lastModified\": \"2024-03-22T18:55:00.9468153Z\",\r\n \"creationTime\": \"2024-03-22T18:55:00.9468142Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T18:55:00.9468142Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T18:55:00.9468153Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d?api-version=2023-05-01.17.0&$select=id%2Cstate", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bXBzXzY3NTkwZjZmZmRjMzc4OTFhYTA5ZGUwN2E0ZDE0ZTUxM2NlNzVmMmU5M2M3M2Y3ZjU1NmNkZjAwNzEwZDdiMmRfZD9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjAmJHNlbGVjdD1pZCUyQ3N0YXRl", + "RequestUri": "/pools/disableandenablenodepool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL2Rpc2FibGVhbmRlbmFibGVub2RlcG9vbD9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "473fa352-8296-47e1-b1ff-ffd712126dce" + "3cf89806-d641-4246-8af1-9eda50a31c5a" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:24:24 GMT" - ], - "x-ms-client-request-id": [ - "a36b89be-1d83-462f-986b-e6d960d27901" + "Fri, 22 Mar 2024 18:55:16 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -745,66 +268,14 @@ "Transfer-Encoding": [ "chunked" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "request-id": [ - "19218164-63c6-4867-b7e5-2b99cc23961f" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "DataServiceVersion": [ - "3.0" - ], - "Date": [ - "Fri, 16 Jun 2023 07:24:25 GMT" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata" - ] - }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"state\": \"rebooting\",\r\n \"virtualMachineInfo\": {}\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d?api-version=2023-05-01.17.0&$select=id%2Cstate", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bXBzXzY3NTkwZjZmZmRjMzc4OTFhYTA5ZGUwN2E0ZDE0ZTUxM2NlNzVmMmU5M2M3M2Y3ZjU1NmNkZjAwNzEwZDdiMmRfZD9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjAmJHNlbGVjdD1pZCUyQ3N0YXRl", - "RequestMethod": "GET", - "RequestHeaders": { - "client-request-id": [ - "73a1c63a-38a9-4fb2-a594-7135496135f5" - ], - "Accept-Language": [ - "en-US" - ], - "ocp-date": [ - "Fri, 16 Jun 2023 07:24:29 GMT" - ], - "x-ms-client-request-id": [ - "12d284d2-0b43-4e58-a5ce-de62631ef838" - ], - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", - "AzurePowershell/Az1.0.0" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Transfer-Encoding": [ - "chunked" + "ETag": [ + "0x8DC4AA193CA52F9" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "338c3f02-36fe-47e6-bccc-030d7b0e3cd8" + "8d9f50bb-0ed0-454b-bac0-8c20c6b4adbf" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -816,37 +287,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:24:30 GMT" + "Fri, 22 Mar 2024 18:55:16 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 18:55:00 GMT" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"state\": \"rebooting\",\r\n \"virtualMachineInfo\": {}\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"disableandenablenodepool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/disableandenablenodepool\",\r\n \"eTag\": \"0x8DC4AA193CA52F9\",\r\n \"lastModified\": \"2024-03-22T18:55:00.9468153Z\",\r\n \"creationTime\": \"2024-03-22T18:55:00.9468142Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T18:55:00.9468142Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T18:55:00.9468153Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d?api-version=2023-05-01.17.0&$select=id%2Cstate", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bXBzXzY3NTkwZjZmZmRjMzc4OTFhYTA5ZGUwN2E0ZDE0ZTUxM2NlNzVmMmU5M2M3M2Y3ZjU1NmNkZjAwNzEwZDdiMmRfZD9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjAmJHNlbGVjdD1pZCUyQ3N0YXRl", + "RequestUri": "/pools/disableandenablenodepool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL2Rpc2FibGVhbmRlbmFibGVub2RlcG9vbD9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "edd87ce9-903f-4e85-b518-a8ecd31136a7" + "5658e677-680e-4b2f-a27f-6b02e0a9f67c" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:24:34 GMT" - ], - "x-ms-client-request-id": [ - "b4016712-03a6-4f9b-8180-ffd5c250ec40" + "Fri, 22 Mar 2024 18:55:22 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -855,11 +326,14 @@ "Transfer-Encoding": [ "chunked" ], + "ETag": [ + "0x8DC4AA193CA52F9" + ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "3e77c0be-8a60-474a-92e3-70bf6f5a9ca5" + "e28c4e1e-e6b6-4ac7-8790-064813b422c9" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -871,37 +345,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:24:35 GMT" + "Fri, 22 Mar 2024 18:55:21 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 18:55:00 GMT" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"state\": \"rebooting\",\r\n \"virtualMachineInfo\": {}\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"disableandenablenodepool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/disableandenablenodepool\",\r\n \"eTag\": \"0x8DC4AA193CA52F9\",\r\n \"lastModified\": \"2024-03-22T18:55:00.9468153Z\",\r\n \"creationTime\": \"2024-03-22T18:55:00.9468142Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T18:55:00.9468142Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T18:55:00.9468153Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d?api-version=2023-05-01.17.0&$select=id%2Cstate", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bXBzXzY3NTkwZjZmZmRjMzc4OTFhYTA5ZGUwN2E0ZDE0ZTUxM2NlNzVmMmU5M2M3M2Y3ZjU1NmNkZjAwNzEwZDdiMmRfZD9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjAmJHNlbGVjdD1pZCUyQ3N0YXRl", + "RequestUri": "/pools/disableandenablenodepool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL2Rpc2FibGVhbmRlbmFibGVub2RlcG9vbD9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "32afe4bc-b6f5-4f6c-a517-f9cdd10d98dd" + "d7414606-c666-46d8-a69c-0e6db081971d" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:24:39 GMT" - ], - "x-ms-client-request-id": [ - "9b9205ab-726f-44db-9c85-f14f9956e8f5" + "Fri, 22 Mar 2024 18:55:27 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -910,11 +384,14 @@ "Transfer-Encoding": [ "chunked" ], + "ETag": [ + "0x8DC4AA193CA52F9" + ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "f3e7e53b-0a6f-4279-8519-4f14c42817bf" + "37983ff6-a270-4fdb-ae5b-fc8f541dcb69" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -926,37 +403,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:24:40 GMT" + "Fri, 22 Mar 2024 18:55:27 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 18:55:00 GMT" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"state\": \"rebooting\",\r\n \"virtualMachineInfo\": {}\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"disableandenablenodepool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/disableandenablenodepool\",\r\n \"eTag\": \"0x8DC4AA193CA52F9\",\r\n \"lastModified\": \"2024-03-22T18:55:00.9468153Z\",\r\n \"creationTime\": \"2024-03-22T18:55:00.9468142Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T18:55:00.9468142Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T18:55:00.9468153Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 2,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d?api-version=2023-05-01.17.0&$select=id%2Cstate", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bXBzXzY3NTkwZjZmZmRjMzc4OTFhYTA5ZGUwN2E0ZDE0ZTUxM2NlNzVmMmU5M2M3M2Y3ZjU1NmNkZjAwNzEwZDdiMmRfZD9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjAmJHNlbGVjdD1pZCUyQ3N0YXRl", + "RequestUri": "/pools/disableandenablenodepool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL2Rpc2FibGVhbmRlbmFibGVub2RlcG9vbD9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "91dd9e02-2230-44ac-8101-81d71a43be45" + "379dd10c-a499-49ac-bf50-25a57911149b" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:24:44 GMT" - ], - "x-ms-client-request-id": [ - "655bfad2-56d2-4a43-b822-652e172edaf6" + "Fri, 22 Mar 2024 18:55:32 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -965,11 +442,14 @@ "Transfer-Encoding": [ "chunked" ], + "ETag": [ + "0x8DC4AA193CA52F9" + ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "9e8f728c-da45-4b71-a33e-13e512248b4c" + "0d580ff2-dc37-48be-8f9a-acaa649ff3d3" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -981,37 +461,40 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:24:46 GMT" + "Fri, 22 Mar 2024 18:55:32 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 18:55:00 GMT" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"state\": \"rebooting\",\r\n \"virtualMachineInfo\": {}\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"disableandenablenodepool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/disableandenablenodepool\",\r\n \"eTag\": \"0x8DC4AA193CA52F9\",\r\n \"lastModified\": \"2024-03-22T18:55:00.9468153Z\",\r\n \"creationTime\": \"2024-03-22T18:55:00.9468142Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T18:55:00.9468142Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T18:55:28.454181Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 2,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\",\r\n \"currentNodeCommunicationMode\": \"classic\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d?api-version=2023-05-01.17.0&$select=id%2Cstate", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bXBzXzY3NTkwZjZmZmRjMzc4OTFhYTA5ZGUwN2E0ZDE0ZTUxM2NlNzVmMmU5M2M3M2Y3ZjU1NmNkZjAwNzEwZDdiMmRfZD9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjAmJHNlbGVjdD1pZCUyQ3N0YXRl", + "RequestUri": "/pools/disableandenablenodepool/nodes?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL2Rpc2FibGVhbmRlbmFibGVub2RlcG9vbC9ub2Rlcz9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "40b1b224-7587-4c77-b9cd-473b195507c7" + "eea6e895-d15b-4ab4-88de-dd88f0a1f6ee" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:24:50 GMT" + "Fri, 22 Mar 2024 18:55:33 GMT" ], "x-ms-client-request-id": [ - "885d54cd-816b-4674-aace-e37b83eec1f3" + "77eaa99a-735e-40d9-8d8c-e9a7a68bd5b7" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -1024,7 +507,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "443025a5-273d-4d2b-9e4b-d78416c18580" + "a8fa2438-d246-4876-b171-c14af35581f3" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1036,37 +519,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:24:50 GMT" + "Fri, 22 Mar 2024 18:55:33 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"state\": \"rebooting\",\r\n \"virtualMachineInfo\": {}\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#nodes\",\r\n \"value\": [\r\n {\r\n \"id\": \"tvmps_7cd56be63371d8080239baccdcfa548ddb374e14c37f6cbe6664dea0ccec0175_d\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/disableandenablenodepool/nodes/tvmps_7cd56be63371d8080239baccdcfa548ddb374e14c37f6cbe6664dea0ccec0175_d\",\r\n \"state\": \"creating\",\r\n \"schedulingState\": \"enabled\",\r\n \"stateTransitionTime\": \"2024-03-22T18:55:27.4549815Z\",\r\n \"allocationTime\": \"2024-03-22T18:55:27.4549924Z\",\r\n \"ipAddress\": \"10.0.0.5\",\r\n \"affinityId\": \"TVM:tvmps_7cd56be63371d8080239baccdcfa548ddb374e14c37f6cbe6664dea0ccec0175_d\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"totalTasksRun\": 0,\r\n \"totalTasksSucceeded\": 0,\r\n \"runningTasksCount\": 0,\r\n \"runningTaskSlotsCount\": 0,\r\n \"isDedicated\": true,\r\n \"endpointConfiguration\": {\r\n \"inboundEndpoints\": [\r\n {\r\n \"name\": \"SSHRule.1\",\r\n \"protocol\": \"tcp\",\r\n \"publicIPAddress\": \"172.165.94.224\",\r\n \"publicFQDN\": \"dns053b0454-60bf-47c7-88ec-19e5c1ef4392-azurebatch-cloudservice.uksouth.cloudapp.azure.com\",\r\n \"frontendPort\": 50001,\r\n \"backendPort\": 22\r\n }\r\n ]\r\n },\r\n \"virtualMachineInfo\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": \"20.04.202403190\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"tvmps_e203a4a96635aab780cb64c274d85d3bf7328c18ad806562d330f7ea981c0fff_d\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/disableandenablenodepool/nodes/tvmps_e203a4a96635aab780cb64c274d85d3bf7328c18ad806562d330f7ea981c0fff_d\",\r\n \"state\": \"creating\",\r\n \"schedulingState\": \"enabled\",\r\n \"stateTransitionTime\": \"2024-03-22T18:55:27.4550327Z\",\r\n \"allocationTime\": \"2024-03-22T18:55:27.4550361Z\",\r\n \"ipAddress\": \"10.0.0.4\",\r\n \"affinityId\": \"TVM:tvmps_e203a4a96635aab780cb64c274d85d3bf7328c18ad806562d330f7ea981c0fff_d\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"totalTasksRun\": 0,\r\n \"totalTasksSucceeded\": 0,\r\n \"runningTasksCount\": 0,\r\n \"runningTaskSlotsCount\": 0,\r\n \"isDedicated\": true,\r\n \"endpointConfiguration\": {\r\n \"inboundEndpoints\": [\r\n {\r\n \"name\": \"SSHRule.0\",\r\n \"protocol\": \"tcp\",\r\n \"publicIPAddress\": \"172.165.94.224\",\r\n \"publicFQDN\": \"dns053b0454-60bf-47c7-88ec-19e5c1ef4392-azurebatch-cloudservice.uksouth.cloudapp.azure.com\",\r\n \"frontendPort\": 50000,\r\n \"backendPort\": 22\r\n }\r\n ]\r\n },\r\n \"virtualMachineInfo\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": \"20.04.202403190\"\r\n }\r\n }\r\n }\r\n ]\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d?api-version=2023-05-01.17.0&$select=id%2Cstate", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bXBzXzY3NTkwZjZmZmRjMzc4OTFhYTA5ZGUwN2E0ZDE0ZTUxM2NlNzVmMmU5M2M3M2Y3ZjU1NmNkZjAwNzEwZDdiMmRfZD9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjAmJHNlbGVjdD1pZCUyQ3N0YXRl", + "RequestUri": "/pools/disableandenablenodepool/nodes/tvmps_7cd56be63371d8080239baccdcfa548ddb374e14c37f6cbe6664dea0ccec0175_d?api-version=2024-02-01.19.0&$select=id%2Cstate", + "EncodedRequestUri": "L3Bvb2xzL2Rpc2FibGVhbmRlbmFibGVub2RlcG9vbC9ub2Rlcy90dm1wc183Y2Q1NmJlNjMzNzFkODA4MDIzOWJhY2NkY2ZhNTQ4ZGRiMzc0ZTE0YzM3ZjZjYmU2NjY0ZGVhMGNjZWMwMTc1X2Q/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4wJiRzZWxlY3Q9aWQlMkNzdGF0ZQ==", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "2ff93ddb-980f-4556-89ad-fc4412ed7ee5" + "8de7613c-75c7-432b-b521-a8a3a8a749a8" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:24:55 GMT" + "Fri, 22 Mar 2024 18:55:33 GMT" ], "x-ms-client-request-id": [ - "2ce5642f-4a91-46ec-bc26-60fb286d185e" + "931bb96d-5cae-4cfa-b742-41e1967a97da" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -1079,7 +562,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "64ce4cb4-0514-401b-b105-f14280e021df" + "f4779abf-3c96-4e9a-878a-50ca8e12b121" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1091,37 +574,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:24:56 GMT" + "Fri, 22 Mar 2024 18:55:34 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"state\": \"rebooting\",\r\n \"virtualMachineInfo\": {}\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_7cd56be63371d8080239baccdcfa548ddb374e14c37f6cbe6664dea0ccec0175_d\",\r\n \"state\": \"creating\",\r\n \"virtualMachineInfo\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": \"20.04.202403190\"\r\n }\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d?api-version=2023-05-01.17.0&$select=id%2Cstate", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bXBzXzY3NTkwZjZmZmRjMzc4OTFhYTA5ZGUwN2E0ZDE0ZTUxM2NlNzVmMmU5M2M3M2Y3ZjU1NmNkZjAwNzEwZDdiMmRfZD9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjAmJHNlbGVjdD1pZCUyQ3N0YXRl", + "RequestUri": "/pools/disableandenablenodepool/nodes/tvmps_7cd56be63371d8080239baccdcfa548ddb374e14c37f6cbe6664dea0ccec0175_d?api-version=2024-02-01.19.0&$select=id%2Cstate", + "EncodedRequestUri": "L3Bvb2xzL2Rpc2FibGVhbmRlbmFibGVub2RlcG9vbC9ub2Rlcy90dm1wc183Y2Q1NmJlNjMzNzFkODA4MDIzOWJhY2NkY2ZhNTQ4ZGRiMzc0ZTE0YzM3ZjZjYmU2NjY0ZGVhMGNjZWMwMTc1X2Q/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4wJiRzZWxlY3Q9aWQlMkNzdGF0ZQ==", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "ee4143ae-e34c-41f4-b18f-098a4a14b415" + "497dddfc-a641-4b3c-ae67-afcf2fa3b9a6" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:25:00 GMT" + "Fri, 22 Mar 2024 18:55:39 GMT" ], "x-ms-client-request-id": [ - "1ef737c3-b42b-471e-893d-c940f381a423" + "4f2e0e85-001d-45f6-b2b9-ccc9230b45dd" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -1134,7 +617,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "c2614b53-a5a7-43bb-bbd7-824992f18c86" + "074e1d93-a26b-4967-8007-70548acedacf" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1146,37 +629,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:25:00 GMT" + "Fri, 22 Mar 2024 18:55:39 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"state\": \"rebooting\",\r\n \"virtualMachineInfo\": {}\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_7cd56be63371d8080239baccdcfa548ddb374e14c37f6cbe6664dea0ccec0175_d\",\r\n \"state\": \"starting\",\r\n \"virtualMachineInfo\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": \"20.04.202403190\"\r\n }\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d?api-version=2023-05-01.17.0&$select=id%2Cstate", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bXBzXzY3NTkwZjZmZmRjMzc4OTFhYTA5ZGUwN2E0ZDE0ZTUxM2NlNzVmMmU5M2M3M2Y3ZjU1NmNkZjAwNzEwZDdiMmRfZD9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjAmJHNlbGVjdD1pZCUyQ3N0YXRl", + "RequestUri": "/pools/disableandenablenodepool/nodes/tvmps_7cd56be63371d8080239baccdcfa548ddb374e14c37f6cbe6664dea0ccec0175_d?api-version=2024-02-01.19.0&$select=id%2Cstate", + "EncodedRequestUri": "L3Bvb2xzL2Rpc2FibGVhbmRlbmFibGVub2RlcG9vbC9ub2Rlcy90dm1wc183Y2Q1NmJlNjMzNzFkODA4MDIzOWJhY2NkY2ZhNTQ4ZGRiMzc0ZTE0YzM3ZjZjYmU2NjY0ZGVhMGNjZWMwMTc1X2Q/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4wJiRzZWxlY3Q9aWQlMkNzdGF0ZQ==", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "599c970d-9916-4728-aa72-1bcf0a09c897" + "a3c48b9e-58f8-444f-bb0f-76f70bd7f46c" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:25:05 GMT" + "Fri, 22 Mar 2024 18:55:44 GMT" ], "x-ms-client-request-id": [ - "36ec8d5d-d469-4322-8a18-abcee2ca3a4b" + "44f804fe-49b5-4d75-a663-f13d7c73cc51" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -1189,7 +672,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "cb0e08d2-d7e3-41cb-93fb-18cd2f95e64e" + "8287167d-a2cc-4f06-865b-4f4edddfdb87" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1201,37 +684,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:25:05 GMT" + "Fri, 22 Mar 2024 18:55:44 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"state\": \"rebooting\",\r\n \"virtualMachineInfo\": {}\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_7cd56be63371d8080239baccdcfa548ddb374e14c37f6cbe6664dea0ccec0175_d\",\r\n \"state\": \"starting\",\r\n \"virtualMachineInfo\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": \"20.04.202403190\"\r\n }\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d?api-version=2023-05-01.17.0&$select=id%2Cstate", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bXBzXzY3NTkwZjZmZmRjMzc4OTFhYTA5ZGUwN2E0ZDE0ZTUxM2NlNzVmMmU5M2M3M2Y3ZjU1NmNkZjAwNzEwZDdiMmRfZD9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjAmJHNlbGVjdD1pZCUyQ3N0YXRl", + "RequestUri": "/pools/disableandenablenodepool/nodes/tvmps_7cd56be63371d8080239baccdcfa548ddb374e14c37f6cbe6664dea0ccec0175_d?api-version=2024-02-01.19.0&$select=id%2Cstate", + "EncodedRequestUri": "L3Bvb2xzL2Rpc2FibGVhbmRlbmFibGVub2RlcG9vbC9ub2Rlcy90dm1wc183Y2Q1NmJlNjMzNzFkODA4MDIzOWJhY2NkY2ZhNTQ4ZGRiMzc0ZTE0YzM3ZjZjYmU2NjY0ZGVhMGNjZWMwMTc1X2Q/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4wJiRzZWxlY3Q9aWQlMkNzdGF0ZQ==", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "e8253857-6759-467a-b20e-f4ed0903a9d6" + "b09e2b7a-d154-4190-9826-7622d73ea2e3" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:25:10 GMT" + "Fri, 22 Mar 2024 18:55:49 GMT" ], "x-ms-client-request-id": [ - "6ab9463e-e53c-47cf-b9b9-09ff6220cbb6" + "2e3ab123-d170-468e-a3d2-e0525c7d48db" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -1244,7 +727,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "ef8ee01e-02bf-40c8-be23-8fe3db995a26" + "fe1043f1-eb53-4a8d-9aac-14fd59436289" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1256,37 +739,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:25:11 GMT" + "Fri, 22 Mar 2024 18:55:49 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"state\": \"rebooting\",\r\n \"virtualMachineInfo\": {}\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_7cd56be63371d8080239baccdcfa548ddb374e14c37f6cbe6664dea0ccec0175_d\",\r\n \"state\": \"starting\",\r\n \"virtualMachineInfo\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": \"20.04.202403190\"\r\n }\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d?api-version=2023-05-01.17.0&$select=id%2Cstate", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bXBzXzY3NTkwZjZmZmRjMzc4OTFhYTA5ZGUwN2E0ZDE0ZTUxM2NlNzVmMmU5M2M3M2Y3ZjU1NmNkZjAwNzEwZDdiMmRfZD9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjAmJHNlbGVjdD1pZCUyQ3N0YXRl", + "RequestUri": "/pools/disableandenablenodepool/nodes/tvmps_7cd56be63371d8080239baccdcfa548ddb374e14c37f6cbe6664dea0ccec0175_d?api-version=2024-02-01.19.0&$select=id%2Cstate", + "EncodedRequestUri": "L3Bvb2xzL2Rpc2FibGVhbmRlbmFibGVub2RlcG9vbC9ub2Rlcy90dm1wc183Y2Q1NmJlNjMzNzFkODA4MDIzOWJhY2NkY2ZhNTQ4ZGRiMzc0ZTE0YzM3ZjZjYmU2NjY0ZGVhMGNjZWMwMTc1X2Q/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4wJiRzZWxlY3Q9aWQlMkNzdGF0ZQ==", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "10cb71c5-522c-4f6b-a68a-085eedb07fc5" + "79201fcf-6b8c-423e-90e8-9ce3eecfa83e" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:25:15 GMT" + "Fri, 22 Mar 2024 18:55:55 GMT" ], "x-ms-client-request-id": [ - "7bca9417-1332-4b5f-9c5d-ea39b2a2f0d4" + "56642357-c7c7-4ff1-9d99-31053ec7bd5a" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -1299,7 +782,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "1dcd7e6a-4250-4e49-bb9e-8319efdcf355" + "344b48ce-3a01-4c8b-9cb3-2edbee9f0f9e" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1311,37 +794,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:25:16 GMT" + "Fri, 22 Mar 2024 18:55:55 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"state\": \"rebooting\",\r\n \"virtualMachineInfo\": {}\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_7cd56be63371d8080239baccdcfa548ddb374e14c37f6cbe6664dea0ccec0175_d\",\r\n \"state\": \"starting\",\r\n \"virtualMachineInfo\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": \"20.04.202403190\"\r\n }\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d?api-version=2023-05-01.17.0&$select=id%2Cstate", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bXBzXzY3NTkwZjZmZmRjMzc4OTFhYTA5ZGUwN2E0ZDE0ZTUxM2NlNzVmMmU5M2M3M2Y3ZjU1NmNkZjAwNzEwZDdiMmRfZD9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjAmJHNlbGVjdD1pZCUyQ3N0YXRl", + "RequestUri": "/pools/disableandenablenodepool/nodes/tvmps_7cd56be63371d8080239baccdcfa548ddb374e14c37f6cbe6664dea0ccec0175_d?api-version=2024-02-01.19.0&$select=id%2Cstate", + "EncodedRequestUri": "L3Bvb2xzL2Rpc2FibGVhbmRlbmFibGVub2RlcG9vbC9ub2Rlcy90dm1wc183Y2Q1NmJlNjMzNzFkODA4MDIzOWJhY2NkY2ZhNTQ4ZGRiMzc0ZTE0YzM3ZjZjYmU2NjY0ZGVhMGNjZWMwMTc1X2Q/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4wJiRzZWxlY3Q9aWQlMkNzdGF0ZQ==", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "37b250d7-d904-44ee-897b-12d75a3c36c8" + "b97c36e0-2a0d-4c5e-a89d-0f7cda54adee" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:25:20 GMT" + "Fri, 22 Mar 2024 18:56:00 GMT" ], "x-ms-client-request-id": [ - "e908baae-8943-4fcb-93c2-8caeb07252b7" + "02df56da-0a6a-4531-b367-5e668cdca2c1" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -1354,7 +837,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "c4435c37-c407-41fd-882a-07d4ca89fd01" + "391ecae4-a7b5-4f29-9743-0fea4c3bd31f" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1366,37 +849,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:25:21 GMT" + "Fri, 22 Mar 2024 18:56:00 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"state\": \"rebooting\",\r\n \"virtualMachineInfo\": {}\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_7cd56be63371d8080239baccdcfa548ddb374e14c37f6cbe6664dea0ccec0175_d\",\r\n \"state\": \"starting\",\r\n \"virtualMachineInfo\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": \"20.04.202403190\"\r\n }\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d?api-version=2023-05-01.17.0&$select=id%2Cstate", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bXBzXzY3NTkwZjZmZmRjMzc4OTFhYTA5ZGUwN2E0ZDE0ZTUxM2NlNzVmMmU5M2M3M2Y3ZjU1NmNkZjAwNzEwZDdiMmRfZD9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjAmJHNlbGVjdD1pZCUyQ3N0YXRl", + "RequestUri": "/pools/disableandenablenodepool/nodes/tvmps_7cd56be63371d8080239baccdcfa548ddb374e14c37f6cbe6664dea0ccec0175_d?api-version=2024-02-01.19.0&$select=id%2Cstate", + "EncodedRequestUri": "L3Bvb2xzL2Rpc2FibGVhbmRlbmFibGVub2RlcG9vbC9ub2Rlcy90dm1wc183Y2Q1NmJlNjMzNzFkODA4MDIzOWJhY2NkY2ZhNTQ4ZGRiMzc0ZTE0YzM3ZjZjYmU2NjY0ZGVhMGNjZWMwMTc1X2Q/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4wJiRzZWxlY3Q9aWQlMkNzdGF0ZQ==", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "54131fb3-3367-403a-ad06-6814ac14e64c" + "3ab02711-e76f-4db2-aa7a-b4aea30058de" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:25:25 GMT" + "Fri, 22 Mar 2024 18:56:05 GMT" ], "x-ms-client-request-id": [ - "a5e72198-6bb6-4853-9d03-cb57f54cc367" + "ba71354a-324b-4572-a064-6393ca3e7acf" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -1409,7 +892,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "b6e7d57c-a327-43f4-ab6a-f53acf8de9b7" + "af42af21-c4ee-468e-b3d1-bf850df1fc22" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1421,37 +904,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:25:26 GMT" + "Fri, 22 Mar 2024 18:56:05 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"state\": \"idle\",\r\n \"virtualMachineInfo\": {}\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_7cd56be63371d8080239baccdcfa548ddb374e14c37f6cbe6664dea0ccec0175_d\",\r\n \"state\": \"idle\",\r\n \"virtualMachineInfo\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": \"20.04.202403190\"\r\n }\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bXBzXzY3NTkwZjZmZmRjMzc4OTFhYTA5ZGUwN2E0ZDE0ZTUxM2NlNzVmMmU5M2M3M2Y3ZjU1NmNkZjAwNzEwZDdiMmRfZD9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjA=", + "RequestUri": "/pools/disableandenablenodepool/nodes/tvmps_7cd56be63371d8080239baccdcfa548ddb374e14c37f6cbe6664dea0ccec0175_d?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL2Rpc2FibGVhbmRlbmFibGVub2RlcG9vbC9ub2Rlcy90dm1wc183Y2Q1NmJlNjMzNzFkODA4MDIzOWJhY2NkY2ZhNTQ4ZGRiMzc0ZTE0YzM3ZjZjYmU2NjY0ZGVhMGNjZWMwMTc1X2Q/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "c5a8acd6-d384-48e6-8338-be4ad1fea12a" + "7d2bd39a-def1-4794-a33f-b0887570ce62" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:25:26 GMT" + "Fri, 22 Mar 2024 18:56:05 GMT" ], "x-ms-client-request-id": [ - "b1cd04b7-809d-41b0-a41f-a3456020f066" + "ba37f704-add8-4bc5-8b2f-d2e889bda363" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -1464,7 +947,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "17e1c7b0-276a-48f2-9d1b-6473d735e44d" + "9b09d141-72bf-46c8-925d-a0a7720a7f41" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1476,37 +959,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:25:26 GMT" + "Fri, 22 Mar 2024 18:56:05 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"state\": \"idle\",\r\n \"schedulingState\": \"enabled\",\r\n \"stateTransitionTime\": \"2023-06-16T07:25:22.287975Z\",\r\n \"lastBootTime\": \"2023-06-16T07:25:22.018509Z\",\r\n \"allocationTime\": \"2023-06-13T07:46:20.7222354Z\",\r\n \"ipAddress\": \"10.218.0.6\",\r\n \"affinityId\": \"TVM:tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"totalTasksRun\": 9,\r\n \"totalTasksSucceeded\": 6,\r\n \"runningTasksCount\": 0,\r\n \"runningTaskSlotsCount\": 0,\r\n \"recentTasks\": [],\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"pool\",\r\n \"elevationLevel\": \"nonadmin\"\r\n }\r\n },\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": true\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2023-06-16T07:25:22.194236Z\",\r\n \"endTime\": \"2023-06-16T07:25:22.272356Z\",\r\n \"exitCode\": 0,\r\n \"result\": \"success\",\r\n \"retryCount\": 0\r\n },\r\n \"certificateReferences\": [],\r\n \"isDedicated\": true,\r\n \"endpointConfiguration\": {\r\n \"inboundEndpoints\": [\r\n {\r\n \"name\": \"Microsoft.WindowsAzure.Plugins.RemoteForwarder.RdpInput\",\r\n \"protocol\": \"tcp\",\r\n \"frontendPort\": 3389,\r\n \"backendPort\": 20000\r\n }\r\n ]\r\n },\r\n \"nodeAgentInfo\": {\r\n \"lastUpdateTime\": \"2023-06-13T07:53:19.121974Z\",\r\n \"version\": \"1.10.0\"\r\n },\r\n \"virtualMachineInfo\": {}\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_7cd56be63371d8080239baccdcfa548ddb374e14c37f6cbe6664dea0ccec0175_d\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/disableandenablenodepool/nodes/tvmps_7cd56be63371d8080239baccdcfa548ddb374e14c37f6cbe6664dea0ccec0175_d\",\r\n \"state\": \"idle\",\r\n \"schedulingState\": \"enabled\",\r\n \"stateTransitionTime\": \"2024-03-22T18:56:02.67964Z\",\r\n \"lastBootTime\": \"2024-03-22T18:56:02.61571Z\",\r\n \"allocationTime\": \"2024-03-22T18:55:27.4549924Z\",\r\n \"ipAddress\": \"10.0.0.5\",\r\n \"affinityId\": \"TVM:tvmps_7cd56be63371d8080239baccdcfa548ddb374e14c37f6cbe6664dea0ccec0175_d\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"totalTasksRun\": 0,\r\n \"totalTasksSucceeded\": 0,\r\n \"runningTasksCount\": 0,\r\n \"runningTaskSlotsCount\": 0,\r\n \"certificateReferences\": [],\r\n \"isDedicated\": true,\r\n \"endpointConfiguration\": {\r\n \"inboundEndpoints\": [\r\n {\r\n \"name\": \"SSHRule.1\",\r\n \"protocol\": \"tcp\",\r\n \"publicIPAddress\": \"172.165.94.224\",\r\n \"publicFQDN\": \"dns053b0454-60bf-47c7-88ec-19e5c1ef4392-azurebatch-cloudservice.uksouth.cloudapp.azure.com\",\r\n \"frontendPort\": 50001,\r\n \"backendPort\": 22\r\n }\r\n ]\r\n },\r\n \"nodeAgentInfo\": {\r\n \"lastUpdateTime\": \"2024-03-22T18:56:02.61571Z\",\r\n \"version\": \"1.11.8\"\r\n },\r\n \"virtualMachineInfo\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": \"20.04.202403190\"\r\n }\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d/disablescheduling?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bXBzXzY3NTkwZjZmZmRjMzc4OTFhYTA5ZGUwN2E0ZDE0ZTUxM2NlNzVmMmU5M2M3M2Y3ZjU1NmNkZjAwNzEwZDdiMmRfZC9kaXNhYmxlc2NoZWR1bGluZz9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjA=", + "RequestUri": "/pools/disableandenablenodepool/nodes/tvmps_7cd56be63371d8080239baccdcfa548ddb374e14c37f6cbe6664dea0ccec0175_d/disablescheduling?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL2Rpc2FibGVhbmRlbmFibGVub2RlcG9vbC9ub2Rlcy90dm1wc183Y2Q1NmJlNjMzNzFkODA4MDIzOWJhY2NkY2ZhNTQ4ZGRiMzc0ZTE0YzM3ZjZjYmU2NjY0ZGVhMGNjZWMwMTc1X2QvZGlzYWJsZXNjaGVkdWxpbmc/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "b02b0294-2c2b-404d-ae53-5a8a51801a1d" + "68d67c8c-6962-4a8f-b3dd-9d5b34e9b02c" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:25:26 GMT" + "Fri, 22 Mar 2024 18:56:06 GMT" ], "x-ms-client-request-id": [ - "b1cd04b7-809d-41b0-a41f-a3456020f066" + "ba37f704-add8-4bc5-8b2f-d2e889bda363" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Type": [ @@ -1525,7 +1008,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "2770fc0a-7de3-4004-a573-a4fac3a6c052" + "f86a9a50-88dc-43a5-b99e-764828a3a7cb" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1537,37 +1020,37 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d/disablescheduling" + "https://billstestba24326.uksouth.batch.azure.com/pools/disableandenablenodepool/nodes/tvmps_7cd56be63371d8080239baccdcfa548ddb374e14c37f6cbe6664dea0ccec0175_d/disablescheduling" ], "Date": [ - "Fri, 16 Jun 2023 07:25:26 GMT" + "Fri, 22 Mar 2024 18:56:06 GMT" ] }, "ResponseBody": "", "StatusCode": 200 }, { - "RequestUri": "/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d?api-version=2023-05-01.17.0&$select=id%2CschedulingState", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bXBzXzY3NTkwZjZmZmRjMzc4OTFhYTA5ZGUwN2E0ZDE0ZTUxM2NlNzVmMmU5M2M3M2Y3ZjU1NmNkZjAwNzEwZDdiMmRfZD9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjAmJHNlbGVjdD1pZCUyQ3NjaGVkdWxpbmdTdGF0ZQ==", + "RequestUri": "/pools/disableandenablenodepool/nodes/tvmps_7cd56be63371d8080239baccdcfa548ddb374e14c37f6cbe6664dea0ccec0175_d?api-version=2024-02-01.19.0&$select=id%2CschedulingState", + "EncodedRequestUri": "L3Bvb2xzL2Rpc2FibGVhbmRlbmFibGVub2RlcG9vbC9ub2Rlcy90dm1wc183Y2Q1NmJlNjMzNzFkODA4MDIzOWJhY2NkY2ZhNTQ4ZGRiMzc0ZTE0YzM3ZjZjYmU2NjY0ZGVhMGNjZWMwMTc1X2Q/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4wJiRzZWxlY3Q9aWQlMkNzY2hlZHVsaW5nU3RhdGU=", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "49383c22-dee0-462f-9870-2ad36dd8be3b" + "60535b40-76ab-4864-8f74-b211f7ac6463" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:25:26 GMT" + "Fri, 22 Mar 2024 18:56:06 GMT" ], "x-ms-client-request-id": [ - "4ca6319b-dffa-4537-b19e-fb498d8aa009" + "1f077bf0-f039-4751-975a-25d80f95b8af" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -1580,7 +1063,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "8d67cc8c-b638-4d76-9a8e-707ef4aeaf2b" + "24dc3789-0edc-4dc2-b42f-14e1a304702a" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1592,37 +1075,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:25:27 GMT" + "Fri, 22 Mar 2024 18:56:06 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"schedulingState\": \"disabled\",\r\n \"virtualMachineInfo\": {}\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_7cd56be63371d8080239baccdcfa548ddb374e14c37f6cbe6664dea0ccec0175_d\",\r\n \"schedulingState\": \"disabled\",\r\n \"virtualMachineInfo\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": \"20.04.202403190\"\r\n }\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d?api-version=2023-05-01.17.0&$select=id%2CschedulingState", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bXBzXzY3NTkwZjZmZmRjMzc4OTFhYTA5ZGUwN2E0ZDE0ZTUxM2NlNzVmMmU5M2M3M2Y3ZjU1NmNkZjAwNzEwZDdiMmRfZD9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjAmJHNlbGVjdD1pZCUyQ3NjaGVkdWxpbmdTdGF0ZQ==", + "RequestUri": "/pools/disableandenablenodepool/nodes/tvmps_7cd56be63371d8080239baccdcfa548ddb374e14c37f6cbe6664dea0ccec0175_d?api-version=2024-02-01.19.0&$select=id%2CschedulingState", + "EncodedRequestUri": "L3Bvb2xzL2Rpc2FibGVhbmRlbmFibGVub2RlcG9vbC9ub2Rlcy90dm1wc183Y2Q1NmJlNjMzNzFkODA4MDIzOWJhY2NkY2ZhNTQ4ZGRiMzc0ZTE0YzM3ZjZjYmU2NjY0ZGVhMGNjZWMwMTc1X2Q/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4wJiRzZWxlY3Q9aWQlMkNzY2hlZHVsaW5nU3RhdGU=", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "8ff6df54-5cf2-4776-8407-baa6c31f30e0" + "c188dce0-5ea2-45fd-87f0-af59429e9f80" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:25:26 GMT" + "Fri, 22 Mar 2024 18:56:06 GMT" ], "x-ms-client-request-id": [ - "ea77d098-d9c5-4cb0-9efe-18b94100da76" + "598348ef-7256-40f6-9f74-9a0aa32c6f14" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -1635,7 +1118,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "ad21ea8c-f2e5-4bf5-803e-540ba047dd5f" + "687b90eb-03b2-4cc0-a4d7-5857eb7838e2" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1647,37 +1130,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:25:27 GMT" + "Fri, 22 Mar 2024 18:56:06 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"schedulingState\": \"enabled\",\r\n \"virtualMachineInfo\": {}\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_7cd56be63371d8080239baccdcfa548ddb374e14c37f6cbe6664dea0ccec0175_d\",\r\n \"schedulingState\": \"enabled\",\r\n \"virtualMachineInfo\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": \"20.04.202403190\"\r\n }\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d/enablescheduling?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bXBzXzY3NTkwZjZmZmRjMzc4OTFhYTA5ZGUwN2E0ZDE0ZTUxM2NlNzVmMmU5M2M3M2Y3ZjU1NmNkZjAwNzEwZDdiMmRfZC9lbmFibGVzY2hlZHVsaW5nP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", + "RequestUri": "/pools/disableandenablenodepool/nodes/tvmps_7cd56be63371d8080239baccdcfa548ddb374e14c37f6cbe6664dea0ccec0175_d/enablescheduling?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL2Rpc2FibGVhbmRlbmFibGVub2RlcG9vbC9ub2Rlcy90dm1wc183Y2Q1NmJlNjMzNzFkODA4MDIzOWJhY2NkY2ZhNTQ4ZGRiMzc0ZTE0YzM3ZjZjYmU2NjY0ZGVhMGNjZWMwMTc1X2QvZW5hYmxlc2NoZWR1bGluZz9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "337cbb59-de8b-475b-92eb-7421231d10b6" + "55a602b6-0b2d-48b1-9c68-63a5666db047" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:25:26 GMT" + "Fri, 22 Mar 2024 18:56:06 GMT" ], "x-ms-client-request-id": [ - "1fbbfff0-4276-4bda-950a-c46ef6af3436" + "104006da-7cbf-4cc4-b958-fcbb53196c76" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Length": [ @@ -1693,7 +1176,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "50b0ecf0-4c2f-4234-946a-f42d9f51aac8" + "89af8954-b7a2-4ea4-b763-a2ae18cba476" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1705,10 +1188,10 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d/enablescheduling" + "https://billstestba24326.uksouth.batch.azure.com/pools/disableandenablenodepool/nodes/tvmps_7cd56be63371d8080239baccdcfa548ddb374e14c37f6cbe6664dea0ccec0175_d/enablescheduling" ], "Date": [ - "Fri, 16 Jun 2023 07:25:27 GMT" + "Fri, 22 Mar 2024 18:56:06 GMT" ] }, "ResponseBody": "", @@ -1717,9 +1200,9 @@ ], "Names": {}, "Variables": { - "SubscriptionId": "21abd678-18c5-4660-9fdd-8c5ba6b6fe1f", - "AZURE_BATCH_ACCOUNT": "hoppeeastasia2", - "AZURE_BATCH_ENDPOINT": "https://hoppeeastasia2.eastasia.batch.azure.com", - "AZURE_BATCH_RESOURCE_GROUP": "123" + "SubscriptionId": "6602ac9a-5dad-41bd-a792-592c704b6a31", + "AZURE_BATCH_ACCOUNT": "billstestba24326", + "AZURE_BATCH_ENDPOINT": "https://billstestba24326.uksouth.batch.azure.com", + "AZURE_BATCH_RESOURCE_GROUP": "automation" } } \ No newline at end of file diff --git a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ComputeNodeTests/TestGetComputeNodeRemoteLoginSettings.json b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ComputeNodeTests/TestGetComputeNodeRemoteLoginSettings.json index 42cd872105a3..a0737a0de663 100644 --- a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ComputeNodeTests/TestGetComputeNodeRemoteLoginSettings.json +++ b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ComputeNodeTests/TestGetComputeNodeRemoteLoginSettings.json @@ -1,27 +1,500 @@ { "Entries": [ { - "RequestUri": "/pools/testIaasPool/nodes?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RJYWFzUG9vbC9ub2Rlcz9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjA=", + "RequestUri": "/pools?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", + "RequestMethod": "POST", + "RequestHeaders": { + "client-request-id": [ + "0f7b3dd3-a5d1-4286-b57c-9fd428d2e4c1" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 18:52:57 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; charset=utf-8" + ], + "Content-Length": [ + "517" + ] + }, + "RequestBody": "{\r\n \"id\": \"noderemoteloginpool\",\r\n \"vmSize\": \"STANDARD_D2S_V3\",\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"zonal\"\r\n }\r\n },\r\n \"targetDedicatedNodes\": 2,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableInterNodeCommunication\": false,\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "0x8DC4AA14AC7C110" + ], + "Location": [ + "https://billstestba24326.uksouth.batch.azure.com/pools/noderemoteloginpool" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "14e5b059-d4ee-4ee2-b4f0-addb6825bd6b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "DataServiceId": [ + "https://billstestba24326.uksouth.batch.azure.com/pools/noderemoteloginpool" + ], + "Date": [ + "Fri, 22 Mar 2024 18:52:58 GMT" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 18:52:58 GMT" + ] + }, + "ResponseBody": "", + "StatusCode": 201 + }, + { + "RequestUri": "/pools/noderemoteloginpool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL25vZGVyZW1vdGVsb2dpbnBvb2w/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "6fe3d18c-cd32-4f9f-ba60-b0b894fb582e" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 18:52:58 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "0x8DC4AA14AC7C110" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "9df6dc53-e7ac-43f6-bb0b-17b4e967eca5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 18:52:58 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 18:52:58 GMT" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"noderemoteloginpool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/noderemoteloginpool\",\r\n \"eTag\": \"0x8DC4AA14AC7C110\",\r\n \"lastModified\": \"2024-03-22T18:52:58.456296Z\",\r\n \"creationTime\": \"2024-03-22T18:52:58.4562936Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T18:52:58.4562936Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T18:52:58.4562962Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/pools/noderemoteloginpool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL25vZGVyZW1vdGVsb2dpbnBvb2w/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "84838e16-c56d-4e86-a9df-6a2373614133" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 18:53:03 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "0x8DC4AA14AC7C110" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "a65310e3-3e9f-4b3a-bc5f-47a2bcbd7b56" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 18:53:03 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 18:52:58 GMT" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"noderemoteloginpool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/noderemoteloginpool\",\r\n \"eTag\": \"0x8DC4AA14AC7C110\",\r\n \"lastModified\": \"2024-03-22T18:52:58.456296Z\",\r\n \"creationTime\": \"2024-03-22T18:52:58.4562936Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T18:52:58.4562936Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T18:52:58.4562962Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/pools/noderemoteloginpool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL25vZGVyZW1vdGVsb2dpbnBvb2w/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "fbe706ee-5876-4776-a375-de510511c429" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 18:53:08 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "0x8DC4AA14AC7C110" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "274e5a4d-ab69-4053-8607-4d2e96ac1d01" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 18:53:09 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 18:52:58 GMT" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"noderemoteloginpool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/noderemoteloginpool\",\r\n \"eTag\": \"0x8DC4AA14AC7C110\",\r\n \"lastModified\": \"2024-03-22T18:52:58.456296Z\",\r\n \"creationTime\": \"2024-03-22T18:52:58.4562936Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T18:52:58.4562936Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T18:52:58.4562962Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/pools/noderemoteloginpool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL25vZGVyZW1vdGVsb2dpbnBvb2w/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "18e99faf-9d4f-469c-896b-488577854d13" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 18:53:14 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "0x8DC4AA14AC7C110" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "23bdc5a2-9f25-4e56-861c-ea39dd05e564" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 18:53:14 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 18:52:58 GMT" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"noderemoteloginpool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/noderemoteloginpool\",\r\n \"eTag\": \"0x8DC4AA14AC7C110\",\r\n \"lastModified\": \"2024-03-22T18:52:58.456296Z\",\r\n \"creationTime\": \"2024-03-22T18:52:58.4562936Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T18:52:58.4562936Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T18:52:58.4562962Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/pools/noderemoteloginpool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL25vZGVyZW1vdGVsb2dpbnBvb2w/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "51325cc7-1b89-4bfa-a1cb-bf3a06d4ec8a" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 18:53:19 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "0x8DC4AA14AC7C110" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "ea8501a3-e021-4d51-a388-b5db5e7d4460" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 18:53:19 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 18:52:58 GMT" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"noderemoteloginpool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/noderemoteloginpool\",\r\n \"eTag\": \"0x8DC4AA14AC7C110\",\r\n \"lastModified\": \"2024-03-22T18:52:58.456296Z\",\r\n \"creationTime\": \"2024-03-22T18:52:58.4562936Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T18:52:58.4562936Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T18:52:58.4562962Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/pools/noderemoteloginpool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL25vZGVyZW1vdGVsb2dpbnBvb2w/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "896b4ffd-f2ba-49e7-b7fd-f34f2ba4fb29" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 18:53:25 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "0x8DC4AA14AC7C110" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "7b50bc14-7130-4957-9eeb-3a42e32ad335" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 18:53:24 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 18:52:58 GMT" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"noderemoteloginpool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/noderemoteloginpool\",\r\n \"eTag\": \"0x8DC4AA14AC7C110\",\r\n \"lastModified\": \"2024-03-22T18:52:58.456296Z\",\r\n \"creationTime\": \"2024-03-22T18:52:58.4562936Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T18:52:58.4562936Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T18:52:58.4562962Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 2,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/pools/noderemoteloginpool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL25vZGVyZW1vdGVsb2dpbnBvb2w/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "1129444e-924d-4789-9cd1-e93d08a69e65" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 18:53:30 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "0x8DC4AA14AC7C110" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "34112342-d32f-4007-b1cd-773d17153791" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 18:53:30 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 18:52:58 GMT" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"noderemoteloginpool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/noderemoteloginpool\",\r\n \"eTag\": \"0x8DC4AA14AC7C110\",\r\n \"lastModified\": \"2024-03-22T18:52:58.456296Z\",\r\n \"creationTime\": \"2024-03-22T18:52:58.4562936Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T18:52:58.4562936Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T18:53:25.7804112Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 2,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\",\r\n \"currentNodeCommunicationMode\": \"classic\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/pools/noderemoteloginpool/nodes?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL25vZGVyZW1vdGVsb2dpbnBvb2wvbm9kZXM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "4c8b42a1-90ce-43e3-9046-17adce4af862" + "a788ab7f-d9cf-45bd-846d-a9e09b824dce" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:23:16 GMT" + "Fri, 22 Mar 2024 18:53:32 GMT" ], "x-ms-client-request-id": [ - "33101fe5-504f-4f82-a19d-e19c0666841a" + "78badbed-1cb5-4b15-8336-b191f4a5d661" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -34,7 +507,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "220a07e3-3490-4361-aa44-ff7047358c8b" + "ef71586d-4d59-4ec0-a041-089fabaad9d5" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -46,37 +519,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:23:17 GMT" + "Fri, 22 Mar 2024 18:53:33 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes\",\r\n \"value\": [\r\n {\r\n \"id\": \"tvmps_dab0d74aeac5bae0c2175d1eb1ac01e7bd02cece885de1af52cbbd2750b66828_d\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/testIaasPool/nodes/tvmps_dab0d74aeac5bae0c2175d1eb1ac01e7bd02cece885de1af52cbbd2750b66828_d\",\r\n \"state\": \"idle\",\r\n \"schedulingState\": \"enabled\",\r\n \"stateTransitionTime\": \"2023-06-13T07:47:21.112453Z\",\r\n \"lastBootTime\": \"2023-06-13T07:47:20.946829Z\",\r\n \"allocationTime\": \"2023-06-13T07:45:56.002124Z\",\r\n \"ipAddress\": \"10.0.0.4\",\r\n \"affinityId\": \"TVM:tvmps_dab0d74aeac5bae0c2175d1eb1ac01e7bd02cece885de1af52cbbd2750b66828_d\",\r\n \"vmSize\": \"standard_a1_v2\",\r\n \"totalTasksRun\": 0,\r\n \"totalTasksSucceeded\": 0,\r\n \"runningTasksCount\": 0,\r\n \"runningTaskSlotsCount\": 0,\r\n \"certificateReferences\": [],\r\n \"isDedicated\": true,\r\n \"endpointConfiguration\": {\r\n \"inboundEndpoints\": [\r\n {\r\n \"name\": \"SSHRule.0\",\r\n \"protocol\": \"tcp\",\r\n \"publicIPAddress\": \"20.24.248.73\",\r\n \"publicFQDN\": \"dnsf53613d2-3f73-4e1d-ab81-f0623cdc01ce-azurebatch-cloudservice.eastasia.cloudapp.azure.com\",\r\n \"frontendPort\": 50000,\r\n \"backendPort\": 22\r\n }\r\n ]\r\n },\r\n \"nodeAgentInfo\": {\r\n \"lastUpdateTime\": \"2023-06-13T07:47:20.946829Z\",\r\n \"version\": \"1.10.0\"\r\n },\r\n \"virtualMachineInfo\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-jammy\",\r\n \"sku\": \"22_04-LTS\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": \"22.04.202306010\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#nodes\",\r\n \"value\": [\r\n {\r\n \"id\": \"tvmps_51b0e6a874e81f3f415febc02d26879a7b11be03927c7528bf05f43bfa2df272_d\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/noderemoteloginpool/nodes/tvmps_51b0e6a874e81f3f415febc02d26879a7b11be03927c7528bf05f43bfa2df272_d\",\r\n \"state\": \"creating\",\r\n \"schedulingState\": \"enabled\",\r\n \"stateTransitionTime\": \"2024-03-22T18:53:24.7205876Z\",\r\n \"allocationTime\": \"2024-03-22T18:53:24.7205921Z\",\r\n \"ipAddress\": \"10.0.0.5\",\r\n \"affinityId\": \"TVM:tvmps_51b0e6a874e81f3f415febc02d26879a7b11be03927c7528bf05f43bfa2df272_d\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"totalTasksRun\": 0,\r\n \"totalTasksSucceeded\": 0,\r\n \"runningTasksCount\": 0,\r\n \"runningTaskSlotsCount\": 0,\r\n \"isDedicated\": true,\r\n \"endpointConfiguration\": {\r\n \"inboundEndpoints\": [\r\n {\r\n \"name\": \"SSHRule.1\",\r\n \"protocol\": \"tcp\",\r\n \"publicIPAddress\": \"4.158.64.156\",\r\n \"publicFQDN\": \"dns16cecb32-cd1b-4286-a32d-e30dab79f036-azurebatch-cloudservice.uksouth.cloudapp.azure.com\",\r\n \"frontendPort\": 50001,\r\n \"backendPort\": 22\r\n }\r\n ]\r\n },\r\n \"virtualMachineInfo\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": \"20.04.202403190\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"tvmps_d521d51df616c06eaf15851d49fef5da4ae7125fcfe8321328de4bf4010c2406_d\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/noderemoteloginpool/nodes/tvmps_d521d51df616c06eaf15851d49fef5da4ae7125fcfe8321328de4bf4010c2406_d\",\r\n \"state\": \"creating\",\r\n \"schedulingState\": \"enabled\",\r\n \"stateTransitionTime\": \"2024-03-22T18:53:24.7205343Z\",\r\n \"allocationTime\": \"2024-03-22T18:53:24.7205462Z\",\r\n \"ipAddress\": \"10.0.0.4\",\r\n \"affinityId\": \"TVM:tvmps_d521d51df616c06eaf15851d49fef5da4ae7125fcfe8321328de4bf4010c2406_d\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"totalTasksRun\": 0,\r\n \"totalTasksSucceeded\": 0,\r\n \"runningTasksCount\": 0,\r\n \"runningTaskSlotsCount\": 0,\r\n \"isDedicated\": true,\r\n \"endpointConfiguration\": {\r\n \"inboundEndpoints\": [\r\n {\r\n \"name\": \"SSHRule.0\",\r\n \"protocol\": \"tcp\",\r\n \"publicIPAddress\": \"4.158.64.156\",\r\n \"publicFQDN\": \"dns16cecb32-cd1b-4286-a32d-e30dab79f036-azurebatch-cloudservice.uksouth.cloudapp.azure.com\",\r\n \"frontendPort\": 50000,\r\n \"backendPort\": 22\r\n }\r\n ]\r\n },\r\n \"virtualMachineInfo\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": \"20.04.202403190\"\r\n }\r\n }\r\n }\r\n ]\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/testIaasPool/nodes/tvmps_dab0d74aeac5bae0c2175d1eb1ac01e7bd02cece885de1af52cbbd2750b66828_d?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RJYWFzUG9vbC9ub2Rlcy90dm1wc19kYWIwZDc0YWVhYzViYWUwYzIxNzVkMWViMWFjMDFlN2JkMDJjZWNlODg1ZGUxYWY1MmNiYmQyNzUwYjY2ODI4X2Q/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/pools/noderemoteloginpool/nodes/tvmps_51b0e6a874e81f3f415febc02d26879a7b11be03927c7528bf05f43bfa2df272_d?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL25vZGVyZW1vdGVsb2dpbnBvb2wvbm9kZXMvdHZtcHNfNTFiMGU2YTg3NGU4MWYzZjQxNWZlYmMwMmQyNjg3OWE3YjExYmUwMzkyN2M3NTI4YmYwNWY0M2JmYTJkZjI3Ml9kP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "3a84d6ae-5881-482e-8f22-85b6f03337b4" + "b33de1a3-ed3c-42e9-a3ab-82eb89211f16" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:23:16 GMT" + "Fri, 22 Mar 2024 18:53:33 GMT" ], "x-ms-client-request-id": [ - "10743cf3-3492-43b2-a39d-735ff0fd18f7" + "fb774575-6792-40f4-9367-4f08504a23de" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -89,7 +562,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "a633b32a-c51c-4410-9c14-b3204634a6e2" + "daa31cd3-1430-4f4e-af1f-34c6052b4cc4" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -101,37 +574,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:23:17 GMT" + "Fri, 22 Mar 2024 18:53:33 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_dab0d74aeac5bae0c2175d1eb1ac01e7bd02cece885de1af52cbbd2750b66828_d\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/testIaasPool/nodes/tvmps_dab0d74aeac5bae0c2175d1eb1ac01e7bd02cece885de1af52cbbd2750b66828_d\",\r\n \"state\": \"idle\",\r\n \"schedulingState\": \"enabled\",\r\n \"stateTransitionTime\": \"2023-06-13T07:47:21.112453Z\",\r\n \"lastBootTime\": \"2023-06-13T07:47:20.946829Z\",\r\n \"allocationTime\": \"2023-06-13T07:45:56.002124Z\",\r\n \"ipAddress\": \"10.0.0.4\",\r\n \"affinityId\": \"TVM:tvmps_dab0d74aeac5bae0c2175d1eb1ac01e7bd02cece885de1af52cbbd2750b66828_d\",\r\n \"vmSize\": \"standard_a1_v2\",\r\n \"totalTasksRun\": 0,\r\n \"totalTasksSucceeded\": 0,\r\n \"runningTasksCount\": 0,\r\n \"runningTaskSlotsCount\": 0,\r\n \"certificateReferences\": [],\r\n \"isDedicated\": true,\r\n \"endpointConfiguration\": {\r\n \"inboundEndpoints\": [\r\n {\r\n \"name\": \"SSHRule.0\",\r\n \"protocol\": \"tcp\",\r\n \"publicIPAddress\": \"20.24.248.73\",\r\n \"publicFQDN\": \"dnsf53613d2-3f73-4e1d-ab81-f0623cdc01ce-azurebatch-cloudservice.eastasia.cloudapp.azure.com\",\r\n \"frontendPort\": 50000,\r\n \"backendPort\": 22\r\n }\r\n ]\r\n },\r\n \"nodeAgentInfo\": {\r\n \"lastUpdateTime\": \"2023-06-13T07:47:20.946829Z\",\r\n \"version\": \"1.10.0\"\r\n },\r\n \"virtualMachineInfo\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-jammy\",\r\n \"sku\": \"22_04-LTS\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": \"22.04.202306010\"\r\n }\r\n }\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_51b0e6a874e81f3f415febc02d26879a7b11be03927c7528bf05f43bfa2df272_d\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/noderemoteloginpool/nodes/tvmps_51b0e6a874e81f3f415febc02d26879a7b11be03927c7528bf05f43bfa2df272_d\",\r\n \"state\": \"creating\",\r\n \"schedulingState\": \"enabled\",\r\n \"stateTransitionTime\": \"2024-03-22T18:53:24.7205876Z\",\r\n \"allocationTime\": \"2024-03-22T18:53:24.7205921Z\",\r\n \"ipAddress\": \"10.0.0.5\",\r\n \"affinityId\": \"TVM:tvmps_51b0e6a874e81f3f415febc02d26879a7b11be03927c7528bf05f43bfa2df272_d\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"totalTasksRun\": 0,\r\n \"totalTasksSucceeded\": 0,\r\n \"runningTasksCount\": 0,\r\n \"runningTaskSlotsCount\": 0,\r\n \"isDedicated\": true,\r\n \"endpointConfiguration\": {\r\n \"inboundEndpoints\": [\r\n {\r\n \"name\": \"SSHRule.1\",\r\n \"protocol\": \"tcp\",\r\n \"publicIPAddress\": \"4.158.64.156\",\r\n \"publicFQDN\": \"dns16cecb32-cd1b-4286-a32d-e30dab79f036-azurebatch-cloudservice.uksouth.cloudapp.azure.com\",\r\n \"frontendPort\": 50001,\r\n \"backendPort\": 22\r\n }\r\n ]\r\n },\r\n \"virtualMachineInfo\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": \"20.04.202403190\"\r\n }\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/testIaasPool/nodes/tvmps_dab0d74aeac5bae0c2175d1eb1ac01e7bd02cece885de1af52cbbd2750b66828_d/remoteloginsettings?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RJYWFzUG9vbC9ub2Rlcy90dm1wc19kYWIwZDc0YWVhYzViYWUwYzIxNzVkMWViMWFjMDFlN2JkMDJjZWNlODg1ZGUxYWY1MmNiYmQyNzUwYjY2ODI4X2QvcmVtb3RlbG9naW5zZXR0aW5ncz9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjA=", + "RequestUri": "/pools/noderemoteloginpool/nodes/tvmps_51b0e6a874e81f3f415febc02d26879a7b11be03927c7528bf05f43bfa2df272_d/remoteloginsettings?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL25vZGVyZW1vdGVsb2dpbnBvb2wvbm9kZXMvdHZtcHNfNTFiMGU2YTg3NGU4MWYzZjQxNWZlYmMwMmQyNjg3OWE3YjExYmUwMzkyN2M3NTI4YmYwNWY0M2JmYTJkZjI3Ml9kL3JlbW90ZWxvZ2luc2V0dGluZ3M/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "3bc81632-8dbb-48e1-8c91-6aad487e9b5b" + "5622be71-d5d0-4ab4-85f2-1576d63deb79" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:23:16 GMT" + "Fri, 22 Mar 2024 18:53:34 GMT" ], "x-ms-client-request-id": [ - "10743cf3-3492-43b2-a39d-735ff0fd18f7" + "fb774575-6792-40f4-9367-4f08504a23de" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -144,7 +617,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "1ff3c092-401d-4e5e-bb20-f4d83e7e7eeb" + "bf5a326d-55b9-4a49-a8f6-b174df98d20c" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -156,24 +629,24 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/pools/testIaasPool/nodes/tvmps_dab0d74aeac5bae0c2175d1eb1ac01e7bd02cece885de1af52cbbd2750b66828_d/remoteloginsettings" + "https://billstestba24326.uksouth.batch.azure.com/pools/noderemoteloginpool/nodes/tvmps_51b0e6a874e81f3f415febc02d26879a7b11be03927c7528bf05f43bfa2df272_d/remoteloginsettings" ], "Date": [ - "Fri, 16 Jun 2023 07:23:17 GMT" + "Fri, 22 Mar 2024 18:53:34 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.RemoteLoginSettings\",\r\n \"remoteLoginIPAddress\": \"20.24.248.73\",\r\n \"remoteLoginPort\": 50000\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.RemoteLoginSettings\",\r\n \"remoteLoginIPAddress\": \"4.158.64.156\",\r\n \"remoteLoginPort\": 50001\r\n}", "StatusCode": 200 } ], "Names": {}, "Variables": { - "SubscriptionId": "21abd678-18c5-4660-9fdd-8c5ba6b6fe1f", - "AZURE_BATCH_ACCOUNT": "hoppeeastasia2", - "AZURE_BATCH_ENDPOINT": "https://hoppeeastasia2.eastasia.batch.azure.com", - "AZURE_BATCH_RESOURCE_GROUP": "123" + "SubscriptionId": "6602ac9a-5dad-41bd-a792-592c704b6a31", + "AZURE_BATCH_ACCOUNT": "billstestba24326", + "AZURE_BATCH_ENDPOINT": "https://billstestba24326.uksouth.batch.azure.com", + "AZURE_BATCH_RESOURCE_GROUP": "automation" } } \ No newline at end of file diff --git a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ComputeNodeTests/TestRebootAndReimageComputeNode.json b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ComputeNodeTests/TestRebootAndReimageComputeNode.json index b3198c6774f3..d1997a9b88b8 100644 --- a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ComputeNodeTests/TestRebootAndReimageComputeNode.json +++ b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ComputeNodeTests/TestRebootAndReimageComputeNode.json @@ -1,27 +1,613 @@ { "Entries": [ { - "RequestUri": "/pools/testPool/nodes?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", + "RequestUri": "/pools?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", + "RequestMethod": "POST", + "RequestHeaders": { + "client-request-id": [ + "5664ecaa-ba13-470e-acab-87f4167db384" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 18:53:35 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; charset=utf-8" + ], + "Content-Length": [ + "522" + ] + }, + "RequestBody": "{\r\n \"id\": \"rebootandreimagenodepool\",\r\n \"vmSize\": \"STANDARD_D2S_V3\",\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"zonal\"\r\n }\r\n },\r\n \"targetDedicatedNodes\": 2,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableInterNodeCommunication\": false,\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "0x8DC4AA161958E79" + ], + "Location": [ + "https://billstestba24326.uksouth.batch.azure.com/pools/rebootandreimagenodepool" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "17d3dd3b-9f9d-4f49-8383-401cec8c1778" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "DataServiceId": [ + "https://billstestba24326.uksouth.batch.azure.com/pools/rebootandreimagenodepool" + ], + "Date": [ + "Fri, 22 Mar 2024 18:53:36 GMT" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 18:53:36 GMT" + ] + }, + "ResponseBody": "", + "StatusCode": 201 + }, + { + "RequestUri": "/pools/rebootandreimagenodepool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3JlYm9vdGFuZHJlaW1hZ2Vub2RlcG9vbD9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "66a07e7f-7c2b-43b1-a9f1-2c044457cc54" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 18:53:36 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "0x8DC4AA161958E79" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "9d1ffb8f-ab8b-4fcf-81dc-dac5bcbcc008" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 18:53:36 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 18:53:36 GMT" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"rebootandreimagenodepool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/rebootandreimagenodepool\",\r\n \"eTag\": \"0x8DC4AA161958E79\",\r\n \"lastModified\": \"2024-03-22T18:53:36.7149177Z\",\r\n \"creationTime\": \"2024-03-22T18:53:36.7149162Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T18:53:36.7149162Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T18:53:36.7149178Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/pools/rebootandreimagenodepool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3JlYm9vdGFuZHJlaW1hZ2Vub2RlcG9vbD9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "ec61881f-09d9-4c08-9c51-bc00f94e7f44" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 18:53:41 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "0x8DC4AA161958E79" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "d794480b-5701-4bc8-9308-e7e7343bc8f5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 18:53:42 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 18:53:36 GMT" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"rebootandreimagenodepool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/rebootandreimagenodepool\",\r\n \"eTag\": \"0x8DC4AA161958E79\",\r\n \"lastModified\": \"2024-03-22T18:53:36.7149177Z\",\r\n \"creationTime\": \"2024-03-22T18:53:36.7149162Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T18:53:36.7149162Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T18:53:36.7149178Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/pools/rebootandreimagenodepool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3JlYm9vdGFuZHJlaW1hZ2Vub2RlcG9vbD9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "8dbaebfa-8b08-431e-b989-59962efb9ac8" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 18:53:47 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "0x8DC4AA161958E79" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "ea037470-a009-4510-a325-88ba66dd0326" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 18:53:47 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 18:53:36 GMT" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"rebootandreimagenodepool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/rebootandreimagenodepool\",\r\n \"eTag\": \"0x8DC4AA161958E79\",\r\n \"lastModified\": \"2024-03-22T18:53:36.7149177Z\",\r\n \"creationTime\": \"2024-03-22T18:53:36.7149162Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T18:53:36.7149162Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T18:53:36.7149178Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/pools/rebootandreimagenodepool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3JlYm9vdGFuZHJlaW1hZ2Vub2RlcG9vbD9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "ca49599a-f1e6-4864-a95d-03c7345ec96c" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 18:53:52 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "0x8DC4AA161958E79" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "7eebcf12-d2d0-4d18-9a0e-f71ea60d61a4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 18:53:52 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 18:53:36 GMT" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"rebootandreimagenodepool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/rebootandreimagenodepool\",\r\n \"eTag\": \"0x8DC4AA161958E79\",\r\n \"lastModified\": \"2024-03-22T18:53:36.7149177Z\",\r\n \"creationTime\": \"2024-03-22T18:53:36.7149162Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T18:53:36.7149162Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T18:53:36.7149178Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/pools/rebootandreimagenodepool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3JlYm9vdGFuZHJlaW1hZ2Vub2RlcG9vbD9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "cdf8f89c-0136-4832-88b2-444ad5b71ccb" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 18:53:57 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "0x8DC4AA161958E79" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "105847d4-62bd-4b56-90f8-30a35e163c91" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 18:53:57 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 18:53:36 GMT" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"rebootandreimagenodepool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/rebootandreimagenodepool\",\r\n \"eTag\": \"0x8DC4AA161958E79\",\r\n \"lastModified\": \"2024-03-22T18:53:36.7149177Z\",\r\n \"creationTime\": \"2024-03-22T18:53:36.7149162Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T18:53:36.7149162Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T18:53:36.7149178Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/pools/rebootandreimagenodepool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3JlYm9vdGFuZHJlaW1hZ2Vub2RlcG9vbD9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "52f88bd4-b5c7-4248-a877-43ca70533c7a" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 18:54:02 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "0x8DC4AA161958E79" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "27bc912d-4025-4310-ab75-e57b4a85c9e7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 18:54:03 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 18:53:36 GMT" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"rebootandreimagenodepool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/rebootandreimagenodepool\",\r\n \"eTag\": \"0x8DC4AA161958E79\",\r\n \"lastModified\": \"2024-03-22T18:53:36.7149177Z\",\r\n \"creationTime\": \"2024-03-22T18:53:36.7149162Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T18:53:36.7149162Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T18:53:36.7149178Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/pools/rebootandreimagenodepool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3JlYm9vdGFuZHJlaW1hZ2Vub2RlcG9vbD9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "f92a31e3-782d-4212-8092-d43701d8e82d" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 18:54:08 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "0x8DC4AA161958E79" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "0fd174fb-5162-4d1b-9977-c246532ca77b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 18:54:08 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 18:53:36 GMT" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"rebootandreimagenodepool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/rebootandreimagenodepool\",\r\n \"eTag\": \"0x8DC4AA161958E79\",\r\n \"lastModified\": \"2024-03-22T18:53:36.7149177Z\",\r\n \"creationTime\": \"2024-03-22T18:53:36.7149162Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T18:53:36.7149162Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T18:53:36.7149178Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/pools/rebootandreimagenodepool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3JlYm9vdGFuZHJlaW1hZ2Vub2RlcG9vbD9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "111de860-f441-4e12-8b15-cac92f4fda59" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 18:54:13 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "0x8DC4AA161958E79" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "517ba9ff-6d73-4bd6-a179-012a09fd2a0a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 18:54:12 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 18:53:36 GMT" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"rebootandreimagenodepool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/rebootandreimagenodepool\",\r\n \"eTag\": \"0x8DC4AA161958E79\",\r\n \"lastModified\": \"2024-03-22T18:53:36.7149177Z\",\r\n \"creationTime\": \"2024-03-22T18:53:36.7149162Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T18:53:36.7149162Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T18:53:36.7149178Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/pools/rebootandreimagenodepool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3JlYm9vdGFuZHJlaW1hZ2Vub2RlcG9vbD9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "042c79fb-ecf1-4eb0-b256-aa04ae3aeb09" + "3004b379-bacd-44b2-aad5-da4db9b4f364" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:23:19 GMT" + "Fri, 22 Mar 2024 18:54:18 GMT" ], - "x-ms-client-request-id": [ - "89274493-1512-4e6a-8e97-a69d8f506fdf" + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "0x8DC4AA161958E79" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "c2bacd52-f8b6-4621-b9ec-aaea737b88c8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 18:54:18 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 18:53:36 GMT" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"rebootandreimagenodepool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/rebootandreimagenodepool\",\r\n \"eTag\": \"0x8DC4AA161958E79\",\r\n \"lastModified\": \"2024-03-22T18:53:36.7149177Z\",\r\n \"creationTime\": \"2024-03-22T18:53:36.7149162Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T18:53:36.7149162Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T18:53:36.7149178Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/pools/rebootandreimagenodepool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3JlYm9vdGFuZHJlaW1hZ2Vub2RlcG9vbD9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "6428b6ab-eb4b-4594-966f-23f9025381e9" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 18:54:23 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -30,11 +616,14 @@ "Transfer-Encoding": [ "chunked" ], + "ETag": [ + "0x8DC4AA161958E79" + ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "73d36499-e31f-413a-aebc-6aaa82554f8d" + "6d8dd168-a629-4c34-b323-fa27ddea4de5" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -46,37 +635,153 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:23:19 GMT" + "Fri, 22 Mar 2024 18:54:23 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 18:53:36 GMT" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes\",\r\n \"value\": [\r\n {\r\n \"id\": \"tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"state\": \"idle\",\r\n \"schedulingState\": \"enabled\",\r\n \"stateTransitionTime\": \"2023-06-16T06:54:12.745569Z\",\r\n \"lastBootTime\": \"2023-06-16T06:54:12.462819Z\",\r\n \"allocationTime\": \"2023-06-13T07:46:20.7222354Z\",\r\n \"ipAddress\": \"10.218.0.6\",\r\n \"affinityId\": \"TVM:tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"totalTasksRun\": 9,\r\n \"totalTasksSucceeded\": 6,\r\n \"runningTasksCount\": 0,\r\n \"runningTaskSlotsCount\": 0,\r\n \"recentTasks\": [],\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"pool\",\r\n \"elevationLevel\": \"nonadmin\"\r\n }\r\n },\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": true\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2023-06-16T06:54:12.651819Z\",\r\n \"endTime\": \"2023-06-16T06:54:12.729951Z\",\r\n \"exitCode\": 0,\r\n \"result\": \"success\",\r\n \"retryCount\": 0\r\n },\r\n \"certificateReferences\": [],\r\n \"isDedicated\": true,\r\n \"endpointConfiguration\": {\r\n \"inboundEndpoints\": [\r\n {\r\n \"name\": \"Microsoft.WindowsAzure.Plugins.RemoteForwarder.RdpInput\",\r\n \"protocol\": \"tcp\",\r\n \"frontendPort\": 3389,\r\n \"backendPort\": 20000\r\n }\r\n ]\r\n },\r\n \"nodeAgentInfo\": {\r\n \"lastUpdateTime\": \"2023-06-13T07:53:19.121974Z\",\r\n \"version\": \"1.10.0\"\r\n },\r\n \"virtualMachineInfo\": {}\r\n },\r\n {\r\n \"id\": \"tvmps_c3cdeb8c344b8b5cca4c1052f8fd5c239f09cffd64837afc6cbb2e073e15dab3_d\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/testPool/nodes/tvmps_c3cdeb8c344b8b5cca4c1052f8fd5c239f09cffd64837afc6cbb2e073e15dab3_d\",\r\n \"state\": \"idle\",\r\n \"schedulingState\": \"enabled\",\r\n \"stateTransitionTime\": \"2023-06-16T07:06:23.603746Z\",\r\n \"lastBootTime\": \"2023-06-16T06:55:27.593709Z\",\r\n \"allocationTime\": \"2023-06-13T07:46:20.7222354Z\",\r\n \"ipAddress\": \"10.218.0.5\",\r\n \"affinityId\": \"TVM:tvmps_c3cdeb8c344b8b5cca4c1052f8fd5c239f09cffd64837afc6cbb2e073e15dab3_d\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"totalTasksRun\": 7,\r\n \"totalTasksSucceeded\": 3,\r\n \"runningTasksCount\": 0,\r\n \"runningTaskSlotsCount\": 0,\r\n \"recentTasks\": [\r\n {\r\n \"taskUrl\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobs/testTerminateTaskJob/tasks/testTask2\",\r\n \"jobId\": \"testTerminateTaskJob\",\r\n \"taskId\": \"testTask2\",\r\n \"taskState\": \"completed\",\r\n \"executionInfo\": {\r\n \"startTime\": \"2023-06-16T07:06:23.080101Z\",\r\n \"endTime\": \"2023-06-16T07:06:23.572482Z\",\r\n \"exitCode\": -1073741510,\r\n \"failureInfo\": {\r\n \"category\": \"UserError\",\r\n \"code\": \"TaskEnded\",\r\n \"message\": \"Task Was Ended by User Request\",\r\n \"details\": [\r\n {\r\n \"name\": \"AdditionalErrorCode\",\r\n \"value\": \"FailureExitCode\"\r\n }\r\n ]\r\n },\r\n \"result\": \"failure\",\r\n \"retryCount\": 0,\r\n \"requeueCount\": 0\r\n }\r\n }\r\n ],\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"pool\",\r\n \"elevationLevel\": \"nonadmin\"\r\n }\r\n },\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": true\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2023-06-16T06:55:28.965368Z\",\r\n \"endTime\": \"2023-06-16T06:55:29.07475Z\",\r\n \"exitCode\": 0,\r\n \"result\": \"success\",\r\n \"retryCount\": 0\r\n },\r\n \"certificateReferences\": [],\r\n \"isDedicated\": true,\r\n \"endpointConfiguration\": {\r\n \"inboundEndpoints\": [\r\n {\r\n \"name\": \"Microsoft.WindowsAzure.Plugins.RemoteForwarder.RdpInput\",\r\n \"protocol\": \"tcp\",\r\n \"frontendPort\": 3389,\r\n \"backendPort\": 20000\r\n }\r\n ]\r\n },\r\n \"nodeAgentInfo\": {\r\n \"lastUpdateTime\": \"2023-06-13T07:48:55.051071Z\",\r\n \"version\": \"1.10.0\"\r\n },\r\n \"virtualMachineInfo\": {}\r\n },\r\n {\r\n \"id\": \"tvmps_cf431502d0b7a008b6d2fc36bf12888efcbda4c9272347c458f1792e50276106_d\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/testPool/nodes/tvmps_cf431502d0b7a008b6d2fc36bf12888efcbda4c9272347c458f1792e50276106_d\",\r\n \"state\": \"idle\",\r\n \"schedulingState\": \"enabled\",\r\n \"stateTransitionTime\": \"2023-06-16T07:19:26.25374Z\",\r\n \"lastBootTime\": \"2023-06-13T07:52:52.129232Z\",\r\n \"allocationTime\": \"2023-06-13T07:46:20.7222354Z\",\r\n \"ipAddress\": \"10.218.0.4\",\r\n \"affinityId\": \"TVM:tvmps_cf431502d0b7a008b6d2fc36bf12888efcbda4c9272347c458f1792e50276106_d\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"totalTasksRun\": 8,\r\n \"totalTasksSucceeded\": 2,\r\n \"runningTasksCount\": 0,\r\n \"runningTaskSlotsCount\": 0,\r\n \"recentTasks\": [\r\n {\r\n \"taskUrl\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobs/testJobCompletesWhenTaskFails/tasks/taskId-1\",\r\n \"jobId\": \"testJobCompletesWhenTaskFails\",\r\n \"taskId\": \"taskId-1\",\r\n \"taskState\": \"completed\",\r\n \"executionInfo\": {\r\n \"startTime\": \"2023-06-16T07:19:26.144372Z\",\r\n \"endTime\": \"2023-06-16T07:19:26.222489Z\",\r\n \"exitCode\": 3,\r\n \"failureInfo\": {\r\n \"category\": \"UserError\",\r\n \"code\": \"FailureExitCode\",\r\n \"message\": \"The task exited with an exit code representing a failure\",\r\n \"details\": [\r\n {\r\n \"name\": \"Message\",\r\n \"value\": \"The task process exited with an unexpected exit code\"\r\n },\r\n {\r\n \"name\": \"AdditionalErrorCode\",\r\n \"value\": \"FailureExitCode\"\r\n }\r\n ]\r\n },\r\n \"result\": \"failure\",\r\n \"retryCount\": 0,\r\n \"requeueCount\": 0\r\n }\r\n }\r\n ],\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"pool\",\r\n \"elevationLevel\": \"nonadmin\"\r\n }\r\n },\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": true\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2023-06-13T07:52:53.742761Z\",\r\n \"endTime\": \"2023-06-13T07:52:53.805263Z\",\r\n \"exitCode\": 0,\r\n \"result\": \"success\",\r\n \"retryCount\": 0\r\n },\r\n \"certificateReferences\": [],\r\n \"isDedicated\": true,\r\n \"endpointConfiguration\": {\r\n \"inboundEndpoints\": [\r\n {\r\n \"name\": \"Microsoft.WindowsAzure.Plugins.RemoteForwarder.RdpInput\",\r\n \"protocol\": \"tcp\",\r\n \"frontendPort\": 3389,\r\n \"backendPort\": 20000\r\n }\r\n ]\r\n },\r\n \"nodeAgentInfo\": {\r\n \"lastUpdateTime\": \"2023-06-13T07:52:52.129232Z\",\r\n \"version\": \"1.10.0\"\r\n },\r\n \"virtualMachineInfo\": {}\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"rebootandreimagenodepool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/rebootandreimagenodepool\",\r\n \"eTag\": \"0x8DC4AA161958E79\",\r\n \"lastModified\": \"2024-03-22T18:53:36.7149177Z\",\r\n \"creationTime\": \"2024-03-22T18:53:36.7149162Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T18:53:36.7149162Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T18:53:36.7149178Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d?api-version=2023-05-01.17.0&$select=id%2Cstate", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bXBzXzY3NTkwZjZmZmRjMzc4OTFhYTA5ZGUwN2E0ZDE0ZTUxM2NlNzVmMmU5M2M3M2Y3ZjU1NmNkZjAwNzEwZDdiMmRfZD9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjAmJHNlbGVjdD1pZCUyQ3N0YXRl", + "RequestUri": "/pools/rebootandreimagenodepool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3JlYm9vdGFuZHJlaW1hZ2Vub2RlcG9vbD9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "acd7c9fb-0ea1-4c4d-874d-69a41cf2d58e" + "2ee12fd5-b67d-4327-b120-729c3d74703d" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:23:19 GMT" + "Fri, 22 Mar 2024 18:54:29 GMT" ], - "x-ms-client-request-id": [ - "b2c47ee5-d3ac-4b79-baaf-a5412715f7fe" + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "0x8DC4AA161958E79" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "eb7bd34c-b9e3-44e4-818a-304007c8888e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 18:54:28 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 18:53:36 GMT" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"rebootandreimagenodepool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/rebootandreimagenodepool\",\r\n \"eTag\": \"0x8DC4AA161958E79\",\r\n \"lastModified\": \"2024-03-22T18:53:36.7149177Z\",\r\n \"creationTime\": \"2024-03-22T18:53:36.7149162Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T18:53:36.7149162Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T18:53:36.7149178Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/pools/rebootandreimagenodepool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3JlYm9vdGFuZHJlaW1hZ2Vub2RlcG9vbD9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "bf00734f-be8a-4875-a7cd-34d24786dc7d" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 18:54:34 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "0x8DC4AA161958E79" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "75696321-8987-4106-9364-cea732b289a6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 18:54:33 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 18:53:36 GMT" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"rebootandreimagenodepool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/rebootandreimagenodepool\",\r\n \"eTag\": \"0x8DC4AA161958E79\",\r\n \"lastModified\": \"2024-03-22T18:53:36.7149177Z\",\r\n \"creationTime\": \"2024-03-22T18:53:36.7149162Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T18:53:36.7149162Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T18:53:36.7149178Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/pools/rebootandreimagenodepool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3JlYm9vdGFuZHJlaW1hZ2Vub2RlcG9vbD9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "39bdd424-d88b-4f1d-8136-f1e5cf46763c" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 18:54:39 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -85,11 +790,14 @@ "Transfer-Encoding": [ "chunked" ], + "ETag": [ + "0x8DC4AA161958E79" + ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "0430d870-059e-4b66-9c19-96849b10ef64" + "1f90beb9-b582-4fb9-a4d1-67dbaaed7a49" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -101,37 +809,40 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:23:20 GMT" + "Fri, 22 Mar 2024 18:54:39 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 18:53:36 GMT" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"state\": \"idle\",\r\n \"virtualMachineInfo\": {}\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"rebootandreimagenodepool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/rebootandreimagenodepool\",\r\n \"eTag\": \"0x8DC4AA161958E79\",\r\n \"lastModified\": \"2024-03-22T18:53:36.7149177Z\",\r\n \"creationTime\": \"2024-03-22T18:53:36.7149162Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T18:53:36.7149162Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T18:54:38.95802Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 2,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\",\r\n \"currentNodeCommunicationMode\": \"classic\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/testPool/nodes/tvmps_c3cdeb8c344b8b5cca4c1052f8fd5c239f09cffd64837afc6cbb2e073e15dab3_d?api-version=2023-05-01.17.0&$select=id%2Cstate", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bXBzX2MzY2RlYjhjMzQ0YjhiNWNjYTRjMTA1MmY4ZmQ1YzIzOWYwOWNmZmQ2NDgzN2FmYzZjYmIyZTA3M2UxNWRhYjNfZD9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjAmJHNlbGVjdD1pZCUyQ3N0YXRl", + "RequestUri": "/pools/rebootandreimagenodepool/nodes?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3JlYm9vdGFuZHJlaW1hZ2Vub2RlcG9vbC9ub2Rlcz9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "9b256dd5-1b08-4af8-8f21-f8508c93d2e1" + "c9061b50-24a7-4bc4-a7a2-b821c090932d" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:23:19 GMT" + "Fri, 22 Mar 2024 18:54:40 GMT" ], "x-ms-client-request-id": [ - "2f5455da-c708-4536-bf9d-b44b2fb240d7" + "0e985179-c88a-4476-a842-953dce5a0350" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -144,7 +855,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "2b8e9185-a1e2-4f34-bd58-5a50943b99ab" + "e340bd50-c9a9-4707-9905-c2d11eb72c14" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -156,37 +867,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:23:20 GMT" + "Fri, 22 Mar 2024 18:54:40 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_c3cdeb8c344b8b5cca4c1052f8fd5c239f09cffd64837afc6cbb2e073e15dab3_d\",\r\n \"state\": \"idle\",\r\n \"virtualMachineInfo\": {}\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#nodes\",\r\n \"value\": [\r\n {\r\n \"id\": \"tvmps_92df7bd5257b1a77709a19e0b030fc6e9c508c40d741157e112acc7899d482e3_d\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/rebootandreimagenodepool/nodes/tvmps_92df7bd5257b1a77709a19e0b030fc6e9c508c40d741157e112acc7899d482e3_d\",\r\n \"state\": \"creating\",\r\n \"schedulingState\": \"enabled\",\r\n \"stateTransitionTime\": \"2024-03-22T18:54:38.1360361Z\",\r\n \"allocationTime\": \"2024-03-22T18:54:38.1360407Z\",\r\n \"ipAddress\": \"10.0.0.5\",\r\n \"affinityId\": \"TVM:tvmps_92df7bd5257b1a77709a19e0b030fc6e9c508c40d741157e112acc7899d482e3_d\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"totalTasksRun\": 0,\r\n \"totalTasksSucceeded\": 0,\r\n \"runningTasksCount\": 0,\r\n \"runningTaskSlotsCount\": 0,\r\n \"isDedicated\": true,\r\n \"endpointConfiguration\": {\r\n \"inboundEndpoints\": [\r\n {\r\n \"name\": \"SSHRule.1\",\r\n \"protocol\": \"tcp\",\r\n \"publicIPAddress\": \"4.234.75.78\",\r\n \"publicFQDN\": \"dnsa818669e-7bd1-47bd-90ff-8ab151716f28-azurebatch-cloudservice.uksouth.cloudapp.azure.com\",\r\n \"frontendPort\": 50001,\r\n \"backendPort\": 22\r\n }\r\n ]\r\n },\r\n \"virtualMachineInfo\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": \"20.04.202403190\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"tvmps_956baa36e8a3c1c639402aace7cefb76a715dd3dc1d6da612323ac23a08921a0_d\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/rebootandreimagenodepool/nodes/tvmps_956baa36e8a3c1c639402aace7cefb76a715dd3dc1d6da612323ac23a08921a0_d\",\r\n \"state\": \"creating\",\r\n \"schedulingState\": \"enabled\",\r\n \"stateTransitionTime\": \"2024-03-22T18:54:38.1359828Z\",\r\n \"allocationTime\": \"2024-03-22T18:54:38.1359947Z\",\r\n \"ipAddress\": \"10.0.0.4\",\r\n \"affinityId\": \"TVM:tvmps_956baa36e8a3c1c639402aace7cefb76a715dd3dc1d6da612323ac23a08921a0_d\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"totalTasksRun\": 0,\r\n \"totalTasksSucceeded\": 0,\r\n \"runningTasksCount\": 0,\r\n \"runningTaskSlotsCount\": 0,\r\n \"isDedicated\": true,\r\n \"endpointConfiguration\": {\r\n \"inboundEndpoints\": [\r\n {\r\n \"name\": \"SSHRule.0\",\r\n \"protocol\": \"tcp\",\r\n \"publicIPAddress\": \"4.234.75.78\",\r\n \"publicFQDN\": \"dnsa818669e-7bd1-47bd-90ff-8ab151716f28-azurebatch-cloudservice.uksouth.cloudapp.azure.com\",\r\n \"frontendPort\": 50000,\r\n \"backendPort\": 22\r\n }\r\n ]\r\n },\r\n \"virtualMachineInfo\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": \"20.04.202403190\"\r\n }\r\n }\r\n }\r\n ]\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bXBzXzY3NTkwZjZmZmRjMzc4OTFhYTA5ZGUwN2E0ZDE0ZTUxM2NlNzVmMmU5M2M3M2Y3ZjU1NmNkZjAwNzEwZDdiMmRfZD9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjA=", + "RequestUri": "/pools/rebootandreimagenodepool/nodes/tvmps_92df7bd5257b1a77709a19e0b030fc6e9c508c40d741157e112acc7899d482e3_d?api-version=2024-02-01.19.0&$select=id%2Cstate", + "EncodedRequestUri": "L3Bvb2xzL3JlYm9vdGFuZHJlaW1hZ2Vub2RlcG9vbC9ub2Rlcy90dm1wc185MmRmN2JkNTI1N2IxYTc3NzA5YTE5ZTBiMDMwZmM2ZTljNTA4YzQwZDc0MTE1N2UxMTJhY2M3ODk5ZDQ4MmUzX2Q/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4wJiRzZWxlY3Q9aWQlMkNzdGF0ZQ==", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "6df6867a-46fb-4b4d-a2fe-b63532bc2185" + "c3a23b26-2ee0-4798-b329-658897ef4ed6" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:23:19 GMT" + "Fri, 22 Mar 2024 18:54:40 GMT" ], "x-ms-client-request-id": [ - "8b5a9086-e2fe-4abf-9cf5-44f69caa8523" + "fde47bbc-2ca5-4199-9511-a91620bbf1c0" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -199,7 +910,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "da058c83-ecc9-46df-b614-7902b4e8cd2d" + "31cbe75d-963f-43fc-89a6-c6d014855d70" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -211,37 +922,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:23:20 GMT" + "Fri, 22 Mar 2024 18:54:40 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"state\": \"idle\",\r\n \"schedulingState\": \"enabled\",\r\n \"stateTransitionTime\": \"2023-06-16T06:54:12.745569Z\",\r\n \"lastBootTime\": \"2023-06-16T06:54:12.462819Z\",\r\n \"allocationTime\": \"2023-06-13T07:46:20.7222354Z\",\r\n \"ipAddress\": \"10.218.0.6\",\r\n \"affinityId\": \"TVM:tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"totalTasksRun\": 9,\r\n \"totalTasksSucceeded\": 6,\r\n \"runningTasksCount\": 0,\r\n \"runningTaskSlotsCount\": 0,\r\n \"recentTasks\": [],\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"pool\",\r\n \"elevationLevel\": \"nonadmin\"\r\n }\r\n },\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": true\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2023-06-16T06:54:12.651819Z\",\r\n \"endTime\": \"2023-06-16T06:54:12.729951Z\",\r\n \"exitCode\": 0,\r\n \"result\": \"success\",\r\n \"retryCount\": 0\r\n },\r\n \"certificateReferences\": [],\r\n \"isDedicated\": true,\r\n \"endpointConfiguration\": {\r\n \"inboundEndpoints\": [\r\n {\r\n \"name\": \"Microsoft.WindowsAzure.Plugins.RemoteForwarder.RdpInput\",\r\n \"protocol\": \"tcp\",\r\n \"frontendPort\": 3389,\r\n \"backendPort\": 20000\r\n }\r\n ]\r\n },\r\n \"nodeAgentInfo\": {\r\n \"lastUpdateTime\": \"2023-06-13T07:53:19.121974Z\",\r\n \"version\": \"1.10.0\"\r\n },\r\n \"virtualMachineInfo\": {}\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_92df7bd5257b1a77709a19e0b030fc6e9c508c40d741157e112acc7899d482e3_d\",\r\n \"state\": \"creating\",\r\n \"virtualMachineInfo\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": \"20.04.202403190\"\r\n }\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bXBzXzY3NTkwZjZmZmRjMzc4OTFhYTA5ZGUwN2E0ZDE0ZTUxM2NlNzVmMmU5M2M3M2Y3ZjU1NmNkZjAwNzEwZDdiMmRfZD9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjA=", + "RequestUri": "/pools/rebootandreimagenodepool/nodes/tvmps_92df7bd5257b1a77709a19e0b030fc6e9c508c40d741157e112acc7899d482e3_d?api-version=2024-02-01.19.0&$select=id%2Cstate", + "EncodedRequestUri": "L3Bvb2xzL3JlYm9vdGFuZHJlaW1hZ2Vub2RlcG9vbC9ub2Rlcy90dm1wc185MmRmN2JkNTI1N2IxYTc3NzA5YTE5ZTBiMDMwZmM2ZTljNTA4YzQwZDc0MTE1N2UxMTJhY2M3ODk5ZDQ4MmUzX2Q/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4wJiRzZWxlY3Q9aWQlMkNzdGF0ZQ==", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "01490e95-3932-4eae-8705-f838cd95f895" + "3b08d5fd-afec-410a-8ace-04ab88af904e" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:23:20 GMT" + "Fri, 22 Mar 2024 18:54:46 GMT" ], "x-ms-client-request-id": [ - "44b40a57-1ec1-43b8-af6c-0f2f8427e61b" + "7f1054ce-0652-4ca7-809d-d354bf6a762b" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -254,7 +965,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "bb769a4e-fb1b-42ae-9858-e42c9839f371" + "fc46fde0-dc7e-4b7d-9006-26ac675a3632" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -266,47 +977,96 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:23:20 GMT" + "Fri, 22 Mar 2024 18:54:45 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"state\": \"rebooting\",\r\n \"schedulingState\": \"enabled\",\r\n \"stateTransitionTime\": \"2023-06-16T07:23:21.3771523Z\",\r\n \"lastBootTime\": \"2023-06-16T06:54:12.462819Z\",\r\n \"allocationTime\": \"2023-06-13T07:46:20.7222354Z\",\r\n \"ipAddress\": \"10.218.0.6\",\r\n \"affinityId\": \"TVM:tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"totalTasksRun\": 9,\r\n \"totalTasksSucceeded\": 6,\r\n \"runningTasksCount\": 0,\r\n \"runningTaskSlotsCount\": 0,\r\n \"recentTasks\": [],\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"pool\",\r\n \"elevationLevel\": \"nonadmin\"\r\n }\r\n },\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": true\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2023-06-16T06:54:12.651819Z\",\r\n \"endTime\": \"2023-06-16T06:54:12.729951Z\",\r\n \"exitCode\": 0,\r\n \"result\": \"success\",\r\n \"retryCount\": 0\r\n },\r\n \"certificateReferences\": [],\r\n \"isDedicated\": true,\r\n \"endpointConfiguration\": {\r\n \"inboundEndpoints\": [\r\n {\r\n \"name\": \"Microsoft.WindowsAzure.Plugins.RemoteForwarder.RdpInput\",\r\n \"protocol\": \"tcp\",\r\n \"frontendPort\": 3389,\r\n \"backendPort\": 20000\r\n }\r\n ]\r\n },\r\n \"nodeAgentInfo\": {\r\n \"lastUpdateTime\": \"2023-06-13T07:53:19.121974Z\",\r\n \"version\": \"1.10.0\"\r\n },\r\n \"virtualMachineInfo\": {}\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_92df7bd5257b1a77709a19e0b030fc6e9c508c40d741157e112acc7899d482e3_d\",\r\n \"state\": \"creating\",\r\n \"virtualMachineInfo\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": \"20.04.202403190\"\r\n }\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d/reboot?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bXBzXzY3NTkwZjZmZmRjMzc4OTFhYTA5ZGUwN2E0ZDE0ZTUxM2NlNzVmMmU5M2M3M2Y3ZjU1NmNkZjAwNzEwZDdiMmRfZC9yZWJvb3Q/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", - "RequestMethod": "POST", + "RequestUri": "/pools/rebootandreimagenodepool/nodes/tvmps_92df7bd5257b1a77709a19e0b030fc6e9c508c40d741157e112acc7899d482e3_d?api-version=2024-02-01.19.0&$select=id%2Cstate", + "EncodedRequestUri": "L3Bvb2xzL3JlYm9vdGFuZHJlaW1hZ2Vub2RlcG9vbC9ub2Rlcy90dm1wc185MmRmN2JkNTI1N2IxYTc3NzA5YTE5ZTBiMDMwZmM2ZTljNTA4YzQwZDc0MTE1N2UxMTJhY2M3ODk5ZDQ4MmUzX2Q/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4wJiRzZWxlY3Q9aWQlMkNzdGF0ZQ==", + "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "a9688eaa-7864-44cc-8321-d03db8c1785a" + "7e470434-bec5-42a0-8114-478f06878d6c" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:23:20 GMT" + "Fri, 22 Mar 2024 18:54:51 GMT" ], "x-ms-client-request-id": [ - "8b5a9086-e2fe-4abf-9cf5-44f69caa8523" + "735a5efe-42e0-4903-b61b-8febafbce39b" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "9e3fca9b-0e2d-4d1c-a4a7-f50b336a380d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 18:54:50 GMT" ], "Content-Type": [ - "application/json; odata=minimalmetadata; charset=utf-8" + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_92df7bd5257b1a77709a19e0b030fc6e9c508c40d741157e112acc7899d482e3_d\",\r\n \"state\": \"starting\",\r\n \"virtualMachineInfo\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": \"20.04.202403190\"\r\n }\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/pools/rebootandreimagenodepool/nodes/tvmps_92df7bd5257b1a77709a19e0b030fc6e9c508c40d741157e112acc7899d482e3_d?api-version=2024-02-01.19.0&$select=id%2Cstate", + "EncodedRequestUri": "L3Bvb2xzL3JlYm9vdGFuZHJlaW1hZ2Vub2RlcG9vbC9ub2Rlcy90dm1wc185MmRmN2JkNTI1N2IxYTc3NzA5YTE5ZTBiMDMwZmM2ZTljNTA4YzQwZDc0MTE1N2UxMTJhY2M3ODk5ZDQ4MmUzX2Q/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4wJiRzZWxlY3Q9aWQlMkNzdGF0ZQ==", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "aad613fe-4f56-4613-8c93-286f0a3f089a" ], - "Content-Length": [ - "39" + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 18:54:56 GMT" + ], + "x-ms-client-request-id": [ + "6b524cbd-a882-495a-8f56-39b52f5d703e" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" ] }, - "RequestBody": "{\r\n \"nodeRebootOption\": \"terminate\"\r\n}", + "RequestBody": "", "ResponseHeaders": { "Transfer-Encoding": [ "chunked" @@ -315,7 +1075,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "469d35d3-1d3e-4ef0-8195-aa1769a2e89d" + "67f111a4-db7d-44aa-880c-4ddef6b3d936" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -326,38 +1086,93 @@ "DataServiceVersion": [ "3.0" ], - "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d/reboot" + "Date": [ + "Fri, 22 Mar 2024 18:54:57 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_92df7bd5257b1a77709a19e0b030fc6e9c508c40d741157e112acc7899d482e3_d\",\r\n \"state\": \"idle\",\r\n \"virtualMachineInfo\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": \"20.04.202403190\"\r\n }\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/pools/rebootandreimagenodepool/nodes/tvmps_956baa36e8a3c1c639402aace7cefb76a715dd3dc1d6da612323ac23a08921a0_d?api-version=2024-02-01.19.0&$select=id%2Cstate", + "EncodedRequestUri": "L3Bvb2xzL3JlYm9vdGFuZHJlaW1hZ2Vub2RlcG9vbC9ub2Rlcy90dm1wc185NTZiYWEzNmU4YTNjMWM2Mzk0MDJhYWNlN2NlZmI3NmE3MTVkZDNkYzFkNmRhNjEyMzIzYWMyM2EwODkyMWEwX2Q/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4wJiRzZWxlY3Q9aWQlMkNzdGF0ZQ==", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "2f76fdd1-307b-4ed2-a08f-7b9da4711cce" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 18:54:56 GMT" + ], + "x-ms-client-request-id": [ + "f6bcf2b1-254b-4f17-b2ba-810a4505dc26" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "3a0a5f07-6fda-460f-b0d9-c8dc0a7f63c5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:23:20 GMT" + "Fri, 22 Mar 2024 18:54:57 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "", - "StatusCode": 202 + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_956baa36e8a3c1c639402aace7cefb76a715dd3dc1d6da612323ac23a08921a0_d\",\r\n \"state\": \"idle\",\r\n \"virtualMachineInfo\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": \"20.04.202403190\"\r\n }\r\n }\r\n}", + "StatusCode": 200 }, { - "RequestUri": "/pools/testPool/nodes/tvmps_c3cdeb8c344b8b5cca4c1052f8fd5c239f09cffd64837afc6cbb2e073e15dab3_d?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bXBzX2MzY2RlYjhjMzQ0YjhiNWNjYTRjMTA1MmY4ZmQ1YzIzOWYwOWNmZmQ2NDgzN2FmYzZjYmIyZTA3M2UxNWRhYjNfZD9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjA=", + "RequestUri": "/pools/rebootandreimagenodepool/nodes/tvmps_92df7bd5257b1a77709a19e0b030fc6e9c508c40d741157e112acc7899d482e3_d?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3JlYm9vdGFuZHJlaW1hZ2Vub2RlcG9vbC9ub2Rlcy90dm1wc185MmRmN2JkNTI1N2IxYTc3NzA5YTE5ZTBiMDMwZmM2ZTljNTA4YzQwZDc0MTE1N2UxMTJhY2M3ODk5ZDQ4MmUzX2Q/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "ddcd4c89-0066-4830-9c67-f4dbd1766f29" + "fa96ce75-b471-4318-ab9f-4ec976084748" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:23:20 GMT" + "Fri, 22 Mar 2024 18:54:57 GMT" ], "x-ms-client-request-id": [ - "55d7bf33-0595-4206-83e8-20c6beeaec92" + "417b3d06-da56-4101-8ada-18ef8115215a" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -370,7 +1185,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "b3e94de6-732c-46ed-bdb7-c2ad5a615450" + "5f40f419-e059-450c-9dcc-17c77a171f46" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -382,37 +1197,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:23:20 GMT" + "Fri, 22 Mar 2024 18:54:57 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_c3cdeb8c344b8b5cca4c1052f8fd5c239f09cffd64837afc6cbb2e073e15dab3_d\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/testPool/nodes/tvmps_c3cdeb8c344b8b5cca4c1052f8fd5c239f09cffd64837afc6cbb2e073e15dab3_d\",\r\n \"state\": \"idle\",\r\n \"schedulingState\": \"enabled\",\r\n \"stateTransitionTime\": \"2023-06-16T07:06:23.603746Z\",\r\n \"lastBootTime\": \"2023-06-16T06:55:27.593709Z\",\r\n \"allocationTime\": \"2023-06-13T07:46:20.7222354Z\",\r\n \"ipAddress\": \"10.218.0.5\",\r\n \"affinityId\": \"TVM:tvmps_c3cdeb8c344b8b5cca4c1052f8fd5c239f09cffd64837afc6cbb2e073e15dab3_d\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"totalTasksRun\": 7,\r\n \"totalTasksSucceeded\": 3,\r\n \"runningTasksCount\": 0,\r\n \"runningTaskSlotsCount\": 0,\r\n \"recentTasks\": [\r\n {\r\n \"taskUrl\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobs/testTerminateTaskJob/tasks/testTask2\",\r\n \"jobId\": \"testTerminateTaskJob\",\r\n \"taskId\": \"testTask2\",\r\n \"taskState\": \"completed\",\r\n \"executionInfo\": {\r\n \"startTime\": \"2023-06-16T07:06:23.080101Z\",\r\n \"endTime\": \"2023-06-16T07:06:23.572482Z\",\r\n \"exitCode\": -1073741510,\r\n \"failureInfo\": {\r\n \"category\": \"UserError\",\r\n \"code\": \"TaskEnded\",\r\n \"message\": \"Task Was Ended by User Request\",\r\n \"details\": [\r\n {\r\n \"name\": \"AdditionalErrorCode\",\r\n \"value\": \"FailureExitCode\"\r\n }\r\n ]\r\n },\r\n \"result\": \"failure\",\r\n \"retryCount\": 0,\r\n \"requeueCount\": 0\r\n }\r\n }\r\n ],\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"pool\",\r\n \"elevationLevel\": \"nonadmin\"\r\n }\r\n },\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": true\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2023-06-16T06:55:28.965368Z\",\r\n \"endTime\": \"2023-06-16T06:55:29.07475Z\",\r\n \"exitCode\": 0,\r\n \"result\": \"success\",\r\n \"retryCount\": 0\r\n },\r\n \"certificateReferences\": [],\r\n \"isDedicated\": true,\r\n \"endpointConfiguration\": {\r\n \"inboundEndpoints\": [\r\n {\r\n \"name\": \"Microsoft.WindowsAzure.Plugins.RemoteForwarder.RdpInput\",\r\n \"protocol\": \"tcp\",\r\n \"frontendPort\": 3389,\r\n \"backendPort\": 20000\r\n }\r\n ]\r\n },\r\n \"nodeAgentInfo\": {\r\n \"lastUpdateTime\": \"2023-06-13T07:48:55.051071Z\",\r\n \"version\": \"1.10.0\"\r\n },\r\n \"virtualMachineInfo\": {}\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_92df7bd5257b1a77709a19e0b030fc6e9c508c40d741157e112acc7899d482e3_d\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/rebootandreimagenodepool/nodes/tvmps_92df7bd5257b1a77709a19e0b030fc6e9c508c40d741157e112acc7899d482e3_d\",\r\n \"state\": \"idle\",\r\n \"schedulingState\": \"enabled\",\r\n \"stateTransitionTime\": \"2024-03-22T18:54:54.11816Z\",\r\n \"lastBootTime\": \"2024-03-22T18:54:54.034193Z\",\r\n \"allocationTime\": \"2024-03-22T18:54:38.1360407Z\",\r\n \"ipAddress\": \"10.0.0.5\",\r\n \"affinityId\": \"TVM:tvmps_92df7bd5257b1a77709a19e0b030fc6e9c508c40d741157e112acc7899d482e3_d\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"totalTasksRun\": 0,\r\n \"totalTasksSucceeded\": 0,\r\n \"runningTasksCount\": 0,\r\n \"runningTaskSlotsCount\": 0,\r\n \"certificateReferences\": [],\r\n \"isDedicated\": true,\r\n \"endpointConfiguration\": {\r\n \"inboundEndpoints\": [\r\n {\r\n \"name\": \"SSHRule.1\",\r\n \"protocol\": \"tcp\",\r\n \"publicIPAddress\": \"4.234.75.78\",\r\n \"publicFQDN\": \"dnsa818669e-7bd1-47bd-90ff-8ab151716f28-azurebatch-cloudservice.uksouth.cloudapp.azure.com\",\r\n \"frontendPort\": 50001,\r\n \"backendPort\": 22\r\n }\r\n ]\r\n },\r\n \"nodeAgentInfo\": {\r\n \"lastUpdateTime\": \"2024-03-22T18:54:54.034193Z\",\r\n \"version\": \"1.11.8\"\r\n },\r\n \"virtualMachineInfo\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": \"20.04.202403190\"\r\n }\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/testPool/nodes/tvmps_c3cdeb8c344b8b5cca4c1052f8fd5c239f09cffd64837afc6cbb2e073e15dab3_d?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bXBzX2MzY2RlYjhjMzQ0YjhiNWNjYTRjMTA1MmY4ZmQ1YzIzOWYwOWNmZmQ2NDgzN2FmYzZjYmIyZTA3M2UxNWRhYjNfZD9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjA=", + "RequestUri": "/pools/rebootandreimagenodepool/nodes/tvmps_92df7bd5257b1a77709a19e0b030fc6e9c508c40d741157e112acc7899d482e3_d?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3JlYm9vdGFuZHJlaW1hZ2Vub2RlcG9vbC9ub2Rlcy90dm1wc185MmRmN2JkNTI1N2IxYTc3NzA5YTE5ZTBiMDMwZmM2ZTljNTA4YzQwZDc0MTE1N2UxMTJhY2M3ODk5ZDQ4MmUzX2Q/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "50ffb488-3b62-4af0-b3fc-fc1e5b4aaacc" + "97ef8499-d4bd-4e67-80f8-4ad942e05a84" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:23:20 GMT" + "Fri, 22 Mar 2024 18:54:57 GMT" ], "x-ms-client-request-id": [ - "879dae88-af31-4975-857d-ba1c38e4fcbd" + "58b8521b-e399-4c3f-aeff-74baea859fb5" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -425,7 +1240,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "dbd1bf4d-3f8e-4b39-aa12-6cb3b94016e8" + "535c7fba-8854-43c4-a107-0d82270cb640" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -437,47 +1252,47 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:23:20 GMT" + "Fri, 22 Mar 2024 18:54:58 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_c3cdeb8c344b8b5cca4c1052f8fd5c239f09cffd64837afc6cbb2e073e15dab3_d\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/testPool/nodes/tvmps_c3cdeb8c344b8b5cca4c1052f8fd5c239f09cffd64837afc6cbb2e073e15dab3_d\",\r\n \"state\": \"reimaging\",\r\n \"schedulingState\": \"enabled\",\r\n \"stateTransitionTime\": \"2023-06-16T07:23:21.7378967Z\",\r\n \"lastBootTime\": \"2023-06-16T06:55:27.593709Z\",\r\n \"allocationTime\": \"2023-06-13T07:46:20.7222354Z\",\r\n \"ipAddress\": \"10.218.0.5\",\r\n \"affinityId\": \"TVM:tvmps_c3cdeb8c344b8b5cca4c1052f8fd5c239f09cffd64837afc6cbb2e073e15dab3_d\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"totalTasksRun\": 7,\r\n \"totalTasksSucceeded\": 3,\r\n \"runningTasksCount\": 0,\r\n \"runningTaskSlotsCount\": 0,\r\n \"recentTasks\": [\r\n {\r\n \"taskUrl\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobs/testTerminateTaskJob/tasks/testTask2\",\r\n \"jobId\": \"testTerminateTaskJob\",\r\n \"taskId\": \"testTask2\",\r\n \"taskState\": \"completed\",\r\n \"executionInfo\": {\r\n \"startTime\": \"2023-06-16T07:06:23.080101Z\",\r\n \"endTime\": \"2023-06-16T07:06:23.572482Z\",\r\n \"exitCode\": -1073741510,\r\n \"failureInfo\": {\r\n \"category\": \"UserError\",\r\n \"code\": \"TaskEnded\",\r\n \"message\": \"Task Was Ended by User Request\",\r\n \"details\": [\r\n {\r\n \"name\": \"AdditionalErrorCode\",\r\n \"value\": \"FailureExitCode\"\r\n }\r\n ]\r\n },\r\n \"result\": \"failure\",\r\n \"retryCount\": 0,\r\n \"requeueCount\": 0\r\n }\r\n }\r\n ],\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"pool\",\r\n \"elevationLevel\": \"nonadmin\"\r\n }\r\n },\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": true\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2023-06-16T06:55:28.965368Z\",\r\n \"endTime\": \"2023-06-16T06:55:29.07475Z\",\r\n \"exitCode\": 0,\r\n \"result\": \"success\",\r\n \"retryCount\": 0\r\n },\r\n \"certificateReferences\": [],\r\n \"isDedicated\": true,\r\n \"endpointConfiguration\": {\r\n \"inboundEndpoints\": [\r\n {\r\n \"name\": \"Microsoft.WindowsAzure.Plugins.RemoteForwarder.RdpInput\",\r\n \"protocol\": \"tcp\",\r\n \"frontendPort\": 3389,\r\n \"backendPort\": 20000\r\n }\r\n ]\r\n },\r\n \"nodeAgentInfo\": {\r\n \"lastUpdateTime\": \"2023-06-13T07:48:55.051071Z\",\r\n \"version\": \"1.10.0\"\r\n },\r\n \"virtualMachineInfo\": {}\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_92df7bd5257b1a77709a19e0b030fc6e9c508c40d741157e112acc7899d482e3_d\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/rebootandreimagenodepool/nodes/tvmps_92df7bd5257b1a77709a19e0b030fc6e9c508c40d741157e112acc7899d482e3_d\",\r\n \"state\": \"rebooting\",\r\n \"schedulingState\": \"enabled\",\r\n \"stateTransitionTime\": \"2024-03-22T18:54:57.9148052Z\",\r\n \"lastBootTime\": \"2024-03-22T18:54:54.034193Z\",\r\n \"allocationTime\": \"2024-03-22T18:54:38.1360407Z\",\r\n \"ipAddress\": \"10.0.0.5\",\r\n \"affinityId\": \"TVM:tvmps_92df7bd5257b1a77709a19e0b030fc6e9c508c40d741157e112acc7899d482e3_d\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"totalTasksRun\": 0,\r\n \"totalTasksSucceeded\": 0,\r\n \"runningTasksCount\": 0,\r\n \"runningTaskSlotsCount\": 0,\r\n \"certificateReferences\": [],\r\n \"isDedicated\": true,\r\n \"endpointConfiguration\": {\r\n \"inboundEndpoints\": [\r\n {\r\n \"name\": \"SSHRule.1\",\r\n \"protocol\": \"tcp\",\r\n \"publicIPAddress\": \"4.234.75.78\",\r\n \"publicFQDN\": \"dnsa818669e-7bd1-47bd-90ff-8ab151716f28-azurebatch-cloudservice.uksouth.cloudapp.azure.com\",\r\n \"frontendPort\": 50001,\r\n \"backendPort\": 22\r\n }\r\n ]\r\n },\r\n \"nodeAgentInfo\": {\r\n \"lastUpdateTime\": \"2024-03-22T18:54:54.034193Z\",\r\n \"version\": \"1.11.8\"\r\n },\r\n \"virtualMachineInfo\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": \"20.04.202403190\"\r\n }\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/testPool/nodes/tvmps_c3cdeb8c344b8b5cca4c1052f8fd5c239f09cffd64837afc6cbb2e073e15dab3_d/reimage?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bXBzX2MzY2RlYjhjMzQ0YjhiNWNjYTRjMTA1MmY4ZmQ1YzIzOWYwOWNmZmQ2NDgzN2FmYzZjYmIyZTA3M2UxNWRhYjNfZC9yZWltYWdlP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", + "RequestUri": "/pools/rebootandreimagenodepool/nodes/tvmps_92df7bd5257b1a77709a19e0b030fc6e9c508c40d741157e112acc7899d482e3_d/reboot?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3JlYm9vdGFuZHJlaW1hZ2Vub2RlcG9vbC9ub2Rlcy90dm1wc185MmRmN2JkNTI1N2IxYTc3NzA5YTE5ZTBiMDMwZmM2ZTljNTA4YzQwZDc0MTE1N2UxMTJhY2M3ODk5ZDQ4MmUzX2QvcmVib290P2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "61ba17c7-91bf-4679-97d2-5529b807be1e" + "aed6be03-24a2-45f1-bcf2-2d20a352ac4b" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:23:20 GMT" + "Fri, 22 Mar 2024 18:54:57 GMT" ], "x-ms-client-request-id": [ - "55d7bf33-0595-4206-83e8-20c6beeaec92" + "417b3d06-da56-4101-8ada-18ef8115215a" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Type": [ "application/json; odata=minimalmetadata; charset=utf-8" ], "Content-Length": [ - "40" + "39" ] }, - "RequestBody": "{\r\n \"nodeReimageOption\": \"terminate\"\r\n}", + "RequestBody": "{\r\n \"nodeRebootOption\": \"terminate\"\r\n}", "ResponseHeaders": { "Transfer-Encoding": [ "chunked" @@ -486,7 +1301,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "cc462c0e-01e7-4048-a43f-eee7ccb2e0c2" + "bbe9108c-7f1f-4e77-85d7-1409d3bdf178" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -498,10 +1313,10 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/pools/testPool/nodes/tvmps_c3cdeb8c344b8b5cca4c1052f8fd5c239f09cffd64837afc6cbb2e073e15dab3_d/reimage" + "https://billstestba24326.uksouth.batch.azure.com/pools/rebootandreimagenodepool/nodes/tvmps_92df7bd5257b1a77709a19e0b030fc6e9c508c40d741157e112acc7899d482e3_d/reboot" ], "Date": [ - "Fri, 16 Jun 2023 07:23:20 GMT" + "Fri, 22 Mar 2024 18:54:57 GMT" ] }, "ResponseBody": "", @@ -510,9 +1325,9 @@ ], "Names": {}, "Variables": { - "SubscriptionId": "21abd678-18c5-4660-9fdd-8c5ba6b6fe1f", - "AZURE_BATCH_ACCOUNT": "hoppeeastasia2", - "AZURE_BATCH_ENDPOINT": "https://hoppeeastasia2.eastasia.batch.azure.com", - "AZURE_BATCH_RESOURCE_GROUP": "123" + "SubscriptionId": "6602ac9a-5dad-41bd-a792-592c704b6a31", + "AZURE_BATCH_ACCOUNT": "billstestba24326", + "AZURE_BATCH_ENDPOINT": "https://billstestba24326.uksouth.batch.azure.com", + "AZURE_BATCH_RESOURCE_GROUP": "automation" } } \ No newline at end of file diff --git a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ComputeNodeTests/TestRemoveComputeNodes.json b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ComputeNodeTests/TestRemoveComputeNodes.json index a649064a11f7..a6d71aec8aa2 100644 --- a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ComputeNodeTests/TestRemoveComputeNodes.json +++ b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ComputeNodeTests/TestRemoveComputeNodes.json @@ -1,49 +1,49 @@ { "Entries": [ { - "RequestUri": "/pools?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", + "RequestUri": "/pools?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "952161ea-426e-42bf-9ff3-1d508bc4c917" + "cde42e31-39ee-4a41-aa07-27943741181c" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:25:28 GMT" + "Thu, 21 Mar 2024 23:20:19 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Type": [ "application/json; odata=minimalmetadata; charset=utf-8" ], "Content-Length": [ - "293" + "1120" ] }, - "RequestBody": "{\r\n \"id\": \"removenodepool\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"4\",\r\n \"osVersion\": \"*\"\r\n },\r\n \"targetDedicatedNodes\": 2,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableInterNodeCommunication\": true,\r\n \"targetNodeCommunicationMode\": \"classic\"\r\n}", + "RequestBody": "{\r\n \"id\": \"removenodepool\",\r\n \"vmSize\": \"STANDARD_D2S_V3\",\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"zonal\"\r\n }\r\n },\r\n \"targetDedicatedNodes\": 2,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableInterNodeCommunication\": false,\r\n \"targetNodeCommunicationMode\": \"default\",\r\n \"upgradePolicy\": {\r\n \"mode\": \"automatic\",\r\n \"automaticOSUpgradePolicy\": {\r\n \"disableAutomaticRollback\": true,\r\n \"enableAutomaticOSUpgrade\": true,\r\n \"useRollingUpgradePolicy\": true,\r\n \"osRollingUpgradeDeferral\": true\r\n },\r\n \"rollingUpgradePolicy\": {\r\n \"enableCrossZoneUpgrade\": true,\r\n \"maxBatchInstancePercent\": 20,\r\n \"maxUnhealthyInstancePercent\": 20,\r\n \"maxUnhealthyUpgradedInstancePercent\": 20,\r\n \"pauseTimeBetweenBatches\": \"PT5S\",\r\n \"prioritizeUnhealthyInstances\": false,\r\n \"rollbackFailedInstancesOnPolicyBreach\": false\r\n }\r\n }\r\n}", "ResponseHeaders": { "Transfer-Encoding": [ "chunked" ], "ETag": [ - "0x8DB6E3ADCEEE30C" + "0x8DC49FD7A1C4342" ], "Location": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/pools/removenodepool" + "https://billstestba24326.uksouth.batch.azure.com/pools/removenodepool" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "423a57b8-c6ca-4e51-887a-4e48a0005fe9" + "6728b1c7-5c1f-4553-8e62-5fc846102da0" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -55,37 +55,37 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/pools/removenodepool" + "https://billstestba24326.uksouth.batch.azure.com/pools/removenodepool" ], "Date": [ - "Fri, 16 Jun 2023 07:25:28 GMT" + "Thu, 21 Mar 2024 23:20:19 GMT" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:25:29 GMT" + "Thu, 21 Mar 2024 23:20:20 GMT" ] }, "ResponseBody": "", "StatusCode": 201 }, { - "RequestUri": "/pools/removenodepool?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3JlbW92ZW5vZGVwb29sP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", + "RequestUri": "/pools/removenodepool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3JlbW92ZW5vZGVwb29sP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "64832b96-b994-4641-8575-63ebc84b86a1" + "bb53d222-6cd2-4447-a607-25731ee527c9" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:25:28 GMT" + "Thu, 21 Mar 2024 23:20:20 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -95,13 +95,13 @@ "chunked" ], "ETag": [ - "0x8DB6E3ADCEEE30C" + "0x8DC49FD7A1C4342" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "41156c1b-47f8-419f-b295-6d4e8e990ef4" + "6355e112-51cd-4328-b585-15bb9a1eda77" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -113,37 +113,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:25:29 GMT" + "Thu, 21 Mar 2024 23:20:19 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:25:29 GMT" + "Thu, 21 Mar 2024 23:20:20 GMT" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"removenodepool\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/removenodepool\",\r\n \"eTag\": \"0x8DB6E3ADCEEE30C\",\r\n \"lastModified\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"creationTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": true,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"4\",\r\n \"osVersion\": \"*\"\r\n },\r\n \"targetNodeCommunicationMode\": \"classic\"\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"removenodepool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/removenodepool\",\r\n \"eTag\": \"0x8DC49FD7A1C4342\",\r\n \"lastModified\": \"2024-03-21T23:20:20.3993922Z\",\r\n \"creationTime\": \"2024-03-21T23:20:20.399391Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-21T23:20:20.399391Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-21T23:20:20.3993923Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\",\r\n \"upgradePolicy\": {\r\n \"mode\": \"automatic\",\r\n \"automaticOSUpgradePolicy\": {\r\n \"disableAutomaticRollback\": true,\r\n \"enableAutomaticOSUpgrade\": true,\r\n \"useRollingUpgradePolicy\": true,\r\n \"osRollingUpgradeDeferral\": true\r\n },\r\n \"rollingUpgradePolicy\": {\r\n \"enableCrossZoneUpgrade\": true,\r\n \"maxBatchInstancePercent\": 20,\r\n \"maxUnhealthyInstancePercent\": 20,\r\n \"maxUnhealthyUpgradedInstancePercent\": 20,\r\n \"pauseTimeBetweenBatches\": \"PT5S\",\r\n \"prioritizeUnhealthyInstances\": false,\r\n \"rollbackFailedInstancesOnPolicyBreach\": false\r\n }\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/removenodepool?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3JlbW92ZW5vZGVwb29sP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", + "RequestUri": "/pools/removenodepool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3JlbW92ZW5vZGVwb29sP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "fff30778-2a05-4204-8e3d-60b1b4de35df" + "6e33ac54-2f26-4bb3-a01b-00a58945d010" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:25:33 GMT" + "Thu, 21 Mar 2024 23:20:25 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -153,13 +153,13 @@ "chunked" ], "ETag": [ - "0x8DB6E3ADCEEE30C" + "0x8DC49FD7A1C4342" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "426cb9a8-cadf-4d0b-9fe8-49f729c41eb8" + "72c64c46-9ffb-4201-bd84-26dd2488622b" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -171,37 +171,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:25:34 GMT" + "Thu, 21 Mar 2024 23:20:25 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:25:29 GMT" + "Thu, 21 Mar 2024 23:20:20 GMT" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"removenodepool\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/removenodepool\",\r\n \"eTag\": \"0x8DB6E3ADCEEE30C\",\r\n \"lastModified\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"creationTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": true,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"4\",\r\n \"osVersion\": \"*\"\r\n },\r\n \"targetNodeCommunicationMode\": \"classic\"\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"removenodepool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/removenodepool\",\r\n \"eTag\": \"0x8DC49FD7A1C4342\",\r\n \"lastModified\": \"2024-03-21T23:20:20.3993922Z\",\r\n \"creationTime\": \"2024-03-21T23:20:20.399391Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-21T23:20:20.399391Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-21T23:20:20.3993923Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\",\r\n \"upgradePolicy\": {\r\n \"mode\": \"automatic\",\r\n \"automaticOSUpgradePolicy\": {\r\n \"disableAutomaticRollback\": true,\r\n \"enableAutomaticOSUpgrade\": true,\r\n \"useRollingUpgradePolicy\": true,\r\n \"osRollingUpgradeDeferral\": true\r\n },\r\n \"rollingUpgradePolicy\": {\r\n \"enableCrossZoneUpgrade\": true,\r\n \"maxBatchInstancePercent\": 20,\r\n \"maxUnhealthyInstancePercent\": 20,\r\n \"maxUnhealthyUpgradedInstancePercent\": 20,\r\n \"pauseTimeBetweenBatches\": \"PT5S\",\r\n \"prioritizeUnhealthyInstances\": false,\r\n \"rollbackFailedInstancesOnPolicyBreach\": false\r\n }\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/removenodepool?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3JlbW92ZW5vZGVwb29sP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", + "RequestUri": "/pools/removenodepool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3JlbW92ZW5vZGVwb29sP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "910d5316-3464-4e9e-8770-cd7b6f5cbcc4" + "0d5a17c1-d5cf-49b5-8675-8b3e8a7214ec" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:25:38 GMT" + "Thu, 21 Mar 2024 23:20:30 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -211,13 +211,13 @@ "chunked" ], "ETag": [ - "0x8DB6E3ADCEEE30C" + "0x8DC49FD7A1C4342" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "f858e024-874e-4c47-988d-4d9029de34ff" + "674a5cd8-cc3c-4389-bd1c-ae0a398e9a16" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -229,37 +229,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:25:39 GMT" + "Thu, 21 Mar 2024 23:20:31 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:25:29 GMT" + "Thu, 21 Mar 2024 23:20:20 GMT" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"removenodepool\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/removenodepool\",\r\n \"eTag\": \"0x8DB6E3ADCEEE30C\",\r\n \"lastModified\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"creationTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": true,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"4\",\r\n \"osVersion\": \"*\"\r\n },\r\n \"targetNodeCommunicationMode\": \"classic\"\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"removenodepool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/removenodepool\",\r\n \"eTag\": \"0x8DC49FD7A1C4342\",\r\n \"lastModified\": \"2024-03-21T23:20:20.3993922Z\",\r\n \"creationTime\": \"2024-03-21T23:20:20.399391Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-21T23:20:20.399391Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-21T23:20:20.3993923Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\",\r\n \"upgradePolicy\": {\r\n \"mode\": \"automatic\",\r\n \"automaticOSUpgradePolicy\": {\r\n \"disableAutomaticRollback\": true,\r\n \"enableAutomaticOSUpgrade\": true,\r\n \"useRollingUpgradePolicy\": true,\r\n \"osRollingUpgradeDeferral\": true\r\n },\r\n \"rollingUpgradePolicy\": {\r\n \"enableCrossZoneUpgrade\": true,\r\n \"maxBatchInstancePercent\": 20,\r\n \"maxUnhealthyInstancePercent\": 20,\r\n \"maxUnhealthyUpgradedInstancePercent\": 20,\r\n \"pauseTimeBetweenBatches\": \"PT5S\",\r\n \"prioritizeUnhealthyInstances\": false,\r\n \"rollbackFailedInstancesOnPolicyBreach\": false\r\n }\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/removenodepool?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3JlbW92ZW5vZGVwb29sP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", + "RequestUri": "/pools/removenodepool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3JlbW92ZW5vZGVwb29sP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "74202c9c-7d91-4bcd-81c8-722bb4f46f0e" + "a37a1e06-4b19-4c9c-856d-e595a30b4a8e" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:25:43 GMT" + "Thu, 21 Mar 2024 23:20:36 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -269,13 +269,13 @@ "chunked" ], "ETag": [ - "0x8DB6E3ADCEEE30C" + "0x8DC49FD7A1C4342" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "9a9dd931-b6c4-4e6a-9724-6288bb08f6c8" + "d4b7c33e-677d-4c3a-883c-8f5f9204d95d" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -287,37 +287,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:25:44 GMT" + "Thu, 21 Mar 2024 23:20:36 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:25:29 GMT" + "Thu, 21 Mar 2024 23:20:20 GMT" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"removenodepool\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/removenodepool\",\r\n \"eTag\": \"0x8DB6E3ADCEEE30C\",\r\n \"lastModified\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"creationTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": true,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"4\",\r\n \"osVersion\": \"*\"\r\n },\r\n \"targetNodeCommunicationMode\": \"classic\"\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"removenodepool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/removenodepool\",\r\n \"eTag\": \"0x8DC49FD7A1C4342\",\r\n \"lastModified\": \"2024-03-21T23:20:20.3993922Z\",\r\n \"creationTime\": \"2024-03-21T23:20:20.399391Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-21T23:20:20.399391Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-21T23:20:20.3993923Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\",\r\n \"upgradePolicy\": {\r\n \"mode\": \"automatic\",\r\n \"automaticOSUpgradePolicy\": {\r\n \"disableAutomaticRollback\": true,\r\n \"enableAutomaticOSUpgrade\": true,\r\n \"useRollingUpgradePolicy\": true,\r\n \"osRollingUpgradeDeferral\": true\r\n },\r\n \"rollingUpgradePolicy\": {\r\n \"enableCrossZoneUpgrade\": true,\r\n \"maxBatchInstancePercent\": 20,\r\n \"maxUnhealthyInstancePercent\": 20,\r\n \"maxUnhealthyUpgradedInstancePercent\": 20,\r\n \"pauseTimeBetweenBatches\": \"PT5S\",\r\n \"prioritizeUnhealthyInstances\": false,\r\n \"rollbackFailedInstancesOnPolicyBreach\": false\r\n }\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/removenodepool?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3JlbW92ZW5vZGVwb29sP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", + "RequestUri": "/pools/removenodepool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3JlbW92ZW5vZGVwb29sP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "f4fb51b2-a826-4a03-b084-98080581d869" + "06ee44dd-4737-4957-9d0c-5d7002f86784" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:25:49 GMT" + "Thu, 21 Mar 2024 23:20:41 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -327,13 +327,13 @@ "chunked" ], "ETag": [ - "0x8DB6E3ADCEEE30C" + "0x8DC49FD7A1C4342" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "6bb0596b-7d5d-4357-96b2-a5a16bc9f450" + "39401c8a-2a5e-48f3-a7f3-d67c7a7a2b3e" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -345,37 +345,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:25:50 GMT" + "Thu, 21 Mar 2024 23:20:41 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:25:29 GMT" + "Thu, 21 Mar 2024 23:20:20 GMT" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"removenodepool\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/removenodepool\",\r\n \"eTag\": \"0x8DB6E3ADCEEE30C\",\r\n \"lastModified\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"creationTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": true,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"4\",\r\n \"osVersion\": \"*\"\r\n },\r\n \"targetNodeCommunicationMode\": \"classic\"\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"removenodepool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/removenodepool\",\r\n \"eTag\": \"0x8DC49FD7A1C4342\",\r\n \"lastModified\": \"2024-03-21T23:20:20.3993922Z\",\r\n \"creationTime\": \"2024-03-21T23:20:20.399391Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-21T23:20:20.399391Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-21T23:20:20.3993923Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\",\r\n \"upgradePolicy\": {\r\n \"mode\": \"automatic\",\r\n \"automaticOSUpgradePolicy\": {\r\n \"disableAutomaticRollback\": true,\r\n \"enableAutomaticOSUpgrade\": true,\r\n \"useRollingUpgradePolicy\": true,\r\n \"osRollingUpgradeDeferral\": true\r\n },\r\n \"rollingUpgradePolicy\": {\r\n \"enableCrossZoneUpgrade\": true,\r\n \"maxBatchInstancePercent\": 20,\r\n \"maxUnhealthyInstancePercent\": 20,\r\n \"maxUnhealthyUpgradedInstancePercent\": 20,\r\n \"pauseTimeBetweenBatches\": \"PT5S\",\r\n \"prioritizeUnhealthyInstances\": false,\r\n \"rollbackFailedInstancesOnPolicyBreach\": false\r\n }\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/removenodepool?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3JlbW92ZW5vZGVwb29sP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", + "RequestUri": "/pools/removenodepool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3JlbW92ZW5vZGVwb29sP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "305eb4bf-e9c7-45db-a8db-fe14ce85fa11" + "60ec537a-5e2b-442a-8e8e-7e7c391e5eb2" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:25:54 GMT" + "Thu, 21 Mar 2024 23:20:46 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -385,13 +385,13 @@ "chunked" ], "ETag": [ - "0x8DB6E3ADCEEE30C" + "0x8DC49FD7A1C4342" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "e0e92f5c-7174-49f5-953f-5f3fd4a71e26" + "5a337fee-db96-47ef-83f4-f97612a543bf" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -403,37 +403,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:25:54 GMT" + "Thu, 21 Mar 2024 23:20:46 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:25:29 GMT" + "Thu, 21 Mar 2024 23:20:20 GMT" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"removenodepool\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/removenodepool\",\r\n \"eTag\": \"0x8DB6E3ADCEEE30C\",\r\n \"lastModified\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"creationTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": true,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"4\",\r\n \"osVersion\": \"*\"\r\n },\r\n \"targetNodeCommunicationMode\": \"classic\"\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"removenodepool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/removenodepool\",\r\n \"eTag\": \"0x8DC49FD7A1C4342\",\r\n \"lastModified\": \"2024-03-21T23:20:20.3993922Z\",\r\n \"creationTime\": \"2024-03-21T23:20:20.399391Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-21T23:20:20.399391Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-21T23:20:20.3993923Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\",\r\n \"upgradePolicy\": {\r\n \"mode\": \"automatic\",\r\n \"automaticOSUpgradePolicy\": {\r\n \"disableAutomaticRollback\": true,\r\n \"enableAutomaticOSUpgrade\": true,\r\n \"useRollingUpgradePolicy\": true,\r\n \"osRollingUpgradeDeferral\": true\r\n },\r\n \"rollingUpgradePolicy\": {\r\n \"enableCrossZoneUpgrade\": true,\r\n \"maxBatchInstancePercent\": 20,\r\n \"maxUnhealthyInstancePercent\": 20,\r\n \"maxUnhealthyUpgradedInstancePercent\": 20,\r\n \"pauseTimeBetweenBatches\": \"PT5S\",\r\n \"prioritizeUnhealthyInstances\": false,\r\n \"rollbackFailedInstancesOnPolicyBreach\": false\r\n }\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/removenodepool?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3JlbW92ZW5vZGVwb29sP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", + "RequestUri": "/pools/removenodepool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3JlbW92ZW5vZGVwb29sP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "706a60b0-4e6a-4f99-ba34-783c26027dc7" + "7af4729c-314e-4826-80d2-8331787c3ee3" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:25:59 GMT" + "Thu, 21 Mar 2024 23:20:51 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -443,13 +443,13 @@ "chunked" ], "ETag": [ - "0x8DB6E3ADCEEE30C" + "0x8DC49FD7A1C4342" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "fa609329-d515-4b30-b843-8593b6fe43d8" + "4ff8ae74-a3b2-4952-a026-ee5725e26227" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -461,794 +461,40 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:25:59 GMT" + "Thu, 21 Mar 2024 23:20:52 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:25:29 GMT" + "Thu, 21 Mar 2024 23:20:20 GMT" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"removenodepool\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/removenodepool\",\r\n \"eTag\": \"0x8DB6E3ADCEEE30C\",\r\n \"lastModified\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"creationTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": true,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"4\",\r\n \"osVersion\": \"*\"\r\n },\r\n \"targetNodeCommunicationMode\": \"classic\"\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"removenodepool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/removenodepool\",\r\n \"eTag\": \"0x8DC49FD7A1C4342\",\r\n \"lastModified\": \"2024-03-21T23:20:20.3993922Z\",\r\n \"creationTime\": \"2024-03-21T23:20:20.399391Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-21T23:20:20.399391Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2024-03-21T23:20:47.6157999Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 2,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\",\r\n \"currentNodeCommunicationMode\": \"classic\",\r\n \"upgradePolicy\": {\r\n \"mode\": \"automatic\",\r\n \"automaticOSUpgradePolicy\": {\r\n \"disableAutomaticRollback\": true,\r\n \"enableAutomaticOSUpgrade\": true,\r\n \"useRollingUpgradePolicy\": true,\r\n \"osRollingUpgradeDeferral\": true\r\n },\r\n \"rollingUpgradePolicy\": {\r\n \"enableCrossZoneUpgrade\": true,\r\n \"maxBatchInstancePercent\": 20,\r\n \"maxUnhealthyInstancePercent\": 20,\r\n \"maxUnhealthyUpgradedInstancePercent\": 20,\r\n \"pauseTimeBetweenBatches\": \"PT5S\",\r\n \"prioritizeUnhealthyInstances\": false,\r\n \"rollbackFailedInstancesOnPolicyBreach\": false\r\n }\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/removenodepool?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3JlbW92ZW5vZGVwb29sP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", + "RequestUri": "/pools/removenodepool/nodes?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3JlbW92ZW5vZGVwb29sL25vZGVzP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "e1c3cd5f-a040-4326-9829-fceea0c57376" + "fdde6882-c7e1-4904-8791-6a6363c74233" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:26:04 GMT" - ], - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", - "AzurePowershell/Az1.0.0" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Transfer-Encoding": [ - "chunked" - ], - "ETag": [ - "0x8DB6E3ADCEEE30C" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "request-id": [ - "26291523-5f0b-4541-85ad-1b946477d5fc" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "DataServiceVersion": [ - "3.0" - ], - "Date": [ - "Fri, 16 Jun 2023 07:26:04 GMT" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata" - ], - "Last-Modified": [ - "Fri, 16 Jun 2023 07:25:29 GMT" - ] - }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"removenodepool\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/removenodepool\",\r\n \"eTag\": \"0x8DB6E3ADCEEE30C\",\r\n \"lastModified\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"creationTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": true,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"4\",\r\n \"osVersion\": \"*\"\r\n },\r\n \"targetNodeCommunicationMode\": \"classic\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/pools/removenodepool?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3JlbW92ZW5vZGVwb29sP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", - "RequestMethod": "GET", - "RequestHeaders": { - "client-request-id": [ - "ae5adfe2-b44b-4d1d-94fa-ee98218e6c60" - ], - "Accept-Language": [ - "en-US" - ], - "ocp-date": [ - "Fri, 16 Jun 2023 07:26:09 GMT" - ], - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", - "AzurePowershell/Az1.0.0" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Transfer-Encoding": [ - "chunked" - ], - "ETag": [ - "0x8DB6E3ADCEEE30C" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "request-id": [ - "3b88cc26-44f6-4881-a579-d93b52d1dc32" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "DataServiceVersion": [ - "3.0" - ], - "Date": [ - "Fri, 16 Jun 2023 07:26:10 GMT" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata" - ], - "Last-Modified": [ - "Fri, 16 Jun 2023 07:25:29 GMT" - ] - }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"removenodepool\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/removenodepool\",\r\n \"eTag\": \"0x8DB6E3ADCEEE30C\",\r\n \"lastModified\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"creationTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": true,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"4\",\r\n \"osVersion\": \"*\"\r\n },\r\n \"targetNodeCommunicationMode\": \"classic\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/pools/removenodepool?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3JlbW92ZW5vZGVwb29sP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", - "RequestMethod": "GET", - "RequestHeaders": { - "client-request-id": [ - "1962ded8-785e-4dca-b90c-cd1fbd8f7409" - ], - "Accept-Language": [ - "en-US" - ], - "ocp-date": [ - "Fri, 16 Jun 2023 07:26:14 GMT" - ], - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", - "AzurePowershell/Az1.0.0" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Transfer-Encoding": [ - "chunked" - ], - "ETag": [ - "0x8DB6E3ADCEEE30C" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "request-id": [ - "382ea994-acc8-489a-8f62-b8b389e5544b" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "DataServiceVersion": [ - "3.0" - ], - "Date": [ - "Fri, 16 Jun 2023 07:26:15 GMT" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata" - ], - "Last-Modified": [ - "Fri, 16 Jun 2023 07:25:29 GMT" - ] - }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"removenodepool\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/removenodepool\",\r\n \"eTag\": \"0x8DB6E3ADCEEE30C\",\r\n \"lastModified\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"creationTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": true,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"4\",\r\n \"osVersion\": \"*\"\r\n },\r\n \"targetNodeCommunicationMode\": \"classic\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/pools/removenodepool?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3JlbW92ZW5vZGVwb29sP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", - "RequestMethod": "GET", - "RequestHeaders": { - "client-request-id": [ - "af214236-0743-4c0d-85aa-613176e4fa36" - ], - "Accept-Language": [ - "en-US" - ], - "ocp-date": [ - "Fri, 16 Jun 2023 07:26:19 GMT" - ], - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", - "AzurePowershell/Az1.0.0" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Transfer-Encoding": [ - "chunked" - ], - "ETag": [ - "0x8DB6E3ADCEEE30C" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "request-id": [ - "3e9066ea-d940-4eb3-b90c-31c52e0c420f" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "DataServiceVersion": [ - "3.0" - ], - "Date": [ - "Fri, 16 Jun 2023 07:26:20 GMT" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata" - ], - "Last-Modified": [ - "Fri, 16 Jun 2023 07:25:29 GMT" - ] - }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"removenodepool\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/removenodepool\",\r\n \"eTag\": \"0x8DB6E3ADCEEE30C\",\r\n \"lastModified\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"creationTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": true,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"4\",\r\n \"osVersion\": \"*\"\r\n },\r\n \"targetNodeCommunicationMode\": \"classic\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/pools/removenodepool?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3JlbW92ZW5vZGVwb29sP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", - "RequestMethod": "GET", - "RequestHeaders": { - "client-request-id": [ - "6686d70c-2223-4e67-840b-a272076fcb55" - ], - "Accept-Language": [ - "en-US" - ], - "ocp-date": [ - "Fri, 16 Jun 2023 07:26:24 GMT" - ], - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", - "AzurePowershell/Az1.0.0" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Transfer-Encoding": [ - "chunked" - ], - "ETag": [ - "0x8DB6E3ADCEEE30C" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "request-id": [ - "a5d496a0-47a3-443c-8de1-85ed7b5b21c9" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "DataServiceVersion": [ - "3.0" - ], - "Date": [ - "Fri, 16 Jun 2023 07:26:25 GMT" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata" - ], - "Last-Modified": [ - "Fri, 16 Jun 2023 07:25:29 GMT" - ] - }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"removenodepool\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/removenodepool\",\r\n \"eTag\": \"0x8DB6E3ADCEEE30C\",\r\n \"lastModified\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"creationTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": true,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"4\",\r\n \"osVersion\": \"*\"\r\n },\r\n \"targetNodeCommunicationMode\": \"classic\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/pools/removenodepool?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3JlbW92ZW5vZGVwb29sP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", - "RequestMethod": "GET", - "RequestHeaders": { - "client-request-id": [ - "563c8474-c96a-4e25-9c10-11a4fb31b07f" - ], - "Accept-Language": [ - "en-US" - ], - "ocp-date": [ - "Fri, 16 Jun 2023 07:26:29 GMT" - ], - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", - "AzurePowershell/Az1.0.0" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Transfer-Encoding": [ - "chunked" - ], - "ETag": [ - "0x8DB6E3ADCEEE30C" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "request-id": [ - "1dcaf58b-1c08-4e3f-80e9-5dc89d73eb22" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "DataServiceVersion": [ - "3.0" - ], - "Date": [ - "Fri, 16 Jun 2023 07:26:31 GMT" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata" - ], - "Last-Modified": [ - "Fri, 16 Jun 2023 07:25:29 GMT" - ] - }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"removenodepool\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/removenodepool\",\r\n \"eTag\": \"0x8DB6E3ADCEEE30C\",\r\n \"lastModified\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"creationTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": true,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"4\",\r\n \"osVersion\": \"*\"\r\n },\r\n \"targetNodeCommunicationMode\": \"classic\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/pools/removenodepool?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3JlbW92ZW5vZGVwb29sP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", - "RequestMethod": "GET", - "RequestHeaders": { - "client-request-id": [ - "11b4e99b-4d39-4af2-8268-5f16601958c4" - ], - "Accept-Language": [ - "en-US" - ], - "ocp-date": [ - "Fri, 16 Jun 2023 07:26:35 GMT" - ], - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", - "AzurePowershell/Az1.0.0" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Transfer-Encoding": [ - "chunked" - ], - "ETag": [ - "0x8DB6E3ADCEEE30C" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "request-id": [ - "d48473f6-63a4-4ef7-872f-5788bd43f706" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "DataServiceVersion": [ - "3.0" - ], - "Date": [ - "Fri, 16 Jun 2023 07:26:35 GMT" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata" - ], - "Last-Modified": [ - "Fri, 16 Jun 2023 07:25:29 GMT" - ] - }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"removenodepool\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/removenodepool\",\r\n \"eTag\": \"0x8DB6E3ADCEEE30C\",\r\n \"lastModified\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"creationTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": true,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"4\",\r\n \"osVersion\": \"*\"\r\n },\r\n \"targetNodeCommunicationMode\": \"classic\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/pools/removenodepool?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3JlbW92ZW5vZGVwb29sP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", - "RequestMethod": "GET", - "RequestHeaders": { - "client-request-id": [ - "223ad8ac-b395-457c-a9c8-649f293afc80" - ], - "Accept-Language": [ - "en-US" - ], - "ocp-date": [ - "Fri, 16 Jun 2023 07:26:40 GMT" - ], - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", - "AzurePowershell/Az1.0.0" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Transfer-Encoding": [ - "chunked" - ], - "ETag": [ - "0x8DB6E3ADCEEE30C" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "request-id": [ - "cf542247-2397-4b16-a0a0-ea9981c78a55" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "DataServiceVersion": [ - "3.0" - ], - "Date": [ - "Fri, 16 Jun 2023 07:26:41 GMT" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata" - ], - "Last-Modified": [ - "Fri, 16 Jun 2023 07:25:29 GMT" - ] - }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"removenodepool\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/removenodepool\",\r\n \"eTag\": \"0x8DB6E3ADCEEE30C\",\r\n \"lastModified\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"creationTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": true,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"4\",\r\n \"osVersion\": \"*\"\r\n },\r\n \"targetNodeCommunicationMode\": \"classic\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/pools/removenodepool?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3JlbW92ZW5vZGVwb29sP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", - "RequestMethod": "GET", - "RequestHeaders": { - "client-request-id": [ - "4b23a67c-d931-4d82-93b1-ea2e110b9b0e" - ], - "Accept-Language": [ - "en-US" - ], - "ocp-date": [ - "Fri, 16 Jun 2023 07:26:45 GMT" - ], - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", - "AzurePowershell/Az1.0.0" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Transfer-Encoding": [ - "chunked" - ], - "ETag": [ - "0x8DB6E3ADCEEE30C" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "request-id": [ - "6cda316a-9747-426d-98e0-228ca55cbba9" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "DataServiceVersion": [ - "3.0" - ], - "Date": [ - "Fri, 16 Jun 2023 07:26:45 GMT" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata" - ], - "Last-Modified": [ - "Fri, 16 Jun 2023 07:25:29 GMT" - ] - }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"removenodepool\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/removenodepool\",\r\n \"eTag\": \"0x8DB6E3ADCEEE30C\",\r\n \"lastModified\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"creationTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": true,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"4\",\r\n \"osVersion\": \"*\"\r\n },\r\n \"targetNodeCommunicationMode\": \"classic\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/pools/removenodepool?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3JlbW92ZW5vZGVwb29sP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", - "RequestMethod": "GET", - "RequestHeaders": { - "client-request-id": [ - "13578401-0d25-4699-993d-e183e62032a2" - ], - "Accept-Language": [ - "en-US" - ], - "ocp-date": [ - "Fri, 16 Jun 2023 07:26:50 GMT" - ], - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", - "AzurePowershell/Az1.0.0" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Transfer-Encoding": [ - "chunked" - ], - "ETag": [ - "0x8DB6E3ADCEEE30C" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "request-id": [ - "077056fa-c3c4-4ea4-bba9-ebcd1593e027" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "DataServiceVersion": [ - "3.0" - ], - "Date": [ - "Fri, 16 Jun 2023 07:26:51 GMT" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata" - ], - "Last-Modified": [ - "Fri, 16 Jun 2023 07:25:29 GMT" - ] - }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"removenodepool\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/removenodepool\",\r\n \"eTag\": \"0x8DB6E3ADCEEE30C\",\r\n \"lastModified\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"creationTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": true,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"4\",\r\n \"osVersion\": \"*\"\r\n },\r\n \"targetNodeCommunicationMode\": \"classic\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/pools/removenodepool?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3JlbW92ZW5vZGVwb29sP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", - "RequestMethod": "GET", - "RequestHeaders": { - "client-request-id": [ - "9c628166-de83-44e4-b8f9-d491b705d77a" - ], - "Accept-Language": [ - "en-US" - ], - "ocp-date": [ - "Fri, 16 Jun 2023 07:26:55 GMT" - ], - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", - "AzurePowershell/Az1.0.0" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Transfer-Encoding": [ - "chunked" - ], - "ETag": [ - "0x8DB6E3ADCEEE30C" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "request-id": [ - "c6e43817-50c5-4313-b974-7953cc5441ff" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "DataServiceVersion": [ - "3.0" - ], - "Date": [ - "Fri, 16 Jun 2023 07:26:55 GMT" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata" - ], - "Last-Modified": [ - "Fri, 16 Jun 2023 07:25:29 GMT" - ] - }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"removenodepool\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/removenodepool\",\r\n \"eTag\": \"0x8DB6E3ADCEEE30C\",\r\n \"lastModified\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"creationTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": true,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"4\",\r\n \"osVersion\": \"*\"\r\n },\r\n \"targetNodeCommunicationMode\": \"classic\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/pools/removenodepool?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3JlbW92ZW5vZGVwb29sP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", - "RequestMethod": "GET", - "RequestHeaders": { - "client-request-id": [ - "c9df5fde-c218-4676-b568-dcbab7e61c01" - ], - "Accept-Language": [ - "en-US" - ], - "ocp-date": [ - "Fri, 16 Jun 2023 07:27:00 GMT" - ], - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", - "AzurePowershell/Az1.0.0" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Transfer-Encoding": [ - "chunked" - ], - "ETag": [ - "0x8DB6E3ADCEEE30C" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "request-id": [ - "5218d6cb-59fa-4606-ab67-fc5421528aff" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "DataServiceVersion": [ - "3.0" - ], - "Date": [ - "Fri, 16 Jun 2023 07:27:01 GMT" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata" - ], - "Last-Modified": [ - "Fri, 16 Jun 2023 07:25:29 GMT" - ] - }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"removenodepool\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/removenodepool\",\r\n \"eTag\": \"0x8DB6E3ADCEEE30C\",\r\n \"lastModified\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"creationTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 2,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": true,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"4\",\r\n \"osVersion\": \"*\"\r\n },\r\n \"targetNodeCommunicationMode\": \"classic\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/pools/removenodepool?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3JlbW92ZW5vZGVwb29sP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", - "RequestMethod": "GET", - "RequestHeaders": { - "client-request-id": [ - "4e2125b2-3584-454a-8216-9f3989ebf6a3" - ], - "Accept-Language": [ - "en-US" - ], - "ocp-date": [ - "Fri, 16 Jun 2023 07:27:05 GMT" - ], - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", - "AzurePowershell/Az1.0.0" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Transfer-Encoding": [ - "chunked" - ], - "ETag": [ - "0x8DB6E3ADCEEE30C" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "request-id": [ - "5def961d-8145-456a-b428-515777804cf5" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "DataServiceVersion": [ - "3.0" - ], - "Date": [ - "Fri, 16 Jun 2023 07:27:06 GMT" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata" - ], - "Last-Modified": [ - "Fri, 16 Jun 2023 07:25:29 GMT" - ] - }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"removenodepool\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/removenodepool\",\r\n \"eTag\": \"0x8DB6E3ADCEEE30C\",\r\n \"lastModified\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"creationTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:25:29.6858892Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2023-06-16T07:27:02.3286758Z\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 2,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": true,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"4\",\r\n \"osVersion\": \"*\"\r\n },\r\n \"targetNodeCommunicationMode\": \"classic\",\r\n \"currentNodeCommunicationMode\": \"classic\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/pools/removenodepool/nodes?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3JlbW92ZW5vZGVwb29sL25vZGVzP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", - "RequestMethod": "GET", - "RequestHeaders": { - "client-request-id": [ - "3a78298d-d6db-4a50-b90a-17ca0aa43cd1" - ], - "Accept-Language": [ - "en-US" - ], - "ocp-date": [ - "Fri, 16 Jun 2023 07:27:06 GMT" + "Thu, 21 Mar 2024 23:20:52 GMT" ], "x-ms-client-request-id": [ - "712db2dd-d77f-4815-9d66-456fe8afe03f" + "4e6f61c3-a7d8-4a18-bebc-53dbd0a4208d" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -1261,7 +507,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "a4d6c8a9-c7c7-4a2e-9e0e-52458640560c" + "81c60600-40af-473b-8620-d4c4c715e5a5" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1273,37 +519,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:27:07 GMT" + "Thu, 21 Mar 2024 23:20:53 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes\",\r\n \"value\": [\r\n {\r\n \"id\": \"tvmps_99359bb213b52f79e29eeb99b274bd925a9ae5a8237a8952a2d0f0f4adf39850_d\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/removenodepool/nodes/tvmps_99359bb213b52f79e29eeb99b274bd925a9ae5a8237a8952a2d0f0f4adf39850_d\",\r\n \"state\": \"starting\",\r\n \"schedulingState\": \"enabled\",\r\n \"stateTransitionTime\": \"2023-06-16T07:27:02.3511962Z\",\r\n \"allocationTime\": \"2023-06-16T07:27:01.0543025Z\",\r\n \"ipAddress\": \"10.218.0.5\",\r\n \"affinityId\": \"TVM:tvmps_99359bb213b52f79e29eeb99b274bd925a9ae5a8237a8952a2d0f0f4adf39850_d\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"totalTasksRun\": 0,\r\n \"totalTasksSucceeded\": 0,\r\n \"runningTasksCount\": 0,\r\n \"runningTaskSlotsCount\": 0,\r\n \"isDedicated\": true,\r\n \"endpointConfiguration\": {\r\n \"inboundEndpoints\": [\r\n {\r\n \"name\": \"Microsoft.WindowsAzure.Plugins.RemoteForwarder.RdpInput\",\r\n \"protocol\": \"tcp\",\r\n \"frontendPort\": 3389,\r\n \"backendPort\": 20000\r\n }\r\n ]\r\n },\r\n \"virtualMachineInfo\": {}\r\n },\r\n {\r\n \"id\": \"tvmps_cb5cf0edce9ac5ea65a74dcd179778a38e54c746055966bbb2538775d2b0cd5e_d\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/removenodepool/nodes/tvmps_cb5cf0edce9ac5ea65a74dcd179778a38e54c746055966bbb2538775d2b0cd5e_d\",\r\n \"state\": \"starting\",\r\n \"schedulingState\": \"enabled\",\r\n \"stateTransitionTime\": \"2023-06-16T07:27:02.3511962Z\",\r\n \"allocationTime\": \"2023-06-16T07:27:01.053302Z\",\r\n \"ipAddress\": \"10.218.0.4\",\r\n \"affinityId\": \"TVM:tvmps_cb5cf0edce9ac5ea65a74dcd179778a38e54c746055966bbb2538775d2b0cd5e_d\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"totalTasksRun\": 0,\r\n \"totalTasksSucceeded\": 0,\r\n \"runningTasksCount\": 0,\r\n \"runningTaskSlotsCount\": 0,\r\n \"isDedicated\": true,\r\n \"endpointConfiguration\": {\r\n \"inboundEndpoints\": [\r\n {\r\n \"name\": \"Microsoft.WindowsAzure.Plugins.RemoteForwarder.RdpInput\",\r\n \"protocol\": \"tcp\",\r\n \"frontendPort\": 3389,\r\n \"backendPort\": 20000\r\n }\r\n ]\r\n },\r\n \"virtualMachineInfo\": {}\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#nodes\",\r\n \"value\": [\r\n {\r\n \"id\": \"tvmps_3708cdaa2a05d779bae3056bb088fca8524fe60b0bdf4ac54d35c07221b5b237_d\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/removenodepool/nodes/tvmps_3708cdaa2a05d779bae3056bb088fca8524fe60b0bdf4ac54d35c07221b5b237_d\",\r\n \"state\": \"creating\",\r\n \"schedulingState\": \"enabled\",\r\n \"stateTransitionTime\": \"2024-03-21T23:20:47.4340959Z\",\r\n \"allocationTime\": \"2024-03-21T23:20:47.4341005Z\",\r\n \"ipAddress\": \"10.0.0.5\",\r\n \"affinityId\": \"TVM:tvmps_3708cdaa2a05d779bae3056bb088fca8524fe60b0bdf4ac54d35c07221b5b237_d\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"totalTasksRun\": 0,\r\n \"totalTasksSucceeded\": 0,\r\n \"runningTasksCount\": 0,\r\n \"runningTaskSlotsCount\": 0,\r\n \"isDedicated\": true,\r\n \"endpointConfiguration\": {\r\n \"inboundEndpoints\": [\r\n {\r\n \"name\": \"SSHRule.1\",\r\n \"protocol\": \"tcp\",\r\n \"publicIPAddress\": \"4.158.121.12\",\r\n \"publicFQDN\": \"dns3f3d3eb0-ee85-48ca-8d12-595bdf71fe4b-azurebatch-cloudservice.uksouth.cloudapp.azure.com\",\r\n \"frontendPort\": 50001,\r\n \"backendPort\": 22\r\n }\r\n ]\r\n },\r\n \"virtualMachineInfo\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": \"20.04.202403190\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"tvmps_8a85a1cbcc88762b26ac351d5956c84c086d4d2dc9b9056ad9636799ceba78ab_d\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/removenodepool/nodes/tvmps_8a85a1cbcc88762b26ac351d5956c84c086d4d2dc9b9056ad9636799ceba78ab_d\",\r\n \"state\": \"creating\",\r\n \"schedulingState\": \"enabled\",\r\n \"stateTransitionTime\": \"2024-03-21T23:20:47.4340418Z\",\r\n \"allocationTime\": \"2024-03-21T23:20:47.4340544Z\",\r\n \"ipAddress\": \"10.0.0.4\",\r\n \"affinityId\": \"TVM:tvmps_8a85a1cbcc88762b26ac351d5956c84c086d4d2dc9b9056ad9636799ceba78ab_d\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"totalTasksRun\": 0,\r\n \"totalTasksSucceeded\": 0,\r\n \"runningTasksCount\": 0,\r\n \"runningTaskSlotsCount\": 0,\r\n \"isDedicated\": true,\r\n \"endpointConfiguration\": {\r\n \"inboundEndpoints\": [\r\n {\r\n \"name\": \"SSHRule.0\",\r\n \"protocol\": \"tcp\",\r\n \"publicIPAddress\": \"4.158.121.12\",\r\n \"publicFQDN\": \"dns3f3d3eb0-ee85-48ca-8d12-595bdf71fe4b-azurebatch-cloudservice.uksouth.cloudapp.azure.com\",\r\n \"frontendPort\": 50000,\r\n \"backendPort\": 22\r\n }\r\n ]\r\n },\r\n \"virtualMachineInfo\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": \"20.04.202403190\"\r\n }\r\n }\r\n }\r\n ]\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/removenodepool/removenodes?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3JlbW92ZW5vZGVwb29sL3JlbW92ZW5vZGVzP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", + "RequestUri": "/pools/removenodepool/removenodes?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3JlbW92ZW5vZGVwb29sL3JlbW92ZW5vZGVzP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "84805831-3901-42fd-b826-11696ac8866a" + "c0b66616-9ebc-4e31-8eae-d14df170bda8" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:27:06 GMT" + "Thu, 21 Mar 2024 23:20:53 GMT" ], "x-ms-client-request-id": [ - "338f94f9-5c11-4f22-a5be-777c29f9c219" + "d103a363-1e39-45c1-b8ce-fa4190504e6d" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Type": [ @@ -1313,19 +559,19 @@ "187" ] }, - "RequestBody": "{\r\n \"nodeList\": [\r\n \"tvmps_99359bb213b52f79e29eeb99b274bd925a9ae5a8237a8952a2d0f0f4adf39850_d\",\r\n \"tvmps_cb5cf0edce9ac5ea65a74dcd179778a38e54c746055966bbb2538775d2b0cd5e_d\"\r\n ]\r\n}", + "RequestBody": "{\r\n \"nodeList\": [\r\n \"tvmps_3708cdaa2a05d779bae3056bb088fca8524fe60b0bdf4ac54d35c07221b5b237_d\",\r\n \"tvmps_8a85a1cbcc88762b26ac351d5956c84c086d4d2dc9b9056ad9636799ceba78ab_d\"\r\n ]\r\n}", "ResponseHeaders": { "Transfer-Encoding": [ "chunked" ], "ETag": [ - "0x8DB6E3B177E304A" + "0x8DC49FD8E00A512" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "5c6cda64-f9dd-4179-96a5-4f2afb62f409" + "89d1a831-51c6-486d-b8e1-c6aaab80e2da" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1337,315 +583,40 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/pools/removenodepool/removenodes" + "https://billstestba24326.uksouth.batch.azure.com/pools/removenodepool/removenodes" ], "Date": [ - "Fri, 16 Jun 2023 07:27:07 GMT" + "Thu, 21 Mar 2024 23:20:53 GMT" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:27:07 GMT" + "Thu, 21 Mar 2024 23:20:53 GMT" ] }, "ResponseBody": "", "StatusCode": 202 }, { - "RequestUri": "/pools/removenodepool/nodes?api-version=2023-05-01.17.0&$select=id%2Cstate", - "EncodedRequestUri": "L3Bvb2xzL3JlbW92ZW5vZGVwb29sL25vZGVzP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMCYkc2VsZWN0PWlkJTJDc3RhdGU=", - "RequestMethod": "GET", - "RequestHeaders": { - "client-request-id": [ - "818f8706-7c5b-4535-8751-eed97ecfbd20" - ], - "Accept-Language": [ - "en-US" - ], - "ocp-date": [ - "Fri, 16 Jun 2023 07:27:06 GMT" - ], - "x-ms-client-request-id": [ - "aa46c55a-4a88-4bec-951d-7ac639836380" - ], - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", - "AzurePowershell/Az1.0.0" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Transfer-Encoding": [ - "chunked" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "request-id": [ - "f35b2f7c-7df6-4582-9a0c-5838d8ca58bc" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "DataServiceVersion": [ - "3.0" - ], - "Date": [ - "Fri, 16 Jun 2023 07:27:07 GMT" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata" - ] - }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes\",\r\n \"value\": [\r\n {\r\n \"id\": \"tvmps_99359bb213b52f79e29eeb99b274bd925a9ae5a8237a8952a2d0f0f4adf39850_d\",\r\n \"state\": \"starting\",\r\n \"virtualMachineInfo\": {}\r\n },\r\n {\r\n \"id\": \"tvmps_cb5cf0edce9ac5ea65a74dcd179778a38e54c746055966bbb2538775d2b0cd5e_d\",\r\n \"state\": \"starting\",\r\n \"virtualMachineInfo\": {}\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/pools/removenodepool/nodes?api-version=2023-05-01.17.0&$select=id%2Cstate", - "EncodedRequestUri": "L3Bvb2xzL3JlbW92ZW5vZGVwb29sL25vZGVzP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMCYkc2VsZWN0PWlkJTJDc3RhdGU=", - "RequestMethod": "GET", - "RequestHeaders": { - "client-request-id": [ - "85750dd2-8b9d-4276-bcaf-6e9480b9bd1c" - ], - "Accept-Language": [ - "en-US" - ], - "ocp-date": [ - "Fri, 16 Jun 2023 07:27:07 GMT" - ], - "x-ms-client-request-id": [ - "3d0f85a4-498b-461f-8d5a-20f69652851c" - ], - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", - "AzurePowershell/Az1.0.0" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Transfer-Encoding": [ - "chunked" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "request-id": [ - "8d4dc7dd-cc8e-42e8-9fec-7fe9c2c225c7" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "DataServiceVersion": [ - "3.0" - ], - "Date": [ - "Fri, 16 Jun 2023 07:27:08 GMT" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata" - ] - }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes\",\r\n \"value\": [\r\n {\r\n \"id\": \"tvmps_99359bb213b52f79e29eeb99b274bd925a9ae5a8237a8952a2d0f0f4adf39850_d\",\r\n \"state\": \"starting\",\r\n \"virtualMachineInfo\": {}\r\n },\r\n {\r\n \"id\": \"tvmps_cb5cf0edce9ac5ea65a74dcd179778a38e54c746055966bbb2538775d2b0cd5e_d\",\r\n \"state\": \"starting\",\r\n \"virtualMachineInfo\": {}\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/pools/removenodepool/nodes?api-version=2023-05-01.17.0&$select=id%2Cstate", - "EncodedRequestUri": "L3Bvb2xzL3JlbW92ZW5vZGVwb29sL25vZGVzP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMCYkc2VsZWN0PWlkJTJDc3RhdGU=", - "RequestMethod": "GET", - "RequestHeaders": { - "client-request-id": [ - "b7a461c2-4d9c-41cd-81c0-30fa04d82b22" - ], - "Accept-Language": [ - "en-US" - ], - "ocp-date": [ - "Fri, 16 Jun 2023 07:27:09 GMT" - ], - "x-ms-client-request-id": [ - "decc0e63-223d-4195-9f9b-8a45a16108e8" - ], - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", - "AzurePowershell/Az1.0.0" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Transfer-Encoding": [ - "chunked" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "request-id": [ - "e35e07be-cbc2-4f1f-be85-1e5914914a2f" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "DataServiceVersion": [ - "3.0" - ], - "Date": [ - "Fri, 16 Jun 2023 07:27:10 GMT" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata" - ] - }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes\",\r\n \"value\": [\r\n {\r\n \"id\": \"tvmps_99359bb213b52f79e29eeb99b274bd925a9ae5a8237a8952a2d0f0f4adf39850_d\",\r\n \"state\": \"starting\",\r\n \"virtualMachineInfo\": {}\r\n },\r\n {\r\n \"id\": \"tvmps_cb5cf0edce9ac5ea65a74dcd179778a38e54c746055966bbb2538775d2b0cd5e_d\",\r\n \"state\": \"starting\",\r\n \"virtualMachineInfo\": {}\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/pools/removenodepool/nodes?api-version=2023-05-01.17.0&$select=id%2Cstate", - "EncodedRequestUri": "L3Bvb2xzL3JlbW92ZW5vZGVwb29sL25vZGVzP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMCYkc2VsZWN0PWlkJTJDc3RhdGU=", - "RequestMethod": "GET", - "RequestHeaders": { - "client-request-id": [ - "9bd49115-5875-4968-8d62-647bace9f11d" - ], - "Accept-Language": [ - "en-US" - ], - "ocp-date": [ - "Fri, 16 Jun 2023 07:27:10 GMT" - ], - "x-ms-client-request-id": [ - "d71b1454-7cd6-4eb5-b476-cff54ecc047f" - ], - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", - "AzurePowershell/Az1.0.0" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Transfer-Encoding": [ - "chunked" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "request-id": [ - "26915a90-4d75-4eb3-acf8-dd5ca57b92e8" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "DataServiceVersion": [ - "3.0" - ], - "Date": [ - "Fri, 16 Jun 2023 07:27:11 GMT" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata" - ] - }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes\",\r\n \"value\": [\r\n {\r\n \"id\": \"tvmps_99359bb213b52f79e29eeb99b274bd925a9ae5a8237a8952a2d0f0f4adf39850_d\",\r\n \"state\": \"starting\",\r\n \"virtualMachineInfo\": {}\r\n },\r\n {\r\n \"id\": \"tvmps_cb5cf0edce9ac5ea65a74dcd179778a38e54c746055966bbb2538775d2b0cd5e_d\",\r\n \"state\": \"starting\",\r\n \"virtualMachineInfo\": {}\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/pools/removenodepool/nodes?api-version=2023-05-01.17.0&$select=id%2Cstate", - "EncodedRequestUri": "L3Bvb2xzL3JlbW92ZW5vZGVwb29sL25vZGVzP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMCYkc2VsZWN0PWlkJTJDc3RhdGU=", - "RequestMethod": "GET", - "RequestHeaders": { - "client-request-id": [ - "67d917cc-d5e3-4c89-aabc-72ea74a1fbd0" - ], - "Accept-Language": [ - "en-US" - ], - "ocp-date": [ - "Fri, 16 Jun 2023 07:27:11 GMT" - ], - "x-ms-client-request-id": [ - "6f74493d-0177-4c5c-bba5-c0887b360336" - ], - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", - "AzurePowershell/Az1.0.0" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Transfer-Encoding": [ - "chunked" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "request-id": [ - "c3f47bbd-c9eb-41e5-93cb-d541aca9f123" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "DataServiceVersion": [ - "3.0" - ], - "Date": [ - "Fri, 16 Jun 2023 07:27:12 GMT" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata" - ] - }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes\",\r\n \"value\": [\r\n {\r\n \"id\": \"tvmps_99359bb213b52f79e29eeb99b274bd925a9ae5a8237a8952a2d0f0f4adf39850_d\",\r\n \"state\": \"starting\",\r\n \"virtualMachineInfo\": {}\r\n },\r\n {\r\n \"id\": \"tvmps_cb5cf0edce9ac5ea65a74dcd179778a38e54c746055966bbb2538775d2b0cd5e_d\",\r\n \"state\": \"starting\",\r\n \"virtualMachineInfo\": {}\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/pools/removenodepool/nodes?api-version=2023-05-01.17.0&$select=id%2Cstate", - "EncodedRequestUri": "L3Bvb2xzL3JlbW92ZW5vZGVwb29sL25vZGVzP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMCYkc2VsZWN0PWlkJTJDc3RhdGU=", + "RequestUri": "/pools/removenodepool/nodes?api-version=2024-02-01.19.0&$select=id%2Cstate", + "EncodedRequestUri": "L3Bvb2xzL3JlbW92ZW5vZGVwb29sL25vZGVzP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMCYkc2VsZWN0PWlkJTJDc3RhdGU=", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "5e510d9d-e370-40c2-912e-45b5def1edb1" + "d43da8b0-4f04-43c5-876e-626b77ea686e" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:27:12 GMT" + "Thu, 21 Mar 2024 23:20:53 GMT" ], "x-ms-client-request-id": [ - "283d80ab-0d64-477b-b3a5-0ba8fcfdd32f" + "045f32bb-e502-4c72-a763-24ed2db5cdf0" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -1658,7 +629,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "f42c5095-9e11-4f2e-8661-44992816f982" + "5a8dccb2-8b86-43ab-bffd-5cb457afa546" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1670,34 +641,34 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:27:13 GMT" + "Thu, 21 Mar 2024 23:20:53 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes\",\r\n \"value\": [\r\n {\r\n \"id\": \"tvmps_99359bb213b52f79e29eeb99b274bd925a9ae5a8237a8952a2d0f0f4adf39850_d\",\r\n \"state\": \"leavingpool\",\r\n \"virtualMachineInfo\": {}\r\n },\r\n {\r\n \"id\": \"tvmps_cb5cf0edce9ac5ea65a74dcd179778a38e54c746055966bbb2538775d2b0cd5e_d\",\r\n \"state\": \"leavingpool\",\r\n \"virtualMachineInfo\": {}\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#nodes\",\r\n \"value\": [\r\n {\r\n \"id\": \"tvmps_3708cdaa2a05d779bae3056bb088fca8524fe60b0bdf4ac54d35c07221b5b237_d\",\r\n \"state\": \"leavingpool\",\r\n \"virtualMachineInfo\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": \"20.04.202403190\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"tvmps_8a85a1cbcc88762b26ac351d5956c84c086d4d2dc9b9056ad9636799ceba78ab_d\",\r\n \"state\": \"leavingpool\",\r\n \"virtualMachineInfo\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": \"20.04.202403190\"\r\n }\r\n }\r\n }\r\n ]\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/removenodepool?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3JlbW92ZW5vZGVwb29sP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", + "RequestUri": "/pools/removenodepool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3JlbW92ZW5vZGVwb29sP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", "RequestMethod": "DELETE", "RequestHeaders": { "client-request-id": [ - "a5101c2d-03b7-4f98-8445-530e569b8502" + "bb05b422-d755-41b8-8ac6-a2da8a291f2f" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:27:12 GMT" + "Thu, 21 Mar 2024 23:20:53 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Length": [ @@ -1713,7 +684,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "0b10b385-92f5-41ab-8628-fcd1c0e54f4d" + "6f9750b0-5960-4d1d-9a1b-6fda4c27e95e" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1725,7 +696,7 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:27:13 GMT" + "Thu, 21 Mar 2024 23:20:53 GMT" ] }, "ResponseBody": "", @@ -1734,9 +705,9 @@ ], "Names": {}, "Variables": { - "SubscriptionId": "21abd678-18c5-4660-9fdd-8c5ba6b6fe1f", - "AZURE_BATCH_ACCOUNT": "hoppeeastasia2", - "AZURE_BATCH_ENDPOINT": "https://hoppeeastasia2.eastasia.batch.azure.com", - "AZURE_BATCH_RESOURCE_GROUP": "123" + "SubscriptionId": "6602ac9a-5dad-41bd-a792-592c704b6a31", + "AZURE_BATCH_ACCOUNT": "billstestba24326", + "AZURE_BATCH_ENDPOINT": "https://billstestba24326.uksouth.batch.azure.com", + "AZURE_BATCH_RESOURCE_GROUP": "automation" } } \ No newline at end of file diff --git a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ComputeNodeUserTests/TestComputeNodeUserEndToEnd.json b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ComputeNodeUserTests/TestComputeNodeUserEndToEnd.json index 0a591372c980..6c82c42deb5a 100644 --- a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ComputeNodeUserTests/TestComputeNodeUserEndToEnd.json +++ b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ComputeNodeUserTests/TestComputeNodeUserEndToEnd.json @@ -1,27 +1,610 @@ { "Entries": [ { - "RequestUri": "/pools/testPool/nodes?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", + "RequestUri": "/pools?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", + "RequestMethod": "POST", + "RequestHeaders": { + "client-request-id": [ + "44da58d5-0216-4a1f-bc31-b070d701fda9" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:15:38 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; charset=utf-8" + ], + "Content-Length": [ + "525" + ] + }, + "RequestBody": "{\r\n \"id\": \"computenodeuserendtoendpool\",\r\n \"vmSize\": \"STANDARD_D2S_V3\",\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"zonal\"\r\n }\r\n },\r\n \"targetDedicatedNodes\": 2,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableInterNodeCommunication\": false,\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "0x8DC4AACD7B49F15" + ], + "Location": [ + "https://billstestba24326.uksouth.batch.azure.com/pools/computenodeuserendtoendpool" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "c1b4d85c-f221-4688-b5e7-098206c687f8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "DataServiceId": [ + "https://billstestba24326.uksouth.batch.azure.com/pools/computenodeuserendtoendpool" + ], + "Date": [ + "Fri, 22 Mar 2024 20:15:38 GMT" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 20:15:39 GMT" + ] + }, + "ResponseBody": "", + "StatusCode": 201 + }, + { + "RequestUri": "/pools/computenodeuserendtoendpool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL2NvbXB1dGVub2RldXNlcmVuZHRvZW5kcG9vbD9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "29239061-4a17-4c2b-8148-732386735ba9" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:15:39 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "0x8DC4AACD7B49F15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "79294630-ffad-4132-98e8-fbd6ef005f44" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:15:38 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 20:15:39 GMT" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"computenodeuserendtoendpool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/computenodeuserendtoendpool\",\r\n \"eTag\": \"0x8DC4AACD7B49F15\",\r\n \"lastModified\": \"2024-03-22T20:15:39.3536789Z\",\r\n \"creationTime\": \"2024-03-22T20:15:39.3536777Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:15:39.3536777Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T20:15:39.3536789Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/pools/computenodeuserendtoendpool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL2NvbXB1dGVub2RldXNlcmVuZHRvZW5kcG9vbD9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "e1aae418-e5ce-4856-bcd3-1cff31594eab" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:15:44 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "0x8DC4AACD7B49F15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "e596ba8c-a87f-4c6d-98e8-df2ca1f296b6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:15:44 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 20:15:39 GMT" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"computenodeuserendtoendpool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/computenodeuserendtoendpool\",\r\n \"eTag\": \"0x8DC4AACD7B49F15\",\r\n \"lastModified\": \"2024-03-22T20:15:39.3536789Z\",\r\n \"creationTime\": \"2024-03-22T20:15:39.3536777Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:15:39.3536777Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T20:15:39.3536789Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/pools/computenodeuserendtoendpool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL2NvbXB1dGVub2RldXNlcmVuZHRvZW5kcG9vbD9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "2edd4787-80d1-47e3-a87b-55a6d9642e93" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:15:49 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "0x8DC4AACD7B49F15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "e19788fa-2b30-488d-8f53-8869ac4eebcb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:15:49 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 20:15:39 GMT" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"computenodeuserendtoendpool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/computenodeuserendtoendpool\",\r\n \"eTag\": \"0x8DC4AACD7B49F15\",\r\n \"lastModified\": \"2024-03-22T20:15:39.3536789Z\",\r\n \"creationTime\": \"2024-03-22T20:15:39.3536777Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:15:39.3536777Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T20:15:39.3536789Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/pools/computenodeuserendtoendpool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL2NvbXB1dGVub2RldXNlcmVuZHRvZW5kcG9vbD9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "e1816c42-2896-4014-a1a1-464200f88789" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:15:55 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "0x8DC4AACD7B49F15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "89116d9a-ad52-479c-923b-2c84307008a5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:15:54 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 20:15:39 GMT" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"computenodeuserendtoendpool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/computenodeuserendtoendpool\",\r\n \"eTag\": \"0x8DC4AACD7B49F15\",\r\n \"lastModified\": \"2024-03-22T20:15:39.3536789Z\",\r\n \"creationTime\": \"2024-03-22T20:15:39.3536777Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:15:39.3536777Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T20:15:39.3536789Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/pools/computenodeuserendtoendpool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL2NvbXB1dGVub2RldXNlcmVuZHRvZW5kcG9vbD9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "d56caa2f-ed94-407e-b241-c9da494fc1ba" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:16:00 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "0x8DC4AACD7B49F15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "7a8cd2a0-5a86-48ab-ade2-502930fa3f7e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:16:00 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 20:15:39 GMT" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"computenodeuserendtoendpool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/computenodeuserendtoendpool\",\r\n \"eTag\": \"0x8DC4AACD7B49F15\",\r\n \"lastModified\": \"2024-03-22T20:15:39.3536789Z\",\r\n \"creationTime\": \"2024-03-22T20:15:39.3536777Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:15:39.3536777Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T20:15:39.3536789Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/pools/computenodeuserendtoendpool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL2NvbXB1dGVub2RldXNlcmVuZHRvZW5kcG9vbD9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "6bee82ff-d2fd-46b4-b811-299362fe9944" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:16:05 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "0x8DC4AACD7B49F15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "23e96a0f-9179-4bbd-9af0-5d323c1f0d76" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:16:05 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 20:15:39 GMT" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"computenodeuserendtoendpool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/computenodeuserendtoendpool\",\r\n \"eTag\": \"0x8DC4AACD7B49F15\",\r\n \"lastModified\": \"2024-03-22T20:15:39.3536789Z\",\r\n \"creationTime\": \"2024-03-22T20:15:39.3536777Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:15:39.3536777Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T20:15:39.3536789Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 2,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/pools/computenodeuserendtoendpool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL2NvbXB1dGVub2RldXNlcmVuZHRvZW5kcG9vbD9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "72aa04c3-4425-46ff-b2c4-e21f16ec4aa7" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:16:10 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "0x8DC4AACD7B49F15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "4d2272e5-e734-4957-bd63-9abedb923455" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:16:10 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 20:15:39 GMT" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"computenodeuserendtoendpool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/computenodeuserendtoendpool\",\r\n \"eTag\": \"0x8DC4AACD7B49F15\",\r\n \"lastModified\": \"2024-03-22T20:15:39.3536789Z\",\r\n \"creationTime\": \"2024-03-22T20:15:39.3536777Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:15:39.3536777Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T20:16:06.0759988Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 2,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\",\r\n \"currentNodeCommunicationMode\": \"classic\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/pools/computenodeuserendtoendpool/nodes?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL2NvbXB1dGVub2RldXNlcmVuZHRvZW5kcG9vbC9ub2Rlcz9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "d1cd3577-9d79-4d53-86bd-c7e806940820" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:16:16 GMT" + ], + "x-ms-client-request-id": [ + "667f9695-8527-4f77-97ef-59214b8bc1f0" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "137803e0-8a55-48fe-9a2a-615a62f2e91b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:16:17 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#nodes\",\r\n \"value\": [\r\n {\r\n \"id\": \"tvmps_2c1573f7c24c87775aeb6dc358155b0d268ce2eb3657f6666d47b056db556a1a_d\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/computenodeuserendtoendpool/nodes/tvmps_2c1573f7c24c87775aeb6dc358155b0d268ce2eb3657f6666d47b056db556a1a_d\",\r\n \"state\": \"starting\",\r\n \"schedulingState\": \"enabled\",\r\n \"stateTransitionTime\": \"2024-03-22T20:16:16.0625742Z\",\r\n \"allocationTime\": \"2024-03-22T20:16:05.6872276Z\",\r\n \"ipAddress\": \"10.0.0.5\",\r\n \"affinityId\": \"TVM:tvmps_2c1573f7c24c87775aeb6dc358155b0d268ce2eb3657f6666d47b056db556a1a_d\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"totalTasksRun\": 0,\r\n \"totalTasksSucceeded\": 0,\r\n \"runningTasksCount\": 0,\r\n \"runningTaskSlotsCount\": 0,\r\n \"isDedicated\": true,\r\n \"endpointConfiguration\": {\r\n \"inboundEndpoints\": [\r\n {\r\n \"name\": \"SSHRule.1\",\r\n \"protocol\": \"tcp\",\r\n \"publicIPAddress\": \"4.158.32.156\",\r\n \"publicFQDN\": \"dns895df3e0-c1d8-4d4c-a604-de3c8ad5fd8a-azurebatch-cloudservice.uksouth.cloudapp.azure.com\",\r\n \"frontendPort\": 50001,\r\n \"backendPort\": 22\r\n }\r\n ]\r\n },\r\n \"virtualMachineInfo\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": \"20.04.202403190\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"tvmps_50d3229810be3b8f328e031d6140854c2e5c353305da60522d276b34a1e8d129_d\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/computenodeuserendtoendpool/nodes/tvmps_50d3229810be3b8f328e031d6140854c2e5c353305da60522d276b34a1e8d129_d\",\r\n \"state\": \"starting\",\r\n \"schedulingState\": \"enabled\",\r\n \"stateTransitionTime\": \"2024-03-22T20:16:16.0625742Z\",\r\n \"allocationTime\": \"2024-03-22T20:16:05.687272Z\",\r\n \"ipAddress\": \"10.0.0.4\",\r\n \"affinityId\": \"TVM:tvmps_50d3229810be3b8f328e031d6140854c2e5c353305da60522d276b34a1e8d129_d\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"totalTasksRun\": 0,\r\n \"totalTasksSucceeded\": 0,\r\n \"runningTasksCount\": 0,\r\n \"runningTaskSlotsCount\": 0,\r\n \"isDedicated\": true,\r\n \"endpointConfiguration\": {\r\n \"inboundEndpoints\": [\r\n {\r\n \"name\": \"SSHRule.0\",\r\n \"protocol\": \"tcp\",\r\n \"publicIPAddress\": \"4.158.32.156\",\r\n \"publicFQDN\": \"dns895df3e0-c1d8-4d4c-a604-de3c8ad5fd8a-azurebatch-cloudservice.uksouth.cloudapp.azure.com\",\r\n \"frontendPort\": 50000,\r\n \"backendPort\": 22\r\n }\r\n ]\r\n },\r\n \"virtualMachineInfo\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": \"20.04.202403190\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/pools/computenodeuserendtoendpool/nodes/tvmps_2c1573f7c24c87775aeb6dc358155b0d268ce2eb3657f6666d47b056db556a1a_d?api-version=2024-02-01.19.0&$select=id%2Cstate", + "EncodedRequestUri": "L3Bvb2xzL2NvbXB1dGVub2RldXNlcmVuZHRvZW5kcG9vbC9ub2Rlcy90dm1wc18yYzE1NzNmN2MyNGM4Nzc3NWFlYjZkYzM1ODE1NWIwZDI2OGNlMmViMzY1N2Y2NjY2ZDQ3YjA1NmRiNTU2YTFhX2Q/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4wJiRzZWxlY3Q9aWQlMkNzdGF0ZQ==", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "08037996-103a-4dad-b4eb-bd553c255986" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:16:18 GMT" + ], + "x-ms-client-request-id": [ + "28493fd5-817a-48c9-af7d-0f00176fd9aa" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "8486e2a7-1744-4d20-b72c-0fa46b458a72" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:16:18 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_2c1573f7c24c87775aeb6dc358155b0d268ce2eb3657f6666d47b056db556a1a_d\",\r\n \"state\": \"starting\",\r\n \"virtualMachineInfo\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": \"20.04.202403190\"\r\n }\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/pools/computenodeuserendtoendpool/nodes/tvmps_2c1573f7c24c87775aeb6dc358155b0d268ce2eb3657f6666d47b056db556a1a_d?api-version=2024-02-01.19.0&$select=id%2Cstate", + "EncodedRequestUri": "L3Bvb2xzL2NvbXB1dGVub2RldXNlcmVuZHRvZW5kcG9vbC9ub2Rlcy90dm1wc18yYzE1NzNmN2MyNGM4Nzc3NWFlYjZkYzM1ODE1NWIwZDI2OGNlMmViMzY1N2Y2NjY2ZDQ3YjA1NmRiNTU2YTFhX2Q/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4wJiRzZWxlY3Q9aWQlMkNzdGF0ZQ==", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "a2e0ec22-1bce-4ba4-bdfa-3295255323c1" + "9c572c3d-b028-46b0-81da-6490468d69f0" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:13 GMT" + "Fri, 22 Mar 2024 20:16:23 GMT" ], "x-ms-client-request-id": [ - "cd4db49b-f9ee-4d24-bbfb-a9331301c77c" + "41b6876e-e6e4-48f7-b642-b25196ec883a" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -34,7 +617,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "812a6e6a-cb63-4559-8224-10cfb554bb77" + "732da607-fcc1-4c27-899d-17907157ec6a" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -46,37 +629,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:36:15 GMT" + "Fri, 22 Mar 2024 20:16:23 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes\",\r\n \"value\": [\r\n {\r\n \"id\": \"tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"state\": \"idle\",\r\n \"schedulingState\": \"enabled\",\r\n \"stateTransitionTime\": \"2023-06-16T07:25:22.287975Z\",\r\n \"lastBootTime\": \"2023-06-16T07:25:22.018509Z\",\r\n \"allocationTime\": \"2023-06-13T07:46:20.7222354Z\",\r\n \"ipAddress\": \"10.218.0.6\",\r\n \"affinityId\": \"TVM:tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"totalTasksRun\": 9,\r\n \"totalTasksSucceeded\": 6,\r\n \"runningTasksCount\": 0,\r\n \"runningTaskSlotsCount\": 0,\r\n \"recentTasks\": [],\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"pool\",\r\n \"elevationLevel\": \"nonadmin\"\r\n }\r\n },\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": true\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2023-06-16T07:25:22.194236Z\",\r\n \"endTime\": \"2023-06-16T07:25:22.272356Z\",\r\n \"exitCode\": 0,\r\n \"result\": \"success\",\r\n \"retryCount\": 0\r\n },\r\n \"certificateReferences\": [],\r\n \"isDedicated\": true,\r\n \"endpointConfiguration\": {\r\n \"inboundEndpoints\": [\r\n {\r\n \"name\": \"Microsoft.WindowsAzure.Plugins.RemoteForwarder.RdpInput\",\r\n \"protocol\": \"tcp\",\r\n \"frontendPort\": 3389,\r\n \"backendPort\": 20000\r\n }\r\n ]\r\n },\r\n \"nodeAgentInfo\": {\r\n \"lastUpdateTime\": \"2023-06-13T07:53:19.121974Z\",\r\n \"version\": \"1.10.0\"\r\n },\r\n \"virtualMachineInfo\": {}\r\n },\r\n {\r\n \"id\": \"tvmps_c3cdeb8c344b8b5cca4c1052f8fd5c239f09cffd64837afc6cbb2e073e15dab3_d\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/testPool/nodes/tvmps_c3cdeb8c344b8b5cca4c1052f8fd5c239f09cffd64837afc6cbb2e073e15dab3_d\",\r\n \"state\": \"idle\",\r\n \"schedulingState\": \"enabled\",\r\n \"stateTransitionTime\": \"2023-06-16T07:27:06.090722Z\",\r\n \"lastBootTime\": \"2023-06-16T07:27:04.928724Z\",\r\n \"allocationTime\": \"2023-06-13T07:46:20.7222354Z\",\r\n \"ipAddress\": \"10.218.0.5\",\r\n \"affinityId\": \"TVM:tvmps_c3cdeb8c344b8b5cca4c1052f8fd5c239f09cffd64837afc6cbb2e073e15dab3_d\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"totalTasksRun\": 7,\r\n \"totalTasksSucceeded\": 3,\r\n \"runningTasksCount\": 0,\r\n \"runningTaskSlotsCount\": 0,\r\n \"recentTasks\": [],\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"pool\",\r\n \"elevationLevel\": \"nonadmin\"\r\n }\r\n },\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": true\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2023-06-16T07:27:05.981347Z\",\r\n \"endTime\": \"2023-06-16T07:27:06.075128Z\",\r\n \"exitCode\": 0,\r\n \"result\": \"success\",\r\n \"retryCount\": 0\r\n },\r\n \"certificateReferences\": [],\r\n \"isDedicated\": true,\r\n \"endpointConfiguration\": {\r\n \"inboundEndpoints\": [\r\n {\r\n \"name\": \"Microsoft.WindowsAzure.Plugins.RemoteForwarder.RdpInput\",\r\n \"protocol\": \"tcp\",\r\n \"frontendPort\": 3389,\r\n \"backendPort\": 20000\r\n }\r\n ]\r\n },\r\n \"nodeAgentInfo\": {\r\n \"lastUpdateTime\": \"2023-06-13T07:48:55.051071Z\",\r\n \"version\": \"1.10.0\"\r\n },\r\n \"virtualMachineInfo\": {}\r\n },\r\n {\r\n \"id\": \"tvmps_cf431502d0b7a008b6d2fc36bf12888efcbda4c9272347c458f1792e50276106_d\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/testPool/nodes/tvmps_cf431502d0b7a008b6d2fc36bf12888efcbda4c9272347c458f1792e50276106_d\",\r\n \"state\": \"idle\",\r\n \"schedulingState\": \"enabled\",\r\n \"stateTransitionTime\": \"2023-06-16T07:19:26.25374Z\",\r\n \"lastBootTime\": \"2023-06-13T07:52:52.129232Z\",\r\n \"allocationTime\": \"2023-06-13T07:46:20.7222354Z\",\r\n \"ipAddress\": \"10.218.0.4\",\r\n \"affinityId\": \"TVM:tvmps_cf431502d0b7a008b6d2fc36bf12888efcbda4c9272347c458f1792e50276106_d\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"totalTasksRun\": 8,\r\n \"totalTasksSucceeded\": 2,\r\n \"runningTasksCount\": 0,\r\n \"runningTaskSlotsCount\": 0,\r\n \"recentTasks\": [\r\n {\r\n \"taskUrl\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobs/testJobCompletesWhenTaskFails/tasks/taskId-1\",\r\n \"jobId\": \"testJobCompletesWhenTaskFails\",\r\n \"taskId\": \"taskId-1\",\r\n \"taskState\": \"completed\",\r\n \"executionInfo\": {\r\n \"startTime\": \"2023-06-16T07:19:26.144372Z\",\r\n \"endTime\": \"2023-06-16T07:19:26.222489Z\",\r\n \"exitCode\": 3,\r\n \"failureInfo\": {\r\n \"category\": \"UserError\",\r\n \"code\": \"FailureExitCode\",\r\n \"message\": \"The task exited with an exit code representing a failure\",\r\n \"details\": [\r\n {\r\n \"name\": \"Message\",\r\n \"value\": \"The task process exited with an unexpected exit code\"\r\n },\r\n {\r\n \"name\": \"AdditionalErrorCode\",\r\n \"value\": \"FailureExitCode\"\r\n }\r\n ]\r\n },\r\n \"result\": \"failure\",\r\n \"retryCount\": 0,\r\n \"requeueCount\": 0\r\n }\r\n }\r\n ],\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"pool\",\r\n \"elevationLevel\": \"nonadmin\"\r\n }\r\n },\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": true\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2023-06-13T07:52:53.742761Z\",\r\n \"endTime\": \"2023-06-13T07:52:53.805263Z\",\r\n \"exitCode\": 0,\r\n \"result\": \"success\",\r\n \"retryCount\": 0\r\n },\r\n \"certificateReferences\": [],\r\n \"isDedicated\": true,\r\n \"endpointConfiguration\": {\r\n \"inboundEndpoints\": [\r\n {\r\n \"name\": \"Microsoft.WindowsAzure.Plugins.RemoteForwarder.RdpInput\",\r\n \"protocol\": \"tcp\",\r\n \"frontendPort\": 3389,\r\n \"backendPort\": 20000\r\n }\r\n ]\r\n },\r\n \"nodeAgentInfo\": {\r\n \"lastUpdateTime\": \"2023-06-13T07:52:52.129232Z\",\r\n \"version\": \"1.10.0\"\r\n },\r\n \"virtualMachineInfo\": {}\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_2c1573f7c24c87775aeb6dc358155b0d268ce2eb3657f6666d47b056db556a1a_d\",\r\n \"state\": \"idle\",\r\n \"virtualMachineInfo\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": \"20.04.202403190\"\r\n }\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d/users?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bXBzXzY3NTkwZjZmZmRjMzc4OTFhYTA5ZGUwN2E0ZDE0ZTUxM2NlNzVmMmU5M2M3M2Y3ZjU1NmNkZjAwNzEwZDdiMmRfZC91c2Vycz9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjA=", + "RequestUri": "/pools/computenodeuserendtoendpool/nodes/tvmps_2c1573f7c24c87775aeb6dc358155b0d268ce2eb3657f6666d47b056db556a1a_d/users?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL2NvbXB1dGVub2RldXNlcmVuZHRvZW5kcG9vbC9ub2Rlcy90dm1wc18yYzE1NzNmN2MyNGM4Nzc3NWFlYjZkYzM1ODE1NWIwZDI2OGNlMmViMzY1N2Y2NjY2ZDQ3YjA1NmRiNTU2YTFhX2QvdXNlcnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "3c3628b8-fdda-4d76-a580-5809fa71e47b" + "d8e6d50e-432e-4a78-b985-32248bc339d5" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:14 GMT" + "Fri, 22 Mar 2024 20:16:23 GMT" ], "x-ms-client-request-id": [ - "f225c2fe-06f9-475d-af55-f958cb2c5d6c" + "86fb99c9-5d7d-4e2a-bd51-16709e47338e" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Type": [ @@ -92,13 +675,13 @@ "chunked" ], "Location": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d/users/userendtoend" + "https://billstestba24326.uksouth.batch.azure.com/pools/computenodeuserendtoendpool/nodes/tvmps_2c1573f7c24c87775aeb6dc358155b0d268ce2eb3657f6666d47b056db556a1a_d/users/userendtoend" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "a40dcaf3-242b-44d3-b164-d7ea343de36d" + "8ccfba75-da20-4b99-8625-983b66a21009" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -110,37 +693,37 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d/users/userendtoend" + "https://billstestba24326.uksouth.batch.azure.com/pools/computenodeuserendtoendpool/nodes/tvmps_2c1573f7c24c87775aeb6dc358155b0d268ce2eb3657f6666d47b056db556a1a_d/users/userendtoend" ], "Date": [ - "Fri, 16 Jun 2023 07:36:15 GMT" + "Fri, 22 Mar 2024 20:16:23 GMT" ] }, "ResponseBody": "", "StatusCode": 201 }, { - "RequestUri": "/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d/users/userendtoend?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bXBzXzY3NTkwZjZmZmRjMzc4OTFhYTA5ZGUwN2E0ZDE0ZTUxM2NlNzVmMmU5M2M3M2Y3ZjU1NmNkZjAwNzEwZDdiMmRfZC91c2Vycy91c2VyZW5kdG9lbmQ/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/pools/computenodeuserendtoendpool/nodes/tvmps_2c1573f7c24c87775aeb6dc358155b0d268ce2eb3657f6666d47b056db556a1a_d/users/userendtoend?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL2NvbXB1dGVub2RldXNlcmVuZHRvZW5kcG9vbC9ub2Rlcy90dm1wc18yYzE1NzNmN2MyNGM4Nzc3NWFlYjZkYzM1ODE1NWIwZDI2OGNlMmViMzY1N2Y2NjY2ZDQ3YjA1NmRiNTU2YTFhX2QvdXNlcnMvdXNlcmVuZHRvZW5kP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", "RequestMethod": "PUT", "RequestHeaders": { "client-request-id": [ - "ab6eccd5-d8c8-4cc0-85fe-eccb1fe3f0bf" + "cff62c1c-11a9-4239-bceb-5372edf53bac" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:14 GMT" + "Fri, 22 Mar 2024 20:16:23 GMT" ], "x-ms-client-request-id": [ - "4dc99a53-4c34-4781-bd53-4e63a0580937" + "15c2f8da-927f-4075-9e5e-8406d93b1d01" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Type": [ @@ -150,7 +733,7 @@ "87" ] }, - "RequestBody": "{\r\n \"password\": \"Abcdefghijk1234!\",\r\n \"expiryTime\": \"2023-06-21T07:36:14.9257797Z\"\r\n}", + "RequestBody": "{\r\n \"password\": \"Abcdefghijk1234!\",\r\n \"expiryTime\": \"2024-03-27T20:16:23.9790104Z\"\r\n}", "ResponseHeaders": { "Transfer-Encoding": [ "chunked" @@ -159,7 +742,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "9ab1dd2f-6405-44f0-b67d-860c1e74887a" + "761eefb4-e345-4d7f-b111-7673c7134eb0" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -171,37 +754,37 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d/users/userendtoend" + "https://billstestba24326.uksouth.batch.azure.com/pools/computenodeuserendtoendpool/nodes/tvmps_2c1573f7c24c87775aeb6dc358155b0d268ce2eb3657f6666d47b056db556a1a_d/users/userendtoend" ], "Date": [ - "Fri, 16 Jun 2023 07:36:15 GMT" + "Fri, 22 Mar 2024 20:16:24 GMT" ] }, "ResponseBody": "", "StatusCode": 200 }, { - "RequestUri": "/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d/users/userendtoend?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bXBzXzY3NTkwZjZmZmRjMzc4OTFhYTA5ZGUwN2E0ZDE0ZTUxM2NlNzVmMmU5M2M3M2Y3ZjU1NmNkZjAwNzEwZDdiMmRfZC91c2Vycy91c2VyZW5kdG9lbmQ/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/pools/computenodeuserendtoendpool/nodes/tvmps_2c1573f7c24c87775aeb6dc358155b0d268ce2eb3657f6666d47b056db556a1a_d/users/userendtoend?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL2NvbXB1dGVub2RldXNlcmVuZHRvZW5kcG9vbC9ub2Rlcy90dm1wc18yYzE1NzNmN2MyNGM4Nzc3NWFlYjZkYzM1ODE1NWIwZDI2OGNlMmViMzY1N2Y2NjY2ZDQ3YjA1NmRiNTU2YTFhX2QvdXNlcnMvdXNlcmVuZHRvZW5kP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", "RequestMethod": "DELETE", "RequestHeaders": { "client-request-id": [ - "616265d4-a0e7-465f-a950-34c8c97b8161" + "4947e5cc-a8d8-491d-853e-ac0a69e43bc8" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:15 GMT" + "Fri, 22 Mar 2024 20:16:24 GMT" ], "x-ms-client-request-id": [ - "0073d3bb-8272-47c3-9293-84bb7f6c9216" + "a6ad8147-d228-49cc-ba82-a380a8ab3484" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Length": [ @@ -217,7 +800,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "ba86c8de-fdbd-45d9-b0f0-b78a37fd5ff0" + "eca512f4-fbe0-43bf-b491-4fc4bff67b85" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -229,34 +812,34 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:36:16 GMT" + "Fri, 22 Mar 2024 20:16:24 GMT" ] }, "ResponseBody": "", "StatusCode": 200 }, { - "RequestUri": "/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d/users/userendtoend?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bXBzXzY3NTkwZjZmZmRjMzc4OTFhYTA5ZGUwN2E0ZDE0ZTUxM2NlNzVmMmU5M2M3M2Y3ZjU1NmNkZjAwNzEwZDdiMmRfZC91c2Vycy91c2VyZW5kdG9lbmQ/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/pools/computenodeuserendtoendpool/nodes/tvmps_2c1573f7c24c87775aeb6dc358155b0d268ce2eb3657f6666d47b056db556a1a_d/users/userendtoend?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL2NvbXB1dGVub2RldXNlcmVuZHRvZW5kcG9vbC9ub2Rlcy90dm1wc18yYzE1NzNmN2MyNGM4Nzc3NWFlYjZkYzM1ODE1NWIwZDI2OGNlMmViMzY1N2Y2NjY2ZDQ3YjA1NmRiNTU2YTFhX2QvdXNlcnMvdXNlcmVuZHRvZW5kP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", "RequestMethod": "DELETE", "RequestHeaders": { "client-request-id": [ - "359670f6-7665-4bc0-b3a5-5553930303fe" + "87f8bae9-d54b-4cae-aa58-e70fafafa0d9" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:15 GMT" + "Fri, 22 Mar 2024 20:16:24 GMT" ], "x-ms-client-request-id": [ - "d0999b26-bf1d-42e5-8b1e-b5975b8258d3" + "623ca2b3-de32-43a0-9a89-8f28911c0cb1" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Length": [ @@ -269,7 +852,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "96708828-76f8-4198-8216-8defa65af7de" + "eebd1eeb-2cf1-4ba8-a77a-a08b7604412c" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -281,24 +864,76 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:36:16 GMT" + "Fri, 22 Mar 2024 20:16:24 GMT" ], "Content-Length": [ - "346" + "347" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element\",\r\n \"code\": \"NodeUserNotFound\",\r\n \"message\": {\r\n \"lang\": \"en-US\",\r\n \"value\": \"The specified node user does not exist.\\nRequestId:96708828-76f8-4198-8216-8defa65af7de\\nTime:2023-06-16T07:36:17.0215063Z\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element\",\r\n \"code\": \"NodeUserNotFound\",\r\n \"message\": {\r\n \"lang\": \"en-US\",\r\n \"value\": \"The specified node user does not exist.\\nRequestId:eebd1eeb-2cf1-4ba8-a77a-a08b7604412c\\nTime:2024-03-22T20:16:25.1188839Z\"\r\n }\r\n}", "StatusCode": 404 + }, + { + "RequestUri": "/pools/computenodeuserendtoendpool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL2NvbXB1dGVub2RldXNlcmVuZHRvZW5kcG9vbD9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", + "RequestMethod": "DELETE", + "RequestHeaders": { + "client-request-id": [ + "fd020c52-569e-41c9-b83a-c6e5e203bae6" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:16:24 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ], + "Content-Length": [ + "0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "ff596998-f1dc-4b8b-a735-76095773b3ad" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:16:24 GMT" + ] + }, + "ResponseBody": "", + "StatusCode": 202 } ], "Names": {}, "Variables": { - "SubscriptionId": "21abd678-18c5-4660-9fdd-8c5ba6b6fe1f", - "AZURE_BATCH_ACCOUNT": "hoppeeastasia2", - "AZURE_BATCH_ENDPOINT": "https://hoppeeastasia2.eastasia.batch.azure.com", - "AZURE_BATCH_RESOURCE_GROUP": "123" + "SubscriptionId": "6602ac9a-5dad-41bd-a792-592c704b6a31", + "AZURE_BATCH_ACCOUNT": "billstestba24326", + "AZURE_BATCH_ENDPOINT": "https://billstestba24326.uksouth.batch.azure.com", + "AZURE_BATCH_RESOURCE_GROUP": "automation" } } \ No newline at end of file diff --git a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.FileTests/TestGetRemoteDesktopProtocolFile.json b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.FileTests/TestGetRemoteDesktopProtocolFile.json index 63e272c02dd7..8ca2fe3eca59 100644 --- a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.FileTests/TestGetRemoteDesktopProtocolFile.json +++ b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.FileTests/TestGetRemoteDesktopProtocolFile.json @@ -1,27 +1,207 @@ { "Entries": [ { - "RequestUri": "/pools/testPool/nodes?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", + "RequestUri": "/pools?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", + "RequestMethod": "POST", + "RequestHeaders": { + "client-request-id": [ + "df1368db-f9f7-4326-a1f4-e0b95812519e" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 22:41:48 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; charset=utf-8" + ], + "Content-Length": [ + "553" + ] + }, + "RequestBody": "{\r\n \"id\": \"remotedesktopprotocolfilepool\",\r\n \"vmSize\": \"STANDARD_D2S_V3\",\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"zonal\"\r\n }\r\n },\r\n \"targetDedicatedNodes\": 2,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "0x8DC4AC142CC3E39" + ], + "Location": [ + "https://billstestba24326.uksouth.batch.azure.com/pools/remotedesktopprotocolfilepool" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "a6caedff-2ffc-49d2-abfb-052af1debc38" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "DataServiceId": [ + "https://billstestba24326.uksouth.batch.azure.com/pools/remotedesktopprotocolfilepool" + ], + "Date": [ + "Fri, 22 Mar 2024 22:41:48 GMT" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 22:41:48 GMT" + ] + }, + "ResponseBody": "", + "StatusCode": 201 + }, + { + "RequestUri": "/pools/remotedesktopprotocolfilepool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3JlbW90ZWRlc2t0b3Bwcm90b2NvbGZpbGVwb29sP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "b160770e-e800-483d-834e-07073da23f94" + "0a884d59-dc87-4bcb-8ff6-bf842e9aef2b" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:23:13 GMT" + "Fri, 22 Mar 2024 22:41:48 GMT" ], - "x-ms-client-request-id": [ - "371e4943-c211-440f-b4dd-83b527449dd7" + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "0x8DC4AC142CC3E39" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "41fa9cd1-605f-4e4c-951c-d9e5f6eca02e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 22:41:48 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 22:41:48 GMT" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"remotedesktopprotocolfilepool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/remotedesktopprotocolfilepool\",\r\n \"eTag\": \"0x8DC4AC142CC3E39\",\r\n \"lastModified\": \"2024-03-22T22:41:48.9592889Z\",\r\n \"creationTime\": \"2024-03-22T22:41:48.9592875Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T22:41:48.9592875Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T22:41:48.9592889Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/pools/remotedesktopprotocolfilepool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3JlbW90ZWRlc2t0b3Bwcm90b2NvbGZpbGVwb29sP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "216a0b7a-b038-4454-92a1-7f12d3c7920e" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 22:41:54 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "0x8DC4AC142CC3E39" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "0d37dd0c-6877-4c8c-b51b-43c1e955a782" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 22:41:54 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 22:41:48 GMT" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"remotedesktopprotocolfilepool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/remotedesktopprotocolfilepool\",\r\n \"eTag\": \"0x8DC4AC142CC3E39\",\r\n \"lastModified\": \"2024-03-22T22:41:48.9592889Z\",\r\n \"creationTime\": \"2024-03-22T22:41:48.9592875Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T22:41:48.9592875Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T22:41:48.9592889Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/pools/remotedesktopprotocolfilepool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3JlbW90ZWRlc2t0b3Bwcm90b2NvbGZpbGVwb29sP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "74d19f11-6387-4b39-94a9-65e96a5bdaa6" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 22:41:59 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -30,11 +210,14 @@ "Transfer-Encoding": [ "chunked" ], + "ETag": [ + "0x8DC4AC142CC3E39" + ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "ac3da113-8c37-4643-8e15-2bc6e3c721c5" + "820a1eb0-d9e0-4821-af86-9fc981ff52a3" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -46,37 +229,272 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:23:14 GMT" + "Fri, 22 Mar 2024 22:41:59 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 22:41:48 GMT" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes\",\r\n \"value\": [\r\n {\r\n \"id\": \"tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"state\": \"idle\",\r\n \"schedulingState\": \"enabled\",\r\n \"stateTransitionTime\": \"2023-06-16T06:54:12.745569Z\",\r\n \"lastBootTime\": \"2023-06-16T06:54:12.462819Z\",\r\n \"allocationTime\": \"2023-06-13T07:46:20.7222354Z\",\r\n \"ipAddress\": \"10.218.0.6\",\r\n \"affinityId\": \"TVM:tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"totalTasksRun\": 9,\r\n \"totalTasksSucceeded\": 6,\r\n \"runningTasksCount\": 0,\r\n \"runningTaskSlotsCount\": 0,\r\n \"recentTasks\": [],\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"pool\",\r\n \"elevationLevel\": \"nonadmin\"\r\n }\r\n },\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": true\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2023-06-16T06:54:12.651819Z\",\r\n \"endTime\": \"2023-06-16T06:54:12.729951Z\",\r\n \"exitCode\": 0,\r\n \"result\": \"success\",\r\n \"retryCount\": 0\r\n },\r\n \"certificateReferences\": [],\r\n \"isDedicated\": true,\r\n \"endpointConfiguration\": {\r\n \"inboundEndpoints\": [\r\n {\r\n \"name\": \"Microsoft.WindowsAzure.Plugins.RemoteForwarder.RdpInput\",\r\n \"protocol\": \"tcp\",\r\n \"frontendPort\": 3389,\r\n \"backendPort\": 20000\r\n }\r\n ]\r\n },\r\n \"nodeAgentInfo\": {\r\n \"lastUpdateTime\": \"2023-06-13T07:53:19.121974Z\",\r\n \"version\": \"1.10.0\"\r\n },\r\n \"virtualMachineInfo\": {}\r\n },\r\n {\r\n \"id\": \"tvmps_c3cdeb8c344b8b5cca4c1052f8fd5c239f09cffd64837afc6cbb2e073e15dab3_d\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/testPool/nodes/tvmps_c3cdeb8c344b8b5cca4c1052f8fd5c239f09cffd64837afc6cbb2e073e15dab3_d\",\r\n \"state\": \"idle\",\r\n \"schedulingState\": \"enabled\",\r\n \"stateTransitionTime\": \"2023-06-16T07:06:23.603746Z\",\r\n \"lastBootTime\": \"2023-06-16T06:55:27.593709Z\",\r\n \"allocationTime\": \"2023-06-13T07:46:20.7222354Z\",\r\n \"ipAddress\": \"10.218.0.5\",\r\n \"affinityId\": \"TVM:tvmps_c3cdeb8c344b8b5cca4c1052f8fd5c239f09cffd64837afc6cbb2e073e15dab3_d\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"totalTasksRun\": 7,\r\n \"totalTasksSucceeded\": 3,\r\n \"runningTasksCount\": 0,\r\n \"runningTaskSlotsCount\": 0,\r\n \"recentTasks\": [\r\n {\r\n \"taskUrl\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobs/testTerminateTaskJob/tasks/testTask2\",\r\n \"jobId\": \"testTerminateTaskJob\",\r\n \"taskId\": \"testTask2\",\r\n \"taskState\": \"completed\",\r\n \"executionInfo\": {\r\n \"startTime\": \"2023-06-16T07:06:23.080101Z\",\r\n \"endTime\": \"2023-06-16T07:06:23.572482Z\",\r\n \"exitCode\": -1073741510,\r\n \"failureInfo\": {\r\n \"category\": \"UserError\",\r\n \"code\": \"TaskEnded\",\r\n \"message\": \"Task Was Ended by User Request\",\r\n \"details\": [\r\n {\r\n \"name\": \"AdditionalErrorCode\",\r\n \"value\": \"FailureExitCode\"\r\n }\r\n ]\r\n },\r\n \"result\": \"failure\",\r\n \"retryCount\": 0,\r\n \"requeueCount\": 0\r\n }\r\n }\r\n ],\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"pool\",\r\n \"elevationLevel\": \"nonadmin\"\r\n }\r\n },\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": true\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2023-06-16T06:55:28.965368Z\",\r\n \"endTime\": \"2023-06-16T06:55:29.07475Z\",\r\n \"exitCode\": 0,\r\n \"result\": \"success\",\r\n \"retryCount\": 0\r\n },\r\n \"certificateReferences\": [],\r\n \"isDedicated\": true,\r\n \"endpointConfiguration\": {\r\n \"inboundEndpoints\": [\r\n {\r\n \"name\": \"Microsoft.WindowsAzure.Plugins.RemoteForwarder.RdpInput\",\r\n \"protocol\": \"tcp\",\r\n \"frontendPort\": 3389,\r\n \"backendPort\": 20000\r\n }\r\n ]\r\n },\r\n \"nodeAgentInfo\": {\r\n \"lastUpdateTime\": \"2023-06-13T07:48:55.051071Z\",\r\n \"version\": \"1.10.0\"\r\n },\r\n \"virtualMachineInfo\": {}\r\n },\r\n {\r\n \"id\": \"tvmps_cf431502d0b7a008b6d2fc36bf12888efcbda4c9272347c458f1792e50276106_d\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/testPool/nodes/tvmps_cf431502d0b7a008b6d2fc36bf12888efcbda4c9272347c458f1792e50276106_d\",\r\n \"state\": \"idle\",\r\n \"schedulingState\": \"enabled\",\r\n \"stateTransitionTime\": \"2023-06-16T07:19:26.25374Z\",\r\n \"lastBootTime\": \"2023-06-13T07:52:52.129232Z\",\r\n \"allocationTime\": \"2023-06-13T07:46:20.7222354Z\",\r\n \"ipAddress\": \"10.218.0.4\",\r\n \"affinityId\": \"TVM:tvmps_cf431502d0b7a008b6d2fc36bf12888efcbda4c9272347c458f1792e50276106_d\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"totalTasksRun\": 8,\r\n \"totalTasksSucceeded\": 2,\r\n \"runningTasksCount\": 0,\r\n \"runningTaskSlotsCount\": 0,\r\n \"recentTasks\": [\r\n {\r\n \"taskUrl\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobs/testJobCompletesWhenTaskFails/tasks/taskId-1\",\r\n \"jobId\": \"testJobCompletesWhenTaskFails\",\r\n \"taskId\": \"taskId-1\",\r\n \"taskState\": \"completed\",\r\n \"executionInfo\": {\r\n \"startTime\": \"2023-06-16T07:19:26.144372Z\",\r\n \"endTime\": \"2023-06-16T07:19:26.222489Z\",\r\n \"exitCode\": 3,\r\n \"failureInfo\": {\r\n \"category\": \"UserError\",\r\n \"code\": \"FailureExitCode\",\r\n \"message\": \"The task exited with an exit code representing a failure\",\r\n \"details\": [\r\n {\r\n \"name\": \"Message\",\r\n \"value\": \"The task process exited with an unexpected exit code\"\r\n },\r\n {\r\n \"name\": \"AdditionalErrorCode\",\r\n \"value\": \"FailureExitCode\"\r\n }\r\n ]\r\n },\r\n \"result\": \"failure\",\r\n \"retryCount\": 0,\r\n \"requeueCount\": 0\r\n }\r\n }\r\n ],\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"pool\",\r\n \"elevationLevel\": \"nonadmin\"\r\n }\r\n },\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": true\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2023-06-13T07:52:53.742761Z\",\r\n \"endTime\": \"2023-06-13T07:52:53.805263Z\",\r\n \"exitCode\": 0,\r\n \"result\": \"success\",\r\n \"retryCount\": 0\r\n },\r\n \"certificateReferences\": [],\r\n \"isDedicated\": true,\r\n \"endpointConfiguration\": {\r\n \"inboundEndpoints\": [\r\n {\r\n \"name\": \"Microsoft.WindowsAzure.Plugins.RemoteForwarder.RdpInput\",\r\n \"protocol\": \"tcp\",\r\n \"frontendPort\": 3389,\r\n \"backendPort\": 20000\r\n }\r\n ]\r\n },\r\n \"nodeAgentInfo\": {\r\n \"lastUpdateTime\": \"2023-06-13T07:52:52.129232Z\",\r\n \"version\": \"1.10.0\"\r\n },\r\n \"virtualMachineInfo\": {}\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"remotedesktopprotocolfilepool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/remotedesktopprotocolfilepool\",\r\n \"eTag\": \"0x8DC4AC142CC3E39\",\r\n \"lastModified\": \"2024-03-22T22:41:48.9592889Z\",\r\n \"creationTime\": \"2024-03-22T22:41:48.9592875Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T22:41:48.9592875Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T22:41:48.9592889Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bXBzXzY3NTkwZjZmZmRjMzc4OTFhYTA5ZGUwN2E0ZDE0ZTUxM2NlNzVmMmU5M2M3M2Y3ZjU1NmNkZjAwNzEwZDdiMmRfZD9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjA=", + "RequestUri": "/pools/remotedesktopprotocolfilepool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3JlbW90ZWRlc2t0b3Bwcm90b2NvbGZpbGVwb29sP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "20685a79-006f-402f-baf8-1247244fed14" + "fb361ce9-54ad-4284-90ed-ea5c01d8fc25" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:23:14 GMT" + "Fri, 22 Mar 2024 22:42:04 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "0x8DC4AC142CC3E39" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "0bfed179-b95f-4a6b-b671-6ed81ecd660a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 22:42:04 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 22:41:48 GMT" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"remotedesktopprotocolfilepool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/remotedesktopprotocolfilepool\",\r\n \"eTag\": \"0x8DC4AC142CC3E39\",\r\n \"lastModified\": \"2024-03-22T22:41:48.9592889Z\",\r\n \"creationTime\": \"2024-03-22T22:41:48.9592875Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T22:41:48.9592875Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T22:41:48.9592889Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/pools/remotedesktopprotocolfilepool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3JlbW90ZWRlc2t0b3Bwcm90b2NvbGZpbGVwb29sP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "e7a18fb8-aadd-4fa9-96b1-63ea2abfe965" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 22:42:09 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "0x8DC4AC142CC3E39" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "61b65079-3804-481c-832b-0b4613b6083a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 22:42:09 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 22:41:48 GMT" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"remotedesktopprotocolfilepool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/remotedesktopprotocolfilepool\",\r\n \"eTag\": \"0x8DC4AC142CC3E39\",\r\n \"lastModified\": \"2024-03-22T22:41:48.9592889Z\",\r\n \"creationTime\": \"2024-03-22T22:41:48.9592875Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T22:41:48.9592875Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T22:41:48.9592889Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/pools/remotedesktopprotocolfilepool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3JlbW90ZWRlc2t0b3Bwcm90b2NvbGZpbGVwb29sP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "3a752a84-347e-467d-a75e-b39b5b010b63" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 22:42:15 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "0x8DC4AC142CC3E39" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "d1afa56e-1e1a-44ba-a47b-fda39094ab09" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 22:42:15 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 22:41:48 GMT" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"remotedesktopprotocolfilepool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/remotedesktopprotocolfilepool\",\r\n \"eTag\": \"0x8DC4AC142CC3E39\",\r\n \"lastModified\": \"2024-03-22T22:41:48.9592889Z\",\r\n \"creationTime\": \"2024-03-22T22:41:48.9592875Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T22:41:48.9592875Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T22:41:48.9592889Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/pools/remotedesktopprotocolfilepool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3JlbW90ZWRlc2t0b3Bwcm90b2NvbGZpbGVwb29sP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "61791ceb-2613-44fb-8f08-89a69d366a19" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 22:42:20 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "0x8DC4AC142CC3E39" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "a82a20eb-ebc0-46cd-b5db-78420a88c902" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 22:42:20 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 22:41:48 GMT" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"remotedesktopprotocolfilepool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/remotedesktopprotocolfilepool\",\r\n \"eTag\": \"0x8DC4AC142CC3E39\",\r\n \"lastModified\": \"2024-03-22T22:41:48.9592889Z\",\r\n \"creationTime\": \"2024-03-22T22:41:48.9592875Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T22:41:48.9592875Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T22:42:17.0953925Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 2,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\",\r\n \"currentNodeCommunicationMode\": \"classic\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/pools/remotedesktopprotocolfilepool/nodes?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3JlbW90ZWRlc2t0b3Bwcm90b2NvbGZpbGVwb29sL25vZGVzP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "1b66a36a-7d06-47ac-bc4a-bb58c424cd49" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 22:42:22 GMT" ], "x-ms-client-request-id": [ - "753d3bd0-4d84-4a3a-9552-4a1a01f42115" + "d48b654b-573e-4c27-b4e2-c6537dda1290" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -89,7 +507,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "4aef66fa-512f-4b96-ae0d-7d49e34adb96" + "6edc26f4-bacf-4fc5-8f2a-f0d4034ece35" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -101,37 +519,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:23:14 GMT" + "Fri, 22 Mar 2024 22:42:23 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"state\": \"idle\",\r\n \"schedulingState\": \"enabled\",\r\n \"stateTransitionTime\": \"2023-06-16T06:54:12.745569Z\",\r\n \"lastBootTime\": \"2023-06-16T06:54:12.462819Z\",\r\n \"allocationTime\": \"2023-06-13T07:46:20.7222354Z\",\r\n \"ipAddress\": \"10.218.0.6\",\r\n \"affinityId\": \"TVM:tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"totalTasksRun\": 9,\r\n \"totalTasksSucceeded\": 6,\r\n \"runningTasksCount\": 0,\r\n \"runningTaskSlotsCount\": 0,\r\n \"recentTasks\": [],\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"pool\",\r\n \"elevationLevel\": \"nonadmin\"\r\n }\r\n },\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": true\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2023-06-16T06:54:12.651819Z\",\r\n \"endTime\": \"2023-06-16T06:54:12.729951Z\",\r\n \"exitCode\": 0,\r\n \"result\": \"success\",\r\n \"retryCount\": 0\r\n },\r\n \"certificateReferences\": [],\r\n \"isDedicated\": true,\r\n \"endpointConfiguration\": {\r\n \"inboundEndpoints\": [\r\n {\r\n \"name\": \"Microsoft.WindowsAzure.Plugins.RemoteForwarder.RdpInput\",\r\n \"protocol\": \"tcp\",\r\n \"frontendPort\": 3389,\r\n \"backendPort\": 20000\r\n }\r\n ]\r\n },\r\n \"nodeAgentInfo\": {\r\n \"lastUpdateTime\": \"2023-06-13T07:53:19.121974Z\",\r\n \"version\": \"1.10.0\"\r\n },\r\n \"virtualMachineInfo\": {}\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#nodes\",\r\n \"value\": [\r\n {\r\n \"id\": \"tvmps_2a312c8d1b8a16865f7fa44009fb5793769932bc146fe3124cdb6eed11355d4e_d\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/remotedesktopprotocolfilepool/nodes/tvmps_2a312c8d1b8a16865f7fa44009fb5793769932bc146fe3124cdb6eed11355d4e_d\",\r\n \"state\": \"starting\",\r\n \"schedulingState\": \"enabled\",\r\n \"stateTransitionTime\": \"2024-03-22T22:42:17.1052946Z\",\r\n \"allocationTime\": \"2024-03-22T22:42:16.0426006Z\",\r\n \"ipAddress\": \"10.0.0.4\",\r\n \"affinityId\": \"TVM:tvmps_2a312c8d1b8a16865f7fa44009fb5793769932bc146fe3124cdb6eed11355d4e_d\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"totalTasksRun\": 0,\r\n \"totalTasksSucceeded\": 0,\r\n \"runningTasksCount\": 0,\r\n \"runningTaskSlotsCount\": 0,\r\n \"isDedicated\": true,\r\n \"endpointConfiguration\": {\r\n \"inboundEndpoints\": [\r\n {\r\n \"name\": \"SSHRule.0\",\r\n \"protocol\": \"tcp\",\r\n \"publicIPAddress\": \"172.165.65.239\",\r\n \"publicFQDN\": \"dnsfc9427fa-4d7b-43e7-8bed-83d8133fcac9-azurebatch-cloudservice.uksouth.cloudapp.azure.com\",\r\n \"frontendPort\": 50000,\r\n \"backendPort\": 22\r\n }\r\n ]\r\n },\r\n \"virtualMachineInfo\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": \"20.04.202403190\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"tvmps_f515ac6d7e873bb9505a66bb5423b3ea1396c354a16ab85aaee181c62a6bbc38_d\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/remotedesktopprotocolfilepool/nodes/tvmps_f515ac6d7e873bb9505a66bb5423b3ea1396c354a16ab85aaee181c62a6bbc38_d\",\r\n \"state\": \"starting\",\r\n \"schedulingState\": \"enabled\",\r\n \"stateTransitionTime\": \"2024-03-22T22:42:17.1052946Z\",\r\n \"allocationTime\": \"2024-03-22T22:42:16.042644Z\",\r\n \"ipAddress\": \"10.0.0.5\",\r\n \"affinityId\": \"TVM:tvmps_f515ac6d7e873bb9505a66bb5423b3ea1396c354a16ab85aaee181c62a6bbc38_d\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"totalTasksRun\": 0,\r\n \"totalTasksSucceeded\": 0,\r\n \"runningTasksCount\": 0,\r\n \"runningTaskSlotsCount\": 0,\r\n \"isDedicated\": true,\r\n \"endpointConfiguration\": {\r\n \"inboundEndpoints\": [\r\n {\r\n \"name\": \"SSHRule.1\",\r\n \"protocol\": \"tcp\",\r\n \"publicIPAddress\": \"172.165.65.239\",\r\n \"publicFQDN\": \"dnsfc9427fa-4d7b-43e7-8bed-83d8133fcac9-azurebatch-cloudservice.uksouth.cloudapp.azure.com\",\r\n \"frontendPort\": 50001,\r\n \"backendPort\": 22\r\n }\r\n ]\r\n },\r\n \"virtualMachineInfo\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": \"20.04.202403190\"\r\n }\r\n }\r\n }\r\n ]\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/testPool/nodes/tvmps_67590f6ffdc37891aa09de07a4d14e513ce75f2e93c73f7f556cdf00710d7b2d_d/rdp?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bXBzXzY3NTkwZjZmZmRjMzc4OTFhYTA5ZGUwN2E0ZDE0ZTUxM2NlNzVmMmU5M2M3M2Y3ZjU1NmNkZjAwNzEwZDdiMmRfZC9yZHA/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/pools/remotedesktopprotocolfilepool/nodes/tvmps_2a312c8d1b8a16865f7fa44009fb5793769932bc146fe3124cdb6eed11355d4e_d?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3JlbW90ZWRlc2t0b3Bwcm90b2NvbGZpbGVwb29sL25vZGVzL3R2bXBzXzJhMzEyYzhkMWI4YTE2ODY1ZjdmYTQ0MDA5ZmI1NzkzNzY5OTMyYmMxNDZmZTMxMjRjZGI2ZWVkMTEzNTVkNGVfZD9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "b386cb51-9584-46fd-9585-433c15c790ef" + "00455e58-76c2-4133-91a1-6bb075f27ac5" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:23:14 GMT" + "Fri, 22 Mar 2024 22:42:23 GMT" ], "x-ms-client-request-id": [ - "3f077c5e-1e5a-4b1c-a58b-dad1e1045db9" + "e1478e18-62c3-45cf-84b7-e88d1e23f204" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -144,7 +562,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "d9ce6fd6-5a2f-4046-b39d-d5332e287491" + "d9fb3f3c-7602-42a1-973d-4736bb7fac80" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -156,21 +574,76 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:23:14 GMT" + "Fri, 22 Mar 2024 22:42:23 GMT" ], "Content-Type": [ - "application/octet-stream" + "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "ZnVsbCBhZGRyZXNzOnM6MjAuMjQuOTAuMTYwDQpMb2FkQmFsYW5jZUluZm86czpDb29raWU6IG1zdHNoYXNoPVRWTSNUVk1fSU5fMg==", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvmps_2a312c8d1b8a16865f7fa44009fb5793769932bc146fe3124cdb6eed11355d4e_d\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/remotedesktopprotocolfilepool/nodes/tvmps_2a312c8d1b8a16865f7fa44009fb5793769932bc146fe3124cdb6eed11355d4e_d\",\r\n \"state\": \"starting\",\r\n \"schedulingState\": \"enabled\",\r\n \"stateTransitionTime\": \"2024-03-22T22:42:17.1052946Z\",\r\n \"allocationTime\": \"2024-03-22T22:42:16.0426006Z\",\r\n \"ipAddress\": \"10.0.0.4\",\r\n \"affinityId\": \"TVM:tvmps_2a312c8d1b8a16865f7fa44009fb5793769932bc146fe3124cdb6eed11355d4e_d\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"totalTasksRun\": 0,\r\n \"totalTasksSucceeded\": 0,\r\n \"runningTasksCount\": 0,\r\n \"runningTaskSlotsCount\": 0,\r\n \"isDedicated\": true,\r\n \"endpointConfiguration\": {\r\n \"inboundEndpoints\": [\r\n {\r\n \"name\": \"SSHRule.0\",\r\n \"protocol\": \"tcp\",\r\n \"publicIPAddress\": \"172.165.65.239\",\r\n \"publicFQDN\": \"dnsfc9427fa-4d7b-43e7-8bed-83d8133fcac9-azurebatch-cloudservice.uksouth.cloudapp.azure.com\",\r\n \"frontendPort\": 50000,\r\n \"backendPort\": 22\r\n }\r\n ]\r\n },\r\n \"virtualMachineInfo\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": \"20.04.202403190\"\r\n }\r\n }\r\n}", "StatusCode": 200 + }, + { + "RequestUri": "/pools/remotedesktopprotocolfilepool/nodes/tvmps_2a312c8d1b8a16865f7fa44009fb5793769932bc146fe3124cdb6eed11355d4e_d/rdp?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3JlbW90ZWRlc2t0b3Bwcm90b2NvbGZpbGVwb29sL25vZGVzL3R2bXBzXzJhMzEyYzhkMWI4YTE2ODY1ZjdmYTQ0MDA5ZmI1NzkzNzY5OTMyYmMxNDZmZTMxMjRjZGI2ZWVkMTEzNTVkNGVfZC9yZHA/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "8be91cd6-1df2-4038-b6a5-c0dd54a84209" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 22:42:23 GMT" + ], + "x-ms-client-request-id": [ + "e0c51dac-9256-494c-81dd-f6c631b331a0" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "4d01ed32-f7c9-45f3-aeca-15d4859d1d35" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 22:42:23 GMT" + ], + "Content-Length": [ + "508" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element\",\r\n \"code\": \"OperationNotValidOnNode\",\r\n \"message\": {\r\n \"lang\": \"en-US\",\r\n \"value\": \"The specified operation is not valid on the node.\\nRequestId:4d01ed32-f7c9-45f3-aeca-15d4859d1d35\\nTime:2024-03-22T22:42:24.3138437Z\"\r\n },\r\n \"values\": [\r\n {\r\n \"key\": \"Reason\",\r\n \"value\": \"Operation rdp can be invoked only on pools created with cloudServiceConfiguration\"\r\n }\r\n ]\r\n}", + "StatusCode": 409 } ], "Names": {}, "Variables": { - "SubscriptionId": "21abd678-18c5-4660-9fdd-8c5ba6b6fe1f", - "AZURE_BATCH_ACCOUNT": "hoppeeastasia2", - "AZURE_BATCH_ENDPOINT": "https://hoppeeastasia2.eastasia.batch.azure.com", - "AZURE_BATCH_RESOURCE_GROUP": "123" + "SubscriptionId": "6602ac9a-5dad-41bd-a792-592c704b6a31", + "AZURE_BATCH_ACCOUNT": "billstestba24326", + "AZURE_BATCH_ENDPOINT": "https://billstestba24326.uksouth.batch.azure.com", + "AZURE_BATCH_RESOURCE_GROUP": "automation" } } \ No newline at end of file diff --git a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.JobScheduleTests/TestDisableEnableTerminateJobSchedule.json b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.JobScheduleTests/TestDisableEnableTerminateJobSchedule.json index 146eee642adf..d12b7e34b1d1 100644 --- a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.JobScheduleTests/TestDisableEnableTerminateJobSchedule.json +++ b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.JobScheduleTests/TestDisableEnableTerminateJobSchedule.json @@ -1,24 +1,24 @@ { "Entries": [ { - "RequestUri": "/jobschedules?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnNjaGVkdWxlcz9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjA=", + "RequestUri": "/jobschedules?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnNjaGVkdWxlcz9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "c4070567-07ac-47b0-890d-34d489761e6c" + "cf003513-b166-4231-9ece-2d7858ee7214" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:20:15 GMT" + "Thu, 21 Mar 2024 23:18:43 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Type": [ @@ -34,16 +34,16 @@ "chunked" ], "ETag": [ - "0x8DB6E3A22B467F7" + "0x8DC49FD412C6DC4" ], "Location": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/jobschedules/testDisableEnableTerminateJobSchedule" + "https://billstestba24326.uksouth.batch.azure.com/jobschedules/testDisableEnableTerminateJobSchedule" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "80dd1368-da47-442e-bb50-f1f5af3030fc" + "5079b275-ea21-4798-9907-83dbd3bc8534" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -55,40 +55,40 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/jobschedules/testDisableEnableTerminateJobSchedule" + "https://billstestba24326.uksouth.batch.azure.com/jobschedules/testDisableEnableTerminateJobSchedule" ], "Date": [ - "Fri, 16 Jun 2023 07:20:16 GMT" + "Thu, 21 Mar 2024 23:18:44 GMT" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:20:17 GMT" + "Thu, 21 Mar 2024 23:18:44 GMT" ] }, "ResponseBody": "", "StatusCode": 201 }, { - "RequestUri": "/jobschedules/testDisableEnableTerminateJobSchedule/disable?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnNjaGVkdWxlcy90ZXN0RGlzYWJsZUVuYWJsZVRlcm1pbmF0ZUpvYlNjaGVkdWxlL2Rpc2FibGU/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/jobschedules/testDisableEnableTerminateJobSchedule/disable?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnNjaGVkdWxlcy90ZXN0RGlzYWJsZUVuYWJsZVRlcm1pbmF0ZUpvYlNjaGVkdWxlL2Rpc2FibGU/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "c1975223-78f6-4e8c-bc27-8a60a22c84bf" + "c400e8a9-83a2-4c09-bc44-b9d8ba6c1d06" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:20:17 GMT" + "Thu, 21 Mar 2024 23:18:44 GMT" ], "x-ms-client-request-id": [ - "1e8b904f-8b6c-4d06-9435-04731fa295b3" + "0df4f656-a934-414c-a22f-58bf4dff4ab1" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Length": [ @@ -98,13 +98,13 @@ "RequestBody": "", "ResponseHeaders": { "ETag": [ - "0x8DB6E3A2419E008" + "0x8DC49FD41C3AEA5" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "a494aa16-bf5f-4dd7-9fa6-fbf18697f580" + "736d08ec-3279-4baf-a080-b414ee5ae9c6" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -116,43 +116,43 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/jobschedules/testDisableEnableTerminateJobSchedule/disable" + "https://billstestba24326.uksouth.batch.azure.com/jobschedules/testDisableEnableTerminateJobSchedule/disable" ], "Date": [ - "Fri, 16 Jun 2023 07:20:19 GMT" + "Thu, 21 Mar 2024 23:18:45 GMT" ], "Content-Length": [ "0" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:20:19 GMT" + "Thu, 21 Mar 2024 23:18:45 GMT" ] }, "ResponseBody": "", "StatusCode": 204 }, { - "RequestUri": "/jobschedules/testDisableEnableTerminateJobSchedule?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnNjaGVkdWxlcy90ZXN0RGlzYWJsZUVuYWJsZVRlcm1pbmF0ZUpvYlNjaGVkdWxlP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", + "RequestUri": "/jobschedules/testDisableEnableTerminateJobSchedule?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnNjaGVkdWxlcy90ZXN0RGlzYWJsZUVuYWJsZVRlcm1pbmF0ZUpvYlNjaGVkdWxlP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "b779abe6-ae71-4663-a779-0457eff07371" + "fb291350-b9ce-41e9-a7c2-8f43da2a7bcb" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:20:18 GMT" + "Thu, 21 Mar 2024 23:18:45 GMT" ], "x-ms-client-request-id": [ - "05adc738-bf5b-4d94-8d96-97f608858d53" + "569302e4-9c99-453f-8fad-22dd294fc082" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -162,13 +162,13 @@ "chunked" ], "ETag": [ - "0x8DB6E3A2419E008" + "0x8DC49FD41C3AEA5" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "3a2ea1b6-146e-4e4f-a330-ed0259c7ab4a" + "3df0e50b-28ac-4b41-8ff1-9edece87129b" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -180,40 +180,40 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:20:19 GMT" + "Thu, 21 Mar 2024 23:18:45 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:20:19 GMT" + "Thu, 21 Mar 2024 23:18:45 GMT" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#jobschedules/@Element\",\r\n \"id\": \"testDisableEnableTerminateJobSchedule\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobschedules/testDisableEnableTerminateJobSchedule\",\r\n \"eTag\": \"0x8DB6E3A2419E008\",\r\n \"lastModified\": \"2023-06-16T07:20:19.5891208Z\",\r\n \"creationTime\": \"2023-06-16T07:20:17.2464119Z\",\r\n \"state\": \"disabled\",\r\n \"stateTransitionTime\": \"2023-06-16T07:20:19.5891208Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2023-06-16T07:20:17.2464119Z\",\r\n \"jobSpecification\": {\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"allowTaskPreemption\": false,\r\n \"usesTaskDependencies\": false,\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"noaction\",\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n }\r\n },\r\n \"executionInfo\": {\r\n \"recentJob\": {\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobs/testDisableEnableTerminateJobSchedule:job-1\",\r\n \"id\": \"testDisableEnableTerminateJobSchedule:job-1\"\r\n }\r\n }\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobschedules/@Element\",\r\n \"id\": \"testDisableEnableTerminateJobSchedule\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobschedules/testDisableEnableTerminateJobSchedule\",\r\n \"eTag\": \"0x8DC49FD41C3AEA5\",\r\n \"lastModified\": \"2024-03-21T23:18:45.8664613Z\",\r\n \"creationTime\": \"2024-03-21T23:18:44.8752068Z\",\r\n \"state\": \"disabled\",\r\n \"stateTransitionTime\": \"2024-03-21T23:18:45.8664613Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2024-03-21T23:18:44.8752068Z\",\r\n \"jobSpecification\": {\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"allowTaskPreemption\": false,\r\n \"usesTaskDependencies\": false,\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"noaction\",\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n }\r\n },\r\n \"executionInfo\": {\r\n \"recentJob\": {\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testDisableEnableTerminateJobSchedule:job-1\",\r\n \"id\": \"testDisableEnableTerminateJobSchedule:job-1\"\r\n }\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/jobschedules/testDisableEnableTerminateJobSchedule?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnNjaGVkdWxlcy90ZXN0RGlzYWJsZUVuYWJsZVRlcm1pbmF0ZUpvYlNjaGVkdWxlP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", + "RequestUri": "/jobschedules/testDisableEnableTerminateJobSchedule?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnNjaGVkdWxlcy90ZXN0RGlzYWJsZUVuYWJsZVRlcm1pbmF0ZUpvYlNjaGVkdWxlP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "e160cd9d-d4df-4456-a218-73dc77cd659d" + "9399c8c3-f5dd-4272-8e43-726b5eb8fc56" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:20:18 GMT" + "Thu, 21 Mar 2024 23:18:46 GMT" ], "x-ms-client-request-id": [ - "e4429ddb-650e-4a95-9074-c79c90f72a13" + "8def17c2-fded-4ebd-8e0e-38b37e9dfe50" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -223,13 +223,13 @@ "chunked" ], "ETag": [ - "0x8DB6E3A246E3136" + "0x8DC49FD42535C15" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "8fb5a0a7-99e0-4548-b8cf-9ba147b9f3cb" + "a69aa540-fc49-4b77-a8f7-75363569b56e" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -241,40 +241,40 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:20:19 GMT" + "Thu, 21 Mar 2024 23:18:46 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:20:20 GMT" + "Thu, 21 Mar 2024 23:18:46 GMT" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#jobschedules/@Element\",\r\n \"id\": \"testDisableEnableTerminateJobSchedule\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobschedules/testDisableEnableTerminateJobSchedule\",\r\n \"eTag\": \"0x8DB6E3A246E3136\",\r\n \"lastModified\": \"2023-06-16T07:20:20.1417014Z\",\r\n \"creationTime\": \"2023-06-16T07:20:17.2464119Z\",\r\n \"state\": \"terminating\",\r\n \"stateTransitionTime\": \"2023-06-16T07:20:20.1417014Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2023-06-16T07:20:19.8821504Z\",\r\n \"jobSpecification\": {\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"allowTaskPreemption\": false,\r\n \"usesTaskDependencies\": false,\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"noaction\",\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n }\r\n },\r\n \"executionInfo\": {\r\n \"recentJob\": {\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobs/testDisableEnableTerminateJobSchedule:job-1\",\r\n \"id\": \"testDisableEnableTerminateJobSchedule:job-1\"\r\n }\r\n }\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobschedules/@Element\",\r\n \"id\": \"testDisableEnableTerminateJobSchedule\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobschedules/testDisableEnableTerminateJobSchedule\",\r\n \"eTag\": \"0x8DC49FD42535C15\",\r\n \"lastModified\": \"2024-03-21T23:18:46.8080661Z\",\r\n \"creationTime\": \"2024-03-21T23:18:44.8752068Z\",\r\n \"state\": \"completed\",\r\n \"stateTransitionTime\": \"2024-03-21T23:18:46.8650795Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2024-03-21T23:18:46.3373097Z\",\r\n \"jobSpecification\": {\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"allowTaskPreemption\": false,\r\n \"usesTaskDependencies\": false,\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"noaction\",\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n }\r\n },\r\n \"executionInfo\": {\r\n \"recentJob\": {\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testDisableEnableTerminateJobSchedule:job-1\",\r\n \"id\": \"testDisableEnableTerminateJobSchedule:job-1\"\r\n },\r\n \"endTime\": \"2024-03-21T23:18:46.8650795Z\"\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/jobschedules/testDisableEnableTerminateJobSchedule/enable?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnNjaGVkdWxlcy90ZXN0RGlzYWJsZUVuYWJsZVRlcm1pbmF0ZUpvYlNjaGVkdWxlL2VuYWJsZT9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjA=", + "RequestUri": "/jobschedules/testDisableEnableTerminateJobSchedule/enable?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnNjaGVkdWxlcy90ZXN0RGlzYWJsZUVuYWJsZVRlcm1pbmF0ZUpvYlNjaGVkdWxlL2VuYWJsZT9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "366c4a80-9f07-4350-ab72-88840a3dd36c" + "4195090d-1544-4a6d-a8ac-36696bf167fb" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:20:18 GMT" + "Thu, 21 Mar 2024 23:18:45 GMT" ], "x-ms-client-request-id": [ - "879f1157-ace3-477e-a133-12c5e43c6a1e" + "bf35e95f-0cc8-49b5-b6ee-9ff02ca4801f" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Length": [ @@ -284,13 +284,13 @@ "RequestBody": "", "ResponseHeaders": { "ETag": [ - "0x8DB6E3A24469680" + "0x8DC49FD420B8729" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "43774771-89e3-45c5-bc92-471fac615459" + "f6462a17-aacf-4fe0-89ea-70c4e0b6520c" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -302,43 +302,43 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/jobschedules/testDisableEnableTerminateJobSchedule/enable" + "https://billstestba24326.uksouth.batch.azure.com/jobschedules/testDisableEnableTerminateJobSchedule/enable" ], "Date": [ - "Fri, 16 Jun 2023 07:20:19 GMT" + "Thu, 21 Mar 2024 23:18:45 GMT" ], "Content-Length": [ "0" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:20:19 GMT" + "Thu, 21 Mar 2024 23:18:46 GMT" ] }, "ResponseBody": "", "StatusCode": 204 }, { - "RequestUri": "/jobschedules?api-version=2023-05-01.17.0&$filter=id%20eq%20%27testDisableEnableTerminateJobSchedule%27", - "EncodedRequestUri": "L2pvYnNjaGVkdWxlcz9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjAmJGZpbHRlcj1pZCUyMGVxJTIwJTI3dGVzdERpc2FibGVFbmFibGVUZXJtaW5hdGVKb2JTY2hlZHVsZSUyNw==", + "RequestUri": "/jobschedules?api-version=2024-02-01.19.0&$filter=id%20eq%20%27testDisableEnableTerminateJobSchedule%27", + "EncodedRequestUri": "L2pvYnNjaGVkdWxlcz9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjAmJGZpbHRlcj1pZCUyMGVxJTIwJTI3dGVzdERpc2FibGVFbmFibGVUZXJtaW5hdGVKb2JTY2hlZHVsZSUyNw==", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "15bbe42a-372a-4b23-aa7b-1607ec412412" + "6a840ec1-e04b-4286-a168-e8c2995d4472" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:20:18 GMT" + "Thu, 21 Mar 2024 23:18:46 GMT" ], "x-ms-client-request-id": [ - "58f14463-5e39-4a97-b0e5-f3560894c237" + "ee705343-490e-4955-a42c-8d548797cfa4" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -351,7 +351,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "9d549192-f3a3-4db1-8c31-e774e382bfc5" + "584d24e0-4016-4143-97f8-f8fa31ecdbae" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -363,37 +363,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:20:19 GMT" + "Thu, 21 Mar 2024 23:18:45 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#jobschedules\",\r\n \"value\": [\r\n {\r\n \"id\": \"testDisableEnableTerminateJobSchedule\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobschedules/testDisableEnableTerminateJobSchedule\",\r\n \"eTag\": \"0x8DB6E3A24469680\",\r\n \"lastModified\": \"2023-06-16T07:20:19.8821504Z\",\r\n \"creationTime\": \"2023-06-16T07:20:17.2464119Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:20:19.8821504Z\",\r\n \"previousState\": \"disabled\",\r\n \"previousStateTransitionTime\": \"2023-06-16T07:20:19.5891208Z\",\r\n \"jobSpecification\": {\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"allowTaskPreemption\": false,\r\n \"usesTaskDependencies\": false,\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"noaction\",\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n }\r\n },\r\n \"executionInfo\": {\r\n \"recentJob\": {\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobs/testDisableEnableTerminateJobSchedule:job-1\",\r\n \"id\": \"testDisableEnableTerminateJobSchedule:job-1\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobschedules\",\r\n \"value\": [\r\n {\r\n \"id\": \"testDisableEnableTerminateJobSchedule\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobschedules/testDisableEnableTerminateJobSchedule\",\r\n \"eTag\": \"0x8DC49FD420B8729\",\r\n \"lastModified\": \"2024-03-21T23:18:46.3373097Z\",\r\n \"creationTime\": \"2024-03-21T23:18:44.8752068Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-21T23:18:46.3373097Z\",\r\n \"previousState\": \"disabled\",\r\n \"previousStateTransitionTime\": \"2024-03-21T23:18:45.8664613Z\",\r\n \"jobSpecification\": {\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"allowTaskPreemption\": false,\r\n \"usesTaskDependencies\": false,\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"noaction\",\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n }\r\n },\r\n \"executionInfo\": {\r\n \"recentJob\": {\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testDisableEnableTerminateJobSchedule:job-1\",\r\n \"id\": \"testDisableEnableTerminateJobSchedule:job-1\"\r\n }\r\n }\r\n }\r\n ]\r\n}", "StatusCode": 200 }, { - "RequestUri": "/jobschedules/testDisableEnableTerminateJobSchedule/terminate?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnNjaGVkdWxlcy90ZXN0RGlzYWJsZUVuYWJsZVRlcm1pbmF0ZUpvYlNjaGVkdWxlL3Rlcm1pbmF0ZT9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjA=", + "RequestUri": "/jobschedules/testDisableEnableTerminateJobSchedule/terminate?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnNjaGVkdWxlcy90ZXN0RGlzYWJsZUVuYWJsZVRlcm1pbmF0ZUpvYlNjaGVkdWxlL3Rlcm1pbmF0ZT9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "e060dc86-add2-410b-aaba-f70ced5ceda6" + "396c7715-7f91-42e9-8284-f134d2e1479c" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:20:18 GMT" + "Thu, 21 Mar 2024 23:18:46 GMT" ], "x-ms-client-request-id": [ - "6e95a929-4d54-496c-8af8-9e37404ed6d4" + "25a2d065-2571-4e74-8cc4-e0d60e22c074" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Length": [ @@ -406,13 +406,13 @@ "chunked" ], "ETag": [ - "0x8DB6E3A246E3136" + "0x8DC49FD42535C15" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "44b8ba47-b8f3-4d6e-883c-9095971ff5dc" + "65185128-005e-4dfc-a782-49aea73241bc" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -424,37 +424,37 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/jobschedules/testDisableEnableTerminateJobSchedule/terminate" + "https://billstestba24326.uksouth.batch.azure.com/jobschedules/testDisableEnableTerminateJobSchedule/terminate" ], "Date": [ - "Fri, 16 Jun 2023 07:20:19 GMT" + "Thu, 21 Mar 2024 23:18:46 GMT" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:20:20 GMT" + "Thu, 21 Mar 2024 23:18:46 GMT" ] }, "ResponseBody": "", "StatusCode": 202 }, { - "RequestUri": "/jobschedules/testDisableEnableTerminateJobSchedule?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnNjaGVkdWxlcy90ZXN0RGlzYWJsZUVuYWJsZVRlcm1pbmF0ZUpvYlNjaGVkdWxlP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", + "RequestUri": "/jobschedules/testDisableEnableTerminateJobSchedule?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnNjaGVkdWxlcy90ZXN0RGlzYWJsZUVuYWJsZVRlcm1pbmF0ZUpvYlNjaGVkdWxlP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", "RequestMethod": "DELETE", "RequestHeaders": { "client-request-id": [ - "95497671-ee33-44f6-957a-8eb20d5970b9" + "73661d40-6850-4478-8c33-079e0129000a" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:20:19 GMT" + "Thu, 21 Mar 2024 23:18:46 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Length": [ @@ -470,7 +470,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "a8a2db22-195b-40f3-8405-b364a08baa9d" + "45ada735-ce3b-4ed1-a827-1c8d0921a8b7" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -482,7 +482,7 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:20:19 GMT" + "Thu, 21 Mar 2024 23:18:46 GMT" ] }, "ResponseBody": "", @@ -491,9 +491,9 @@ ], "Names": {}, "Variables": { - "SubscriptionId": "21abd678-18c5-4660-9fdd-8c5ba6b6fe1f", - "AZURE_BATCH_ACCOUNT": "hoppeeastasia2", - "AZURE_BATCH_ENDPOINT": "https://hoppeeastasia2.eastasia.batch.azure.com", - "AZURE_BATCH_RESOURCE_GROUP": "123" + "SubscriptionId": "6602ac9a-5dad-41bd-a792-592c704b6a31", + "AZURE_BATCH_ACCOUNT": "billstestba24326", + "AZURE_BATCH_ENDPOINT": "https://billstestba24326.uksouth.batch.azure.com", + "AZURE_BATCH_RESOURCE_GROUP": "automation" } } \ No newline at end of file diff --git a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.JobScheduleTests/TestJobScheduleCRUD.json b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.JobScheduleTests/TestJobScheduleCRUD.json index b7b57f3e9f49..6d0561ca2344 100644 --- a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.JobScheduleTests/TestJobScheduleCRUD.json +++ b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.JobScheduleTests/TestJobScheduleCRUD.json @@ -1,27 +1,259 @@ { "Entries": [ { - "RequestUri": "/jobschedules?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnNjaGVkdWxlcz9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjA=", + "RequestUri": "/pools?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "cd2b70cc-deef-4fd2-9639-38767bd1662e" + "86abbf5c-1361-4275-b31b-23c31780d4ca" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:20:12 GMT" + "Fri, 22 Mar 2024 20:44:13 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; charset=utf-8" + ], + "Content-Length": [ + "506" + ] + }, + "RequestBody": "{\r\n \"id\": \"testPool\",\r\n \"vmSize\": \"STANDARD_D2S_V3\",\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"zonal\"\r\n }\r\n },\r\n \"targetDedicatedNodes\": 2,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableInterNodeCommunication\": false,\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", + "ResponseHeaders": { + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "2a89cedf-ee1b-403d-ac09-834c23af06bd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:44:13 GMT" + ], + "Content-Length": [ + "336" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element\",\r\n \"code\": \"PoolExists\",\r\n \"message\": {\r\n \"lang\": \"en-US\",\r\n \"value\": \"The specified pool already exists.\\nRequestId:2a89cedf-ee1b-403d-ac09-834c23af06bd\\nTime:2024-03-22T20:44:14.5234345Z\"\r\n }\r\n}", + "StatusCode": 409 + }, + { + "RequestUri": "/pools?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", + "RequestMethod": "POST", + "RequestHeaders": { + "client-request-id": [ + "d531e61b-76b3-4b90-a93c-8762051943d2" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:44:14 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; charset=utf-8" + ], + "Content-Length": [ + "507" + ] + }, + "RequestBody": "{\r\n \"id\": \"testPool2\",\r\n \"vmSize\": \"STANDARD_D2S_V3\",\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"zonal\"\r\n }\r\n },\r\n \"targetDedicatedNodes\": 2,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableInterNodeCommunication\": false,\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", + "ResponseHeaders": { + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "e177ca61-199c-4cd4-b0c7-f5ab95b8603e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:44:14 GMT" + ], + "Content-Length": [ + "336" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element\",\r\n \"code\": \"PoolExists\",\r\n \"message\": {\r\n \"lang\": \"en-US\",\r\n \"value\": \"The specified pool already exists.\\nRequestId:e177ca61-199c-4cd4-b0c7-f5ab95b8603e\\nTime:2024-03-22T20:44:15.0523526Z\"\r\n }\r\n}", + "StatusCode": 409 + }, + { + "RequestUri": "/pools/testPool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "fe192a26-2e55-41bb-961e-65c18ae51c43" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:44:14 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "0x8DC4AAF45E03C32" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "e7df0096-3945-4eac-a5ba-c3ec0abadcd0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:44:13 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 20:33:03 GMT" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"testPool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/testPool\",\r\n \"eTag\": \"0x8DC4AAF45E03C32\",\r\n \"lastModified\": \"2024-03-22T20:33:03.182341Z\",\r\n \"creationTime\": \"2024-03-22T20:33:03.1823398Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:33:03.1823398Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T20:33:30.3746168Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 2,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\",\r\n \"currentNodeCommunicationMode\": \"classic\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/pools/testPool2?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sMj9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "501e9a6c-11b2-46e1-b693-72a4f9f1133c" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:44:14 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "0x8DC4AAF59354BB8" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "6abc7082-4bbb-47c3-a2ab-8e699c736b13" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:44:14 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 20:33:35 GMT" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"testPool2\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/testPool2\",\r\n \"eTag\": \"0x8DC4AAF59354BB8\",\r\n \"lastModified\": \"2024-03-22T20:33:35.6165048Z\",\r\n \"creationTime\": \"2024-03-22T20:33:35.6165038Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:33:35.6165038Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T20:34:07.8697301Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 2,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\",\r\n \"currentNodeCommunicationMode\": \"classic\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobschedules?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnNjaGVkdWxlcz9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", + "RequestMethod": "POST", + "RequestHeaders": { + "client-request-id": [ + "5734a5c2-a7bc-41b3-bde8-1c2025117fcf" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:44:21 GMT" ], "x-ms-client-request-id": [ - "3b7926b6-4a9e-43cd-866e-cf544c589e73" + "d846e693-04dc-4d8d-abea-dd67ff9333b0" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Type": [ @@ -37,16 +269,16 @@ "chunked" ], "ETag": [ - "0x8DB6E3A209A9AA1" + "0x8DC4AB0DAAE2EC4" ], "Location": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/jobschedules/jobSchedule1" + "https://billstestba24326.uksouth.batch.azure.com/jobschedules/jobSchedule1" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "5f15b7ee-672e-428b-ab9b-59a5fe950b60" + "58ac44ed-c326-4412-b60a-44a3d4f13df7" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -58,40 +290,40 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/jobschedules/jobSchedule1" + "https://billstestba24326.uksouth.batch.azure.com/jobschedules/jobSchedule1" ], "Date": [ - "Fri, 16 Jun 2023 07:20:13 GMT" + "Fri, 22 Mar 2024 20:44:22 GMT" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:20:13 GMT" + "Fri, 22 Mar 2024 20:44:22 GMT" ] }, "ResponseBody": "", "StatusCode": 201 }, { - "RequestUri": "/jobschedules?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnNjaGVkdWxlcz9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjA=", + "RequestUri": "/jobschedules?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnNjaGVkdWxlcz9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "e4d0cc42-cc23-4ae7-81d2-087a554c5e6f" + "95d19609-bbe9-47b6-8e0c-6c9737d89050" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:20:12 GMT" + "Fri, 22 Mar 2024 20:44:22 GMT" ], "x-ms-client-request-id": [ - "5db9cb43-3d3c-4257-a12e-336ec8781ca0" + "9d798ec9-7383-4893-bf8b-d9b20d12a0bd" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Type": [ @@ -101,22 +333,22 @@ "182" ] }, - "RequestBody": "{\r\n \"id\": \"jobSchedule2\",\r\n \"schedule\": {\r\n \"doNotRunUntil\": \"2024-01-01T12:30:00Z\"\r\n },\r\n \"jobSpecification\": {\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool2\"\r\n }\r\n }\r\n}", + "RequestBody": "{\r\n \"id\": \"jobSchedule2\",\r\n \"schedule\": {\r\n \"doNotRunUntil\": \"2024-12-01T12:30:00Z\"\r\n },\r\n \"jobSpecification\": {\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool2\"\r\n }\r\n }\r\n}", "ResponseHeaders": { "Transfer-Encoding": [ "chunked" ], "ETag": [ - "0x8DB6E3A20AE9885" + "0x8DC4AB0DAC9F448" ], "Location": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/jobschedules/jobSchedule2" + "https://billstestba24326.uksouth.batch.azure.com/jobschedules/jobSchedule2" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "73c90bf9-bd45-4f6e-b81b-a08df5292d46" + "ccc12223-4b0a-436d-932a-ff053a5f32c6" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -128,40 +360,40 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/jobschedules/jobSchedule2" + "https://billstestba24326.uksouth.batch.azure.com/jobschedules/jobSchedule2" ], "Date": [ - "Fri, 16 Jun 2023 07:20:13 GMT" + "Fri, 22 Mar 2024 20:44:22 GMT" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:20:13 GMT" + "Fri, 22 Mar 2024 20:44:22 GMT" ] }, "ResponseBody": "", "StatusCode": 201 }, { - "RequestUri": "/jobschedules?api-version=2023-05-01.17.0&$filter=id%20eq%20%27jobSchedule1%27%20or%20id%20eq%20%27jobSchedule2%27", - "EncodedRequestUri": "L2pvYnNjaGVkdWxlcz9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjAmJGZpbHRlcj1pZCUyMGVxJTIwJTI3am9iU2NoZWR1bGUxJTI3JTIwb3IlMjBpZCUyMGVxJTIwJTI3am9iU2NoZWR1bGUyJTI3", + "RequestUri": "/jobschedules?api-version=2024-02-01.19.0&$filter=id%20eq%20%27jobSchedule1%27%20or%20id%20eq%20%27jobSchedule2%27", + "EncodedRequestUri": "L2pvYnNjaGVkdWxlcz9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjAmJGZpbHRlcj1pZCUyMGVxJTIwJTI3am9iU2NoZWR1bGUxJTI3JTIwb3IlMjBpZCUyMGVxJTIwJTI3am9iU2NoZWR1bGUyJTI3", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "941417f1-4ad9-47a7-b653-7de9fd6f1310" + "160eb417-456e-4640-bb1f-a884518cab0c" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:20:12 GMT" + "Fri, 22 Mar 2024 20:44:22 GMT" ], "x-ms-client-request-id": [ - "b8fca593-ba24-46be-b8b4-81c43e749027" + "f3db86f4-0d50-4b16-b705-e58022f77187" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -174,7 +406,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "d6c50156-b607-42cd-ac50-5edfe3adef12" + "cbb7e972-8a1b-4278-be7e-d3d56e9f837e" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -186,37 +418,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:20:13 GMT" + "Fri, 22 Mar 2024 20:44:22 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#jobschedules\",\r\n \"value\": [\r\n {\r\n \"id\": \"jobSchedule1\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobschedules/jobSchedule1\",\r\n \"eTag\": \"0x8DB6E3A209A9AA1\",\r\n \"lastModified\": \"2023-06-16T07:20:13.7218721Z\",\r\n \"creationTime\": \"2023-06-16T07:20:13.7218721Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:20:13.7218721Z\",\r\n \"jobSpecification\": {\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"allowTaskPreemption\": false,\r\n \"usesTaskDependencies\": false,\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"noaction\",\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n }\r\n },\r\n \"executionInfo\": {\r\n \"recentJob\": {\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobs/jobSchedule1:job-1\",\r\n \"id\": \"jobSchedule1:job-1\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"jobSchedule2\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobschedules/jobSchedule2\",\r\n \"eTag\": \"0x8DB6E3A20AE9885\",\r\n \"lastModified\": \"2023-06-16T07:20:13.8528901Z\",\r\n \"creationTime\": \"2023-06-16T07:20:13.8528901Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:20:13.8528901Z\",\r\n \"schedule\": {\r\n \"doNotRunUntil\": \"2024-01-01T12:30:00Z\"\r\n },\r\n \"jobSpecification\": {\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"allowTaskPreemption\": false,\r\n \"usesTaskDependencies\": false,\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"noaction\",\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool2\"\r\n }\r\n },\r\n \"executionInfo\": {\r\n \"nextRunTime\": \"2024-01-01T12:30:00Z\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobschedules\",\r\n \"value\": [\r\n {\r\n \"id\": \"jobSchedule1\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobschedules/jobSchedule1\",\r\n \"eTag\": \"0x8DC4AB0DAAE2EC4\",\r\n \"lastModified\": \"2024-03-22T20:44:22.3315652Z\",\r\n \"creationTime\": \"2024-03-22T20:44:22.3315652Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:44:22.3315652Z\",\r\n \"jobSpecification\": {\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"allowTaskPreemption\": false,\r\n \"usesTaskDependencies\": false,\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"noaction\",\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n }\r\n },\r\n \"executionInfo\": {\r\n \"recentJob\": {\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/jobSchedule1:job-1\",\r\n \"id\": \"jobSchedule1:job-1\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"jobSchedule2\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobschedules/jobSchedule2\",\r\n \"eTag\": \"0x8DC4AB0DAC9F448\",\r\n \"lastModified\": \"2024-03-22T20:44:22.5135688Z\",\r\n \"creationTime\": \"2024-03-22T20:44:22.5135688Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:44:22.5135688Z\",\r\n \"schedule\": {\r\n \"doNotRunUntil\": \"2024-12-01T12:30:00Z\"\r\n },\r\n \"jobSpecification\": {\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"allowTaskPreemption\": false,\r\n \"usesTaskDependencies\": false,\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"noaction\",\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool2\"\r\n }\r\n },\r\n \"executionInfo\": {\r\n \"nextRunTime\": \"2024-12-01T12:30:00Z\"\r\n }\r\n }\r\n ]\r\n}", "StatusCode": 200 }, { - "RequestUri": "/jobschedules/jobSchedule2?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnNjaGVkdWxlcy9qb2JTY2hlZHVsZTI/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/jobschedules/jobSchedule2?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnNjaGVkdWxlcy9qb2JTY2hlZHVsZTI/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "PUT", "RequestHeaders": { "client-request-id": [ - "742e7b63-a757-431e-b840-5f41f03486d5" + "c5383524-f20b-4e8a-abd0-a08237fd3791" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:20:12 GMT" + "Fri, 22 Mar 2024 20:44:22 GMT" ], "x-ms-client-request-id": [ - "4e1d4afe-669d-43a4-b8d2-4a3ffa888877" + "241c8a14-9843-46ec-a390-a6972bb10d57" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Type": [ @@ -232,13 +464,13 @@ "chunked" ], "ETag": [ - "0x8DB6E3A20E2E38E" + "0x8DC4AB0DB160EF8" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "23431965-2f99-46d9-9571-2bc918bd0cf6" + "bafe6fba-48de-4f64-956d-dcff7f3f7be8" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -250,40 +482,40 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/jobschedules/jobSchedule2" + "https://billstestba24326.uksouth.batch.azure.com/jobschedules/jobSchedule2" ], "Date": [ - "Fri, 16 Jun 2023 07:20:13 GMT" + "Fri, 22 Mar 2024 20:44:22 GMT" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:20:14 GMT" + "Fri, 22 Mar 2024 20:44:23 GMT" ] }, "ResponseBody": "", "StatusCode": 200 }, { - "RequestUri": "/jobschedules/jobSchedule2?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnNjaGVkdWxlcy9qb2JTY2hlZHVsZTI/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/jobschedules/jobSchedule2?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnNjaGVkdWxlcy9qb2JTY2hlZHVsZTI/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "b152f594-6dd5-450d-8742-bd5671bd7c91" + "10fcfd6e-8b31-45fd-ad09-005a2e5a9e31" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:20:13 GMT" + "Fri, 22 Mar 2024 20:44:22 GMT" ], "x-ms-client-request-id": [ - "be83a1a5-533e-4d54-bf45-ac8a19256e8f" + "05c33dd5-ac86-4f7c-8bfe-01b22a05437d" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -293,13 +525,13 @@ "chunked" ], "ETag": [ - "0x8DB6E3A20E2E38E" + "0x8DC4AB0DB160EF8" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "292cc1f7-f49d-4c11-a95c-486e52f0e31e" + "78796a7e-2c56-4637-b179-0a27a67afd8e" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -311,40 +543,40 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:20:13 GMT" + "Fri, 22 Mar 2024 20:44:22 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:20:14 GMT" + "Fri, 22 Mar 2024 20:44:23 GMT" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#jobschedules/@Element\",\r\n \"id\": \"jobSchedule2\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobschedules/jobSchedule2\",\r\n \"eTag\": \"0x8DB6E3A20E2E38E\",\r\n \"lastModified\": \"2023-06-16T07:20:14.1955982Z\",\r\n \"creationTime\": \"2023-06-16T07:20:13.8528901Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:20:13.8528901Z\",\r\n \"schedule\": {\r\n \"doNotRunUntil\": \"2025-01-01T12:30:00Z\"\r\n },\r\n \"jobSpecification\": {\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"allowTaskPreemption\": false,\r\n \"usesTaskDependencies\": false,\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"noaction\",\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool2\"\r\n }\r\n },\r\n \"executionInfo\": {\r\n \"nextRunTime\": \"2025-01-01T12:30:00Z\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobschedules/@Element\",\r\n \"id\": \"jobSchedule2\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobschedules/jobSchedule2\",\r\n \"eTag\": \"0x8DC4AB0DB160EF8\",\r\n \"lastModified\": \"2024-03-22T20:44:23.0123256Z\",\r\n \"creationTime\": \"2024-03-22T20:44:22.5135688Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:44:22.5135688Z\",\r\n \"schedule\": {\r\n \"doNotRunUntil\": \"2025-01-01T12:30:00Z\"\r\n },\r\n \"jobSpecification\": {\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"allowTaskPreemption\": false,\r\n \"usesTaskDependencies\": false,\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"noaction\",\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool2\"\r\n }\r\n },\r\n \"executionInfo\": {\r\n \"nextRunTime\": \"2025-01-01T12:30:00Z\"\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/jobschedules/jobSchedule1?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnNjaGVkdWxlcy9qb2JTY2hlZHVsZTE/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/jobschedules/jobSchedule1?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnNjaGVkdWxlcy9qb2JTY2hlZHVsZTE/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "DELETE", "RequestHeaders": { "client-request-id": [ - "a9dd4b34-0163-4718-8b42-ee186214a2e7" + "27ee4e10-45ea-4a53-8d61-c1d304c81241" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:20:13 GMT" + "Fri, 22 Mar 2024 20:44:23 GMT" ], "x-ms-client-request-id": [ - "7962883b-cc40-40ab-b2d8-2c41a385fdcb" + "cfd7b27a-ac13-428a-8da3-168287d856cb" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Length": [ @@ -360,7 +592,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "110f6336-3fad-4d6b-b28e-3d31cff40f18" + "a137d074-b51b-4548-8379-b2db0c0af665" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -372,34 +604,34 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:20:13 GMT" + "Fri, 22 Mar 2024 20:44:23 GMT" ] }, "ResponseBody": "", "StatusCode": 202 }, { - "RequestUri": "/jobschedules/jobSchedule2?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnNjaGVkdWxlcy9qb2JTY2hlZHVsZTI/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/jobschedules/jobSchedule2?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnNjaGVkdWxlcy9qb2JTY2hlZHVsZTI/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "DELETE", "RequestHeaders": { "client-request-id": [ - "b42c3c04-f1dc-4b12-8750-24c4ba128260" + "5ff69739-3aa1-44a8-b21e-0b5ae9bbaf51" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:20:13 GMT" + "Fri, 22 Mar 2024 20:44:23 GMT" ], "x-ms-client-request-id": [ - "70bdf9ec-bb40-43e8-a578-6f0963bc4075" + "4eb031d8-7db5-477f-8b55-a8987ae85f9d" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Length": [ @@ -415,7 +647,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "8d1761d3-a90e-41a9-9541-a77de653cb85" + "a84e47a8-42ce-4b40-b80d-2d6dafee14f1" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -427,34 +659,34 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:20:13 GMT" + "Fri, 22 Mar 2024 20:44:23 GMT" ] }, "ResponseBody": "", "StatusCode": 202 }, { - "RequestUri": "/jobschedules?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnNjaGVkdWxlcz9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjA=", + "RequestUri": "/jobschedules?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnNjaGVkdWxlcz9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "75026735-19eb-4c9e-b0e6-8c10e32caf86" + "97765341-cc10-40ae-b4a8-3ea1b890dd8e" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:20:13 GMT" + "Fri, 22 Mar 2024 20:44:23 GMT" ], "x-ms-client-request-id": [ - "8484a36e-dc09-4a2e-a4aa-7df051a58552" + "045a399c-6c79-413a-99e3-97c4ca042628" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -467,7 +699,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "6a024883-2f8a-41b9-9219-cb5a17a8274c" + "2833c145-61f9-4b0a-ad9f-a7762e8b6372" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -479,21 +711,125 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:20:14 GMT" + "Fri, 22 Mar 2024 20:44:23 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#jobschedules\",\r\n \"value\": [\r\n {\r\n \"id\": \"jobSchedule1\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobschedules/jobSchedule1\",\r\n \"eTag\": \"0x8DB6E3A209A9AA1\",\r\n \"lastModified\": \"2023-06-16T07:20:13.7218721Z\",\r\n \"creationTime\": \"2023-06-16T07:20:13.7218721Z\",\r\n \"state\": \"deleting\",\r\n \"stateTransitionTime\": \"2023-06-16T07:20:14.4963299Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2023-06-16T07:20:13.7218721Z\",\r\n \"jobSpecification\": {\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"allowTaskPreemption\": false,\r\n \"usesTaskDependencies\": false,\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"noaction\",\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n }\r\n },\r\n \"executionInfo\": {\r\n \"recentJob\": {\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobs/jobSchedule1:job-1\",\r\n \"id\": \"jobSchedule1:job-1\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"jobSchedule2\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobschedules/jobSchedule2\",\r\n \"eTag\": \"0x8DB6E3A20E2E38E\",\r\n \"lastModified\": \"2023-06-16T07:20:14.1955982Z\",\r\n \"creationTime\": \"2023-06-16T07:20:13.8528901Z\",\r\n \"state\": \"deleting\",\r\n \"stateTransitionTime\": \"2023-06-16T07:20:14.6122827Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2023-06-16T07:20:13.8528901Z\",\r\n \"schedule\": {\r\n \"doNotRunUntil\": \"2025-01-01T12:30:00Z\"\r\n },\r\n \"jobSpecification\": {\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"allowTaskPreemption\": false,\r\n \"usesTaskDependencies\": false,\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"noaction\",\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool2\"\r\n }\r\n },\r\n \"executionInfo\": {\r\n \"nextRunTime\": \"2025-01-01T12:30:00Z\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobschedules\",\r\n \"value\": [\r\n {\r\n \"id\": \"jobSchedule1\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobschedules/jobSchedule1\",\r\n \"eTag\": \"0x8DC4AB0DAAE2EC4\",\r\n \"lastModified\": \"2024-03-22T20:44:22.3315652Z\",\r\n \"creationTime\": \"2024-03-22T20:44:22.3315652Z\",\r\n \"state\": \"deleting\",\r\n \"stateTransitionTime\": \"2024-03-22T20:44:23.4768391Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2024-03-22T20:44:22.3315652Z\",\r\n \"jobSpecification\": {\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"allowTaskPreemption\": false,\r\n \"usesTaskDependencies\": false,\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"noaction\",\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n }\r\n },\r\n \"executionInfo\": {\r\n \"recentJob\": {\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/jobSchedule1:job-1\",\r\n \"id\": \"jobSchedule1:job-1\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"jobSchedule2\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobschedules/jobSchedule2\",\r\n \"eTag\": \"0x8DC4AB0DB160EF8\",\r\n \"lastModified\": \"2024-03-22T20:44:23.0123256Z\",\r\n \"creationTime\": \"2024-03-22T20:44:22.5135688Z\",\r\n \"state\": \"deleting\",\r\n \"stateTransitionTime\": \"2024-03-22T20:44:23.6462009Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2024-03-22T20:44:22.5135688Z\",\r\n \"schedule\": {\r\n \"doNotRunUntil\": \"2025-01-01T12:30:00Z\"\r\n },\r\n \"jobSpecification\": {\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"allowTaskPreemption\": false,\r\n \"usesTaskDependencies\": false,\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"noaction\",\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool2\"\r\n }\r\n },\r\n \"executionInfo\": {\r\n \"nextRunTime\": \"2025-01-01T12:30:00Z\"\r\n }\r\n }\r\n ]\r\n}", "StatusCode": 200 + }, + { + "RequestUri": "/pools/testPool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", + "RequestMethod": "DELETE", + "RequestHeaders": { + "client-request-id": [ + "5da06e14-897a-437f-aefd-1f53e1fe3bcb" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:44:23 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ], + "Content-Length": [ + "0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "a1761199-f5ab-4cae-95f5-638d81bcc97e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:44:23 GMT" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/pools/testPool2?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sMj9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", + "RequestMethod": "DELETE", + "RequestHeaders": { + "client-request-id": [ + "18b8d1d5-e174-4b02-9d18-8c0090c88c8b" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:44:23 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ], + "Content-Length": [ + "0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "0ab55ab8-1270-4af3-87a9-2cce0169a79e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:44:23 GMT" + ] + }, + "ResponseBody": "", + "StatusCode": 202 } ], "Names": {}, "Variables": { - "SubscriptionId": "21abd678-18c5-4660-9fdd-8c5ba6b6fe1f", - "AZURE_BATCH_ACCOUNT": "hoppeeastasia2", - "AZURE_BATCH_ENDPOINT": "https://hoppeeastasia2.eastasia.batch.azure.com", - "AZURE_BATCH_RESOURCE_GROUP": "123" + "SubscriptionId": "6602ac9a-5dad-41bd-a792-592c704b6a31", + "AZURE_BATCH_ACCOUNT": "billstestba24326", + "AZURE_BATCH_ENDPOINT": "https://billstestba24326.uksouth.batch.azure.com", + "AZURE_BATCH_RESOURCE_GROUP": "automation" } } \ No newline at end of file diff --git a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.JobTests/IfJobSetsAutoFailure_ItCompletesWhenAnyTaskFails.json b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.JobTests/IfJobSetsAutoFailure_ItCompletesWhenAnyTaskFails.json index b6f090bd25a5..f4c6f1b32484 100644 --- a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.JobTests/IfJobSetsAutoFailure_ItCompletesWhenAnyTaskFails.json +++ b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.JobTests/IfJobSetsAutoFailure_ItCompletesWhenAnyTaskFails.json @@ -1,52 +1,49 @@ { "Entries": [ { - "RequestUri": "/jobs?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/pools?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "131c8b58-0fd0-4e90-bf4a-369e486c9d27" + "fdeb11a7-eaaa-438d-b6b5-8272187fd004" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:19:23 GMT" - ], - "x-ms-client-request-id": [ - "3ff2c5fa-bf0e-4e26-befb-9869d30586eb" + "Fri, 22 Mar 2024 20:20:59 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Type": [ "application/json; odata=minimalmetadata; charset=utf-8" ], "Content-Length": [ - "197" + "506" ] }, - "RequestBody": "{\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"priority\": 0,\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onTaskFailure\": \"performexitoptionsjobaction\",\r\n \"usesTaskDependencies\": false\r\n}", + "RequestBody": "{\r\n \"id\": \"testPool\",\r\n \"vmSize\": \"STANDARD_D2S_V3\",\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"zonal\"\r\n }\r\n },\r\n \"targetDedicatedNodes\": 2,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableInterNodeCommunication\": false,\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", "ResponseHeaders": { "Transfer-Encoding": [ "chunked" ], "ETag": [ - "0x8DB6E3A03915305" + "0x8DC4AAD96E46948" ], "Location": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/jobs/job-1" + "https://billstestba24326.uksouth.batch.azure.com/pools/testPool" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "65cb4637-7bb7-4760-b663-6de7b3039322" + "5340c871-3bd1-4499-9f01-ced95fc127fe" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -58,65 +55,227 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/jobs/job-1" + "https://billstestba24326.uksouth.batch.azure.com/pools/testPool" ], "Date": [ - "Fri, 16 Jun 2023 07:19:24 GMT" + "Fri, 22 Mar 2024 20:20:59 GMT" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:19:25 GMT" + "Fri, 22 Mar 2024 20:21:00 GMT" ] }, "ResponseBody": "", "StatusCode": 201 }, { - "RequestUri": "/jobs/testJobCompletesWhenTaskFails/tasks?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnMvdGVzdEpvYkNvbXBsZXRlc1doZW5UYXNrRmFpbHMvdGFza3M/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", - "RequestMethod": "POST", + "RequestUri": "/pools/testPool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", + "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "8129824c-bc20-48e7-af37-595a2d03c907" + "59f2880e-f674-4229-a893-c9ea0d28cf5b" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:19:23 GMT" + "Fri, 22 Mar 2024 20:21:00 GMT" ], - "x-ms-client-request-id": [ - "16a27332-7ae2-499f-a040-d0024647b1fb" + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "0x8DC4AAD96E46948" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "4c15c813-63c4-4e38-828b-5601ddaf41cc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:20:59 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 20:21:00 GMT" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"testPool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/testPool\",\r\n \"eTag\": \"0x8DC4AAD96E46948\",\r\n \"lastModified\": \"2024-03-22T20:21:00.1117Z\",\r\n \"creationTime\": \"2024-03-22T20:21:00.1116988Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:00.1116988Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T20:21:00.1117001Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/pools/testPool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "1429be58-33d9-47d9-9f73-e24bed892b5f" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:05 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "0x8DC4AAD96E46948" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "bf2b20d4-92f6-4251-8a8e-05ee6e5d50a3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:05 GMT" ], "Content-Type": [ - "application/json; odata=minimalmetadata; charset=utf-8" + "application/json; odata=minimalmetadata" ], - "Content-Length": [ - "251" + "Last-Modified": [ + "Fri, 22 Mar 2024 20:21:00 GMT" ] }, - "RequestBody": "{\r\n \"id\": \"taskId-1\",\r\n \"commandLine\": \"cmd /c exit 3\",\r\n \"exitConditions\": {\r\n \"exitCodeRanges\": [\r\n {\r\n \"start\": 2,\r\n \"end\": 4,\r\n \"exitOptions\": {\r\n \"jobAction\": \"terminate\"\r\n }\r\n }\r\n ]\r\n }\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"testPool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/testPool\",\r\n \"eTag\": \"0x8DC4AAD96E46948\",\r\n \"lastModified\": \"2024-03-22T20:21:00.1117Z\",\r\n \"creationTime\": \"2024-03-22T20:21:00.1116988Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:00.1116988Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T20:21:00.1117001Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/pools/testPool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "392d399d-cfcb-41ed-b308-62ccc9b794ff" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:10 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", "ResponseHeaders": { "Transfer-Encoding": [ "chunked" ], "ETag": [ - "0x8DB6E3A03B17541" + "0x8DC4AAD96E46948" ], - "Location": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/jobs/testJobCompletesWhenTaskFails/tasks/taskId-1" + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "065eab05-67d4-4082-a35e-16d65eed560e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:10 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 20:21:00 GMT" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"testPool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/testPool\",\r\n \"eTag\": \"0x8DC4AAD96E46948\",\r\n \"lastModified\": \"2024-03-22T20:21:00.1117Z\",\r\n \"creationTime\": \"2024-03-22T20:21:00.1116988Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:00.1116988Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T20:21:00.1117001Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/pools/testPool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "56ee41b6-ed33-443b-926f-87e02b3fdbb0" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:15 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "0x8DC4AAD96E46948" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "2b7c03a3-42ca-4366-9275-3b9a59bef38e" + "90e6701c-20cf-4ae2-b198-fdc8feed028a" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -127,38 +286,3368 @@ "DataServiceVersion": [ "3.0" ], - "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/jobs/testJobCompletesWhenTaskFails/tasks/taskId-1" + "Date": [ + "Fri, 22 Mar 2024 20:21:15 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 20:21:00 GMT" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"testPool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/testPool\",\r\n \"eTag\": \"0x8DC4AAD96E46948\",\r\n \"lastModified\": \"2024-03-22T20:21:00.1117Z\",\r\n \"creationTime\": \"2024-03-22T20:21:00.1116988Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:00.1116988Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T20:21:00.1117001Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/pools/testPool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "bdcbd287-838f-4fbe-b3d5-6d741d273b70" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:21 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "0x8DC4AAD96E46948" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "e1d3ca25-0656-493b-bb23-084b25eee19b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:19:24 GMT" + "Fri, 22 Mar 2024 20:21:21 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:19:25 GMT" + "Fri, 22 Mar 2024 20:21:00 GMT" ] }, - "ResponseBody": "", - "StatusCode": 201 + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"testPool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/testPool\",\r\n \"eTag\": \"0x8DC4AAD96E46948\",\r\n \"lastModified\": \"2024-03-22T20:21:00.1117Z\",\r\n \"creationTime\": \"2024-03-22T20:21:00.1116988Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:00.1116988Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T20:21:00.1117001Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/pools/testPool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "2f5b7586-06ba-48aa-83f4-d6d48317c958" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:26 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "0x8DC4AAD96E46948" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "ca3de664-0b7b-4bfa-9a40-ae864884725d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:26 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 20:21:00 GMT" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"testPool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/testPool\",\r\n \"eTag\": \"0x8DC4AAD96E46948\",\r\n \"lastModified\": \"2024-03-22T20:21:00.1117Z\",\r\n \"creationTime\": \"2024-03-22T20:21:00.1116988Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:00.1116988Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T20:21:00.1117001Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 2,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/pools/testPool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "5537958b-3d91-47d9-8c3e-f61ab091e005" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:31 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "0x8DC4AAD96E46948" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "2c190cdd-8ab7-4692-8a30-3845fbd7b837" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:31 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 20:21:00 GMT" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"testPool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/testPool\",\r\n \"eTag\": \"0x8DC4AAD96E46948\",\r\n \"lastModified\": \"2024-03-22T20:21:00.1117Z\",\r\n \"creationTime\": \"2024-03-22T20:21:00.1116988Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:00.1116988Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T20:21:27.6117009Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 2,\r\n \"targetDedicatedNodes\": 2,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\",\r\n \"currentNodeCommunicationMode\": \"classic\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "POST", + "RequestHeaders": { + "client-request-id": [ + "f40dbc99-c2e8-4deb-836a-fa64faf20071" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:34 GMT" + ], + "x-ms-client-request-id": [ + "68525262-6c01-4dad-b965-2bb6b9ce68a6" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; charset=utf-8" + ], + "Content-Length": [ + "197" + ] + }, + "RequestBody": "{\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"priority\": 0,\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onTaskFailure\": \"performexitoptionsjobaction\",\r\n \"usesTaskDependencies\": false\r\n}", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "0x8DC4AADABC8EA63" + ], + "Location": [ + "https://billstestba24326.uksouth.batch.azure.com/jobs/job-1" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "83e18ddf-1437-4df6-b833-d65212684049" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "DataServiceId": [ + "https://billstestba24326.uksouth.batch.azure.com/jobs/job-1" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:34 GMT" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 20:21:35 GMT" + ] + }, + "ResponseBody": "", + "StatusCode": 201 + }, + { + "RequestUri": "/jobs/testJobCompletesWhenTaskFails/tasks?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnMvdGVzdEpvYkNvbXBsZXRlc1doZW5UYXNrRmFpbHMvdGFza3M/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "POST", + "RequestHeaders": { + "client-request-id": [ + "be37baa7-4407-46dd-8861-9d54143123e1" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:35 GMT" + ], + "x-ms-client-request-id": [ + "6538666a-92df-45ba-a290-e2769248e84d" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; charset=utf-8" + ], + "Content-Length": [ + "251" + ] + }, + "RequestBody": "{\r\n \"id\": \"taskId-1\",\r\n \"commandLine\": \"cmd /c exit 3\",\r\n \"exitConditions\": {\r\n \"exitCodeRanges\": [\r\n {\r\n \"start\": 2,\r\n \"end\": 4,\r\n \"exitOptions\": {\r\n \"jobAction\": \"terminate\"\r\n }\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "0x8DC4AADABF16529" + ], + "Location": [ + "https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails/tasks/taskId-1" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "8651e809-0f3f-4228-8d0d-d04dbc70f5fb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "DataServiceId": [ + "https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails/tasks/taskId-1" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:35 GMT" + ], + "Last-Modified": [ + "Fri, 22 Mar 2024 20:21:35 GMT" + ] + }, + "ResponseBody": "", + "StatusCode": 201 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "8416a380-8563-4a2e-a64c-91090711ce11" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:35 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "49462e6d-d934-467f-8377-012037f94801" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:35 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "429fab6e-74b1-4bef-ba93-631ab7ead296" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:35 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "1a2e7ee7-d632-481a-a098-61f11d531119" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:35 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "9f3446f3-d976-4b4a-8587-ffe022464022" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:35 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "d685e495-e220-4a21-9c28-88e40fdd31b6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:35 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "5a43a3ad-59ee-44d8-97f6-9c11ffc5e193" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:35 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "b0f94005-bfba-4868-ad02-682eab0b9d2e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:36 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "59bb0471-2176-4d05-8640-db57d684ad9a" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:36 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "5996bdda-3816-49ce-a7ed-2a9c2b3317fb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:36 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "08b634e5-e1ed-4a43-b0ee-25173d5c8b49" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:36 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "8fd56b24-251f-46e4-9ca3-91b1daff7718" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:36 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "5e3fd06e-71fe-416a-b4bb-45fa65939110" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:36 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "13c81eb2-9bff-4c75-bd94-fad31d6824f2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:36 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "9f3243dd-2e6b-44e0-b958-19d5d0995657" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:36 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "9d5df1e1-6267-4dbd-954c-7b647f959058" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:36 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "ef9735be-70c0-4b3d-8aef-9211babd3736" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:37 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "17217f22-8142-4bf3-942d-7d43ab6e3f4c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:37 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "14eb933d-a707-412d-8b81-90e3b2a669d2" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:37 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "8a053e5c-63c5-4405-b543-a61fb0994c07" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:37 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "d95a5cd2-df04-4b5c-bc2c-b391c4585e1f" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:37 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "cf8a72be-8190-48f7-8d5c-aca88fdb79f0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:37 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "935efb15-bccd-4b50-aae8-884103008308" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:37 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "3e1ec59d-5356-4b55-99db-bb9d97657060" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:37 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "52eb1c85-85ae-44ef-8779-627083198893" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:37 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "cd9f601c-112d-4084-9dde-1dd51558e232" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:38 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "bf9ef6cc-0bd6-4b98-b675-9805ebf8d046" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:38 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "bdbd6356-2bb0-4dbf-9676-132e894f70be" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:38 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "429a5748-aafc-4436-8bff-ea13c521bd8e" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:38 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "f26520b5-950e-404f-b017-be566dda331e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:38 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "08fb59be-b1a9-4d43-b9e7-ffa5d40c3812" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:38 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "7b4dd344-7351-45d7-80a6-db0d80962d27" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:38 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "2837d1f7-a645-48f0-95a3-54de32791fa9" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:38 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "116cb8f7-4922-4628-9a3f-07bb0753fa0d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:39 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "921bf36a-a69d-4725-b7b8-37bb6395bdde" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:39 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "f4a93973-01e5-463f-9104-c8af8f6e7801" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:39 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "639a34aa-9117-468a-9967-713497d6e7f3" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:39 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "b5996e17-9d6c-4191-b2f7-ea3fd09931f8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:39 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "0dfdf4db-1990-46e0-a16a-b8c075a9d379" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:39 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "49691be4-de2d-4790-9dc6-f74bc4d96917" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:39 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "bf68cb8c-b659-412f-bb38-bfa7a59697d3" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:39 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "d7053087-723a-48f3-8240-465e1ee3db8f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:40 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "3d0b2c54-7e87-4a14-9153-7fe9f203fcce" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:40 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "e90316ff-8464-4c5e-ae30-d76007cf3599" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:40 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "a93716e6-2214-4135-a50e-08ce2c13ec48" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:40 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "b672fcf0-c6d7-4ec5-8898-04c4a318f6ab" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:40 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "4d283243-507c-4665-bcf0-ea58615eb09c" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:40 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "daceb809-7d36-4b43-81f1-38f972ba7943" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:40 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "f85686b3-de76-421a-a3c3-ab83792c15b7" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:40 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "83577e8e-5714-4a0d-a7a6-61908c146553" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:41 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "71d4d118-aaad-48ad-b6bc-e09706db3bd4" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:41 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "55afbeb5-960c-44b0-aebb-b61edb526547" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:41 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "f9dda5f6-d6d9-4680-aba1-f4ef97eb3f4a" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:41 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "0ed228ba-de32-40d2-849a-0c4f33aabeff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:41 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "f98e985c-b17c-44c7-baac-d5a1aa12ce02" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:41 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "801862cc-e77b-430f-bd20-88a4d81e1cb1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:41 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "df6f2518-8823-4fc1-bb32-6cb2e33dab41" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:41 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "1724fe52-d0e1-488f-b77c-9860fcf8d22a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:41 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "8854ef1f-4688-4510-865f-fb05848eec44" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:42 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "632c2cc5-22c2-48b7-8553-57bd73a8dc47" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:42 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "54752319-4605-4768-9805-9f10979163bb" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:42 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "a2381c04-42e9-4611-a716-256073f6a95d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:42 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "6bd65b0c-6f87-4423-9adb-2b8bec21d782" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:42 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "7ee1792a-8d44-4afa-9e8b-01c8516390cf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:42 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "50916667-6f9f-48dc-9f89-9e63d0d6504c" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:42 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "df1da3f9-3fe4-4089-af83-af0565b1ce36" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:42 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "513d0493-2008-4c81-b0c0-9c3f0d0413dc" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:42 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "96c93b75-abaa-4a88-b428-b8689dd01c53" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:43 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "5e1697a0-be1a-4d79-982e-e27dc3aecf15" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:43 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "ccdbc5e3-096f-4f7c-bb19-9028057eb920" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:43 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "6fa5e7e9-3a14-4aa8-a38a-6562b5c0907f" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:43 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "6cfd3859-f74f-4428-97d2-7f55f601443f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:43 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "51fe3bbe-0845-46bf-a31b-64ca64b3a987" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:43 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "ac991b1d-0994-4772-beb4-b26553babd47" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:43 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "8c4de4c3-c9fc-44fb-a1d4-89d4c28b911b" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:44 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "556b69da-ef5e-4ddb-83f8-51544ec762c6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:44 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "1ea3006c-e4e1-4ed2-bb95-eed3389168ad" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:44 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "b3620e63-a9af-4816-b7cb-b1fdae39821a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:44 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "2ac3dcd7-75c9-4d8c-8e98-136632244f48" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:44 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "af2aa86f-d3dd-41e3-a992-95a22d10bb09" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:44 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "d9eab0ca-919a-4f7d-88c7-2c90636cb166" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:44 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "b3e7cbc2-7b9a-4d7f-81ed-81f3d05b1707" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:44 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "1036c019-5036-448b-92f0-56de8d4cd9c4" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:45 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "877f7991-9dab-4805-a8c9-59a0db40b49a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:45 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "9c932340-5ea8-4eee-94a9-a8c34e26269f" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:45 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "cdae9ae4-948d-447e-b1a3-d88c052f2152" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:45 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "0bf4ee57-c854-41d4-b14e-7528e7b86160" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:45 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "2e84e751-309a-4cd8-85de-752c49f6ceec" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:45 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "19afc1df-8ff5-4283-8427-8c0139114ef8" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:45 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "fb546464-c6e4-4aaf-a06c-f106f691bf4e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:46 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "0b4137f9-3c5b-4131-8731-0581a849dbec" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:46 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "a96a9ab7-71ca-470d-b730-9025a998a808" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:46 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "810ae960-97d8-4ed7-b04a-e939619b2ad0" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:46 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "206ea41e-a138-4872-9ae8-efd284c30974" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:46 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "c9df7083-9997-43aa-8261-a8336978c30f" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:46 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "b6e4f8d8-dcd6-4365-9095-2018372ec195" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:46 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "316f2f3a-d470-4616-9ff4-1ab61da624c8" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:46 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "296c4fa0-7eda-4089-82aa-68681c7c1b36" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:47 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "73e3163d-e038-40ba-8fe2-3498f9ef3aca" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:47 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "cee6657d-0f06-4597-94e7-9e5534d8e647" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:47 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "666e6138-4491-4811-a070-b1e740361ca2" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:47 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "925558d2-8d66-486d-b0e3-78567ad4a016" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:47 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "84c578ac-dba0-4d8a-ac93-9991f6e57461" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:47 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "7d4bd4e6-0c43-4e6a-993a-61bda27ce830" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:47 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "21e78b98-5b33-4aac-bb8c-9f8f4701bc9b" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:47 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "776aa2cb-8ba8-4fc2-885f-b00b94663475" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:48 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "2ce11b63-2e0b-41c0-84ec-68759c4a9017" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:48 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "f30ab078-e710-4bae-ba0f-f06bff8ab95a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:48 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "33f69fee-48dd-4ccc-99de-a978d679914b" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:48 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "90e0bfa4-279c-4534-8c4f-6224c2f29e87" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:48 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADABC8EA63\",\r\n \"lastModified\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "971c647d-31ed-47b6-b998-96bb459b054e" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:48 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "d1b38df1-93a5-4d6f-b3fd-3f9f68fa5ed7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:48 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADB4072818\",\r\n \"lastModified\": \"2024-03-22T20:21:48.9933336Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"terminating\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:48.9933336Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\",\r\n \"terminateReason\": \"TaskFailed\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "5b9d9d32-d825-4be4-98f4-a021088b6fa4" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:48 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "e1bb3e21-2d3c-4e5d-a8d6-abb86595c987" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:48 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADB4072818\",\r\n \"lastModified\": \"2024-03-22T20:21:48.9933336Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"terminating\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:48.9933336Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\",\r\n \"terminateReason\": \"TaskFailed\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "GET", + "RequestHeaders": { + "client-request-id": [ + "84b03fb6-1216-4b2b-b878-52994909c3f2" + ], + "Accept-Language": [ + "en-US" + ], + "ocp-date": [ + "Fri, 22 Mar 2024 20:21:49 GMT" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", + "AzurePowershell/Az1.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "request-id": [ + "d3ac5aaa-01a4-4dab-b1f0-3b5fe25e18fd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0" + ], + "Date": [ + "Fri, 22 Mar 2024 20:21:49 GMT" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADB4072818\",\r\n \"lastModified\": \"2024-03-22T20:21:48.9933336Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"terminating\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:48.9933336Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\",\r\n \"terminateReason\": \"TaskFailed\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 }, { - "RequestUri": "/jobs?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "38aecebf-3f75-4cc0-916f-c59234d0fff5" + "ad958832-5498-42fc-94f5-f621246e4d14" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:19:24 GMT" + "Fri, 22 Mar 2024 20:21:49 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -171,7 +3660,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "53d66ad3-a7d7-4a91-a123-d555254c5ee2" + "0f7eddb8-a113-4a80-bb62-800a33b1e70a" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -183,34 +3672,34 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:19:25 GMT" + "Fri, 22 Mar 2024 20:21:49 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DB6E3A03915305\",\r\n \"lastModified\": \"2023-06-16T07:19:25.0071301Z\",\r\n \"creationTime\": \"2023-06-16T07:19:24.9881313Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:19:25.0071301Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2023-06-16T07:19:25.0071301Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADB4072818\",\r\n \"lastModified\": \"2024-03-22T20:21:48.9933336Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"terminating\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:48.9933336Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\",\r\n \"terminateReason\": \"TaskFailed\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", "StatusCode": 200 }, { - "RequestUri": "/jobs?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "400789ce-e796-41d1-bf84-9aa90b53bf78" + "b5b925ca-3317-4414-8eab-17134c48daec" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:19:24 GMT" + "Fri, 22 Mar 2024 20:21:49 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -223,7 +3712,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "d3809302-a81b-49f4-ae04-4f2f3ea4d966" + "18858283-6f12-4b17-8ea2-e2d854fc3047" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -235,34 +3724,34 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:19:25 GMT" + "Fri, 22 Mar 2024 20:21:49 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DB6E3A03915305\",\r\n \"lastModified\": \"2023-06-16T07:19:25.0071301Z\",\r\n \"creationTime\": \"2023-06-16T07:19:24.9881313Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:19:25.0071301Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2023-06-16T07:19:25.0071301Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADB4072818\",\r\n \"lastModified\": \"2024-03-22T20:21:48.9933336Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"terminating\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:48.9933336Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"poolId\": \"testPool\",\r\n \"terminateReason\": \"TaskFailed\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", "StatusCode": 200 }, { - "RequestUri": "/jobs?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "96eec062-61a9-4231-9442-7ac1fc3d428c" + "2452c322-3b21-4b65-8105-91a5479dc065" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:19:44 GMT" + "Fri, 22 Mar 2024 20:21:49 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -275,7 +3764,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "9e84ceaa-f288-4d34-87b3-cff22ee84176" + "cad00438-fb7b-4316-8ed6-ce51135c145b" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -287,34 +3776,34 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:19:45 GMT" + "Fri, 22 Mar 2024 20:21:49 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DB6E3A0802FB32\",\r\n \"lastModified\": \"2023-06-16T07:19:32.4628786Z\",\r\n \"creationTime\": \"2023-06-16T07:19:24.9881313Z\",\r\n \"state\": \"completed\",\r\n \"stateTransitionTime\": \"2023-06-16T07:19:33.4079036Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2023-06-16T07:19:25.0071301Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2023-06-16T07:19:25.0071301Z\",\r\n \"endTime\": \"2023-06-16T07:19:33.4079036Z\",\r\n \"poolId\": \"testPool\",\r\n \"terminateReason\": \"TaskFailed\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC4AADB4072818\",\r\n \"lastModified\": \"2024-03-22T20:21:48.9933336Z\",\r\n \"creationTime\": \"2024-03-22T20:21:35.1506578Z\",\r\n \"state\": \"completed\",\r\n \"stateTransitionTime\": \"2024-03-22T20:21:49.9493666Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T20:21:35.1636579Z\",\r\n \"endTime\": \"2024-03-22T20:21:49.9493666Z\",\r\n \"poolId\": \"testPool\",\r\n \"terminateReason\": \"TaskFailed\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", "StatusCode": 200 }, { - "RequestUri": "/jobs/testJobCompletesWhenTaskFails?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnMvdGVzdEpvYkNvbXBsZXRlc1doZW5UYXNrRmFpbHM/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/jobs/testJobCompletesWhenTaskFails?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnMvdGVzdEpvYkNvbXBsZXRlc1doZW5UYXNrRmFpbHM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "DELETE", "RequestHeaders": { "client-request-id": [ - "eb5c4183-b946-4941-b8e8-1f79bed8f699" + "3278708e-b107-4742-ae15-00dcbe66875d" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:20:04 GMT" + "Fri, 22 Mar 2024 20:21:49 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Length": [ @@ -330,7 +3819,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "bd57d923-94e1-4b40-bd08-5b66c8071d93" + "36558519-5bbf-4ae8-a5b5-648f07c76b2f" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -342,7 +3831,7 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:20:06 GMT" + "Fri, 22 Mar 2024 20:21:50 GMT" ] }, "ResponseBody": "", @@ -351,9 +3840,9 @@ ], "Names": {}, "Variables": { - "SubscriptionId": "21abd678-18c5-4660-9fdd-8c5ba6b6fe1f", - "AZURE_BATCH_ACCOUNT": "hoppeeastasia2", - "AZURE_BATCH_ENDPOINT": "https://hoppeeastasia2.eastasia.batch.azure.com", - "AZURE_BATCH_RESOURCE_GROUP": "123" + "SubscriptionId": "6602ac9a-5dad-41bd-a792-592c704b6a31", + "AZURE_BATCH_ACCOUNT": "billstestba24326", + "AZURE_BATCH_ENDPOINT": "https://billstestba24326.uksouth.batch.azure.com", + "AZURE_BATCH_RESOURCE_GROUP": "automation" } } \ No newline at end of file diff --git a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.JobTests/TestDisableEnableTerminateJob.json b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.JobTests/TestDisableEnableTerminateJob.json index 88d794ccb0e5..8e83eb134258 100644 --- a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.JobTests/TestDisableEnableTerminateJob.json +++ b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.JobTests/TestDisableEnableTerminateJob.json @@ -1,24 +1,24 @@ { "Entries": [ { - "RequestUri": "/jobs?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "56ca3e38-bb07-4136-b802-255196adfb97" + "6bcb309a-f785-487d-8fdc-0c445fe718b6" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:19:05 GMT" + "Thu, 21 Mar 2024 23:08:11 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Type": [ @@ -34,16 +34,16 @@ "chunked" ], "ETag": [ - "0x8DB6E39F8E06643" + "0x8DC49FBC7FAE2D9" ], "Location": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/jobs/job-1" + "https://billstestba24326.uksouth.batch.azure.com/jobs/job-1" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "c05e430d-8494-4a67-9128-a869a5de3353" + "725e490b-d1a0-4900-99e8-380ecb768639" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -55,40 +55,40 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/jobs/job-1" + "https://billstestba24326.uksouth.batch.azure.com/jobs/job-1" ], "Date": [ - "Fri, 16 Jun 2023 07:19:07 GMT" + "Thu, 21 Mar 2024 23:08:11 GMT" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:19:07 GMT" + "Thu, 21 Mar 2024 23:08:12 GMT" ] }, "ResponseBody": "", "StatusCode": 201 }, { - "RequestUri": "/jobs/testDisableEnableTerminateJob/disable?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnMvdGVzdERpc2FibGVFbmFibGVUZXJtaW5hdGVKb2IvZGlzYWJsZT9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjA=", + "RequestUri": "/jobs/testDisableEnableTerminateJob/disable?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnMvdGVzdERpc2FibGVFbmFibGVUZXJtaW5hdGVKb2IvZGlzYWJsZT9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "9f78507b-ae9e-4cc1-ade6-1f10f2981445" + "5ed56fba-c3a4-41c2-87f5-6899016146c9" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:19:08 GMT" + "Thu, 21 Mar 2024 23:08:12 GMT" ], "x-ms-client-request-id": [ - "49a05db7-5b85-4ea4-acb8-217a50c42eda" + "ccec5e60-5b16-48d0-8899-51ef3f4a515b" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Type": [ @@ -104,13 +104,13 @@ "chunked" ], "ETag": [ - "0x8DB6E39FA6FCDCA" + "0x8DC49FBC8A71B18" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "e5c90545-3381-46c8-aa66-6e61347dfd87" + "f2dbc1e2-120b-47f6-a10b-d94dde35d37f" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -122,40 +122,40 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/jobs/testDisableEnableTerminateJob/disable" + "https://billstestba24326.uksouth.batch.azure.com/jobs/testDisableEnableTerminateJob/disable" ], "Date": [ - "Fri, 16 Jun 2023 07:19:09 GMT" + "Thu, 21 Mar 2024 23:08:12 GMT" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:19:09 GMT" + "Thu, 21 Mar 2024 23:08:13 GMT" ] }, "ResponseBody": "", "StatusCode": 202 }, { - "RequestUri": "/jobs/testDisableEnableTerminateJob?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnMvdGVzdERpc2FibGVFbmFibGVUZXJtaW5hdGVKb2I/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/jobs/testDisableEnableTerminateJob?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnMvdGVzdERpc2FibGVFbmFibGVUZXJtaW5hdGVKb2I/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "3f3ea7c3-0555-4592-9a6a-f49647c4810f" + "7125a362-9cbe-4a8f-8899-46446343b506" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:19:18 GMT" + "Thu, 21 Mar 2024 23:08:23 GMT" ], "x-ms-client-request-id": [ - "31059c7c-2a10-410d-ae75-167033d65a98" + "0ac80eaa-ffe9-426f-a487-06f34784ae8e" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -165,13 +165,13 @@ "chunked" ], "ETag": [ - "0x8DB6E39FA6FCDCA" + "0x8DC49FBC8A71B18" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "1a502229-663a-4974-a22c-c768b870b248" + "475807e3-9636-4a33-9647-ca87b518f609" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -183,40 +183,40 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:19:19 GMT" + "Thu, 21 Mar 2024 23:08:22 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:19:09 GMT" + "Thu, 21 Mar 2024 23:08:13 GMT" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#jobs/@Element\",\r\n \"id\": \"testDisableEnableTerminateJob\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobs/testDisableEnableTerminateJob\",\r\n \"eTag\": \"0x8DB6E39FA6FCDCA\",\r\n \"lastModified\": \"2023-06-16T07:19:09.6879562Z\",\r\n \"creationTime\": \"2023-06-16T07:19:07.0408473Z\",\r\n \"state\": \"disabled\",\r\n \"stateTransitionTime\": \"2023-06-16T07:19:09.7089564Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2023-06-16T07:19:07.0704195Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2023-06-16T07:19:07.0704195Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"noaction\"\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs/@Element\",\r\n \"id\": \"testDisableEnableTerminateJob\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testDisableEnableTerminateJob\",\r\n \"eTag\": \"0x8DC49FBC8A71B18\",\r\n \"lastModified\": \"2024-03-21T23:08:13.17814Z\",\r\n \"creationTime\": \"2024-03-21T23:08:12.0244784Z\",\r\n \"state\": \"disabled\",\r\n \"stateTransitionTime\": \"2024-03-21T23:08:13.1871504Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2024-03-21T23:08:12.0494809Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-21T23:08:12.0494809Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"noaction\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/jobs/testDisableEnableTerminateJob?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnMvdGVzdERpc2FibGVFbmFibGVUZXJtaW5hdGVKb2I/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/jobs/testDisableEnableTerminateJob?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnMvdGVzdERpc2FibGVFbmFibGVUZXJtaW5hdGVKb2I/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "29266027-dcb7-4af5-a071-fec0905a1c1f" + "ed3ff065-e184-422d-b828-aaf46af16e52" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:19:19 GMT" + "Thu, 21 Mar 2024 23:08:24 GMT" ], "x-ms-client-request-id": [ - "b3f7be91-d27f-4056-8e66-778396f3ae1d" + "285d5e56-092a-4be4-9189-2532477321ff" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -226,13 +226,13 @@ "chunked" ], "ETag": [ - "0x8DB6E3A00C6C681" + "0x8DC49FBCF3E5A13" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "7649223a-5f14-474d-8913-bed7dc7fc96a" + "9313e9c0-67fa-4083-8317-597b9efb9477" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -244,40 +244,40 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:19:20 GMT" + "Thu, 21 Mar 2024 23:08:23 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:19:20 GMT" + "Thu, 21 Mar 2024 23:08:24 GMT" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#jobs/@Element\",\r\n \"id\": \"testDisableEnableTerminateJob\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobs/testDisableEnableTerminateJob\",\r\n \"eTag\": \"0x8DB6E3A00C6C681\",\r\n \"lastModified\": \"2023-06-16T07:19:20.3242625Z\",\r\n \"creationTime\": \"2023-06-16T07:19:07.0408473Z\",\r\n \"state\": \"terminating\",\r\n \"stateTransitionTime\": \"2023-06-16T07:19:20.3242625Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2023-06-16T07:19:20.0381275Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2023-06-16T07:19:07.0704195Z\",\r\n \"poolId\": \"testPool\",\r\n \"terminateReason\": \"UserTerminate\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"noaction\"\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs/@Element\",\r\n \"id\": \"testDisableEnableTerminateJob\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testDisableEnableTerminateJob\",\r\n \"eTag\": \"0x8DC49FBCF3E5A13\",\r\n \"lastModified\": \"2024-03-21T23:08:24.2356755Z\",\r\n \"creationTime\": \"2024-03-21T23:08:12.0244784Z\",\r\n \"state\": \"completed\",\r\n \"stateTransitionTime\": \"2024-03-21T23:08:24.2606778Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2024-03-21T23:08:23.7727864Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-21T23:08:12.0494809Z\",\r\n \"endTime\": \"2024-03-21T23:08:24.2606778Z\",\r\n \"poolId\": \"testPool\",\r\n \"terminateReason\": \"UserTerminate\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"noaction\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/jobs/testDisableEnableTerminateJob/enable?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnMvdGVzdERpc2FibGVFbmFibGVUZXJtaW5hdGVKb2IvZW5hYmxlP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", + "RequestUri": "/jobs/testDisableEnableTerminateJob/enable?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnMvdGVzdERpc2FibGVFbmFibGVUZXJtaW5hdGVKb2IvZW5hYmxlP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "6add8b95-8556-46b7-b042-f251518f80d4" + "26a97470-0897-4d11-913d-f156a208483b" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:19:18 GMT" + "Thu, 21 Mar 2024 23:08:23 GMT" ], "x-ms-client-request-id": [ - "92f2fb97-53f4-4ea5-9ea1-c34773c93050" + "618ad6b0-d630-4a11-8423-e5185f3831e1" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Length": [ @@ -290,13 +290,13 @@ "chunked" ], "ETag": [ - "0x8DB6E3A009B1D5B" + "0x8DC49FBCEF7B878" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "dbeb12ab-7fea-408f-9db5-634465819d1b" + "844f75ad-1742-48e7-931f-7c60363438d9" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -308,40 +308,40 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/jobs/testDisableEnableTerminateJob/enable" + "https://billstestba24326.uksouth.batch.azure.com/jobs/testDisableEnableTerminateJob/enable" ], "Date": [ - "Fri, 16 Jun 2023 07:19:19 GMT" + "Thu, 21 Mar 2024 23:08:23 GMT" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:19:20 GMT" + "Thu, 21 Mar 2024 23:08:23 GMT" ] }, "ResponseBody": "", "StatusCode": 202 }, { - "RequestUri": "/jobs?api-version=2023-05-01.17.0&$filter=id%20eq%20%27testDisableEnableTerminateJob%27", - "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4wJiRmaWx0ZXI9aWQlMjBlcSUyMCUyN3Rlc3REaXNhYmxlRW5hYmxlVGVybWluYXRlSm9iJTI3", + "RequestUri": "/jobs?api-version=2024-02-01.19.0&$filter=id%20eq%20%27testDisableEnableTerminateJob%27", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4wJiRmaWx0ZXI9aWQlMjBlcSUyMCUyN3Rlc3REaXNhYmxlRW5hYmxlVGVybWluYXRlSm9iJTI3", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "f0ae6174-bb77-4274-b01d-f10c6733ba76" + "e8ebbbd8-c957-46ac-a8e0-8b720ede7338" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:19:18 GMT" + "Thu, 21 Mar 2024 23:08:23 GMT" ], "x-ms-client-request-id": [ - "0936458b-4cac-49b0-8745-fba213d27152" + "29ef7669-ec96-4c86-b52e-ac1ed5765aa5" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -354,7 +354,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "30bc688e-b7ed-4fc2-9a5c-cd0f06fd34f2" + "f33cf009-b033-4672-92f2-d97a4e771d13" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -366,37 +366,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:19:19 GMT" + "Thu, 21 Mar 2024 23:08:23 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testDisableEnableTerminateJob\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobs/testDisableEnableTerminateJob\",\r\n \"eTag\": \"0x8DB6E3A009B1D5B\",\r\n \"lastModified\": \"2023-06-16T07:19:20.0381275Z\",\r\n \"creationTime\": \"2023-06-16T07:19:07.0408473Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:19:20.0381275Z\",\r\n \"previousState\": \"disabled\",\r\n \"previousStateTransitionTime\": \"2023-06-16T07:19:09.7089564Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2023-06-16T07:19:07.0704195Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"noaction\"\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"testDisableEnableTerminateJob\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testDisableEnableTerminateJob\",\r\n \"eTag\": \"0x8DC49FBCEF7B878\",\r\n \"lastModified\": \"2024-03-21T23:08:23.7727864Z\",\r\n \"creationTime\": \"2024-03-21T23:08:12.0244784Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-21T23:08:23.7727864Z\",\r\n \"previousState\": \"disabled\",\r\n \"previousStateTransitionTime\": \"2024-03-21T23:08:13.1871504Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-21T23:08:12.0494809Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"noaction\"\r\n }\r\n ]\r\n}", "StatusCode": 200 }, { - "RequestUri": "/jobs/testDisableEnableTerminateJob/terminate?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnMvdGVzdERpc2FibGVFbmFibGVUZXJtaW5hdGVKb2IvdGVybWluYXRlP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", + "RequestUri": "/jobs/testDisableEnableTerminateJob/terminate?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnMvdGVzdERpc2FibGVFbmFibGVUZXJtaW5hdGVKb2IvdGVybWluYXRlP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "311a882f-3d11-4968-a9e0-17efeef84bfd" + "2a68dfa8-f7be-4f83-931b-9c5bb2b0e4fb" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:19:19 GMT" + "Thu, 21 Mar 2024 23:08:23 GMT" ], "x-ms-client-request-id": [ - "0a16b5d4-ecb6-49a5-9902-41dd4024f209" + "54f073f7-94ee-4ad1-b208-0509773963a9" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Length": [ @@ -409,13 +409,13 @@ "chunked" ], "ETag": [ - "0x8DB6E3A00C6C681" + "0x8DC49FBCF3E5A13" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "36a56df6-45da-42e4-9b95-5b34e946ebc2" + "24e5a733-2241-4135-821a-3faeda0457c7" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -427,37 +427,37 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/jobs/testDisableEnableTerminateJob/terminate" + "https://billstestba24326.uksouth.batch.azure.com/jobs/testDisableEnableTerminateJob/terminate" ], "Date": [ - "Fri, 16 Jun 2023 07:19:20 GMT" + "Thu, 21 Mar 2024 23:08:23 GMT" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:19:20 GMT" + "Thu, 21 Mar 2024 23:08:24 GMT" ] }, "ResponseBody": "", "StatusCode": 202 }, { - "RequestUri": "/jobs/testDisableEnableTerminateJob?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnMvdGVzdERpc2FibGVFbmFibGVUZXJtaW5hdGVKb2I/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/jobs/testDisableEnableTerminateJob?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnMvdGVzdERpc2FibGVFbmFibGVUZXJtaW5hdGVKb2I/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "DELETE", "RequestHeaders": { "client-request-id": [ - "0eebbcfa-f92f-40b5-b856-f8c11db9686f" + "3ca0ce08-f835-40ad-9e6b-28f9b9ba10f2" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:19:19 GMT" + "Thu, 21 Mar 2024 23:08:24 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Length": [ @@ -473,7 +473,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "5fb63717-4362-409e-af77-5cd16383ee95" + "3abf9766-385b-4444-b475-54edfb486877" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -485,7 +485,7 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:19:21 GMT" + "Thu, 21 Mar 2024 23:08:24 GMT" ] }, "ResponseBody": "", @@ -494,9 +494,9 @@ ], "Names": {}, "Variables": { - "SubscriptionId": "21abd678-18c5-4660-9fdd-8c5ba6b6fe1f", - "AZURE_BATCH_ACCOUNT": "hoppeeastasia2", - "AZURE_BATCH_ENDPOINT": "https://hoppeeastasia2.eastasia.batch.azure.com", - "AZURE_BATCH_RESOURCE_GROUP": "123" + "SubscriptionId": "6602ac9a-5dad-41bd-a792-592c704b6a31", + "AZURE_BATCH_ACCOUNT": "billstestba24326", + "AZURE_BATCH_ENDPOINT": "https://billstestba24326.uksouth.batch.azure.com", + "AZURE_BATCH_RESOURCE_GROUP": "automation" } } \ No newline at end of file diff --git a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.JobTests/TestJobCRUD.json b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.JobTests/TestJobCRUD.json index d9cee6c446b5..aff42e9d9c1b 100644 --- a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.JobTests/TestJobCRUD.json +++ b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.JobTests/TestJobCRUD.json @@ -1,27 +1,27 @@ { "Entries": [ { - "RequestUri": "/jobs?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "6a82fb88-9f25-4121-bed2-b82ebb4bfefc" + "25309360-7309-4a17-a0a8-6caa4cc557b3" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:20:07 GMT" + "Thu, 21 Mar 2024 23:18:36 GMT" ], "x-ms-client-request-id": [ - "13418e12-fc8f-4ac6-9eca-0642864068f7" + "b3bb6221-4632-48bd-9138-ae5f85f86455" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Type": [ @@ -37,16 +37,16 @@ "chunked" ], "ETag": [ - "0x8DB6E3A1DDEECA1" + "0x8DC49FD3D09F9D3" ], "Location": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/jobs/job-1" + "https://billstestba24326.uksouth.batch.azure.com/jobs/job-1" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "a5feea1f-df50-4efe-9e28-758bf6db5df8" + "ca4a3f5b-abf4-4418-b700-51789ddeea35" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -58,40 +58,40 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/jobs/job-1" + "https://billstestba24326.uksouth.batch.azure.com/jobs/job-1" ], "Date": [ - "Fri, 16 Jun 2023 07:20:09 GMT" + "Thu, 21 Mar 2024 23:18:37 GMT" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:20:09 GMT" + "Thu, 21 Mar 2024 23:18:37 GMT" ] }, "ResponseBody": "", "StatusCode": 201 }, { - "RequestUri": "/jobs?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "ba394f4e-fb58-4e67-a76b-1c46ad58b122" + "d18c7723-b64c-45e6-a030-f5cf9ebbc14e" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:20:07 GMT" + "Thu, 21 Mar 2024 23:18:37 GMT" ], "x-ms-client-request-id": [ - "256dfd0b-414a-49f0-ac9d-f3dad6970943" + "e41aea88-fee5-4428-aacc-c3b56b5261ee" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Type": [ @@ -107,16 +107,16 @@ "chunked" ], "ETag": [ - "0x8DB6E3A1DF4BEB3" + "0x8DC49FD3D2B0A21" ], "Location": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/jobs/job-1" + "https://billstestba24326.uksouth.batch.azure.com/jobs/job-1" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "0732555c-ec12-4026-aec2-29e81e386a5f" + "f2b576e3-d6ff-4edf-ba08-1868cc9ed2e2" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -128,40 +128,40 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/jobs/job-1" + "https://billstestba24326.uksouth.batch.azure.com/jobs/job-1" ], "Date": [ - "Fri, 16 Jun 2023 07:20:09 GMT" + "Thu, 21 Mar 2024 23:18:37 GMT" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:20:09 GMT" + "Thu, 21 Mar 2024 23:18:38 GMT" ] }, "ResponseBody": "", "StatusCode": 201 }, { - "RequestUri": "/jobs?api-version=2023-05-01.17.0&$filter=id%20eq%20%27job1%27%20or%20id%20eq%20%27job2%27", - "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4wJiRmaWx0ZXI9aWQlMjBlcSUyMCUyN2pvYjElMjclMjBvciUyMGlkJTIwZXElMjAlMjdqb2IyJTI3", + "RequestUri": "/jobs?api-version=2024-02-01.19.0&$filter=id%20eq%20%27job1%27%20or%20id%20eq%20%27job2%27", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4wJiRmaWx0ZXI9aWQlMjBlcSUyMCUyN2pvYjElMjclMjBvciUyMGlkJTIwZXElMjAlMjdqb2IyJTI3", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "1127bc44-0b25-4406-8e23-9baedaf231b1" + "61e63895-304b-4de6-9761-f1f49bca4451" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:20:08 GMT" + "Thu, 21 Mar 2024 23:18:37 GMT" ], "x-ms-client-request-id": [ - "e83f76f7-000f-4f85-b783-56a8b444b5ba" + "bd4391c7-0670-4281-82f4-3468f203cbf8" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -174,7 +174,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "550ae843-aa97-4ae6-9647-a36a9f46dec3" + "3332bc03-1d2f-465e-9266-cab6d4cd2a00" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -186,37 +186,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:20:09 GMT" + "Thu, 21 Mar 2024 23:18:37 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"job1\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobs/job1\",\r\n \"eTag\": \"0x8DB6E3A1DDEECA1\",\r\n \"lastModified\": \"2023-06-16T07:20:09.1364513Z\",\r\n \"creationTime\": \"2023-06-16T07:20:09.1187314Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:20:09.1364513Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2023-06-16T07:20:09.1364513Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"noaction\"\r\n },\r\n {\r\n \"id\": \"job2\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobs/job2\",\r\n \"eTag\": \"0x8DB6E3A1DF4BEB3\",\r\n \"lastModified\": \"2023-06-16T07:20:09.2794547Z\",\r\n \"creationTime\": \"2023-06-16T07:20:09.2614583Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:20:09.2794547Z\",\r\n \"priority\": 3,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool2\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2023-06-16T07:20:09.2794547Z\",\r\n \"poolId\": \"testPool2\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"noaction\"\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"job1\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/job1\",\r\n \"eTag\": \"0x8DC49FD3D09F9D3\",\r\n \"lastModified\": \"2024-03-21T23:18:37.9385299Z\",\r\n \"creationTime\": \"2024-03-21T23:18:37.9125297Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-21T23:18:37.9385299Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-21T23:18:37.9385299Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"noaction\"\r\n },\r\n {\r\n \"id\": \"job2\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/job2\",\r\n \"eTag\": \"0x8DC49FD3D2B0A21\",\r\n \"lastModified\": \"2024-03-21T23:18:38.1552161Z\",\r\n \"creationTime\": \"2024-03-21T23:18:38.1402158Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-21T23:18:38.1552161Z\",\r\n \"priority\": 3,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool2\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-21T23:18:38.1552161Z\",\r\n \"poolId\": \"testPool2\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"noaction\"\r\n }\r\n ]\r\n}", "StatusCode": 200 }, { - "RequestUri": "/jobs/job2?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnMvam9iMj9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjA=", + "RequestUri": "/jobs/job2?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnMvam9iMj9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", "RequestMethod": "PUT", "RequestHeaders": { "client-request-id": [ - "5f55d595-50f5-4bb9-922e-016dd6e8371b" + "7a435e56-8e44-4fc3-903e-4ce8adfd5596" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:20:08 GMT" + "Thu, 21 Mar 2024 23:18:38 GMT" ], "x-ms-client-request-id": [ - "a9bc8391-3d5c-41a0-94f1-5fff9db9359d" + "80fb30aa-60bf-4c70-ad5c-ca69aebc4ffd" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Type": [ @@ -232,13 +232,13 @@ "chunked" ], "ETag": [ - "0x8DB6E3A1E1D3CAA" + "0x8DC49FD3D6E60F4" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "45d5e56a-1853-4b70-b222-7788bb2841f6" + "53ccc6fd-0a48-4291-bdcc-cf38e65d9a4b" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -250,40 +250,40 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/jobs/job2" + "https://billstestba24326.uksouth.batch.azure.com/jobs/job2" ], "Date": [ - "Fri, 16 Jun 2023 07:20:09 GMT" + "Thu, 21 Mar 2024 23:18:38 GMT" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:20:09 GMT" + "Thu, 21 Mar 2024 23:18:38 GMT" ] }, "ResponseBody": "", "StatusCode": 200 }, { - "RequestUri": "/jobs/job2?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnMvam9iMj9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjA=", + "RequestUri": "/jobs/job2?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnMvam9iMj9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "7d73b24d-7f9d-40f5-9fc6-40119905ea54" + "c7c83196-19b5-4335-85ec-5d8330af10b1" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:20:08 GMT" + "Thu, 21 Mar 2024 23:18:38 GMT" ], "x-ms-client-request-id": [ - "c405b685-b1cd-4b70-aa74-51263b03682e" + "d4cdc61d-c8ab-47dd-8405-ff009a093a47" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -293,13 +293,13 @@ "chunked" ], "ETag": [ - "0x8DB6E3A1E1D3CAA" + "0x8DC49FD3D6E60F4" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "dd648f1a-6e67-4481-8597-a565daafc65f" + "beea9561-3ce8-4b5c-9017-6f4f6324ee94" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -311,40 +311,40 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:20:09 GMT" + "Thu, 21 Mar 2024 23:18:38 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:20:09 GMT" + "Thu, 21 Mar 2024 23:18:38 GMT" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#jobs/@Element\",\r\n \"id\": \"job2\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobs/job2\",\r\n \"eTag\": \"0x8DB6E3A1E1D3CAA\",\r\n \"lastModified\": \"2023-06-16T07:20:09.5448234Z\",\r\n \"creationTime\": \"2023-06-16T07:20:09.2614583Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:20:09.2794547Z\",\r\n \"priority\": 5,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool2\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2023-06-16T07:20:09.2794547Z\",\r\n \"poolId\": \"testPool2\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"noaction\"\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs/@Element\",\r\n \"id\": \"job2\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/job2\",\r\n \"eTag\": \"0x8DC49FD3D6E60F4\",\r\n \"lastModified\": \"2024-03-21T23:18:38.59653Z\",\r\n \"creationTime\": \"2024-03-21T23:18:38.1402158Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-21T23:18:38.1552161Z\",\r\n \"priority\": 5,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool2\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-21T23:18:38.1552161Z\",\r\n \"poolId\": \"testPool2\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"noaction\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/jobs/job1?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnMvam9iMT9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjA=", + "RequestUri": "/jobs/job1?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnMvam9iMT9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", "RequestMethod": "DELETE", "RequestHeaders": { "client-request-id": [ - "769687e3-8d82-4aa1-8b8d-467085515a3c" + "307d48ef-17f7-4c27-9cdc-5c18643dec3b" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:20:08 GMT" + "Thu, 21 Mar 2024 23:18:38 GMT" ], "x-ms-client-request-id": [ - "c34369d2-48c3-4bb9-b14b-172ba0e84ac9" + "19edf057-2b40-4fbb-a6ca-483e3419c3f0" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Length": [ @@ -360,7 +360,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "a9f3a916-7b7c-4f5a-aba2-5ead48fa8aa6" + "50ad5268-b6e3-406d-9a1c-a5d4aab73d10" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -372,34 +372,34 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:20:09 GMT" + "Thu, 21 Mar 2024 23:18:38 GMT" ] }, "ResponseBody": "", "StatusCode": 202 }, { - "RequestUri": "/jobs/job2?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnMvam9iMj9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjA=", + "RequestUri": "/jobs/job2?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnMvam9iMj9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", "RequestMethod": "DELETE", "RequestHeaders": { "client-request-id": [ - "c6c8ab07-c8ac-4ae4-82f7-09592a889492" + "1762a943-b4a3-4317-bc22-44e71366edc8" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:20:08 GMT" + "Thu, 21 Mar 2024 23:18:38 GMT" ], "x-ms-client-request-id": [ - "4f1d7467-f919-4fee-a90e-6c9f8e19bd29" + "594696bc-1237-47dc-a302-60a5f6ae3805" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Length": [ @@ -415,7 +415,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "a1106fae-aeae-41c5-9668-4d53a0f41a59" + "2ed382e0-52a5-4771-b311-1ac468b6f62f" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -427,34 +427,34 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:20:09 GMT" + "Thu, 21 Mar 2024 23:18:38 GMT" ] }, "ResponseBody": "", "StatusCode": 202 }, { - "RequestUri": "/jobs?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "be5cb5be-c281-43cb-997a-e2f33cede6f6" + "27480d86-e667-4a2e-b64e-482796cd856c" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:20:08 GMT" + "Thu, 21 Mar 2024 23:18:38 GMT" ], "x-ms-client-request-id": [ - "802b2e5c-51b7-4381-a8de-69f57ca046b2" + "0b46bbcd-3692-492f-8623-44dd06fa1a26" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -467,7 +467,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "f5f6da6b-8b43-42a9-8cce-5d87a23a223b" + "b8a8a89a-e874-4e15-8545-01df71a3579a" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -479,21 +479,21 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:20:09 GMT" + "Thu, 21 Mar 2024 23:18:38 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"job1\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobs/job1\",\r\n \"eTag\": \"0x8DB6E3A1DDEECA1\",\r\n \"lastModified\": \"2023-06-16T07:20:09.1364513Z\",\r\n \"creationTime\": \"2023-06-16T07:20:09.1187314Z\",\r\n \"state\": \"deleting\",\r\n \"stateTransitionTime\": \"2023-06-16T07:20:09.7776103Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2023-06-16T07:20:09.1364513Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2023-06-16T07:20:09.1364513Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"noaction\"\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"HelloWorldJob-wiboris-20230807-165026\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/HelloWorldJob-wiboris-20230807-165026\",\r\n \"eTag\": \"0x8DB97A11A369321\",\r\n \"lastModified\": \"2023-08-07T23:50:38.8370209Z\",\r\n \"creationTime\": \"2023-08-07T23:50:38.8210211Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-08-07T23:50:38.8370209Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"autoPoolSpecification\": {\r\n \"autoPoolIdPrefix\": \"HelloWorld\",\r\n \"poolLifetimeOption\": \"job\",\r\n \"keepAlive\": false,\r\n \"pool\": {\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"resizeTimeout\": \"PT15M\",\r\n \"targetDedicatedNodes\": 2,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"5\",\r\n \"osVersion\": \"*\"\r\n }\r\n }\r\n }\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2023-08-07T23:50:38.8370209Z\",\r\n \"poolId\": \"HelloWorld_6F7DEAB3-EC11-4D73-AA27-83F0059A52D7\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"noaction\"\r\n },\r\n {\r\n \"id\": \"MPI-wiboris\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/MPI-wiboris\",\r\n \"eTag\": \"0x8DC1950B0024D10\",\r\n \"lastModified\": \"2024-01-20T00:42:32.0786704Z\",\r\n \"creationTime\": \"2024-01-20T00:42:32.061661Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-01-20T00:42:32.0786704Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"wiboris-poolmulti\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-01-20T00:42:32.0786704Z\",\r\n \"poolId\": \"wiboris-poolmulti\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"noaction\"\r\n },\r\n {\r\n \"id\": \"testJobCompletesWhenTaskFails\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testJobCompletesWhenTaskFails\",\r\n \"eTag\": \"0x8DC49FBD14393E1\",\r\n \"lastModified\": \"2024-03-21T23:08:27.6253665Z\",\r\n \"creationTime\": \"2024-03-21T23:08:27.6103702Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-21T23:08:27.6253665Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-21T23:08:27.6253665Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"performexitoptionsjobaction\"\r\n }\r\n ]\r\n}", "StatusCode": 200 } ], "Names": {}, "Variables": { - "SubscriptionId": "21abd678-18c5-4660-9fdd-8c5ba6b6fe1f", - "AZURE_BATCH_ACCOUNT": "hoppeeastasia2", - "AZURE_BATCH_ENDPOINT": "https://hoppeeastasia2.eastasia.batch.azure.com", - "AZURE_BATCH_RESOURCE_GROUP": "123" + "SubscriptionId": "6602ac9a-5dad-41bd-a792-592c704b6a31", + "AZURE_BATCH_ACCOUNT": "billstestba24326", + "AZURE_BATCH_ENDPOINT": "https://billstestba24326.uksouth.batch.azure.com", + "AZURE_BATCH_RESOURCE_GROUP": "automation" } } \ No newline at end of file diff --git a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.LocationTests/TestGetLocationQuotas.json b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.LocationTests/TestGetLocationQuotas.json index 6f90b8c9232c..ff234e3bf019 100644 --- a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.LocationTests/TestGetLocationQuotas.json +++ b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.LocationTests/TestGetLocationQuotas.json @@ -1,21 +1,21 @@ { "Entries": [ { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/providers/Microsoft.Batch?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Byb3ZpZGVycy9NaWNyb3NvZnQuQmF0Y2g/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/providers/Microsoft.Batch?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQmF0Y2g/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", "RequestMethod": "GET", "RequestHeaders": { "x-ms-client-request-id": [ - "df506771-f4b3-4f61-8460-5dfeb7260969" + "79a31cf2-f348-4012-a414-ae99aa2ad412" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" ] }, "RequestBody": "", @@ -30,13 +30,13 @@ "11999" ], "x-ms-request-id": [ - "b424cc08-0f5d-4b46-a2ce-b2d364f347ed" + "b9069e5b-b1da-4638-8a82-8ac391b64658" ], "x-ms-correlation-request-id": [ - "b424cc08-0f5d-4b46-a2ce-b2d364f347ed" + "b9069e5b-b1da-4638-8a82-8ac391b64658" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072023Z:b424cc08-0f5d-4b46-a2ce-b2d364f347ed" + "WESTUS2:20240321T232056Z:b9069e5b-b1da-4638-8a82-8ac391b64658" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -44,37 +44,43 @@ "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: E1F16AD158574FF0A441083BBC683A45 Ref B: CO6AA3150220017 Ref C: 2024-03-21T23:20:56Z" + ], "Date": [ - "Fri, 16 Jun 2023 07:20:23 GMT" + "Thu, 21 Mar 2024 23:20:56 GMT" + ], + "Content-Length": [ + "14538" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" - ], - "Content-Length": [ - "9611" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"authorization\": {\r\n \"applicationId\": \"ddbf3205-c6bd-46ae-8127-60eb93363864\",\r\n \"roleDefinitionId\": \"b7f84953-1d03-4eab-9ea4-45f065258ff8\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\",\r\n \"2017-01-01\",\r\n \"2015-12-01\",\r\n \"2015-09-01\",\r\n \"2015-07-01\",\r\n \"2014-05-01-privatepreview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"batchAccounts/pools\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"batchAccounts/detectors\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"batchAccounts/certificates\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\",\r\n \"2017-01-01\",\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\",\r\n \"2017-01-01\",\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\",\r\n \"2017-01-01\",\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/checkNameAvailability\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/accountOperationResults\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\",\r\n \"2017-01-01\",\r\n \"2015-12-01\",\r\n \"2015-09-01\",\r\n \"2015-07-01\",\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/virtualMachineSkus\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/cloudServiceSkus\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"authorization\": {\r\n \"applicationId\": \"ddbf3205-c6bd-46ae-8127-60eb93363864\",\r\n \"roleDefinitionId\": \"b7f84953-1d03-4eab-9ea4-45f065258ff8\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\",\r\n \"2017-01-01\",\r\n \"2015-12-01\",\r\n \"2015-09-01\",\r\n \"2015-07-01\",\r\n \"2014-05-01-privatepreview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"batchAccounts/pools\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"batchAccounts/detectors\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"batchAccounts/certificates\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"batchAccounts/operationResults\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\",\r\n \"2017-01-01\",\r\n \"2015-12-01\",\r\n \"2015-09-01\",\r\n \"2015-07-01\",\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"batchAccounts/poolOperationResults\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"batchAccounts/certificateOperationResults\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"batchAccounts/privateEndpointConnectionProxyResults\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"batchAccounts/privateEndpointConnectionResults\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\",\r\n \"2017-01-01\",\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\",\r\n \"2017-01-01\",\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\",\r\n \"2017-01-01\",\r\n \"2015-12-01\",\r\n \"2015-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/checkNameAvailability\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/accountOperationResults\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\",\r\n \"2021-01-01\",\r\n \"2020-09-01\",\r\n \"2020-05-01\",\r\n \"2020-03-01-preview\",\r\n \"2020-03-01\",\r\n \"2019-08-01\",\r\n \"2019-04-01\",\r\n \"2018-12-01\",\r\n \"2017-09-01\",\r\n \"2017-05-01\",\r\n \"2017-01-01\",\r\n \"2015-12-01\",\r\n \"2015-09-01\",\r\n \"2015-07-01\",\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/virtualMachineSkus\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/cloudServiceSkus\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"Brazil South\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia Southeast\",\r\n \"Japan West\",\r\n \"Korea South\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Jio India West\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Switzerland North\",\r\n \"Norway East\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2024-02-01\",\r\n \"2023-11-01\",\r\n \"2023-05-01\",\r\n \"2022-10-01\",\r\n \"2022-06-01\",\r\n \"2022-01-01\",\r\n \"2021-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/21abd678-18c5-4660-9fdd-8c5ba6b6fe1f/providers/Microsoft.Batch/locations/westus2/quotas?api-version=2022-10-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjFhYmQ2NzgtMThjNS00NjYwLTlmZGQtOGM1YmE2YjZmZTFmL3Byb3ZpZGVycy9NaWNyb3NvZnQuQmF0Y2gvbG9jYXRpb25zL3dlc3R1czIvcXVvdGFzP2FwaS12ZXJzaW9uPTIwMjItMTAtMDE=", + "RequestUri": "/subscriptions/6602ac9a-5dad-41bd-a792-592c704b6a31/providers/Microsoft.Batch/locations/westus2/quotas?api-version=2022-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjYwMmFjOWEtNWRhZC00MWJkLWE3OTItNTkyYzcwNGI2YTMxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQmF0Y2gvbG9jYXRpb25zL3dlc3R1czIvcXVvdGFzP2FwaS12ZXJzaW9uPTIwMjItMTAtMDE=", "RequestMethod": "GET", "RequestHeaders": { "x-ms-client-request-id": [ - "abe1f645-270b-41ad-96d2-9dbd02f25bc5" + "01d2d73e-6fb6-4864-b69f-696d577459f2" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", + "OSVersion/Microsoft.Windows.10.0.22631", "Microsoft.Azure.Management.Batch.BatchManagementClient/14.2.0.0" ] }, @@ -86,11 +92,8 @@ "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], "x-ms-request-id": [ - "f3dfced0-f380-4b7b-ac3b-541a67a0cceb" + "cd95f7cc-3828-426e-86a2-11de2330d22f" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -98,20 +101,26 @@ "X-Content-Type-Options": [ "nosniff" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" ], "x-ms-correlation-request-id": [ - "b25b3900-870e-4eb6-810e-f040b8686b01" + "07a4efe6-2291-4f23-bc1f-8f577f4a5c2c" ], "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20230616T072024Z:b25b3900-870e-4eb6-810e-f040b8686b01" + "WESTUS2:20240321T232056Z:07a4efe6-2291-4f23-bc1f-8f577f4a5c2c" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: DBB7433E9FCA48C9B9A0AC019B777F3E Ref B: CO6AA3150217037 Ref C: 2024-03-21T23:20:56Z" ], "Date": [ - "Fri, 16 Jun 2023 07:20:23 GMT" + "Thu, 21 Mar 2024 23:20:55 GMT" ], "Content-Length": [ - "20" + "18" ], "Content-Type": [ "application/json; charset=utf-8" @@ -120,15 +129,15 @@ "-1" ] }, - "ResponseBody": "{\r\n \"accountQuota\": 100\r\n}", + "ResponseBody": "{\r\n \"accountQuota\": 1\r\n}", "StatusCode": 200 } ], "Names": {}, "Variables": { - "SubscriptionId": "21abd678-18c5-4660-9fdd-8c5ba6b6fe1f", - "AZURE_BATCH_ACCOUNT": "hoppeeastasia2", - "AZURE_BATCH_ENDPOINT": "https://hoppeeastasia2.eastasia.batch.azure.com", - "AZURE_BATCH_RESOURCE_GROUP": "123" + "SubscriptionId": "6602ac9a-5dad-41bd-a792-592c704b6a31", + "AZURE_BATCH_ACCOUNT": "billstestba24326", + "AZURE_BATCH_ENDPOINT": "https://billstestba24326.uksouth.batch.azure.com", + "AZURE_BATCH_RESOURCE_GROUP": "automation" } } \ No newline at end of file diff --git a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.PoolTests/TestAutoScaleActions.json b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.PoolTests/TestAutoScaleActions.json index 75eafb16b646..7fefbd89afa5 100644 --- a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.PoolTests/TestAutoScaleActions.json +++ b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.PoolTests/TestAutoScaleActions.json @@ -1,49 +1,49 @@ { "Entries": [ { - "RequestUri": "/pools?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", + "RequestUri": "/pools?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "e7c38f38-1921-4dc7-b7f4-4eff59a5401d" + "2b322e7c-97e9-4799-97e2-e7bbb5c1a2b8" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:09 GMT" + "Thu, 21 Mar 2024 23:32:14 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Type": [ "application/json; odata=minimalmetadata; charset=utf-8" ], "Content-Length": [ - "292" + "511" ] }, - "RequestBody": "{\r\n \"id\": \"autoscalePool\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"4\",\r\n \"osVersion\": \"*\"\r\n },\r\n \"targetDedicatedNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableInterNodeCommunication\": true,\r\n \"targetNodeCommunicationMode\": \"classic\"\r\n}", + "RequestBody": "{\r\n \"id\": \"autoscalePool\",\r\n \"vmSize\": \"STANDARD_D2S_V3\",\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"zonal\"\r\n }\r\n },\r\n \"targetDedicatedNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableInterNodeCommunication\": false,\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", "ResponseHeaders": { "Transfer-Encoding": [ "chunked" ], "ETag": [ - "0x8DB6E3C5B4F564D" + "0x8DC49FF24208F0C" ], "Location": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/pools/autoscalePool" + "https://billstestba24326.uksouth.batch.azure.com/pools/autoscalePool" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "ea6431db-f66e-4859-b97a-65ba3767fb16" + "1fe5f407-d0f1-4883-9193-9edf6042eab1" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -55,40 +55,40 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/pools/autoscalePool" + "https://billstestba24326.uksouth.batch.azure.com/pools/autoscalePool" ], "Date": [ - "Fri, 16 Jun 2023 07:36:10 GMT" + "Thu, 21 Mar 2024 23:32:14 GMT" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:36:11 GMT" + "Thu, 21 Mar 2024 23:32:15 GMT" ] }, "ResponseBody": "", "StatusCode": 201 }, { - "RequestUri": "/pools/autoscalePool?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL2F1dG9zY2FsZVBvb2w/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/pools/autoscalePool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL2F1dG9zY2FsZVBvb2w/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "e56f337c-f85f-49af-bc51-0b91ceb921d4" + "9915406e-1518-45d0-8742-1490d022347b" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:10 GMT" + "Thu, 21 Mar 2024 23:32:19 GMT" ], "x-ms-client-request-id": [ - "d080dabf-1aa3-4c0a-9ee6-cd9c587dbecf" + "5cb9c603-d84c-4500-9576-47073db2cb0f" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -98,13 +98,13 @@ "chunked" ], "ETag": [ - "0x8DB6E3C5B4F564D" + "0x8DC49FF24208F0C" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "0c7b6276-632d-4c73-882f-38fd8377351d" + "ee68a548-041c-49b3-b1f9-98aecd1b6447" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -116,40 +116,40 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:36:11 GMT" + "Thu, 21 Mar 2024 23:32:19 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:36:11 GMT" + "Thu, 21 Mar 2024 23:32:15 GMT" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"autoscalePool\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/autoscalePool\",\r\n \"eTag\": \"0x8DB6E3C5B4F564D\",\r\n \"lastModified\": \"2023-06-16T07:36:11.2076365Z\",\r\n \"creationTime\": \"2023-06-16T07:36:11.2076365Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:36:11.2076365Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2023-06-16T07:36:11.2076365Z\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 0,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": true,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"4\",\r\n \"osVersion\": \"*\"\r\n },\r\n \"targetNodeCommunicationMode\": \"classic\"\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"autoscalePool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/autoscalePool\",\r\n \"eTag\": \"0x8DC49FF24208F0C\",\r\n \"lastModified\": \"2024-03-21T23:32:15.1369484Z\",\r\n \"creationTime\": \"2024-03-21T23:32:15.1369474Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-21T23:32:15.1369474Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2024-03-21T23:32:16.5193402Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 0,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/autoscalePool?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL2F1dG9zY2FsZVBvb2w/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/pools/autoscalePool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL2F1dG9zY2FsZVBvb2w/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "3063d001-2f1f-4868-af9e-0ea266a2f12a" + "ac1c9ac9-ae26-40fd-ba67-a7349d95cea7" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:11 GMT" + "Thu, 21 Mar 2024 23:32:21 GMT" ], "x-ms-client-request-id": [ - "1f60b6a9-90bf-43cb-9f63-57baf305416b" + "2d6a1123-979a-4c87-aa3a-3d9057ed7403" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -159,13 +159,13 @@ "chunked" ], "ETag": [ - "0x8DB6E3C5C721B25" + "0x8DC49FF27D02C5E" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "bdcc7103-0dda-454b-acbb-16768ead5e6e" + "cb4078b3-1b8e-43c1-b7cf-33c8f8616470" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -177,40 +177,40 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:36:12 GMT" + "Thu, 21 Mar 2024 23:32:21 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:36:13 GMT" + "Thu, 21 Mar 2024 23:32:21 GMT" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"autoscalePool\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/autoscalePool\",\r\n \"eTag\": \"0x8DB6E3C5C721B25\",\r\n \"lastModified\": \"2023-06-16T07:36:13.1132197Z\",\r\n \"creationTime\": \"2023-06-16T07:36:11.2076365Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:36:11.2076365Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2023-06-16T07:36:13.1792186Z\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 0,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": true,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"4\",\r\n \"osVersion\": \"*\"\r\n },\r\n \"targetNodeCommunicationMode\": \"classic\"\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"autoscalePool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/autoscalePool\",\r\n \"eTag\": \"0x8DC49FF27D02C5E\",\r\n \"lastModified\": \"2024-03-21T23:32:21.3210206Z\",\r\n \"creationTime\": \"2024-03-21T23:32:15.1369474Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-21T23:32:15.1369474Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2024-03-21T23:32:21.3660849Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 0,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/autoscalePool/enableautoscale?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL2F1dG9zY2FsZVBvb2wvZW5hYmxlYXV0b3NjYWxlP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", + "RequestUri": "/pools/autoscalePool/enableautoscale?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL2F1dG9zY2FsZVBvb2wvZW5hYmxlYXV0b3NjYWxlP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "1d2fddea-54f3-4db5-b799-e26809a2cdeb" + "c2347a2d-b889-41c9-b782-88858bf66709" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:10 GMT" + "Thu, 21 Mar 2024 23:32:19 GMT" ], "x-ms-client-request-id": [ - "9ad94c68-f322-4a50-8e16-4652d4b3c3d5" + "ead2c51a-8e8f-412d-8c2b-fde506a2ae0a" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Type": [ @@ -226,13 +226,13 @@ "chunked" ], "ETag": [ - "0x8DB6E3C5B4F564D" + "0x8DC49FF2744B074" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "d6446c18-65e9-4aa2-a616-efeaffb98181" + "90804f6e-c1b4-4417-aaa5-c5391a54a7ef" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -244,40 +244,40 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/pools/autoscalePool/enableautoscale" + "https://billstestba24326.uksouth.batch.azure.com/pools/autoscalePool/enableautoscale" ], "Date": [ - "Fri, 16 Jun 2023 07:36:11 GMT" + "Thu, 21 Mar 2024 23:32:19 GMT" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:36:11 GMT" + "Thu, 21 Mar 2024 23:32:20 GMT" ] }, "ResponseBody": "", "StatusCode": 200 }, { - "RequestUri": "/pools?api-version=2023-05-01.17.0&$filter=id%20eq%20%27autoscalePool%27", - "EncodedRequestUri": "L3Bvb2xzP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMCYkZmlsdGVyPWlkJTIwZXElMjAlMjdhdXRvc2NhbGVQb29sJTI3", + "RequestUri": "/pools?api-version=2024-02-01.19.0&$filter=id%20eq%20%27autoscalePool%27", + "EncodedRequestUri": "L3Bvb2xzP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMCYkZmlsdGVyPWlkJTIwZXElMjAlMjdhdXRvc2NhbGVQb29sJTI3", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "32e864ab-c47e-4d5a-a689-27cb9b0cd4e0" + "56428b72-6c6f-4493-85cd-6c4220194cc0" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:11 GMT" + "Thu, 21 Mar 2024 23:32:20 GMT" ], "x-ms-client-request-id": [ - "d3f14471-5740-4f9f-9060-cb33ac0e02a2" + "e76f38d4-d423-4e1c-af02-48947404f936" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -290,7 +290,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "d57faecc-b84a-409d-851a-98fd00a49764" + "c59d4d09-0289-42f2-b47f-18d7a292bd08" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -302,37 +302,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:36:12 GMT" + "Thu, 21 Mar 2024 23:32:20 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#pools\",\r\n \"value\": [\r\n {\r\n \"id\": \"autoscalePool\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/autoscalePool\",\r\n \"eTag\": \"0x8DB6E3C5B4F564D\",\r\n \"lastModified\": \"2023-06-16T07:36:11.2076365Z\",\r\n \"creationTime\": \"2023-06-16T07:36:11.2076365Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:36:11.2076365Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2023-06-16T07:36:12.6226513Z\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 0,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": true,\r\n \"autoScaleFormula\": \"$TargetDedicatedNodes=0\",\r\n \"autoScaleEvaluationInterval\": \"PT8M\",\r\n \"enableInterNodeCommunication\": true,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"4\",\r\n \"osVersion\": \"*\"\r\n },\r\n \"targetNodeCommunicationMode\": \"classic\"\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools\",\r\n \"value\": [\r\n {\r\n \"id\": \"autoscalePool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/autoscalePool\",\r\n \"eTag\": \"0x8DC49FF2744B074\",\r\n \"lastModified\": \"2024-03-21T23:32:20.406898Z\",\r\n \"creationTime\": \"2024-03-21T23:32:15.1369474Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-21T23:32:15.1369474Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2024-03-21T23:32:20.4546319Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 0,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": true,\r\n \"autoScaleFormula\": \"$TargetDedicatedNodes=0\",\r\n \"autoScaleEvaluationInterval\": \"PT8M\",\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n }\r\n ]\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/autoscalePool/evaluateautoscale?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL2F1dG9zY2FsZVBvb2wvZXZhbHVhdGVhdXRvc2NhbGU/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/pools/autoscalePool/evaluateautoscale?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL2F1dG9zY2FsZVBvb2wvZXZhbHVhdGVhdXRvc2NhbGU/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "e67f8220-fbf0-4c41-901c-cd654837a48f" + "83bb36ef-be71-468c-b911-bf4a52e13b05" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:11 GMT" + "Thu, 21 Mar 2024 23:32:20 GMT" ], "x-ms-client-request-id": [ - "0d1a9dff-ccba-4d20-afb8-d0cbb081bc34" + "aa3192b6-ec9d-4f19-a59a-3302322ed894" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Type": [ @@ -351,7 +351,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "0827d217-062a-4a6f-b3a7-979d10e1f97a" + "8c875766-ef98-4bf4-958a-a6d936f6f6a1" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -363,40 +363,40 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/pools/autoscalePool/evaluateautoscale" + "https://billstestba24326.uksouth.batch.azure.com/pools/autoscalePool/evaluateautoscale" ], "Date": [ - "Fri, 16 Jun 2023 07:36:12 GMT" + "Thu, 21 Mar 2024 23:32:20 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.AutoScaleRun\",\r\n \"timestamp\": \"2023-06-16T07:36:12.9817426Z\",\r\n \"results\": \"$TargetDedicatedNodes=1;$TargetLowPriorityNodes=0;$NodeDeallocationOption=requeue\"\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.AutoScaleRun\",\r\n \"timestamp\": \"2024-03-21T23:32:21.0096445Z\",\r\n \"results\": \"$TargetDedicatedNodes=1;$TargetLowPriorityNodes=0;$NodeDeallocationOption=requeue\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/autoscalePool/disableautoscale?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL2F1dG9zY2FsZVBvb2wvZGlzYWJsZWF1dG9zY2FsZT9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjA=", + "RequestUri": "/pools/autoscalePool/disableautoscale?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL2F1dG9zY2FsZVBvb2wvZGlzYWJsZWF1dG9zY2FsZT9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "217f65be-90fe-4194-a503-a935c493b9d0" + "47ba09c9-6595-47eb-89a3-cd5f2e9067ab" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:11 GMT" + "Thu, 21 Mar 2024 23:32:20 GMT" ], "x-ms-client-request-id": [ - "e2b2ed36-d66b-4724-bc11-0461a3108089" + "c90f280e-dda5-47bc-95f8-07d9741d6c06" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Length": [ @@ -409,13 +409,13 @@ "chunked" ], "ETag": [ - "0x8DB6E3C5C721B25" + "0x8DC49FF27D02C5E" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "722568c7-579b-403a-affd-f1493480a818" + "d169812d-02f6-4a99-84a7-99d1806df780" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -427,37 +427,37 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/pools/autoscalePool/disableautoscale" + "https://billstestba24326.uksouth.batch.azure.com/pools/autoscalePool/disableautoscale" ], "Date": [ - "Fri, 16 Jun 2023 07:36:12 GMT" + "Thu, 21 Mar 2024 23:32:20 GMT" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:36:13 GMT" + "Thu, 21 Mar 2024 23:32:21 GMT" ] }, "ResponseBody": "", "StatusCode": 200 }, { - "RequestUri": "/pools/autoscalePool?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL2F1dG9zY2FsZVBvb2w/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/pools/autoscalePool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL2F1dG9zY2FsZVBvb2w/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "DELETE", "RequestHeaders": { "client-request-id": [ - "0bf4d90e-829b-4cd2-8814-6030beef416d" + "3e0b6e8a-dd59-47b0-8e32-702524f23db8" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:12 GMT" + "Thu, 21 Mar 2024 23:32:24 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Length": [ @@ -473,7 +473,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "3d64fd18-7334-400f-bc8a-6c4bd5f35a9b" + "0c00462a-cfa0-4403-a987-f74e165c9f9b" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -485,7 +485,7 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:36:12 GMT" + "Thu, 21 Mar 2024 23:32:24 GMT" ] }, "ResponseBody": "", @@ -494,9 +494,9 @@ ], "Names": {}, "Variables": { - "SubscriptionId": "21abd678-18c5-4660-9fdd-8c5ba6b6fe1f", - "AZURE_BATCH_ACCOUNT": "hoppeeastasia2", - "AZURE_BATCH_ENDPOINT": "https://hoppeeastasia2.eastasia.batch.azure.com", - "AZURE_BATCH_RESOURCE_GROUP": "123" + "SubscriptionId": "6602ac9a-5dad-41bd-a792-592c704b6a31", + "AZURE_BATCH_ACCOUNT": "billstestba24326", + "AZURE_BATCH_ENDPOINT": "https://billstestba24326.uksouth.batch.azure.com", + "AZURE_BATCH_RESOURCE_GROUP": "automation" } } \ No newline at end of file diff --git a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.PoolTests/TestPoolCRUD.json b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.PoolTests/TestPoolCRUD.json index a7d67c94ee97..eb0622387713 100644 --- a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.PoolTests/TestPoolCRUD.json +++ b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.PoolTests/TestPoolCRUD.json @@ -1,52 +1,52 @@ { "Entries": [ { - "RequestUri": "/pools?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", + "RequestUri": "/pools?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "a0781f55-ac86-4a94-bfe4-f6973774da5b" + "0f347168-2872-40d0-8248-bca5bf6a6901" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 08:03:04 GMT" + "Fri, 22 Mar 2024 00:08:33 GMT" ], "x-ms-client-request-id": [ - "fb494dc0-892c-437a-9c5f-56b39408f493" + "2fd00a63-2920-49db-8eda-ac1ed4c93322" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Type": [ "application/json; odata=minimalmetadata; charset=utf-8" ], "Content-Length": [ - "244" + "541" ] }, - "RequestBody": "{\r\n \"id\": \"pool1\",\r\n \"vmSize\": \"small\",\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"4\",\r\n \"osVersion\": \"*\"\r\n },\r\n \"targetDedicatedNodes\": 0,\r\n \"enableInterNodeCommunication\": false,\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", + "RequestBody": "{\r\n \"id\": \"pool1\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoft-azure-batch\",\r\n \"offer\": \"ubuntu-server-container\",\r\n \"sku\": \"20-04-lts\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"containerConfiguration\": {\r\n \"type\": \"dockerCompatible\",\r\n \"containerImageNames\": [\r\n \"test1\"\r\n ]\r\n }\r\n },\r\n \"targetDedicatedNodes\": 0,\r\n \"enableInterNodeCommunication\": false,\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", "ResponseHeaders": { "Transfer-Encoding": [ "chunked" ], "ETag": [ - "0x8DB6E401E087EDD" + "0x8DC4A04375984A3" ], "Location": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/pools/pool1" + "https://billstestba24326.uksouth.batch.azure.com/pools/pool1" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "1b3a3916-c582-4cf4-8650-1b6172164178" + "0a355cfc-e4f4-40d2-a0f7-5144ebb6e5b4" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -58,65 +58,65 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/pools/pool1" + "https://billstestba24326.uksouth.batch.azure.com/pools/pool1" ], "Date": [ - "Fri, 16 Jun 2023 08:03:05 GMT" + "Fri, 22 Mar 2024 00:08:34 GMT" ], "Last-Modified": [ - "Fri, 16 Jun 2023 08:03:06 GMT" + "Fri, 22 Mar 2024 00:08:34 GMT" ] }, "ResponseBody": "", "StatusCode": 201 }, { - "RequestUri": "/pools?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", + "RequestUri": "/pools?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "3c133701-f882-46b3-b52a-32f6dc3e2370" + "d8f97e32-95f4-4369-b768-fdda609f0bab" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 08:03:05 GMT" + "Fri, 22 Mar 2024 00:08:34 GMT" ], "x-ms-client-request-id": [ - "1d4d4a38-6eb9-4116-bd4f-d2005841350c" + "17c4a8d4-340f-4bbf-afcc-ae5c3bac32ae" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Type": [ "application/json; odata=minimalmetadata; charset=utf-8" ], "Content-Length": [ - "540" + "541" ] }, - "RequestBody": "{\r\n \"id\": \"pool2\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoft-azure-batch\",\r\n \"offer\": \"ubuntu-server-container\",\r\n \"sku\": \"20-04-lts\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"containerConfiguration\": {\r\n \"type\": \"dockerCompatible\",\r\n \"containerImageNames\": [\r\n \"test\"\r\n ]\r\n }\r\n },\r\n \"targetDedicatedNodes\": 0,\r\n \"enableInterNodeCommunication\": false,\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", + "RequestBody": "{\r\n \"id\": \"pool2\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoft-azure-batch\",\r\n \"offer\": \"ubuntu-server-container\",\r\n \"sku\": \"20-04-lts\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"containerConfiguration\": {\r\n \"type\": \"dockerCompatible\",\r\n \"containerImageNames\": [\r\n \"test2\"\r\n ]\r\n }\r\n },\r\n \"targetDedicatedNodes\": 0,\r\n \"enableInterNodeCommunication\": false,\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", "ResponseHeaders": { "Transfer-Encoding": [ "chunked" ], "ETag": [ - "0x8DB6E401E49A701" + "0x8DC4A04378B0146" ], "Location": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/pools/pool2" + "https://billstestba24326.uksouth.batch.azure.com/pools/pool2" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "84b122aa-7754-47e9-ad9c-bfa89183f8fc" + "93326e5a-342f-4c73-9ee0-fcee2d0ae8d3" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -128,40 +128,40 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/pools/pool2" + "https://billstestba24326.uksouth.batch.azure.com/pools/pool2" ], "Date": [ - "Fri, 16 Jun 2023 08:03:06 GMT" + "Fri, 22 Mar 2024 00:08:34 GMT" ], "Last-Modified": [ - "Fri, 16 Jun 2023 08:03:06 GMT" + "Fri, 22 Mar 2024 00:08:35 GMT" ] }, "ResponseBody": "", "StatusCode": 201 }, { - "RequestUri": "/pools?api-version=2023-05-01.17.0&$filter=id%20eq%20%27pool1%27%20or%20id%20eq%20%27pool2%27", - "EncodedRequestUri": "L3Bvb2xzP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMCYkZmlsdGVyPWlkJTIwZXElMjAlMjdwb29sMSUyNyUyMG9yJTIwaWQlMjBlcSUyMCUyN3Bvb2wyJTI3", + "RequestUri": "/pools?api-version=2024-02-01.19.0&$filter=id%20eq%20%27pool1%27%20or%20id%20eq%20%27pool2%27", + "EncodedRequestUri": "L3Bvb2xzP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMCYkZmlsdGVyPWlkJTIwZXElMjAlMjdwb29sMSUyNyUyMG9yJTIwaWQlMjBlcSUyMCUyN3Bvb2wyJTI3", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "81859d1f-c11d-4c80-9137-4ae3e9f117af" + "3d5018c9-c873-46ce-b1e6-a302bc78f857" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 08:03:05 GMT" + "Fri, 22 Mar 2024 00:08:35 GMT" ], "x-ms-client-request-id": [ - "5b40f5b7-9024-4578-9c6d-3a045240e6a3" + "e7c4d35d-81a7-49d8-af01-cb97bda6bb54" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -174,7 +174,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "f3224cc6-3d29-4f5d-95ba-e92a635edf3b" + "e464cdef-0c9a-4491-90d4-25fd0fcfead6" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -186,37 +186,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 08:03:06 GMT" + "Fri, 22 Mar 2024 00:08:34 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#pools\",\r\n \"value\": [\r\n {\r\n \"id\": \"pool1\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/pool1\",\r\n \"eTag\": \"0x8DB6E401E087EDD\",\r\n \"lastModified\": \"2023-06-16T08:03:06.3892701Z\",\r\n \"creationTime\": \"2023-06-16T08:03:06.3892701Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T08:03:06.3892701Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2023-06-16T08:03:06.3892701Z\",\r\n \"vmSize\": \"small\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 0,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"4\",\r\n \"osVersion\": \"*\"\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n },\r\n {\r\n \"id\": \"pool2\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/pool2\",\r\n \"eTag\": \"0x8DB6E401E49A701\",\r\n \"lastModified\": \"2023-06-16T08:03:06.8162817Z\",\r\n \"creationTime\": \"2023-06-16T08:03:06.8162817Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T08:03:06.8162817Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2023-06-16T08:03:06.8162817Z\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 0,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoft-azure-batch\",\r\n \"offer\": \"ubuntu-server-container\",\r\n \"sku\": \"20-04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"containerConfiguration\": {\r\n \"type\": \"dockerCompatible\",\r\n \"containerImageNames\": [\r\n \"test\"\r\n ]\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools\",\r\n \"value\": [\r\n {\r\n \"id\": \"pool1\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/pool1\",\r\n \"eTag\": \"0x8DC4A04375984A3\",\r\n \"lastModified\": \"2024-03-22T00:08:34.8705955Z\",\r\n \"creationTime\": \"2024-03-22T00:08:34.8705942Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T00:08:34.8705942Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T00:08:34.8705956Z\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 0,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoft-azure-batch\",\r\n \"offer\": \"ubuntu-server-container\",\r\n \"sku\": \"20-04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"containerConfiguration\": {\r\n \"type\": \"dockerCompatible\",\r\n \"containerImageNames\": [\r\n \"test1\"\r\n ]\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n },\r\n {\r\n \"id\": \"pool2\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/pool2\",\r\n \"eTag\": \"0x8DC4A04378B0146\",\r\n \"lastModified\": \"2024-03-22T00:08:35.1949126Z\",\r\n \"creationTime\": \"2024-03-22T00:08:35.1949116Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T00:08:35.1949116Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T00:08:35.1949126Z\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 0,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoft-azure-batch\",\r\n \"offer\": \"ubuntu-server-container\",\r\n \"sku\": \"20-04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"containerConfiguration\": {\r\n \"type\": \"dockerCompatible\",\r\n \"containerImageNames\": [\r\n \"test2\"\r\n ]\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n }\r\n ]\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/pool2/updateproperties?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3Bvb2wyL3VwZGF0ZXByb3BlcnRpZXM/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/pools/pool2/updateproperties?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3Bvb2wyL3VwZGF0ZXByb3BlcnRpZXM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "fb5ce3a0-cad1-4705-8513-03390f4baf7e" + "6b97d73c-0e5a-4755-85df-ea5bb73a2974" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 08:03:05 GMT" + "Fri, 22 Mar 2024 00:08:35 GMT" ], "x-ms-client-request-id": [ - "a7bc6061-18d1-4a09-b357-2a688ca26978" + "2ff29db8-4a25-4740-8077-2cae60d5d7ef" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Type": [ @@ -229,13 +229,13 @@ "RequestBody": "{\r\n \"startTask\": {\r\n \"commandLine\": \"/bin/bash -c 'echo start task'\"\r\n },\r\n \"certificateReferences\": [],\r\n \"applicationPackageReferences\": [],\r\n \"metadata\": [],\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", "ResponseHeaders": { "ETag": [ - "0x8DB6E401F3F79EE" + "0x8DC4A0438673495" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "610fcc99-8fe5-448e-9094-4bff18de520c" + "570d16be-245c-462f-8314-5afb9e2074a5" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -247,43 +247,43 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/pools/pool2/updateproperties" + "https://billstestba24326.uksouth.batch.azure.com/pools/pool2/updateproperties" ], "Date": [ - "Fri, 16 Jun 2023 08:03:07 GMT" + "Fri, 22 Mar 2024 00:08:36 GMT" ], "Content-Length": [ "0" ], "Last-Modified": [ - "Fri, 16 Jun 2023 08:03:08 GMT" + "Fri, 22 Mar 2024 00:08:36 GMT" ] }, "ResponseBody": "", "StatusCode": 204 }, { - "RequestUri": "/pools/pool2?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3Bvb2wyP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", + "RequestUri": "/pools/pool2?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3Bvb2wyP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "dc4efee7-6b28-4d6d-934b-6acf5070a6f9" + "1b4ca1ff-c757-4ff1-ad24-77f11df4ad6d" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 08:03:07 GMT" + "Fri, 22 Mar 2024 00:08:36 GMT" ], "x-ms-client-request-id": [ - "10527f5b-95d5-4d52-8125-0075c6a7f178" + "7e5ac5d5-2ba3-4eef-8c61-9dc75054a5ca" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -293,13 +293,13 @@ "chunked" ], "ETag": [ - "0x8DB6E401F3F79EE" + "0x8DC4A0438673495" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "4010112d-db3c-42b1-938e-89e85053e76a" + "aa63c68b-65c6-457d-8122-2ec6aa18d633" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -311,40 +311,40 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 08:03:07 GMT" + "Fri, 22 Mar 2024 00:08:36 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ], "Last-Modified": [ - "Fri, 16 Jun 2023 08:03:08 GMT" + "Fri, 22 Mar 2024 00:08:36 GMT" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"pool2\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/pool2\",\r\n \"eTag\": \"0x8DB6E401F3F79EE\",\r\n \"lastModified\": \"2023-06-16T08:03:08.4273134Z\",\r\n \"creationTime\": \"2023-06-16T08:03:06.8162817Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T08:03:06.8162817Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2023-06-16T08:03:08.3983114Z\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 0,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"startTask\": {\r\n \"commandLine\": \"/bin/bash -c 'echo start task'\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"pool\",\r\n \"elevationLevel\": \"nonadmin\"\r\n }\r\n },\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": true\r\n },\r\n \"certificateReferences\": [],\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoft-azure-batch\",\r\n \"offer\": \"ubuntu-server-container\",\r\n \"sku\": \"20-04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"containerConfiguration\": {\r\n \"type\": \"dockerCompatible\",\r\n \"containerImageNames\": [\r\n \"test\"\r\n ]\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"pool2\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/pool2\",\r\n \"eTag\": \"0x8DC4A0438673495\",\r\n \"lastModified\": \"2024-03-22T00:08:36.6380181Z\",\r\n \"creationTime\": \"2024-03-22T00:08:35.1949116Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-22T00:08:35.1949116Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2024-03-22T00:08:36.6214273Z\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 0,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"startTask\": {\r\n \"commandLine\": \"/bin/bash -c 'echo start task'\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"pool\",\r\n \"elevationLevel\": \"nonadmin\"\r\n }\r\n },\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": true\r\n },\r\n \"certificateReferences\": [],\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoft-azure-batch\",\r\n \"offer\": \"ubuntu-server-container\",\r\n \"sku\": \"20-04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"containerConfiguration\": {\r\n \"type\": \"dockerCompatible\",\r\n \"containerImageNames\": [\r\n \"test2\"\r\n ]\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/pool1?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3Bvb2wxP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", + "RequestUri": "/pools/pool1?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3Bvb2wxP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", "RequestMethod": "DELETE", "RequestHeaders": { "client-request-id": [ - "fcbb2140-61c3-4236-825f-fd3d2574ac3d" + "b2cf37be-df68-4f1f-b311-d71e761ba98e" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 08:03:07 GMT" + "Fri, 22 Mar 2024 00:08:36 GMT" ], "x-ms-client-request-id": [ - "3ac9d08d-94cf-4ec5-bf15-a40e5180f242" + "ab820452-96cf-4c9c-9cbb-4fac67dbcd57" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Length": [ @@ -360,7 +360,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "e2bf9029-5f2e-41dd-aa2b-4c1addc97436" + "57e1fe81-fe51-46a9-b4db-3ea37bca5434" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -372,34 +372,34 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 08:03:07 GMT" + "Fri, 22 Mar 2024 00:08:36 GMT" ] }, "ResponseBody": "", "StatusCode": 202 }, { - "RequestUri": "/pools/pool2?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3Bvb2wyP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", + "RequestUri": "/pools/pool2?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3Bvb2wyP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", "RequestMethod": "DELETE", "RequestHeaders": { "client-request-id": [ - "233fbbc7-4f5c-4522-9a3d-ef41586c8a3b" + "27ef6ec1-4531-4359-b250-f8d3e7009e99" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 08:03:07 GMT" + "Fri, 22 Mar 2024 00:08:36 GMT" ], "x-ms-client-request-id": [ - "f9b7bcd5-3be8-430b-b819-d73814d5d150" + "f067cf46-65fc-4ce4-ab8b-3bf1fb93fd50" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Length": [ @@ -415,7 +415,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "7d67d1fb-2677-48dc-9d60-67a55ece1080" + "4eadb41c-210d-467e-9c00-ea4821ccac5f" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -427,34 +427,34 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 08:03:08 GMT" + "Fri, 22 Mar 2024 00:08:36 GMT" ] }, "ResponseBody": "", "StatusCode": 202 }, { - "RequestUri": "/pools?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", + "RequestUri": "/pools?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "7bf1d62d-641d-439a-885a-aec2287ed758" + "55076a62-9fb1-4226-8b52-d44e37c50014" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 08:03:07 GMT" + "Fri, 22 Mar 2024 00:08:37 GMT" ], "x-ms-client-request-id": [ - "0a0b6f0d-9ccc-4ba9-9dcd-fc2868c1e23d" + "31019e68-cd4d-4f1f-a2ec-35f66935f379" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -467,7 +467,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "684c9b8c-53fe-4f09-8d3a-0023f764653d" + "c563253c-f8fa-4811-a8cb-c42d2c24cb78" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -479,21 +479,21 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 08:03:08 GMT" + "Fri, 22 Mar 2024 00:08:36 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#pools\",\r\n \"value\": [\r\n {\r\n \"id\": \"mpiPool\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/mpiPool\",\r\n \"eTag\": \"0x8DB6BE46833B869\",\r\n \"lastModified\": \"2023-06-13T08:01:34.7992681Z\",\r\n \"creationTime\": \"2023-06-13T08:01:34.7992681Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-13T08:01:34.7992681Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2023-06-13T08:03:32.0598541Z\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 3,\r\n \"targetDedicatedNodes\": 3,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": true,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"4\",\r\n \"osVersion\": \"*\"\r\n },\r\n \"targetNodeCommunicationMode\": \"classic\",\r\n \"currentNodeCommunicationMode\": \"classic\"\r\n },\r\n {\r\n \"id\": \"pool2\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/pool2\",\r\n \"eTag\": \"0x8DB6E401F82F50E\",\r\n \"lastModified\": \"2023-06-16T08:03:08.8695566Z\",\r\n \"creationTime\": \"2023-06-16T08:03:06.8162817Z\",\r\n \"state\": \"deleting\",\r\n \"stateTransitionTime\": \"2023-06-16T08:03:08.8695566Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2023-06-16T08:03:08.9815603Z\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"resizeTimeout\": \"PT7M9.497S\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 0,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"startTask\": {\r\n \"commandLine\": \"/bin/bash -c 'echo start task'\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"pool\",\r\n \"elevationLevel\": \"nonadmin\"\r\n }\r\n },\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": true\r\n },\r\n \"certificateReferences\": [],\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"microsoft-azure-batch\",\r\n \"offer\": \"ubuntu-server-container\",\r\n \"sku\": \"20-04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"containerConfiguration\": {\r\n \"type\": \"dockerCompatible\",\r\n \"containerImageNames\": [\r\n \"test\"\r\n ]\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n },\r\n {\r\n \"id\": \"testIaasPool\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/testIaasPool\",\r\n \"eTag\": \"0x8DB6BE213BF7BA8\",\r\n \"lastModified\": \"2023-06-13T07:44:54.1154216Z\",\r\n \"creationTime\": \"2023-06-13T07:44:54.1154216Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-13T07:44:54.1154216Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2023-06-13T07:45:56.7212673Z\",\r\n \"vmSize\": \"standard_a1_v2\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 1,\r\n \"targetDedicatedNodes\": 1,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-jammy\",\r\n \"sku\": \"22_04-LTS\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 22.04\"\r\n },\r\n \"targetNodeCommunicationMode\": \"default\",\r\n \"currentNodeCommunicationMode\": \"classic\"\r\n },\r\n {\r\n \"id\": \"testPool\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/testPool\",\r\n \"eTag\": \"0x8DB6BE2138F6AE5\",\r\n \"lastModified\": \"2023-06-13T07:44:53.8004197Z\",\r\n \"creationTime\": \"2023-06-13T07:44:53.8004197Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-13T07:44:53.8004197Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2023-06-13T07:46:21.6749991Z\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 3,\r\n \"targetDedicatedNodes\": 3,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"pool\",\r\n \"elevationLevel\": \"nonadmin\"\r\n }\r\n },\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": true\r\n },\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"4\",\r\n \"osVersion\": \"*\"\r\n },\r\n \"targetNodeCommunicationMode\": \"default\",\r\n \"currentNodeCommunicationMode\": \"classic\"\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools\",\r\n \"value\": [\r\n {\r\n \"id\": \"TestPoolCreatedUpgradePolicy_9421955424704fa08978b\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/TestPoolCreatedUpgradePolicy_9421955424704fa08978b\",\r\n \"eTag\": \"0x8DC3719524E78E6\",\r\n \"lastModified\": \"2024-02-26T22:21:47.4352358Z\",\r\n \"creationTime\": \"2024-02-26T22:21:47.4352358Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-02-26T22:21:47.4352358Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2024-02-26T22:21:49.0162563Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 0,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"upgradePolicy\": {\r\n \"mode\": \"automatic\",\r\n \"automaticOSUpgradePolicy\": {\r\n \"disableAutomaticRollback\": true,\r\n \"enableAutomaticOSUpgrade\": true,\r\n \"useRollingUpgradePolicy\": true,\r\n \"osRollingUpgradeDeferral\": true\r\n },\r\n \"rollingUpgradePolicy\": {\r\n \"enableCrossZoneUpgrade\": true,\r\n \"maxBatchInstancePercent\": 20,\r\n \"maxUnhealthyInstancePercent\": 20,\r\n \"maxUnhealthyUpgradedInstancePercent\": 20,\r\n \"pauseTimeBetweenBatches\": \"PT5S\",\r\n \"prioritizeUnhealthyInstances\": false,\r\n \"rollbackFailedInstancesOnPolicyBreach\": false\r\n }\r\n }\r\n }\r\n ]\r\n}", "StatusCode": 200 } ], "Names": {}, "Variables": { - "SubscriptionId": "21abd678-18c5-4660-9fdd-8c5ba6b6fe1f", - "AZURE_BATCH_ACCOUNT": "hoppeeastasia2", - "AZURE_BATCH_ENDPOINT": "https://hoppeeastasia2.eastasia.batch.azure.com", - "AZURE_BATCH_RESOURCE_GROUP": "123" + "SubscriptionId": "6602ac9a-5dad-41bd-a792-592c704b6a31", + "AZURE_BATCH_ACCOUNT": "billstestba24326", + "AZURE_BATCH_ENDPOINT": "https://billstestba24326.uksouth.batch.azure.com", + "AZURE_BATCH_RESOURCE_GROUP": "automation" } } \ No newline at end of file diff --git a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.PoolTests/TestResizeAndStopResizePool.json b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.PoolTests/TestResizeAndStopResizePool.json index e76a0720a493..4730f2bc5535 100644 --- a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.PoolTests/TestResizeAndStopResizePool.json +++ b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.PoolTests/TestResizeAndStopResizePool.json @@ -1,40 +1,49 @@ { "Entries": [ { - "RequestUri": "/pools?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", + "RequestUri": "/pools?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "5f783e0e-dad3-435a-b952-797f5fd66813" + "28b7430d-1009-457e-881c-fb85f9c909ac" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:35:56 GMT" + "Thu, 21 Mar 2024 23:33:27 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Type": [ "application/json; odata=minimalmetadata; charset=utf-8" ], "Content-Length": [ - "289" + "508" ] }, - "RequestBody": "{\r\n \"id\": \"resizePool\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"4\",\r\n \"osVersion\": \"*\"\r\n },\r\n \"targetDedicatedNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableInterNodeCommunication\": true,\r\n \"targetNodeCommunicationMode\": \"classic\"\r\n}", + "RequestBody": "{\r\n \"id\": \"resizePool\",\r\n \"vmSize\": \"STANDARD_D2S_V3\",\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"zonal\"\r\n }\r\n },\r\n \"targetDedicatedNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableInterNodeCommunication\": false,\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "0x8DC49FF4FDD008C" + ], + "Location": [ + "https://billstestba24326.uksouth.batch.azure.com/pools/resizePool" + ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "31503498-68a6-4380-8c3c-69aafa92f6ba" + "596a6996-ba6a-444c-beae-f97d1f4c863f" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -45,41 +54,41 @@ "DataServiceVersion": [ "3.0" ], - "Date": [ - "Fri, 16 Jun 2023 07:35:56 GMT" + "DataServiceId": [ + "https://billstestba24326.uksouth.batch.azure.com/pools/resizePool" ], - "Content-Length": [ - "335" + "Date": [ + "Thu, 21 Mar 2024 23:33:27 GMT" ], - "Content-Type": [ - "application/json; odata=minimalmetadata" + "Last-Modified": [ + "Thu, 21 Mar 2024 23:33:28 GMT" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element\",\r\n \"code\": \"PoolExists\",\r\n \"message\": {\r\n \"lang\": \"en-US\",\r\n \"value\": \"The specified pool already exists.\\nRequestId:31503498-68a6-4380-8c3c-69aafa92f6ba\\nTime:2023-06-16T07:35:57.8910832Z\"\r\n }\r\n}", - "StatusCode": 409 + "ResponseBody": "", + "StatusCode": 201 }, { - "RequestUri": "/pools/resizePool?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3Jlc2l6ZVBvb2w/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/pools/resizePool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3Jlc2l6ZVBvb2w/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "08c314d3-29de-4f90-ad3b-cae63fcfbb94" + "e7917cab-4baf-496d-9a69-a05585e57338" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:35:57 GMT" + "Thu, 21 Mar 2024 23:33:30 GMT" ], "x-ms-client-request-id": [ - "5fc9d680-5b5e-4322-ad7d-0a52b5af65cf" + "b582a31e-893b-4032-9090-992a7002c388" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -89,13 +98,13 @@ "chunked" ], "ETag": [ - "0x8DB6E381FC72D70" + "0x8DC49FF4FDD008C" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "6aadaa6a-6c82-42db-9576-b91cff248a65" + "3f99a033-b372-45f4-b211-dbec60bdd8f5" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -107,40 +116,40 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:35:58 GMT" + "Thu, 21 Mar 2024 23:33:31 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:05:53 GMT" + "Thu, 21 Mar 2024 23:33:28 GMT" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"resizePool\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/resizePool\",\r\n \"eTag\": \"0x8DB6E381FC72D70\",\r\n \"lastModified\": \"2023-06-16T07:05:53.342808Z\",\r\n \"creationTime\": \"2023-06-16T07:05:53.342808Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:05:53.342808Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2023-06-16T07:05:55.155816Z\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 0,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": true,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"4\",\r\n \"osVersion\": \"*\"\r\n },\r\n \"targetNodeCommunicationMode\": \"classic\"\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"resizePool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/resizePool\",\r\n \"eTag\": \"0x8DC49FF4FDD008C\",\r\n \"lastModified\": \"2024-03-21T23:33:28.5139596Z\",\r\n \"creationTime\": \"2024-03-21T23:33:28.5139584Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-21T23:33:28.5139584Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2024-03-21T23:33:29.6068087Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 0,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/resizePool?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3Jlc2l6ZVBvb2w/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/pools/resizePool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3Jlc2l6ZVBvb2w/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "dd74a2b6-53f7-4f2b-b297-7d90ff03064b" + "8510ca11-f830-4113-9607-6b11571b7d9c" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:35:57 GMT" + "Thu, 21 Mar 2024 23:33:31 GMT" ], "x-ms-client-request-id": [ - "16887fec-345e-46b2-8fd9-06ce0363c144" + "9aa0ff6f-a2a2-41ad-ab2b-15de79274d42" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -150,13 +159,13 @@ "chunked" ], "ETag": [ - "0x8DB6E3C53E0FF2E" + "0x8DC49FF51CF9B84" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "86e6fde1-9c46-4e2a-baae-295784b3adfa" + "f9d19578-fdee-40dc-9357-f2d45233ae36" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -168,40 +177,40 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:35:58 GMT" + "Thu, 21 Mar 2024 23:33:31 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:35:58 GMT" + "Thu, 21 Mar 2024 23:33:31 GMT" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"resizePool\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/resizePool\",\r\n \"eTag\": \"0x8DB6E3C53E0FF2E\",\r\n \"lastModified\": \"2023-06-16T07:35:58.740459Z\",\r\n \"creationTime\": \"2023-06-16T07:05:53.342808Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:05:53.342808Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2023-06-16T07:35:58.740459Z\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 1,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": true,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"4\",\r\n \"osVersion\": \"*\"\r\n },\r\n \"targetNodeCommunicationMode\": \"classic\"\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"resizePool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/resizePool\",\r\n \"eTag\": \"0x8DC49FF51CF9B84\",\r\n \"lastModified\": \"2024-03-21T23:33:31.7816196Z\",\r\n \"creationTime\": \"2024-03-21T23:33:28.5139584Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-21T23:33:28.5139584Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2024-03-21T23:33:31.7816196Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 1,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/resizePool?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3Jlc2l6ZVBvb2w/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/pools/resizePool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3Jlc2l6ZVBvb2w/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "91ce0332-8b6a-48f2-8a61-d136ff64cd9e" + "8e213cf9-ae7e-41e1-b81c-73a6c1003b70" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:35:57 GMT" + "Thu, 21 Mar 2024 23:33:32 GMT" ], "x-ms-client-request-id": [ - "71d75242-0071-479b-b831-d4ea154b0aa9" + "1cbddb2b-cfe2-4dd6-9276-08391dd2c393" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -211,13 +220,13 @@ "chunked" ], "ETag": [ - "0x8DB6E3C53E0FF2E" + "0x8DC49FF51CF9B84" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "343f998b-83f3-440e-ae5d-114fafab5611" + "d79bf97c-f164-4ef9-802e-bae8047e45a2" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -229,37 +238,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:35:59 GMT" + "Thu, 21 Mar 2024 23:33:32 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:35:58 GMT" + "Thu, 21 Mar 2024 23:33:31 GMT" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"resizePool\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/resizePool\",\r\n \"eTag\": \"0x8DB6E3C53E0FF2E\",\r\n \"lastModified\": \"2023-06-16T07:35:58.740459Z\",\r\n \"creationTime\": \"2023-06-16T07:05:53.342808Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:05:53.342808Z\",\r\n \"allocationState\": \"stopping\",\r\n \"allocationStateTransitionTime\": \"2023-06-16T07:35:58.9974624Z\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 1,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": true,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"4\",\r\n \"osVersion\": \"*\"\r\n },\r\n \"targetNodeCommunicationMode\": \"classic\"\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"resizePool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/resizePool\",\r\n \"eTag\": \"0x8DC49FF51CF9B84\",\r\n \"lastModified\": \"2024-03-21T23:33:31.7816196Z\",\r\n \"creationTime\": \"2024-03-21T23:33:28.5139584Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-21T23:33:28.5139584Z\",\r\n \"allocationState\": \"stopping\",\r\n \"allocationStateTransitionTime\": \"2024-03-21T23:33:32.2550304Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 1,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/resizePool?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3Jlc2l6ZVBvb2w/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/pools/resizePool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3Jlc2l6ZVBvb2w/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "a992b38a-36ed-4fab-82f5-6eb05016feaa" + "73c6ab59-f595-44a2-8d50-1742b7f60c1c" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:35:57 GMT" + "Thu, 21 Mar 2024 23:33:32 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -269,13 +278,13 @@ "chunked" ], "ETag": [ - "0x8DB6E3C53E0FF2E" + "0x8DC49FF51CF9B84" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "52e52ab2-f116-4bb7-a1fa-5ba593600f44" + "45dddd62-df91-46ce-8fe4-f647a561fcda" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -287,37 +296,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:35:59 GMT" + "Thu, 21 Mar 2024 23:33:31 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:35:58 GMT" + "Thu, 21 Mar 2024 23:33:31 GMT" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"resizePool\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/resizePool\",\r\n \"eTag\": \"0x8DB6E3C53E0FF2E\",\r\n \"lastModified\": \"2023-06-16T07:35:58.740459Z\",\r\n \"creationTime\": \"2023-06-16T07:05:53.342808Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:05:53.342808Z\",\r\n \"allocationState\": \"stopping\",\r\n \"allocationStateTransitionTime\": \"2023-06-16T07:35:58.9974624Z\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 1,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": true,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"4\",\r\n \"osVersion\": \"*\"\r\n },\r\n \"targetNodeCommunicationMode\": \"classic\"\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"resizePool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/resizePool\",\r\n \"eTag\": \"0x8DC49FF51CF9B84\",\r\n \"lastModified\": \"2024-03-21T23:33:31.7816196Z\",\r\n \"creationTime\": \"2024-03-21T23:33:28.5139584Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-21T23:33:28.5139584Z\",\r\n \"allocationState\": \"stopping\",\r\n \"allocationStateTransitionTime\": \"2024-03-21T23:33:32.2550304Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 1,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/resizePool?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3Jlc2l6ZVBvb2w/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/pools/resizePool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3Jlc2l6ZVBvb2w/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "cba70a61-6c4e-4299-9eb9-7383c237e0b9" + "8a80959f-4fe3-4453-a26b-8033b7cbabd5" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:03 GMT" + "Thu, 21 Mar 2024 23:33:37 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -327,13 +336,13 @@ "chunked" ], "ETag": [ - "0x8DB6E3C53E0FF2E" + "0x8DC49FF51CF9B84" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "ffaa55a8-4d31-47c4-8a25-07e4cedcf9a5" + "dd540cac-b1f7-478e-b47a-8c98ac9e0851" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -345,40 +354,40 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:36:03 GMT" + "Thu, 21 Mar 2024 23:33:37 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:35:58 GMT" + "Thu, 21 Mar 2024 23:33:31 GMT" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"resizePool\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/resizePool\",\r\n \"eTag\": \"0x8DB6E3C53E0FF2E\",\r\n \"lastModified\": \"2023-06-16T07:35:58.740459Z\",\r\n \"creationTime\": \"2023-06-16T07:05:53.342808Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:05:53.342808Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2023-06-16T07:36:03.9113838Z\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 1,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"resizeErrors\": [\r\n {\r\n \"code\": \"ResizeStopped\",\r\n \"message\": \"Desired number of dedicated nodes could not be allocated due to a stop resize operation\"\r\n }\r\n ],\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": true,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"4\",\r\n \"osVersion\": \"*\"\r\n },\r\n \"targetNodeCommunicationMode\": \"classic\"\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"resizePool\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/pools/resizePool\",\r\n \"eTag\": \"0x8DC49FF51CF9B84\",\r\n \"lastModified\": \"2024-03-21T23:33:31.7816196Z\",\r\n \"creationTime\": \"2024-03-21T23:33:28.5139584Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-21T23:33:28.5139584Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2024-03-21T23:33:36.9296997Z\",\r\n \"vmSize\": \"standard_d2s_v3\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 0,\r\n \"targetDedicatedNodes\": 1,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"resizeErrors\": [\r\n {\r\n \"code\": \"ResizeStopped\",\r\n \"message\": \"Desired number of dedicated nodes could not be allocated due to a stop resize operation\"\r\n }\r\n ],\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"Zonal\"\r\n }\r\n },\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/pools/resizePool/resize?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3Jlc2l6ZVBvb2wvcmVzaXplP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", + "RequestUri": "/pools/resizePool/resize?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3Jlc2l6ZVBvb2wvcmVzaXplP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "9267952c-f4ce-4097-8266-eb7ca1853a45" + "dbd135de-692f-4e47-95b0-e3a34ebdc028" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:35:57 GMT" + "Thu, 21 Mar 2024 23:33:31 GMT" ], "x-ms-client-request-id": [ - "6c269655-20bb-485d-8da5-ac023a307c62" + "e5d5219d-e9f8-47fb-8046-95dac2fdb2ec" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Type": [ @@ -394,13 +403,13 @@ "chunked" ], "ETag": [ - "0x8DB6E3C53E0FF2E" + "0x8DC49FF51CF9B84" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "59167a65-c6a9-485a-bf9b-ed66c0158f78" + "a5695fa7-467c-4d54-bbbe-2e8c98da0c11" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -412,40 +421,40 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/pools/resizePool/resize" + "https://billstestba24326.uksouth.batch.azure.com/pools/resizePool/resize" ], "Date": [ - "Fri, 16 Jun 2023 07:35:58 GMT" + "Thu, 21 Mar 2024 23:33:31 GMT" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:35:58 GMT" + "Thu, 21 Mar 2024 23:33:31 GMT" ] }, "ResponseBody": "", "StatusCode": 202 }, { - "RequestUri": "/pools/resizePool/stopresize?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3Jlc2l6ZVBvb2wvc3RvcHJlc2l6ZT9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjA=", + "RequestUri": "/pools/resizePool/stopresize?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3Jlc2l6ZVBvb2wvc3RvcHJlc2l6ZT9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "b7586f39-4815-496a-b446-4a74e75c17e8" + "e0f68fa8-a24f-4ce8-9645-14b2e4e5752d" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:35:57 GMT" + "Thu, 21 Mar 2024 23:33:31 GMT" ], "x-ms-client-request-id": [ - "8db57df3-4577-499a-bfd0-a5a29c65ba1c" + "839d8b15-aa9a-4436-bf0e-53e7ee34a78c" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Length": [ @@ -458,13 +467,13 @@ "chunked" ], "ETag": [ - "0x8DB6E3C53E0FF2E" + "0x8DC49FF51CF9B84" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "c3bf23a3-3486-44c5-9b85-46d09dc77000" + "d51e7f99-3d42-4a3f-894a-f83a055aaad6" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -476,37 +485,37 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/pools/resizePool/stopresize" + "https://billstestba24326.uksouth.batch.azure.com/pools/resizePool/stopresize" ], "Date": [ - "Fri, 16 Jun 2023 07:35:59 GMT" + "Thu, 21 Mar 2024 23:33:32 GMT" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:35:58 GMT" + "Thu, 21 Mar 2024 23:33:31 GMT" ] }, "ResponseBody": "", "StatusCode": 202 }, { - "RequestUri": "/pools/resizePool?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL3Jlc2l6ZVBvb2w/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/pools/resizePool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL3Jlc2l6ZVBvb2w/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "DELETE", "RequestHeaders": { "client-request-id": [ - "2176e4ef-3534-4558-8031-39f9ff6729b7" + "1836c905-c48d-4e51-b477-b0820fbf0904" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:03 GMT" + "Thu, 21 Mar 2024 23:33:37 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Length": [ @@ -522,7 +531,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "8d78abdf-2a69-49e0-b66b-b6c4c9b36e9b" + "ddf23d47-7943-49b9-afe2-2d49f515a0a1" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -534,7 +543,7 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:36:03 GMT" + "Thu, 21 Mar 2024 23:33:37 GMT" ] }, "ResponseBody": "", @@ -543,9 +552,9 @@ ], "Names": {}, "Variables": { - "SubscriptionId": "21abd678-18c5-4660-9fdd-8c5ba6b6fe1f", - "AZURE_BATCH_ACCOUNT": "hoppeeastasia2", - "AZURE_BATCH_ENDPOINT": "https://hoppeeastasia2.eastasia.batch.azure.com", - "AZURE_BATCH_RESOURCE_GROUP": "123" + "SubscriptionId": "6602ac9a-5dad-41bd-a792-592c704b6a31", + "AZURE_BATCH_ACCOUNT": "billstestba24326", + "AZURE_BATCH_ENDPOINT": "https://billstestba24326.uksouth.batch.azure.com", + "AZURE_BATCH_RESOURCE_GROUP": "automation" } } \ No newline at end of file diff --git a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.TaskTests/TestCreateTaskCollection.json b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.TaskTests/TestCreateTaskCollection.json index c9f75cc395e2..378e063ea875 100644 --- a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.TaskTests/TestCreateTaskCollection.json +++ b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.TaskTests/TestCreateTaskCollection.json @@ -1,24 +1,24 @@ { "Entries": [ { - "RequestUri": "/jobs?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "c2b2a95c-c7a2-4069-867b-6ae40f8b0c38" + "0cc1fb4b-4630-46cb-937c-0cb182210971" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:17 GMT" + "Thu, 21 Mar 2024 23:07:51 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Type": [ @@ -34,16 +34,16 @@ "chunked" ], "ETag": [ - "0x8DB6E3C5FEA28C0" + "0x8DC49FBBC76A577" ], "Location": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/jobs/job-1" + "https://billstestba24326.uksouth.batch.azure.com/jobs/job-1" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "caf9e759-287f-49da-84d5-6cb8950ef16d" + "089780e8-c64d-4665-bdeb-7a21a034eedb" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -55,40 +55,40 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/jobs/job-1" + "https://billstestba24326.uksouth.batch.azure.com/jobs/job-1" ], "Date": [ - "Fri, 16 Jun 2023 07:36:18 GMT" + "Thu, 21 Mar 2024 23:07:51 GMT" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:36:18 GMT" + "Thu, 21 Mar 2024 23:07:52 GMT" ] }, "ResponseBody": "", "StatusCode": 201 }, { - "RequestUri": "/jobs/createTaskCollectionJob?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnMvY3JlYXRlVGFza0NvbGxlY3Rpb25Kb2I/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/jobs/createTaskCollectionJob?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnMvY3JlYXRlVGFza0NvbGxlY3Rpb25Kb2I/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "85ccad98-59ef-4432-87b0-0794602250a8" + "8ffce147-f6c1-41d5-8f98-1bf204fc3906" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:18 GMT" + "Thu, 21 Mar 2024 23:07:52 GMT" ], "x-ms-client-request-id": [ - "93d83d22-7a7b-424d-bd91-6e3631419d7b" + "8885e45d-3689-4e18-808d-8ada568e271d" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -98,13 +98,13 @@ "chunked" ], "ETag": [ - "0x8DB6E3C5FEA28C0" + "0x8DC49FBBC76A577" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "beac843c-51d3-4c66-9c17-0d65b83e1249" + "02b2383a-be25-4864-8345-5d1c8bcf9785" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -116,40 +116,40 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:36:18 GMT" + "Thu, 21 Mar 2024 23:07:53 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:36:18 GMT" + "Thu, 21 Mar 2024 23:07:52 GMT" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#jobs/@Element\",\r\n \"id\": \"createTaskCollectionJob\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobs/createTaskCollectionJob\",\r\n \"eTag\": \"0x8DB6E3C5FEA28C0\",\r\n \"lastModified\": \"2023-06-16T07:36:18.9331648Z\",\r\n \"creationTime\": \"2023-06-16T07:36:18.9161664Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:36:18.9331648Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2023-06-16T07:36:18.9331648Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"noaction\"\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#jobs/@Element\",\r\n \"id\": \"createTaskCollectionJob\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/createTaskCollectionJob\",\r\n \"eTag\": \"0x8DC49FBBC76A577\",\r\n \"lastModified\": \"2024-03-21T23:07:52.7278967Z\",\r\n \"creationTime\": \"2024-03-21T23:07:52.7138956Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-21T23:07:52.7278967Z\",\r\n \"priority\": 0,\r\n \"maxParallelTasks\": -1,\r\n \"usesTaskDependencies\": false,\r\n \"allowTaskPreemption\": false,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-21T23:07:52.7278967Z\",\r\n \"poolId\": \"testPool\"\r\n },\r\n \"onAllTasksComplete\": \"noaction\",\r\n \"onTaskFailure\": \"noaction\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/jobs/createTaskCollectionJob/addtaskcollection?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnMvY3JlYXRlVGFza0NvbGxlY3Rpb25Kb2IvYWRkdGFza2NvbGxlY3Rpb24/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/jobs/createTaskCollectionJob/addtaskcollection?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnMvY3JlYXRlVGFza0NvbGxlY3Rpb25Kb2IvYWRkdGFza2NvbGxlY3Rpb24/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "bf63da4d-d15b-468d-a52e-52ba55bd4efb" + "076026e2-24dc-412d-b874-f0d1d0c114ed" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:18 GMT" + "Thu, 21 Mar 2024 23:07:53 GMT" ], "x-ms-client-request-id": [ - "93d83d22-7a7b-424d-bd91-6e3631419d7b" + "8885e45d-3689-4e18-808d-8ada568e271d" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Type": [ @@ -168,7 +168,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "e5044232-a942-408c-8472-9295220f5cfb" + "9f0d1902-d42a-42fd-b91b-3a6ff2d370ea" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -180,37 +180,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:36:19 GMT" + "Thu, 21 Mar 2024 23:07:53 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#taskaddresult\",\r\n \"value\": [\r\n {\r\n \"status\": \"Success\",\r\n \"taskId\": \"simple1\",\r\n \"eTag\": \"0x8DB6E3C60716F0D\",\r\n \"lastModified\": \"2023-06-16T07:36:19.8197005Z\",\r\n \"location\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobs/createTaskCollectionJob/tasks/simple1\"\r\n },\r\n {\r\n \"status\": \"Success\",\r\n \"taskId\": \"simple2\",\r\n \"eTag\": \"0x8DB6E3C6073B897\",\r\n \"lastModified\": \"2023-06-16T07:36:19.8346903Z\",\r\n \"location\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobs/createTaskCollectionJob/tasks/simple2\"\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#taskaddresult\",\r\n \"value\": [\r\n {\r\n \"status\": \"Success\",\r\n \"taskId\": \"simple1\",\r\n \"eTag\": \"0x8DC49FBBD5147FC\",\r\n \"lastModified\": \"2024-03-21T23:07:54.160742Z\",\r\n \"location\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/createTaskCollectionJob/tasks/simple1\"\r\n },\r\n {\r\n \"status\": \"Success\",\r\n \"taskId\": \"simple2\",\r\n \"eTag\": \"0x8DC49FBBD519629\",\r\n \"lastModified\": \"2024-03-21T23:07:54.1627433Z\",\r\n \"location\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/createTaskCollectionJob/tasks/simple2\"\r\n }\r\n ]\r\n}", "StatusCode": 200 }, { - "RequestUri": "/jobs/createTaskCollectionJob/addtaskcollection?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnMvY3JlYXRlVGFza0NvbGxlY3Rpb25Kb2IvYWRkdGFza2NvbGxlY3Rpb24/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/jobs/createTaskCollectionJob/addtaskcollection?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnMvY3JlYXRlVGFza0NvbGxlY3Rpb25Kb2IvYWRkdGFza2NvbGxlY3Rpb24/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "033afd95-9fde-4519-b91b-437a89ebc7f0" + "daffb458-128d-443a-95d2-799585e56dad" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:18 GMT" + "Thu, 21 Mar 2024 23:07:54 GMT" ], "x-ms-client-request-id": [ - "1871beaf-0a4a-4773-a0cf-f1019b084dee" + "d72c0eb2-4de1-40d4-9bab-ae95e2068855" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Type": [ @@ -220,7 +220,7 @@ "1051" ] }, - "RequestBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"complex1\",\r\n \"commandLine\": \"cmd /c dir /s\",\r\n \"resourceFiles\": [\r\n {\r\n \"httpUrl\": \"https://testacct.blob.core.windows.net/\",\r\n \"filePath\": \"file1\"\r\n }\r\n ],\r\n \"environmentSettings\": [\r\n {\r\n \"name\": \"env2\",\r\n \"value\": \"value2\"\r\n },\r\n {\r\n \"name\": \"env1\",\r\n \"value\": \"value1\"\r\n }\r\n ],\r\n \"affinityInfo\": {\r\n \"affinityId\": \"affinityId\"\r\n },\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P1D\",\r\n \"retentionTime\": \"P2D\",\r\n \"maxTaskRetryCount\": 5\r\n },\r\n \"multiInstanceSettings\": {\r\n \"numberOfInstances\": 3,\r\n \"coordinationCommandLine\": \"cmd /c echo coordinating\",\r\n \"commonResourceFiles\": [\r\n {\r\n \"httpUrl\": \"https://common.blob.core.windows.net/\",\r\n \"filePath\": \"common.exe\"\r\n }\r\n ]\r\n }\r\n },\r\n {\r\n \"id\": \"simple3\",\r\n \"commandLine\": \"cmd /c dir /s\"\r\n }\r\n ]\r\n}", + "RequestBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"complex1\",\r\n \"commandLine\": \"cmd /c dir /s\",\r\n \"resourceFiles\": [\r\n {\r\n \"httpUrl\": \"https://testacct.blob.core.windows.net/\",\r\n \"filePath\": \"file1\"\r\n }\r\n ],\r\n \"environmentSettings\": [\r\n {\r\n \"name\": \"env1\",\r\n \"value\": \"value1\"\r\n },\r\n {\r\n \"name\": \"env2\",\r\n \"value\": \"value2\"\r\n }\r\n ],\r\n \"affinityInfo\": {\r\n \"affinityId\": \"affinityId\"\r\n },\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P1D\",\r\n \"retentionTime\": \"P2D\",\r\n \"maxTaskRetryCount\": 5\r\n },\r\n \"multiInstanceSettings\": {\r\n \"numberOfInstances\": 3,\r\n \"coordinationCommandLine\": \"cmd /c echo coordinating\",\r\n \"commonResourceFiles\": [\r\n {\r\n \"httpUrl\": \"https://common.blob.core.windows.net/\",\r\n \"filePath\": \"common.exe\"\r\n }\r\n ]\r\n }\r\n },\r\n {\r\n \"id\": \"simple3\",\r\n \"commandLine\": \"cmd /c dir /s\"\r\n }\r\n ]\r\n}", "ResponseHeaders": { "Transfer-Encoding": [ "chunked" @@ -229,7 +229,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "6049e719-1f23-4046-a173-e7733bc0ef9b" + "fddb36d7-6baf-4d08-9af0-78ba94406dc3" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -241,37 +241,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:36:19 GMT" + "Thu, 21 Mar 2024 23:07:54 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#taskaddresult\",\r\n \"value\": [\r\n {\r\n \"status\": \"Success\",\r\n \"taskId\": \"simple3\",\r\n \"eTag\": \"0x8DB6E3C60B36978\",\r\n \"lastModified\": \"2023-06-16T07:36:20.2520952Z\",\r\n \"location\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobs/createTaskCollectionJob/tasks/simple3\"\r\n },\r\n {\r\n \"status\": \"Success\",\r\n \"taskId\": \"complex1\",\r\n \"eTag\": \"0x8DB6E3C60B31B5A\",\r\n \"lastModified\": \"2023-06-16T07:36:20.2500954Z\",\r\n \"location\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobs/createTaskCollectionJob/tasks/complex1\"\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#taskaddresult\",\r\n \"value\": [\r\n {\r\n \"status\": \"Success\",\r\n \"taskId\": \"simple3\",\r\n \"eTag\": \"0x8DC49FBBDDA5A84\",\r\n \"lastModified\": \"2024-03-21T23:07:55.0590596Z\",\r\n \"location\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/createTaskCollectionJob/tasks/simple3\"\r\n },\r\n {\r\n \"status\": \"Success\",\r\n \"taskId\": \"complex1\",\r\n \"eTag\": \"0x8DC49FBBDDA815B\",\r\n \"lastModified\": \"2024-03-21T23:07:55.0600539Z\",\r\n \"location\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/createTaskCollectionJob/tasks/complex1\"\r\n }\r\n ]\r\n}", "StatusCode": 200 }, { - "RequestUri": "/jobs/createTaskCollectionJob/tasks/simple1?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnMvY3JlYXRlVGFza0NvbGxlY3Rpb25Kb2IvdGFza3Mvc2ltcGxlMT9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjA=", + "RequestUri": "/jobs/createTaskCollectionJob/tasks/simple1?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnMvY3JlYXRlVGFza0NvbGxlY3Rpb25Kb2IvdGFza3Mvc2ltcGxlMT9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "c9f76dc1-7bb1-470e-b22c-9907d8d956ca" + "b6c00632-a125-48ee-b21b-eef45c0033b1" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:18 GMT" + "Thu, 21 Mar 2024 23:07:54 GMT" ], "x-ms-client-request-id": [ - "de31d85a-da6f-4536-b82c-a8576290dab9" + "0719664b-fcaf-4f0c-b23c-f7a19086f0da" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -281,13 +281,13 @@ "chunked" ], "ETag": [ - "0x8DB6E3C60716F0D" + "0x8DC49FBBD5147FC" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "2cf5deaf-5ad5-42d4-a826-a1e58c4ef34f" + "c0e6d7ba-360f-43da-b483-c98596c2a7d3" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -299,40 +299,40 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:36:19 GMT" + "Thu, 21 Mar 2024 23:07:53 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:36:19 GMT" + "Thu, 21 Mar 2024 23:07:54 GMT" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#tasks/@Element\",\r\n \"id\": \"simple1\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobs/createTaskCollectionJob/tasks/simple1\",\r\n \"eTag\": \"0x8DB6E3C60716F0D\",\r\n \"creationTime\": \"2023-06-16T07:36:19.8197005Z\",\r\n \"lastModified\": \"2023-06-16T07:36:19.8197005Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:36:19.8197005Z\",\r\n \"commandLine\": \"cmd /c dir /s\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"pool\",\r\n \"elevationLevel\": \"nonadmin\"\r\n }\r\n },\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"retentionTime\": \"P7D\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"requiredSlots\": 1,\r\n \"executionInfo\": {\r\n \"retryCount\": 0,\r\n \"requeueCount\": 0\r\n }\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#tasks/@Element\",\r\n \"id\": \"simple1\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/createTaskCollectionJob/tasks/simple1\",\r\n \"eTag\": \"0x8DC49FBBD5147FC\",\r\n \"creationTime\": \"2024-03-21T23:07:54.160742Z\",\r\n \"lastModified\": \"2024-03-21T23:07:54.160742Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-21T23:07:54.160742Z\",\r\n \"commandLine\": \"cmd /c dir /s\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"pool\",\r\n \"elevationLevel\": \"nonadmin\"\r\n }\r\n },\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"retentionTime\": \"P7D\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"requiredSlots\": 1,\r\n \"executionInfo\": {\r\n \"retryCount\": 0,\r\n \"requeueCount\": 0\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/jobs/createTaskCollectionJob/tasks/simple2?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnMvY3JlYXRlVGFza0NvbGxlY3Rpb25Kb2IvdGFza3Mvc2ltcGxlMj9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjA=", + "RequestUri": "/jobs/createTaskCollectionJob/tasks/simple2?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnMvY3JlYXRlVGFza0NvbGxlY3Rpb25Kb2IvdGFza3Mvc2ltcGxlMj9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "aade589a-ecc9-42ed-852f-9f4dab7f5aa1" + "e3ed1337-b3d8-4901-994c-3ecbff4a4a1c" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:18 GMT" + "Thu, 21 Mar 2024 23:07:54 GMT" ], "x-ms-client-request-id": [ - "a4009599-a65d-4453-8b2e-ff15163d9c8a" + "13c16e4a-ed39-480c-95fe-992a6fc16d0e" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -342,13 +342,13 @@ "chunked" ], "ETag": [ - "0x8DB6E3C6073B897" + "0x8DC49FBBD519629" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "b4cb765a-44fa-41a6-a4a4-a2901c9f94bc" + "7011fb34-98ca-4331-a39d-29c422faa063" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -360,40 +360,40 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:36:19 GMT" + "Thu, 21 Mar 2024 23:07:54 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:36:19 GMT" + "Thu, 21 Mar 2024 23:07:54 GMT" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#tasks/@Element\",\r\n \"id\": \"simple2\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobs/createTaskCollectionJob/tasks/simple2\",\r\n \"eTag\": \"0x8DB6E3C6073B897\",\r\n \"creationTime\": \"2023-06-16T07:36:19.8346903Z\",\r\n \"lastModified\": \"2023-06-16T07:36:19.8346903Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:36:19.8346903Z\",\r\n \"commandLine\": \"cmd /c dir /s\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"pool\",\r\n \"elevationLevel\": \"nonadmin\"\r\n }\r\n },\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"retentionTime\": \"P7D\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"requiredSlots\": 1,\r\n \"executionInfo\": {\r\n \"retryCount\": 0,\r\n \"requeueCount\": 0\r\n }\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#tasks/@Element\",\r\n \"id\": \"simple2\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/createTaskCollectionJob/tasks/simple2\",\r\n \"eTag\": \"0x8DC49FBBD519629\",\r\n \"creationTime\": \"2024-03-21T23:07:54.1627433Z\",\r\n \"lastModified\": \"2024-03-21T23:07:54.1627433Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-21T23:07:54.1627433Z\",\r\n \"commandLine\": \"cmd /c dir /s\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"pool\",\r\n \"elevationLevel\": \"nonadmin\"\r\n }\r\n },\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"retentionTime\": \"P7D\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"requiredSlots\": 1,\r\n \"executionInfo\": {\r\n \"retryCount\": 0,\r\n \"requeueCount\": 0\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/jobs/createTaskCollectionJob/tasks/complex1?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnMvY3JlYXRlVGFza0NvbGxlY3Rpb25Kb2IvdGFza3MvY29tcGxleDE/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/jobs/createTaskCollectionJob/tasks/complex1?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnMvY3JlYXRlVGFza0NvbGxlY3Rpb25Kb2IvdGFza3MvY29tcGxleDE/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "6f21535a-c719-45b5-aa3c-560256447d46" + "d5bdeef8-2eda-464b-a3d6-ec4f51b1542c" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:19 GMT" + "Thu, 21 Mar 2024 23:07:54 GMT" ], "x-ms-client-request-id": [ - "f5d56bf5-2436-4e4c-b0e6-f126d03bb33f" + "4d188b00-45e6-43a0-8bce-038b413c5596" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -403,13 +403,13 @@ "chunked" ], "ETag": [ - "0x8DB6E3C60B31B5A" + "0x8DC49FBBDDA815B" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "709995f3-dfbc-4800-a7db-142e4b379b78" + "53e3221b-5df0-493b-9572-d9e929a19df7" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -421,40 +421,40 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:36:19 GMT" + "Thu, 21 Mar 2024 23:07:54 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:36:20 GMT" + "Thu, 21 Mar 2024 23:07:55 GMT" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#tasks/@Element\",\r\n \"id\": \"complex1\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobs/createTaskCollectionJob/tasks/complex1\",\r\n \"eTag\": \"0x8DB6E3C60B31B5A\",\r\n \"creationTime\": \"2023-06-16T07:36:20.2500954Z\",\r\n \"lastModified\": \"2023-06-16T07:36:20.2500954Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:36:20.2500954Z\",\r\n \"commandLine\": \"cmd /c dir /s\",\r\n \"resourceFiles\": [\r\n {\r\n \"httpUrl\": \"https://testacct.blob.core.windows.net/\",\r\n \"filePath\": \"file1\"\r\n }\r\n ],\r\n \"environmentSettings\": [\r\n {\r\n \"name\": \"env2\",\r\n \"value\": \"value2\"\r\n },\r\n {\r\n \"name\": \"env1\",\r\n \"value\": \"value1\"\r\n }\r\n ],\r\n \"affinityInfo\": {\r\n \"affinityId\": \"affinityId\"\r\n },\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"pool\",\r\n \"elevationLevel\": \"nonadmin\"\r\n }\r\n },\r\n \"multiInstanceSettings\": {\r\n \"numberOfInstances\": 3,\r\n \"coordinationCommandLine\": \"cmd /c echo coordinating\",\r\n \"commonResourceFiles\": [\r\n {\r\n \"httpUrl\": \"https://common.blob.core.windows.net/\",\r\n \"filePath\": \"common.exe\"\r\n }\r\n ]\r\n },\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P1D\",\r\n \"retentionTime\": \"P2D\",\r\n \"maxTaskRetryCount\": 5\r\n },\r\n \"requiredSlots\": 1,\r\n \"executionInfo\": {\r\n \"retryCount\": 0,\r\n \"requeueCount\": 0\r\n }\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#tasks/@Element\",\r\n \"id\": \"complex1\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/createTaskCollectionJob/tasks/complex1\",\r\n \"eTag\": \"0x8DC49FBBDDA815B\",\r\n \"creationTime\": \"2024-03-21T23:07:55.0600539Z\",\r\n \"lastModified\": \"2024-03-21T23:07:55.0600539Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-21T23:07:55.0600539Z\",\r\n \"commandLine\": \"cmd /c dir /s\",\r\n \"resourceFiles\": [\r\n {\r\n \"httpUrl\": \"https://testacct.blob.core.windows.net/\",\r\n \"filePath\": \"file1\"\r\n }\r\n ],\r\n \"environmentSettings\": [\r\n {\r\n \"name\": \"env1\",\r\n \"value\": \"value1\"\r\n },\r\n {\r\n \"name\": \"env2\",\r\n \"value\": \"value2\"\r\n }\r\n ],\r\n \"affinityInfo\": {\r\n \"affinityId\": \"affinityId\"\r\n },\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"pool\",\r\n \"elevationLevel\": \"nonadmin\"\r\n }\r\n },\r\n \"multiInstanceSettings\": {\r\n \"numberOfInstances\": 3,\r\n \"coordinationCommandLine\": \"cmd /c echo coordinating\",\r\n \"commonResourceFiles\": [\r\n {\r\n \"httpUrl\": \"https://common.blob.core.windows.net/\",\r\n \"filePath\": \"common.exe\"\r\n }\r\n ]\r\n },\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P1D\",\r\n \"retentionTime\": \"P2D\",\r\n \"maxTaskRetryCount\": 5\r\n },\r\n \"requiredSlots\": 1,\r\n \"executionInfo\": {\r\n \"retryCount\": 0,\r\n \"requeueCount\": 0\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/jobs/createTaskCollectionJob/tasks/simple3?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnMvY3JlYXRlVGFza0NvbGxlY3Rpb25Kb2IvdGFza3Mvc2ltcGxlMz9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjA=", + "RequestUri": "/jobs/createTaskCollectionJob/tasks/simple3?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnMvY3JlYXRlVGFza0NvbGxlY3Rpb25Kb2IvdGFza3Mvc2ltcGxlMz9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "5246d0b5-a3a5-40f2-81df-4e9d4aa9196b" + "c5bcaa65-8e14-467c-82c1-4d8fcce4e15e" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:19 GMT" + "Thu, 21 Mar 2024 23:07:55 GMT" ], "x-ms-client-request-id": [ - "ce6b3ae6-078b-4fb5-8664-697bf15830dd" + "f49b1f3d-3207-4ce4-9989-fee00f5c09b0" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -464,13 +464,13 @@ "chunked" ], "ETag": [ - "0x8DB6E3C60B36978" + "0x8DC49FBBDDA5A84" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "d3eb54fb-690a-4921-94fb-336728e23519" + "27bc20f7-47a4-489f-8cd0-d01b3c7aed5a" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -482,37 +482,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:36:19 GMT" + "Thu, 21 Mar 2024 23:07:54 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:36:20 GMT" + "Thu, 21 Mar 2024 23:07:55 GMT" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#tasks/@Element\",\r\n \"id\": \"simple3\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobs/createTaskCollectionJob/tasks/simple3\",\r\n \"eTag\": \"0x8DB6E3C60B36978\",\r\n \"creationTime\": \"2023-06-16T07:36:20.2520952Z\",\r\n \"lastModified\": \"2023-06-16T07:36:20.2520952Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:36:20.2520952Z\",\r\n \"commandLine\": \"cmd /c dir /s\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"pool\",\r\n \"elevationLevel\": \"nonadmin\"\r\n }\r\n },\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"retentionTime\": \"P7D\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"requiredSlots\": 1,\r\n \"executionInfo\": {\r\n \"retryCount\": 0,\r\n \"requeueCount\": 0\r\n }\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#tasks/@Element\",\r\n \"id\": \"simple3\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/createTaskCollectionJob/tasks/simple3\",\r\n \"eTag\": \"0x8DC49FBBDDA5A84\",\r\n \"creationTime\": \"2024-03-21T23:07:55.0590596Z\",\r\n \"lastModified\": \"2024-03-21T23:07:55.0590596Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-21T23:07:55.0590596Z\",\r\n \"commandLine\": \"cmd /c dir /s\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"pool\",\r\n \"elevationLevel\": \"nonadmin\"\r\n }\r\n },\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"retentionTime\": \"P7D\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"requiredSlots\": 1,\r\n \"executionInfo\": {\r\n \"retryCount\": 0,\r\n \"requeueCount\": 0\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/jobs/createTaskCollectionJob?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnMvY3JlYXRlVGFza0NvbGxlY3Rpb25Kb2I/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/jobs/createTaskCollectionJob?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnMvY3JlYXRlVGFza0NvbGxlY3Rpb25Kb2I/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "DELETE", "RequestHeaders": { "client-request-id": [ - "878b12b5-966e-4fca-8e7d-c0ade3453beb" + "b43cadd9-f577-4dc4-88ea-e1e84ea0aa6f" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:19 GMT" + "Thu, 21 Mar 2024 23:07:55 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Length": [ @@ -528,7 +528,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "d83b7e5f-3d4b-49e8-a67a-5ee70a185df4" + "8538228e-1cdf-419a-b91c-811d912034e6" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -540,7 +540,7 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:36:20 GMT" + "Thu, 21 Mar 2024 23:07:54 GMT" ] }, "ResponseBody": "", @@ -549,9 +549,9 @@ ], "Names": {}, "Variables": { - "SubscriptionId": "21abd678-18c5-4660-9fdd-8c5ba6b6fe1f", - "AZURE_BATCH_ACCOUNT": "hoppeeastasia2", - "AZURE_BATCH_ENDPOINT": "https://hoppeeastasia2.eastasia.batch.azure.com", - "AZURE_BATCH_RESOURCE_GROUP": "123" + "SubscriptionId": "6602ac9a-5dad-41bd-a792-592c704b6a31", + "AZURE_BATCH_ACCOUNT": "billstestba24326", + "AZURE_BATCH_ENDPOINT": "https://billstestba24326.uksouth.batch.azure.com", + "AZURE_BATCH_RESOURCE_GROUP": "automation" } } \ No newline at end of file diff --git a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.TaskTests/TestListAllSubtasks.json b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.TaskTests/TestListAllSubtasks.json index 6bf2fd7d3dc8..77651f9de4b9 100644 --- a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.TaskTests/TestListAllSubtasks.json +++ b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.TaskTests/TestListAllSubtasks.json @@ -1,40 +1,34 @@ { "Entries": [ { - "RequestUri": "/pools/mpiPool?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L3Bvb2xzL21waVBvb2w/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/pools/mpiPool?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzL21waVBvb2w/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "16234808-4e74-4b60-8551-83456e98fe69" + "9adfd0aa-1c41-477f-9efb-fef5486386d6" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:20 GMT" + "Fri, 22 Mar 2024 23:49:00 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, "RequestBody": "", "ResponseHeaders": { - "Transfer-Encoding": [ - "chunked" - ], - "ETag": [ - "0x8DB6BE46833B869" - ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "f3afe320-0951-4306-ab4e-a00ac57ef047" + "704c38f1-c4af-42c7-b92e-e21a424c0d35" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -46,62 +40,62 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:36:22 GMT" + "Fri, 22 Mar 2024 23:49:00 GMT" + ], + "Content-Length": [ + "338" ], "Content-Type": [ "application/json; odata=minimalmetadata" - ], - "Last-Modified": [ - "Tue, 13 Jun 2023 08:01:34 GMT" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"mpiPool\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/mpiPool\",\r\n \"eTag\": \"0x8DB6BE46833B869\",\r\n \"lastModified\": \"2023-06-13T08:01:34.7992681Z\",\r\n \"creationTime\": \"2023-06-13T08:01:34.7992681Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-13T08:01:34.7992681Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2023-06-13T08:03:32.0598541Z\",\r\n \"vmSize\": \"standard_d1_v2\",\r\n \"resizeTimeout\": \"PT15M\",\r\n \"currentDedicatedNodes\": 3,\r\n \"targetDedicatedNodes\": 3,\r\n \"currentLowPriorityNodes\": 0,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": true,\r\n \"taskSlotsPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"cloudServiceConfiguration\": {\r\n \"osFamily\": \"4\",\r\n \"osVersion\": \"*\"\r\n },\r\n \"targetNodeCommunicationMode\": \"classic\",\r\n \"currentNodeCommunicationMode\": \"classic\"\r\n}", - "StatusCode": 200 + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element\",\r\n \"code\": \"PoolNotFound\",\r\n \"message\": {\r\n \"lang\": \"en-US\",\r\n \"value\": \"The specified pool does not exist.\\nRequestId:704c38f1-c4af-42c7-b92e-e21a424c0d35\\nTime:2024-03-22T23:49:01.7554230Z\"\r\n }\r\n}", + "StatusCode": 404 }, { - "RequestUri": "/jobs?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/pools?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L3Bvb2xzP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "40376e58-0b25-4a48-8b63-6ca9ef5b47ae" + "ab29daac-07c8-46b0-a3b0-825dd8d3878b" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:21 GMT" + "Fri, 22 Mar 2024 23:49:01 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Type": [ "application/json; odata=minimalmetadata; charset=utf-8" ], "Content-Length": [ - "96" + "530" ] }, - "RequestBody": "{\r\n \"id\": \"listSubtaskJob\",\r\n \"priority\": 0,\r\n \"poolInfo\": {\r\n \"poolId\": \"mpiPool\"\r\n }\r\n}", + "RequestBody": "{\r\n \"id\": \"mpiPool\",\r\n \"vmSize\": \"STANDARD_D2S_V3\",\r\n \"virtualMachineConfiguration\": {\r\n \"imageReference\": {\r\n \"publisher\": \"canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \"sku\": \"20_04-lts\"\r\n },\r\n \"nodeAgentSKUId\": \"batch.node.ubuntu 20.04\",\r\n \"nodePlacementConfiguration\": {\r\n \"policy\": \"zonal\"\r\n }\r\n },\r\n \"targetDedicatedNodes\": 3,\r\n \"targetLowPriorityNodes\": 0,\r\n \"enableInterNodeCommunication\": true,\r\n \"taskSlotsPerNode\": 1,\r\n \"targetNodeCommunicationMode\": \"default\"\r\n}", "ResponseHeaders": { "Transfer-Encoding": [ "chunked" ], "ETag": [ - "0x8DB6E3C62278972" + "0x8DC4ACAA6C5155C" ], "Location": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/jobs/job-1" + "https://billstestba24326.uksouth.batch.azure.com/pools/mpiPool" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "f0bdc1f4-7ccf-415e-9e7b-2a232bc75b4d" + "7f47a662-b28e-4960-b2fa-f889dbf7b012" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -113,62 +107,62 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/jobs/job-1" + "https://billstestba24326.uksouth.batch.azure.com/pools/mpiPool" ], "Date": [ - "Fri, 16 Jun 2023 07:36:22 GMT" + "Fri, 22 Mar 2024 23:49:01 GMT" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:36:22 GMT" + "Fri, 22 Mar 2024 23:49:02 GMT" ] }, "ResponseBody": "", "StatusCode": 201 }, { - "RequestUri": "/jobs/listSubtaskJob/tasks?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnMvbGlzdFN1YnRhc2tKb2IvdGFza3M/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "8e934d25-0516-4066-b123-d3656bffc5b6" + "9d5cb107-dba9-4b7f-843e-e0e0ba139481" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:21 GMT" + "Fri, 22 Mar 2024 23:49:02 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Type": [ "application/json; odata=minimalmetadata; charset=utf-8" ], "Content-Length": [ - "298" + "96" ] }, - "RequestBody": "{\r\n \"id\": \"testTask\",\r\n \"commandLine\": \"cmd /c hostname\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"task\",\r\n \"elevationLevel\": \"nonadmin\"\r\n }\r\n },\r\n \"multiInstanceSettings\": {\r\n \"numberOfInstances\": 3,\r\n \"coordinationCommandLine\": \"cmd /c echo coordinating\"\r\n }\r\n}", + "RequestBody": "{\r\n \"id\": \"listSubtaskJob\",\r\n \"priority\": 0,\r\n \"poolInfo\": {\r\n \"poolId\": \"mpiPool\"\r\n }\r\n}", "ResponseHeaders": { "Transfer-Encoding": [ "chunked" ], "ETag": [ - "0x8DB6E3C623A4286" + "0x8DC4ACAA711404B" ], "Location": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/jobs/listSubtaskJob/tasks/testTask" + "https://billstestba24326.uksouth.batch.azure.com/jobs/job-1" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "efe755f0-af1a-4d10-aab1-847f6ca28b8f" + "102d5bea-ee07-4421-ba3f-72a8af783bc7" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -180,53 +174,62 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/jobs/listSubtaskJob/tasks/testTask" + "https://billstestba24326.uksouth.batch.azure.com/jobs/job-1" ], "Date": [ - "Fri, 16 Jun 2023 07:36:22 GMT" + "Fri, 22 Mar 2024 23:49:01 GMT" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:36:22 GMT" + "Fri, 22 Mar 2024 23:49:02 GMT" ] }, "ResponseBody": "", "StatusCode": 201 }, { - "RequestUri": "/jobs/listSubtaskJob/tasks/testTask?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnMvbGlzdFN1YnRhc2tKb2IvdGFza3MvdGVzdFRhc2s/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", - "RequestMethod": "GET", + "RequestUri": "/jobs/listSubtaskJob/tasks?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnMvbGlzdFN1YnRhc2tKb2IvdGFza3M/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", + "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "ef5c5798-f4ce-4de5-9866-5987c2571e1e" + "454749ed-ebba-4e83-8b83-138aa2abaebc" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:21 GMT" + "Fri, 22 Mar 2024 23:49:10 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; charset=utf-8" + ], + "Content-Length": [ + "315" ] }, - "RequestBody": "", + "RequestBody": "{\r\n \"id\": \"testTask\",\r\n \"commandLine\": \"/bin/bash -c 'echo task'\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"task\",\r\n \"elevationLevel\": \"nonadmin\"\r\n }\r\n },\r\n \"multiInstanceSettings\": {\r\n \"numberOfInstances\": 3,\r\n \"coordinationCommandLine\": \"/bin/bash -c 'echo coordinating'\"\r\n }\r\n}", "ResponseHeaders": { "Transfer-Encoding": [ "chunked" ], "ETag": [ - "0x8DB6E3C623A4286" + "0x8DC4ACAAC19A835" + ], + "Location": [ + "https://billstestba24326.uksouth.batch.azure.com/jobs/listSubtaskJob/tasks/testTask" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "4df1068b-fd41-4e9a-8373-f76916845c3f" + "53bedd35-68bb-4255-ad61-33f22740021b" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -237,41 +240,38 @@ "DataServiceVersion": [ "3.0" ], - "Date": [ - "Fri, 16 Jun 2023 07:36:22 GMT" + "DataServiceId": [ + "https://billstestba24326.uksouth.batch.azure.com/jobs/listSubtaskJob/tasks/testTask" ], - "Content-Type": [ - "application/json; odata=minimalmetadata" + "Date": [ + "Fri, 22 Mar 2024 23:49:10 GMT" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:36:22 GMT" + "Fri, 22 Mar 2024 23:49:11 GMT" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#tasks/@Element\",\r\n \"id\": \"testTask\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobs/listSubtaskJob/tasks/testTask\",\r\n \"eTag\": \"0x8DB6E3C623A4286\",\r\n \"creationTime\": \"2023-06-16T07:36:22.8135558Z\",\r\n \"lastModified\": \"2023-06-16T07:36:22.8135558Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:36:22.8135558Z\",\r\n \"commandLine\": \"cmd /c hostname\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"task\",\r\n \"elevationLevel\": \"nonadmin\"\r\n }\r\n },\r\n \"multiInstanceSettings\": {\r\n \"numberOfInstances\": 3,\r\n \"coordinationCommandLine\": \"cmd /c echo coordinating\"\r\n },\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"retentionTime\": \"P7D\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"requiredSlots\": 1,\r\n \"executionInfo\": {\r\n \"retryCount\": 0,\r\n \"requeueCount\": 0\r\n }\r\n}", - "StatusCode": 200 + "ResponseBody": "", + "StatusCode": 201 }, { - "RequestUri": "/jobs/listSubtaskJob/tasks/testTask?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnMvbGlzdFN1YnRhc2tKb2IvdGFza3MvdGVzdFRhc2s/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/jobs/listSubtaskJob/tasks/testTask?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnMvbGlzdFN1YnRhc2tKb2IvdGFza3MvdGVzdFRhc2s/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "ed05bf12-66a5-4bc8-9212-08fff0426a21" + "0816b264-585d-4867-8fa5-78e9b01d1c55" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:29 GMT" - ], - "x-ms-client-request-id": [ - "f374870a-1fd0-4e08-8687-153567a6da74" + "Fri, 22 Mar 2024 23:50:21 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -281,13 +281,13 @@ "chunked" ], "ETag": [ - "0x8DB6E3C623A4286" + "0x8DC4ACAAC19A835" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "296dd7b4-bfd4-4f3f-a086-e24e07cef7dd" + "8b1878ab-5f0a-4644-a935-a07920c58865" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -299,89 +299,40 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:36:29 GMT" + "Fri, 22 Mar 2024 23:50:21 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:36:22 GMT" + "Fri, 22 Mar 2024 23:49:11 GMT" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#tasks/@Element\",\r\n \"id\": \"testTask\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobs/listSubtaskJob/tasks/testTask\",\r\n \"eTag\": \"0x8DB6E3C623A4286\",\r\n \"creationTime\": \"2023-06-16T07:36:22.8135558Z\",\r\n \"lastModified\": \"2023-06-16T07:36:22.8135558Z\",\r\n \"state\": \"completed\",\r\n \"stateTransitionTime\": \"2023-06-16T07:36:27.497172Z\",\r\n \"previousState\": \"running\",\r\n \"previousStateTransitionTime\": \"2023-06-16T07:36:24.300796Z\",\r\n \"commandLine\": \"cmd /c hostname\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"task\",\r\n \"elevationLevel\": \"nonadmin\"\r\n }\r\n },\r\n \"multiInstanceSettings\": {\r\n \"numberOfInstances\": 3,\r\n \"coordinationCommandLine\": \"cmd /c echo coordinating\"\r\n },\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"retentionTime\": \"P7D\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"requiredSlots\": 1,\r\n \"executionInfo\": {\r\n \"startTime\": \"2023-06-16T07:36:24.363206Z\",\r\n \"endTime\": \"2023-06-16T07:36:27.497172Z\",\r\n \"exitCode\": 0,\r\n \"result\": \"success\",\r\n \"retryCount\": 0,\r\n \"requeueCount\": 0\r\n },\r\n \"nodeInfo\": {\r\n \"affinityId\": \"TVM:tvmps_c84c701ce1b9e53bfc6818b865bdc00cd040c96031c1925fc9a9fbee85c38b78_d\",\r\n \"nodeUrl\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/mpiPool/nodes/tvmps_c84c701ce1b9e53bfc6818b865bdc00cd040c96031c1925fc9a9fbee85c38b78_d\",\r\n \"poolId\": \"mpiPool\",\r\n \"nodeId\": \"tvmps_c84c701ce1b9e53bfc6818b865bdc00cd040c96031c1925fc9a9fbee85c38b78_d\",\r\n \"taskRootDirectory\": \"workitems\\\\listSubtaskJob\\\\job-1\\\\testTask\",\r\n \"taskRootDirectoryUrl\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/mpiPool/nodes/tvmps_c84c701ce1b9e53bfc6818b865bdc00cd040c96031c1925fc9a9fbee85c38b78_d/files/workitems/listSubtaskJob/job-1/testTask\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#tasks/@Element\",\r\n \"id\": \"testTask\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/listSubtaskJob/tasks/testTask\",\r\n \"eTag\": \"0x8DC4ACAAC19A835\",\r\n \"creationTime\": \"2024-03-22T23:49:11.0979637Z\",\r\n \"lastModified\": \"2024-03-22T23:49:11.0979637Z\",\r\n \"state\": \"completed\",\r\n \"stateTransitionTime\": \"2024-03-22T23:49:50.434408Z\",\r\n \"previousState\": \"running\",\r\n \"previousStateTransitionTime\": \"2024-03-22T23:49:48.240671Z\",\r\n \"commandLine\": \"/bin/bash -c 'echo task'\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"task\",\r\n \"elevationLevel\": \"nonadmin\"\r\n }\r\n },\r\n \"multiInstanceSettings\": {\r\n \"numberOfInstances\": 3,\r\n \"coordinationCommandLine\": \"/bin/bash -c 'echo coordinating'\"\r\n },\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"retentionTime\": \"P7D\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"requiredSlots\": 1,\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T23:49:48.392509Z\",\r\n \"endTime\": \"2024-03-22T23:49:50.434408Z\",\r\n \"exitCode\": 0,\r\n \"result\": \"success\",\r\n \"retryCount\": 0,\r\n \"requeueCount\": 0\r\n },\r\n \"nodeInfo\": {\r\n \"affinityId\": \"TVM:tvmps_119b2561f9c0ec9b50ca623643b7616beb79fd984af46c90d7b8532e23640f7c_d\",\r\n \"nodeUrl\": \"https://billstestba24326.uksouth.batch.azure.com/pools/mpiPool/nodes/tvmps_119b2561f9c0ec9b50ca623643b7616beb79fd984af46c90d7b8532e23640f7c_d\",\r\n \"poolId\": \"mpiPool\",\r\n \"nodeId\": \"tvmps_119b2561f9c0ec9b50ca623643b7616beb79fd984af46c90d7b8532e23640f7c_d\",\r\n \"taskRootDirectory\": \"workitems/listSubtaskJob/job-1/testTask\",\r\n \"taskRootDirectoryUrl\": \"https://billstestba24326.uksouth.batch.azure.com/pools/mpiPool/nodes/tvmps_119b2561f9c0ec9b50ca623643b7616beb79fd984af46c90d7b8532e23640f7c_d/files/workitems/listSubtaskJob/job-1/testTask\"\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/jobs/listSubtaskJob/tasks?api-version=2023-05-01.17.0&$filter=id%20eq%20%27testTask%27&$select=id%2Cstate", - "EncodedRequestUri": "L2pvYnMvbGlzdFN1YnRhc2tKb2IvdGFza3M/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4wJiRmaWx0ZXI9aWQlMjBlcSUyMCUyN3Rlc3RUYXNrJTI3JiRzZWxlY3Q9aWQlMkNzdGF0ZQ==", + "RequestUri": "/jobs/listSubtaskJob/tasks/testTask?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnMvbGlzdFN1YnRhc2tKb2IvdGFza3MvdGVzdFRhc2s/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "5fc5720b-4a32-427b-84a5-a98842bac805" + "fc34efbf-67e6-4f1d-af14-d6ace3718d20" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:21 GMT" - ], - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", - "AzurePowershell/Az1.0.0" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Transfer-Encoding": [ - "chunked" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "request-id": [ - "8ebf918e-5994-4f49-9ae3-1a2732db3b9d" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "DataServiceVersion": [ - "3.0" - ], - "Date": [ - "Fri, 16 Jun 2023 07:36:22 GMT" + "Fri, 22 Mar 2024 23:50:30 GMT" ], - "Content-Type": [ - "application/json; odata=minimalmetadata" - ] - }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#tasks\",\r\n \"value\": [\r\n {\r\n \"id\": \"testTask\",\r\n \"state\": \"active\"\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/jobs/listSubtaskJob/tasks?api-version=2023-05-01.17.0&$filter=id%20eq%20%27testTask%27&$select=id%2Cstate", - "EncodedRequestUri": "L2pvYnMvbGlzdFN1YnRhc2tKb2IvdGFza3M/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4wJiRmaWx0ZXI9aWQlMjBlcSUyMCUyN3Rlc3RUYXNrJTI3JiRzZWxlY3Q9aWQlMkNzdGF0ZQ==", - "RequestMethod": "GET", - "RequestHeaders": { - "client-request-id": [ - "1e74be99-04f4-4e86-a376-68f2d72d8490" - ], - "Accept-Language": [ - "en-US" - ], - "ocp-date": [ - "Fri, 16 Jun 2023 07:36:23 GMT" + "x-ms-client-request-id": [ + "40f7b982-b25a-4e11-a046-1dc40da80095" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -390,63 +341,14 @@ "Transfer-Encoding": [ "chunked" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "request-id": [ - "f82315cf-197b-4b73-a525-8dcc8cbf56bb" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "DataServiceVersion": [ - "3.0" - ], - "Date": [ - "Fri, 16 Jun 2023 07:36:24 GMT" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata" - ] - }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#tasks\",\r\n \"value\": [\r\n {\r\n \"id\": \"testTask\",\r\n \"state\": \"running\"\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/jobs/listSubtaskJob/tasks?api-version=2023-05-01.17.0&$filter=id%20eq%20%27testTask%27&$select=id%2Cstate", - "EncodedRequestUri": "L2pvYnMvbGlzdFN1YnRhc2tKb2IvdGFza3M/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4wJiRmaWx0ZXI9aWQlMjBlcSUyMCUyN3Rlc3RUYXNrJTI3JiRzZWxlY3Q9aWQlMkNzdGF0ZQ==", - "RequestMethod": "GET", - "RequestHeaders": { - "client-request-id": [ - "b9257007-736e-4518-8401-df0e52bac964" - ], - "Accept-Language": [ - "en-US" - ], - "ocp-date": [ - "Fri, 16 Jun 2023 07:36:26 GMT" - ], - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", - "AzurePowershell/Az1.0.0" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Transfer-Encoding": [ - "chunked" + "ETag": [ + "0x8DC4ACAAC19A835" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "19148526-6338-436e-ac9e-32d98b82c272" + "2dd4c3ff-1e5e-44da-9c12-293053de6d2d" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -458,89 +360,40 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:36:27 GMT" + "Fri, 22 Mar 2024 23:50:30 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" - ] - }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#tasks\",\r\n \"value\": [\r\n {\r\n \"id\": \"testTask\",\r\n \"state\": \"running\"\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/jobs/listSubtaskJob/tasks?api-version=2023-05-01.17.0&$filter=id%20eq%20%27testTask%27&$select=id%2Cstate", - "EncodedRequestUri": "L2pvYnMvbGlzdFN1YnRhc2tKb2IvdGFza3M/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4wJiRmaWx0ZXI9aWQlMjBlcSUyMCUyN3Rlc3RUYXNrJTI3JiRzZWxlY3Q9aWQlMkNzdGF0ZQ==", - "RequestMethod": "GET", - "RequestHeaders": { - "client-request-id": [ - "fea66ea5-37a9-4478-905c-910735007cad" - ], - "Accept-Language": [ - "en-US" - ], - "ocp-date": [ - "Fri, 16 Jun 2023 07:36:28 GMT" - ], - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", - "AzurePowershell/Az1.0.0" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Transfer-Encoding": [ - "chunked" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "request-id": [ - "1997b5cb-d3da-414c-ba0d-3c6a354a0459" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "DataServiceVersion": [ - "3.0" ], - "Date": [ - "Fri, 16 Jun 2023 07:36:29 GMT" - ], - "Content-Type": [ - "application/json; odata=minimalmetadata" + "Last-Modified": [ + "Fri, 22 Mar 2024 23:49:11 GMT" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#tasks\",\r\n \"value\": [\r\n {\r\n \"id\": \"testTask\",\r\n \"state\": \"completed\"\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#tasks/@Element\",\r\n \"id\": \"testTask\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/listSubtaskJob/tasks/testTask\",\r\n \"eTag\": \"0x8DC4ACAAC19A835\",\r\n \"creationTime\": \"2024-03-22T23:49:11.0979637Z\",\r\n \"lastModified\": \"2024-03-22T23:49:11.0979637Z\",\r\n \"state\": \"completed\",\r\n \"stateTransitionTime\": \"2024-03-22T23:49:50.434408Z\",\r\n \"previousState\": \"running\",\r\n \"previousStateTransitionTime\": \"2024-03-22T23:49:48.240671Z\",\r\n \"commandLine\": \"/bin/bash -c 'echo task'\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"task\",\r\n \"elevationLevel\": \"nonadmin\"\r\n }\r\n },\r\n \"multiInstanceSettings\": {\r\n \"numberOfInstances\": 3,\r\n \"coordinationCommandLine\": \"/bin/bash -c 'echo coordinating'\"\r\n },\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"retentionTime\": \"P7D\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"requiredSlots\": 1,\r\n \"executionInfo\": {\r\n \"startTime\": \"2024-03-22T23:49:48.392509Z\",\r\n \"endTime\": \"2024-03-22T23:49:50.434408Z\",\r\n \"exitCode\": 0,\r\n \"result\": \"success\",\r\n \"retryCount\": 0,\r\n \"requeueCount\": 0\r\n },\r\n \"nodeInfo\": {\r\n \"affinityId\": \"TVM:tvmps_119b2561f9c0ec9b50ca623643b7616beb79fd984af46c90d7b8532e23640f7c_d\",\r\n \"nodeUrl\": \"https://billstestba24326.uksouth.batch.azure.com/pools/mpiPool/nodes/tvmps_119b2561f9c0ec9b50ca623643b7616beb79fd984af46c90d7b8532e23640f7c_d\",\r\n \"poolId\": \"mpiPool\",\r\n \"nodeId\": \"tvmps_119b2561f9c0ec9b50ca623643b7616beb79fd984af46c90d7b8532e23640f7c_d\",\r\n \"taskRootDirectory\": \"workitems/listSubtaskJob/job-1/testTask\",\r\n \"taskRootDirectoryUrl\": \"https://billstestba24326.uksouth.batch.azure.com/pools/mpiPool/nodes/tvmps_119b2561f9c0ec9b50ca623643b7616beb79fd984af46c90d7b8532e23640f7c_d/files/workitems/listSubtaskJob/job-1/testTask\"\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/jobs/listSubtaskJob/tasks/testTask/subtasksinfo?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnMvbGlzdFN1YnRhc2tKb2IvdGFza3MvdGVzdFRhc2svc3VidGFza3NpbmZvP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", + "RequestUri": "/jobs/listSubtaskJob/tasks/testTask/subtasksinfo?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnMvbGlzdFN1YnRhc2tKb2IvdGFza3MvdGVzdFRhc2svc3VidGFza3NpbmZvP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "af637a06-4d69-487b-bebe-8cbf61f70edc" + "6667e0f2-0125-4647-b9f8-262fb94adab1" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:28 GMT" + "Fri, 22 Mar 2024 23:50:29 GMT" ], "x-ms-client-request-id": [ - "8b617cff-8f4c-4a95-9fac-bc385c8c3b32" + "45499ada-66e1-472c-a7ae-89a97c6fb3d3" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -553,7 +406,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "632e71b9-a228-410e-b306-3201c12cb877" + "7f3a4013-1e6b-465d-812a-4644767137ff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -565,37 +418,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:36:29 GMT" + "Fri, 22 Mar 2024 23:50:29 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#subtaskinfo\",\r\n \"value\": [\r\n {\r\n \"id\": 1,\r\n \"startTime\": \"2023-06-16T07:36:24.318387Z\",\r\n \"endTime\": \"2023-06-16T07:36:27.494163Z\",\r\n \"state\": \"completed\",\r\n \"stateTransitionTime\": \"2023-06-16T07:36:27.494163Z\",\r\n \"previousState\": \"running\",\r\n \"previousStateTransitionTime\": \"2023-06-16T07:36:24.271435Z\",\r\n \"result\": \"success\",\r\n \"exitCode\": 0,\r\n \"nodeInfo\": {\r\n \"affinityId\": \"TVM:tvmps_408a307be4023aa16359af190282f3df12cf817eb3aa3daab486afa44ac946d2_d\",\r\n \"nodeUrl\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/mpiPool/nodes/tvmps_408a307be4023aa16359af190282f3df12cf817eb3aa3daab486afa44ac946d2_d\",\r\n \"poolId\": \"mpiPool\",\r\n \"nodeId\": \"tvmps_408a307be4023aa16359af190282f3df12cf817eb3aa3daab486afa44ac946d2_d\",\r\n \"taskRootDirectory\": \"workitems\\\\listSubtaskJob\\\\job-1\\\\testTask\",\r\n \"taskRootDirectoryUrl\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/mpiPool/nodes/tvmps_408a307be4023aa16359af190282f3df12cf817eb3aa3daab486afa44ac946d2_d/files/workitems/listSubtaskJob/job-1/testTask\"\r\n }\r\n },\r\n {\r\n \"id\": 2,\r\n \"startTime\": \"2023-06-16T07:36:24.266891Z\",\r\n \"endTime\": \"2023-06-16T07:36:27.453761Z\",\r\n \"state\": \"completed\",\r\n \"stateTransitionTime\": \"2023-06-16T07:36:27.453761Z\",\r\n \"previousState\": \"running\",\r\n \"previousStateTransitionTime\": \"2023-06-16T07:36:24.235575Z\",\r\n \"result\": \"success\",\r\n \"exitCode\": 0,\r\n \"nodeInfo\": {\r\n \"affinityId\": \"TVM:tvmps_a457dabee5607c24eeefaba88c91798a9699c67f2bbb2d804a1fde3e2ceb9be7_d\",\r\n \"nodeUrl\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/mpiPool/nodes/tvmps_a457dabee5607c24eeefaba88c91798a9699c67f2bbb2d804a1fde3e2ceb9be7_d\",\r\n \"poolId\": \"mpiPool\",\r\n \"nodeId\": \"tvmps_a457dabee5607c24eeefaba88c91798a9699c67f2bbb2d804a1fde3e2ceb9be7_d\",\r\n \"taskRootDirectory\": \"workitems\\\\listSubtaskJob\\\\job-1\\\\testTask\",\r\n \"taskRootDirectoryUrl\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/mpiPool/nodes/tvmps_a457dabee5607c24eeefaba88c91798a9699c67f2bbb2d804a1fde3e2ceb9be7_d/files/workitems/listSubtaskJob/job-1/testTask\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#subtaskinfo\",\r\n \"value\": [\r\n {\r\n \"id\": 1,\r\n \"startTime\": \"2024-03-22T23:49:48.333215Z\",\r\n \"endTime\": \"2024-03-22T23:49:50.426838Z\",\r\n \"state\": \"completed\",\r\n \"stateTransitionTime\": \"2024-03-22T23:49:50.426838Z\",\r\n \"previousState\": \"running\",\r\n \"previousStateTransitionTime\": \"2024-03-22T23:49:48.201914Z\",\r\n \"result\": \"success\",\r\n \"exitCode\": 0,\r\n \"nodeInfo\": {\r\n \"affinityId\": \"TVM:tvmps_602f01a548decb4e923fdc4b4fb6e16caedd7054ae9f9f61570b2962a70e1e21_d\",\r\n \"nodeUrl\": \"https://billstestba24326.uksouth.batch.azure.com/pools/mpiPool/nodes/tvmps_602f01a548decb4e923fdc4b4fb6e16caedd7054ae9f9f61570b2962a70e1e21_d\",\r\n \"poolId\": \"mpiPool\",\r\n \"nodeId\": \"tvmps_602f01a548decb4e923fdc4b4fb6e16caedd7054ae9f9f61570b2962a70e1e21_d\",\r\n \"taskRootDirectory\": \"workitems/listSubtaskJob/job-1/testTask\",\r\n \"taskRootDirectoryUrl\": \"https://billstestba24326.uksouth.batch.azure.com/pools/mpiPool/nodes/tvmps_602f01a548decb4e923fdc4b4fb6e16caedd7054ae9f9f61570b2962a70e1e21_d/files/workitems/listSubtaskJob/job-1/testTask\"\r\n }\r\n },\r\n {\r\n \"id\": 2,\r\n \"startTime\": \"2024-03-22T23:49:48.380691Z\",\r\n \"endTime\": \"2024-03-22T23:49:50.447281Z\",\r\n \"state\": \"completed\",\r\n \"stateTransitionTime\": \"2024-03-22T23:49:50.447281Z\",\r\n \"previousState\": \"running\",\r\n \"previousStateTransitionTime\": \"2024-03-22T23:49:48.234939Z\",\r\n \"result\": \"success\",\r\n \"exitCode\": 0,\r\n \"nodeInfo\": {\r\n \"affinityId\": \"TVM:tvmps_3800f997709d7452eee56790b42f8f686b2108a4c1b4b181e8cee96600dfe239_d\",\r\n \"nodeUrl\": \"https://billstestba24326.uksouth.batch.azure.com/pools/mpiPool/nodes/tvmps_3800f997709d7452eee56790b42f8f686b2108a4c1b4b181e8cee96600dfe239_d\",\r\n \"poolId\": \"mpiPool\",\r\n \"nodeId\": \"tvmps_3800f997709d7452eee56790b42f8f686b2108a4c1b4b181e8cee96600dfe239_d\",\r\n \"taskRootDirectory\": \"workitems/listSubtaskJob/job-1/testTask\",\r\n \"taskRootDirectoryUrl\": \"https://billstestba24326.uksouth.batch.azure.com/pools/mpiPool/nodes/tvmps_3800f997709d7452eee56790b42f8f686b2108a4c1b4b181e8cee96600dfe239_d/files/workitems/listSubtaskJob/job-1/testTask\"\r\n }\r\n }\r\n ]\r\n}", "StatusCode": 200 }, { - "RequestUri": "/jobs/listSubtaskJob/tasks/testTask/subtasksinfo?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnMvbGlzdFN1YnRhc2tKb2IvdGFza3MvdGVzdFRhc2svc3VidGFza3NpbmZvP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", + "RequestUri": "/jobs/listSubtaskJob/tasks/testTask/subtasksinfo?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnMvbGlzdFN1YnRhc2tKb2IvdGFza3MvdGVzdFRhc2svc3VidGFza3NpbmZvP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "c308e6e3-f8cd-416a-8c16-891fd2b0f334" + "b0089f73-7de8-4534-b155-99847ff0534e" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:29 GMT" + "Fri, 22 Mar 2024 23:50:30 GMT" ], "x-ms-client-request-id": [ - "f374870a-1fd0-4e08-8687-153567a6da74" + "40f7b982-b25a-4e11-a046-1dc40da80095" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -608,7 +461,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "6e5240a7-6d9b-4db5-9552-00793a64d8d4" + "71552813-f9b0-4bfb-8445-029a2390872a" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -620,34 +473,34 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:36:30 GMT" + "Fri, 22 Mar 2024 23:50:30 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#subtaskinfo\",\r\n \"value\": [\r\n {\r\n \"id\": 1,\r\n \"startTime\": \"2023-06-16T07:36:24.318387Z\",\r\n \"endTime\": \"2023-06-16T07:36:27.494163Z\",\r\n \"state\": \"completed\",\r\n \"stateTransitionTime\": \"2023-06-16T07:36:27.494163Z\",\r\n \"previousState\": \"running\",\r\n \"previousStateTransitionTime\": \"2023-06-16T07:36:24.271435Z\",\r\n \"result\": \"success\",\r\n \"exitCode\": 0,\r\n \"nodeInfo\": {\r\n \"affinityId\": \"TVM:tvmps_408a307be4023aa16359af190282f3df12cf817eb3aa3daab486afa44ac946d2_d\",\r\n \"nodeUrl\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/mpiPool/nodes/tvmps_408a307be4023aa16359af190282f3df12cf817eb3aa3daab486afa44ac946d2_d\",\r\n \"poolId\": \"mpiPool\",\r\n \"nodeId\": \"tvmps_408a307be4023aa16359af190282f3df12cf817eb3aa3daab486afa44ac946d2_d\",\r\n \"taskRootDirectory\": \"workitems\\\\listSubtaskJob\\\\job-1\\\\testTask\",\r\n \"taskRootDirectoryUrl\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/mpiPool/nodes/tvmps_408a307be4023aa16359af190282f3df12cf817eb3aa3daab486afa44ac946d2_d/files/workitems/listSubtaskJob/job-1/testTask\"\r\n }\r\n },\r\n {\r\n \"id\": 2,\r\n \"startTime\": \"2023-06-16T07:36:24.266891Z\",\r\n \"endTime\": \"2023-06-16T07:36:27.453761Z\",\r\n \"state\": \"completed\",\r\n \"stateTransitionTime\": \"2023-06-16T07:36:27.453761Z\",\r\n \"previousState\": \"running\",\r\n \"previousStateTransitionTime\": \"2023-06-16T07:36:24.235575Z\",\r\n \"result\": \"success\",\r\n \"exitCode\": 0,\r\n \"nodeInfo\": {\r\n \"affinityId\": \"TVM:tvmps_a457dabee5607c24eeefaba88c91798a9699c67f2bbb2d804a1fde3e2ceb9be7_d\",\r\n \"nodeUrl\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/mpiPool/nodes/tvmps_a457dabee5607c24eeefaba88c91798a9699c67f2bbb2d804a1fde3e2ceb9be7_d\",\r\n \"poolId\": \"mpiPool\",\r\n \"nodeId\": \"tvmps_a457dabee5607c24eeefaba88c91798a9699c67f2bbb2d804a1fde3e2ceb9be7_d\",\r\n \"taskRootDirectory\": \"workitems\\\\listSubtaskJob\\\\job-1\\\\testTask\",\r\n \"taskRootDirectoryUrl\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/mpiPool/nodes/tvmps_a457dabee5607c24eeefaba88c91798a9699c67f2bbb2d804a1fde3e2ceb9be7_d/files/workitems/listSubtaskJob/job-1/testTask\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#subtaskinfo\",\r\n \"value\": [\r\n {\r\n \"id\": 1,\r\n \"startTime\": \"2024-03-22T23:49:48.333215Z\",\r\n \"endTime\": \"2024-03-22T23:49:50.426838Z\",\r\n \"state\": \"completed\",\r\n \"stateTransitionTime\": \"2024-03-22T23:49:50.426838Z\",\r\n \"previousState\": \"running\",\r\n \"previousStateTransitionTime\": \"2024-03-22T23:49:48.201914Z\",\r\n \"result\": \"success\",\r\n \"exitCode\": 0,\r\n \"nodeInfo\": {\r\n \"affinityId\": \"TVM:tvmps_602f01a548decb4e923fdc4b4fb6e16caedd7054ae9f9f61570b2962a70e1e21_d\",\r\n \"nodeUrl\": \"https://billstestba24326.uksouth.batch.azure.com/pools/mpiPool/nodes/tvmps_602f01a548decb4e923fdc4b4fb6e16caedd7054ae9f9f61570b2962a70e1e21_d\",\r\n \"poolId\": \"mpiPool\",\r\n \"nodeId\": \"tvmps_602f01a548decb4e923fdc4b4fb6e16caedd7054ae9f9f61570b2962a70e1e21_d\",\r\n \"taskRootDirectory\": \"workitems/listSubtaskJob/job-1/testTask\",\r\n \"taskRootDirectoryUrl\": \"https://billstestba24326.uksouth.batch.azure.com/pools/mpiPool/nodes/tvmps_602f01a548decb4e923fdc4b4fb6e16caedd7054ae9f9f61570b2962a70e1e21_d/files/workitems/listSubtaskJob/job-1/testTask\"\r\n }\r\n },\r\n {\r\n \"id\": 2,\r\n \"startTime\": \"2024-03-22T23:49:48.380691Z\",\r\n \"endTime\": \"2024-03-22T23:49:50.447281Z\",\r\n \"state\": \"completed\",\r\n \"stateTransitionTime\": \"2024-03-22T23:49:50.447281Z\",\r\n \"previousState\": \"running\",\r\n \"previousStateTransitionTime\": \"2024-03-22T23:49:48.234939Z\",\r\n \"result\": \"success\",\r\n \"exitCode\": 0,\r\n \"nodeInfo\": {\r\n \"affinityId\": \"TVM:tvmps_3800f997709d7452eee56790b42f8f686b2108a4c1b4b181e8cee96600dfe239_d\",\r\n \"nodeUrl\": \"https://billstestba24326.uksouth.batch.azure.com/pools/mpiPool/nodes/tvmps_3800f997709d7452eee56790b42f8f686b2108a4c1b4b181e8cee96600dfe239_d\",\r\n \"poolId\": \"mpiPool\",\r\n \"nodeId\": \"tvmps_3800f997709d7452eee56790b42f8f686b2108a4c1b4b181e8cee96600dfe239_d\",\r\n \"taskRootDirectory\": \"workitems/listSubtaskJob/job-1/testTask\",\r\n \"taskRootDirectoryUrl\": \"https://billstestba24326.uksouth.batch.azure.com/pools/mpiPool/nodes/tvmps_3800f997709d7452eee56790b42f8f686b2108a4c1b4b181e8cee96600dfe239_d/files/workitems/listSubtaskJob/job-1/testTask\"\r\n }\r\n }\r\n ]\r\n}", "StatusCode": 200 }, { - "RequestUri": "/jobs/listSubtaskJob?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnMvbGlzdFN1YnRhc2tKb2I/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/jobs/listSubtaskJob?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnMvbGlzdFN1YnRhc2tKb2I/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "DELETE", "RequestHeaders": { "client-request-id": [ - "761bba9e-2109-49f3-8a57-d9ed5823eb82" + "bfb678fe-b482-484e-991b-9cd1bc1e4655" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:29 GMT" + "Fri, 22 Mar 2024 23:50:31 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Length": [ @@ -663,7 +516,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "bd9cda02-fe58-49a9-814d-8f20c26edb1b" + "f391274b-f9ca-4d36-9aa2-fcefb35b306f" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -675,7 +528,7 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:36:30 GMT" + "Fri, 22 Mar 2024 23:50:31 GMT" ] }, "ResponseBody": "", @@ -684,9 +537,9 @@ ], "Names": {}, "Variables": { - "SubscriptionId": "21abd678-18c5-4660-9fdd-8c5ba6b6fe1f", - "AZURE_BATCH_ACCOUNT": "hoppeeastasia2", - "AZURE_BATCH_ENDPOINT": "https://hoppeeastasia2.eastasia.batch.azure.com", - "AZURE_BATCH_RESOURCE_GROUP": "123" + "SubscriptionId": "6602ac9a-5dad-41bd-a792-592c704b6a31", + "AZURE_BATCH_ACCOUNT": "billstestba24326", + "AZURE_BATCH_ENDPOINT": "https://billstestba24326.uksouth.batch.azure.com", + "AZURE_BATCH_RESOURCE_GROUP": "automation" } } \ No newline at end of file diff --git a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.TaskTests/TestTaskCRUD.json b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.TaskTests/TestTaskCRUD.json index 6448f557fa6e..45982ba24314 100644 --- a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.TaskTests/TestTaskCRUD.json +++ b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.TaskTests/TestTaskCRUD.json @@ -1,24 +1,24 @@ { "Entries": [ { - "RequestUri": "/jobs?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "0e657765-ad9a-47ae-9950-7eaacf6e80d8" + "6646237d-a079-49b8-9a97-809664d9c592" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:30 GMT" + "Thu, 21 Mar 2024 23:08:00 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Type": [ @@ -34,16 +34,16 @@ "chunked" ], "ETag": [ - "0x8DB6E3C67FE93E4" + "0x8DC49FBC19B0826" ], "Location": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/jobs/job-1" + "https://billstestba24326.uksouth.batch.azure.com/jobs/job-1" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "693dc710-f1f3-4b3c-8bea-44330430c9ed" + "e70125ce-11ae-4b4c-a4f0-54e6f5a669fa" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -55,40 +55,40 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/jobs/job-1" + "https://billstestba24326.uksouth.batch.azure.com/jobs/job-1" ], "Date": [ - "Fri, 16 Jun 2023 07:36:31 GMT" + "Thu, 21 Mar 2024 23:08:00 GMT" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:36:32 GMT" + "Thu, 21 Mar 2024 23:08:01 GMT" ] }, "ResponseBody": "", "StatusCode": 201 }, { - "RequestUri": "/jobs/taskCrudJob/tasks?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnMvdGFza0NydWRKb2IvdGFza3M/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/jobs/taskCrudJob/tasks?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnMvdGFza0NydWRKb2IvdGFza3M/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "c978ab92-79c7-4f6f-bbde-f72b04dedbb1" + "5faea39d-7427-44d8-b20e-c57f27de2993" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:31 GMT" + "Thu, 21 Mar 2024 23:08:01 GMT" ], "x-ms-client-request-id": [ - "9486453e-380b-4516-83b7-72d2e7bf4445" + "ec373397-2fcf-4164-a0a8-db9303cadabb" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Type": [ @@ -104,16 +104,16 @@ "chunked" ], "ETag": [ - "0x8DB6E3C68793923" + "0x8DC49FBC2444BF4" ], "Location": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/jobs/taskCrudJob/tasks/task1" + "https://billstestba24326.uksouth.batch.azure.com/jobs/taskCrudJob/tasks/task1" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "aee62df0-b624-4944-b77c-bcf25fc90a58" + "92b69b89-1d0d-4067-9eb9-dc146d99e7b4" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -125,40 +125,40 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/jobs/taskCrudJob/tasks/task1" + "https://billstestba24326.uksouth.batch.azure.com/jobs/taskCrudJob/tasks/task1" ], "Date": [ - "Fri, 16 Jun 2023 07:36:32 GMT" + "Thu, 21 Mar 2024 23:08:02 GMT" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:36:33 GMT" + "Thu, 21 Mar 2024 23:08:02 GMT" ] }, "ResponseBody": "", "StatusCode": 201 }, { - "RequestUri": "/jobs/taskCrudJob/tasks?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnMvdGFza0NydWRKb2IvdGFza3M/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/jobs/taskCrudJob/tasks?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnMvdGFza0NydWRKb2IvdGFza3M/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "3049d369-7290-4ce5-a8f9-fecf5f681ad9" + "bd6aa7dc-2991-40a8-8ca8-669656130fa1" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:32 GMT" + "Thu, 21 Mar 2024 23:08:02 GMT" ], "x-ms-client-request-id": [ - "20a95529-3139-4b6d-a2c7-c4b76da2681e" + "9ff026bb-2564-4952-8834-5de19e047522" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Type": [ @@ -174,16 +174,16 @@ "chunked" ], "ETag": [ - "0x8DB6E3C688BC3AC" + "0x8DC49FBC268EB7C" ], "Location": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/jobs/taskCrudJob/tasks/task2" + "https://billstestba24326.uksouth.batch.azure.com/jobs/taskCrudJob/tasks/task2" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "e8a00233-4705-4baa-9504-4e3ca493e920" + "a47cc241-a89c-4c5d-a423-19548ef2f838" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -195,40 +195,40 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/jobs/taskCrudJob/tasks/task2" + "https://billstestba24326.uksouth.batch.azure.com/jobs/taskCrudJob/tasks/task2" ], "Date": [ - "Fri, 16 Jun 2023 07:36:33 GMT" + "Thu, 21 Mar 2024 23:08:02 GMT" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:36:33 GMT" + "Thu, 21 Mar 2024 23:08:02 GMT" ] }, "ResponseBody": "", "StatusCode": 201 }, { - "RequestUri": "/jobs/taskCrudJob/tasks?api-version=2023-05-01.17.0&$filter=id%20eq%20%27task1%27%20or%20id%20eq%20%27task2%27", - "EncodedRequestUri": "L2pvYnMvdGFza0NydWRKb2IvdGFza3M/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4wJiRmaWx0ZXI9aWQlMjBlcSUyMCUyN3Rhc2sxJTI3JTIwb3IlMjBpZCUyMGVxJTIwJTI3dGFzazIlMjc=", + "RequestUri": "/jobs/taskCrudJob/tasks?api-version=2024-02-01.19.0&$filter=id%20eq%20%27task1%27%20or%20id%20eq%20%27task2%27", + "EncodedRequestUri": "L2pvYnMvdGFza0NydWRKb2IvdGFza3M/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4wJiRmaWx0ZXI9aWQlMjBlcSUyMCUyN3Rhc2sxJTI3JTIwb3IlMjBpZCUyMGVxJTIwJTI3dGFzazIlMjc=", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "1e45b0e0-5e3b-419d-a70d-29b90ce1767b" + "545b4e4c-c4f3-464e-bcfa-b09c4e339641" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:32 GMT" + "Thu, 21 Mar 2024 23:08:02 GMT" ], "x-ms-client-request-id": [ - "17c1f118-5679-409a-8cc4-4f8ccacd9380" + "bae1d17e-3af0-4916-b6ef-60767440c8d2" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -241,7 +241,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "73ab8903-7dac-4474-9a20-6c869b690d9a" + "f86608d7-01cf-40c0-963a-b2450c55755a" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -253,37 +253,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:36:33 GMT" + "Thu, 21 Mar 2024 23:08:02 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#tasks\",\r\n \"value\": [\r\n {\r\n \"id\": \"task1\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobs/taskCrudJob/tasks/task1\",\r\n \"eTag\": \"0x8DB6E3C68793923\",\r\n \"creationTime\": \"2023-06-16T07:36:33.2925219Z\",\r\n \"lastModified\": \"2023-06-16T07:36:33.2925219Z\",\r\n \"state\": \"running\",\r\n \"stateTransitionTime\": \"2023-06-16T07:36:33.45152Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2023-06-16T07:36:33.45152Z\",\r\n \"commandLine\": \"cmd /c echo task1\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"pool\",\r\n \"elevationLevel\": \"nonadmin\"\r\n }\r\n },\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"retentionTime\": \"P7D\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"requiredSlots\": 1,\r\n \"executionInfo\": {\r\n \"startTime\": \"2023-06-16T07:36:33.45152Z\",\r\n \"retryCount\": 0,\r\n \"requeueCount\": 0\r\n },\r\n \"nodeInfo\": {\r\n \"affinityId\": \"TVM:tvmps_c3cdeb8c344b8b5cca4c1052f8fd5c239f09cffd64837afc6cbb2e073e15dab3_d\",\r\n \"nodeUrl\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/testPool/nodes/tvmps_c3cdeb8c344b8b5cca4c1052f8fd5c239f09cffd64837afc6cbb2e073e15dab3_d\",\r\n \"poolId\": \"testPool\",\r\n \"nodeId\": \"tvmps_c3cdeb8c344b8b5cca4c1052f8fd5c239f09cffd64837afc6cbb2e073e15dab3_d\"\r\n }\r\n },\r\n {\r\n \"id\": \"task2\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobs/taskCrudJob/tasks/task2\",\r\n \"eTag\": \"0x8DB6E3C688BC3AC\",\r\n \"creationTime\": \"2023-06-16T07:36:33.4140332Z\",\r\n \"lastModified\": \"2023-06-16T07:36:33.4140332Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:36:33.4140332Z\",\r\n \"commandLine\": \"cmd /c echo task2\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"pool\",\r\n \"elevationLevel\": \"nonadmin\"\r\n }\r\n },\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"retentionTime\": \"P7D\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"requiredSlots\": 1,\r\n \"executionInfo\": {\r\n \"retryCount\": 0,\r\n \"requeueCount\": 0\r\n }\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#tasks\",\r\n \"value\": [\r\n {\r\n \"id\": \"task1\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/taskCrudJob/tasks/task1\",\r\n \"eTag\": \"0x8DC49FBC2444BF4\",\r\n \"creationTime\": \"2024-03-21T23:08:02.4642548Z\",\r\n \"lastModified\": \"2024-03-21T23:08:02.4642548Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-21T23:08:02.4642548Z\",\r\n \"commandLine\": \"cmd /c echo task1\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"pool\",\r\n \"elevationLevel\": \"nonadmin\"\r\n }\r\n },\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"retentionTime\": \"P7D\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"requiredSlots\": 1,\r\n \"executionInfo\": {\r\n \"retryCount\": 0,\r\n \"requeueCount\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"task2\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/taskCrudJob/tasks/task2\",\r\n \"eTag\": \"0x8DC49FBC268EB7C\",\r\n \"creationTime\": \"2024-03-21T23:08:02.7042684Z\",\r\n \"lastModified\": \"2024-03-21T23:08:02.7042684Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-21T23:08:02.7042684Z\",\r\n \"commandLine\": \"cmd /c echo task2\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"pool\",\r\n \"elevationLevel\": \"nonadmin\"\r\n }\r\n },\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"retentionTime\": \"P7D\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"requiredSlots\": 1,\r\n \"executionInfo\": {\r\n \"retryCount\": 0,\r\n \"requeueCount\": 0\r\n }\r\n }\r\n ]\r\n}", "StatusCode": 200 }, { - "RequestUri": "/jobs/taskCrudJob/tasks/task2?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnMvdGFza0NydWRKb2IvdGFza3MvdGFzazI/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/jobs/taskCrudJob/tasks/task2?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnMvdGFza0NydWRKb2IvdGFza3MvdGFzazI/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "PUT", "RequestHeaders": { "client-request-id": [ - "edcd39bf-1956-4d97-8a69-aebc79b13759" + "99df43ea-1a48-4d23-a85b-e08444ed48e5" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:32 GMT" + "Thu, 21 Mar 2024 23:08:02 GMT" ], "x-ms-client-request-id": [ - "3fb0547c-04a9-454a-a7b4-f1466761ff6c" + "f20e3c5c-f38b-44f9-9f3e-f005d4dea2ca" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Type": [ @@ -299,13 +299,13 @@ "chunked" ], "ETag": [ - "0x8DB6E3C68BC8F60" + "0x8DC49FBC2BB2A70" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "d0e7a5c7-59eb-4d3c-805f-eb10a52a3393" + "08f983cd-fc25-4716-b8a3-f87d9c5939dd" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -317,40 +317,40 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/jobs/taskCrudJob/tasks/task2" + "https://billstestba24326.uksouth.batch.azure.com/jobs/taskCrudJob/tasks/task2" ], "Date": [ - "Fri, 16 Jun 2023 07:36:33 GMT" + "Thu, 21 Mar 2024 23:08:03 GMT" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:36:33 GMT" + "Thu, 21 Mar 2024 23:08:03 GMT" ] }, "ResponseBody": "", "StatusCode": 200 }, { - "RequestUri": "/jobs/taskCrudJob/tasks/task2?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnMvdGFza0NydWRKb2IvdGFza3MvdGFzazI/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/jobs/taskCrudJob/tasks/task2?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnMvdGFza0NydWRKb2IvdGFza3MvdGFzazI/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "66b8b980-a5ad-4487-a631-a91345f9e7e1" + "5fd4a368-5847-4b6f-861d-908be393c07e" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:32 GMT" + "Thu, 21 Mar 2024 23:08:03 GMT" ], "x-ms-client-request-id": [ - "0f3b5ea9-dc92-467a-9e1b-80db212be827" + "92f95cf5-8634-4fc2-8f6c-0b3417424bac" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -360,13 +360,13 @@ "chunked" ], "ETag": [ - "0x8DB6E3C68BC8F60" + "0x8DC49FBC2BB2A70" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "5c922a16-8bd7-481c-a7dc-136ca91e422f" + "96bfb155-8100-4097-8f38-970dd73bb575" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -378,40 +378,40 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:36:33 GMT" + "Thu, 21 Mar 2024 23:08:03 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:36:33 GMT" + "Thu, 21 Mar 2024 23:08:03 GMT" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#tasks/@Element\",\r\n \"id\": \"task2\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobs/taskCrudJob/tasks/task2\",\r\n \"eTag\": \"0x8DB6E3C68BC8F60\",\r\n \"creationTime\": \"2023-06-16T07:36:33.4140332Z\",\r\n \"lastModified\": \"2023-06-16T07:36:33.7338208Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:36:33.4140332Z\",\r\n \"commandLine\": \"cmd /c echo task2\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"pool\",\r\n \"elevationLevel\": \"nonadmin\"\r\n }\r\n },\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"retentionTime\": \"P7D\",\r\n \"maxTaskRetryCount\": 3\r\n },\r\n \"requiredSlots\": 1,\r\n \"executionInfo\": {\r\n \"retryCount\": 0,\r\n \"requeueCount\": 0\r\n }\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#tasks/@Element\",\r\n \"id\": \"task2\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/taskCrudJob/tasks/task2\",\r\n \"eTag\": \"0x8DC49FBC2BB2A70\",\r\n \"creationTime\": \"2024-03-21T23:08:02.7042684Z\",\r\n \"lastModified\": \"2024-03-21T23:08:03.2432752Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-21T23:08:02.7042684Z\",\r\n \"commandLine\": \"cmd /c echo task2\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"pool\",\r\n \"elevationLevel\": \"nonadmin\"\r\n }\r\n },\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"retentionTime\": \"P7D\",\r\n \"maxTaskRetryCount\": 3\r\n },\r\n \"requiredSlots\": 1,\r\n \"executionInfo\": {\r\n \"retryCount\": 0,\r\n \"requeueCount\": 0\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/jobs/taskCrudJob/tasks?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnMvdGFza0NydWRKb2IvdGFza3M/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/jobs/taskCrudJob/tasks?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnMvdGFza0NydWRKb2IvdGFza3M/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "cb0df9a2-9ffe-4184-981b-5de461007a84" + "7b18c400-f407-4f8c-a853-c846782817b1" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:32 GMT" + "Thu, 21 Mar 2024 23:08:03 GMT" ], "x-ms-client-request-id": [ - "8c602c3e-7c1e-459a-9e78-ed75c6760fa1" + "e8a36288-1e2f-4ecc-9d96-a718c2bf3214" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -424,7 +424,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "87cef695-30df-438f-a18a-e7a5e89e3f43" + "a10c2d71-0b22-4e46-89f8-3685de616f90" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -436,37 +436,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:36:33 GMT" + "Thu, 21 Mar 2024 23:08:03 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#tasks\",\r\n \"value\": [\r\n {\r\n \"id\": \"task1\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobs/taskCrudJob/tasks/task1\",\r\n \"eTag\": \"0x8DB6E3C68793923\",\r\n \"creationTime\": \"2023-06-16T07:36:33.2925219Z\",\r\n \"lastModified\": \"2023-06-16T07:36:33.2925219Z\",\r\n \"state\": \"completed\",\r\n \"stateTransitionTime\": \"2023-06-16T07:36:33.607722Z\",\r\n \"previousState\": \"running\",\r\n \"previousStateTransitionTime\": \"2023-06-16T07:36:33.45152Z\",\r\n \"commandLine\": \"cmd /c echo task1\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"pool\",\r\n \"elevationLevel\": \"nonadmin\"\r\n }\r\n },\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"retentionTime\": \"P7D\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"requiredSlots\": 1,\r\n \"executionInfo\": {\r\n \"startTime\": \"2023-06-16T07:36:33.529595Z\",\r\n \"endTime\": \"2023-06-16T07:36:33.607722Z\",\r\n \"exitCode\": 0,\r\n \"result\": \"success\",\r\n \"retryCount\": 0,\r\n \"requeueCount\": 0\r\n },\r\n \"nodeInfo\": {\r\n \"affinityId\": \"TVM:tvmps_c3cdeb8c344b8b5cca4c1052f8fd5c239f09cffd64837afc6cbb2e073e15dab3_d\",\r\n \"nodeUrl\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/testPool/nodes/tvmps_c3cdeb8c344b8b5cca4c1052f8fd5c239f09cffd64837afc6cbb2e073e15dab3_d\",\r\n \"poolId\": \"testPool\",\r\n \"nodeId\": \"tvmps_c3cdeb8c344b8b5cca4c1052f8fd5c239f09cffd64837afc6cbb2e073e15dab3_d\",\r\n \"taskRootDirectory\": \"workitems\\\\taskCrudJob\\\\job-1\\\\task1\",\r\n \"taskRootDirectoryUrl\": \"https://hoppeeastasia2.eastasia.batch.azure.com/pools/testPool/nodes/tvmps_c3cdeb8c344b8b5cca4c1052f8fd5c239f09cffd64837afc6cbb2e073e15dab3_d/files/workitems/taskCrudJob/job-1/task1\"\r\n }\r\n },\r\n {\r\n \"id\": \"task2\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobs/taskCrudJob/tasks/task2\",\r\n \"eTag\": \"0x8DB6E3C68BC8F60\",\r\n \"creationTime\": \"2023-06-16T07:36:33.4140332Z\",\r\n \"lastModified\": \"2023-06-16T07:36:33.7338208Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:36:33.4140332Z\",\r\n \"commandLine\": \"cmd /c echo task2\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"pool\",\r\n \"elevationLevel\": \"nonadmin\"\r\n }\r\n },\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"retentionTime\": \"P7D\",\r\n \"maxTaskRetryCount\": 3\r\n },\r\n \"requiredSlots\": 1,\r\n \"executionInfo\": {\r\n \"retryCount\": 0,\r\n \"requeueCount\": 0\r\n }\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#tasks\",\r\n \"value\": [\r\n {\r\n \"id\": \"task1\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/taskCrudJob/tasks/task1\",\r\n \"eTag\": \"0x8DC49FBC2444BF4\",\r\n \"creationTime\": \"2024-03-21T23:08:02.4642548Z\",\r\n \"lastModified\": \"2024-03-21T23:08:02.4642548Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-21T23:08:02.4642548Z\",\r\n \"commandLine\": \"cmd /c echo task1\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"pool\",\r\n \"elevationLevel\": \"nonadmin\"\r\n }\r\n },\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"retentionTime\": \"P7D\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"requiredSlots\": 1,\r\n \"executionInfo\": {\r\n \"retryCount\": 0,\r\n \"requeueCount\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"task2\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/taskCrudJob/tasks/task2\",\r\n \"eTag\": \"0x8DC49FBC2BB2A70\",\r\n \"creationTime\": \"2024-03-21T23:08:02.7042684Z\",\r\n \"lastModified\": \"2024-03-21T23:08:03.2432752Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-21T23:08:02.7042684Z\",\r\n \"commandLine\": \"cmd /c echo task2\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"pool\",\r\n \"elevationLevel\": \"nonadmin\"\r\n }\r\n },\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"retentionTime\": \"P7D\",\r\n \"maxTaskRetryCount\": 3\r\n },\r\n \"requiredSlots\": 1,\r\n \"executionInfo\": {\r\n \"retryCount\": 0,\r\n \"requeueCount\": 0\r\n }\r\n }\r\n ]\r\n}", "StatusCode": 200 }, { - "RequestUri": "/jobs/taskCrudJob/tasks?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnMvdGFza0NydWRKb2IvdGFza3M/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/jobs/taskCrudJob/tasks?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnMvdGFza0NydWRKb2IvdGFza3M/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "c906368a-074a-42be-8a91-dd23c5e734b6" + "e24572f9-564c-41ec-a3e3-9c4f829e55a1" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:33 GMT" + "Thu, 21 Mar 2024 23:08:03 GMT" ], "x-ms-client-request-id": [ - "bced0ca3-e6a9-468e-b689-31fdebd9f9a5" + "2e015fad-ded1-45cb-b233-6c2478e0b74e" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -479,7 +479,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "4e65a2bb-2edb-47a6-9336-9bf0951c4068" + "9b5bbd2e-5131-4672-9df6-e14233ad64a8" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -491,37 +491,37 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:36:34 GMT" + "Thu, 21 Mar 2024 23:08:04 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#tasks\",\r\n \"value\": []\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#tasks\",\r\n \"value\": []\r\n}", "StatusCode": 200 }, { - "RequestUri": "/jobs/taskCrudJob/tasks/task1?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnMvdGFza0NydWRKb2IvdGFza3MvdGFzazE/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/jobs/taskCrudJob/tasks/task1?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnMvdGFza0NydWRKb2IvdGFza3MvdGFzazE/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "DELETE", "RequestHeaders": { "client-request-id": [ - "bac64e5e-cc82-472e-8c11-d2b206821d4e" + "b2101814-e8cd-48ab-bafa-910ee94245d4" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:32 GMT" + "Thu, 21 Mar 2024 23:08:03 GMT" ], "x-ms-client-request-id": [ - "8c602c3e-7c1e-459a-9e78-ed75c6760fa1" + "e8a36288-1e2f-4ecc-9d96-a718c2bf3214" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Length": [ @@ -537,7 +537,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "c9af59b0-589f-4696-91ca-ef107bfc8e9b" + "60177f5c-9aeb-4788-80ab-0c1763f5334c" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -549,34 +549,34 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:36:33 GMT" + "Thu, 21 Mar 2024 23:08:03 GMT" ] }, "ResponseBody": "", "StatusCode": 200 }, { - "RequestUri": "/jobs/taskCrudJob/tasks/task2?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnMvdGFza0NydWRKb2IvdGFza3MvdGFzazI/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/jobs/taskCrudJob/tasks/task2?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnMvdGFza0NydWRKb2IvdGFza3MvdGFzazI/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "DELETE", "RequestHeaders": { "client-request-id": [ - "814a1b7f-1561-4b77-b8a4-a0a606798765" + "66b3576f-d2c8-4116-b447-9c1ac25014c7" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:33 GMT" + "Thu, 21 Mar 2024 23:08:03 GMT" ], "x-ms-client-request-id": [ - "8c602c3e-7c1e-459a-9e78-ed75c6760fa1" + "e8a36288-1e2f-4ecc-9d96-a718c2bf3214" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Length": [ @@ -592,7 +592,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "6bfb630d-d464-4f66-b9b9-d30c517766a4" + "ab9096c5-c38d-4607-a1d6-c293c69f0eb0" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -604,31 +604,31 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:36:33 GMT" + "Thu, 21 Mar 2024 23:08:04 GMT" ] }, "ResponseBody": "", "StatusCode": 200 }, { - "RequestUri": "/jobs/taskCrudJob?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnMvdGFza0NydWRKb2I/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/jobs/taskCrudJob?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnMvdGFza0NydWRKb2I/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "DELETE", "RequestHeaders": { "client-request-id": [ - "f353edf6-a7c9-4c11-b63c-b32e9ac52355" + "b2071fc7-bf3b-4104-8a4e-2dcd6c12b68a" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:33 GMT" + "Thu, 21 Mar 2024 23:08:04 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Length": [ @@ -644,7 +644,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "015419d3-4a06-44b3-ba05-4cf9fbdd047d" + "a9c89718-b7db-47a5-9215-9286c24ce46f" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -656,7 +656,7 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:36:33 GMT" + "Thu, 21 Mar 2024 23:08:03 GMT" ] }, "ResponseBody": "", @@ -665,9 +665,9 @@ ], "Names": {}, "Variables": { - "SubscriptionId": "21abd678-18c5-4660-9fdd-8c5ba6b6fe1f", - "AZURE_BATCH_ACCOUNT": "hoppeeastasia2", - "AZURE_BATCH_ENDPOINT": "https://hoppeeastasia2.eastasia.batch.azure.com", - "AZURE_BATCH_RESOURCE_GROUP": "123" + "SubscriptionId": "6602ac9a-5dad-41bd-a792-592c704b6a31", + "AZURE_BATCH_ACCOUNT": "billstestba24326", + "AZURE_BATCH_ENDPOINT": "https://billstestba24326.uksouth.batch.azure.com", + "AZURE_BATCH_RESOURCE_GROUP": "automation" } } \ No newline at end of file diff --git a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.TaskTests/TestTerminateTask.json b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.TaskTests/TestTerminateTask.json index 7192b2b8f0d1..56afdb60025f 100644 --- a/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.TaskTests/TestTerminateTask.json +++ b/src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.TaskTests/TestTerminateTask.json @@ -1,24 +1,24 @@ { "Entries": [ { - "RequestUri": "/jobs?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/jobs?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "c3538241-c1d4-4651-a7f6-e97fc6853c76" + "70e80c0c-0f2d-4395-8e2d-048352e755c5" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:35 GMT" + "Thu, 21 Mar 2024 23:08:06 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Type": [ @@ -34,16 +34,16 @@ "chunked" ], "ETag": [ - "0x8DB6E3C6A9DBD7E" + "0x8DC49FBC5326B3F" ], "Location": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/jobs/job-1" + "https://billstestba24326.uksouth.batch.azure.com/jobs/job-1" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "8729c62b-841d-465e-9cfa-f20928e8f3fd" + "cfd94089-2c15-4b19-9f01-af5f7dcb4a5c" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -55,37 +55,37 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/jobs/job-1" + "https://billstestba24326.uksouth.batch.azure.com/jobs/job-1" ], "Date": [ - "Fri, 16 Jun 2023 07:36:35 GMT" + "Thu, 21 Mar 2024 23:08:06 GMT" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:36:36 GMT" + "Thu, 21 Mar 2024 23:08:07 GMT" ] }, "ResponseBody": "", "StatusCode": 201 }, { - "RequestUri": "/jobs/testTerminateTaskJob/tasks?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnMvdGVzdFRlcm1pbmF0ZVRhc2tKb2IvdGFza3M/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/jobs/testTerminateTaskJob/tasks?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnMvdGVzdFRlcm1pbmF0ZVRhc2tKb2IvdGFza3M/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "ec025be2-a2c4-493e-96b3-e85f3e616a6c" + "ddddaf87-4911-488b-85f9-79128a5157c4" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:35 GMT" + "Thu, 21 Mar 2024 23:08:07 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Type": [ @@ -101,16 +101,16 @@ "chunked" ], "ETag": [ - "0x8DB6E3C6AB21B6B" + "0x8DC49FBC5518D63" ], "Location": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/jobs/testTerminateTaskJob/tasks/testTask1" + "https://billstestba24326.uksouth.batch.azure.com/jobs/testTerminateTaskJob/tasks/testTask1" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "33a09eed-3546-4658-a1fe-6c183b050c0e" + "34e86edb-c39d-4186-9dc6-e7b899197ec2" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -122,37 +122,37 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/jobs/testTerminateTaskJob/tasks/testTask1" + "https://billstestba24326.uksouth.batch.azure.com/jobs/testTerminateTaskJob/tasks/testTask1" ], "Date": [ - "Fri, 16 Jun 2023 07:36:36 GMT" + "Thu, 21 Mar 2024 23:08:06 GMT" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:36:37 GMT" + "Thu, 21 Mar 2024 23:08:07 GMT" ] }, "ResponseBody": "", "StatusCode": 201 }, { - "RequestUri": "/jobs/testTerminateTaskJob/tasks?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnMvdGVzdFRlcm1pbmF0ZVRhc2tKb2IvdGFza3M/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/jobs/testTerminateTaskJob/tasks?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnMvdGVzdFRlcm1pbmF0ZVRhc2tKb2IvdGFza3M/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "351a58e0-ec34-40b2-8ef5-fbab7938b8aa" + "7e97cb3a-6765-4983-afa9-26d09b0ba474" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:35 GMT" + "Thu, 21 Mar 2024 23:08:07 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Type": [ @@ -168,16 +168,16 @@ "chunked" ], "ETag": [ - "0x8DB6E3C6AC4B96A" + "0x8DC49FBC56DC7F9" ], "Location": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/jobs/testTerminateTaskJob/tasks/testTask2" + "https://billstestba24326.uksouth.batch.azure.com/jobs/testTerminateTaskJob/tasks/testTask2" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "f31d542b-7c77-43f3-b9a6-3bd37247579e" + "833b7aa5-0a44-4918-bd05-2602c84fb99f" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -189,40 +189,40 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/jobs/testTerminateTaskJob/tasks/testTask2" + "https://billstestba24326.uksouth.batch.azure.com/jobs/testTerminateTaskJob/tasks/testTask2" ], "Date": [ - "Fri, 16 Jun 2023 07:36:36 GMT" + "Thu, 21 Mar 2024 23:08:06 GMT" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:36:37 GMT" + "Thu, 21 Mar 2024 23:08:07 GMT" ] }, "ResponseBody": "", "StatusCode": 201 }, { - "RequestUri": "/jobs/testTerminateTaskJob/tasks/testTask1/terminate?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnMvdGVzdFRlcm1pbmF0ZVRhc2tKb2IvdGFza3MvdGVzdFRhc2sxL3Rlcm1pbmF0ZT9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjA=", + "RequestUri": "/jobs/testTerminateTaskJob/tasks/testTask1/terminate?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnMvdGVzdFRlcm1pbmF0ZVRhc2tKb2IvdGFza3MvdGVzdFRhc2sxL3Rlcm1pbmF0ZT9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "472a80b6-91fc-4d34-957e-fb2ec8fdf058" + "f741d661-a667-4c22-bf5d-0d75c39b7c93" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:36 GMT" + "Thu, 21 Mar 2024 23:08:07 GMT" ], "x-ms-client-request-id": [ - "e6fdcb9f-9475-4f1e-b773-00459903dc7a" + "5b9fc9ec-b58d-40ec-9471-744f3deff27f" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Length": [ @@ -232,13 +232,13 @@ "RequestBody": "", "ResponseHeaders": { "ETag": [ - "0x8DB6E3C6B2F9721" + "0x8DC49FBC60C1937" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "0a564eec-c726-4ebb-b137-3ffe85a17440" + "4a9973f2-6a61-40d9-9dc9-29a56f4a8c20" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -250,43 +250,43 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/jobs/testTerminateTaskJob/tasks/testTask1/terminate" + "https://billstestba24326.uksouth.batch.azure.com/jobs/testTerminateTaskJob/tasks/testTask1/terminate" ], "Date": [ - "Fri, 16 Jun 2023 07:36:37 GMT" + "Thu, 21 Mar 2024 23:08:08 GMT" ], "Content-Length": [ "0" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:36:37 GMT" + "Thu, 21 Mar 2024 23:08:08 GMT" ] }, "ResponseBody": "", "StatusCode": 204 }, { - "RequestUri": "/jobs/testTerminateTaskJob/tasks/testTask2?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnMvdGVzdFRlcm1pbmF0ZVRhc2tKb2IvdGFza3MvdGVzdFRhc2syP2FwaS12ZXJzaW9uPTIwMjMtMDUtMDEuMTcuMA==", + "RequestUri": "/jobs/testTerminateTaskJob/tasks/testTask2?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnMvdGVzdFRlcm1pbmF0ZVRhc2tKb2IvdGFza3MvdGVzdFRhc2syP2FwaS12ZXJzaW9uPTIwMjQtMDItMDEuMTkuMA==", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "26a1e433-f9ba-4211-8ac1-772558d7c4eb" + "d50957ec-e0bc-403a-a240-7534fede07ee" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:36 GMT" + "Thu, 21 Mar 2024 23:08:08 GMT" ], "x-ms-client-request-id": [ - "888e26f2-f0ad-4c50-b2e2-8bf311136335" + "4c4f9a9f-8b18-4d3b-b07d-cec048a2f62e" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -296,13 +296,13 @@ "chunked" ], "ETag": [ - "0x8DB6E3C6AC4B96A" + "0x8DC49FBC56DC7F9" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "f846c04f-e08a-4434-b455-d0d71f933090" + "4def7bb5-7775-4895-adfc-5b52a92dd829" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -314,40 +314,40 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:36:37 GMT" + "Thu, 21 Mar 2024 23:08:08 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:36:37 GMT" + "Thu, 21 Mar 2024 23:08:07 GMT" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#tasks/@Element\",\r\n \"id\": \"testTask2\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobs/testTerminateTaskJob/tasks/testTask2\",\r\n \"eTag\": \"0x8DB6E3C6AC4B96A\",\r\n \"creationTime\": \"2023-06-16T07:36:37.142769Z\",\r\n \"lastModified\": \"2023-06-16T07:36:37.142769Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2023-06-16T07:36:37.142769Z\",\r\n \"commandLine\": \"ping -t localhost -w 60\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"task\",\r\n \"elevationLevel\": \"admin\"\r\n }\r\n },\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"retentionTime\": \"P7D\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"requiredSlots\": 1,\r\n \"executionInfo\": {\r\n \"retryCount\": 0,\r\n \"requeueCount\": 0\r\n }\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#tasks/@Element\",\r\n \"id\": \"testTask2\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testTerminateTaskJob/tasks/testTask2\",\r\n \"eTag\": \"0x8DC49FBC56DC7F9\",\r\n \"creationTime\": \"2024-03-21T23:08:07.7692921Z\",\r\n \"lastModified\": \"2024-03-21T23:08:07.7692921Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2024-03-21T23:08:07.7692921Z\",\r\n \"commandLine\": \"ping -t localhost -w 60\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"task\",\r\n \"elevationLevel\": \"admin\"\r\n }\r\n },\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"retentionTime\": \"P7D\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"requiredSlots\": 1,\r\n \"executionInfo\": {\r\n \"retryCount\": 0,\r\n \"requeueCount\": 0\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/jobs/testTerminateTaskJob/tasks/testTask2/terminate?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnMvdGVzdFRlcm1pbmF0ZVRhc2tKb2IvdGFza3MvdGVzdFRhc2syL3Rlcm1pbmF0ZT9hcGktdmVyc2lvbj0yMDIzLTA1LTAxLjE3LjA=", + "RequestUri": "/jobs/testTerminateTaskJob/tasks/testTask2/terminate?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnMvdGVzdFRlcm1pbmF0ZVRhc2tKb2IvdGFza3MvdGVzdFRhc2syL3Rlcm1pbmF0ZT9hcGktdmVyc2lvbj0yMDI0LTAyLTAxLjE5LjA=", "RequestMethod": "POST", "RequestHeaders": { "client-request-id": [ - "c2167dcb-9044-40c2-8081-d0c8216e0469" + "2e2b3f5f-315b-4148-a63e-c8e476e5a017" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:36 GMT" + "Thu, 21 Mar 2024 23:08:08 GMT" ], "x-ms-client-request-id": [ - "888e26f2-f0ad-4c50-b2e2-8bf311136335" + "4c4f9a9f-8b18-4d3b-b07d-cec048a2f62e" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Length": [ @@ -357,13 +357,13 @@ "RequestBody": "", "ResponseHeaders": { "ETag": [ - "0x8DB6E3C6B587C74" + "0x8DC49FBC6518704" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "52715f78-86e8-4dcc-8bbf-73b7002accb4" + "1da11f03-9fc5-4f50-973b-c09065db27b1" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -375,43 +375,43 @@ "3.0" ], "DataServiceId": [ - "https://hoppeeastasia2.eastasia.batch.azure.com/jobs/testTerminateTaskJob/tasks/testTask2/terminate" + "https://billstestba24326.uksouth.batch.azure.com/jobs/testTerminateTaskJob/tasks/testTask2/terminate" ], "Date": [ - "Fri, 16 Jun 2023 07:36:37 GMT" + "Thu, 21 Mar 2024 23:08:09 GMT" ], "Content-Length": [ "0" ], "Last-Modified": [ - "Fri, 16 Jun 2023 07:36:38 GMT" + "Thu, 21 Mar 2024 23:08:09 GMT" ] }, "ResponseBody": "", "StatusCode": 204 }, { - "RequestUri": "/jobs/testTerminateTaskJob/tasks?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnMvdGVzdFRlcm1pbmF0ZVRhc2tKb2IvdGFza3M/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/jobs/testTerminateTaskJob/tasks?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnMvdGVzdFRlcm1pbmF0ZVRhc2tKb2IvdGFza3M/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "GET", "RequestHeaders": { "client-request-id": [ - "823db13e-c2e4-4967-ad13-61a491163ebd" + "4e9cbc05-8d31-4eb3-9553-c2e05efb595b" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:36 GMT" + "Thu, 21 Mar 2024 23:08:09 GMT" ], "x-ms-client-request-id": [ - "adac30c8-1c32-46a2-acc6-a22d75e86f88" + "423a01f7-9e5d-4857-a08c-9276d461f6ce" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ] }, @@ -424,7 +424,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "e6d6521e-2d49-472b-aa2d-41bd5d83abb5" + "57ca5128-27bc-4d30-9663-a3860004ccad" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -436,34 +436,34 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:36:37 GMT" + "Thu, 21 Mar 2024 23:08:09 GMT" ], "Content-Type": [ "application/json; odata=minimalmetadata" ] }, - "ResponseBody": "{\r\n \"odata.metadata\": \"https://hoppeeastasia2.eastasia.batch.azure.com/$metadata#tasks\",\r\n \"value\": [\r\n {\r\n \"id\": \"testTask1\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobs/testTerminateTaskJob/tasks/testTask1\",\r\n \"eTag\": \"0x8DB6E3C6B2F9721\",\r\n \"creationTime\": \"2023-06-16T07:36:37.0207595Z\",\r\n \"lastModified\": \"2023-06-16T07:36:37.8431265Z\",\r\n \"state\": \"completed\",\r\n \"stateTransitionTime\": \"2023-06-16T07:36:37.8431265Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2023-06-16T07:36:37.0207595Z\",\r\n \"commandLine\": \"ping -t localhost -w 60\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"task\",\r\n \"elevationLevel\": \"admin\"\r\n }\r\n },\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"retentionTime\": \"P7D\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"requiredSlots\": 1,\r\n \"executionInfo\": {\r\n \"endTime\": \"2023-06-16T07:36:37.8431265Z\",\r\n \"failureInfo\": {\r\n \"category\": \"UserError\",\r\n \"code\": \"TaskEnded\",\r\n \"message\": \"Task Was Ended by User Request\"\r\n },\r\n \"result\": \"failure\",\r\n \"retryCount\": 0,\r\n \"requeueCount\": 0\r\n },\r\n \"nodeInfo\": {}\r\n },\r\n {\r\n \"id\": \"testTask2\",\r\n \"url\": \"https://hoppeeastasia2.eastasia.batch.azure.com/jobs/testTerminateTaskJob/tasks/testTask2\",\r\n \"eTag\": \"0x8DB6E3C6B587C74\",\r\n \"creationTime\": \"2023-06-16T07:36:37.142769Z\",\r\n \"lastModified\": \"2023-06-16T07:36:38.1111412Z\",\r\n \"state\": \"completed\",\r\n \"stateTransitionTime\": \"2023-06-16T07:36:38.1111412Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2023-06-16T07:36:37.142769Z\",\r\n \"commandLine\": \"ping -t localhost -w 60\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"task\",\r\n \"elevationLevel\": \"admin\"\r\n }\r\n },\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"retentionTime\": \"P7D\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"requiredSlots\": 1,\r\n \"executionInfo\": {\r\n \"endTime\": \"2023-06-16T07:36:38.1111412Z\",\r\n \"failureInfo\": {\r\n \"category\": \"UserError\",\r\n \"code\": \"TaskEnded\",\r\n \"message\": \"Task Was Ended by User Request\"\r\n },\r\n \"result\": \"failure\",\r\n \"retryCount\": 0,\r\n \"requeueCount\": 0\r\n },\r\n \"nodeInfo\": {}\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"odata.metadata\": \"https://billstestba24326.uksouth.batch.azure.com/$metadata#tasks\",\r\n \"value\": [\r\n {\r\n \"id\": \"testTask1\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testTerminateTaskJob/tasks/testTask1\",\r\n \"eTag\": \"0x8DC49FBC60C1937\",\r\n \"creationTime\": \"2024-03-21T23:08:07.5842915Z\",\r\n \"lastModified\": \"2024-03-21T23:08:08.8068407Z\",\r\n \"state\": \"completed\",\r\n \"stateTransitionTime\": \"2024-03-21T23:08:08.8068407Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2024-03-21T23:08:07.5842915Z\",\r\n \"commandLine\": \"ping -t localhost -w 60\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"task\",\r\n \"elevationLevel\": \"admin\"\r\n }\r\n },\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"retentionTime\": \"P7D\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"requiredSlots\": 1,\r\n \"executionInfo\": {\r\n \"endTime\": \"2024-03-21T23:08:08.8068407Z\",\r\n \"failureInfo\": {\r\n \"category\": \"UserError\",\r\n \"code\": \"TaskEnded\",\r\n \"message\": \"Task Was Ended by User Request\"\r\n },\r\n \"result\": \"failure\",\r\n \"retryCount\": 0,\r\n \"requeueCount\": 0\r\n },\r\n \"nodeInfo\": {}\r\n },\r\n {\r\n \"id\": \"testTask2\",\r\n \"url\": \"https://billstestba24326.uksouth.batch.azure.com/jobs/testTerminateTaskJob/tasks/testTask2\",\r\n \"eTag\": \"0x8DC49FBC6518704\",\r\n \"creationTime\": \"2024-03-21T23:08:07.7692921Z\",\r\n \"lastModified\": \"2024-03-21T23:08:09.26185Z\",\r\n \"state\": \"completed\",\r\n \"stateTransitionTime\": \"2024-03-21T23:08:09.26185Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2024-03-21T23:08:07.7692921Z\",\r\n \"commandLine\": \"ping -t localhost -w 60\",\r\n \"userIdentity\": {\r\n \"autoUser\": {\r\n \"scope\": \"task\",\r\n \"elevationLevel\": \"admin\"\r\n }\r\n },\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"retentionTime\": \"P7D\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"requiredSlots\": 1,\r\n \"executionInfo\": {\r\n \"endTime\": \"2024-03-21T23:08:09.26185Z\",\r\n \"failureInfo\": {\r\n \"category\": \"UserError\",\r\n \"code\": \"TaskEnded\",\r\n \"message\": \"Task Was Ended by User Request\"\r\n },\r\n \"result\": \"failure\",\r\n \"retryCount\": 0,\r\n \"requeueCount\": 0\r\n },\r\n \"nodeInfo\": {}\r\n }\r\n ]\r\n}", "StatusCode": 200 }, { - "RequestUri": "/jobs/testTerminateTaskJob?api-version=2023-05-01.17.0", - "EncodedRequestUri": "L2pvYnMvdGVzdFRlcm1pbmF0ZVRhc2tKb2I/YXBpLXZlcnNpb249MjAyMy0wNS0wMS4xNy4w", + "RequestUri": "/jobs/testTerminateTaskJob?api-version=2024-02-01.19.0", + "EncodedRequestUri": "L2pvYnMvdGVzdFRlcm1pbmF0ZVRhc2tKb2I/YXBpLXZlcnNpb249MjAyNC0wMi0wMS4xOS4w", "RequestMethod": "DELETE", "RequestHeaders": { "client-request-id": [ - "db571873-6019-4b8b-b832-baa29a580ff0" + "fe78619c-46d3-49bd-83a9-acf795dcf919" ], "Accept-Language": [ "en-US" ], "ocp-date": [ - "Fri, 16 Jun 2023 07:36:37 GMT" + "Thu, 21 Mar 2024 23:08:09 GMT" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.22621", - "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.0.23.31502", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Batch.Protocol.BatchServiceClient/16.200.24.12902", "AzurePowershell/Az1.0.0" ], "Content-Length": [ @@ -479,7 +479,7 @@ "Microsoft-HTTPAPI/2.0" ], "request-id": [ - "235a8986-4486-4579-8926-bd071d6cd6a6" + "48cdba89-694c-4acc-8140-929caac5d039" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -491,7 +491,7 @@ "3.0" ], "Date": [ - "Fri, 16 Jun 2023 07:36:38 GMT" + "Thu, 21 Mar 2024 23:08:09 GMT" ] }, "ResponseBody": "", @@ -500,9 +500,9 @@ ], "Names": {}, "Variables": { - "SubscriptionId": "21abd678-18c5-4660-9fdd-8c5ba6b6fe1f", - "AZURE_BATCH_ACCOUNT": "hoppeeastasia2", - "AZURE_BATCH_ENDPOINT": "https://hoppeeastasia2.eastasia.batch.azure.com", - "AZURE_BATCH_RESOURCE_GROUP": "123" + "SubscriptionId": "6602ac9a-5dad-41bd-a792-592c704b6a31", + "AZURE_BATCH_ACCOUNT": "billstestba24326", + "AZURE_BATCH_ENDPOINT": "https://billstestba24326.uksouth.batch.azure.com", + "AZURE_BATCH_RESOURCE_GROUP": "automation" } } \ No newline at end of file diff --git a/src/Batch/Batch/Batch.csproj b/src/Batch/Batch/Batch.csproj index 98e02fd644ec..1728c19a7afe 100644 --- a/src/Batch/Batch/Batch.csproj +++ b/src/Batch/Batch/Batch.csproj @@ -12,7 +12,7 @@ - + diff --git a/src/Batch/Batch/ChangeLog.md b/src/Batch/Batch/ChangeLog.md index 06bc553f2fea..f823bffdd4e8 100644 --- a/src/Batch/Batch/ChangeLog.md +++ b/src/Batch/Batch/ChangeLog.md @@ -19,6 +19,13 @@ --> ## Upcoming Release +## Version 3.6.0 +* Added new properties `ResourceTags` and `UpgradePolicy` to `PSCloudPool` and `PSPoolSpecification`. +* Added new property `UpgradingOS` to `PSNodeCounts`. +* Added new properties `Caching`, `DiskSizeGB`, `ManagedDisk` and `WriteAcceleratorEnabled` to `PSOSDisk`. +* Added new properties `SecurityProfile` and `ServiceArtifactReference` to `PSVirtualMachineConfigurations`. +* Added new property `ScaleSetVmResourceId` to `PSVirtualMachineInfo`. + ## Version 3.5.0 * Removed cmdlets: `Get-AzBatchPoolStatistic` and `Get-AzBatchJobStatistic` * Deprecated cmdlets: `Get-AzBatchCertificate` and `New-AzBatchCertificate` diff --git a/src/Batch/Batch/Models.Generated/PSAutomaticOSUpgradePolicy.cs b/src/Batch/Batch/Models.Generated/PSAutomaticOSUpgradePolicy.cs new file mode 100644 index 000000000000..efaa7665cafe --- /dev/null +++ b/src/Batch/Batch/Models.Generated/PSAutomaticOSUpgradePolicy.cs @@ -0,0 +1,99 @@ +// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ----------------------------------------------------------------------------- +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:5.0.17 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Microsoft.Azure.Commands.Batch.Models +{ + using System; + using System.Collections; + using System.Collections.Generic; + using Microsoft.Azure.Batch; + + + public partial class PSAutomaticOSUpgradePolicy + { + + internal Microsoft.Azure.Batch.AutomaticOSUpgradePolicy omObject; + + public PSAutomaticOSUpgradePolicy() + { + this.omObject = new Microsoft.Azure.Batch.AutomaticOSUpgradePolicy(); + } + + internal PSAutomaticOSUpgradePolicy(Microsoft.Azure.Batch.AutomaticOSUpgradePolicy omObject) + { + if ((omObject == null)) + { + throw new System.ArgumentNullException("omObject"); + } + this.omObject = omObject; + } + + public System.Boolean? DisableAutomaticRollback + { + get + { + return this.omObject.DisableAutomaticRollback; + } + set + { + this.omObject.DisableAutomaticRollback = value; + } + } + + public System.Boolean? EnableAutomaticOSUpgrade + { + get + { + return this.omObject.EnableAutomaticOSUpgrade; + } + set + { + this.omObject.EnableAutomaticOSUpgrade = value; + } + } + + public System.Boolean? OsRollingUpgradeDeferral + { + get + { + return this.omObject.OsRollingUpgradeDeferral; + } + set + { + this.omObject.OsRollingUpgradeDeferral = value; + } + } + + public System.Boolean? UseRollingUpgradePolicy + { + get + { + return this.omObject.UseRollingUpgradePolicy; + } + set + { + this.omObject.UseRollingUpgradePolicy = value; + } + } + } +} diff --git a/src/Batch/Batch/Models.Generated/PSCloudPool.cs b/src/Batch/Batch/Models.Generated/PSCloudPool.cs index 5021d69d8ace..843332d762d2 100644 --- a/src/Batch/Batch/Models.Generated/PSCloudPool.cs +++ b/src/Batch/Batch/Models.Generated/PSCloudPool.cs @@ -54,12 +54,16 @@ public partial class PSCloudPool private IReadOnlyList resizeErrors; + private IDictionary resourceTags; + private PSStartTask startTask; private PSPoolStatistics statistics; private PSTaskSchedulingPolicy taskSchedulingPolicy; + private PSUpgradePolicy upgradePolicy; + private IList userAccounts; private PSVirtualMachineConfiguration virtualMachineConfiguration; @@ -507,6 +511,41 @@ public System.TimeSpan? ResizeTimeout } } + public IDictionary ResourceTags + { + get + { + if (((this.resourceTags == null) + && (this.omObject.ResourceTags != null))) + { + Dictionary dict; + dict = new Dictionary(); + IEnumerator> enumerator; + enumerator = this.omObject.ResourceTags.GetEnumerator(); + for ( + ; enumerator.MoveNext(); + ) + { + dict.Add(enumerator.Current.Key, enumerator.Current.Value); + } + this.resourceTags = dict; + } + return this.resourceTags; + } + set + { + if ((value == null)) + { + this.omObject.ResourceTags = null; + } + else + { + this.omObject.ResourceTags = new Dictionary(); + } + this.resourceTags = value; + } + } + public PSStartTask StartTask { get @@ -634,6 +673,31 @@ public System.Int32? TaskSlotsPerNode } } + public PSUpgradePolicy UpgradePolicy + { + get + { + if (((this.upgradePolicy == null) + && (this.omObject.UpgradePolicy != null))) + { + this.upgradePolicy = new PSUpgradePolicy(this.omObject.UpgradePolicy); + } + return this.upgradePolicy; + } + set + { + if ((value == null)) + { + this.omObject.UpgradePolicy = null; + } + else + { + this.omObject.UpgradePolicy = value.omObject; + } + this.upgradePolicy = value; + } + } + public string Url { get diff --git a/src/Batch/Batch/Models.Generated/PSManagedDisk.cs b/src/Batch/Batch/Models.Generated/PSManagedDisk.cs new file mode 100644 index 000000000000..c23ef07cb13b --- /dev/null +++ b/src/Batch/Batch/Models.Generated/PSManagedDisk.cs @@ -0,0 +1,63 @@ +// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ----------------------------------------------------------------------------- +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:5.0.17 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Microsoft.Azure.Commands.Batch.Models +{ + using System; + using System.Collections; + using System.Collections.Generic; + using Microsoft.Azure.Batch; + + + public partial class PSManagedDisk + { + + internal Microsoft.Azure.Batch.ManagedDisk omObject; + + public PSManagedDisk(System.Nullable storageAccountType = null) + { + this.omObject = new Microsoft.Azure.Batch.ManagedDisk(storageAccountType); + } + + internal PSManagedDisk(Microsoft.Azure.Batch.ManagedDisk omObject) + { + if ((omObject == null)) + { + throw new System.ArgumentNullException("omObject"); + } + this.omObject = omObject; + } + + public Microsoft.Azure.Batch.Common.StorageAccountType? StorageAccountType + { + get + { + return this.omObject.StorageAccountType; + } + set + { + this.omObject.StorageAccountType = value; + } + } + } +} diff --git a/src/Batch/Batch/Models.Generated/PSNodeCounts.cs b/src/Batch/Batch/Models.Generated/PSNodeCounts.cs index b55225d7ed6b..1a485caae6e0 100644 --- a/src/Batch/Batch/Models.Generated/PSNodeCounts.cs +++ b/src/Batch/Batch/Models.Generated/PSNodeCounts.cs @@ -147,6 +147,14 @@ public int Unusable } } + public int UpgradingOS + { + get + { + return this.omObject.UpgradingOS; + } + } + public int WaitingForStartTask { get diff --git a/src/Batch/Batch/Models.Generated/PSOSDisk.cs b/src/Batch/Batch/Models.Generated/PSOSDisk.cs index b58be32eced4..64b29d8acc50 100644 --- a/src/Batch/Batch/Models.Generated/PSOSDisk.cs +++ b/src/Batch/Batch/Models.Generated/PSOSDisk.cs @@ -36,6 +36,8 @@ public partial class PSOSDisk private PSDiffDiskSettings ephemeralOSDiskSettings; + private PSManagedDisk managedDisk; + public PSOSDisk() { this.omObject = new Microsoft.Azure.Batch.OSDisk(); @@ -50,6 +52,30 @@ internal PSOSDisk(Microsoft.Azure.Batch.OSDisk omObject) this.omObject = omObject; } + public Microsoft.Azure.Batch.Common.CachingType? Caching + { + get + { + return this.omObject.Caching; + } + set + { + this.omObject.Caching = value; + } + } + + public System.Int32? DiskSizeGB + { + get + { + return this.omObject.DiskSizeGB; + } + set + { + this.omObject.DiskSizeGB = value; + } + } + public PSDiffDiskSettings EphemeralOSDiskSettings { get @@ -74,5 +100,42 @@ public PSDiffDiskSettings EphemeralOSDiskSettings this.ephemeralOSDiskSettings = value; } } + + public PSManagedDisk ManagedDisk + { + get + { + if (((this.managedDisk == null) + && (this.omObject.ManagedDisk != null))) + { + this.managedDisk = new PSManagedDisk(this.omObject.ManagedDisk); + } + return this.managedDisk; + } + set + { + if ((value == null)) + { + this.omObject.ManagedDisk = null; + } + else + { + this.omObject.ManagedDisk = value.omObject; + } + this.managedDisk = value; + } + } + + public System.Boolean? WriteAcceleratorEnabled + { + get + { + return this.omObject.WriteAcceleratorEnabled; + } + set + { + this.omObject.WriteAcceleratorEnabled = value; + } + } } } diff --git a/src/Batch/Batch/Models.Generated/PSPoolSpecification.cs b/src/Batch/Batch/Models.Generated/PSPoolSpecification.cs index d6fd089c0751..03ee1bd686a4 100644 --- a/src/Batch/Batch/Models.Generated/PSPoolSpecification.cs +++ b/src/Batch/Batch/Models.Generated/PSPoolSpecification.cs @@ -48,10 +48,14 @@ public partial class PSPoolSpecification private PSNetworkConfiguration networkConfiguration; + private IDictionary resourceTags; + private PSStartTask startTask; private PSTaskSchedulingPolicy taskSchedulingPolicy; + private PSUpgradePolicy upgradePolicy; + private IList userAccounts; private PSVirtualMachineConfiguration virtualMachineConfiguration; @@ -367,6 +371,41 @@ public System.TimeSpan? ResizeTimeout } } + public IDictionary ResourceTags + { + get + { + if (((this.resourceTags == null) + && (this.omObject.ResourceTags != null))) + { + Dictionary dict; + dict = new Dictionary(); + IEnumerator> enumerator; + enumerator = this.omObject.ResourceTags.GetEnumerator(); + for ( + ; enumerator.MoveNext(); + ) + { + dict.Add(enumerator.Current.Key, enumerator.Current.Value); + } + this.resourceTags = dict; + } + return this.resourceTags; + } + set + { + if ((value == null)) + { + this.omObject.ResourceTags = null; + } + else + { + this.omObject.ResourceTags = new Dictionary(); + } + this.resourceTags = value; + } + } + public PSStartTask StartTask { get @@ -465,6 +504,31 @@ public System.Int32? TaskSlotsPerNode } } + public PSUpgradePolicy UpgradePolicy + { + get + { + if (((this.upgradePolicy == null) + && (this.omObject.UpgradePolicy != null))) + { + this.upgradePolicy = new PSUpgradePolicy(this.omObject.UpgradePolicy); + } + return this.upgradePolicy; + } + set + { + if ((value == null)) + { + this.omObject.UpgradePolicy = null; + } + else + { + this.omObject.UpgradePolicy = value.omObject; + } + this.upgradePolicy = value; + } + } + public IList UserAccounts { get diff --git a/src/Batch/Batch/Models.Generated/PSRollingUpgradePolicy.cs b/src/Batch/Batch/Models.Generated/PSRollingUpgradePolicy.cs new file mode 100644 index 000000000000..09970e7a5e22 --- /dev/null +++ b/src/Batch/Batch/Models.Generated/PSRollingUpgradePolicy.cs @@ -0,0 +1,135 @@ +// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ----------------------------------------------------------------------------- +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:5.0.17 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Microsoft.Azure.Commands.Batch.Models +{ + using System; + using System.Collections; + using System.Collections.Generic; + using Microsoft.Azure.Batch; + + + public partial class PSRollingUpgradePolicy + { + + internal Microsoft.Azure.Batch.RollingUpgradePolicy omObject; + + public PSRollingUpgradePolicy() + { + this.omObject = new Microsoft.Azure.Batch.RollingUpgradePolicy(); + } + + internal PSRollingUpgradePolicy(Microsoft.Azure.Batch.RollingUpgradePolicy omObject) + { + if ((omObject == null)) + { + throw new System.ArgumentNullException("omObject"); + } + this.omObject = omObject; + } + + public System.Boolean? EnableCrossZoneUpgrade + { + get + { + return this.omObject.EnableCrossZoneUpgrade; + } + set + { + this.omObject.EnableCrossZoneUpgrade = value; + } + } + + public System.Int32? MaxBatchInstancePercent + { + get + { + return this.omObject.MaxBatchInstancePercent; + } + set + { + this.omObject.MaxBatchInstancePercent = value; + } + } + + public System.Int32? MaxUnhealthyInstancePercent + { + get + { + return this.omObject.MaxUnhealthyInstancePercent; + } + set + { + this.omObject.MaxUnhealthyInstancePercent = value; + } + } + + public System.Int32? MaxUnhealthyUpgradedInstancePercent + { + get + { + return this.omObject.MaxUnhealthyUpgradedInstancePercent; + } + set + { + this.omObject.MaxUnhealthyUpgradedInstancePercent = value; + } + } + + public System.TimeSpan? PauseTimeBetweenBatches + { + get + { + return this.omObject.PauseTimeBetweenBatches; + } + set + { + this.omObject.PauseTimeBetweenBatches = value; + } + } + + public System.Boolean? PrioritizeUnhealthyInstances + { + get + { + return this.omObject.PrioritizeUnhealthyInstances; + } + set + { + this.omObject.PrioritizeUnhealthyInstances = value; + } + } + + public System.Boolean? RollbackFailedInstancesOnPolicyBreach + { + get + { + return this.omObject.RollbackFailedInstancesOnPolicyBreach; + } + set + { + this.omObject.RollbackFailedInstancesOnPolicyBreach = value; + } + } + } +} diff --git a/src/Batch/Batch/Models.Generated/PSSecurityProfile.cs b/src/Batch/Batch/Models.Generated/PSSecurityProfile.cs new file mode 100644 index 000000000000..92cb1da29c72 --- /dev/null +++ b/src/Batch/Batch/Models.Generated/PSSecurityProfile.cs @@ -0,0 +1,102 @@ +// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ----------------------------------------------------------------------------- +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:5.0.17 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Microsoft.Azure.Commands.Batch.Models +{ + using System; + using System.Collections; + using System.Collections.Generic; + using Microsoft.Azure.Batch; + + + public partial class PSSecurityProfile + { + + internal Microsoft.Azure.Batch.SecurityProfile omObject; + + private PSUefiSettings uefiSettings; + + public PSSecurityProfile() + { + this.omObject = new Microsoft.Azure.Batch.SecurityProfile(); + } + + internal PSSecurityProfile(Microsoft.Azure.Batch.SecurityProfile omObject) + { + if ((omObject == null)) + { + throw new System.ArgumentNullException("omObject"); + } + this.omObject = omObject; + } + + public System.Boolean? EncryptionAtHost + { + get + { + return this.omObject.EncryptionAtHost; + } + set + { + this.omObject.EncryptionAtHost = value; + } + } + + public Microsoft.Azure.Batch.Common.SecurityTypes? SecurityType + { + get + { + return this.omObject.SecurityType; + } + set + { + this.omObject.SecurityType = value; + } + } + + public PSUefiSettings UefiSettings + { + get + { + if (((this.uefiSettings == null) + && (this.omObject.UefiSettings != null))) + { + this.uefiSettings = new PSUefiSettings(this.omObject.UefiSettings); + } + return this.uefiSettings; + } + set + { + if ((value == null)) + { + this.omObject.UefiSettings = null; + } + else + { + this.omObject.UefiSettings = value.omObject; + } + this.uefiSettings = value; + } + } + } +} diff --git a/src/Batch/Batch/Models.Generated/PSServiceArtifactReference.cs b/src/Batch/Batch/Models.Generated/PSServiceArtifactReference.cs new file mode 100644 index 000000000000..1d3b993d9acb --- /dev/null +++ b/src/Batch/Batch/Models.Generated/PSServiceArtifactReference.cs @@ -0,0 +1,63 @@ +// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ----------------------------------------------------------------------------- +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:5.0.17 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Microsoft.Azure.Commands.Batch.Models +{ + using System; + using System.Collections; + using System.Collections.Generic; + using Microsoft.Azure.Batch; + + + public partial class PSServiceArtifactReference + { + + internal Microsoft.Azure.Batch.ServiceArtifactReference omObject; + + public PSServiceArtifactReference(string id) + { + this.omObject = new Microsoft.Azure.Batch.ServiceArtifactReference(id); + } + + internal PSServiceArtifactReference(Microsoft.Azure.Batch.ServiceArtifactReference omObject) + { + if ((omObject == null)) + { + throw new System.ArgumentNullException("omObject"); + } + this.omObject = omObject; + } + + public string Id + { + get + { + return this.omObject.Id; + } + set + { + this.omObject.Id = value; + } + } + } +} diff --git a/src/Batch/Batch/Models.Generated/PSUefiSettings.cs b/src/Batch/Batch/Models.Generated/PSUefiSettings.cs new file mode 100644 index 000000000000..3fe49db34568 --- /dev/null +++ b/src/Batch/Batch/Models.Generated/PSUefiSettings.cs @@ -0,0 +1,75 @@ +// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ----------------------------------------------------------------------------- +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:5.0.17 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Microsoft.Azure.Commands.Batch.Models +{ + using System; + using System.Collections; + using System.Collections.Generic; + using Microsoft.Azure.Batch; + + + public partial class PSUefiSettings + { + + internal Microsoft.Azure.Batch.UefiSettings omObject; + + public PSUefiSettings() + { + this.omObject = new Microsoft.Azure.Batch.UefiSettings(); + } + + internal PSUefiSettings(Microsoft.Azure.Batch.UefiSettings omObject) + { + if ((omObject == null)) + { + throw new System.ArgumentNullException("omObject"); + } + this.omObject = omObject; + } + + public System.Boolean? SecureBootEnabled + { + get + { + return this.omObject.SecureBootEnabled; + } + set + { + this.omObject.SecureBootEnabled = value; + } + } + + public System.Boolean? VTpmEnabled + { + get + { + return this.omObject.VTpmEnabled; + } + set + { + this.omObject.VTpmEnabled = value; + } + } + } +} diff --git a/src/Batch/Batch/Models.Generated/PSUpgradePolicy.cs b/src/Batch/Batch/Models.Generated/PSUpgradePolicy.cs new file mode 100644 index 000000000000..616dae81299b --- /dev/null +++ b/src/Batch/Batch/Models.Generated/PSUpgradePolicy.cs @@ -0,0 +1,117 @@ +// ----------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ----------------------------------------------------------------------------- +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:5.0.17 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Microsoft.Azure.Commands.Batch.Models +{ + using System; + using System.Collections; + using System.Collections.Generic; + using Microsoft.Azure.Batch; + + + public partial class PSUpgradePolicy + { + + internal Microsoft.Azure.Batch.UpgradePolicy omObject; + + private PSAutomaticOSUpgradePolicy automaticOSUpgradePolicy; + + private PSRollingUpgradePolicy rollingUpgradePolicy; + + public PSUpgradePolicy(Microsoft.Azure.Batch.Common.UpgradeMode mode) + { + this.omObject = new Microsoft.Azure.Batch.UpgradePolicy(mode); + } + + internal PSUpgradePolicy(Microsoft.Azure.Batch.UpgradePolicy omObject) + { + if ((omObject == null)) + { + throw new System.ArgumentNullException("omObject"); + } + this.omObject = omObject; + } + + public PSAutomaticOSUpgradePolicy AutomaticOSUpgradePolicy + { + get + { + if (((this.automaticOSUpgradePolicy == null) + && (this.omObject.AutomaticOSUpgradePolicy != null))) + { + this.automaticOSUpgradePolicy = new PSAutomaticOSUpgradePolicy(this.omObject.AutomaticOSUpgradePolicy); + } + return this.automaticOSUpgradePolicy; + } + set + { + if ((value == null)) + { + this.omObject.AutomaticOSUpgradePolicy = null; + } + else + { + this.omObject.AutomaticOSUpgradePolicy = value.omObject; + } + this.automaticOSUpgradePolicy = value; + } + } + + public Microsoft.Azure.Batch.Common.UpgradeMode Mode + { + get + { + return this.omObject.Mode; + } + set + { + this.omObject.Mode = value; + } + } + + public PSRollingUpgradePolicy RollingUpgradePolicy + { + get + { + if (((this.rollingUpgradePolicy == null) + && (this.omObject.RollingUpgradePolicy != null))) + { + this.rollingUpgradePolicy = new PSRollingUpgradePolicy(this.omObject.RollingUpgradePolicy); + } + return this.rollingUpgradePolicy; + } + set + { + if ((value == null)) + { + this.omObject.RollingUpgradePolicy = null; + } + else + { + this.omObject.RollingUpgradePolicy = value.omObject; + } + this.rollingUpgradePolicy = value; + } + } + } +} diff --git a/src/Batch/Batch/Models.Generated/PSVirtualMachineConfiguration.cs b/src/Batch/Batch/Models.Generated/PSVirtualMachineConfiguration.cs index 5d798ec4c829..66e5d524c25e 100644 --- a/src/Batch/Batch/Models.Generated/PSVirtualMachineConfiguration.cs +++ b/src/Batch/Batch/Models.Generated/PSVirtualMachineConfiguration.cs @@ -48,6 +48,10 @@ public partial class PSVirtualMachineConfiguration private PSOSDisk oSDisk; + private PSSecurityProfile securityProfile; + + private PSServiceArtifactReference serviceArtifactReference; + private PSWindowsConfiguration windowsConfiguration; public PSVirtualMachineConfiguration(PSImageReference imageReference, string nodeAgentSkuId) @@ -283,6 +287,56 @@ public PSOSDisk OSDisk } } + public PSSecurityProfile SecurityProfile + { + get + { + if (((this.securityProfile == null) + && (this.omObject.SecurityProfile != null))) + { + this.securityProfile = new PSSecurityProfile(this.omObject.SecurityProfile); + } + return this.securityProfile; + } + set + { + if ((value == null)) + { + this.omObject.SecurityProfile = null; + } + else + { + this.omObject.SecurityProfile = value.omObject; + } + this.securityProfile = value; + } + } + + public PSServiceArtifactReference ServiceArtifactReference + { + get + { + if (((this.serviceArtifactReference == null) + && (this.omObject.ServiceArtifactReference != null))) + { + this.serviceArtifactReference = new PSServiceArtifactReference(this.omObject.ServiceArtifactReference); + } + return this.serviceArtifactReference; + } + set + { + if ((value == null)) + { + this.omObject.ServiceArtifactReference = null; + } + else + { + this.omObject.ServiceArtifactReference = value.omObject; + } + this.serviceArtifactReference = value; + } + } + public PSWindowsConfiguration WindowsConfiguration { get diff --git a/src/Batch/Batch/Models.Generated/PSVirtualMachineInfo.cs b/src/Batch/Batch/Models.Generated/PSVirtualMachineInfo.cs index 02cc61db20a6..d93ab4c81321 100644 --- a/src/Batch/Batch/Models.Generated/PSVirtualMachineInfo.cs +++ b/src/Batch/Batch/Models.Generated/PSVirtualMachineInfo.cs @@ -74,5 +74,17 @@ public PSImageReference ImageReference this.imageReference = value; } } + + public string ScaleSetVmResourceId + { + get + { + return this.omObject.ScaleSetVmResourceId; + } + set + { + this.omObject.ScaleSetVmResourceId = value; + } + } } } diff --git a/src/Batch/Batch/Models/BatchClient.Pools.cs b/src/Batch/Batch/Models/BatchClient.Pools.cs index f89484884620..4c28769d2477 100644 --- a/src/Batch/Batch/Models/BatchClient.Pools.cs +++ b/src/Batch/Batch/Models/BatchClient.Pools.cs @@ -103,6 +103,11 @@ public void CreatePool(NewPoolParameters parameters) pool.TargetLowPriorityComputeNodes = parameters.TargetLowPriorityComputeNodes; } + if (parameters.UpgradePolicy != null) + { + pool.UpgradePolicy = parameters.UpgradePolicy.omObject; + } + if (parameters.TaskSchedulingPolicy != null) { pool.TaskSchedulingPolicy = parameters.TaskSchedulingPolicy.omObject; @@ -123,6 +128,16 @@ public void CreatePool(NewPoolParameters parameters) } } + if (parameters.ResourceTags != null) + { + pool.ResourceTags = new Dictionary(); + + foreach (DictionaryEntry m in parameters.ResourceTags) + { + pool.ResourceTags.Add(m.Key.ToString(), m.Value.ToString()); + } + } + if (parameters.CertificateReferences != null) { pool.CertificateReferences = new List(); diff --git a/src/Batch/Batch/Models/NewPoolParameters.cs b/src/Batch/Batch/Models/NewPoolParameters.cs index c31fa028b0aa..1f4aecee5a5a 100644 --- a/src/Batch/Batch/Models/NewPoolParameters.cs +++ b/src/Batch/Batch/Models/NewPoolParameters.cs @@ -93,11 +93,21 @@ public NewPoolParameters(BatchAccountContext context, string poolId, IEnumerable /// public PSTaskSchedulingPolicy TaskSchedulingPolicy { get; set; } + /// + /// The upgrade policy for the pool. + /// + public PSUpgradePolicy UpgradePolicy { get; set; } + /// /// Metadata to add to the new pool. /// public IDictionary Metadata { get; set; } + /// + /// The user-specified tags associated with the pool. + /// + public IDictionary ResourceTags { get; set; } + /// /// Specifies whether the pool permits direct communication between compute nodes. /// diff --git a/src/Batch/Batch/Pools/NewBatchPoolCommand.cs b/src/Batch/Batch/Pools/NewBatchPoolCommand.cs index e6def58e5611..22f0e8512eff 100644 --- a/src/Batch/Batch/Pools/NewBatchPoolCommand.cs +++ b/src/Batch/Batch/Pools/NewBatchPoolCommand.cs @@ -75,14 +75,21 @@ public class NewBatchPoolCommand : BatchObjectModelCmdletBase [Alias("MaxTasksPerComputeNode")] public int? TaskSlotsPerNode { get; set; } + [Parameter(Mandatory = false, HelpMessage = "The upgrade policy for the pool")] + [ValidateNotNullOrEmpty] + public PSUpgradePolicy UpgradePolicy { get; set; } + [Parameter] [ValidateNotNullOrEmpty] public PSTaskSchedulingPolicy TaskSchedulingPolicy { get; set; } + [Parameter(Mandatory = false, HelpMessage = "The user defined tags to be associated with the Azure Batch Pool.When specified, these tags are propagated to the backing Azure resources associated with the pool.This property can only be specified when the Batch account was created with the poolAllocationMode property set to 'UserSubscription'.")] + [ValidateNotNullOrEmpty] + public IDictionary ResourceTag { get; set; } + [Parameter] [ValidateNotNullOrEmpty] public IDictionary Metadata { get; set; } - [Parameter] public SwitchParameter InterComputeNodeCommunicationEnabled { get; set; } @@ -149,6 +156,7 @@ protected override void ExecuteCmdletImpl() AutoScaleFormula = this.AutoScaleFormula, TaskSlotsPerNode = this.TaskSlotsPerNode, TaskSchedulingPolicy = this.TaskSchedulingPolicy, + UpgradePolicy = this.UpgradePolicy, Metadata = this.Metadata, InterComputeNodeCommunicationEnabled = this.InterComputeNodeCommunicationEnabled.IsPresent, StartTask = this.StartTask, @@ -160,7 +168,8 @@ protected override void ExecuteCmdletImpl() UserAccounts = this.UserAccount, ApplicationLicenses = this.ApplicationLicenses, MountConfiguration = this.MountConfiguration, - TargetCommunicationMode = this.TargetNodeCommunicationMode + TargetCommunicationMode = this.TargetNodeCommunicationMode, + ResourceTags = this.ResourceTag, }; if (ShouldProcess("AzureBatchPool")) diff --git a/src/Batch/Batch/help/New-AzBatchPool.md b/src/Batch/Batch/help/New-AzBatchPool.md index dff4bc856db4..257bc0c88c9e 100644 --- a/src/Batch/Batch/help/New-AzBatchPool.md +++ b/src/Batch/Batch/help/New-AzBatchPool.md @@ -17,9 +17,9 @@ Creates a pool in the Batch service. ``` New-AzBatchPool [-Id] -VirtualMachineSize [-DisplayName ] [-ResizeTimeout ] [-TargetDedicatedComputeNodes ] [-TargetLowPriorityComputeNodes ] [-TaskSlotsPerNode ] - [-TaskSchedulingPolicy ] [-Metadata ] - [-InterComputeNodeCommunicationEnabled] [-StartTask ] - [-CertificateReferences ] + [-UpgradePolicy ] [-TaskSchedulingPolicy ] + [-ResourceTag ] [-Metadata ] [-InterComputeNodeCommunicationEnabled] + [-StartTask ] [-CertificateReferences ] [-ApplicationPackageReferences ] [-ApplicationLicenses ] [-CloudServiceConfiguration ] [-NetworkConfiguration ] @@ -33,9 +33,9 @@ New-AzBatchPool [-Id] -VirtualMachineSize [-DisplayName -VirtualMachineSize [-DisplayName ] [-ResizeTimeout ] [-TargetDedicatedComputeNodes ] [-TargetLowPriorityComputeNodes ] [-TaskSlotsPerNode ] - [-TaskSchedulingPolicy ] [-Metadata ] - [-InterComputeNodeCommunicationEnabled] [-StartTask ] - [-CertificateReferences ] + [-UpgradePolicy ] [-TaskSchedulingPolicy ] + [-ResourceTag ] [-Metadata ] [-InterComputeNodeCommunicationEnabled] + [-StartTask ] [-CertificateReferences ] [-ApplicationPackageReferences ] [-ApplicationLicenses ] [-VirtualMachineConfiguration ] @@ -49,9 +49,9 @@ New-AzBatchPool [-Id] -VirtualMachineSize [-DisplayName -VirtualMachineSize [-DisplayName ] [-AutoScaleEvaluationInterval ] [-AutoScaleFormula ] [-TaskSlotsPerNode ] - [-TaskSchedulingPolicy ] [-Metadata ] - [-InterComputeNodeCommunicationEnabled] [-StartTask ] - [-CertificateReferences ] + [-UpgradePolicy ] [-TaskSchedulingPolicy ] + [-ResourceTag ] [-Metadata ] [-InterComputeNodeCommunicationEnabled] + [-StartTask ] [-CertificateReferences ] [-ApplicationPackageReferences ] [-ApplicationLicenses ] [-CloudServiceConfiguration ] [-NetworkConfiguration ] @@ -65,9 +65,9 @@ New-AzBatchPool [-Id] -VirtualMachineSize [-DisplayName -VirtualMachineSize [-DisplayName ] [-AutoScaleEvaluationInterval ] [-AutoScaleFormula ] [-TaskSlotsPerNode ] - [-TaskSchedulingPolicy ] [-Metadata ] - [-InterComputeNodeCommunicationEnabled] [-StartTask ] - [-CertificateReferences ] + [-UpgradePolicy ] [-TaskSchedulingPolicy ] + [-ResourceTag ] [-Metadata ] [-InterComputeNodeCommunicationEnabled] + [-StartTask ] [-CertificateReferences ] [-ApplicationPackageReferences ] [-ApplicationLicenses ] [-VirtualMachineConfiguration ] @@ -374,6 +374,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ResourceTag +The user defined tags to be associated with the Azure Batch Pool.When specified, these tags are propagated to the backing Azure resources associated with the pool.This property can only be specified when the Batch account was created with the poolAllocationMode property set to 'UserSubscription'. + +```yaml +Type: System.Collections.IDictionary +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -StartTask Specifies the start task specification for the pool. The start task is run when a compute node joins the pool, or when the compute node is rebooted or reimaged. @@ -467,6 +482,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -UpgradePolicy +The upgrade policy for the pool in NewBatchPoolCommand.cs . + +```yaml +Type: Microsoft.Azure.Commands.Batch.Models.PSUpgradePolicy +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -UserAccount The list of user accounts to be created on each node in the pool. diff --git a/tools/BatchModelGenerator/Program.cs b/tools/BatchModelGenerator/Program.cs index 262d85c55abb..012916c98afb 100644 --- a/tools/BatchModelGenerator/Program.cs +++ b/tools/BatchModelGenerator/Program.cs @@ -311,7 +311,8 @@ private static void GenerateProperties(Type t, CodeTypeDeclaration codeType) bool isGenericCollection = property.PropertyType.IsGenericType && (property.PropertyType.GetGenericTypeDefinition() == typeof(IList<>) || property.PropertyType.GetGenericTypeDefinition() == typeof(IEnumerable<>) || - property.PropertyType.GetGenericTypeDefinition() == typeof(IReadOnlyList<>)); + property.PropertyType.GetGenericTypeDefinition() == typeof(IReadOnlyList<>) || + property.PropertyType.GetGenericTypeDefinition() == typeof(IDictionary<,>)); CodeFieldReferenceExpression wrappedObject = new(new CodeThisReferenceExpression(), OmObject); CodePropertyReferenceExpression wrappedObjectProperty = new(wrappedObject, property.Name); @@ -369,6 +370,7 @@ private static void GenerateGenericCollectionProperty(PropertyInfo property, str // Special handling for dict Type argType = property.PropertyType.GetGenericArguments()[0]; bool magicalDictConversion = propertyType == "IDictionary"; + bool regularDictoary = property.PropertyType.Name.Contains("IDictionary"); string wrapperArgType = argType.FullName.StartsWith("System") || argType.FullName.StartsWith("Microsoft.Azure.Batch.Common") ? argType.FullName : OMtoPSClassMappings[argType.FullName]; string wrapperType = magicalDictConversion ? string.Format("Dictionary") : string.Format("List<{0}>", wrapperArgType); string variableName = magicalDictConversion ? "dict" : "list"; @@ -383,6 +385,11 @@ private static void GenerateGenericCollectionProperty(PropertyInfo property, str // CodeDom doesn't support foreach loops very well, so instead explicitly get the enumerator and loop on MoveNext() calls const string enumeratorVariableName = "enumerator"; CodeVariableDeclarationStatement enumeratorDeclaration = new(string.Format("IEnumerator<{0}>", argType.FullName), enumeratorVariableName); + if (regularDictoary) // special case to handel pure Dictionary type + { + enumeratorDeclaration = new("IEnumerator>", enumeratorVariableName); + } + CodeVariableReferenceExpression enumeratorReference = new(enumeratorVariableName); CodeAssignStatement initializeEnumerator = new(enumeratorReference, new CodeMethodInvokeExpression(wrappedObjectProperty, "GetEnumerator")); CodeIterationStatement loopStatement = new(); @@ -392,13 +399,20 @@ private static void GenerateGenericCollectionProperty(PropertyInfo property, str CodePropertyReferenceExpression enumeratorCurrent = new(enumeratorReference, "Current"); // Fill the list by individually wrapping each item in the loop - if (magicalDictConversion) + if (magicalDictConversion && !regularDictoary) { var keyReference = new CodePropertyReferenceExpression(enumeratorCurrent, OMToPSDictionaryConversionMappings[argType.FullName].Item1); var valueReference = new CodePropertyReferenceExpression(enumeratorCurrent, OMToPSDictionaryConversionMappings[argType.FullName].Item2); CodeMethodInvokeExpression addToList = new(reference, "Add", keyReference, valueReference); loopStatement.Statements.Add(addToList); } + else if (regularDictoary) // special case to handel pure Dictionary type + { + var keyReference = new CodePropertyReferenceExpression(enumeratorCurrent, "Key"); + var valueReference = new CodePropertyReferenceExpression(enumeratorCurrent, "Value"); + CodeMethodInvokeExpression addToList = new(reference, "Add", keyReference, valueReference); + loopStatement.Statements.Add(addToList); + } else { // Fill the list by individually wrapping each item in the loop @@ -434,6 +448,11 @@ private static void GenerateGenericCollectionProperty(PropertyInfo property, str CodeBinaryOperatorExpression nullCheck = new(valueReference, CodeBinaryOperatorType.IdentityEquality, new CodePrimitiveExpression(null)); CodeAssignStatement nullAssignment = new(wrappedObjectProperty, new CodePrimitiveExpression(null)); CodeAssignStatement nonNullAssignment = new(wrappedObjectProperty, new CodeObjectCreateExpression(string.Format("List<{0}>", argType.FullName))); + + if (regularDictoary) // special case to handel pure Dictionary type + { + nonNullAssignment = new(wrappedObjectProperty, new CodeObjectCreateExpression(string.Format("Dictionary", argType.FullName))); + } CodeConditionStatement ifBlock = new(nullCheck, new CodeStatement[] { nullAssignment }, new CodeStatement[] { nonNullAssignment }); codeProperty.SetStatements.Add(ifBlock); codeProperty.SetStatements.Add(new CodeAssignStatement(fieldReference, valueReference)); @@ -528,6 +547,10 @@ private static string GetPropertyType(Type t) string str = string.Format("IList<{0}>", GetPropertyType(argType)); return str; } + else if (t.IsGenericType && t.GetGenericTypeDefinition() == typeof(IDictionary<,>)) + { + return "IDictionary"; + } else if (t.IsGenericType && t.GetGenericTypeDefinition() == typeof(IReadOnlyList<>)) { Type argType = t.GetGenericArguments()[0]; From 8c8b64d72e526ae38dd7ef81f4502117bc4c52b7 Mon Sep 17 00:00:00 2001 From: jha1bhavna <122248715+jha1bhavna@users.noreply.github.com> Date: Fri, 29 Mar 2024 12:41:11 +0530 Subject: [PATCH 03/12] Make TLS 1.2 as default MinimalTlsVersion (#24428) * Make TLS 1.2 as default MinimalTlsVersion * Updating test cases * Recording test * Correcting ChangeLog file --- .../ScenarioTests/ServerCrudTests.ps1 | 10 +- ...eandUpdateServerWithMinimalTlsVersion.json | 1261 ++++++++--------- src/Sql/Sql/ChangeLog.md | 1 + .../Sql/Server/Cmdlet/NewAzureSqlServer.cs | 2 +- src/Sql/Sql/help/New-AzSqlServer.md | 2 +- 5 files changed, 564 insertions(+), 712 deletions(-) diff --git a/src/Sql/Sql.Test/ScenarioTests/ServerCrudTests.ps1 b/src/Sql/Sql.Test/ScenarioTests/ServerCrudTests.ps1 index 09bbbeb868d6..95dcfd7e12e0 100644 --- a/src/Sql/Sql.Test/ScenarioTests/ServerCrudTests.ps1 +++ b/src/Sql/Sql.Test/ScenarioTests/ServerCrudTests.ps1 @@ -343,9 +343,13 @@ function Test-CreateandUpdateServerWithMinimalTlsVersion $tlsNone = "None" # With all parameters - $job = New-AzSqlServer -ResourceGroupName $rg.ResourceGroupName -ServerName $serverName ` - -Location $rg.Location -ServerVersion $version -SqlAdministratorCredentials $credentials -MinimalTlsVersion $tls1_2 -AsJob - $job | Wait-Job + #Checking creation as well as defaulting of MinimalTlsVersion + #$job = New-AzSqlServer -ResourceGroupName $rg.ResourceGroupName -ServerName $serverName ` + # -Location $rg.Location -ServerVersion $version -SqlAdministratorCredentials $credentials -AsJob + #$job | Wait-Job + + New-AzSqlServer -ResourceGroupName $rg.ResourceGroupName -ServerName $serverName ` + -Location $rg.Location -ServerVersion $version -SqlAdministratorCredentials $credentials $server1 = Get-AzSqlServer -ResourceGroupName $rg.ResourceGroupName -ServerName $serverName Assert-AreEqual $server1.MinimalTlsVersion $tls1_2 diff --git a/src/Sql/Sql.Test/SessionRecords/Microsoft.Azure.Commands.Sql.Test.ScenarioTests.ServerCrudTests/CreateandUpdateServerWithMinimalTlsVersion.json b/src/Sql/Sql.Test/SessionRecords/Microsoft.Azure.Commands.Sql.Test.ScenarioTests.ServerCrudTests/CreateandUpdateServerWithMinimalTlsVersion.json index 07386d604d7a..96ff9acb5e67 100644 --- a/src/Sql/Sql.Test/SessionRecords/Microsoft.Azure.Commands.Sql.Test.ScenarioTests.ServerCrudTests/CreateandUpdateServerWithMinimalTlsVersion.json +++ b/src/Sql/Sql.Test/SessionRecords/Microsoft.Azure.Commands.Sql.Test.ScenarioTests.ServerCrudTests/CreateandUpdateServerWithMinimalTlsVersion.json @@ -1,21 +1,21 @@ { "Entries": [ { - "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourcegroups/ps1228?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlZ3JvdXBzL3BzMTIyOD9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", + "RequestUri": "/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/resourcegroups/ps9134?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZWI5NTFkMzgtMThkOS00NmQ0LTlhMGMtZjY5NGIxNDhjNzZhL3Jlc291cmNlZ3JvdXBzL3BzOTEzND9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", "RequestMethod": "PUT", "RequestHeaders": { "x-ms-client-request-id": [ - "67a6d02c-f3cc-4d80-bd46-de401bf052f2" + "b7f4d6ea-3c49-4039-a084-6d54eb99d23f" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" ], "Content-Type": [ "application/json; charset=utf-8" @@ -36,13 +36,13 @@ "1199" ], "x-ms-request-id": [ - "53039a5a-a22a-4c79-8672-f1536eed74be" + "e0256097-865e-48ea-a0e4-fb5f1bfcfad0" ], "x-ms-correlation-request-id": [ - "53039a5a-a22a-4c79-8672-f1536eed74be" + "e0256097-865e-48ea-a0e4-fb5f1bfcfad0" ], "x-ms-routing-request-id": [ - "CENTRALINDIA:20230525T145312Z:53039a5a-a22a-4c79-8672-f1536eed74be" + "WESTINDIA:20240329T044308Z:e0256097-865e-48ea-a0e4-fb5f1bfcfad0" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -50,8 +50,14 @@ "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 80A1D6B0F5904AF78D5B65F091FF55D6 Ref B: MAA201060516027 Ref C: 2024-03-29T04:43:06Z" + ], "Date": [ - "Thu, 25 May 2023 14:53:11 GMT" + "Fri, 29 Mar 2024 04:43:08 GMT" ], "Content-Length": [ "169" @@ -63,25 +69,25 @@ "-1" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/ps1228\",\r\n \"name\": \"ps1228\",\r\n \"location\": \"westeurope\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/resourceGroups/ps9134\",\r\n \"name\": \"ps9134\",\r\n \"location\": \"westeurope\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", "StatusCode": 201 }, { - "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/ps1228/providers/Microsoft.Sql/servers/ps3224?api-version=2022-08-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlR3JvdXBzL3BzMTIyOC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3BzMzIyND9hcGktdmVyc2lvbj0yMDIyLTA4LTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/resourceGroups/ps9134/providers/Microsoft.Sql/servers/ps4307?api-version=2023-02-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZWI5NTFkMzgtMThkOS00NmQ0LTlhMGMtZjY5NGIxNDhjNzZhL3Jlc291cmNlR3JvdXBzL3BzOTEzNC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3BzNDMwNz9hcGktdmVyc2lvbj0yMDIzLTAyLTAxLXByZXZpZXc=", "RequestMethod": "GET", "RequestHeaders": { "x-ms-client-request-id": [ - "20a436be-d77d-4bf3-81e5-f42a546b1609" + "da273bde-f0ca-4299-b8c9-b7031cac48a8" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763", - "Microsoft.Azure.Management.Sql.SqlManagementClient/4.6.0" + "Microsoft.Azure.Management.Sql.SqlManagementClient/4.14.0" ] }, "RequestBody": "", @@ -96,13 +102,13 @@ "gateway" ], "x-ms-request-id": [ - "bfd65976-a6da-4977-bbcb-255519d14557" + "0d5b522f-9c37-499c-abc1-c54ee310570c" ], "x-ms-correlation-request-id": [ - "bfd65976-a6da-4977-bbcb-255519d14557" + "0d5b522f-9c37-499c-abc1-c54ee310570c" ], "x-ms-routing-request-id": [ - "CENTRALINDIA:20230525T145313Z:bfd65976-a6da-4977-bbcb-255519d14557" + "WESTINDIA:20240329T044309Z:0d5b522f-9c37-499c-abc1-c54ee310570c" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -110,32 +116,41 @@ "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 015B0B0B14014573AF7306EA23683957 Ref B: MAA201060513035 Ref C: 2024-03-29T04:43:08Z" + ], "Date": [ - "Thu, 25 May 2023 14:53:12 GMT" + "Fri, 29 Mar 2024 04:43:09 GMT" + ], + "Content-Length": [ + "206" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" - ], - "Content-Length": [ - "206" ] }, - "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"The Resource 'Microsoft.Sql/servers/ps3224' under resource group 'ps1228' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"The Resource 'Microsoft.Sql/servers/ps4307' under resource group 'ps9134' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix\"\r\n }\r\n}", "StatusCode": 404 }, { - "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/ps1228/providers/Microsoft.Sql/servers/ps3224?api-version=2022-08-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlR3JvdXBzL3BzMTIyOC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3BzMzIyND9hcGktdmVyc2lvbj0yMDIyLTA4LTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/resourceGroups/ps9134/providers/Microsoft.Sql/servers/ps4307?api-version=2023-02-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZWI5NTFkMzgtMThkOS00NmQ0LTlhMGMtZjY5NGIxNDhjNzZhL3Jlc291cmNlR3JvdXBzL3BzOTEzNC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3BzNDMwNz9hcGktdmVyc2lvbj0yMDIzLTAyLTAxLXByZXZpZXc=", "RequestMethod": "GET", "RequestHeaders": { + "x-ms-client-request-id": [ + "da273bde-f0ca-4299-b8c9-b7031cac48a8" + ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763", - "Microsoft.Azure.Management.Sql.SqlManagementClient/4.6.0" + "Microsoft.Azure.Management.Sql.SqlManagementClient/4.14.0" ] }, "RequestBody": "", @@ -147,19 +162,16 @@ "no-cache" ], "x-ms-request-id": [ - "9c449966-2a63-4167-8412-c56bb235a410" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "14ce04e8-c901-44e0-9e86-b697e983dfda" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" + "11999" ], "x-ms-correlation-request-id": [ - "8ff5a52d-f0d4-4e8e-9749-0f631400f61c" + "02af177c-1c1b-4ef6-96dd-786a484368fe" ], "x-ms-routing-request-id": [ - "CENTRALINDIA:20230525T145439Z:8ff5a52d-f0d4-4e8e-9749-0f631400f61c" + "WESTINDIA:20240329T044418Z:02af177c-1c1b-4ef6-96dd-786a484368fe" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -167,8 +179,14 @@ "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: F8C98A5312FC46DF9F8E0FE62B5D9B11 Ref B: MAA201060513035 Ref C: 2024-03-29T04:44:18Z" + ], "Date": [ - "Thu, 25 May 2023 14:54:39 GMT" + "Fri, 29 Mar 2024 04:44:18 GMT" ], "Content-Length": [ "519" @@ -180,25 +198,25 @@ "-1" ] }, - "ResponseBody": "{\r\n \"kind\": \"v12.0\",\r\n \"properties\": {\r\n \"administratorLogin\": \"testusername\",\r\n \"version\": \"12.0\",\r\n \"state\": \"Ready\",\r\n \"fullyQualifiedDomainName\": \"ps3224.database.windows.net\",\r\n \"privateEndpointConnections\": [],\r\n \"minimalTlsVersion\": \"1.2\",\r\n \"publicNetworkAccess\": \"Enabled\",\r\n \"restrictOutboundNetworkAccess\": \"Disabled\",\r\n \"externalGovernanceStatus\": \"Disabled\"\r\n },\r\n \"location\": \"westeurope\",\r\n \"id\": \"/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/ps1228/providers/Microsoft.Sql/servers/ps3224\",\r\n \"name\": \"ps3224\",\r\n \"type\": \"Microsoft.Sql/servers\"\r\n}", + "ResponseBody": "{\r\n \"kind\": \"v12.0\",\r\n \"properties\": {\r\n \"administratorLogin\": \"testusername\",\r\n \"version\": \"12.0\",\r\n \"state\": \"Ready\",\r\n \"fullyQualifiedDomainName\": \"ps4307.database.windows.net\",\r\n \"privateEndpointConnections\": [],\r\n \"minimalTlsVersion\": \"1.2\",\r\n \"publicNetworkAccess\": \"Enabled\",\r\n \"restrictOutboundNetworkAccess\": \"Disabled\",\r\n \"externalGovernanceStatus\": \"Disabled\"\r\n },\r\n \"location\": \"westeurope\",\r\n \"id\": \"/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/resourceGroups/ps9134/providers/Microsoft.Sql/servers/ps4307\",\r\n \"name\": \"ps4307\",\r\n \"type\": \"Microsoft.Sql/servers\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/ps1228/providers/Microsoft.Sql/servers/ps3224?api-version=2022-08-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlR3JvdXBzL3BzMTIyOC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3BzMzIyND9hcGktdmVyc2lvbj0yMDIyLTA4LTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/resourceGroups/ps9134/providers/Microsoft.Sql/servers/ps4307?api-version=2023-02-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZWI5NTFkMzgtMThkOS00NmQ0LTlhMGMtZjY5NGIxNDhjNzZhL3Jlc291cmNlR3JvdXBzL3BzOTEzNC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3BzNDMwNz9hcGktdmVyc2lvbj0yMDIzLTAyLTAxLXByZXZpZXc=", "RequestMethod": "GET", "RequestHeaders": { "x-ms-client-request-id": [ - "1510de7c-27ac-4fb1-b347-a1926f387853" + "5f481b5e-dac5-479a-98ee-083cc5677354" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763", - "Microsoft.Azure.Management.Sql.SqlManagementClient/4.6.0" + "Microsoft.Azure.Management.Sql.SqlManagementClient/4.14.0" ] }, "RequestBody": "", @@ -210,19 +228,16 @@ "no-cache" ], "x-ms-request-id": [ - "90cb881f-0352-4218-8078-19da74d1fad1" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "f9bab536-1723-4367-bfc5-e44131093c7a" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" + "11999" ], "x-ms-correlation-request-id": [ - "869049a8-6d81-4ab2-9442-47238a61dd1a" + "c883095d-ef27-468d-8a3d-203b3143e943" ], "x-ms-routing-request-id": [ - "CENTRALINDIA:20230525T145440Z:869049a8-6d81-4ab2-9442-47238a61dd1a" + "WESTINDIA:20240329T044419Z:c883095d-ef27-468d-8a3d-203b3143e943" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -230,8 +245,14 @@ "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 2117A5D8BB7342E8B21A943D8FB1591F Ref B: MAA201060513035 Ref C: 2024-03-29T04:44:18Z" + ], "Date": [ - "Thu, 25 May 2023 14:54:39 GMT" + "Fri, 29 Mar 2024 04:44:19 GMT" ], "Content-Length": [ "519" @@ -243,22 +264,22 @@ "-1" ] }, - "ResponseBody": "{\r\n \"kind\": \"v12.0\",\r\n \"properties\": {\r\n \"administratorLogin\": \"testusername\",\r\n \"version\": \"12.0\",\r\n \"state\": \"Ready\",\r\n \"fullyQualifiedDomainName\": \"ps3224.database.windows.net\",\r\n \"privateEndpointConnections\": [],\r\n \"minimalTlsVersion\": \"1.2\",\r\n \"publicNetworkAccess\": \"Enabled\",\r\n \"restrictOutboundNetworkAccess\": \"Disabled\",\r\n \"externalGovernanceStatus\": \"Disabled\"\r\n },\r\n \"location\": \"westeurope\",\r\n \"id\": \"/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/ps1228/providers/Microsoft.Sql/servers/ps3224\",\r\n \"name\": \"ps3224\",\r\n \"type\": \"Microsoft.Sql/servers\"\r\n}", + "ResponseBody": "{\r\n \"kind\": \"v12.0\",\r\n \"properties\": {\r\n \"administratorLogin\": \"testusername\",\r\n \"version\": \"12.0\",\r\n \"state\": \"Ready\",\r\n \"fullyQualifiedDomainName\": \"ps4307.database.windows.net\",\r\n \"privateEndpointConnections\": [],\r\n \"minimalTlsVersion\": \"1.2\",\r\n \"publicNetworkAccess\": \"Enabled\",\r\n \"restrictOutboundNetworkAccess\": \"Disabled\",\r\n \"externalGovernanceStatus\": \"Disabled\"\r\n },\r\n \"location\": \"westeurope\",\r\n \"id\": \"/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/resourceGroups/ps9134/providers/Microsoft.Sql/servers/ps4307\",\r\n \"name\": \"ps4307\",\r\n \"type\": \"Microsoft.Sql/servers\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/ps1228/providers/Microsoft.Sql/servers/ps3224?api-version=2022-08-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlR3JvdXBzL3BzMTIyOC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3BzMzIyND9hcGktdmVyc2lvbj0yMDIyLTA4LTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/resourceGroups/ps9134/providers/Microsoft.Sql/servers/ps4307?api-version=2023-02-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZWI5NTFkMzgtMThkOS00NmQ0LTlhMGMtZjY5NGIxNDhjNzZhL3Jlc291cmNlR3JvdXBzL3BzOTEzNC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3BzNDMwNz9hcGktdmVyc2lvbj0yMDIzLTAyLTAxLXByZXZpZXc=", "RequestMethod": "GET", "RequestHeaders": { "x-ms-client-request-id": [ - "a4c70a0f-807b-4f8e-bf23-5bcce41e5105" + "daa99674-1444-4024-959c-116d1e7cf3ce" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763", - "Microsoft.Azure.Management.Sql.SqlManagementClient/4.6.0" + "Microsoft.Azure.Management.Sql.SqlManagementClient/4.14.0" ] }, "RequestBody": "", @@ -270,19 +291,16 @@ "no-cache" ], "x-ms-request-id": [ - "8c587895-7ca7-4cd8-9a44-f1238c600b26" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "3d6d04e5-f806-480c-8cc8-dbeda511eeea" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11985" + "11999" ], "x-ms-correlation-request-id": [ - "74dffe1e-c35f-4633-b7a3-222026054064" + "05343d76-6050-461c-a761-59fd53a2d5f7" ], "x-ms-routing-request-id": [ - "CENTRALINDIA:20230525T145444Z:74dffe1e-c35f-4633-b7a3-222026054064" + "WESTINDIA:20240329T044424Z:05343d76-6050-461c-a761-59fd53a2d5f7" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -290,8 +308,14 @@ "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: B546DFE27DCE439FBDA3E560E9C6F871 Ref B: MAA201060513035 Ref C: 2024-03-29T04:44:23Z" + ], "Date": [ - "Thu, 25 May 2023 14:54:43 GMT" + "Fri, 29 Mar 2024 04:44:24 GMT" ], "Content-Length": [ "519" @@ -303,22 +327,22 @@ "-1" ] }, - "ResponseBody": "{\r\n \"kind\": \"v12.0\",\r\n \"properties\": {\r\n \"administratorLogin\": \"testusername\",\r\n \"version\": \"12.0\",\r\n \"state\": \"Ready\",\r\n \"fullyQualifiedDomainName\": \"ps3224.database.windows.net\",\r\n \"privateEndpointConnections\": [],\r\n \"minimalTlsVersion\": \"1.1\",\r\n \"publicNetworkAccess\": \"Enabled\",\r\n \"restrictOutboundNetworkAccess\": \"Disabled\",\r\n \"externalGovernanceStatus\": \"Disabled\"\r\n },\r\n \"location\": \"westeurope\",\r\n \"id\": \"/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/ps1228/providers/Microsoft.Sql/servers/ps3224\",\r\n \"name\": \"ps3224\",\r\n \"type\": \"Microsoft.Sql/servers\"\r\n}", + "ResponseBody": "{\r\n \"kind\": \"v12.0\",\r\n \"properties\": {\r\n \"administratorLogin\": \"testusername\",\r\n \"version\": \"12.0\",\r\n \"state\": \"Ready\",\r\n \"fullyQualifiedDomainName\": \"ps4307.database.windows.net\",\r\n \"privateEndpointConnections\": [],\r\n \"minimalTlsVersion\": \"1.1\",\r\n \"publicNetworkAccess\": \"Enabled\",\r\n \"restrictOutboundNetworkAccess\": \"Disabled\",\r\n \"externalGovernanceStatus\": \"Disabled\"\r\n },\r\n \"location\": \"westeurope\",\r\n \"id\": \"/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/resourceGroups/ps9134/providers/Microsoft.Sql/servers/ps4307\",\r\n \"name\": \"ps4307\",\r\n \"type\": \"Microsoft.Sql/servers\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/ps1228/providers/Microsoft.Sql/servers/ps3224?api-version=2022-08-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlR3JvdXBzL3BzMTIyOC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3BzMzIyND9hcGktdmVyc2lvbj0yMDIyLTA4LTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/resourceGroups/ps9134/providers/Microsoft.Sql/servers/ps4307?api-version=2023-02-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZWI5NTFkMzgtMThkOS00NmQ0LTlhMGMtZjY5NGIxNDhjNzZhL3Jlc291cmNlR3JvdXBzL3BzOTEzNC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3BzNDMwNz9hcGktdmVyc2lvbj0yMDIzLTAyLTAxLXByZXZpZXc=", "RequestMethod": "GET", "RequestHeaders": { "x-ms-client-request-id": [ - "f381d64c-a743-4d68-992d-e80b4715b68f" + "59c5789e-1002-43c1-8255-84466bf07a76" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763", - "Microsoft.Azure.Management.Sql.SqlManagementClient/4.6.0" + "Microsoft.Azure.Management.Sql.SqlManagementClient/4.14.0" ] }, "RequestBody": "", @@ -330,19 +354,16 @@ "no-cache" ], "x-ms-request-id": [ - "38121303-f107-44ee-8cf2-b5087baf4e32" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "a7a095e9-52e4-4054-9830-71665960e498" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11978" + "11998" ], "x-ms-correlation-request-id": [ - "211452af-0e0a-4ae1-ad2e-c15983a65ebb" + "ab996c4e-b6c0-447e-91ef-818ef923639b" ], "x-ms-routing-request-id": [ - "CENTRALINDIA:20230525T145511Z:211452af-0e0a-4ae1-ad2e-c15983a65ebb" + "WESTINDIA:20240329T044429Z:ab996c4e-b6c0-447e-91ef-818ef923639b" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -350,8 +371,14 @@ "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 0C37B6784E654FB1A66FAFA06810C4A5 Ref B: MAA201060513035 Ref C: 2024-03-29T04:44:29Z" + ], "Date": [ - "Thu, 25 May 2023 14:55:10 GMT" + "Fri, 29 Mar 2024 04:44:29 GMT" ], "Content-Length": [ "520" @@ -363,25 +390,25 @@ "-1" ] }, - "ResponseBody": "{\r\n \"kind\": \"v12.0\",\r\n \"properties\": {\r\n \"administratorLogin\": \"testusername\",\r\n \"version\": \"12.0\",\r\n \"state\": \"Ready\",\r\n \"fullyQualifiedDomainName\": \"ps3224.database.windows.net\",\r\n \"privateEndpointConnections\": [],\r\n \"minimalTlsVersion\": \"None\",\r\n \"publicNetworkAccess\": \"Enabled\",\r\n \"restrictOutboundNetworkAccess\": \"Disabled\",\r\n \"externalGovernanceStatus\": \"Disabled\"\r\n },\r\n \"location\": \"westeurope\",\r\n \"id\": \"/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/ps1228/providers/Microsoft.Sql/servers/ps3224\",\r\n \"name\": \"ps3224\",\r\n \"type\": \"Microsoft.Sql/servers\"\r\n}", + "ResponseBody": "{\r\n \"kind\": \"v12.0\",\r\n \"properties\": {\r\n \"administratorLogin\": \"testusername\",\r\n \"version\": \"12.0\",\r\n \"state\": \"Ready\",\r\n \"fullyQualifiedDomainName\": \"ps4307.database.windows.net\",\r\n \"privateEndpointConnections\": [],\r\n \"minimalTlsVersion\": \"None\",\r\n \"publicNetworkAccess\": \"Enabled\",\r\n \"restrictOutboundNetworkAccess\": \"Disabled\",\r\n \"externalGovernanceStatus\": \"Disabled\"\r\n },\r\n \"location\": \"westeurope\",\r\n \"id\": \"/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/resourceGroups/ps9134/providers/Microsoft.Sql/servers/ps4307\",\r\n \"name\": \"ps4307\",\r\n \"type\": \"Microsoft.Sql/servers\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/ps1228/providers/Microsoft.Sql/servers/ps3224?api-version=2022-08-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlR3JvdXBzL3BzMTIyOC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3BzMzIyND9hcGktdmVyc2lvbj0yMDIyLTA4LTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/resourceGroups/ps9134/providers/Microsoft.Sql/servers/ps4307?api-version=2023-02-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZWI5NTFkMzgtMThkOS00NmQ0LTlhMGMtZjY5NGIxNDhjNzZhL3Jlc291cmNlR3JvdXBzL3BzOTEzNC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3BzNDMwNz9hcGktdmVyc2lvbj0yMDIzLTAyLTAxLXByZXZpZXc=", "RequestMethod": "PUT", "RequestHeaders": { "x-ms-client-request-id": [ - "92e0e3b1-657a-464d-bdb8-d59fc6531420" + "da273bde-f0ca-4299-b8c9-b7031cac48a8" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763", - "Microsoft.Azure.Management.Sql.SqlManagementClient/4.6.0" + "Microsoft.Azure.Management.Sql.SqlManagementClient/4.14.0" ], "Content-Type": [ "application/json; charset=utf-8" @@ -399,28 +426,25 @@ "no-cache" ], "Location": [ - "https://management.azure.com/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/ps1228/providers/Microsoft.Sql/locations/westeurope/serverOperationResults/dd27277e-3c2d-4bc4-aeb3-7fdee58b5a32?api-version=2022-08-01-preview" + "https://management.azure.com/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/resourceGroups/ps9134/providers/Microsoft.Sql/locations/westeurope/serverOperationResults/c552c7bf-4458-43a1-8956-b74241a26aa1?api-version=2023-02-01-preview&t=638472841909615747&c=MIIHADCCBeigAwIBAgITHgPomYee4Qu7BfhItwAAA-iZhzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwMTMwMDYwOTE2WhcNMjUwMTI0MDYwOTE2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOiFRUCW7ME0-8OmweyLAOhLjShprrewSQr0u8xpOevEY7Hp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wFvxRRJUuDALlksDDCXHGEAGdGtTZsXWjVu__5a5Qg5vTXTLYsFC1enFWfA4OapXvg65pAiYwhcLo4ZzzTJe-SyVgS3Qzy-iwre0Nmu7_TadrGUZvwEqDcpDYKiQywIj43CEHY_HuzypP0yvLHzj6Q7tCKl2WK4_F0jV6aHJmwtCxoKkoQw-Tq5whP_p24bn8O8ukcmDWz-oW1T_AWns9pMPSBK9EE-QpqWr-WF3I_QmlgbtjA&h=vW-40_Wik8-wapbMIfJ3IC5jRQ1bC5N8YWJRvsfh700" ], "Retry-After": [ "1" ], "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/ps1228/providers/Microsoft.Sql/locations/westeurope/serverAzureAsyncOperation/dd27277e-3c2d-4bc4-aeb3-7fdee58b5a32?api-version=2022-08-01-preview" + "https://management.azure.com/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/resourceGroups/ps9134/providers/Microsoft.Sql/locations/westeurope/serverAzureAsyncOperation/c552c7bf-4458-43a1-8956-b74241a26aa1?api-version=2023-02-01-preview&t=638472841909459426&c=MIIHADCCBeigAwIBAgITHgPomYee4Qu7BfhItwAAA-iZhzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwMTMwMDYwOTE2WhcNMjUwMTI0MDYwOTE2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOiFRUCW7ME0-8OmweyLAOhLjShprrewSQr0u8xpOevEY7HpOWaMDZbr57UkO48d4CQyGgkYqH6pQ3mDn6Zq95LFOe63LBgJ_Io9Qn9C4OLOJPSTHOcyryRN0Qgr9k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uSWMXV1uZXFf1ClWfw_bsF0UwSVX_KMZrFa0oIN47yEDydqYcsqNb0rF1CCWDRwjooynjyoUyoA3E1WyRsRkSEtlUeJvNS2GUwJbm0Mb2Qz4dyHJ4xgufqmSjNTWUfn0mcyJLe8LeFnyAA75A16nwEikUxgbSyjVI49evMhQ&h=ZOJjnLTjuItpi0w4Kz4pwk9YLS0JsGJiXZhBm9TVZpc" ], "x-ms-request-id": [ - "dd27277e-3c2d-4bc4-aeb3-7fdee58b5a32" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "c552c7bf-4458-43a1-8956-b74241a26aa1" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], "x-ms-correlation-request-id": [ - "44b5d5bc-a689-48dd-9e52-70a8f707e900" + "563d2297-19d1-4037-b836-b3f61e177f37" ], "x-ms-routing-request-id": [ - "CENTRALINDIA:20230525T145317Z:44b5d5bc-a689-48dd-9e52-70a8f707e900" + "WESTINDIA:20240329T044310Z:563d2297-19d1-4037-b836-b3f61e177f37" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -428,11 +452,17 @@ "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: E96D1EAD4ADA44DA8BC86D629053DEBF Ref B: MAA201060513035 Ref C: 2024-03-29T04:43:09Z" + ], "Date": [ - "Thu, 25 May 2023 14:53:16 GMT" + "Fri, 29 Mar 2024 04:43:10 GMT" ], "Content-Length": [ - "73" + "74" ], "Content-Type": [ "application/json; charset=utf-8" @@ -441,25 +471,25 @@ "-1" ] }, - "ResponseBody": "{\r\n \"operation\": \"UpsertLogicalServer\",\r\n \"startTime\": \"2023-05-25T14:53:17.03Z\"\r\n}", + "ResponseBody": "{\r\n \"operation\": \"UpsertLogicalServer\",\r\n \"startTime\": \"2024-03-29T04:43:10.843Z\"\r\n}", "StatusCode": 202 }, { - "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/ps1228/providers/Microsoft.Sql/servers/ps3224?api-version=2022-08-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlR3JvdXBzL3BzMTIyOC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3BzMzIyND9hcGktdmVyc2lvbj0yMDIyLTA4LTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/resourceGroups/ps9134/providers/Microsoft.Sql/servers/ps4307?api-version=2023-02-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZWI5NTFkMzgtMThkOS00NmQ0LTlhMGMtZjY5NGIxNDhjNzZhL3Jlc291cmNlR3JvdXBzL3BzOTEzNC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3BzNDMwNz9hcGktdmVyc2lvbj0yMDIzLTAyLTAxLXByZXZpZXc=", "RequestMethod": "PUT", "RequestHeaders": { "x-ms-client-request-id": [ - "a4c70a0f-807b-4f8e-bf23-5bcce41e5105" + "daa99674-1444-4024-959c-116d1e7cf3ce" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763", - "Microsoft.Azure.Management.Sql.SqlManagementClient/4.6.0" + "Microsoft.Azure.Management.Sql.SqlManagementClient/4.14.0" ], "Content-Type": [ "application/json; charset=utf-8" @@ -477,28 +507,25 @@ "no-cache" ], "Location": [ - "https://management.azure.com/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/ps1228/providers/Microsoft.Sql/locations/westeurope/serverOperationResults/5359e69c-5a97-4449-9b42-603163440d27?api-version=2022-08-01-preview" + "https://management.azure.com/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/resourceGroups/ps9134/providers/Microsoft.Sql/locations/westeurope/serverOperationResults/1f78ac5d-8dc7-4fb0-830b-be94dded66a5?api-version=2023-02-01-preview&t=638472842609850084&c=MIIHADCCBeigAwIBAgITHgPomYee4Qu7BfhItwAAA-iZhzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwMTMwMDYwOTE2WhcNMjUwMTI0MDYwOTE2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOiFRUCW7ME0-8OmweyLAOhLjShprrewSQr0u8xpOevEY7HpOWaMDZbr57UkO48d4CQyGgkYqH6pQ3mDn6Zq95LFOe63LBgJ_Io9Qn9C4OLOJPSTHOcyryRN0Qgr9k3eMiHwFuomN80I7ezdx8FS6zDqQu1Wbjw-yyd9Mbxe_m45O0TPpda-Jt6d9Un5z7dnzlLlrjguCCIzCadGyV2t7rA7qMMGVjTXSal1A_9zCBngC8-p4z1ifaM4LQtC5f6Em6Rmu74zRjW5jFDIKCPhhwAMuJwsHQDfQ2hxnl6qd8cHG5VGCcyQIPrVCIvWB1zTbaYW1fIK-OyrFXwRv6wesk0CAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0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BQUHAwIwDQYJKoZIhvcNAQELBQADggEBADYz_oLBrhGl-i2E4jxv9Z4RNcpp4gaxqVJv_GEzvVtwgx_8P3UrhZ1_mC3wETOajOHWZ44sJEzrSgyljDsF94dPoMGucgCuZewgFqyU_sPQSk0RRb8_sbRpS0dxUHvPIGNKbuoWB_Cd_hn9ZWM5VPdN_OHbromAkwOdgA6BPx7P7Ral6mk-aPegxaMUKMfwhg1m7LjUhci2aRzJJxGJSWoFQoUrGuQcAJp-7KXiWr_hDM69eWh0n6q1i7iTwme6w3Tf3zXGfbwhwYrV8qfGJjrsBraBDq3Z_SHk8SjHSXZpsJ3tyhT8ucyXRcYNWIJZvnjTdcVwmguYnhuTf-_fP5E&s=hmzSWmLSY63H1QGPDBd1YO668WxA4ZL70fdJR0Um8Bqf9Q4hDpdNPoiI4qVZqWcbB4vWu67LVCt3f6oqSVWJHy7Ak_7tqrdF3dO66Uk-A4N7Gx6G5I2rpYmEezRpH2rAQ9HAazpM-pwFt-G2YPeNGG3txCvyimuBOR2i_bYo6f-qaPyb7b6YmGeh-_33SYOKEfMldyN81ntNuGQrKacp80ecG0OFEFQZ221Wk6lP7JEE7K4WANUkYQE7MiIYw9mHg2l0GzhR4yorvmz2UjNsaAv9WCT4AcLZvPKm9OrG7ZWEkSTaBxZJWWLgbWdYaAzmbVucVI-IDXM_RtyGUyBQOQ&h=Y5EpF--YQlnwoXp6xYdk1_4IvBCh56AVANJMo7ZMRHU" ], "Retry-After": [ "1" ], "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/ps1228/providers/Microsoft.Sql/locations/westeurope/serverAzureAsyncOperation/5359e69c-5a97-4449-9b42-603163440d27?api-version=2022-08-01-preview" + "https://management.azure.com/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/resourceGroups/ps9134/providers/Microsoft.Sql/locations/westeurope/serverAzureAsyncOperation/1f78ac5d-8dc7-4fb0-830b-be94dded66a5?api-version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8P3UrhZ1_mC3wETOajOHWZ44sJEzrSgyljDsF94dPoMGucgCuZewgFqyU_sPQSk0RRb8_sbRpS0dxUHvPIGNKbuoWB_Cd_hn9ZWM5VPdN_OHbromAkwOdgA6BPx7P7Ral6mk-aPegxaMUKMfwhg1m7LjUhci2aRzJJxGJSWoFQoUrGuQcAJp-7KXiWr_hDM69eWh0n6q1i7iTwme6w3Tf3zXGfbwhwYrV8qfGJjrsBraBDq3Z_SHk8SjHSXZpsJ3tyhT8ucyXRcYNWIJZvnjTdcVwmguYnhuTf-_fP5E&s=2HJxXLT_8G08znTB2ZtnIiwbLHRQa6F-PiMy-NvkaOQuwr_Slp25kCCx11qp2wyIhGyjvMRIIncuUSUwPV1rH01ul0TZ3byDZ60TJyfCu1RB6COWTJzD1RKKPOj5-pwA2ZQOOW-d0mi-7bCWYH3-WPtd4XgLKKkLJRrUFAo3LiPGpGskUyj8PyxXIB_hlNPUy7WTm5hKczo3xi7Mps05bd7thqpV7xKvKp8Us3dAa6_0Vk2khMxcw8Sj5h7u8jIIipmeMEZdeYN9m_xf3s3AdYJWfzjxKxBwBfRPg2RzCYdxz6efHmf4BgWwvuvvcfcNiO9wHysaHbCCPyZESO51FQ&h=oa66ohpmti74u7_rqKd4aoIFYXMJyDE-cwhIKgP_m_M" ], "x-ms-request-id": [ - "5359e69c-5a97-4449-9b42-603163440d27" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "1f78ac5d-8dc7-4fb0-830b-be94dded66a5" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1198" + "1199" ], "x-ms-correlation-request-id": [ - "960b007a-9852-4b52-9bc0-0415cfdfa0f5" + "d958054c-8f1a-4b69-b900-3e2974636806" ], "x-ms-routing-request-id": [ - "CENTRALINDIA:20230525T145441Z:960b007a-9852-4b52-9bc0-0415cfdfa0f5" + "WESTINDIA:20240329T044421Z:d958054c-8f1a-4b69-b900-3e2974636806" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -506,8 +533,14 @@ "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 46BA1222806D45CDB8076072B78C969D Ref B: MAA201060513035 Ref C: 2024-03-29T04:44:20Z" + ], "Date": [ - "Thu, 25 May 2023 14:54:40 GMT" + "Fri, 29 Mar 2024 04:44:20 GMT" ], "Content-Length": [ "74" @@ -519,25 +552,25 @@ "-1" ] }, - "ResponseBody": "{\r\n \"operation\": \"UpsertLogicalServer\",\r\n \"startTime\": \"2023-05-25T14:54:41.123Z\"\r\n}", + "ResponseBody": "{\r\n \"operation\": \"UpsertLogicalServer\",\r\n \"startTime\": \"2024-03-29T04:44:20.843Z\"\r\n}", "StatusCode": 202 }, { - "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/ps1228/providers/Microsoft.Sql/servers/ps3224?api-version=2022-08-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlR3JvdXBzL3BzMTIyOC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3BzMzIyND9hcGktdmVyc2lvbj0yMDIyLTA4LTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/resourceGroups/ps9134/providers/Microsoft.Sql/servers/ps4307?api-version=2023-02-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZWI5NTFkMzgtMThkOS00NmQ0LTlhMGMtZjY5NGIxNDhjNzZhL3Jlc291cmNlR3JvdXBzL3BzOTEzNC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3BzNDMwNz9hcGktdmVyc2lvbj0yMDIzLTAyLTAxLXByZXZpZXc=", "RequestMethod": "PUT", "RequestHeaders": { "x-ms-client-request-id": [ - "f381d64c-a743-4d68-992d-e80b4715b68f" + "59c5789e-1002-43c1-8255-84466bf07a76" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763", - "Microsoft.Azure.Management.Sql.SqlManagementClient/4.6.0" + "Microsoft.Azure.Management.Sql.SqlManagementClient/4.14.0" ], "Content-Type": [ "application/json; charset=utf-8" @@ -555,28 +588,25 @@ "no-cache" ], "Location": [ - "https://management.azure.com/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/ps1228/providers/Microsoft.Sql/locations/westeurope/serverOperationResults/ac028d22-6135-438b-bd5f-f2028345ae03?api-version=2022-08-01-preview" + "https://management.azure.com/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/resourceGroups/ps9134/providers/Microsoft.Sql/locations/westeurope/serverOperationResults/a02175f7-c105-45a0-bf46-61331b5c7c28?api-version=2023-02-01-preview&t=638472842659163058&c=MIIHADCCBeigAwIBAgITHgPomYee4Qu7BfhItwAAA-iZhzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwMTMwMDYwOTE2WhcNMjUwMTI0MDYwOTE2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOiFRUCW7ME0-8OmweyLAOhLjShprrewSQr0u8xpOevEY7HpOWaMDZbr57UkO48d4CQyGgkYqH6pQ3mDn6Zq95LFOe63LBgJ_Io9Qn9C4OLOJPSTHOcyryRN0Qgr9k3eMiHwFuomN80I7ezdx8FS6zDqQu1Wbjw-yyd9Mbxe_m45O0TPpda-Jt6d9Un5z7dnzlL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0lrwjEyp6YfTSeLhb6pvi61JRqNSspR4jHGStRb_L8hSgE1q8C5j70C9QICO8_Kz6pKh1vKqBoeP2bt2_eNX7qO5w&h=LaOxUx9ywLErXlFuPsCdTr9nnLPPQcaGYjzBqggrLa8" ], "Retry-After": [ "1" ], "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/ps1228/providers/Microsoft.Sql/locations/westeurope/serverAzureAsyncOperation/ac028d22-6135-438b-bd5f-f2028345ae03?api-version=2022-08-01-preview" + "https://management.azure.com/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/resourceGroups/ps9134/providers/Microsoft.Sql/locations/westeurope/serverAzureAsyncOperation/a02175f7-c105-45a0-bf46-61331b5c7c28?api-version=2023-02-01-preview&t=638472842659007022&c=MIIHADCCBeigAwIBAgITHgPomYee4Qu7BfhItwAAA-iZhzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwMTMwMDYwOTE2WhcNMjUwMTI0MDYwOTE2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOiFRUCW7ME0-8OmweyLAOhLjShprrewSQr0u8xpOevEY7HpOWaMDZbr57UkO48d4CQyGgkYqH6pQ3mDn6Zq95LFOe63LBgJ_Io9Qn9C4OLOJPSTHOcyryRN0Qgr9k3eMiHwFuomN80I7ezdx8FS6zDqQu1Wbjw-yyd9Mbxe_m45O0TPpda-Jt6d9Un5z7dnzlLlrjguCCIzCadGyV2t7rA7qMMGVjTXSal1A_9zCBngC8-p4z1ifaM4LQtC5f6Em6Rmu74zRjW5jFDIKCPhhwAMuJwsHQ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po5VQ&h=h92JlYjXfiNGq8Koq163zYKi_IjD_7ZKKtHyuHK_vy8" ], "x-ms-request-id": [ - "ac028d22-6135-438b-bd5f-f2028345ae03" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "a02175f7-c105-45a0-bf46-61331b5c7c28" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1197" + "1199" ], "x-ms-correlation-request-id": [ - "777fd332-ccdd-4566-8cd2-1abe373258d7" + "5a10f4d6-5f76-4029-8275-301cf18d040a" ], "x-ms-routing-request-id": [ - "CENTRALINDIA:20230525T145445Z:777fd332-ccdd-4566-8cd2-1abe373258d7" + "WESTINDIA:20240329T044425Z:5a10f4d6-5f76-4029-8275-301cf18d040a" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -584,11 +614,17 @@ "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: CBB82B3442A34894955F977B9B41D1E6 Ref B: MAA201060513035 Ref C: 2024-03-29T04:44:24Z" + ], "Date": [ - "Thu, 25 May 2023 14:54:44 GMT" + "Fri, 29 Mar 2024 04:44:25 GMT" ], "Content-Length": [ - "73" + "74" ], "Content-Type": [ "application/json; charset=utf-8" @@ -597,19 +633,22 @@ "-1" ] }, - "ResponseBody": "{\r\n \"operation\": \"UpsertLogicalServer\",\r\n \"startTime\": \"2023-05-25T14:54:45.03Z\"\r\n}", + "ResponseBody": "{\r\n \"operation\": \"UpsertLogicalServer\",\r\n \"startTime\": \"2024-03-29T04:44:25.787Z\"\r\n}", "StatusCode": 202 }, { - "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/ps1228/providers/Microsoft.Sql/locations/westeurope/serverAzureAsyncOperation/dd27277e-3c2d-4bc4-aeb3-7fdee58b5a32?api-version=2022-08-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlR3JvdXBzL3BzMTIyOC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9sb2NhdGlvbnMvd2VzdGV1cm9wZS9zZXJ2ZXJBenVyZUFzeW5jT3BlcmF0aW9uL2RkMjcyNzdlLTNjMmQtNGJjNC1hZWIzLTdmZGVlNThiNWEzMj9hcGktdmVyc2lvbj0yMDIyLTA4LTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/resourceGroups/ps9134/providers/Microsoft.Sql/locations/westeurope/serverAzureAsyncOperation/c552c7bf-4458-43a1-8956-b74241a26aa1?api-version=2023-02-01-preview&t=638472841909459426&c=MIIHADCCBeigAwIBAgITHgPomYee4Qu7BfhItwAAA-iZhzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwMTMwMDYwOTE2WhcNMjUwMTI0MDYwOTE2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOiFRUCW7ME0-8OmweyLAOhLjShprrewSQr0u8xpOevEY7HpOWaMDZbr57UkO48d4CQyGgkYqH6pQ3mDn6Zq95LFOe63LBgJ_Io9Qn9C4OLOJPSTHOcyryRN0Qgr9k3eMiHwFuomN80I7ezdx8FS6zDqQu1Wbjw-yyd9Mbxe_m45O0TPpda-Jt6d9Un5z7dnzlLlrjguCCIzCadGyV2t7rA7qMMGVjTXSal1A_9zCBngC8-p4z1ifaM4LQtC5f6Em6Rmu74zRjW5jFDIKCPhhwAMuJwsHQDfQ2hxnl6qd8cHG5VGCcyQIPrVCIvWB1zTbaYW1fIK-OyrFXwRv6wesk0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X21DM3dFVE9hak9IV1o0NHNKRXpyU2d5bGpEc0Y5NGRQb01HdWNnQ3VaZXdnRnF5VV9zUFFTazBSUmI4X3NiUnBTMGR4VUh2UElHTktidW9XQl9DZF9objlaV001VlBkTl9PSGJyb21Ba3dPZGdBNkJQeDdQN1JhbDZtay1hUGVneGFNVUtNZndoZzFtN0xqVWhjaTJhUnpKSnhHSlNXb0ZRb1VyR3VRY0FKcC03S1hpV3JfaERNNjllV2gwbjZxMWk3aVR3bWU2dzNUZjN6WEdmYndod1lyVjhxZkdKanJzQnJhQkRxM1pfU0hrOFNqSFNYWnBzSjN0eWhUOHVjeVhSY1lOV0lKWnZualRkY1Z3bWd1WW5odVRmLV9mUDVFJnM9ZkRlbGZwQzYyS3c0ellIVVVHWDVERWVHbGZ2VjRKQVUxYmRVdXU2dUpTYWFabmdtRzdVeVVXQnhIXzBpc3ZYeGkxa1pxMkJGd2sxU19PVlVaLUJhVUlrZFZLdHBRQTBlVmo5ZzFEWHY0SW9zRnJObEZGZks0b0pnUFdLWkxJVDh2TDNKQnd4aHdSMTBqc0JJWjJMSFU2dzB0NVVQM1I4VXloaUtNYUQ1azZ0eVRZdVNXTVhWMXVaWEZmMUNsV2Z3X2JzRjBVd1NWWF9LTVpyRmEwb0lONDd5RUR5ZHFZY3NxTmIwckYxQ0NXRFJ3am9veW5qeW9VeW9BM0UxV3lSc1JrU0V0bFVlSnZOUzJHVXdKYm0wTWIyUXo0ZHlISjR4Z3VmcW1Tak5UV1VmbjBtY3lKTGU4TGVGbnlBQTc1QTE2bndFaWtVeGdiU3lqVkk0OWV2TWhRJmg9Wk9Kam5MVGp1SXRwaTB3NEt6NHB3azlZTFMwSnNHSmlYWmhCbTlUVlpwYw==", "RequestMethod": "GET", "RequestHeaders": { + "x-ms-client-request-id": [ + "da273bde-f0ca-4299-b8c9-b7031cac48a8" + ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763", - "Microsoft.Azure.Management.Sql.SqlManagementClient/4.6.0" + "Microsoft.Azure.Management.Sql.SqlManagementClient/4.14.0" ] }, "RequestBody": "", @@ -624,19 +663,16 @@ "1" ], "x-ms-request-id": [ - "9e9fbd1a-7c60-42ad-94fa-fa7dd152dd15" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "7772dc88-0bf5-40a0-9f30-6e80c9ea6454" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" + "11999" ], "x-ms-correlation-request-id": [ - "77bda0ba-8a0e-4890-8540-d6e67a746d55" + "2b9143bb-6105-477e-a2fa-2c3dd3076850" ], "x-ms-routing-request-id": [ - "CENTRALINDIA:20230525T145318Z:77bda0ba-8a0e-4890-8540-d6e67a746d55" + "WESTINDIA:20240329T044312Z:2b9143bb-6105-477e-a2fa-2c3dd3076850" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -644,71 +680,17 @@ "X-Content-Type-Options": [ "nosniff" ], - "Date": [ - "Thu, 25 May 2023 14:53:18 GMT" + "X-Cache": [ + "CONFIG_NOCACHE" ], - "Content-Length": [ - "107" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"name\": \"dd27277e-3c2d-4bc4-aeb3-7fdee58b5a32\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2023-05-25T14:53:17.03Z\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/ps1228/providers/Microsoft.Sql/locations/westeurope/serverAzureAsyncOperation/dd27277e-3c2d-4bc4-aeb3-7fdee58b5a32?api-version=2022-08-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlR3JvdXBzL3BzMTIyOC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9sb2NhdGlvbnMvd2VzdGV1cm9wZS9zZXJ2ZXJBenVyZUFzeW5jT3BlcmF0aW9uL2RkMjcyNzdlLTNjMmQtNGJjNC1hZWIzLTdmZGVlNThiNWEzMj9hcGktdmVyc2lvbj0yMDIyLTA4LTAxLXByZXZpZXc=", - "RequestMethod": "GET", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.17763", - "Microsoft.Azure.Management.Sql.SqlManagementClient/4.6.0" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "1" - ], - "x-ms-request-id": [ - "a506646b-94a1-442a-a2fd-9a3fc1f8c69d" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-correlation-request-id": [ - "be9d2672-45da-4d7d-b16d-f4fdbb3aef66" - ], - "x-ms-routing-request-id": [ - "CENTRALINDIA:20230525T145319Z:be9d2672-45da-4d7d-b16d-f4fdbb3aef66" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" + "X-MSEdge-Ref": [ + "Ref A: 15D86C346C6E40AF92B5C37DA64E4AAD Ref B: MAA201060513035 Ref C: 2024-03-29T04:43:12Z" ], "Date": [ - "Thu, 25 May 2023 14:53:19 GMT" + "Fri, 29 Mar 2024 04:43:12 GMT" ], "Content-Length": [ - "107" + "108" ], "Content-Type": [ "application/json; charset=utf-8" @@ -717,19 +699,22 @@ "-1" ] }, - "ResponseBody": "{\r\n \"name\": \"dd27277e-3c2d-4bc4-aeb3-7fdee58b5a32\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2023-05-25T14:53:17.03Z\"\r\n}", + "ResponseBody": "{\r\n \"name\": \"c552c7bf-4458-43a1-8956-b74241a26aa1\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2024-03-29T04:43:10.843Z\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/ps1228/providers/Microsoft.Sql/locations/westeurope/serverAzureAsyncOperation/dd27277e-3c2d-4bc4-aeb3-7fdee58b5a32?api-version=2022-08-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlR3JvdXBzL3BzMTIyOC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9sb2NhdGlvbnMvd2VzdGV1cm9wZS9zZXJ2ZXJBenVyZUFzeW5jT3BlcmF0aW9uL2RkMjcyNzdlLTNjMmQtNGJjNC1hZWIzLTdmZGVlNThiNWEzMj9hcGktdmVyc2lvbj0yMDIyLTA4LTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/resourceGroups/ps9134/providers/Microsoft.Sql/locations/westeurope/serverAzureAsyncOperation/c552c7bf-4458-43a1-8956-b74241a26aa1?api-version=2023-02-01-preview&t=638472841909459426&c=MIIHADCCBeigAwIBAgITHgPomYee4Qu7BfhItwAAA-iZhzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwMTMwMDYwOTE2WhcNMjUwMTI0MDYwOTE2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOiFRUCW7ME0-8OmweyLAOhLjShprrewSQr0u8xpOevEY7HpOWaMDZbr57UkO48d4CQyGgkYqH6pQ3mDn6Zq95L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Y3lKTGU4TGVGbnlBQTc1QTE2bndFaWtVeGdiU3lqVkk0OWV2TWhRJmg9Wk9Kam5MVGp1SXRwaTB3NEt6NHB3azlZTFMwSnNHSmlYWmhCbTlUVlpwYw==", "RequestMethod": "GET", "RequestHeaders": { + "x-ms-client-request-id": [ + "da273bde-f0ca-4299-b8c9-b7031cac48a8" + ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763", - "Microsoft.Azure.Management.Sql.SqlManagementClient/4.6.0" + "Microsoft.Azure.Management.Sql.SqlManagementClient/4.14.0" ] }, "RequestBody": "", @@ -744,19 +729,16 @@ "1" ], "x-ms-request-id": [ - "3f212eac-943b-4445-b05d-6a39e0d55c30" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "1c0e63bb-1e22-4e0e-9943-a50e2dd19fb7" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" + "11999" ], "x-ms-correlation-request-id": [ - "5cdf369c-9b2a-49df-9bf2-14bbd271440d" + "cc3e2a9b-32c1-4574-ad9c-b2859c27bb00" ], "x-ms-routing-request-id": [ - "CENTRALINDIA:20230525T145320Z:5cdf369c-9b2a-49df-9bf2-14bbd271440d" + "WESTINDIA:20240329T044314Z:cc3e2a9b-32c1-4574-ad9c-b2859c27bb00" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -764,11 +746,17 @@ "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 59F2944A2C4045FDBE59EC313924F79D Ref B: MAA201060513035 Ref C: 2024-03-29T04:43:13Z" + ], "Date": [ - "Thu, 25 May 2023 14:53:20 GMT" + "Fri, 29 Mar 2024 04:43:13 GMT" ], "Content-Length": [ - "107" + "108" ], "Content-Type": [ "application/json; charset=utf-8" @@ -777,19 +765,22 @@ "-1" ] }, - "ResponseBody": "{\r\n \"name\": \"dd27277e-3c2d-4bc4-aeb3-7fdee58b5a32\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2023-05-25T14:53:17.03Z\"\r\n}", + "ResponseBody": "{\r\n \"name\": \"c552c7bf-4458-43a1-8956-b74241a26aa1\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2024-03-29T04:43:10.843Z\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/ps1228/providers/Microsoft.Sql/locations/westeurope/serverAzureAsyncOperation/dd27277e-3c2d-4bc4-aeb3-7fdee58b5a32?api-version=2022-08-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlR3JvdXBzL3BzMTIyOC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9sb2NhdGlvbnMvd2VzdGV1cm9wZS9zZXJ2ZXJBenVyZUFzeW5jT3BlcmF0aW9uL2RkMjcyNzdlLTNjMmQtNGJjNC1hZWIzLTdmZGVlNThiNWEzMj9hcGktdmVyc2lvbj0yMDIyLTA4LTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/resourceGroups/ps9134/providers/Microsoft.Sql/locations/westeurope/serverAzureAsyncOperation/c552c7bf-4458-43a1-8956-b74241a26aa1?api-version=2023-02-01-preview&t=638472841909459426&c=MIIHADCCBeigAwIBAgITHgPomYee4Qu7BfhItwAAA-iZhzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwMTMwMDYwOTE2WhcNMjUwMTI0MDYwOTE2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tY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jBVd1NWWF9LTVpyRmEwb0lONDd5RUR5ZHFZY3NxTmIwckYxQ0NXRFJ3am9veW5qeW9VeW9BM0UxV3lSc1JrU0V0bFVlSnZOUzJHVXdKYm0wTWIyUXo0ZHlISjR4Z3VmcW1Tak5UV1VmbjBtY3lKTGU4TGVGbnlBQTc1QTE2bndFaWtVeGdiU3lqVkk0OWV2TWhRJmg9Wk9Kam5MVGp1SXRwaTB3NEt6NHB3azlZTFMwSnNHSmlYWmhCbTlUVlpwYw==", "RequestMethod": "GET", "RequestHeaders": { + "x-ms-client-request-id": [ + "da273bde-f0ca-4299-b8c9-b7031cac48a8" + ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763", - "Microsoft.Azure.Management.Sql.SqlManagementClient/4.6.0" + "Microsoft.Azure.Management.Sql.SqlManagementClient/4.14.0" ] }, "RequestBody": "", @@ -804,19 +795,16 @@ "20" ], "x-ms-request-id": [ - "37c109ca-b20b-4179-a46a-45c09a731d99" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "2e62d569-fb80-4d51-8292-be1927832e75" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" + "11999" ], "x-ms-correlation-request-id": [ - "e8564bf8-716d-4269-9cf5-355342b942f0" + "f1d10bde-1eba-4e29-8e0b-1e277dbc44ad" ], "x-ms-routing-request-id": [ - "CENTRALINDIA:20230525T145322Z:e8564bf8-716d-4269-9cf5-355342b942f0" + "WESTINDIA:20240329T044315Z:f1d10bde-1eba-4e29-8e0b-1e277dbc44ad" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -824,11 +812,17 @@ "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: B6F0DC295EE5460BAD73CAD12A3C6EDA Ref B: MAA201060513035 Ref C: 2024-03-29T04:43:15Z" + ], "Date": [ - "Thu, 25 May 2023 14:53:21 GMT" + "Fri, 29 Mar 2024 04:43:15 GMT" ], "Content-Length": [ - "107" + "108" ], "Content-Type": [ "application/json; charset=utf-8" @@ -837,19 +831,22 @@ "-1" ] }, - "ResponseBody": "{\r\n \"name\": \"dd27277e-3c2d-4bc4-aeb3-7fdee58b5a32\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2023-05-25T14:53:17.03Z\"\r\n}", + "ResponseBody": "{\r\n \"name\": \"c552c7bf-4458-43a1-8956-b74241a26aa1\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2024-03-29T04:43:10.843Z\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/ps1228/providers/Microsoft.Sql/locations/westeurope/serverAzureAsyncOperation/dd27277e-3c2d-4bc4-aeb3-7fdee58b5a32?api-version=2022-08-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlR3JvdXBzL3BzMTIyOC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9sb2NhdGlvbnMvd2VzdGV1cm9wZS9zZXJ2ZXJBenVyZUFzeW5jT3BlcmF0aW9uL2RkMjcyNzdlLTNjMmQtNGJjNC1hZWIzLTdmZGVlNThiNWEzMj9hcGktdmVyc2lvbj0yMDIyLTA4LTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/resourceGroups/ps9134/providers/Microsoft.Sql/locations/westeurope/serverAzureAsyncOperation/c552c7bf-4458-43a1-8956-b74241a26aa1?api-version=2023-02-01-preview&t=638472841909459426&c=MIIHADCCBeigAwIBAgITHgPomYee4Qu7BfhItwAAA-iZhzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDV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Vmo5ZzFEWHY0SW9zRnJObEZGZks0b0pnUFdLWkxJVDh2TDNKQnd4aHdSMTBqc0JJWjJMSFU2dzB0NVVQM1I4VXloaUtNYUQ1azZ0eVRZdVNXTVhWMXVaWEZmMUNsV2Z3X2JzRjBVd1NWWF9LTVpyRmEwb0lONDd5RUR5ZHFZY3NxTmIwckYxQ0NXRFJ3am9veW5qeW9VeW9BM0UxV3lSc1JrU0V0bFVlSnZOUzJHVXdKYm0wTWIyUXo0ZHlISjR4Z3VmcW1Tak5UV1VmbjBtY3lKTGU4TGVGbnlBQTc1QTE2bndFaWtVeGdiU3lqVkk0OWV2TWhRJmg9Wk9Kam5MVGp1SXRwaTB3NEt6NHB3azlZTFMwSnNHSmlYWmhCbTlUVlpwYw==", "RequestMethod": "GET", "RequestHeaders": { + "x-ms-client-request-id": [ + "da273bde-f0ca-4299-b8c9-b7031cac48a8" + ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763", - "Microsoft.Azure.Management.Sql.SqlManagementClient/4.6.0" + "Microsoft.Azure.Management.Sql.SqlManagementClient/4.14.0" ] }, "RequestBody": "", @@ -864,19 +861,16 @@ "20" ], "x-ms-request-id": [ - "c51625d9-baa6-4dd5-b630-23dd63f4bf66" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "314e0d21-5df0-4446-96c0-9256aab37c96" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" + "11999" ], "x-ms-correlation-request-id": [ - "5814aa94-d984-4664-b173-c14370330dd5" + "fe010910-abd1-4bc9-acb8-03c2fa4918a8" ], "x-ms-routing-request-id": [ - "CENTRALINDIA:20230525T145342Z:5814aa94-d984-4664-b173-c14370330dd5" + "WESTINDIA:20240329T044336Z:fe010910-abd1-4bc9-acb8-03c2fa4918a8" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -884,11 +878,17 @@ "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 7E17BDFC2CD849EAB2B4002D63CEC122 Ref B: MAA201060513035 Ref C: 2024-03-29T04:43:36Z" + ], "Date": [ - "Thu, 25 May 2023 14:53:41 GMT" + "Fri, 29 Mar 2024 04:43:36 GMT" ], "Content-Length": [ - "107" + "108" ], "Content-Type": [ "application/json; charset=utf-8" @@ -897,19 +897,22 @@ "-1" ] }, - "ResponseBody": "{\r\n \"name\": \"dd27277e-3c2d-4bc4-aeb3-7fdee58b5a32\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2023-05-25T14:53:17.03Z\"\r\n}", + "ResponseBody": "{\r\n \"name\": \"c552c7bf-4458-43a1-8956-b74241a26aa1\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2024-03-29T04:43:10.843Z\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/ps1228/providers/Microsoft.Sql/locations/westeurope/serverAzureAsyncOperation/dd27277e-3c2d-4bc4-aeb3-7fdee58b5a32?api-version=2022-08-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlR3JvdXBzL3BzMTIyOC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9sb2NhdGlvbnMvd2VzdGV1cm9wZS9zZXJ2ZXJBenVyZUFzeW5jT3BlcmF0aW9uL2RkMjcyNzdlLTNjMmQtNGJjNC1hZWIzLTdmZGVlNThiNWEzMj9hcGktdmVyc2lvbj0yMDIyLTA4LTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/resourceGroups/ps9134/providers/Microsoft.Sql/locations/westeurope/serverAzureAsyncOperation/c552c7bf-4458-43a1-8956-b74241a26aa1?api-version=2023-02-01-preview&t=638472841909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M9ZkRlbGZwQzYyS3c0ellIVVVHWDVERWVHbGZ2VjRKQVUxYmRVdXU2dUpTYWFabmdtRzdVeVVXQnhIXzBpc3ZYeGkxa1pxMkJGd2sxU19PVlVaLUJhVUlrZFZLdHBRQTBlVmo5ZzFEWHY0SW9zRnJObEZGZks0b0pnUFdLWkxJVDh2TDNKQnd4aHdSMTBqc0JJWjJMSFU2dzB0NVVQM1I4VXloaUtNYUQ1azZ0eVRZdVNXTVhWMXVaWEZmMUNsV2Z3X2JzRjBVd1NWWF9LTVpyRmEwb0lONDd5RUR5ZHFZY3NxTmIwckYxQ0NXRFJ3am9veW5qeW9VeW9BM0UxV3lSc1JrU0V0bFVlSnZOUzJHVXdKYm0wTWIyUXo0ZHlISjR4Z3VmcW1Tak5UV1VmbjBtY3lKTGU4TGVGbnlBQTc1QTE2bndFaWtVeGdiU3lqVkk0OWV2TWhRJmg9Wk9Kam5MVGp1SXRwaTB3NEt6NHB3azlZTFMwSnNHSmlYWmhCbTlUVlpwYw==", "RequestMethod": "GET", "RequestHeaders": { + "x-ms-client-request-id": [ + "da273bde-f0ca-4299-b8c9-b7031cac48a8" + ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763", - "Microsoft.Azure.Management.Sql.SqlManagementClient/4.6.0" + "Microsoft.Azure.Management.Sql.SqlManagementClient/4.14.0" ] }, "RequestBody": "", @@ -924,19 +927,16 @@ "20" ], "x-ms-request-id": [ - "18e509b9-2680-4c71-80e6-719297eca5b6" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "bb886b1e-50d4-47d8-aa0b-fce7f5836f3e" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" + "11999" ], "x-ms-correlation-request-id": [ - "e7a07055-ab8e-44c3-9069-7d5c16a51849" + "133096e7-bda6-4c98-8b1c-ba2737443b61" ], "x-ms-routing-request-id": [ - "CENTRALINDIA:20230525T145403Z:e7a07055-ab8e-44c3-9069-7d5c16a51849" + "WESTINDIA:20240329T044357Z:133096e7-bda6-4c98-8b1c-ba2737443b61" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -944,71 +944,17 @@ "X-Content-Type-Options": [ "nosniff" ], - "Date": [ - "Thu, 25 May 2023 14:54:02 GMT" - ], - "Content-Length": [ - "107" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"name\": \"dd27277e-3c2d-4bc4-aeb3-7fdee58b5a32\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2023-05-25T14:53:17.03Z\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/ps1228/providers/Microsoft.Sql/locations/westeurope/serverAzureAsyncOperation/dd27277e-3c2d-4bc4-aeb3-7fdee58b5a32?api-version=2022-08-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlR3JvdXBzL3BzMTIyOC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9sb2NhdGlvbnMvd2VzdGV1cm9wZS9zZXJ2ZXJBenVyZUFzeW5jT3BlcmF0aW9uL2RkMjcyNzdlLTNjMmQtNGJjNC1hZWIzLTdmZGVlNThiNWEzMj9hcGktdmVyc2lvbj0yMDIyLTA4LTAxLXByZXZpZXc=", - "RequestMethod": "GET", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.17763", - "Microsoft.Azure.Management.Sql.SqlManagementClient/4.6.0" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "x-ms-request-id": [ - "3eacbb78-82b0-4af9-8e1b-71ed81999007" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-correlation-request-id": [ - "a16f1849-c487-4010-82e8-8812928021b9" - ], - "x-ms-routing-request-id": [ - "CENTRALINDIA:20230525T145423Z:a16f1849-c487-4010-82e8-8812928021b9" + "X-Cache": [ + "CONFIG_NOCACHE" ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" + "X-MSEdge-Ref": [ + "Ref A: A3307669B36543EFA7A74C7D0E9364C7 Ref B: MAA201060513035 Ref C: 2024-03-29T04:43:56Z" ], "Date": [ - "Thu, 25 May 2023 14:54:23 GMT" + "Fri, 29 Mar 2024 04:43:57 GMT" ], "Content-Length": [ - "107" + "108" ], "Content-Type": [ "application/json; charset=utf-8" @@ -1017,19 +963,22 @@ "-1" ] }, - "ResponseBody": "{\r\n \"name\": \"dd27277e-3c2d-4bc4-aeb3-7fdee58b5a32\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2023-05-25T14:53:17.03Z\"\r\n}", + "ResponseBody": "{\r\n \"name\": \"c552c7bf-4458-43a1-8956-b74241a26aa1\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2024-03-29T04:43:10.843Z\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/ps1228/providers/Microsoft.Sql/locations/westeurope/serverAzureAsyncOperation/dd27277e-3c2d-4bc4-aeb3-7fdee58b5a32?api-version=2022-08-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlR3JvdXBzL3BzMTIyOC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9sb2NhdGlvbnMvd2VzdGV1cm9wZS9zZXJ2ZXJBenVyZUFzeW5jT3BlcmF0aW9uL2RkMjcyNzdlLTNjMmQtNGJjNC1hZWIzLTdmZGVlNThiNWEzMj9hcGktdmVyc2lvbj0yMDIyLTA4LTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/resourceGroups/ps9134/providers/Microsoft.Sql/locations/westeurope/serverAzureAsyncOperation/c552c7bf-4458-43a1-8956-b74241a26aa1?api-version=2023-02-01-preview&t=638472841909459426&c=MIIHADCCBeigAwIBAgITHgPomYee4Qu7BfhItwAAA-iZhzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwMTMwMDYwOTE2WhcNMjUwMTI0MDYwOTE2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOiFRUCW7ME0-8OmweyLAOhLjShprrewSQr0u8xpOevEY7HpOWaMDZbr57UkO48d4CQyGgkYqH6pQ3mDn6Zq95LFOe63LBgJ_Io9Qn9C4OLOJPSTHOcyryRN0Qgr9k3eMiHwFuomN80I7ezdx8FS6zDqQu1Wbjw-yyd9Mbxe_m45O0TPpda-Jt6d9Un5z7dnzlLlrjguCCIzCadGyV2t7rA7qMMGVjTXSal1A_9zCBngC8-p4z1ifaM4LQtC5f6Em6Rmu74zRjW5jFDIKCPhhwAMuJwsHQDfQ2hxnl6qd8cHG5VGCcyQIPrVCIvWB1zTbaYW1fIK-OyrFXwRv6wesk0CAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFgg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dBNkJQeDdQN1JhbDZtay1hUGVneGFNVUtNZndoZzFtN0xqVWhjaTJhUnpKSnhHSlNXb0ZRb1VyR3VRY0FKcC03S1hpV3JfaERNNjllV2gwbjZxMWk3aVR3bWU2dzNUZjN6WEdmYndod1lyVjhxZkdKanJzQnJhQkRxM1pfU0hrOFNqSFNYWnBzSjN0eWhUOHVjeVhSY1lOV0lKWnZualRkY1Z3bWd1WW5odVRmLV9mUDVFJnM9ZkRlbGZwQzYyS3c0ellIVVVHWDVERWVHbGZ2VjRKQVUxYmRVdXU2dUpTYWFabmdtRzdVeVVXQnhIXzBpc3ZYeGkxa1pxMkJGd2sxU19PVlVaLUJhVUlrZFZLdHBRQTBlVmo5ZzFEWHY0SW9zRnJObEZGZks0b0pnUFdLWkxJVDh2TDNKQnd4aHdSMTBqc0JJWjJMSFU2dzB0NVVQM1I4VXloaUtNYUQ1azZ0eVRZdVNXTVhWMXVaWEZmMUNsV2Z3X2JzRjBVd1NWWF9LTVpyRmEwb0lONDd5RUR5ZHFZY3NxTmIwckYxQ0NXRFJ3am9veW5qeW9VeW9BM0UxV3lSc1JrU0V0bFVlSnZOUzJHVXdKYm0wTWIyUXo0ZHlISjR4Z3VmcW1Tak5UV1VmbjBtY3lKTGU4TGVGbnlBQTc1QTE2bndFaWtVeGdiU3lqVkk0OWV2TWhRJmg9Wk9Kam5MVGp1SXRwaTB3NEt6NHB3azlZTFMwSnNHSmlYWmhCbTlUVlpwYw==", "RequestMethod": "GET", "RequestHeaders": { + "x-ms-client-request-id": [ + "da273bde-f0ca-4299-b8c9-b7031cac48a8" + ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763", - "Microsoft.Azure.Management.Sql.SqlManagementClient/4.6.0" + "Microsoft.Azure.Management.Sql.SqlManagementClient/4.14.0" ] }, "RequestBody": "", @@ -1044,19 +993,16 @@ "15" ], "x-ms-request-id": [ - "f0d38579-9620-472b-975c-1e1606c5b052" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "2f1be168-ab48-4792-9b74-5644cf29e133" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" + "11999" ], "x-ms-correlation-request-id": [ - "2e54db16-62c6-4fc0-bbc8-d042a0e3ef71" + "8946dfc2-1979-4cd4-8ec3-73bd3f20b2a6" ], "x-ms-routing-request-id": [ - "CENTRALINDIA:20230525T145439Z:2e54db16-62c6-4fc0-bbc8-d042a0e3ef71" + "WESTINDIA:20240329T044417Z:8946dfc2-1979-4cd4-8ec3-73bd3f20b2a6" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1064,11 +1010,17 @@ "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 280BC9B8AF6C43FB8F554B34CBF8DA26 Ref B: MAA201060513035 Ref C: 2024-03-29T04:44:17Z" + ], "Date": [ - "Thu, 25 May 2023 14:54:38 GMT" + "Fri, 29 Mar 2024 04:44:17 GMT" ], "Content-Length": [ - "106" + "107" ], "Content-Type": [ "application/json; charset=utf-8" @@ -1077,25 +1029,25 @@ "-1" ] }, - "ResponseBody": "{\r\n \"name\": \"dd27277e-3c2d-4bc4-aeb3-7fdee58b5a32\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2023-05-25T14:53:17.03Z\"\r\n}", + "ResponseBody": "{\r\n \"name\": \"c552c7bf-4458-43a1-8956-b74241a26aa1\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2024-03-29T04:43:10.843Z\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/ps1228/providers/Microsoft.Sql/servers/ps3224?$expand=administrators%2Factivedirectory&api-version=2022-08-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlR3JvdXBzL3BzMTIyOC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3BzMzIyND8kZXhwYW5kPWFkbWluaXN0cmF0b3JzJTJGYWN0aXZlZGlyZWN0b3J5JmFwaS12ZXJzaW9uPTIwMjItMDgtMDEtcHJldmlldw==", + "RequestUri": "/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/resourceGroups/ps9134/providers/Microsoft.Sql/servers/ps4307?$expand=administrators%2Factivedirectory&api-version=2023-02-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZWI5NTFkMzgtMThkOS00NmQ0LTlhMGMtZjY5NGIxNDhjNzZhL3Jlc291cmNlR3JvdXBzL3BzOTEzNC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3BzNDMwNz8kZXhwYW5kPWFkbWluaXN0cmF0b3JzJTJGYWN0aXZlZGlyZWN0b3J5JmFwaS12ZXJzaW9uPTIwMjMtMDItMDEtcHJldmlldw==", "RequestMethod": "GET", "RequestHeaders": { "x-ms-client-request-id": [ - "a4c70a0f-807b-4f8e-bf23-5bcce41e5105" + "daa99674-1444-4024-959c-116d1e7cf3ce" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763", - "Microsoft.Azure.Management.Sql.SqlManagementClient/4.6.0" + "Microsoft.Azure.Management.Sql.SqlManagementClient/4.14.0" ] }, "RequestBody": "", @@ -1107,19 +1059,16 @@ "no-cache" ], "x-ms-request-id": [ - "45a61e8e-40c4-49e9-b573-b817c740fbd6" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "7bccb19b-3622-4513-8b5a-8dca7c8547e2" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11988" + "11999" ], "x-ms-correlation-request-id": [ - "2c4260ec-d14a-45d3-87f1-1020fb3c217a" + "1e67c3d5-36df-4315-b7ac-098793c12f9a" ], "x-ms-routing-request-id": [ - "CENTRALINDIA:20230525T145440Z:2c4260ec-d14a-45d3-87f1-1020fb3c217a" + "WESTINDIA:20240329T044420Z:1e67c3d5-36df-4315-b7ac-098793c12f9a" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1127,8 +1076,14 @@ "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: C2F280D7509F4AABBA74CAF7AA07C4C1 Ref B: MAA201060513035 Ref C: 2024-03-29T04:44:19Z" + ], "Date": [ - "Thu, 25 May 2023 14:54:40 GMT" + "Fri, 29 Mar 2024 04:44:20 GMT" ], "Content-Length": [ "519" @@ -1140,25 +1095,25 @@ "-1" ] }, - "ResponseBody": "{\r\n \"kind\": \"v12.0\",\r\n \"properties\": {\r\n \"administratorLogin\": \"testusername\",\r\n \"version\": \"12.0\",\r\n \"state\": \"Ready\",\r\n \"fullyQualifiedDomainName\": \"ps3224.database.windows.net\",\r\n \"privateEndpointConnections\": [],\r\n \"minimalTlsVersion\": \"1.2\",\r\n \"publicNetworkAccess\": \"Enabled\",\r\n \"restrictOutboundNetworkAccess\": \"Disabled\",\r\n \"externalGovernanceStatus\": \"Disabled\"\r\n },\r\n \"location\": \"westeurope\",\r\n \"id\": \"/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/ps1228/providers/Microsoft.Sql/servers/ps3224\",\r\n \"name\": \"ps3224\",\r\n \"type\": \"Microsoft.Sql/servers\"\r\n}", + "ResponseBody": "{\r\n \"kind\": \"v12.0\",\r\n \"properties\": {\r\n \"administratorLogin\": \"testusername\",\r\n \"version\": \"12.0\",\r\n \"state\": \"Ready\",\r\n \"fullyQualifiedDomainName\": \"ps4307.database.windows.net\",\r\n \"privateEndpointConnections\": [],\r\n \"minimalTlsVersion\": \"1.2\",\r\n \"publicNetworkAccess\": \"Enabled\",\r\n \"restrictOutboundNetworkAccess\": \"Disabled\",\r\n \"externalGovernanceStatus\": \"Disabled\"\r\n },\r\n \"location\": \"westeurope\",\r\n \"id\": \"/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/resourceGroups/ps9134/providers/Microsoft.Sql/servers/ps4307\",\r\n \"name\": \"ps4307\",\r\n \"type\": \"Microsoft.Sql/servers\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/ps1228/providers/Microsoft.Sql/servers/ps3224?$expand=administrators%2Factivedirectory&api-version=2022-08-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlR3JvdXBzL3BzMTIyOC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3BzMzIyND8kZXhwYW5kPWFkbWluaXN0cmF0b3JzJTJGYWN0aXZlZGlyZWN0b3J5JmFwaS12ZXJzaW9uPTIwMjItMDgtMDEtcHJldmlldw==", + "RequestUri": "/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/resourceGroups/ps9134/providers/Microsoft.Sql/servers/ps4307?$expand=administrators%2Factivedirectory&api-version=2023-02-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZWI5NTFkMzgtMThkOS00NmQ0LTlhMGMtZjY5NGIxNDhjNzZhL3Jlc291cmNlR3JvdXBzL3BzOTEzNC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3BzNDMwNz8kZXhwYW5kPWFkbWluaXN0cmF0b3JzJTJGYWN0aXZlZGlyZWN0b3J5JmFwaS12ZXJzaW9uPTIwMjMtMDItMDEtcHJldmlldw==", "RequestMethod": "GET", "RequestHeaders": { "x-ms-client-request-id": [ - "f381d64c-a743-4d68-992d-e80b4715b68f" + "59c5789e-1002-43c1-8255-84466bf07a76" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763", - "Microsoft.Azure.Management.Sql.SqlManagementClient/4.6.0" + "Microsoft.Azure.Management.Sql.SqlManagementClient/4.14.0" ] }, "RequestBody": "", @@ -1170,19 +1125,16 @@ "no-cache" ], "x-ms-request-id": [ - "6d49036b-0b13-4762-97e7-99005e79ab82" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "6d4fb351-c125-401a-a995-605fd4f8a9bd" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11984" + "11997" ], "x-ms-correlation-request-id": [ - "77f42884-b473-4d8b-a24f-7924280d99f9" + "9f1efa74-c226-41f0-a1a2-a7ece53d2833" ], "x-ms-routing-request-id": [ - "CENTRALINDIA:20230525T145444Z:77f42884-b473-4d8b-a24f-7924280d99f9" + "WESTINDIA:20240329T044424Z:9f1efa74-c226-41f0-a1a2-a7ece53d2833" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1190,8 +1142,14 @@ "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 853BBA3B5EEC4A0AAF06B6FAF88640D5 Ref B: MAA201060513035 Ref C: 2024-03-29T04:44:24Z" + ], "Date": [ - "Thu, 25 May 2023 14:54:44 GMT" + "Fri, 29 Mar 2024 04:44:24 GMT" ], "Content-Length": [ "519" @@ -1203,22 +1161,22 @@ "-1" ] }, - "ResponseBody": "{\r\n \"kind\": \"v12.0\",\r\n \"properties\": {\r\n \"administratorLogin\": \"testusername\",\r\n \"version\": \"12.0\",\r\n \"state\": \"Ready\",\r\n \"fullyQualifiedDomainName\": \"ps3224.database.windows.net\",\r\n \"privateEndpointConnections\": [],\r\n \"minimalTlsVersion\": \"1.1\",\r\n \"publicNetworkAccess\": \"Enabled\",\r\n \"restrictOutboundNetworkAccess\": \"Disabled\",\r\n \"externalGovernanceStatus\": \"Disabled\"\r\n },\r\n \"location\": \"westeurope\",\r\n \"id\": \"/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/ps1228/providers/Microsoft.Sql/servers/ps3224\",\r\n \"name\": \"ps3224\",\r\n \"type\": \"Microsoft.Sql/servers\"\r\n}", + "ResponseBody": "{\r\n \"kind\": \"v12.0\",\r\n \"properties\": {\r\n \"administratorLogin\": \"testusername\",\r\n \"version\": \"12.0\",\r\n \"state\": \"Ready\",\r\n \"fullyQualifiedDomainName\": \"ps4307.database.windows.net\",\r\n \"privateEndpointConnections\": [],\r\n \"minimalTlsVersion\": \"1.1\",\r\n \"publicNetworkAccess\": \"Enabled\",\r\n \"restrictOutboundNetworkAccess\": \"Disabled\",\r\n \"externalGovernanceStatus\": \"Disabled\"\r\n },\r\n \"location\": \"westeurope\",\r\n \"id\": \"/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/resourceGroups/ps9134/providers/Microsoft.Sql/servers/ps4307\",\r\n \"name\": \"ps4307\",\r\n \"type\": \"Microsoft.Sql/servers\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/ps1228/providers/Microsoft.Sql/locations/westeurope/serverAzureAsyncOperation/5359e69c-5a97-4449-9b42-603163440d27?api-version=2022-08-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlR3JvdXBzL3BzMTIyOC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9sb2NhdGlvbnMvd2VzdGV1cm9wZS9zZXJ2ZXJBenVyZUFzeW5jT3BlcmF0aW9uLzUzNTllNjljLTVhOTctNDQ0OS05YjQyLTYwMzE2MzQ0MGQyNz9hcGktdmVyc2lvbj0yMDIyLTA4LTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/resourceGroups/ps9134/providers/Microsoft.Sql/locations/westeurope/serverAzureAsyncOperation/1f78ac5d-8dc7-4fb0-830b-be94dded66a5?api-version=2023-02-01-preview&t=638472842609693827&c=MIIHADCCBeigAwIBAgITHgPomYee4Qu7BfhItwAAA-iZhzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwMTMwMDYwOTE2WhcNMjUwMTI0MDYwOTE2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOiFRUCW7ME0-8OmweyLAOhLjShprrewSQr0u8xpOevEY7HpOWaMDZbr57UkO48d4CQyGgkYqH6pQ3mDn6Zq95LFOe63LBgJ_Io9Qn9C4OLOJPSTHOcyryRN0Qgr9k3eMiHwFuomN80I7ezdx8FS6zDqQu1Wbjw-yyd9Mbxe_m45O0TPpda-Jt6d9Un5z7dnzlLlrjguCCIzCadGyV2t7rA7qMMGVjTXSal1A_9zCBngC8-p4z1ifaM4LQtC5f6Em6Rmu74zRjW5jFDIKCPhhwAMuJwsHQDfQ2hxnl6qd8cHG5VGCcyQIPrVCIvWB1zTbaYW1fIK-OyrFXwRv6wesk0CAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5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k3aVR3bWU2dzNUZjN6WEdmYndod1lyVjhxZkdKanJzQnJhQkRxM1pfU0hrOFNqSFNYWnBzSjN0eWhUOHVjeVhSY1lOV0lKWnZualRkY1Z3bWd1WW5odVRmLV9mUDVFJnM9MkhKeFhMVF84RzA4em5UQjJadG5JaXdiTEhSUWE2Ri1QaU15LU52a2FPUXV3cl9TbHAyNWtDQ3gxMXFwMnd5SWhHeWp2TVJJSW5jdVVTVXdQVjFySDAxdWwwVFozYnlEWjYwVEp5ZkN1MVJCNkNPV1RKekQxUktLUE9qNS1wd0EyWlFPT1ctZDBtaS03YkNXWUgzLVdQdGQ0WGdMS0trTEpSclVGQW8zTGlQR3BHc2tVeWo4UHl4WElCX2hsTlBVeTdXVG01aEtjem8zeGk3TXBzMDViZDd0aHFwVjd4S3ZLcDhVczNkQWE2XzBWazJraE14Y3c4U2o1aDd1OGpJSWlwbWVNRVpkZVlOOW1feGYzczNBZFlKV2Z6anhLeEJ3QmZSUGcyUnpDWWR4ejZlZkhtZjRCZ1d3dnV2dmNmY05pTzl3SHlzYUhiQ0NQeVpFU081MUZRJmg9b2E2Nm9ocG10aTc0dTdfcnFLZDRhb0lGWVhNSnlERS1jd2hJS2dQX21fTQ==", "RequestMethod": "GET", "RequestHeaders": { "x-ms-client-request-id": [ - "a4c70a0f-807b-4f8e-bf23-5bcce41e5105" + "daa99674-1444-4024-959c-116d1e7cf3ce" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763", - "Microsoft.Azure.Management.Sql.SqlManagementClient/4.6.0" + "Microsoft.Azure.Management.Sql.SqlManagementClient/4.14.0" ] }, "RequestBody": "", @@ -1233,19 +1191,16 @@ "1" ], "x-ms-request-id": [ - "2c62781c-45b0-4ae1-8267-6e811eb2f47a" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "e6b84600-9a8b-4a94-b6d1-73949bb87620" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11987" + "11998" ], "x-ms-correlation-request-id": [ - "e7d3027a-ee30-4120-9853-b477885dbfc8" + "ae16a54c-ef5b-4895-8a65-8ac38fab0201" ], "x-ms-routing-request-id": [ - "CENTRALINDIA:20230525T145442Z:e7d3027a-ee30-4120-9853-b477885dbfc8" + "WESTINDIA:20240329T044422Z:ae16a54c-ef5b-4895-8a65-8ac38fab0201" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1253,8 +1208,14 @@ "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 7F34B77C2550438DAE300ED53DD91B30 Ref B: MAA201060513035 Ref C: 2024-03-29T04:44:22Z" + ], "Date": [ - "Thu, 25 May 2023 14:54:42 GMT" + "Fri, 29 Mar 2024 04:44:22 GMT" ], "Content-Length": [ "108" @@ -1266,22 +1227,22 @@ "-1" ] }, - "ResponseBody": "{\r\n \"name\": \"5359e69c-5a97-4449-9b42-603163440d27\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2023-05-25T14:54:41.123Z\"\r\n}", + "ResponseBody": "{\r\n \"name\": \"1f78ac5d-8dc7-4fb0-830b-be94dded66a5\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2024-03-29T04:44:20.843Z\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/ps1228/providers/Microsoft.Sql/locations/westeurope/serverAzureAsyncOperation/5359e69c-5a97-4449-9b42-603163440d27?api-version=2022-08-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlR3JvdXBzL3BzMTIyOC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9sb2NhdGlvbnMvd2VzdGV1cm9wZS9zZXJ2ZXJBenVyZUFzeW5jT3BlcmF0aW9uLzUzNTllNjljLTVhOTctNDQ0OS05YjQyLTYwMzE2MzQ0MGQyNz9hcGktdmVyc2lvbj0yMDIyLTA4LTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/resourceGroups/ps9134/providers/Microsoft.Sql/locations/westeurope/serverAzureAsyncOperation/1f78ac5d-8dc7-4fb0-830b-be94dded66a5?api-version=2023-02-01-preview&t=638472842609693827&c=MIIHADCCBeigAwIBAgITHgPomYee4Qu7BfhItwAAA-iZhzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwMTMwMDYwOTE2WhcNMjUwMTI0MDYwOTE2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOiFRUCW7ME0-8OmweyLAOhLjShprrewSQr0u8xpOevEY7HpOWaMDZbr57UkO48d4CQyGgkYqH6pQ3mDn6Zq95LFOe63LBgJ_Io9Qn9C4OLOJPSTHOcyryRN0Qgr9k3eMiHwFuomN80I7ezdx8FS6zDqQu1Wbjw-yyd9Mbxe_m45O0TPpda-Jt6d9Un5z7dnzlLlrjguCCIzCadGyV2t7rA7qMMGVjTXSal1A_9zCBngC8-p4z1ifaM4LQtC5f6Em6Rmu74zRjW5jFDIKCPhhwAMuJwsHQDfQ2hxnl6qd8cHG5VGCcyQIPrVCIvWB1zTbaYW1fIK-OyrFXwRv6wesk0CAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6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QeDdQN1JhbDZtay1hUGVneGFNVUtNZndoZzFtN0xqVWhjaTJhUnpKSnhHSlNXb0ZRb1VyR3VRY0FKcC03S1hpV3JfaERNNjllV2gwbjZxMWk3aVR3bWU2dzNUZjN6WEdmYndod1lyVjhxZkdKanJzQnJhQkRxM1pfU0hrOFNqSFNYWnBzSjN0eWhUOHVjeVhSY1lOV0lKWnZualRkY1Z3bWd1WW5odVRmLV9mUDVFJnM9MkhKeFhMVF84RzA4em5UQjJadG5JaXdiTEhSUWE2Ri1QaU15LU52a2FPUXV3cl9TbHAyNWtDQ3gxMXFwMnd5SWhHeWp2TVJJSW5jdVVTVXdQVjFySDAxdWwwVFozYnlEWjYwVEp5ZkN1MVJCNkNPV1RKekQxUktLUE9qNS1wd0EyWlFPT1ctZDBtaS03YkNXWUgzLVdQdGQ0WGdMS0trTEpSclVGQW8zTGlQR3BHc2tVeWo4UHl4WElCX2hsTlBVeTdXVG01aEtjem8zeGk3TXBzMDViZDd0aHFwVjd4S3ZLcDhVczNkQWE2XzBWazJraE14Y3c4U2o1aDd1OGpJSWlwbWVNRVpkZVlOOW1feGYzczNBZFlKV2Z6anhLeEJ3QmZSUGcyUnpDWWR4ejZlZkhtZjRCZ1d3dnV2dmNmY05pTzl3SHlzYUhiQ0NQeVpFU081MUZRJmg9b2E2Nm9ocG10aTc0dTdfcnFLZDRhb0lGWVhNSnlERS1jd2hJS2dQX21fTQ==", "RequestMethod": "GET", "RequestHeaders": { "x-ms-client-request-id": [ - "a4c70a0f-807b-4f8e-bf23-5bcce41e5105" + "daa99674-1444-4024-959c-116d1e7cf3ce" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763", - "Microsoft.Azure.Management.Sql.SqlManagementClient/4.6.0" + "Microsoft.Azure.Management.Sql.SqlManagementClient/4.14.0" ] }, "RequestBody": "", @@ -1296,19 +1257,16 @@ "15" ], "x-ms-request-id": [ - "620def05-4ca1-48c2-97e1-115d9f5d8bfe" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "b22f607d-d458-4cda-b922-ceced1935aa1" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11986" + "11999" ], "x-ms-correlation-request-id": [ - "66936f14-d6b6-4a64-8ed4-0b9abbc34352" + "d165e6b6-b934-4815-b5bf-2a8a55de3394" ], "x-ms-routing-request-id": [ - "CENTRALINDIA:20230525T145443Z:66936f14-d6b6-4a64-8ed4-0b9abbc34352" + "WESTINDIA:20240329T044423Z:d165e6b6-b934-4815-b5bf-2a8a55de3394" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1316,71 +1274,14 @@ "X-Content-Type-Options": [ "nosniff" ], - "Date": [ - "Thu, 25 May 2023 14:54:43 GMT" - ], - "Content-Length": [ - "107" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"name\": \"5359e69c-5a97-4449-9b42-603163440d27\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2023-05-25T14:54:41.123Z\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/ps1228/providers/Microsoft.Sql/locations/westeurope/serverAzureAsyncOperation/ac028d22-6135-438b-bd5f-f2028345ae03?api-version=2022-08-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlR3JvdXBzL3BzMTIyOC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9sb2NhdGlvbnMvd2VzdGV1cm9wZS9zZXJ2ZXJBenVyZUFzeW5jT3BlcmF0aW9uL2FjMDI4ZDIyLTYxMzUtNDM4Yi1iZDVmLWYyMDI4MzQ1YWUwMz9hcGktdmVyc2lvbj0yMDIyLTA4LTAxLXByZXZpZXc=", - "RequestMethod": "GET", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f381d64c-a743-4d68-992d-e80b4715b68f" - ], - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.17763", - "Microsoft.Azure.Management.Sql.SqlManagementClient/4.6.0" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "1" - ], - "x-ms-request-id": [ - "fd560b9e-3507-4838-9350-b92a0a1ac64f" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11983" - ], - "x-ms-correlation-request-id": [ - "6954e152-ea20-48b7-be2b-9927b380859a" - ], - "x-ms-routing-request-id": [ - "CENTRALINDIA:20230525T145446Z:6954e152-ea20-48b7-be2b-9927b380859a" + "X-Cache": [ + "CONFIG_NOCACHE" ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" + "X-MSEdge-Ref": [ + "Ref A: 7FB0BBCFFB7B4B8697CE28DE0C3137C0 Ref B: MAA201060513035 Ref C: 2024-03-29T04:44:23Z" ], "Date": [ - "Thu, 25 May 2023 14:54:45 GMT" + "Fri, 29 Mar 2024 04:44:23 GMT" ], "Content-Length": [ "107" @@ -1392,22 +1293,22 @@ "-1" ] }, - "ResponseBody": "{\r\n \"name\": \"ac028d22-6135-438b-bd5f-f2028345ae03\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2023-05-25T14:54:45.03Z\"\r\n}", + "ResponseBody": "{\r\n \"name\": \"1f78ac5d-8dc7-4fb0-830b-be94dded66a5\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2024-03-29T04:44:20.843Z\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/ps1228/providers/Microsoft.Sql/locations/westeurope/serverAzureAsyncOperation/ac028d22-6135-438b-bd5f-f2028345ae03?api-version=2022-08-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlR3JvdXBzL3BzMTIyOC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9sb2NhdGlvbnMvd2VzdGV1cm9wZS9zZXJ2ZXJBenVyZUFzeW5jT3BlcmF0aW9uL2FjMDI4ZDIyLTYxMzUtNDM4Yi1iZDVmLWYyMDI4MzQ1YWUwMz9hcGktdmVyc2lvbj0yMDIyLTA4LTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/resourceGroups/ps9134/providers/Microsoft.Sql/locations/westeurope/serverAzureAsyncOperation/a02175f7-c105-45a0-bf46-61331b5c7c28?api-version=2023-02-01-preview&t=638472842659007022&c=MIIHADCCBeigAwIBAgITHgPomYee4Qu7BfhItwAAA-iZhzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwMTMwMDYwOTE2WhcNMjUwMTI0MDYwOTE2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOiFRUCW7ME0-8OmweyLAOhLjShprrewSQr0u8xpOevEY7HpOWaMDZbr57UkO48d4CQyGgkYqH6pQ3mDn6Zq95LFOe63LBgJ_Io9Qn9C4OLOJPSTHOcyryRN0Qgr9k3eMiHwFuomN80I7ezdx8FS6zDqQu1Wbjw-yyd9Mbxe_m45O0TPpda-Jt6d9Un5z7dnzlLlrjguCCIzCadGyV2t7rA7qMMGVjT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"f381d64c-a743-4d68-992d-e80b4715b68f" + "59c5789e-1002-43c1-8255-84466bf07a76" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763", - "Microsoft.Azure.Management.Sql.SqlManagementClient/4.6.0" + "Microsoft.Azure.Management.Sql.SqlManagementClient/4.14.0" ] }, "RequestBody": "", @@ -1422,19 +1323,16 @@ "1" ], "x-ms-request-id": [ - "716a7606-2078-4db6-a191-d850859b0d38" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "4e1cee6e-9987-46b9-aea8-0e31b948be46" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11982" + "11999" ], "x-ms-correlation-request-id": [ - "e8f086cd-47da-4ce5-9d29-18ce84ec6699" + "55f33a15-48ca-4de7-adbe-bee58bf20fe3" ], "x-ms-routing-request-id": [ - "CENTRALINDIA:20230525T145447Z:e8f086cd-47da-4ce5-9d29-18ce84ec6699" + "WESTINDIA:20240329T044427Z:55f33a15-48ca-4de7-adbe-bee58bf20fe3" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1442,74 +1340,17 @@ "X-Content-Type-Options": [ "nosniff" ], - "Date": [ - "Thu, 25 May 2023 14:54:47 GMT" - ], - "Content-Length": [ - "107" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"name\": \"ac028d22-6135-438b-bd5f-f2028345ae03\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2023-05-25T14:54:45.03Z\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/ps1228/providers/Microsoft.Sql/locations/westeurope/serverAzureAsyncOperation/ac028d22-6135-438b-bd5f-f2028345ae03?api-version=2022-08-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlR3JvdXBzL3BzMTIyOC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9sb2NhdGlvbnMvd2VzdGV1cm9wZS9zZXJ2ZXJBenVyZUFzeW5jT3BlcmF0aW9uL2FjMDI4ZDIyLTYxMzUtNDM4Yi1iZDVmLWYyMDI4MzQ1YWUwMz9hcGktdmVyc2lvbj0yMDIyLTA4LTAxLXByZXZpZXc=", - "RequestMethod": "GET", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f381d64c-a743-4d68-992d-e80b4715b68f" + "X-Cache": [ + "CONFIG_NOCACHE" ], - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.17763", - "Microsoft.Azure.Management.Sql.SqlManagementClient/4.6.0" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "1" - ], - "x-ms-request-id": [ - "2a0c5d2f-b9d5-4d0e-8264-0840f23fb3ec" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11981" - ], - "x-ms-correlation-request-id": [ - "1d9f939a-0d7e-4ce0-b9cf-c14ce9f8a48c" - ], - "x-ms-routing-request-id": [ - "CENTRALINDIA:20230525T145448Z:1d9f939a-0d7e-4ce0-b9cf-c14ce9f8a48c" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" + "X-MSEdge-Ref": [ + "Ref A: 707CC2620F2F4AB18F56DEFB6A080D5E Ref B: MAA201060513035 Ref C: 2024-03-29T04:44:26Z" ], "Date": [ - "Thu, 25 May 2023 14:54:48 GMT" + "Fri, 29 Mar 2024 04:44:27 GMT" ], "Content-Length": [ - "107" + "108" ], "Content-Type": [ "application/json; charset=utf-8" @@ -1518,22 +1359,22 @@ "-1" ] }, - "ResponseBody": "{\r\n \"name\": \"ac028d22-6135-438b-bd5f-f2028345ae03\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2023-05-25T14:54:45.03Z\"\r\n}", + "ResponseBody": "{\r\n \"name\": \"a02175f7-c105-45a0-bf46-61331b5c7c28\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2024-03-29T04:44:25.787Z\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/ps1228/providers/Microsoft.Sql/locations/westeurope/serverAzureAsyncOperation/ac028d22-6135-438b-bd5f-f2028345ae03?api-version=2022-08-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlR3JvdXBzL3BzMTIyOC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9sb2NhdGlvbnMvd2VzdGV1cm9wZS9zZXJ2ZXJBenVyZUFzeW5jT3BlcmF0aW9uL2FjMDI4ZDIyLTYxMzUtNDM4Yi1iZDVmLWYyMDI4MzQ1YWUwMz9hcGktdmVyc2lvbj0yMDIyLTA4LTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/resourceGroups/ps9134/providers/Microsoft.Sql/locations/westeurope/serverAzureAsyncOperation/a02175f7-c105-45a0-bf46-61331b5c7c28?api-version=2023-02-01-preview&t=638472842659007022&c=MIIHADCCBeigAwIBAgITHgPomYee4Qu7BfhItwAAA-iZhzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwMTMwMDYwOTE2WhcNMjUwMTI0MDYwOTE2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdj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uOU9XYkZzQjBkV3ZfV2hmSTBxeE5IVXhIYUd2WXBUTVZIUGUtTzhHLTVqbi1HNFBQeW5NUTRNQXp2Y3Y0OHdqVUhuclJkaHdGTW8tY2k2QUF0LUlTMHlDZDdvZ1E0djQ2LWZkTEIweExtTl9abzFlV0FoYXFqV0hqYmU3VGVoLU53bEY5YlA2MjhKVkpNelJYZnBvNVZRJmg9aDkySmxZalhmaU5HcThLb3ExNjN6WUtpX0lqRF83WktLdEh5dUhLX3Z5OA==", "RequestMethod": "GET", "RequestHeaders": { "x-ms-client-request-id": [ - "f381d64c-a743-4d68-992d-e80b4715b68f" + "59c5789e-1002-43c1-8255-84466bf07a76" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763", - "Microsoft.Azure.Management.Sql.SqlManagementClient/4.6.0" + "Microsoft.Azure.Management.Sql.SqlManagementClient/4.14.0" ] }, "RequestBody": "", @@ -1545,22 +1386,19 @@ "no-cache" ], "Retry-After": [ - "20" + "15" ], "x-ms-request-id": [ - "08294541-0c00-4ee3-90e2-691297d9ccda" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "341a9f3a-7d64-4ec7-95de-b69f01dbceec" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11980" + "11998" ], "x-ms-correlation-request-id": [ - "ad95eb5f-efd2-4d6c-a15f-6fa737c9e1aa" + "bfb783c4-3ddf-48ab-b903-527d23633f63" ], "x-ms-routing-request-id": [ - "CENTRALINDIA:20230525T145450Z:ad95eb5f-efd2-4d6c-a15f-6fa737c9e1aa" + "WESTINDIA:20240329T044429Z:bfb783c4-3ddf-48ab-b903-527d23633f63" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1568,74 +1406,17 @@ "X-Content-Type-Options": [ "nosniff" ], - "Date": [ - "Thu, 25 May 2023 14:54:49 GMT" - ], - "Content-Length": [ - "107" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"name\": \"ac028d22-6135-438b-bd5f-f2028345ae03\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2023-05-25T14:54:45.03Z\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/ps1228/providers/Microsoft.Sql/locations/westeurope/serverAzureAsyncOperation/ac028d22-6135-438b-bd5f-f2028345ae03?api-version=2022-08-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlR3JvdXBzL3BzMTIyOC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9sb2NhdGlvbnMvd2VzdGV1cm9wZS9zZXJ2ZXJBenVyZUFzeW5jT3BlcmF0aW9uL2FjMDI4ZDIyLTYxMzUtNDM4Yi1iZDVmLWYyMDI4MzQ1YWUwMz9hcGktdmVyc2lvbj0yMDIyLTA4LTAxLXByZXZpZXc=", - "RequestMethod": "GET", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f381d64c-a743-4d68-992d-e80b4715b68f" - ], - "User-Agent": [ - "FxVersion/4.700.22.55902", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.17763", - "Microsoft.Azure.Management.Sql.SqlManagementClient/4.6.0" - ] - }, - "RequestBody": "", - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "15" - ], - "x-ms-request-id": [ - "05389a0b-de7f-43e7-951d-86756716ded3" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11979" - ], - "x-ms-correlation-request-id": [ - "f39eea97-fa09-4c27-b1e8-8b81443c0f62" + "X-Cache": [ + "CONFIG_NOCACHE" ], - "x-ms-routing-request-id": [ - "CENTRALINDIA:20230525T145510Z:f39eea97-fa09-4c27-b1e8-8b81443c0f62" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" + "X-MSEdge-Ref": [ + "Ref A: 6B599439608F4F62A39F82BB0F8CDDA6 Ref B: MAA201060513035 Ref C: 2024-03-29T04:44:28Z" ], "Date": [ - "Thu, 25 May 2023 14:55:10 GMT" + "Fri, 29 Mar 2024 04:44:28 GMT" ], "Content-Length": [ - "106" + "107" ], "Content-Type": [ "application/json; charset=utf-8" @@ -1644,25 +1425,25 @@ "-1" ] }, - "ResponseBody": "{\r\n \"name\": \"ac028d22-6135-438b-bd5f-f2028345ae03\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2023-05-25T14:54:45.03Z\"\r\n}", + "ResponseBody": "{\r\n \"name\": \"a02175f7-c105-45a0-bf46-61331b5c7c28\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2024-03-29T04:44:25.787Z\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourcegroups/ps1228?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlZ3JvdXBzL3BzMTIyOD9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", + "RequestUri": "/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/resourcegroups/ps9134?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZWI5NTFkMzgtMThkOS00NmQ0LTlhMGMtZjY5NGIxNDhjNzZhL3Jlc291cmNlZ3JvdXBzL3BzOTEzND9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", "RequestMethod": "DELETE", "RequestHeaders": { "x-ms-client-request-id": [ - "1961cf4a-f0a0-4f90-8e7a-ccfa67cf01d7" + "d8c1f875-abf2-4e33-919c-030964400fd0" ], "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" ] }, "RequestBody": "", @@ -1674,7 +1455,7 @@ "no-cache" ], "Location": [ - "https://management.azure.com/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEyMjgtV0VTVEVVUk9QRSIsImpvYkxvY2F0aW9uIjoid2VzdGV1cm9wZSJ9?api-version=2016-09-01" + "https://management.azure.com/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzkxMzQtV0VTVEVVUk9QRSIsImpvYkxvY2F0aW9uIjoid2VzdGV1cm9wZSJ9?api-version=2016-09-01&t=638472842733897871&c=MIIHADCCBeigAwIBAgITHgPomYee4Qu7BfhItwAAA-iZhzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwMTMwMDYwOTE2WhcNMjUwMTI0MDYwOTE2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOiFRUCW7ME0-8OmweyLAOhLjShprrewSQr0u8xpOevEY7HpOWaMDZbr57UkO48d4CQyGgkYqH6pQ3mDn6Zq95LFOe63LBgJ_Io9Qn9C4OLOJPSTHOcyryRN0Qgr9k3eMiHwFuomN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5zEQ0ctvqJKWmoBynuqd0q4QubnCzcN9OH0jCXFryqXZmUxdvd9sHimFQIe-HfXK97zoPEv6KqUts6lsDypWiO1p23ZLShVrC_gVS4zhr2b12rrIflxzQhfpskG3iloRgnzg5K0pyVF97w_i_r_EnA&h=JTASDdPfBfk1QqAQzOCmdnKtRjSKi9nD687gg8epYnU" ], "Retry-After": [ "15" @@ -1683,13 +1464,13 @@ "14999" ], "x-ms-request-id": [ - "f8987a35-d43f-4f61-abef-9cc71ad7dfde" + "9224154b-9fc7-4693-9afd-b20c85579314" ], "x-ms-correlation-request-id": [ - "f8987a35-d43f-4f61-abef-9cc71ad7dfde" + "9224154b-9fc7-4693-9afd-b20c85579314" ], "x-ms-routing-request-id": [ - "CENTRALINDIA:20230525T145516Z:f8987a35-d43f-4f61-abef-9cc71ad7dfde" + "WESTINDIA:20240329T044433Z:9224154b-9fc7-4693-9afd-b20c85579314" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1697,8 +1478,14 @@ "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 22926BE49ECA4697ACD417366200E073 Ref B: MAA201060515051 Ref C: 2024-03-29T04:44:29Z" + ], "Date": [ - "Thu, 25 May 2023 14:55:15 GMT" + "Fri, 29 Mar 2024 04:44:32 GMT" ], "Expires": [ "-1" @@ -1711,15 +1498,15 @@ "StatusCode": 202 }, { - "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEyMjgtV0VTVEVVUk9QRSIsImpvYkxvY2F0aW9uIjoid2VzdGV1cm9wZSJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIyS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zUFFTazBSUmI4X3NiUnBTMGR4VUh2UElHTktidW9XQl9DZF9objlaV001VlBkTl9PSGJyb21Ba3dPZGdBNkJQeDdQN1JhbDZtay1hUGVneGFNVUtNZndoZzFtN0xqVWhjaTJhUnpKSnhHSlNXb0ZRb1VyR3VRY0FKcC03S1hpV3JfaERNNjllV2gwbjZxMWk3aVR3bWU2dzNUZjN6WEdmYndod1lyVjhxZkdKanJzQnJhQkRxM1pfU0hrOFNqSFNYWnBzSjN0eWhUOHVjeVhSY1lOV0lKWnZualRkY1Z3bWd1WW5odVRmLV9mUDVFJnM9Q3lzTGhOSkNFaENyZzBUbk5pRzlSUTBiNThTLU5Gcl9tZTczYVpmYTZ2MnMzRFV2RzdJVW5NM1RoRE5OQlZmSWlYMTdGcmxQX3psY3hQNHNhb2hJcU1salI5dHNZUm13UU8wZ2tEQmN3Z1NFaV92N09IV0JpYzhYNTFoTnpKeVB2ejhzeTRPRy0xWXg0RG9sQ0IzV2Y5cng4OWVDNGJObTJNRC1tUnFwNm9tTWlRLS1FQURTaTlBX1RSQk1udkNuNXpFUTBjdHZxSktXbW9CeW51cWQwcTRRdWJuQ3pjTjlPSDBqQ1hGcnlxWFptVXhkdmQ5c0hpbUZRSWUtSGZYSzk3em9QRXY2S3FVdHM2bHNEeXBXaU8xcDIzWkxTaFZyQ19nVlM0emhyMmIxMnJySWZseHpRaGZwc2tHM2lsb1JnbnpnNUswcHlWRjk3d19pX3JfRW5BJmg9SlRBU0RkUGZCZmsxUXFBUXpPQ21kbkt0UmpTS2k5bkQ2ODdnZzhlcFluVQ==", "RequestMethod": "GET", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" ] }, "RequestBody": "", @@ -1731,7 +1518,7 @@ "no-cache" ], "Location": [ - "https://management.azure.com/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEyMjgtV0VTVEVVUk9QRSIsImpvYkxvY2F0aW9uIjoid2VzdGV1cm9wZSJ9?api-version=2016-09-01" + "https://management.azure.com/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzkxMzQtV0VTVEVVUk9QRSIsImpvYkxvY2F0aW9uIjoid2VzdGV1cm9wZSJ9?api-version=2016-09-01&t=638472842892429077&c=MIIHADCCBeigAwIBAgITHgPomYee4Qu7BfhItwAAA-iZhzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwMTMwMDYwOTE2WhcNMjUwMTI0MDYwOTE2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOiFRUCW7ME0-8OmweyLAOhLjShprrewSQr0u8xpOevEY7HpOWaMDZbr57UkO48d4CQyGgkYqH6pQ3mDn6Zq95LFOe63LBgJ_Io9Qn9C4OLOJPSTHOcyryRN0Qgr9k3eMiHwFuomN80I7ezdx8FS6zDqQu1Wbjw-yyd9Mbxe_m45O0TPpda-Jt6d9Un5z7dnzlLlrjguCCIzCadGyV2t7rA7qMMGVjTXSal1A_9zCBngC8-p4z1ifaM4LQtC5f6Em6Rmu74zRjW5jFDIKCPhhwAMuJwsHQDfQ2hxnl6qd8cHG5VGCcyQIPrVCIvWB1zTbaYW1fIK-OyrFXwRv6wesk0CAwEAAaOCA-0wggPpMCcGCSs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"11999" ], "x-ms-request-id": [ - "20bd19c4-7455-4909-90aa-eaa5d4a93b09" + "ffe4ca39-80e9-4259-87ad-ad18f9a8e8ae" ], "x-ms-correlation-request-id": [ - "20bd19c4-7455-4909-90aa-eaa5d4a93b09" + "ffe4ca39-80e9-4259-87ad-ad18f9a8e8ae" ], "x-ms-routing-request-id": [ - "CENTRALINDIA:20230525T145532Z:20bd19c4-7455-4909-90aa-eaa5d4a93b09" + "WESTINDIA:20240329T044449Z:ffe4ca39-80e9-4259-87ad-ad18f9a8e8ae" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1754,8 +1541,14 @@ "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 3682836CE4CF43339A61C3162ADC9699 Ref B: MAA201060515051 Ref C: 2024-03-29T04:44:48Z" + ], "Date": [ - "Thu, 25 May 2023 14:55:31 GMT" + "Fri, 29 Mar 2024 04:44:48 GMT" ], "Expires": [ "-1" @@ -1768,15 +1561,15 @@ "StatusCode": 202 }, { - "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEyMjgtV0VTVEVVUk9QRSIsImpvYkxvY2F0aW9uIjoid2VzdGV1cm9wZSJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpFeU1qZ3RWMFZUVkVWVlVrOVFSU0lzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEdWMWNtOXdaU0o5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", + "RequestUri": "/subscriptions/eb951d38-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k3aVR3bWU2dzNUZjN6WEdmYndod1lyVjhxZkdKanJzQnJhQkRxM1pfU0hrOFNqSFNYWnBzSjN0eWhUOHVjeVhSY1lOV0lKWnZualRkY1Z3bWd1WW5odVRmLV9mUDVFJnM9alJXd2VXNUtKMG5ROXQtNnVKd0dOTXgwcWxfODVIR1gyRU54Zm5aT1hRZG9rbFJyUEJLQVNKR0p5ZlZMeE5kTzNpdXJDclM1MTJfM0ZJOWxVeC0xVXdLS1h6ZFlKTXN1TU1VQWpsQmpqakZ6R2M0Q3J2aWRrSXFUX3c2MF9Ma0Y4ZFpOd0liXzdadm45bko2cFJDRlFhaUl3NmFuZWJVMTR6LUNCRHpPVTd3OXpuOFR4M1hrcXFwNTZZWFE2NVVQSm1oWWlUcnQzaWZLZjRBRE9KemdDd0lNRXktV2FHM2V4MkliU0V2VFFtcVRfX1lZV05fMm1RSmM1Rks3N0hzNWx2bTNpX3EtcmVXUG9PZDFyNGRMRVk4UkFlSDNDMEQySGVucGE4SlN0UG1WUVk1cURkYkZvSzNjSkVSZk1GVVRGanR0TzhxUWxYS3NhSnhVc1h6YVZnJmg9UDdfUFhReThMZDU1VkdpWkZXWkhhTXRQMElrbkFEOEozdUVnUmYzOUVhaw==", "RequestMethod": "GET", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" ] }, "RequestBody": "", @@ -1788,22 +1581,22 @@ "no-cache" ], "Location": [ - "https://management.azure.com/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEyMjgtV0VTVEVVUk9QRSIsImpvYkxvY2F0aW9uIjoid2VzdGV1cm9wZSJ9?api-version=2016-09-01" + "https://management.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NVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBADYz_oLBrhGl-i2E4jxv9Z4RNcpp4gaxqVJv_GEzvVtwgx_8P3UrhZ1_mC3wETOajOHWZ44sJEzrSgyljDsF94dPoMGucgCuZewgFqyU_sPQSk0RRb8_sbRpS0dxUHvPIGNKbuoWB_Cd_hn9ZWM5VPdN_OHbromAkwOdgA6BPx7P7Ral6mk-aPegxaMUKMfwhg1m7LjUhci2aRzJJxGJSWoFQoUrGuQcAJp-7KXiWr_hDM69eWh0n6q1i7iTwme6w3Tf3zXGfbwhwYrV8qfGJjrsBraBDq3Z_SHk8SjHSXZpsJ3tyhT8ucyXRcYNWIJZvnjTdcVwmguYnhuTf-_fP5E&s=c06iA9LFi6iu7IfYzD4zeHzVEgHjlUJPuMLTw70nE8DA-v31csXvcu7qQyK7khuItRuMTVhF0s08eigl7xe0g1Q3Ad9SPn-hM3JALDhKvTQbpGOBOXHjIyFdR8UiAvW-qRE6DvlnMQ1m9P0QJUK8q76J45F2wBosR8u-71KQAQC1fC7KZaKxoRwT2EOz78LQHmlEISJu6mD_uxtZrFAsCxcRs47Npwc3IfvmuyF0-xntjdaFMnVcFO_fsJJ6FDfH4a4v75jeKlGgwbri1kaC_zp3j9DbMjOAAQwDwFJqBeQu9BbC-rYwaGWXYk_cU8Rg6tEAJUeeZFRAlMhO_P7gKg&h=5aepdXydliKjdSSDo3YvedDrMBGQzwf3m7yMnWZQHY8" ], "Retry-After": [ "15" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" + "11999" ], "x-ms-request-id": [ - "e59439e8-5729-4503-b5e1-411e3a2869cd" + "4cf4190a-687b-4561-9ca9-a2709ecffdea" ], "x-ms-correlation-request-id": [ - "e59439e8-5729-4503-b5e1-411e3a2869cd" + "4cf4190a-687b-4561-9ca9-a2709ecffdea" ], "x-ms-routing-request-id": [ - "CENTRALINDIA:20230525T145547Z:e59439e8-5729-4503-b5e1-411e3a2869cd" + "WESTINDIA:20240329T044505Z:4cf4190a-687b-4561-9ca9-a2709ecffdea" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1811,8 +1604,14 @@ "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 9FF6B17BD6CA48FA83FCE26053C92390 Ref B: MAA201060515051 Ref C: 2024-03-29T04:45:04Z" + ], "Date": [ - "Thu, 25 May 2023 14:55:47 GMT" + "Fri, 29 Mar 2024 04:45:04 GMT" ], "Expires": [ "-1" @@ -1825,15 +1624,15 @@ "StatusCode": 202 }, { - "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEyMjgtV0VTVEVVUk9QRSIsImpvYkxvY2F0aW9uIjoid2VzdGV1cm9wZSJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpFeU1qZ3RWMFZUVkVWVlVrOVFSU0lzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEdWMWNtOXdaU0o5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", + "RequestUri": "/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzkxMzQtV0VTVEVVUk9QRSIsImpvYkxvY2F0aW9uIjoid2VzdGV1cm9wZSJ9?api-version=2016-09-01&t=638472843050193348&c=MIIHADCCBeigAwIBAgITHgPomYee4Qu7B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3NYdmN1N3FReUs3a2h1SXRSdU1UVmhGMHMwOGVpZ2w3eGUwZzFRM0FkOVNQbi1oTTNKQUxEaEt2VFFicEdPQk9YSGpJeUZkUjhVaUF2Vy1xUkU2RHZsbk1RMW05UDBRSlVLOHE3Nko0NUYyd0Jvc1I4dS03MUtRQVFDMWZDN0taYUt4b1J3VDJFT3o3OExRSG1sRUlTSnU2bURfdXh0WnJGQXNDeGNSczQ3TnB3YzNJZnZtdXlGMC14bnRqZGFGTW5WY0ZPX2ZzSko2RkRmSDRhNHY3NWplS2xHZ3dicmkxa2FDX3pwM2o5RGJNak9BQVF3RHdGSnFCZVF1OUJiQy1yWXdhR1dYWWtfY1U4Umc2dEVBSlVlZVpGUkFsTWhPX1A3Z0tnJmg9NWFlcGRYeWRsaUtqZFNTRG8zWXZlZERyTUJHUXp3ZjNtN3lNbldaUUhZOA==", "RequestMethod": "GET", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" ] }, "RequestBody": "", @@ -1845,22 +1644,22 @@ "no-cache" ], "Location": [ - "https://management.azure.com/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEyMjgtV0VTVEVVUk9QRSIsImpvYkxvY2F0aW9uIjoid2VzdGV1cm9wZSJ9?api-version=2016-09-01" + "https://management.azure.com/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzkxMzQtV0VTVEVVUk9QRSIsImpvYkxvY2F0aW9uIjoid2VzdGV1cm9wZSJ9?api-version=2016-09-01&t=638472843208933937&c=MIIHADCCBeigAwIB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dPoMGucgCuZewgFqyU_sPQSk0RRb8_sbRpS0dxUHvPIGNKbuoWB_Cd_hn9ZWM5VPdN_OHbromAkwOdgA6BPx7P7Ral6mk-aPegxaMUKMfwhg1m7LjUhci2aRzJJxGJSWoFQoUrGuQcAJp-7KXiWr_hDM69eWh0n6q1i7iTwme6w3Tf3zXGfbwhwYrV8qfGJjrsBraBDq3Z_SHk8SjHSXZpsJ3tyhT8ucyXRcYNWIJZvnjTdcVwmguYnhuTf-_fP5E&s=rnLAJkaHb51fXJ79wE6CmWwJf5TJIZNCGd8J29VpW1412g0YcP0u9yo5LrqlHZ3Anx47u0u-lbqU9Hd73r2oqgBqtA1naBRYLynLsKaVUVmb7G20opD7UErt5bvQIGabwEyRZHIMw6s2sMb_pBZu_mJgU6PtX3GSi6VTCaGu5aUe-EiejoAdtLcXSJfd3pEOTuxpuV4yCdBBFTOrCAmzlWSAHVCfq6kUN90Gl0uS9IXHLLKqla0VmRBLuePCTOOoUbGRevmzOebdvDVVdw-Bi7WRDp0TBs_btU6qJNfDrqhMor5MsZpsy5Em5YbFie7wYph8Is9-ZpVzGeL5kzHX6g&h=KG4jOndWmRS1XqVXHSBTfnesatL6mE7lndzX_yB7Neg" ], "Retry-After": [ "15" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" + "11999" ], "x-ms-request-id": [ - "645383ed-f2b0-4f79-a565-4965e251ae02" + "3a68ccfd-7b8b-4d40-a1ad-dd29b5f86a62" ], "x-ms-correlation-request-id": [ - "645383ed-f2b0-4f79-a565-4965e251ae02" + "3a68ccfd-7b8b-4d40-a1ad-dd29b5f86a62" ], "x-ms-routing-request-id": [ - "CENTRALINDIA:20230525T145602Z:645383ed-f2b0-4f79-a565-4965e251ae02" + "WESTINDIA:20240329T044520Z:3a68ccfd-7b8b-4d40-a1ad-dd29b5f86a62" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1868,8 +1667,14 @@ "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: F1C79FCE6500406E92772A5886B87C06 Ref B: MAA201060515051 Ref C: 2024-03-29T04:45:20Z" + ], "Date": [ - "Thu, 25 May 2023 14:56:02 GMT" + "Fri, 29 Mar 2024 04:45:20 GMT" ], "Expires": [ "-1" @@ -1882,15 +1687,15 @@ "StatusCode": 202 }, { - "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEyMjgtV0VTVEVVUk9QRSIsImpvYkxvY2F0aW9uIjoid2VzdGV1cm9wZSJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpFeU1qZ3RWMFZUVkVWVlVrOVFSU0lzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEdWMWNtOXdaU0o5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", + "RequestUri": "/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzkxMzQtV0VTVEVVUk9QRSIsImpvYkxvY2F0aW9uIjoid2VzdGV1cm9wZSJ9?api-version=2016-09-01&t=638472843208933937&c=MIIHADCCBeigAwIBAgITHgPomYee4Qu7BfhItwAAA-iZhzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwMTMwMDYwOTE2WhcNMjUwMTI0MDYwOTE2WjBAMT4wPAYDVQQD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ZmQzcEVPVHV4cHVWNHlDZEJCRlRPckNBbXpsV1NBSFZDZnE2a1VOOTBHbDB1UzlJWEhMTEtxbGEwVm1SQkx1ZVBDVE9Pb1ViR1Jldm16T2ViZHZEVlZkdy1CaTdXUkRwMFRCc19idFU2cUpOZkRycWhNb3I1TXNacHN5NUVtNVliRmllN3dZcGg4SXM5LVpwVnpHZUw1a3pIWDZnJmg9S0c0ak9uZFdtUlMxWHFWWEhTQlRmbmVzYXRMNm1FN2xuZHpYX3lCN05lZw==", "RequestMethod": "GET", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" ] }, "RequestBody": "", @@ -1902,22 +1707,22 @@ "no-cache" ], "Location": [ - "https://management.azure.com/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEyMjgtV0VTVEVVUk9QRSIsImpvYkxvY2F0aW9uIjoid2VzdGV1cm9wZSJ9?api-version=2016-09-01" + "https://management.azure.com/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzkxMzQtV0VTVEVVUk9QRSIsImpvYkxvY2F0aW9uIjoid2VzdGV1cm9wZSJ9?api-version=2016-09-01&t=638472843367223255&c=MIIHADCCBeigAwIBAgITHgPomYee4Qu7BfhItwAAA-iZhzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwMTMwMDYwOTE2WhcNMjUwMTI0MDYwOTE2WjBAMT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GJjrsBraBDq3Z_SHk8SjHSXZpsJ3tyhT8ucyXRcYNWIJZvnjTdcVwmguYnhuTf-_fP5E&s=C-XncDMWFomTsKk1fz_Fij__B1UjI8gGx83-yDVDKO7MijAoVrUH4GIydC19CXh7o3wL9YWrVCISptlEc2V3hAxR50Ci_nDQYnC4RtBTISsb8YpWaL-AMJoOV4BPeElvR894is5v1UPt1UV6z9XAw3DFpsc6fdzYZKj7QgINthWjF0vHceKRpSKX99XRgrvYGQUECwYmOyNQuJZjWTycFLDX85Mdl7u0dqPnj82HJjNzO8OkDfT9BYrJO-DBVZk1JFK-ailvim8Rob14Cc_ec5UhsNkYUWUp2mN1RLy93d3ok8jeulYzaTmXKkHcVTMGKCeOtEjn3v2UaPOD_XhZbw&h=6q0PGtSkaqhw-dzUNncVfKveQgXJdZVTqMM0poYycdU" ], "Retry-After": [ "15" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" + "11998" ], "x-ms-request-id": [ - "1e5a853d-726d-4d15-bfa0-814131eb5d4c" + "33b10bf8-d64c-4194-84eb-385487ff2e53" ], "x-ms-correlation-request-id": [ - "1e5a853d-726d-4d15-bfa0-814131eb5d4c" + "33b10bf8-d64c-4194-84eb-385487ff2e53" ], "x-ms-routing-request-id": [ - "CENTRALINDIA:20230525T145618Z:1e5a853d-726d-4d15-bfa0-814131eb5d4c" + "WESTINDIA:20240329T044536Z:33b10bf8-d64c-4194-84eb-385487ff2e53" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1925,8 +1730,14 @@ "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 38883E890C904B7AA6525551A1C4E5A0 Ref B: MAA201060515051 Ref C: 2024-03-29T04:45:35Z" + ], "Date": [ - "Thu, 25 May 2023 14:56:18 GMT" + "Fri, 29 Mar 2024 04:45:36 GMT" ], "Expires": [ "-1" @@ -1939,15 +1750,15 @@ "StatusCode": 202 }, { - "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEyMjgtV0VTVEVVUk9QRSIsImpvYkxvY2F0aW9uIjoid2VzdGV1cm9wZSJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpFeU1qZ3RWMFZUVkVWVlVrOVFSU0lzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEdWMWNtOXdaU0o5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", + "RequestUri": "/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzkxMzQtV0VTVEVVUk9QRSIsImpvYkxvY2F0aW9uIjoid2VzdGV1cm9wZSJ9?api-version=2016-09-01&t=638472843367223255&c=MIIHADCCBeigAwIBAgITHgPomYee4Qu7BfhItwAAA-iZhzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwMTMwMDYwOTE2WhcNMjUwMTI0MDYwOTE2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOiFRUCW7ME0-8OmweyLAOhLjShprrewSQr0u8xpOevEY7HpOWaMDZbr57UkO48d4CQyGgkYqH6pQ3mDn6Zq95LFOe63LBg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0U2thcWh3LWR6VU5uY1ZmS3ZlUWdYSmRaVlRxTU0wcG9ZeWNkVQ==", "RequestMethod": "GET", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" ] }, "RequestBody": "", @@ -1959,22 +1770,22 @@ "no-cache" ], "Location": [ - "https://management.azure.com/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEyMjgtV0VTVEVVUk9QRSIsImpvYkxvY2F0aW9uIjoid2VzdGV1cm9wZSJ9?api-version=2016-09-01" + "https://management.azure.com/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzkxMzQtV0VTVEVVUk9QRSIsImpvYkxvY2F0aW9uIjoid2VzdGV1cm9wZSJ9?api-version=2016-09-01&t=638472843524856642&c=MIIHADCCBeigAwIBAgITHgPomYee4Qu7BfhItwAAA-iZhzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwMTMwMDYwOTE2WhcNMjUwMTI0MDYwOTE2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOiFRUCW7ME0-8OmweyLAOhLjShprrewSQr0u8xpOevEY7HpOWaMDZbr57UkO48d4CQyGgkYqH6pQ3mDn6Zq95LFOe63LBg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f3wCFBkW2Jgc5QXMulioWHtPpBmE68dQduo9UNaRD5VyoFZkDVhJRRFe4cCMHNG8L61nKsRkKsgyqTGW5JDxiKh7myXe6-cce0-iKo-dZ6rKCQpzfAlcAMHswsqfYWcCWMc-4C40IN7xsBXgMGGSWD_7npfjp_qWO77ZUwKB71BIxvPbsx2SQumFWx85uelik0-zqHFMA&h=vma5sRKC82Ir9RpJ0OIjayIX4VvLs3WyuuPeaS-ePKM" ], "Retry-After": [ "15" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" + "11998" ], "x-ms-request-id": [ - "4e3c4416-75ea-4d5b-aaf9-3266ab360a16" + "f830a626-756e-4e5b-b4b0-afa7c573b2eb" ], "x-ms-correlation-request-id": [ - "4e3c4416-75ea-4d5b-aaf9-3266ab360a16" + "f830a626-756e-4e5b-b4b0-afa7c573b2eb" ], "x-ms-routing-request-id": [ - "CENTRALINDIA:20230525T145633Z:4e3c4416-75ea-4d5b-aaf9-3266ab360a16" + "WESTINDIA:20240329T044552Z:f830a626-756e-4e5b-b4b0-afa7c573b2eb" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1982,8 +1793,14 @@ "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: B5B4B3B94B32477D80D55B2D87B36188 Ref B: MAA201060515051 Ref C: 2024-03-29T04:45:51Z" + ], "Date": [ - "Thu, 25 May 2023 14:56:32 GMT" + "Fri, 29 Mar 2024 04:45:51 GMT" ], "Expires": [ "-1" @@ -1996,15 +1813,15 @@ "StatusCode": 202 }, { - "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEyMjgtV0VTVEVVUk9QRSIsImpvYkxvY2F0aW9uIjoid2VzdGV1cm9wZSJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlw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WSnZfR0V6dlZ0d2d4XzhQM1VyaFoxX21DM3dFVE9hak9IV1o0NHNKRXpyU2d5bGpEc0Y5NGRQb01HdWNnQ3VaZXdnRnF5VV9zUFFTazBSUmI4X3NiUnBTMGR4VUh2UElHTktidW9XQl9DZF9objlaV001VlBkTl9PSGJyb21Ba3dPZGdBNkJQeDdQN1JhbDZtay1hUGVneGFNVUtNZndoZzFtN0xqVWhjaTJhUnpKSnhHSlNXb0ZRb1VyR3VRY0FKcC03S1hpV3JfaERNNjllV2gwbjZxMWk3aVR3bWU2dzNUZjN6WEdmYndod1lyVjhxZkdKanJzQnJhQkRxM1pfU0hrOFNqSFNYWnBzSjN0eWhUOHVjeVhSY1lOV0lKWnZualRkY1Z3bWd1WW5odVRmLV9mUDVFJnM9SkV2TS1jVE5ta0tfaWdIeUN0QmdwOXlvNEZGUW5YUHVxTUEzREFFZy03LVM1Ymdkb0ZWRVp2UHpVdVhiemxGaDdrbEphRTZIRGM5cEtucG5QNXlVTWVqWDNKX21QWTYyWTNiT2h1WlpwWUVaOGlqUHFUbFJhYmpZa2dTZEZqRHpPU2E0eEZ6b0RZREdfZjN3Q0ZCa1cySmdjNVFYTXVsaW9XSHRQcEJtRTY4ZFFkdW85VU5hUkQ1VnlvRlprRFZoSlJSRmU0Y0NNSE5HOEw2MW5Lc1JrS3NneXFUR1c1SkR4aUtoN215WGU2LWNjZTAtaUtvLWRaNnJLQ1FwemZBbGNBTUhzd3NxZllXY0NXTWMtNEM0MElON3hzQlhnTUdHU1dEXzducGZqcF9xV083N1pVd0tCNzFCSXh2UGJzeDJTUXVtRld4ODV1ZWxpazAtenFIRk1BJmg9dm1hNXNSS0M4MklyOVJwSjBPSWpheUlYNFZ2THMzV3l1dVBlYVMtZVBLTQ==", "RequestMethod": "GET", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" ] }, "RequestBody": "", @@ -2016,22 +1833,22 @@ "no-cache" ], "Location": [ - "https://management.azure.com/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEyMjgtV0VTVEVVUk9QRSIsImpvYkxvY2F0aW9uIjoid2VzdGV1cm9wZSJ9?api-version=2016-09-01" + "https://management.azure.com/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzkxMzQtV0VTVEVVUk9QRSIsImpvYkxvY2F0aW9uIjoid2VzdGV1cm9wZSJ9?api-version=2016-09-01&t=638472843679103527&c=MIIHADCCBeigAwIBAgITHgPomYee4Qu7BfhItwAAA-iZhzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwMTMwMDYwOTE2WhcNMjUwMTI0MDYwOTE2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOiFRUCW7ME0-8OmweyLAOhLjShprrewSQr0u8xpOevEY7HpOWaMDZbr57UkO48d4CQyGgkYqH6pQ3mDn6Zq95LFOe63LBgJ_Io9Qn9C4OLOJPSTHOcyryRN0Qgr9k3eMiHwFuomN80I7ezdx8FS6zDqQu1Wbjw-yyd9Mbxe_m45O0TPpda-Jt6d9Un5z7dnzlLlrjguCCIzCadGyV2t7rA7qMMGVjTXSal1A_9zCBngC8-p4z1ifaM4LQtC5f6Em6Rmu74zRjW5jFDIK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YARTmqlQ&h=Je7pZ1ltpUlVA9USb4Vssz3Hf3wyTLv0jk7ZFd-iASg" ], "Retry-After": [ "15" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" + "11998" ], "x-ms-request-id": [ - "721ab82f-36a0-4507-b12e-1693508819cd" + "d1153cf0-9f28-45a2-8c97-6ca339d63ed5" ], "x-ms-correlation-request-id": [ - "721ab82f-36a0-4507-b12e-1693508819cd" + "d1153cf0-9f28-45a2-8c97-6ca339d63ed5" ], "x-ms-routing-request-id": [ - "CENTRALINDIA:20230525T145649Z:721ab82f-36a0-4507-b12e-1693508819cd" + "WESTINDIA:20240329T044607Z:d1153cf0-9f28-45a2-8c97-6ca339d63ed5" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -2039,8 +1856,14 @@ "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: D2D11A9BD76543DA810C987B00BA5800 Ref B: MAA201060515051 Ref C: 2024-03-29T04:46:07Z" + ], "Date": [ - "Thu, 25 May 2023 14:56:48 GMT" + "Fri, 29 Mar 2024 04:46:07 GMT" ], "Expires": [ "-1" @@ -2053,15 +1876,15 @@ "StatusCode": 202 }, { - "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEyMjgtV0VTVEVVUk9QRSIsImpvYkxvY2F0aW9uIjoid2VzdGV1cm9wZSJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpFeU1qZ3RWMFZUVkVWVlVrOVFSU0lzSW1wdllreHZZMkYwYVc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NVUtNZndoZzFtN0xqVWhjaTJhUnpKSnhHSlNXb0ZRb1VyR3VRY0FKcC03S1hpV3JfaERNNjllV2gwbjZxMWk3aVR3bWU2dzNUZjN6WEdmYndod1lyVjhxZkdKanJzQnJhQkRxM1pfU0hrOFNqSFNYWnBzSjN0eWhUOHVjeVhSY1lOV0lKWnZualRkY1Z3bWd1WW5odVRmLV9mUDVFJnM9UTB5NzFLQUZ5c1V6NkdDY3NLUDBmeGVnWGlOeXZhUW1jb3VoM0U2Z3JJaTFlX3lfNEswTE9TaERKdE84V3RHS01tSDVxRDZGYkNwQlJGVUZWVE4xRzdhV01WbGN3RFFGS1NFTGpSeTBjZVdodGlyck9GYTlYZGdLX0xCWEVIVnBxak5GV0R3T2U0ZEJCdVBUSGxjbmxZNzRkc2x0SXNUVDhlRTJfb2tVOFRxWEFUSmd0Q0ZISF92U05FVTdCbmZKWVRLVFhiTDl5X3h0ZTlRak85WHZPWndySjVkbnpuREpLY2tKeDVKNjUzTWtka2U3Q1pHY3ZBR2N3OWt2Y3RKSm5nSU9SQkNuLXNjVWl3d0llcHdGQ2VJU3Zsc2J5MmExemJSQ1pzQnFQYVExMFpMclYxS2d4T0lHQkpjRTh1R1R1MHY2Y0V4dkpGUTFyNllBUlRtcWxRJmg9SmU3cFoxbHRwVWxWQTlVU2I0VnNzejNIZjN3eVRMdjBqazdaRmQtaUFTZw==", "RequestMethod": "GET", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" ] }, "RequestBody": "", @@ -2073,22 +1896,22 @@ "no-cache" ], "Location": [ - "https://management.azure.com/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEyMjgtV0VTVEVVUk9QRSIsImpvYkxvY2F0aW9uIjoid2VzdGV1cm9wZSJ9?api-version=2016-09-01" + "https://management.azure.com/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzkxMzQtV0VTVEVVUk9QRSIsImpvYkxvY2F0aW9uIjoid2VzdGV1cm9wZSJ9?api-version=2016-09-01&t=638472843836677983&c=MIIHADCCBeigAwIBAgITHgPomYee4Qu7BfhItwAAA-iZhzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwMTMwMDYwOTE2WhcNMjUwMTI0MDYwOTE2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOiFRUCW7ME0-8OmweyLAOhLjShprrewSQr0u8xpOevEY7HpOWaMDZbr57UkO48d4CQyGgkYqH6pQ3mDn6Zq95LFOe63LBgJ_Io9Qn9C4OLOJPSTHOcyryRN0Qgr9k3eMiHwFuomN80I7ezdx8FS6zDqQu1Wbjw-yyd9Mbxe_m45O0TPpda-Jt6d9Un5z7dnzlLlrjguCCIzCadGyV2t7rA7qMMGVjTXSal1A_9zCBngC8-p4z1ifaM4LQtC5f6Em6Rmu74zRjW5jFDIKCPhhwAMuJwsHQDfQ2hxnl6qd8cHG5VGCcyQIPrVCIvWB1zTbaYW1fIK-OyrFXwRv6wesk0CAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8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Z2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBADYz_oLBrhGl-i2E4jxv9Z4RNcpp4gaxqVJv_GEzvVtwgx_8P3UrhZ1_mC3wETOajOHWZ44sJEzrSgyljDsF94dPoMGucgCuZewgFqyU_sPQSk0RRb8_sbRpS0dxUHvPIGNKbuoWB_Cd_hn9ZWM5VPdN_OHbromAkwOdgA6BPx7P7Ral6mk-aPegxaMUKMfwhg1m7LjUhci2aRzJJxGJSWoFQoUrGuQcAJp-7KXiWr_hDM69eWh0n6q1i7iTwme6w3Tf3zXGfbwhwYrV8qfGJjrsBraBDq3Z_SHk8SjHSXZpsJ3tyhT8ucyXRcYNWIJZvnjTdcVwmguYnhuTf-_fP5E&s=NW33L6mwrQr9Qhgnc_XHjRYSSgNf-ED01Of7qTf87KrN8pKxXao8Kf1x_6uNZoEkJeA4TsUf_oe3KmoIaYsjk8OWZUviviywNZpC3U56LIbxN3WKoC9kU1SfbEi8xinADUDGwbrvNUwyCJIC_oxdo_wqD1_17ZNPx0S7RQPD57crtT5FFvbvC8AIDVoluvL9Z6bCWVs3sck61jhQPNN3x0vQUiG91bk6JV7KMAay1sBZfRuVyL9Pzdulfa3UeHt8qOjM8U9yrJ0bkskeoxC0H7f1IxufBn1JbhFvfFA-HvhmbbpCtk8PfdbjIsdC6Lg5ANDYQ1s92sCioGBtALVzmg&h=cvrpc4zyGESWdfOpO_duhmMykRWsaLBW0uEuTksWD-k" ], "Retry-After": [ "15" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" + "11999" ], "x-ms-request-id": [ - "a9b39fc4-81ee-41b6-a812-8824cb26ac0c" + "b84a5d4b-d81b-46de-8d78-a2bdc4cf4c52" ], "x-ms-correlation-request-id": [ - "a9b39fc4-81ee-41b6-a812-8824cb26ac0c" + "b84a5d4b-d81b-46de-8d78-a2bdc4cf4c52" ], "x-ms-routing-request-id": [ - "CENTRALINDIA:20230525T145704Z:a9b39fc4-81ee-41b6-a812-8824cb26ac0c" + "WESTINDIA:20240329T044623Z:b84a5d4b-d81b-46de-8d78-a2bdc4cf4c52" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -2096,8 +1919,14 @@ "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 4BB3FBBD96B6475F9935257420309EEA Ref B: MAA201060515051 Ref C: 2024-03-29T04:46:22Z" + ], "Date": [ - "Thu, 25 May 2023 14:57:04 GMT" + "Fri, 29 Mar 2024 04:46:23 GMT" ], "Expires": [ "-1" @@ -2110,15 +1939,15 @@ "StatusCode": 202 }, { - "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEyMjgtV0VTVEVVUk9QRSIsImpvYkxvY2F0aW9uIjoid2VzdGV1cm9wZSJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpFeU1qZ3RWMFZUVkVWVlVrOVFSU0lzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEdWMWNtOXdaU0o5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", + "RequestUri": "/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzkxMzQtV0VTVEV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KWnZualRkY1Z3bWd1WW5odVRmLV9mUDVFJnM9TlczM0w2bXdyUXI5UWhnbmNfWEhqUllTU2dOZi1FRDAxT2Y3cVRmODdLck44cEt4WGFvOEtmMXhfNnVOWm9Fa0plQTRUc1VmX29lM0ttb0lhWXNqazhPV1pVdml2aXl3TlpwQzNVNTZMSWJ4TjNXS29DOWtVMVNmYkVpOHhpbkFEVURHd2Jydk5Vd3lDSklDX294ZG9fd3FEMV8xN1pOUHgwUzdSUVBENTdjcnRUNUZGdmJ2QzhBSURWb2x1dkw5WjZiQ1dWczNzY2s2MWpoUVBOTjN4MHZRVWlHOTFiazZKVjdLTUFheTFzQlpmUnVWeUw5UHpkdWxmYTNVZUh0OHFPak04VTl5ckowYmtza2VveEMwSDdmMUl4dWZCbjFKYmhGdmZGQS1IdmhtYmJwQ3RrOFBmZGJqSXNkQzZMZzVBTkRZUTFzOTJzQ2lvR0J0QUxWem1nJmg9Y3ZycGM0enlHRVNXZGZPcE9fZHVobU15a1JXc2FMQlcwdUV1VGtzV0Qtaw==", "RequestMethod": "GET", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" ] }, "RequestBody": "", @@ -2130,22 +1959,22 @@ "no-cache" ], "Location": [ - "https://management.azure.com/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEyMjgtV0VTVEVVUk9QRSIsImpvYkxvY2F0aW9uIjoid2VzdGV1cm9wZSJ9?api-version=2016-09-01" + "https://management.azure.com/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzkxMzQ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BQADggEBADYz_oLBrhGl-i2E4jxv9Z4RNcpp4gaxqVJv_GEzvVtwgx_8P3UrhZ1_mC3wETOajOHWZ44sJEzrSgyljDsF94dPoMGucgCuZewgFqyU_sPQSk0RRb8_sbRpS0dxUHvPIGNKbuoWB_Cd_hn9ZWM5VPdN_OHbromAkwOdgA6BPx7P7Ral6mk-aPegxaMUKMfwhg1m7LjUhci2aRzJJxGJSWoFQoUrGuQcAJp-7KXiWr_hDM69eWh0n6q1i7iTwme6w3Tf3zXGfbwhwYrV8qfGJjrsBraBDq3Z_SHk8SjHSXZpsJ3tyhT8ucyXRcYNWIJZvnjTdcVwmguYnhuTf-_fP5E&s=dDNYnmItPSQyo86NXeQp1DiW3XEz82Qya7shP2NgkVwVdUXDUolbpypB6c5CXq_hj00OvABKk-hvJwbllbPZL9X16aiFPt0qXAwspbImiI9vGwwOIPKUY_oYccN_1RowQsLD-Fo07viGPyJNTwPf3u29paPw-1i_xivt9Dq9JySE6GPVwb-HHH_8L8VXLISZPIr1cz8-xBAHZeTyDiSfYml2raGp_GorfE3T7QB0G_WtBo2RiGfnuM_Is-Q24OIK1FWY8Ri7tWOcycelFlr58w61iq5EC1AaSMP4EmTRVeXb-cEoUOlPpamCJNFNo35EEh0ci69YfSR2D7bRDHfOkQ&h=l_7sKonnNTgSSpxoH7sF4E9mX1INGUTIkT_BGeHRQes" ], "Retry-After": [ "15" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" + "11999" ], "x-ms-request-id": [ - "0f0495f3-7e5a-4bac-8a05-9bf578033d69" + "40285e38-8d20-43c8-9cdf-cc801b87c6d6" ], "x-ms-correlation-request-id": [ - "0f0495f3-7e5a-4bac-8a05-9bf578033d69" + "40285e38-8d20-43c8-9cdf-cc801b87c6d6" ], "x-ms-routing-request-id": [ - "CENTRALINDIA:20230525T145719Z:0f0495f3-7e5a-4bac-8a05-9bf578033d69" + "WESTINDIA:20240329T044639Z:40285e38-8d20-43c8-9cdf-cc801b87c6d6" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -2153,8 +1982,14 @@ "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 65944CE52EB8408AA2BEAE9FC4AFBF37 Ref B: MAA201060515051 Ref C: 2024-03-29T04:46:38Z" + ], "Date": [ - "Thu, 25 May 2023 14:57:19 GMT" + "Fri, 29 Mar 2024 04:46:38 GMT" ], "Expires": [ "-1" @@ -2167,15 +2002,15 @@ "StatusCode": 202 }, { - "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEyMjgtV0VTVEVVUk9QRSIsImpvYkxvY2F0aW9uIjoid2VzdGV1cm9wZSJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpFeU1qZ3RWMFZUVkVWVlVrOVFSU0lzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEdWMWNtOXdaU0o5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", + "RequestUri": "/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzkxMzQtV0VTVEVVUk9QRSIsImpvYkxvY2F0aW9uIjoid2VzdGV1cm9wZSJ9?api-version=2016-09-01&t=638472843994525748&c=MIIHADCCBeigAwIBAgITHgPomYee4Qu7BfhItwAAA-iZhzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQ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Rc0xELUZvMDd2aUdQeUpOVHdQZjN1MjlwYVB3LTFpX3hpdnQ5RHE5SnlTRTZHUFZ3Yi1ISEhfOEw4VlhMSVNaUElyMWN6OC14QkFIWmVUeURpU2ZZbWwycmFHcF9Hb3JmRTNUN1FCMEdfV3RCbzJSaUdmbnVNX0lzLVEyNE9JSzFGV1k4Umk3dFdPY3ljZWxGbHI1OHc2MWlxNUVDMUFhU01QNEVtVFJWZVhiLWNFb1VPbFBwYW1DSk5GTm8zNUVFaDBjaTY5WWZTUjJEN2JSREhmT2tRJmg9bF83c0tvbm5OVGdTU3B4b0g3c0Y0RTltWDFJTkdVVElrVF9CR2VIUlFlcw==", "RequestMethod": "GET", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" ] }, "RequestBody": "", @@ -2187,16 +2022,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" + "11999" ], "x-ms-request-id": [ - "15cbc000-025f-4146-abd2-832ac1c43f0d" + "0f1b1d31-0911-43d0-b819-857f6b6c3381" ], "x-ms-correlation-request-id": [ - "15cbc000-025f-4146-abd2-832ac1c43f0d" + "0f1b1d31-0911-43d0-b819-857f6b6c3381" ], "x-ms-routing-request-id": [ - "CENTRALINDIA:20230525T145735Z:15cbc000-025f-4146-abd2-832ac1c43f0d" + "WESTINDIA:20240329T044655Z:0f1b1d31-0911-43d0-b819-857f6b6c3381" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -2204,8 +2039,14 @@ "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 9B6CA8F319AD478383871C3E2D8AF39B Ref B: MAA201060515051 Ref C: 2024-03-29T04:46:54Z" + ], "Date": [ - "Thu, 25 May 2023 14:57:35 GMT" + "Fri, 29 Mar 2024 04:46:54 GMT" ], "Expires": [ "-1" @@ -2218,15 +2059,15 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEyMjgtV0VTVEVVUk9QRSIsImpvYkxvY2F0aW9uIjoid2VzdGV1cm9wZSJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpFeU1qZ3RWMFZUVkVWVlVrOVFSU0lzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEdWMWNtOXdaU0o5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", + "RequestUri": "/subscriptions/eb951d38-18d9-46d4-9a0c-f694b148c76a/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzkxMzQtV0VTVEVVUk9QRSIsImpvYkxvY2F0aW9uIjoid2VzdGV1cm9wZSJ9?api-version=2016-09-01&t=638472843994525748&c=MIIHADCCBeigAwIBAgITHgPomYee4Qu7BfhItwAAA-iZhzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwMTMwMDYwOTE2WhcNMjUwMTI0MDYwOTE2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZI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zFGV1k4Umk3dFdPY3ljZWxGbHI1OHc2MWlxNUVDMUFhU01QNEVtVFJWZVhiLWNFb1VPbFBwYW1DSk5GTm8zNUVFaDBjaTY5WWZTUjJEN2JSREhmT2tRJmg9bF83c0tvbm5OVGdTU3B4b0g3c0Y0RTltWDFJTkdVVElrVF9CR2VIUlFlcw==", "RequestMethod": "GET", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.700.22.55902", + "FxVersion/6.0.2824.12007", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.76" + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" ] }, "RequestBody": "", @@ -2238,16 +2079,16 @@ "no-cache" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" + "11999" ], "x-ms-request-id": [ - "6591dead-9375-4fd3-a2fb-01a998c8a3d2" + "9a4053aa-8645-49c6-90ec-d914cff28abc" ], "x-ms-correlation-request-id": [ - "6591dead-9375-4fd3-a2fb-01a998c8a3d2" + "9a4053aa-8645-49c6-90ec-d914cff28abc" ], "x-ms-routing-request-id": [ - "CENTRALINDIA:20230525T145735Z:6591dead-9375-4fd3-a2fb-01a998c8a3d2" + "WESTINDIA:20240329T044656Z:9a4053aa-8645-49c6-90ec-d914cff28abc" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -2255,8 +2096,14 @@ "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 7F347AAEFF2B4D018EAFC48EE05458D3 Ref B: MAA201060515051 Ref C: 2024-03-29T04:46:55Z" + ], "Date": [ - "Thu, 25 May 2023 14:57:35 GMT" + "Fri, 29 Mar 2024 04:46:55 GMT" ], "Expires": [ "-1" @@ -2271,11 +2118,11 @@ ], "Names": { "Test-CreateandUpdateServerWithMinimalTlsVersion": [ - "ps1228", - "ps3224" + "ps9134", + "ps4307" ] }, "Variables": { - "SubscriptionId": "857355f0-57d5-4754-b91a-0393dbff9afc" + "SubscriptionId": "eb951d38-18d9-46d4-9a0c-f694b148c76a" } } \ No newline at end of file diff --git a/src/Sql/Sql/ChangeLog.md b/src/Sql/Sql/ChangeLog.md index 18b197acc588..36b9a7cb58a1 100644 --- a/src/Sql/Sql/ChangeLog.md +++ b/src/Sql/Sql/ChangeLog.md @@ -18,6 +18,7 @@ - Additional information about change #1 --> ## Upcoming Release +* Made 1.2 as default for MinimalTlsVersion when creating new Sql Server from Powershell ## Version 4.14.0 * Added `DatabaseFormat` and `PricingModel` parameters to `New-AzSqlInstance`, `Set-AzSqlInstance` diff --git a/src/Sql/Sql/Server/Cmdlet/NewAzureSqlServer.cs b/src/Sql/Sql/Server/Cmdlet/NewAzureSqlServer.cs index 135649138e95..98ad889306d8 100644 --- a/src/Sql/Sql/Server/Cmdlet/NewAzureSqlServer.cs +++ b/src/Sql/Sql/Server/Cmdlet/NewAzureSqlServer.cs @@ -226,7 +226,7 @@ public override void ExecuteCmdlet() SqlAdministratorLogin = (this.SqlAdministratorCredentials != null) ? this.SqlAdministratorCredentials.UserName : null, Tags = TagsConversionHelper.CreateTagDictionary(Tags, validate: true), Identity = ResourceIdentityHelper.GetIdentityObjectFromType(this.AssignIdentity.IsPresent, this.IdentityType ?? null, UserAssignedIdentityId, null), - MinimalTlsVersion = this.MinimalTlsVersion, + MinimalTlsVersion = (this.MinimalTlsVersion != null) ? this.MinimalTlsVersion : "1.2", PublicNetworkAccess = this.PublicNetworkAccess, RestrictOutboundNetworkAccess = this.RestrictOutboundNetworkAccess, PrimaryUserAssignedIdentityId = this.PrimaryUserAssignedIdentityId, diff --git a/src/Sql/Sql/help/New-AzSqlServer.md b/src/Sql/Sql/help/New-AzSqlServer.md index 9e77efcc31f1..3029b40454b1 100644 --- a/src/Sql/Sql/help/New-AzSqlServer.md +++ b/src/Sql/Sql/help/New-AzSqlServer.md @@ -263,7 +263,7 @@ Accepted values: None, 1.0, 1.1, 1.2 Required: False Position: Named -Default value: None +Default value: 1.2 Accept pipeline input: False Accept wildcard characters: False ``` From a92637ffb0ab7397d75bf13e5036771fe5e3f900 Mon Sep 17 00:00:00 2001 From: Vincent Dai <23257217+vidai-msft@users.noreply.github.com> Date: Fri, 29 Mar 2024 00:11:44 -0700 Subject: [PATCH 04/12] Update change log (#24551) --- src/Batch/Batch/ChangeLog.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Batch/Batch/ChangeLog.md b/src/Batch/Batch/ChangeLog.md index f823bffdd4e8..a4f23fa2f0dd 100644 --- a/src/Batch/Batch/ChangeLog.md +++ b/src/Batch/Batch/ChangeLog.md @@ -18,8 +18,6 @@ - Additional information about change #1 --> ## Upcoming Release - -## Version 3.6.0 * Added new properties `ResourceTags` and `UpgradePolicy` to `PSCloudPool` and `PSPoolSpecification`. * Added new property `UpgradingOS` to `PSNodeCounts`. * Added new properties `Caching`, `DiskSizeGB`, `ManagedDisk` and `WriteAcceleratorEnabled` to `PSOSDisk`. @@ -108,7 +106,7 @@ * Removed `TargetOSVersion` from `PSCloudServiceConfiguration`. * Renamed `CurrentOSVersion` to `OSVersion` on `PSCloudServiceConfiguration`. * Removed `DataEgressGiB` and `DataIngressGiB` from `PSPoolUsageMetrics`. -* Removed **Get-AzBatchNodeAgentSku** and replaced it with **Get-AzBatchSupportedImage**. +* Removed **Get-AzBatchNodeAgentSku** and replaced it with **Get-AzBatchSupportedImage**. - **Get-AzBatchSupportedImage** returns the same data as **Get-AzBatchNodeAgentSku** but in a more friendly format. - New non-verified images are also now returned. Additional information about `Capabilities` and `BatchSupportEndOfLife` for each image is also included. * Added ability to mount remote file-systems on each node of a pool via the new `MountConfiguration` parameter of **New-AzBatchPool**. From a42295e100671aee5d445683e70d8b6d4c4024f4 Mon Sep 17 00:00:00 2001 From: udit1402 <163046945+udit1402@users.noreply.github.com> Date: Sat, 30 Mar 2024 06:55:22 -0700 Subject: [PATCH 05/12] Added changes for Byopip feature (#24501) * Added changes for Byopip feature * Updated as per PR comments * Updated change log file * Updated change log file --------- Co-authored-by: uditmisra52 <103006702+uditmisra52@users.noreply.github.com> --- .../ScenarioTests/AzureFirewallTests.cs | 8 + .../ScenarioTests/AzureFirewallTests.ps1 | 54 + .../TestByopipAzureHubFirewall.json | 7631 +++++++++++++++++ .../AzureFirewall/NewAzureFirewallCommand.cs | 16 +- src/Network/Network/ChangeLog.md | 1 + .../Models/AzureFirewall/PSAzureFirewall.cs | 18 + 6 files changed, 7727 insertions(+), 1 deletion(-) create mode 100644 src/Network/Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.AzureFirewallTests/TestByopipAzureHubFirewall.json diff --git a/src/Network/Network.Test/ScenarioTests/AzureFirewallTests.cs b/src/Network/Network.Test/ScenarioTests/AzureFirewallTests.cs index 535e4edda519..670b20a6da60 100644 --- a/src/Network/Network.Test/ScenarioTests/AzureFirewallTests.cs +++ b/src/Network/Network.Test/ScenarioTests/AzureFirewallTests.cs @@ -209,5 +209,13 @@ public void TestInvokeAzureFirewallPacketCapture() { TestRunner.RunTestScript("Test-InvokeAzureFirewallPacketCapture"); } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.Owner, NrpTeamAlias.azurefirewall)] + public void TestByopipAzureHubFirewall() + { + TestRunner.RunTestScript("Test-InvokeAzureByopipHubFirewall"); + } } } diff --git a/src/Network/Network.Test/ScenarioTests/AzureFirewallTests.ps1 b/src/Network/Network.Test/ScenarioTests/AzureFirewallTests.ps1 index 6b4f2583d0ab..e6eb41bbcb6a 100644 --- a/src/Network/Network.Test/ScenarioTests/AzureFirewallTests.ps1 +++ b/src/Network/Network.Test/ScenarioTests/AzureFirewallTests.ps1 @@ -2163,4 +2163,58 @@ function Test-InvokeAzureFirewallPacketCapture { # Cleanup Clean-ResourceGroup $rgname } +} + +<# +.SYNOPSIS +Tests Byopip feature for Hub Firewall +#> +function Test-InvokeAzureByopipHubFirewall { + # Setup + $rgname = Get-ResourceGroupName + $azureFirewallName = Get-ResourceName + $resourceTypeParent = "Microsoft.Network/AzureFirewalls" + $location = Get-ProviderLocation $resourceTypeParent "eastus2euap" + $azureFirewallPolicyName = Get-ResourceName + $skuName = "AZFW_Hub" + $skuTier = "Standard" + $publicIpName = Get-ResourceName + $virtualWanName = Get-ResourceName + $virtualHubName = Get-ResourceName + + try { + # Create the resource group + $resourceGroup = New-AzResourceGroup -Name $rgname -Location $location -Tags @{ testtag = "testval" } + + #Creating Public Ip + $publicip = New-AzPublicIpAddress -ResourceGroupName $rgname -name $publicIpName -location $location -AllocationMethod Static -Sku Standard + + # Create virtual Hub + $Vwan = New-AzVirtualWan -Name $virtualWanName -ResourceGroupName $rgname -Location $location -AllowVnetToVnetTraffic -AllowBranchToBranchTraffic -VirtualWANType "Standard" + $Hub = New-AzVirtualHub -Name $virtualHubName -ResourceGroupName $rgname -VirtualWan $Vwan -Location $Location -AddressPrefix "192.168.1.0/24" -Sku "Standard" + + # Create firewall + $vHubId = $Hub.Id + + New-AzFirewall -Name $azureFirewallName -ResourceGroupName $rgname -Location $location -SkuName $skuName -SkuTier $skuTier -PublicIpAddress $publicip -VirtualHubId $vHubId + + # Get AzureFirewall + $getAzureFirewall = Get-AzFirewall -name $azureFirewallName -ResourceGroupName $rgname + + #verification + Assert-AreEqual $rgName $getAzureFirewall.ResourceGroupName + Assert-AreEqual $azureFirewallName $getAzureFirewall.Name + Assert-NotNull $getAzureFirewall.Location + Assert-AreEqual (Normalize-Location $location) $getAzureFirewall.Location + Assert-NotNull $getAzureFirewall.Sku + Assert-AreEqual $skuName $getAzureFirewall.Sku.Name + Assert-AreEqual $skuTier $getAzureFirewall.Sku.Tier + Assert-AreEqual 1 @($getAzureFirewall.IpConfigurations).Count + Assert-NotNull $getAzureFirewall.IpConfigurations[0].PublicIpAddress.Id + Assert-NotNull $getAzureFirewall.IpConfigurations[0].PrivateIpAddress + } + finally { + # Cleanup + Clean-ResourceGroup $rgname + } } \ No newline at end of file diff --git a/src/Network/Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.AzureFirewallTests/TestByopipAzureHubFirewall.json b/src/Network/Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.AzureFirewallTests/TestByopipAzureHubFirewall.json new file mode 100644 index 000000000000..395c79c99522 --- /dev/null +++ b/src/Network/Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.AzureFirewallTests/TestByopipAzureHubFirewall.json @@ -0,0 +1,7631 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/providers/Microsoft.Network?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYWViNWIwMmEtMGYxOC00NWE0LTg2ZDYtODE4MDgxMTVjYWNmL3Byb3ZpZGVycy9NaWNyb3NvZnQuTmV0d29yaz9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", + "RequestMethod": "GET", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c6d6396a-22b0-4ae7-94e4-11104729265c" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "d66abffd-eeaf-45d3-bce2-084578c41183" + ], + "x-ms-correlation-request-id": [ + "d66abffd-eeaf-45d3-bce2-084578c41183" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T151308Z:d66abffd-eeaf-45d3-bce2-084578c41183" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: ECCAF3B058C0462BB86D9159757FC68F Ref B: SJC211051204049 Ref C: 2024-03-21T15:13:07Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:13:08 GMT" + ], + "Content-Length": [ + "169698" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/providers/Microsoft.Network\",\r\n \"namespace\": \"Microsoft.Network\",\r\n \"authorizations\": [\r\n {\r\n \"applicationId\": \"2cf9eb86-36b5-49dc-86ae-9a63135dfa8c\",\r\n \"roleDefinitionId\": \"13ba9ab4-19f0-4804-adc4-14ece36cc7a1\"\r\n },\r\n {\r\n \"applicationId\": \"7c33bfcb-8d33-48d6-8e60-dc6404003489\",\r\n \"roleDefinitionId\": \"ad6261e4-fa9a-4642-aa5f-104f1b67e9e3\"\r\n },\r\n {\r\n \"applicationId\": \"1e3e4475-288f-4018-a376-df66fd7fac5f\",\r\n \"roleDefinitionId\": \"1d538b69-3d87-4e56-8ff8-25786fd48261\"\r\n },\r\n {\r\n \"applicationId\": \"a0be0c72-870e-46f0-9c49-c98333a996f7\",\r\n \"roleDefinitionId\": \"7ce22727-ffce-45a9-930c-ddb2e56fa131\"\r\n },\r\n {\r\n \"applicationId\": \"486c78bf-a0f7-45f1-92fd-37215929e116\",\r\n \"roleDefinitionId\": \"98a9e526-0a60-4c1f-a33a-ae46e1f8dc0d\"\r\n },\r\n {\r\n \"applicationId\": \"19947cfd-0303-466c-ac3c-fcc19a7a1570\",\r\n \"roleDefinitionId\": \"d813ab6c-bfb7-413e-9462-005b21f0ce09\"\r\n },\r\n {\r\n \"applicationId\": \"341b7f3d-69b3-47f9-9ce7-5b7f4945fdbd\",\r\n \"roleDefinitionId\": \"8141843c-c51c-4c1e-a5bf-0d351594b86c\"\r\n },\r\n {\r\n \"applicationId\": \"328fd23b-de6e-462c-9433-e207470a5727\",\r\n \"roleDefinitionId\": \"79e29e06-4056-41e5-a6b2-959f1f47747e\"\r\n },\r\n {\r\n \"applicationId\": \"6d057c82-a784-47ae-8d12-ca7b38cf06b4\",\r\n \"roleDefinitionId\": \"c27dd31e-c1e5-4ab0-93e1-a12ba34f182e\",\r\n \"managedByRoleDefinitionId\": \"82e8942a-bcb6-444a-b1c4-31a3ea463a7d\"\r\n },\r\n {\r\n \"applicationId\": \"b4ca0290-4e73-4e31-ade0-c82ecfaabf6a\",\r\n \"roleDefinitionId\": \"18363e25-ff21-4159-ae8d-7dfecb5bd001\"\r\n },\r\n {\r\n \"applicationId\": \"79d7fb34-4bef-4417-8184-ff713af7a679\",\r\n \"roleDefinitionId\": \"1c1f11ef-abfa-4abe-a02b-226771d07fc7\"\r\n },\r\n {\r\n \"applicationId\": \"38808189-fa7a-4d8a-807f-eba01edacca6\",\r\n \"roleDefinitionId\": \"7dbad3e2-b105-40d5-8fe4-4a9ff6c17ae6\"\r\n },\r\n {\r\n \"applicationId\": \"6e02f8e9-db9b-4eb5-aa5a-7c8968375f68\",\r\n \"roleDefinitionId\": \"787424c7-f9d2-416b-a939-4d59deb2d259\"\r\n },\r\n {\r\n \"applicationId\": \"60b2e7d5-a27f-426d-a6b1-acced0846fdf\",\r\n \"roleDefinitionId\": \"0edb7c43-ed90-4da9-9ca2-e9a5d1521b00\"\r\n }\r\n ],\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworkGateways\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-06-01\",\r\n \"2018-05-01\",\r\n \"2018-04-01\",\r\n \"2018-03-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-11-01\",\r\n \"2017-10-01\",\r\n \"2017-09-01\",\r\n \"2017-08-01\",\r\n \"2017-06-01\",\r\n \"2017-04-01\",\r\n \"2017-03-01\",\r\n \"2016-12-01\",\r\n \"2016-11-01\",\r\n \"2016-10-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-07-01\",\r\n \"2016-06-01\",\r\n \"2016-03-30\",\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\",\r\n \"2014-12-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"localNetworkGateways\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-06-01\",\r\n \"2018-05-01\",\r\n \"2018-04-01\",\r\n \"2018-03-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-11-01\",\r\n \"2017-10-01\",\r\n \"2017-09-01\",\r\n \"2017-08-01\",\r\n \"2017-06-01\",\r\n \"2017-04-01\",\r\n \"2017-03-01\",\r\n \"2016-12-01\",\r\n \"2016-11-01\",\r\n \"2016-10-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-07-01\",\r\n \"2016-06-01\",\r\n \"2016-03-30\",\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\",\r\n \"2014-12-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"connections\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-06-01\",\r\n \"2018-05-01\",\r\n \"2018-04-01\",\r\n \"2018-03-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-11-01\",\r\n \"2017-10-01\",\r\n \"2017-09-01\",\r\n \"2017-08-01\",\r\n \"2017-06-01\",\r\n \"2017-04-01\",\r\n \"2017-03-01\",\r\n \"2016-12-01\",\r\n \"2016-11-01\",\r\n \"2016-10-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-07-01\",\r\n \"2016-06-01\",\r\n \"2016-03-30\",\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\",\r\n \"2014-12-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"applicationGateways\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-06-01\",\r\n \"2018-05-01\",\r\n \"2018-04-01\",\r\n \"2018-03-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-11-01\",\r\n \"2017-10-01\",\r\n \"2017-09-01\",\r\n \"2017-08-01\",\r\n \"2017-06-01\",\r\n \"2017-04-01\",\r\n \"2017-03-01\",\r\n \"2016-12-01\",\r\n \"2016-11-01\",\r\n \"2016-10-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-07-01\",\r\n \"2016-06-01\",\r\n \"2016-03-30\",\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\",\r\n \"2014-12-01-preview\"\r\n ],\r\n \"zoneMappings\": [\r\n {\r\n \"location\": \"Australia East\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Brazil South\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Canada Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Central India\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Central US\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Central US EUAP\",\r\n \"zones\": [\r\n \"2\",\r\n \"1\"\r\n ]\r\n },\r\n {\r\n \"location\": \"East Asia\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"East US\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"East US 2\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"East US 2 EUAP\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"France Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Germany West Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Italy North\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Japan East\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Korea Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"North Central US\",\r\n \"zones\": []\r\n },\r\n {\r\n \"location\": \"North Europe\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Norway East\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Poland Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Qatar Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"South Africa North\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"South Central US\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Southeast Asia\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Sweden Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Switzerland North\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"UAE North\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"UK South\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"West Europe\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"West US\",\r\n \"zones\": []\r\n },\r\n {\r\n \"location\": \"West US 2\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"West US 3\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Israel Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n }\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"expressRouteCircuits\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-06-01\",\r\n \"2018-05-01\",\r\n \"2018-04-01\",\r\n \"2018-03-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-11-01\",\r\n \"2017-10-01\",\r\n \"2017-09-01\",\r\n \"2017-08-01\",\r\n \"2017-06-01\",\r\n \"2017-04-01\",\r\n \"2017-03-01\",\r\n \"2016-12-01\",\r\n \"2016-11-01\",\r\n \"2016-10-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-07-01\",\r\n \"2016-06-01\",\r\n \"2016-03-30\",\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\",\r\n \"2014-12-01-preview\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"expressRouteServiceProviders\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-06-01\",\r\n \"2018-05-01\",\r\n \"2018-04-01\",\r\n \"2018-03-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-11-01\",\r\n \"2017-10-01\",\r\n \"2017-09-01\",\r\n \"2017-08-01\",\r\n \"2017-06-01\",\r\n \"2017-04-01\",\r\n \"2017-03-01\",\r\n \"2016-12-01\",\r\n \"2016-11-01\",\r\n \"2016-10-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-07-01\",\r\n \"2016-06-01\",\r\n \"2016-03-30\",\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\",\r\n \"2014-12-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"applicationGatewayAvailableWafRuleSets\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-06-01\",\r\n \"2018-05-01\",\r\n \"2018-04-01\",\r\n \"2018-03-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-11-01\",\r\n \"2017-10-01\",\r\n \"2017-09-01\",\r\n \"2017-08-01\",\r\n \"2017-06-01\",\r\n \"2017-04-01\",\r\n \"2017-03-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"applicationGatewayAvailableSslOptions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-06-01\",\r\n \"2018-05-01\",\r\n \"2018-04-01\",\r\n \"2018-03-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-11-01\",\r\n \"2017-10-01\",\r\n \"2017-09-01\",\r\n \"2017-08-01\",\r\n \"2017-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"applicationGatewayAvailableServerVariables\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"applicationGatewayAvailableRequestHeaders\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"applicationGatewayAvailableResponseHeaders\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"routeFilters\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-06-01\",\r\n \"2018-05-01\",\r\n \"2018-04-01\",\r\n \"2018-03-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-11-01\",\r\n \"2017-10-01\",\r\n \"2017-09-01\",\r\n \"2017-08-01\",\r\n \"2017-06-01\",\r\n \"2017-04-01\",\r\n \"2017-03-01\",\r\n \"2016-12-01\",\r\n \"2016-11-01\",\r\n \"2016-10-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-07-01\",\r\n \"2016-06-01\",\r\n \"2016-03-30\",\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\",\r\n \"2014-12-01-preview\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"bgpServiceCommunities\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-06-01\",\r\n \"2018-05-01\",\r\n \"2018-04-01\",\r\n \"2018-03-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-11-01\",\r\n \"2017-10-01\",\r\n \"2017-09-01\",\r\n \"2017-08-01\",\r\n \"2017-06-01\",\r\n \"2017-04-01\",\r\n \"2017-03-01\",\r\n \"2016-12-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vpnSites\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-06-01\",\r\n \"2018-05-01\",\r\n \"2018-04-01\",\r\n \"2018-03-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-11-01\",\r\n \"2017-10-01\",\r\n \"2017-09-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"vpnServerConfigurations\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\",\r\n \"UAE North\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"virtualHubs\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-06-01\",\r\n \"2018-05-01\",\r\n \"2018-04-01\",\r\n \"2018-03-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-11-01\",\r\n \"2017-10-01\",\r\n \"2017-09-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"vpnGateways\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-06-01\",\r\n \"2018-05-01\",\r\n \"2018-04-01\",\r\n \"2018-03-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-11-01\",\r\n \"2017-10-01\",\r\n \"2017-09-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"p2sVpnGateways\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"UAE North\",\r\n \"South Africa North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"expressRouteGateways\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"expressRoutePortsLocations\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"expressRoutePorts\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"UAE North\",\r\n \"South Africa North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"securityPartnerProviders\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"azureFirewalls\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-06-01\",\r\n \"2018-05-01\",\r\n \"2018-04-01\"\r\n ],\r\n \"zoneMappings\": [\r\n {\r\n \"location\": \"Australia East\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Brazil South\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Canada Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Central India\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Central US\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Central US EUAP\",\r\n \"zones\": [\r\n \"2\",\r\n \"1\"\r\n ]\r\n },\r\n {\r\n \"location\": \"East Asia\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"East US\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"East US 2\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"East US 2 EUAP\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"France Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Germany West Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Italy North\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Japan East\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Korea Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"North Central US\",\r\n \"zones\": []\r\n },\r\n {\r\n \"location\": \"North Europe\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Norway East\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Poland Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Qatar Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"South Africa North\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"South Central US\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Southeast Asia\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Sweden Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Switzerland North\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"UAE North\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"UK South\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"West Europe\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"West US\",\r\n \"zones\": []\r\n },\r\n {\r\n \"location\": \"West US 2\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"West US 3\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Israel Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n }\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"azureFirewallFqdnTags\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"applicationGatewayWebApplicationFirewallPolicies\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"locations/ApplicationGatewayWafDynamicManifests\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualWans\",\r\n \"locations\": [\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Sweden Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"North Central US\",\r\n \"East US 2\",\r\n \"Brazil South\",\r\n \"Central India\",\r\n \"West Central US\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Qatar Central\",\r\n \"Jio India West\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-06-01\",\r\n \"2018-05-01\",\r\n \"2018-04-01\",\r\n \"2018-03-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-11-01\",\r\n \"2017-10-01\",\r\n \"2017-09-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"bastionHosts\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\"\r\n ],\r\n \"zoneMappings\": [\r\n {\r\n \"location\": \"Australia East\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Brazil South\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Canada Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Central India\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Central US\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Central US EUAP\",\r\n \"zones\": [\r\n \"2\",\r\n \"1\"\r\n ]\r\n },\r\n {\r\n \"location\": \"East Asia\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"East US\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"East US 2\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"East US 2 EUAP\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"France Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Germany West Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Italy North\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Japan East\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Korea Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"North Central US\",\r\n \"zones\": []\r\n },\r\n {\r\n \"location\": \"North Europe\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Norway East\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Poland Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Qatar Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"South Africa North\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"South Central US\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Southeast Asia\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Sweden Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Switzerland North\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"UAE North\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"UK South\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"West Europe\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"West US\",\r\n \"zones\": []\r\n },\r\n {\r\n \"location\": \"West US 2\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"West US 3\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Israel Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n }\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"queryExpressRoutePortsBandwidth\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"trafficmanagerprofiles\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2022-04-01-preview\",\r\n \"2022-04-01\",\r\n \"2018-08-01\",\r\n \"2018-04-01\",\r\n \"2018-03-01\",\r\n \"2018-02-01\",\r\n \"2017-05-01\",\r\n \"2017-03-01\",\r\n \"2015-11-01\",\r\n \"2015-04-28-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"trafficmanagerprofiles/heatMaps\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2022-04-01-preview\",\r\n \"2022-04-01\",\r\n \"2018-08-01\",\r\n \"2018-04-01\",\r\n \"2018-03-01\",\r\n \"2018-02-01\",\r\n \"2017-09-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"trafficmanagerprofiles/azureendpoints\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2022-04-01-preview\",\r\n \"2022-04-01\",\r\n \"2018-08-01\",\r\n \"2018-04-01\",\r\n \"2018-03-01\",\r\n \"2018-02-01\",\r\n \"2017-05-01\",\r\n \"2017-03-01\",\r\n \"2015-11-01\",\r\n \"2015-04-28-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"trafficmanagerprofiles/externalendpoints\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2022-04-01-preview\",\r\n \"2022-04-01\",\r\n \"2018-08-01\",\r\n \"2018-04-01\",\r\n \"2018-03-01\",\r\n \"2018-02-01\",\r\n \"2017-05-01\",\r\n \"2017-03-01\",\r\n \"2015-11-01\",\r\n \"2015-04-28-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"trafficmanagerprofiles/nestedendpoints\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2022-04-01-preview\",\r\n \"2022-04-01\",\r\n \"2018-08-01\",\r\n \"2018-04-01\",\r\n \"2018-03-01\",\r\n \"2018-02-01\",\r\n \"2017-05-01\",\r\n \"2017-03-01\",\r\n \"2015-11-01\",\r\n \"2015-04-28-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkTrafficManagerNameAvailability\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2022-04-01-preview\",\r\n \"2022-04-01\",\r\n \"2018-08-01\",\r\n \"2018-04-01\",\r\n \"2018-03-01\",\r\n \"2018-02-01\",\r\n \"2017-05-01\",\r\n \"2017-03-01\",\r\n \"2015-11-01\",\r\n \"2015-04-28-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkTrafficManagerNameAvailabilityV2\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2022-04-01-preview\",\r\n \"2022-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"trafficManagerUserMetricsKeys\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2022-04-01-preview\",\r\n \"2022-04-01\",\r\n \"2018-08-01\",\r\n \"2018-04-01\",\r\n \"2017-09-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"trafficManagerGeographicHierarchies\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2022-04-01-preview\",\r\n \"2022-04-01\",\r\n \"2018-08-01\",\r\n \"2018-04-01\",\r\n \"2018-03-01\",\r\n \"2018-02-01\",\r\n \"2017-05-01\",\r\n \"2017-03-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"expressRouteProviderPorts\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2023-01-01-preview\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/hybridEdgeZone\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2023-01-01-preview\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"firewallPolicies\",\r\n \"locations\": [\r\n \"Italy North\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"UAE North\",\r\n \"Australia Central 2\",\r\n \"UAE Central\",\r\n \"Germany North\",\r\n \"Central India\",\r\n \"Korea South\",\r\n \"Switzerland North\",\r\n \"Switzerland West\",\r\n \"Japan West\",\r\n \"France South\",\r\n \"South Africa West\",\r\n \"West India\",\r\n \"Canada East\",\r\n \"South India\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Norway West\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Brazil South\",\r\n \"Brazil Southeast\",\r\n \"Japan East\",\r\n \"UK West\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"West Central US\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Australia Central\",\r\n \"Australia Southeast\",\r\n \"UK South\",\r\n \"East US 2\",\r\n \"West US 2\",\r\n \"North Central US\",\r\n \"Canada Central\",\r\n \"France Central\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2023-01-01-preview\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"ipGroups\",\r\n \"locations\": [\r\n \"Italy North\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"UAE North\",\r\n \"Australia Central 2\",\r\n \"UAE Central\",\r\n \"Germany North\",\r\n \"Central India\",\r\n \"Korea South\",\r\n \"Switzerland North\",\r\n \"Switzerland West\",\r\n \"Japan West\",\r\n \"France South\",\r\n \"South Africa West\",\r\n \"West India\",\r\n \"Canada East\",\r\n \"South India\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Norway West\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Brazil South\",\r\n \"Japan East\",\r\n \"UK West\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Australia Central\",\r\n \"Australia Southeast\",\r\n \"UK South\",\r\n \"East US 2\",\r\n \"West US 2\",\r\n \"North Central US\",\r\n \"Canada Central\",\r\n \"France Central\",\r\n \"West Central US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2023-01-01-preview\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"azureWebCategories\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2023-01-01-preview\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualRouters\",\r\n \"locations\": [\r\n \"Italy North\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"UAE North\",\r\n \"Australia Central 2\",\r\n \"UAE Central\",\r\n \"Germany North\",\r\n \"Central India\",\r\n \"Korea South\",\r\n \"Switzerland North\",\r\n \"Switzerland West\",\r\n \"Japan West\",\r\n \"France South\",\r\n \"South Africa West\",\r\n \"West India\",\r\n \"Canada East\",\r\n \"South India\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Norway West\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Brazil South\",\r\n \"Japan East\",\r\n \"UK West\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"West Central US\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Australia Central\",\r\n \"Australia Southeast\",\r\n \"UK South\",\r\n \"East US 2\",\r\n \"West US 2\",\r\n \"North Central US\",\r\n \"Canada Central\",\r\n \"France Central\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2023-01-01-preview\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"networkVirtualAppliances\",\r\n \"locations\": [\r\n \"Italy North\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Brazil Southeast\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"UAE North\",\r\n \"Australia Central 2\",\r\n \"UAE Central\",\r\n \"Germany North\",\r\n \"Central India\",\r\n \"Korea South\",\r\n \"Switzerland North\",\r\n \"Switzerland West\",\r\n \"Japan West\",\r\n \"France South\",\r\n \"South Africa West\",\r\n \"West India\",\r\n \"Canada East\",\r\n \"South India\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Norway West\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Brazil South\",\r\n \"Japan East\",\r\n \"UK West\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"West Central US\",\r\n \"South Central US\",\r\n \"Australia East\",\r\n \"Australia Central\",\r\n \"Australia Southeast\",\r\n \"UK South\",\r\n \"East US 2\",\r\n \"West US 2\",\r\n \"North Central US\",\r\n \"Canada Central\",\r\n \"France Central\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2023-01-01-preview\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\"\r\n ],\r\n \"capabilities\": \"SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"checkFrontdoorNameAvailability\",\r\n \"locations\": [\r\n \"global\",\r\n \"Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\"\r\n ],\r\n \"apiVersions\": [\r\n \"2021-06-01\",\r\n \"2020-07-01\",\r\n \"2020-05-01\",\r\n \"2020-01-01\",\r\n \"2019-08-01\",\r\n \"2019-05-01\",\r\n \"2019-04-01\",\r\n \"2018-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"frontdoorWebApplicationFirewallManagedRuleSets\",\r\n \"locations\": [\r\n \"global\",\r\n \"Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\"\r\n ],\r\n \"apiVersions\": [\r\n \"2022-05-01\",\r\n \"2020-11-01\",\r\n \"2020-04-01\",\r\n \"2019-10-01\",\r\n \"2019-03-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dnsResolvers\",\r\n \"locations\": [\r\n \"West Central US\",\r\n \"East US 2\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"Australia East\",\r\n \"UK South\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"North Central US\",\r\n \"West US 2\",\r\n \"West US 3\",\r\n \"Southeast Asia\",\r\n \"Central India\",\r\n \"Canada Central\",\r\n \"Central US\",\r\n \"France Central\",\r\n \"Japan East\",\r\n \"Germany West Central\",\r\n \"South Africa North\",\r\n \"Korea Central\",\r\n \"Sweden Central\",\r\n \"East Asia\",\r\n \"Switzerland North\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Norway East\",\r\n \"UAE North\",\r\n \"Australia Southeast\",\r\n \"Canada East\",\r\n \"Japan West\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Uk West\",\r\n \"South India\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-07-01-preview\",\r\n \"2023-07-01\",\r\n \"2022-07-01\",\r\n \"2020-04-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"dnsResolvers/inboundEndpoints\",\r\n \"locations\": [\r\n \"West Central US\",\r\n \"East US 2\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"Australia East\",\r\n \"UK South\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"North Central US\",\r\n \"West US 2\",\r\n \"West US 3\",\r\n \"Southeast Asia\",\r\n \"Central India\",\r\n \"Canada Central\",\r\n \"Central US\",\r\n \"France Central\",\r\n \"Japan East\",\r\n \"Germany West Central\",\r\n \"South Africa North\",\r\n \"Korea Central\",\r\n \"Sweden Central\",\r\n \"East Asia\",\r\n \"Switzerland North\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Norway East\",\r\n \"UAE North\",\r\n \"Australia Southeast\",\r\n \"Canada East\",\r\n \"Japan West\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Uk West\",\r\n \"South India\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-07-01-preview\",\r\n \"2023-07-01\",\r\n \"2022-07-01\",\r\n \"2020-04-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"dnsResolvers/outboundEndpoints\",\r\n \"locations\": [\r\n \"West Central US\",\r\n \"East US 2\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"Australia East\",\r\n \"UK South\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"North Central US\",\r\n \"West US 2\",\r\n \"West US 3\",\r\n \"Southeast Asia\",\r\n \"Central India\",\r\n \"Canada Central\",\r\n \"Central US\",\r\n \"France Central\",\r\n \"Japan East\",\r\n \"Germany West Central\",\r\n \"South Africa North\",\r\n \"Korea Central\",\r\n \"Sweden Central\",\r\n \"East Asia\",\r\n \"Switzerland North\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Norway East\",\r\n \"UAE North\",\r\n \"Australia Southeast\",\r\n \"Canada East\",\r\n \"Japan West\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Uk West\",\r\n \"South India\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-07-01-preview\",\r\n \"2023-07-01\",\r\n \"2022-07-01\",\r\n \"2020-04-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"dnsForwardingRulesets\",\r\n \"locations\": [\r\n \"West Central US\",\r\n \"East US 2\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"Australia East\",\r\n \"UK South\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"North Central US\",\r\n \"West US 2\",\r\n \"West US 3\",\r\n \"Southeast Asia\",\r\n \"Central India\",\r\n \"Canada Central\",\r\n \"Central US\",\r\n \"France Central\",\r\n \"Japan East\",\r\n \"Germany West Central\",\r\n \"South Africa North\",\r\n \"Korea Central\",\r\n \"Sweden Central\",\r\n \"East Asia\",\r\n \"Switzerland North\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Norway East\",\r\n \"UAE North\",\r\n \"Australia Southeast\",\r\n \"Canada East\",\r\n \"Japan West\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Uk West\",\r\n \"South India\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-07-01-preview\",\r\n \"2023-07-01\",\r\n \"2022-07-01\",\r\n \"2020-04-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"dnsForwardingRulesets/forwardingRules\",\r\n \"locations\": [\r\n \"West Central US\",\r\n \"East US 2\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"Australia East\",\r\n \"UK South\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"North Central US\",\r\n \"West US 2\",\r\n \"West US 3\",\r\n \"Southeast Asia\",\r\n \"Central India\",\r\n \"Canada Central\",\r\n \"Central US\",\r\n \"France Central\",\r\n \"Japan East\",\r\n \"Germany West Central\",\r\n \"South Africa North\",\r\n \"Korea Central\",\r\n \"Sweden Central\",\r\n \"East Asia\",\r\n \"Switzerland North\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Norway East\",\r\n \"UAE North\",\r\n \"Australia Southeast\",\r\n \"Canada East\",\r\n \"Japan West\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Uk West\",\r\n \"South India\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-07-01-preview\",\r\n \"2023-07-01\",\r\n \"2022-07-01\",\r\n \"2020-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dnsForwardingRulesets/virtualNetworkLinks\",\r\n \"locations\": [\r\n \"West Central US\",\r\n \"East US 2\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"Australia East\",\r\n \"UK South\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"North Central US\",\r\n \"West US 2\",\r\n \"West US 3\",\r\n \"Southeast Asia\",\r\n \"Central India\",\r\n \"Canada Central\",\r\n \"Central US\",\r\n \"France Central\",\r\n \"Japan East\",\r\n \"Germany West Central\",\r\n \"South Africa North\",\r\n \"Korea Central\",\r\n \"Sweden Central\",\r\n \"East Asia\",\r\n \"Switzerland North\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Norway East\",\r\n \"UAE North\",\r\n \"Australia Southeast\",\r\n \"Canada East\",\r\n \"Japan West\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Uk West\",\r\n \"South India\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-07-01-preview\",\r\n \"2023-07-01\",\r\n \"2022-07-01\",\r\n \"2020-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualNetworks/listDnsResolvers\",\r\n \"locations\": [\r\n \"West Central US\",\r\n \"East US 2\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"Australia East\",\r\n \"UK South\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"North Central US\",\r\n \"West US 2\",\r\n \"West US 3\",\r\n \"Southeast Asia\",\r\n \"Central India\",\r\n \"Canada Central\",\r\n \"Central US\",\r\n \"France Central\",\r\n \"Japan East\",\r\n \"Germany West Central\",\r\n \"South Africa North\",\r\n \"Korea Central\",\r\n \"Sweden Central\",\r\n \"East Asia\",\r\n \"Switzerland North\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Norway East\",\r\n \"UAE North\",\r\n \"Australia Southeast\",\r\n \"Canada East\",\r\n \"Japan West\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Uk West\",\r\n \"South India\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-07-01-preview\",\r\n \"2023-07-01\",\r\n \"2022-07-01\",\r\n \"2020-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualNetworks/listDnsForwardingRulesets\",\r\n \"locations\": [\r\n \"West Central US\",\r\n \"East US 2\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"Australia East\",\r\n \"UK South\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"North Central US\",\r\n \"West US 2\",\r\n \"West US 3\",\r\n \"Southeast Asia\",\r\n \"Central India\",\r\n \"Canada Central\",\r\n \"Central US\",\r\n \"France Central\",\r\n \"Japan East\",\r\n \"Germany West Central\",\r\n \"South Africa North\",\r\n \"Korea Central\",\r\n \"Sweden Central\",\r\n \"East Asia\",\r\n \"Switzerland North\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Norway East\",\r\n \"UAE North\",\r\n \"Australia Southeast\",\r\n \"Canada East\",\r\n \"Japan West\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Uk West\",\r\n \"South India\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-07-01-preview\",\r\n \"2023-07-01\",\r\n \"2022-07-01\",\r\n \"2020-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/dnsResolverOperationResults\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2023-07-01-preview\",\r\n \"2023-07-01\",\r\n \"2022-07-01\",\r\n \"2020-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/dnsResolverOperationStatuses\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2023-07-01-preview\",\r\n \"2023-07-01\",\r\n \"2022-07-01\",\r\n \"2020-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/dnsResolverPolicyOperationResults\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2023-07-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/dnsResolverPolicyOperationStatuses\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2023-07-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"networkManagers\",\r\n \"locations\": [\r\n \"West Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"West Europe\",\r\n \"UAE Central\",\r\n \"Germany North\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Australia Central 2\",\r\n \"South Africa West\",\r\n \"Brazil South\",\r\n \"UK West\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"UAE North\",\r\n \"Germany West Central\",\r\n \"Switzerland West\",\r\n \"East Asia\",\r\n \"Jio India West\",\r\n \"South Africa North\",\r\n \"UK South\",\r\n \"South India\",\r\n \"Australia Southeast\",\r\n \"France South\",\r\n \"West US 2\",\r\n \"Sweden Central\",\r\n \"Japan West\",\r\n \"Norway East\",\r\n \"France Central\",\r\n \"West US 3\",\r\n \"Central India\",\r\n \"Korea South\",\r\n \"Brazil Southeast\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Norway West\",\r\n \"Australia East\",\r\n \"Japan East\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"Switzerland North\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-03-01-preview\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-06-01-preview\",\r\n \"2022-05-01\",\r\n \"2022-04-01-preview\",\r\n \"2022-01-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"networkManagerConnections\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-03-01-preview\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-06-01-preview\",\r\n \"2022-05-01\",\r\n \"2022-04-01-preview\",\r\n \"2022-01-01\"\r\n ],\r\n \"capabilities\": \"SupportsExtension\"\r\n },\r\n {\r\n \"resourceType\": \"networkSecurityPerimeters\",\r\n \"locations\": [\r\n \"West Central US\",\r\n \"Jio India West\",\r\n \"Jio India Central\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"West Europe\",\r\n \"UAE Central\",\r\n \"Germany North\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Australia Central 2\",\r\n \"South Africa West\",\r\n \"Brazil South\",\r\n \"UK West\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"UAE North\",\r\n \"Germany West Central\",\r\n \"Switzerland West\",\r\n \"East Asia\",\r\n \"South Africa North\",\r\n \"UK South\",\r\n \"South India\",\r\n \"Australia Southeast\",\r\n \"France South\",\r\n \"West US 2\",\r\n \"Sweden Central\",\r\n \"Japan West\",\r\n \"Norway East\",\r\n \"France Central\",\r\n \"West US 3\",\r\n \"Central India\",\r\n \"Korea South\",\r\n \"Brazil Southeast\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Norway West\",\r\n \"Australia East\",\r\n \"Japan East\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"Switzerland North\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-09-01-preview\",\r\n \"2023-08-01-preview\",\r\n \"2023-07-01-preview\",\r\n \"2022-02-01-preview\",\r\n \"2021-05-01-preview\",\r\n \"2021-02-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"locations/perimeterAssociableResourceTypes\",\r\n \"locations\": [\r\n \"West Central US\",\r\n \"Jio India West\",\r\n \"Jio India Central\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"West Europe\",\r\n \"UAE Central\",\r\n \"Germany North\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Australia Central 2\",\r\n \"South Africa West\",\r\n \"Brazil South\",\r\n \"UK West\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"UAE North\",\r\n \"Germany West Central\",\r\n \"Switzerland West\",\r\n \"East Asia\",\r\n \"South Africa North\",\r\n \"UK South\",\r\n \"South India\",\r\n \"Australia Southeast\",\r\n \"France South\",\r\n \"West US 2\",\r\n \"Sweden Central\",\r\n \"Japan West\",\r\n \"Norway East\",\r\n \"France Central\",\r\n \"West US 3\",\r\n \"Central India\",\r\n \"Korea South\",\r\n \"Brazil Southeast\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Norway West\",\r\n \"Australia East\",\r\n \"Japan East\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"Switzerland North\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-09-01-preview\",\r\n \"2023-08-01-preview\",\r\n \"2023-07-01-preview\",\r\n \"2022-02-01-preview\",\r\n \"2021-05-01-preview\",\r\n \"2021-02-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/queryNetworkSecurityPerimeter\",\r\n \"locations\": [\r\n \"West Central US\",\r\n \"Jio India West\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"West Europe\",\r\n \"UAE Central\",\r\n \"Germany North\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Australia Central 2\",\r\n \"South Africa West\",\r\n \"Brazil South\",\r\n \"UK West\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"UAE North\",\r\n \"Germany West Central\",\r\n \"Switzerland West\",\r\n \"East Asia\",\r\n \"South Africa North\",\r\n \"UK South\",\r\n \"South India\",\r\n \"Australia Southeast\",\r\n \"France South\",\r\n \"West US 2\",\r\n \"Sweden Central\",\r\n \"Japan West\",\r\n \"Norway East\",\r\n \"France Central\",\r\n \"West US 3\",\r\n \"Central India\",\r\n \"Korea South\",\r\n \"Brazil Southeast\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Norway West\",\r\n \"Australia East\",\r\n \"Japan East\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"Switzerland North\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-09-01-preview\",\r\n \"2023-08-01-preview\",\r\n \"2023-07-01-preview\",\r\n \"2022-02-01-preview\",\r\n \"2021-05-01-preview\",\r\n \"2021-02-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualNetworks/listNetworkManagerEffectiveConnectivityConfigurations\",\r\n \"locations\": [\r\n \"West Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"West Europe\",\r\n \"UAE Central\",\r\n \"Germany North\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Australia Central 2\",\r\n \"South Africa West\",\r\n \"Brazil South\",\r\n \"UK West\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"UAE North\",\r\n \"Germany West Central\",\r\n \"Switzerland West\",\r\n \"East Asia\",\r\n \"Jio India West\",\r\n \"South Africa North\",\r\n \"UK South\",\r\n \"South India\",\r\n \"Australia Southeast\",\r\n \"France South\",\r\n \"West US 2\",\r\n \"Sweden Central\",\r\n \"Japan West\",\r\n \"Norway East\",\r\n \"France Central\",\r\n \"West US 3\",\r\n \"Central India\",\r\n \"Korea South\",\r\n \"Brazil Southeast\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Norway West\",\r\n \"Australia East\",\r\n \"Japan East\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"Switzerland North\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-03-01-preview\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-06-01-preview\",\r\n \"2022-05-01\",\r\n \"2022-04-01-preview\",\r\n \"2022-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualNetworks/listNetworkManagerEffectiveSecurityAdminRules\",\r\n \"locations\": [\r\n \"West Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"West Europe\",\r\n \"UAE Central\",\r\n \"Germany North\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Australia Central 2\",\r\n \"South Africa West\",\r\n \"Brazil South\",\r\n \"UK West\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"UAE North\",\r\n \"Germany West Central\",\r\n \"Switzerland West\",\r\n \"East Asia\",\r\n \"Jio India West\",\r\n \"South Africa North\",\r\n \"UK South\",\r\n \"South India\",\r\n \"Australia Southeast\",\r\n \"France South\",\r\n \"West US 2\",\r\n \"Sweden Central\",\r\n \"Japan West\",\r\n \"Norway East\",\r\n \"France Central\",\r\n \"West US 3\",\r\n \"Central India\",\r\n \"Korea South\",\r\n \"Brazil Southeast\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Norway West\",\r\n \"Australia East\",\r\n \"Japan East\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"Switzerland North\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-03-01-preview\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-06-01-preview\",\r\n \"2022-05-01\",\r\n \"2022-04-01-preview\",\r\n \"2022-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"networkGroupMemberships\",\r\n \"locations\": [\r\n \"West Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"West Europe\",\r\n \"UAE Central\",\r\n \"Germany North\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Australia Central 2\",\r\n \"South Africa West\",\r\n \"Brazil South\",\r\n \"UK West\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"UAE North\",\r\n \"Germany West Central\",\r\n \"Switzerland West\",\r\n \"East Asia\",\r\n \"Jio India West\",\r\n \"South Africa North\",\r\n \"UK South\",\r\n \"South India\",\r\n \"Australia Southeast\",\r\n \"France South\",\r\n \"West US 2\",\r\n \"Sweden Central\",\r\n \"Japan West\",\r\n \"Norway East\",\r\n \"France Central\",\r\n \"West US 3\",\r\n \"Central India\",\r\n \"Korea South\",\r\n \"Brazil Southeast\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Norway West\",\r\n \"Australia East\",\r\n \"Japan East\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"Switzerland North\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\"\r\n ],\r\n \"apiVersions\": [\r\n \"2022-06-01-preview\"\r\n ],\r\n \"capabilities\": \"SupportsExtension\"\r\n },\r\n {\r\n \"resourceType\": \"locations/commitInternalAzureNetworkManagerConfiguration\",\r\n \"locations\": [\r\n \"West Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"West Europe\",\r\n \"UAE Central\",\r\n \"Germany North\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Australia Central 2\",\r\n \"South Africa West\",\r\n \"Brazil South\",\r\n \"UK West\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"UAE North\",\r\n \"Germany West Central\",\r\n \"Switzerland West\",\r\n \"East Asia\",\r\n \"Jio India West\",\r\n \"South Africa North\",\r\n \"UK South\",\r\n \"South India\",\r\n \"Australia Southeast\",\r\n \"France South\",\r\n \"West US 2\",\r\n \"Sweden Central\",\r\n \"Japan West\",\r\n \"Norway East\",\r\n \"France Central\",\r\n \"West US 3\",\r\n \"Central India\",\r\n \"Korea South\",\r\n \"Brazil Southeast\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Norway West\",\r\n \"Australia East\",\r\n \"Japan East\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"Switzerland North\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-03-01-preview\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-06-01-preview\",\r\n \"2022-05-01\",\r\n \"2022-04-01-preview\",\r\n \"2022-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/internalAzureVirtualNetworkManagerOperation\",\r\n \"locations\": [\r\n \"West Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"West Europe\",\r\n \"UAE Central\",\r\n \"Germany North\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Australia Central 2\",\r\n \"South Africa West\",\r\n \"Brazil South\",\r\n \"UK West\",\r\n \"North Europe\",\r\n \"Central US\",\r\n \"UAE North\",\r\n \"Germany West Central\",\r\n \"Switzerland West\",\r\n \"East Asia\",\r\n \"Jio India West\",\r\n \"South Africa North\",\r\n \"UK South\",\r\n \"South India\",\r\n \"Australia Southeast\",\r\n \"France South\",\r\n \"West US 2\",\r\n \"Sweden Central\",\r\n \"Japan West\",\r\n \"Norway East\",\r\n \"France Central\",\r\n \"West US 3\",\r\n \"Central India\",\r\n \"Korea South\",\r\n \"Brazil Southeast\",\r\n \"Korea Central\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Norway West\",\r\n \"Australia East\",\r\n \"Japan East\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"Switzerland North\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-03-01-preview\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-06-01-preview\",\r\n \"2022-05-01\",\r\n \"2022-04-01-preview\",\r\n \"2022-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"privateDnsZones\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2020-06-01\",\r\n \"2020-01-01\",\r\n \"2018-09-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"privateDnsZones/virtualNetworkLinks\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2020-06-01\",\r\n \"2020-01-01\",\r\n \"2018-09-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"privateDnsOperationResults\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2020-06-01\",\r\n \"2020-01-01\",\r\n \"2018-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"privateDnsOperationStatuses\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2020-06-01\",\r\n \"2020-01-01\",\r\n \"2018-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"privateDnsZonesInternal\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2020-06-01\",\r\n \"2020-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"privateDnsZones/A\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2020-06-01\",\r\n \"2020-01-01\",\r\n \"2018-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"privateDnsZones/AAAA\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2020-06-01\",\r\n \"2020-01-01\",\r\n \"2018-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"privateDnsZones/CNAME\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2020-06-01\",\r\n \"2020-01-01\",\r\n \"2018-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"privateDnsZones/PTR\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2020-06-01\",\r\n \"2020-01-01\",\r\n \"2018-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"privateDnsZones/MX\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2020-06-01\",\r\n \"2020-01-01\",\r\n \"2018-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"privateDnsZones/TXT\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2020-06-01\",\r\n \"2020-01-01\",\r\n \"2018-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"privateDnsZones/SRV\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2020-06-01\",\r\n \"2020-01-01\",\r\n \"2018-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"privateDnsZones/SOA\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2020-06-01\",\r\n \"2020-01-01\",\r\n \"2018-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"privateDnsZones/all\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2020-06-01\",\r\n \"2020-01-01\",\r\n \"2018-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualNetworks/privateDnsZoneLinks\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2020-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dnszones\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-07-01-preview\",\r\n \"2018-05-01\",\r\n \"2018-03-01-preview\",\r\n \"2017-10-01\",\r\n \"2017-09-15-preview\",\r\n \"2017-09-01\",\r\n \"2016-04-01\",\r\n \"2015-05-04-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"dnsOperationResults\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-07-01-preview\",\r\n \"2018-05-01\",\r\n \"2018-03-01-preview\",\r\n \"2017-10-01\",\r\n \"2017-09-15-preview\",\r\n \"2017-09-01\",\r\n \"2016-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dnsOperationStatuses\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-07-01-preview\",\r\n \"2018-05-01\",\r\n \"2018-03-01-preview\",\r\n \"2017-10-01\",\r\n \"2017-09-15-preview\",\r\n \"2017-09-01\",\r\n \"2016-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"getDnsResourceReference\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-07-01-preview\",\r\n \"2018-05-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"internalNotify\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-07-01-preview\",\r\n \"2018-05-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dnszones/A\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-07-01-preview\",\r\n \"2018-05-01\",\r\n \"2018-03-01-preview\",\r\n \"2017-10-01\",\r\n \"2017-09-15-preview\",\r\n \"2017-09-01\",\r\n \"2016-04-01\",\r\n \"2015-05-04-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dnszones/AAAA\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-07-01-preview\",\r\n \"2018-05-01\",\r\n \"2018-03-01-preview\",\r\n \"2017-10-01\",\r\n \"2017-09-15-preview\",\r\n \"2017-09-01\",\r\n \"2016-04-01\",\r\n \"2015-05-04-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dnszones/CNAME\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-07-01-preview\",\r\n \"2018-05-01\",\r\n \"2018-03-01-preview\",\r\n \"2017-10-01\",\r\n \"2017-09-15-preview\",\r\n \"2017-09-01\",\r\n \"2016-04-01\",\r\n \"2015-05-04-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dnszones/PTR\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-07-01-preview\",\r\n \"2018-05-01\",\r\n \"2018-03-01-preview\",\r\n \"2017-10-01\",\r\n \"2017-09-15-preview\",\r\n \"2017-09-01\",\r\n \"2016-04-01\",\r\n \"2015-05-04-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dnszones/MX\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-07-01-preview\",\r\n \"2018-05-01\",\r\n \"2018-03-01-preview\",\r\n \"2017-10-01\",\r\n \"2017-09-15-preview\",\r\n \"2017-09-01\",\r\n \"2016-04-01\",\r\n \"2015-05-04-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dnszones/TXT\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-07-01-preview\",\r\n \"2018-05-01\",\r\n \"2018-03-01-preview\",\r\n \"2017-10-01\",\r\n \"2017-09-15-preview\",\r\n \"2017-09-01\",\r\n \"2016-04-01\",\r\n \"2015-05-04-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dnszones/SRV\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-07-01-preview\",\r\n \"2018-05-01\",\r\n \"2018-03-01-preview\",\r\n \"2017-10-01\",\r\n \"2017-09-15-preview\",\r\n \"2017-09-01\",\r\n \"2016-04-01\",\r\n \"2015-05-04-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dnszones/SOA\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-07-01-preview\",\r\n \"2018-05-01\",\r\n \"2018-03-01-preview\",\r\n \"2017-10-01\",\r\n \"2017-09-15-preview\",\r\n \"2017-09-01\",\r\n \"2016-04-01\",\r\n \"2015-05-04-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dnszones/NS\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-07-01-preview\",\r\n \"2018-05-01\",\r\n \"2018-03-01-preview\",\r\n \"2017-10-01\",\r\n \"2017-09-15-preview\",\r\n \"2017-09-01\",\r\n \"2016-04-01\",\r\n \"2015-05-04-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dnszones/CAA\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-07-01-preview\",\r\n \"2018-05-01\",\r\n \"2018-03-01-preview\",\r\n \"2017-10-01\",\r\n \"2017-09-15-preview\",\r\n \"2017-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dnszones/DS\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-07-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dnszones/TLSA\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-07-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dnszones/NAPTR\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-07-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dnszones/recordsets\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-07-01-preview\",\r\n \"2018-05-01\",\r\n \"2018-03-01-preview\",\r\n \"2017-10-01\",\r\n \"2017-09-15-preview\",\r\n \"2017-09-01\",\r\n \"2016-04-01\",\r\n \"2015-05-04-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dnszones/all\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-07-01-preview\",\r\n \"2018-05-01\",\r\n \"2018-03-01-preview\",\r\n \"2017-10-01\",\r\n \"2017-09-15-preview\",\r\n \"2017-09-01\",\r\n \"2016-04-01\",\r\n \"2015-05-04-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dnszones/dnssecConfigs\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-07-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-06-01\",\r\n \"2018-05-01\",\r\n \"2018-04-01\",\r\n \"2018-03-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-11-01\",\r\n \"2017-10-01\",\r\n \"2017-09-01\",\r\n \"2017-08-01\",\r\n \"2017-06-01\",\r\n \"2017-04-01\",\r\n \"2017-03-01\",\r\n \"2016-12-01\",\r\n \"2016-11-01\",\r\n \"2016-10-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-07-01\",\r\n \"2016-06-01\",\r\n \"2016-03-30\",\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\",\r\n \"2014-12-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"virtualNetworks/taggedTrafficConsumers\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-06-01\",\r\n \"2018-05-01\",\r\n \"2018-04-01\",\r\n \"2018-03-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-11-01\",\r\n \"2017-10-01\",\r\n \"2017-09-01\",\r\n \"2017-08-01\",\r\n \"2017-06-01\",\r\n \"2017-04-01\",\r\n \"2017-03-01\",\r\n \"2016-12-01\",\r\n \"2016-11-01\",\r\n \"2016-10-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-07-01\",\r\n \"2016-06-01\",\r\n \"2016-03-30\",\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\",\r\n \"2014-12-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"natGateways\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\"\r\n ],\r\n \"zoneMappings\": [\r\n {\r\n \"location\": \"Australia East\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Brazil South\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Canada Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Central India\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Central US\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Central US EUAP\",\r\n \"zones\": [\r\n \"2\",\r\n \"1\"\r\n ]\r\n },\r\n {\r\n \"location\": \"East Asia\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"East US\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"East US 2\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"East US 2 EUAP\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"France Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Germany West Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Italy North\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Japan East\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Korea Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"North Central US\",\r\n \"zones\": []\r\n },\r\n {\r\n \"location\": \"North Europe\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Norway East\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Poland Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Qatar Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"South Africa North\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"South Central US\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Southeast Asia\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Sweden Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Switzerland North\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"UAE North\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"UK South\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"West Europe\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"West US\",\r\n \"zones\": []\r\n },\r\n {\r\n \"location\": \"West US 2\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"West US 3\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Israel Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n }\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"publicIPAddresses\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-06-01\",\r\n \"2018-05-01\",\r\n \"2018-04-01\",\r\n \"2018-03-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-11-01\",\r\n \"2017-10-01\",\r\n \"2017-09-01\",\r\n \"2017-08-01\",\r\n \"2017-06-01\",\r\n \"2017-04-01\",\r\n \"2017-03-01\",\r\n \"2016-12-01\",\r\n \"2016-11-01\",\r\n \"2016-10-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-07-01\",\r\n \"2016-06-01\",\r\n \"2016-03-30\",\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\",\r\n \"2014-12-01-preview\"\r\n ],\r\n \"zoneMappings\": [\r\n {\r\n \"location\": \"Australia East\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Brazil South\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Canada Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Central India\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Central US\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Central US EUAP\",\r\n \"zones\": [\r\n \"2\",\r\n \"1\"\r\n ]\r\n },\r\n {\r\n \"location\": \"East Asia\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"East US\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"East US 2\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"East US 2 EUAP\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"France Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Germany West Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Italy North\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Japan East\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Korea Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"North Central US\",\r\n \"zones\": []\r\n },\r\n {\r\n \"location\": \"North Europe\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Norway East\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Poland Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Qatar Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"South Africa North\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"South Central US\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Southeast Asia\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Sweden Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Switzerland North\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"UAE North\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"UK South\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"West Europe\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"West US\",\r\n \"zones\": []\r\n },\r\n {\r\n \"location\": \"West US 2\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"West US 3\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Israel Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n }\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"internalPublicIpAddresses\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"customIpPrefixes\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\"\r\n ],\r\n \"zoneMappings\": [\r\n {\r\n \"location\": \"Australia East\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Brazil South\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Canada Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Central India\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Central US\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Central US EUAP\",\r\n \"zones\": [\r\n \"2\",\r\n \"1\"\r\n ]\r\n },\r\n {\r\n \"location\": \"East Asia\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"East US\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"East US 2\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"East US 2 EUAP\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"France Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Germany West Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Italy North\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Japan East\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Korea Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"North Central US\",\r\n \"zones\": []\r\n },\r\n {\r\n \"location\": \"North Europe\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Norway East\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Poland Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Qatar Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"South Africa North\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"South Central US\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Southeast Asia\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Sweden Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Switzerland North\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"UAE North\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"UK South\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"West Europe\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"West US\",\r\n \"zones\": []\r\n },\r\n {\r\n \"location\": \"West US 2\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"West US 3\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Israel Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n }\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"networkInterfaces\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-06-01\",\r\n \"2018-05-01\",\r\n \"2018-04-01\",\r\n \"2018-03-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-11-01\",\r\n \"2017-10-01\",\r\n \"2017-09-01\",\r\n \"2017-08-01\",\r\n \"2017-06-01\",\r\n \"2017-04-01\",\r\n \"2017-03-01\",\r\n \"2016-12-01\",\r\n \"2016-11-01\",\r\n \"2016-10-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-07-01\",\r\n \"2016-06-01\",\r\n \"2016-03-30\",\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\",\r\n \"2014-12-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"dscpConfigurations\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"privateEndpoints\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"privateEndpoints/privateLinkServiceProxies\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"privateEndpointRedirectMaps\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"loadBalancers\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-06-01\",\r\n \"2018-05-01\",\r\n \"2018-04-01\",\r\n \"2018-03-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-11-01\",\r\n \"2017-10-01\",\r\n \"2017-09-01\",\r\n \"2017-08-01\",\r\n \"2017-06-01\",\r\n \"2017-04-01\",\r\n \"2017-03-01\",\r\n \"2016-12-01\",\r\n \"2016-11-01\",\r\n \"2016-10-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-07-01\",\r\n \"2016-06-01\",\r\n \"2016-03-30\",\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\",\r\n \"2014-12-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"networkSecurityGroups\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-06-01\",\r\n \"2018-05-01\",\r\n \"2018-04-01\",\r\n \"2018-03-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-11-01\",\r\n \"2017-10-01\",\r\n \"2017-09-01\",\r\n \"2017-08-01\",\r\n \"2017-06-01\",\r\n \"2017-04-01\",\r\n \"2017-03-01\",\r\n \"2016-12-01\",\r\n \"2016-11-01\",\r\n \"2016-10-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-07-01\",\r\n \"2016-06-01\",\r\n \"2016-03-30\",\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\",\r\n \"2014-12-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"applicationSecurityGroups\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-06-01\",\r\n \"2018-05-01\",\r\n \"2018-04-01\",\r\n \"2018-03-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-11-01\",\r\n \"2017-10-01\",\r\n \"2017-09-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"serviceEndpointPolicies\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-06-01\",\r\n \"2018-05-01\",\r\n \"2018-04-01\",\r\n \"2018-03-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"networkIntentPolicies\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-06-01\",\r\n \"2018-05-01\",\r\n \"2018-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"routeTables\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-06-01\",\r\n \"2018-05-01\",\r\n \"2018-04-01\",\r\n \"2018-03-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-11-01\",\r\n \"2017-10-01\",\r\n \"2017-09-01\",\r\n \"2017-08-01\",\r\n \"2017-06-01\",\r\n \"2017-04-01\",\r\n \"2017-03-01\",\r\n \"2016-12-01\",\r\n \"2016-11-01\",\r\n \"2016-10-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-07-01\",\r\n \"2016-06-01\",\r\n \"2016-03-30\",\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\",\r\n \"2014-12-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"publicIPPrefixes\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\"\r\n ],\r\n \"zoneMappings\": [\r\n {\r\n \"location\": \"Australia East\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Brazil South\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Canada Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Central India\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Central US\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Central US EUAP\",\r\n \"zones\": [\r\n \"2\",\r\n \"1\"\r\n ]\r\n },\r\n {\r\n \"location\": \"East Asia\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"East US\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"East US 2\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"East US 2 EUAP\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"France Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Germany West Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Italy North\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Japan East\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Korea Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"North Central US\",\r\n \"zones\": []\r\n },\r\n {\r\n \"location\": \"North Europe\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Norway East\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Poland Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Qatar Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"South Africa North\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"South Central US\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Southeast Asia\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Sweden Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Switzerland North\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"UAE North\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"UK South\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"West Europe\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"West US\",\r\n \"zones\": []\r\n },\r\n {\r\n \"location\": \"West US 2\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"West US 3\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n },\r\n {\r\n \"location\": \"Israel Central\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\",\r\n \"2\"\r\n ]\r\n }\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"networkWatchers\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-06-01\",\r\n \"2018-05-01\",\r\n \"2018-04-01\",\r\n \"2018-03-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-11-01\",\r\n \"2017-10-01\",\r\n \"2017-09-01\",\r\n \"2017-08-01\",\r\n \"2017-06-01\",\r\n \"2017-04-01\",\r\n \"2017-03-01\",\r\n \"2016-12-01\",\r\n \"2016-11-01\",\r\n \"2016-10-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-07-01\",\r\n \"2016-06-01\",\r\n \"2016-03-30\",\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\",\r\n \"2014-12-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"networkWatchers/connectionMonitors\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-06-01\",\r\n \"2018-05-01\",\r\n \"2018-04-01\",\r\n \"2018-03-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-11-01\",\r\n \"2017-10-01\",\r\n \"2017-09-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"networkWatchers/flowLogs\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-06-01\",\r\n \"2018-05-01\",\r\n \"2018-04-01\",\r\n \"2018-03-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-11-01\",\r\n \"2017-10-01\",\r\n \"2017-09-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"networkWatchers/pingMeshes\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-06-01\",\r\n \"2018-05-01\",\r\n \"2018-04-01\",\r\n \"2018-03-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-11-01\",\r\n \"2017-10-01\",\r\n \"2017-09-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-06-01\",\r\n \"2018-05-01\",\r\n \"2018-04-01\",\r\n \"2018-03-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-11-01\",\r\n \"2017-10-01\",\r\n \"2017-09-01\",\r\n \"2017-08-01\",\r\n \"2017-06-01\",\r\n \"2017-04-01\",\r\n \"2017-03-01\",\r\n \"2016-12-01\",\r\n \"2016-11-01\",\r\n \"2016-10-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-07-01\",\r\n \"2016-06-01\",\r\n \"2016-03-30\",\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\",\r\n \"2014-12-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-06-01\",\r\n \"2018-05-01\",\r\n \"2018-04-01\",\r\n \"2018-03-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-11-01\",\r\n \"2017-10-01\",\r\n \"2017-09-01\",\r\n \"2017-08-01\",\r\n \"2017-06-01\",\r\n \"2017-04-01\",\r\n \"2017-03-01\",\r\n \"2016-12-01\",\r\n \"2016-11-01\",\r\n \"2016-10-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-07-01\",\r\n \"2016-06-01\",\r\n \"2016-03-30\",\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\",\r\n \"2014-12-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operationResults\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-06-01\",\r\n \"2018-05-01\",\r\n \"2018-04-01\",\r\n \"2018-03-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-11-01\",\r\n \"2017-10-01\",\r\n \"2017-09-01\",\r\n \"2017-08-01\",\r\n \"2017-06-01\",\r\n \"2017-04-01\",\r\n \"2017-03-01\",\r\n \"2016-12-01\",\r\n \"2016-11-01\",\r\n \"2016-10-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-07-01\",\r\n \"2016-06-01\",\r\n \"2016-03-30\",\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\",\r\n \"2014-12-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/CheckDnsNameAvailability\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-06-01\",\r\n \"2018-05-01\",\r\n \"2018-04-01\",\r\n \"2018-03-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-11-01\",\r\n \"2017-10-01\",\r\n \"2017-09-01\",\r\n \"2017-08-01\",\r\n \"2017-06-01\",\r\n \"2017-04-01\",\r\n \"2017-03-01\",\r\n \"2016-12-01\",\r\n \"2016-11-01\",\r\n \"2016-10-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-07-01\",\r\n \"2016-06-01\",\r\n \"2016-03-30\",\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\",\r\n \"2014-12-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/setLoadBalancerFrontendPublicIpAddresses\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"cloudServiceSlots\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\"\r\n ],\r\n \"capabilities\": \"SupportsExtension\"\r\n },\r\n {\r\n \"resourceType\": \"locations/usages\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-06-01\",\r\n \"2018-05-01\",\r\n \"2018-04-01\",\r\n \"2018-03-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-11-01\",\r\n \"2017-10-01\",\r\n \"2017-09-01\",\r\n \"2017-08-01\",\r\n \"2017-06-01\",\r\n \"2017-04-01\",\r\n \"2017-03-01\",\r\n \"2016-12-01\",\r\n \"2016-11-01\",\r\n \"2016-10-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-07-01\",\r\n \"2016-06-01\",\r\n \"2016-03-30\",\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\",\r\n \"2014-12-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/virtualNetworkAvailableEndpointServices\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-06-01\",\r\n \"2018-05-01\",\r\n \"2018-04-01\",\r\n \"2018-03-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-11-01\",\r\n \"2017-10-01\",\r\n \"2017-09-01\",\r\n \"2017-08-01\",\r\n \"2017-06-01\",\r\n \"2017-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/availableDelegations\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-06-01\",\r\n \"2018-05-01\",\r\n \"2018-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/serviceTags\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/availablePrivateEndpointTypes\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/availableServiceAliases\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/checkPrivateLinkServiceVisibility\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/autoApprovedPrivateLinkServices\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/batchValidatePrivateEndpointsForResourceMove\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/batchNotifyPrivateEndpointsForResourceMove\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/supportedVirtualMachineSizes\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-06-01\",\r\n \"2018-05-01\",\r\n \"2018-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/setAzureNetworkManagerConfiguration\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/publishResources\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/getAzureNetworkManagerConfiguration\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/checkAcceleratedNetworkingSupport\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-06-01\",\r\n \"2018-05-01\",\r\n \"2018-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/validateResourceOwnership\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-06-01\",\r\n \"2018-05-01\",\r\n \"2018-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/setResourceOwnership\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-06-01\",\r\n \"2018-05-01\",\r\n \"2018-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/effectiveResourceOwnership\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-06-01\",\r\n \"2018-05-01\",\r\n \"2018-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-06-01\",\r\n \"2018-05-01\",\r\n \"2018-04-01\",\r\n \"2018-03-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-11-01\",\r\n \"2017-10-01\",\r\n \"2017-09-01\",\r\n \"2017-08-01\",\r\n \"2017-06-01\",\r\n \"2017-04-01\",\r\n \"2017-03-01\",\r\n \"2016-12-01\",\r\n \"2016-11-01\",\r\n \"2016-10-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-07-01\",\r\n \"2016-06-01\",\r\n \"2016-03-30\",\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\",\r\n \"2014-12-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualNetworkTaps\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"privateLinkServices\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"locations/privateLinkServices\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"ddosProtectionPlans\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-06-01\",\r\n \"2018-05-01\",\r\n \"2018-04-01\",\r\n \"2018-03-01\",\r\n \"2018-02-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"networkProfiles\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-06-01\",\r\n \"2018-05-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"locations/bareMetalTenants\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"ipAllocations\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"locations/serviceTagDetails\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/dataTasks\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/startPacketTagging\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/deletePacketTagging\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/getPacketTagging\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/rnmEffectiveRouteTable\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/rnmEffectiveNetworkSecurityGroups\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/nfvOperations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2023-01-01-preview\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-06-01\",\r\n \"2018-05-01\",\r\n \"2018-04-01\",\r\n \"2018-03-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-11-01\",\r\n \"2017-10-01\",\r\n \"2017-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/nfvOperationResults\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2023-01-01-preview\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-06-01\",\r\n \"2018-05-01\",\r\n \"2018-04-01\",\r\n \"2018-03-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-11-01\",\r\n \"2017-10-01\",\r\n \"2017-09-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"networkVirtualApplianceSkus\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2023-01-01-preview\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"frontdoorOperationResults\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2022-05-01\",\r\n \"2021-06-01\",\r\n \"2020-11-01\",\r\n \"2020-07-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-01-01\",\r\n \"2019-11-01\",\r\n \"2019-10-01\",\r\n \"2019-08-01\",\r\n \"2019-05-01\",\r\n \"2019-04-01\",\r\n \"2019-03-01\",\r\n \"2018-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"frontdoors\",\r\n \"locations\": [\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"global\",\r\n \"Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\"\r\n ],\r\n \"apiVersions\": [\r\n \"2021-06-01\",\r\n \"2020-07-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-01-01\",\r\n \"2019-08-01\",\r\n \"2019-05-01\",\r\n \"2019-04-01\",\r\n \"2018-08-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"frontdoors/frontendEndpoints\",\r\n \"locations\": [\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"global\",\r\n \"Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\"\r\n ],\r\n \"apiVersions\": [\r\n \"2021-06-01\",\r\n \"2020-07-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-01-01\",\r\n \"2019-08-01\",\r\n \"2019-05-01\",\r\n \"2019-04-01\",\r\n \"2018-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"frontdoors/frontendEndpoints/customHttpsConfiguration\",\r\n \"locations\": [\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"global\",\r\n \"Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\"\r\n ],\r\n \"apiVersions\": [\r\n \"2021-06-01\",\r\n \"2020-07-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-01-01\",\r\n \"2019-08-01\",\r\n \"2019-05-01\",\r\n \"2019-04-01\",\r\n \"2018-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"frontdoorWebApplicationFirewallPolicies\",\r\n \"locations\": [\r\n \"East US 2 EUAP\",\r\n \"global\",\r\n \"Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\"\r\n ],\r\n \"apiVersions\": [\r\n \"2022-05-01\",\r\n \"2020-11-01\",\r\n \"2020-04-01\",\r\n \"2019-10-01\",\r\n \"2019-03-01\",\r\n \"2018-08-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"networkExperimentProfiles\",\r\n \"locations\": [\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"global\",\r\n \"Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"West US 2\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-11-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"gatewayLoadBalancerAliases\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"West US 3\",\r\n \"Jio India West\",\r\n \"Sweden Central\",\r\n \"Qatar Central\",\r\n \"Poland Central\",\r\n \"Italy North\",\r\n \"Israel Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"networkWatchers/lenses\",\r\n \"locations\": [\r\n \"Central US EUAP\",\r\n \"East US 2 EUAP\",\r\n \"South Africa West\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2023-11-01\",\r\n \"2023-09-01\",\r\n \"2023-06-01\",\r\n \"2023-05-01\",\r\n \"2023-04-01\",\r\n \"2023-02-01\",\r\n \"2022-11-01\",\r\n \"2022-09-01\",\r\n \"2022-07-01\",\r\n \"2022-05-01\",\r\n \"2022-01-01\",\r\n \"2021-12-01\",\r\n \"2021-08-01\",\r\n \"2021-06-01\",\r\n \"2021-05-01\",\r\n \"2021-04-01\",\r\n \"2021-03-01\",\r\n \"2021-02-01\",\r\n \"2021-01-01\",\r\n \"2020-11-01\",\r\n \"2020-08-01\",\r\n \"2020-07-01\",\r\n \"2020-06-01\",\r\n \"2020-05-01\",\r\n \"2020-04-01\",\r\n \"2020-03-01\",\r\n \"2020-01-01\",\r\n \"2019-12-01\",\r\n \"2019-11-01\",\r\n \"2019-09-01\",\r\n \"2019-08-01\",\r\n \"2019-07-01\",\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2019-02-01\",\r\n \"2018-12-01\",\r\n \"2018-11-01\",\r\n \"2018-10-01\",\r\n \"2018-08-01\",\r\n \"2018-07-01\",\r\n \"2018-06-01\",\r\n \"2018-05-01\",\r\n \"2018-04-01\",\r\n \"2018-03-01\",\r\n \"2018-02-01\",\r\n \"2018-01-01\",\r\n \"2017-11-01\",\r\n \"2017-10-01\",\r\n \"2017-09-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourcegroups/ps6079?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYWViNWIwMmEtMGYxOC00NWE0LTg2ZDYtODE4MDgxMTVjYWNmL3Jlc291cmNlZ3JvdXBzL3BzNjA3OT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", + "RequestMethod": "PUT", + "RequestHeaders": { + "x-ms-client-request-id": [ + "3093142e-c9cc-40eb-b365-3837d1b33323" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "78" + ] + }, + "RequestBody": "{\r\n \"location\": \"eastus2euap\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n }\r\n}", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "f8a53ef4-03fe-4227-bbca-939bb75e09c4" + ], + "x-ms-correlation-request-id": [ + "f8a53ef4-03fe-4227-bbca-939bb75e09c4" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T151310Z:f8a53ef4-03fe-4227-bbca-939bb75e09c4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 86644B168E4446649D5ECA43D6F28811 Ref B: SJC211051205033 Ref C: 2024-03-21T15:13:08Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:13:09 GMT" + ], + "Content-Length": [ + "381" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079\",\r\n \"name\": \"ps6079\",\r\n \"location\": \"eastus2euap\",\r\n \"tags\": {\r\n \"testtag\": \"testval\",\r\n \"AdminEmail\": \"cnfwoncall@microsoft.com\",\r\n \"AlertDaysBeforeDeletion\": \"5\",\r\n \"Created\": \"2024-03-21T15:13:09.0840102Z\",\r\n \"CreationDate\": \"2024-03-21T15:13:09.0839952Z\",\r\n \"DaysUntilDeletion\": \"20\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/publicIPAddresses/ps4026?api-version=2023-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYWViNWIwMmEtMGYxOC00NWE0LTg2ZDYtODE4MDgxMTVjYWNmL3Jlc291cmNlR3JvdXBzL3BzNjA3OS9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvcHVibGljSVBBZGRyZXNzZXMvcHM0MDI2P2FwaS12ZXJzaW9uPTIwMjMtMDktMDE=", + "RequestMethod": "GET", + "RequestHeaders": { + "x-ms-client-request-id": [ + "79cb58d7-59fd-45b0-9ac6-debc94a0c9de" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-failure-cause": [ + "gateway" + ], + "x-ms-request-id": [ + "bd6cba67-8074-4467-a4ee-093c6c138635" + ], + "x-ms-correlation-request-id": [ + "bd6cba67-8074-4467-a4ee-093c6c138635" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T151310Z:bd6cba67-8074-4467-a4ee-093c6c138635" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 0D3C6341BA2E4EC99C3C584573578489 Ref B: SJC211051205025 Ref C: 2024-03-21T15:13:10Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:13:10 GMT" + ], + "Content-Length": [ + "220" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"The Resource 'Microsoft.Network/publicIPAddresses/ps4026' under resource group 'ps6079' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix\"\r\n }\r\n}", + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/publicIPAddresses/ps4026?api-version=2023-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYWViNWIwMmEtMGYxOC00NWE0LTg2ZDYtODE4MDgxMTVjYWNmL3Jlc291cmNlR3JvdXBzL3BzNjA3OS9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvcHVibGljSVBBZGRyZXNzZXMvcHM0MDI2P2FwaS12ZXJzaW9uPTIwMjMtMDktMDE=", + "RequestMethod": "GET", + "RequestHeaders": { + "x-ms-client-request-id": [ + "79cb58d7-59fd-45b0-9ac6-debc94a0c9de" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "W/\"8b3a1d2d-2eff-45ba-ad7a-38e0b9a4bf50\"" + ], + "x-ms-request-id": [ + "3415e7ef-34e3-460a-bc43-1d2f4fd1da1c" + ], + "x-ms-correlation-request-id": [ + "e38c0ab2-ee3f-4c3c-ac1b-d69c91682cb6" + ], + "x-ms-arm-service-request-id": [ + "d7462944-0bfe-4768-92bc-29852e2398d0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T151315Z:e38c0ab2-ee3f-4c3c-ac1b-d69c91682cb6" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 7050E206210E4737BE03D56EC45FEE01 Ref B: SJC211051205025 Ref C: 2024-03-21T15:13:14Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:13:14 GMT" + ], + "Content-Length": [ + "611" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"name\": \"ps4026\",\r\n \"id\": \"/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/publicIPAddresses/ps4026\",\r\n \"etag\": \"W/\\\"8b3a1d2d-2eff-45ba-ad7a-38e0b9a4bf50\\\"\",\r\n \"location\": \"eastus2euap\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"fff1f9d0-2248-4935-8f3d-ad3909bf7bb2\",\r\n \"ipAddress\": \"52.138.71.206\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Static\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"ipTags\": [],\r\n \"ddosSettings\": {\r\n \"protectionMode\": \"VirtualNetworkInherited\"\r\n }\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/publicIPAddresses/ps4026?api-version=2023-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYWViNWIwMmEtMGYxOC00NWE0LTg2ZDYtODE4MDgxMTVjYWNmL3Jlc291cmNlR3JvdXBzL3BzNjA3OS9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvcHVibGljSVBBZGRyZXNzZXMvcHM0MDI2P2FwaS12ZXJzaW9uPTIwMjMtMDktMDE=", + "RequestMethod": "GET", + "RequestHeaders": { + "x-ms-client-request-id": [ + "79cb58d7-59fd-45b0-9ac6-debc94a0c9de" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "W/\"8b3a1d2d-2eff-45ba-ad7a-38e0b9a4bf50\"" + ], + "x-ms-request-id": [ + "477b05bd-8fef-4a40-ad1a-a2c768fc8e3c" + ], + "x-ms-correlation-request-id": [ + "0d75b48d-79b4-4247-9664-10a65a6c6092" + ], + "x-ms-arm-service-request-id": [ + "abb8ba9d-5e16-4784-bdb6-5997ce37f3c8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T151316Z:0d75b48d-79b4-4247-9664-10a65a6c6092" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 31386B2AA5504807B7686C20E35D02BD Ref B: SJC211051205025 Ref C: 2024-03-21T15:13:15Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:13:15 GMT" + ], + "Content-Length": [ + "611" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"name\": \"ps4026\",\r\n \"id\": \"/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/publicIPAddresses/ps4026\",\r\n \"etag\": \"W/\\\"8b3a1d2d-2eff-45ba-ad7a-38e0b9a4bf50\\\"\",\r\n \"location\": \"eastus2euap\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"fff1f9d0-2248-4935-8f3d-ad3909bf7bb2\",\r\n \"ipAddress\": \"52.138.71.206\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Static\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"ipTags\": [],\r\n \"ddosSettings\": {\r\n \"protectionMode\": \"VirtualNetworkInherited\"\r\n }\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/publicIPAddresses/ps4026?api-version=2023-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYWViNWIwMmEtMGYxOC00NWE0LTg2ZDYtODE4MDgxMTVjYWNmL3Jlc291cmNlR3JvdXBzL3BzNjA3OS9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvcHVibGljSVBBZGRyZXNzZXMvcHM0MDI2P2FwaS12ZXJzaW9uPTIwMjMtMDktMDE=", + "RequestMethod": "PUT", + "RequestHeaders": { + "x-ms-client-request-id": [ + "79cb58d7-59fd-45b0-9ac6-debc94a0c9de" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "177" + ] + }, + "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard\"\r\n },\r\n \"zones\": [],\r\n \"properties\": {\r\n \"publicIPAllocationMethod\": \"Static\",\r\n \"ipTags\": []\r\n },\r\n \"location\": \"eastus2euap\"\r\n}", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "1" + ], + "x-ms-request-id": [ + "5b1bb30c-b2f7-453c-802d-73a2528ffba7" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/providers/Microsoft.Network/locations/eastus2euap/operations/5b1bb30c-b2f7-453c-802d-73a2528ffba7?api-version=2023-09-01&t=638466307929795531&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1fEojEYKGj84-8gHXFveahRVa6ZPij7XMWfXQZWdo2aj6sMRX8UCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3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SMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAF9wsVY5GPv3eQNDdOO3pX2IJsz5n5bMuVN0DqeMoBkFFfk4UWmFDChWzbFNYlcFaVFC2RHGlRYoa4Shec_5_9qIkBA7MbjW1rd15-n3LCXGb_SUGAoJ2QjX_OAXbzgS4slLZCIe0zJCKCEvv7NUTzNo6MvpD3KUxAAbKf7XDOl8hHVDhpJxr64cDohqGiLjy7aI6A_zY5ZWzQLMCd_WxuXu6eEc_faoOML9lugh1NkAR2tvKevlf-S2xAELwFyE3Dbrf_JFOuvA8Ny7J5Y47A5GopbtZljdnMXkGfpUECKiaY_q2iLrlSyhK0925bX4zz3LLD903HZectExoCXSYb0&s=TBolqg7EpqnJ3SOm-X-GcR5CuDAcBMODfeci3LVFtbXXpufOXsZmkyv8XkUP-PARyuGuPDfrb4jBPV40vHGeTRjnQoi3OZb8IZmZP1C1JDqMD-JndDzBhVIJ_K9rX7FZkIVTRM3-YGsYu7Y363JZHRc9glvJIc0KFXnzlltJ9pnIFrxDS7UhS3OIQ_ox4HcDyibc_FHLwzZHvxpcGxLqaMCKgzUwYecGCkhHs-xCYPa1KdUblgX0kQ2Ynlw_DryTmt8CWfTol23Xo44j-uIUWWIDjbPxzCurRwhQe5O8lHi3v59f1jAeUyylgDJwi2FW7Qjj3RBSe1Uehhx5pA_r1w&h=XXAQfArkUBqeXuxWV-WanYp0UO0E9ZPzmkSJmtCQiVE" + ], + "x-ms-correlation-request-id": [ + "b4f091b2-f895-4d93-8217-6bf3c74b8a2d" + ], + "azure-asyncnotification": [ + "Enabled" + ], + "x-ms-arm-service-request-id": [ + "cea92883-b3ac-4c09-bf61-11186ce6e383" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T151312Z:b4f091b2-f895-4d93-8217-6bf3c74b8a2d" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 5A421267CD0B42CC96BE5FD45F89B06D Ref B: SJC211051205025 Ref C: 2024-03-21T15:13:11Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:13:12 GMT" + ], + "Content-Length": [ + "582" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"name\": \"ps4026\",\r\n \"id\": \"/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/publicIPAddresses/ps4026\",\r\n \"etag\": \"W/\\\"71ed360d-80e1-45ea-9983-9dfcb50ba9ab\\\"\",\r\n \"location\": \"eastus2euap\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": \"fff1f9d0-2248-4935-8f3d-ad3909bf7bb2\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Static\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"ipTags\": [],\r\n \"ddosSettings\": {\r\n \"protectionMode\": \"VirtualNetworkInherited\"\r\n }\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\r\n }\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/providers/Microsoft.Network/locations/eastus2euap/operations/5b1bb30c-b2f7-453c-802d-73a2528ffba7?api-version=2023-09-01&t=638466307929795531&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9B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huemxsdEo5cG5JRnJ4RFM3VWhTM09JUV9veDRIY0R5aWJjX0ZITHd6Wkh2eHBjR3hMcWFNQ0tnelV3WWVjR0NraEhzLXhDWVBhMUtkVWJsZ1gwa1EyWW5sd19EcnlUbXQ4Q1dmVG9sMjNYbzQ0ai11SVVXV0lEamJQeHpDdXJSd2hRZTVPOGxIaTN2NTlmMWpBZVV5eWxnREp3aTJGVzdRamozUkJTZTFVZWhoeDVwQV9yMXcmaD1YWEFRZkFya1VCcWVYdXhXVi1XYW5ZcDBVTzBFOVpQem1rU0ptdENRaVZF", + "RequestMethod": "GET", + "RequestHeaders": { + "x-ms-client-request-id": [ + "79cb58d7-59fd-45b0-9ac6-debc94a0c9de" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "c1c49314-d908-4f1c-bec6-30c3d0459ace" + ], + "x-ms-correlation-request-id": [ + "1d90e0d5-28fe-4dff-8270-8c56dac0bbfa" + ], + "x-ms-arm-service-request-id": [ + "16dcc505-d0e6-4a8f-96a3-65b978bf4b05" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T151314Z:1d90e0d5-28fe-4dff-8270-8c56dac0bbfa" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 5E3F527CB3634C2D847008E3FFCC48CE Ref B: SJC211051205025 Ref C: 2024-03-21T15:13:14Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:13:13 GMT" + ], + "Content-Length": [ + "22" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"status\": \"Succeeded\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/virtualWans/ps2646?api-version=2023-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYWViNWIwMmEtMGYxOC00NWE0LTg2ZDYtODE4MDgxMTVjYWNmL3Jlc291cmNlR3JvdXBzL3BzNjA3OS9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvdmlydHVhbFdhbnMvcHMyNjQ2P2FwaS12ZXJzaW9uPTIwMjMtMDktMDE=", + "RequestMethod": "GET", + "RequestHeaders": { + "x-ms-client-request-id": [ + "db54f1d8-d87b-4fdb-9d50-76ca61c78b61" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-failure-cause": [ + "gateway" + ], + "x-ms-request-id": [ + "184d8989-69db-4a58-9a93-0f1f2ad5b7a9" + ], + "x-ms-correlation-request-id": [ + "184d8989-69db-4a58-9a93-0f1f2ad5b7a9" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T151316Z:184d8989-69db-4a58-9a93-0f1f2ad5b7a9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 33775AA0E91F4679903ACA3886FB5152 Ref B: SJC211051205023 Ref C: 2024-03-21T15:13:16Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:13:16 GMT" + ], + "Content-Length": [ + "214" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"The Resource 'Microsoft.Network/virtualWans/ps2646' under resource group 'ps6079' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix\"\r\n }\r\n}", + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/virtualWans/ps2646?api-version=2023-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYWViNWIwMmEtMGYxOC00NWE0LTg2ZDYtODE4MDgxMTVjYWNmL3Jlc291cmNlR3JvdXBzL3BzNjA3OS9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvdmlydHVhbFdhbnMvcHMyNjQ2P2FwaS12ZXJzaW9uPTIwMjMtMDktMDE=", + "RequestMethod": "GET", + "RequestHeaders": { + "x-ms-client-request-id": [ + "db54f1d8-d87b-4fdb-9d50-76ca61c78b61" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "W/\"ed8b91c6-dfd0-4db2-9afa-b20dc87cdce7\"" + ], + "x-ms-request-id": [ + "9095b1d3-b108-4d52-b17c-a1118a157a1b" + ], + "x-ms-correlation-request-id": [ + "6bdd8537-a1e0-47f2-bcd9-54c6245daf35" + ], + "x-ms-arm-service-request-id": [ + "36607db6-5df5-4964-a736-0bf18dbe880b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T151329Z:6bdd8537-a1e0-47f2-bcd9-54c6245daf35" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: B2C54B06A6D648839B045D0A5080EF46 Ref B: SJC211051205023 Ref C: 2024-03-21T15:13:28Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:13:28 GMT" + ], + "Content-Length": [ + "429" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"name\": \"ps2646\",\r\n \"id\": \"/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/virtualWans/ps2646\",\r\n \"etag\": \"W/\\\"ed8b91c6-dfd0-4db2-9afa-b20dc87cdce7\\\"\",\r\n \"type\": \"Microsoft.Network/virtualWans\",\r\n \"location\": \"eastus2euap\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"disableVpnEncryption\": false,\r\n \"allowBranchToBranchTraffic\": true,\r\n \"office365LocalBreakoutCategory\": \"None\",\r\n \"type\": \"Standard\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/virtualWans/ps2646?api-version=2023-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYWViNWIwMmEtMGYxOC00NWE0LTg2ZDYtODE4MDgxMTVjYWNmL3Jlc291cmNlR3JvdXBzL3BzNjA3OS9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvdmlydHVhbFdhbnMvcHMyNjQ2P2FwaS12ZXJzaW9uPTIwMjMtMDktMDE=", + "RequestMethod": "GET", + "RequestHeaders": { + "x-ms-client-request-id": [ + "db54f1d8-d87b-4fdb-9d50-76ca61c78b61" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "W/\"ed8b91c6-dfd0-4db2-9afa-b20dc87cdce7\"" + ], + "x-ms-request-id": [ + "af0c0b8d-f35a-491c-8942-420aeef503c8" + ], + "x-ms-correlation-request-id": [ + "fd548bcb-ab34-44ff-8c09-3e78785923e4" + ], + "x-ms-arm-service-request-id": [ + "041680c8-99bd-4bbb-ab32-8af7e5f67682" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T151329Z:fd548bcb-ab34-44ff-8c09-3e78785923e4" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 99B42D8982214909BF4C8ACB03018CD1 Ref B: SJC211051205023 Ref C: 2024-03-21T15:13:29Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:13:29 GMT" + ], + "Content-Length": [ + "429" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"name\": \"ps2646\",\r\n \"id\": \"/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/virtualWans/ps2646\",\r\n \"etag\": \"W/\\\"ed8b91c6-dfd0-4db2-9afa-b20dc87cdce7\\\"\",\r\n \"type\": \"Microsoft.Network/virtualWans\",\r\n \"location\": \"eastus2euap\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"disableVpnEncryption\": false,\r\n \"allowBranchToBranchTraffic\": true,\r\n \"office365LocalBreakoutCategory\": \"None\",\r\n \"type\": \"Standard\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/virtualWans/ps2646?api-version=2023-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYWViNWIwMmEtMGYxOC00NWE0LTg2ZDYtODE4MDgxMTVjYWNmL3Jlc291cmNlR3JvdXBzL3BzNjA3OS9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvdmlydHVhbFdhbnMvcHMyNjQ2P2FwaS12ZXJzaW9uPTIwMjMtMDktMDE=", + "RequestMethod": "GET", + "RequestHeaders": { + "x-ms-client-request-id": [ + "33c01bb1-0034-4bb4-bb7b-ce79171b16bd" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "W/\"ed8b91c6-dfd0-4db2-9afa-b20dc87cdce7\"" + ], + "x-ms-request-id": [ + "c09e2d3d-c06f-4e1c-a66e-66319ab03b46" + ], + "x-ms-correlation-request-id": [ + "dc8e0d9e-0f8b-4c4b-9ae4-f7a5ad03c694" + ], + "x-ms-arm-service-request-id": [ + "9737d958-e16a-4bfa-b119-955526ee56e2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T151331Z:dc8e0d9e-0f8b-4c4b-9ae4-f7a5ad03c694" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: D1A05BA0DC404214A599A70FDA3BC8A3 Ref B: SJC211051205011 Ref C: 2024-03-21T15:13:30Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:13:30 GMT" + ], + "Content-Length": [ + "429" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"name\": \"ps2646\",\r\n \"id\": \"/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/virtualWans/ps2646\",\r\n \"etag\": \"W/\\\"ed8b91c6-dfd0-4db2-9afa-b20dc87cdce7\\\"\",\r\n \"type\": \"Microsoft.Network/virtualWans\",\r\n \"location\": \"eastus2euap\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"disableVpnEncryption\": false,\r\n \"allowBranchToBranchTraffic\": true,\r\n \"office365LocalBreakoutCategory\": \"None\",\r\n \"type\": \"Standard\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/virtualWans/ps2646?api-version=2023-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYWViNWIwMmEtMGYxOC00NWE0LTg2ZDYtODE4MDgxMTVjYWNmL3Jlc291cmNlR3JvdXBzL3BzNjA3OS9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvdmlydHVhbFdhbnMvcHMyNjQ2P2FwaS12ZXJzaW9uPTIwMjMtMDktMDE=", + "RequestMethod": "PUT", + "RequestHeaders": { + "x-ms-client-request-id": [ + "db54f1d8-d87b-4fdb-9d50-76ca61c78b61" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "135" + ] + }, + "RequestBody": "{\r\n \"properties\": {\r\n \"allowBranchToBranchTraffic\": true,\r\n \"allowVnetToVnetTraffic\": true\r\n },\r\n \"location\": \"eastus2euap\"\r\n}", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "10" + ], + "x-ms-request-id": [ + "af157d90-8684-4ca0-8395-5537d46f607e" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/providers/Microsoft.Network/locations/eastus2euap/operations/af157d90-8684-4ca0-8395-5537d46f607e?api-version=2023-09-01&t=638466307976546604&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1fEojEYKGj84-8gHXFveahRVa6ZPij7XMWfXQZWdo2aj6sMRX8UCAwEAAaOCA-0wggPp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-858f-df45ff41262d" + ], + "azure-asyncnotification": [ + "Enabled" + ], + "x-ms-arm-service-request-id": [ + "0986d344-9149-4fb9-8c18-f9837e0345b8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T151317Z:68f8ae7c-f498-42b5-858f-df45ff41262d" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: B004246F82B343209F41B823CD3163C8 Ref B: SJC211051205023 Ref C: 2024-03-21T15:13:16Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:13:17 GMT" + ], + "Content-Length": [ + "428" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"name\": \"ps2646\",\r\n \"id\": \"/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/virtualWans/ps2646\",\r\n \"etag\": \"W/\\\"2ad8f903-3f9d-47ee-a62a-e357da60a5ed\\\"\",\r\n \"type\": \"Microsoft.Network/virtualWans\",\r\n \"location\": \"eastus2euap\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"disableVpnEncryption\": false,\r\n \"allowBranchToBranchTraffic\": true,\r\n \"office365LocalBreakoutCategory\": \"None\",\r\n \"type\": \"Standard\"\r\n }\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/providers/Microsoft.Network/locations/eastus2euap/operations/af157d90-8684-4ca0-8395-5537d46f607e?api-version=2023-09-01&t=638466307976546604&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU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dOcGh4VVVYUlU4S19Jazk1SVBtUDRNUk56QTNIb0dyQjJWdUJ6Y1RUU2d1akMzMWhjdkhWaDY5aG5lT0U1RWJWcHUxTkhmWTVMNUFLZHZuYnE4MWtneUJtM3YxNFpVUVJFMUVKYlI5Nkx6QVZ0OGdKcDVIemN4QjJmdU93YnN0S0YzQmFNZUYzQmdLRmVBMGdISTdwSFJzOGRkdUdocVlXZW1PMjNqOTlrRk5Ja1QwdWlOU1FLTmhLelJlU2syMncmaD1EUHRXMnItcDdnUlZHTEpVd3p5VzhBZ1BVRUtfb3hHdENia2Y1bVNJT2Vn", + "RequestMethod": "GET", + "RequestHeaders": { + "x-ms-client-request-id": [ + "db54f1d8-d87b-4fdb-9d50-76ca61c78b61" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "9ce4352f-54dc-4ca1-a3f0-7529d4f355b9" + ], + "x-ms-correlation-request-id": [ + "7d9fb6d5-462b-4510-8160-b26dda12cae7" + ], + "x-ms-arm-service-request-id": [ + "53e8183e-5d5c-41d6-ab4a-c06e09455127" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T151328Z:7d9fb6d5-462b-4510-8160-b26dda12cae7" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: A18D2C793D694E78A499D0CCD808D828 Ref B: SJC211051205023 Ref C: 2024-03-21T15:13:27Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:13:27 GMT" + ], + "Content-Length": [ + "22" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"status\": \"Succeeded\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/virtualHubs/ps780?api-version=2023-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYWViNWIwMmEtMGYxOC00NWE0LTg2ZDYtODE4MDgxMTVjYWNmL3Jlc291cmNlR3JvdXBzL3BzNjA3OS9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvdmlydHVhbEh1YnMvcHM3ODA/YXBpLXZlcnNpb249MjAyMy0wOS0wMQ==", + "RequestMethod": "GET", + "RequestHeaders": { + "x-ms-client-request-id": [ + "33c01bb1-0034-4bb4-bb7b-ce79171b16bd" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-failure-cause": [ + "gateway" + ], + "x-ms-request-id": [ + "76472b62-e9ad-4efb-a8d7-abbc731e514b" + ], + "x-ms-correlation-request-id": [ + "76472b62-e9ad-4efb-a8d7-abbc731e514b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T151330Z:76472b62-e9ad-4efb-a8d7-abbc731e514b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 2CBF74F0752F4B798CDA207F81C1D82F Ref B: SJC211051205009 Ref C: 2024-03-21T15:13:29Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:13:29 GMT" + ], + "Content-Length": [ + "213" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"The Resource 'Microsoft.Network/virtualHubs/ps780' under resource group 'ps6079' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix\"\r\n }\r\n}", + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/virtualHubs/ps780?api-version=2023-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYWViNWIwMmEtMGYxOC00NWE0LTg2ZDYtODE4MDgxMTVjYWNmL3Jlc291cmNlR3JvdXBzL3BzNjA3OS9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvdmlydHVhbEh1YnMvcHM3ODA/YXBpLXZlcnNpb249MjAyMy0wOS0wMQ==", + "RequestMethod": "GET", + "RequestHeaders": { + "x-ms-client-request-id": [ + "33c01bb1-0034-4bb4-bb7b-ce79171b16bd" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "7a665402-d252-46d6-bc40-d5e3d9d2d3b7" + ], + "x-ms-correlation-request-id": [ + "9294fa14-1cfc-403b-a93a-8ec869e7cc25" + ], + "x-ms-arm-service-request-id": [ + "7808c008-6a6b-467d-9818-12478abf5e52" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T152140Z:9294fa14-1cfc-403b-a93a-8ec869e7cc25" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 6E923A0FA447464DBECA3BDAEEB8B9E5 Ref B: SJC211051205033 Ref C: 2024-03-21T15:21:39Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:21:39 GMT" + ], + "Content-Length": [ + "774" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"name\": \"ps780\",\r\n \"id\": \"/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/virtualHubs/ps780\",\r\n \"etag\": \"W/\\\"b5c604d5-ff47-418e-8c82-93bf48624583\\\"\",\r\n \"type\": \"Microsoft.Network/virtualHubs\",\r\n \"location\": \"eastus2euap\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"virtualHubRouteTableV2s\": [],\r\n \"addressPrefix\": \"192.168.1.0/24\",\r\n \"virtualRouterAsn\": 65515,\r\n \"virtualRouterIps\": [],\r\n \"routeTable\": {\r\n \"routes\": []\r\n },\r\n \"virtualRouterAutoScaleConfiguration\": {\r\n \"minCapacity\": 2\r\n },\r\n \"virtualWan\": {\r\n \"id\": \"/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/virtualWans/ps2646\"\r\n },\r\n \"networkVirtualAppliances\": [],\r\n \"routingState\": \"Provisioning\",\r\n \"allowBranchToBranchTraffic\": false,\r\n \"hubRoutingPreference\": \"ExpressRoute\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/virtualHubs/ps780?api-version=2023-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYWViNWIwMmEtMGYxOC00NWE0LTg2ZDYtODE4MDgxMTVjYWNmL3Jlc291cmNlR3JvdXBzL3BzNjA3OS9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvdmlydHVhbEh1YnMvcHM3ODA/YXBpLXZlcnNpb249MjAyMy0wOS0wMQ==", + "RequestMethod": "GET", + "RequestHeaders": { + "x-ms-client-request-id": [ + "99cd5834-a629-43dd-a598-a7af565f2bdd" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "1502f49e-10a3-4cb7-82a8-1336f30b00a2" + ], + "x-ms-correlation-request-id": [ + "7dd921c2-7b01-4a86-85d1-b425612a5b59" + ], + "x-ms-arm-service-request-id": [ + "e258afb3-5cba-498e-8cbf-bcdc367918b0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T152141Z:7dd921c2-7b01-4a86-85d1-b425612a5b59" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: E94295E9778E41E092ADEC0BEF14E897 Ref B: SJC211051205011 Ref C: 2024-03-21T15:21:40Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:21:40 GMT" + ], + "Content-Length": [ + "774" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"name\": \"ps780\",\r\n \"id\": \"/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/virtualHubs/ps780\",\r\n \"etag\": \"W/\\\"b5c604d5-ff47-418e-8c82-93bf48624583\\\"\",\r\n \"type\": \"Microsoft.Network/virtualHubs\",\r\n \"location\": \"eastus2euap\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"virtualHubRouteTableV2s\": [],\r\n \"addressPrefix\": \"192.168.1.0/24\",\r\n \"virtualRouterAsn\": 65515,\r\n \"virtualRouterIps\": [],\r\n \"routeTable\": {\r\n \"routes\": []\r\n },\r\n \"virtualRouterAutoScaleConfiguration\": {\r\n \"minCapacity\": 2\r\n },\r\n \"virtualWan\": {\r\n \"id\": \"/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/virtualWans/ps2646\"\r\n },\r\n \"networkVirtualAppliances\": [],\r\n \"routingState\": \"Provisioning\",\r\n \"allowBranchToBranchTraffic\": false,\r\n \"hubRoutingPreference\": \"ExpressRoute\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/virtualHubs/ps780?api-version=2023-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYWViNWIwMmEtMGYxOC00NWE0LTg2ZDYtODE4MDgxMTVjYWNmL3Jlc291cmNlR3JvdXBzL3BzNjA3OS9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvdmlydHVhbEh1YnMvcHM3ODA/YXBpLXZlcnNpb249MjAyMy0wOS0wMQ==", + "RequestMethod": "PUT", + "RequestHeaders": { + "x-ms-client-request-id": [ + "33c01bb1-0034-4bb4-bb7b-ce79171b16bd" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "490" + ] + }, + "RequestBody": "{\r\n \"properties\": {\r\n \"virtualWan\": {\r\n \"id\": \"/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/virtualWans/ps2646\"\r\n },\r\n \"addressPrefix\": \"192.168.1.0/24\",\r\n \"virtualHubRouteTableV2s\": [],\r\n \"virtualRouterAsn\": 0,\r\n \"virtualRouterIps\": [],\r\n \"allowBranchToBranchTraffic\": false,\r\n \"preferredRoutingGateway\": \"ExpressRoute\",\r\n \"hubRoutingPreference\": \"ExpressRoute\"\r\n },\r\n \"location\": \"eastus2euap\"\r\n}", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "10" + ], + "x-ms-request-id": [ + "f43b7b74-14ff-4bc9-b7eb-5d6faff53ff3" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/providers/Microsoft.Network/locations/eastus2euap/operations/f43b7b74-14ff-4bc9-b7eb-5d6faff53ff3?api-version=2023-09-01&t=638466308139629530&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88c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KiDRp6lWjpI8ytaYBmBCe8XWMJQvA-CGZWyyxFmXdP7zcFAH4hX4K19avQpOo1YlLCzxG--tjvebIi10rgRqk6trA8JPipTeSovW04n8duTpQ-3eseSP5pMnYuFkw&h=7orT8_7ArbtuL9Mnoddmc4n9a0OhFUJ4CEPbT9l_uYQ" + ], + "x-ms-correlation-request-id": [ + "34cc2b6a-f299-4ced-9361-c6d094886ee8" + ], + "azure-asyncnotification": [ + "Enabled" + ], + "x-ms-arm-service-request-id": [ + "af00560d-43bc-4277-9929-3f79527dc82d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T151333Z:34cc2b6a-f299-4ced-9361-c6d094886ee8" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: C6D17DEC04B547A8B7286EB62E7A60AD Ref B: SJC211051205009 Ref C: 2024-03-21T15:13:31Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:13:33 GMT" + ], + "Content-Length": [ + "765" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"name\": \"ps780\",\r\n \"id\": \"/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/virtualHubs/ps780\",\r\n \"etag\": \"W/\\\"773473dc-3f25-4ba9-8163-7a7980d18b96\\\"\",\r\n \"type\": \"Microsoft.Network/virtualHubs\",\r\n \"location\": \"eastus2euap\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"virtualHubRouteTableV2s\": [],\r\n \"addressPrefix\": \"192.168.1.0/24\",\r\n \"virtualRouterAsn\": 65515,\r\n \"virtualRouterIps\": [],\r\n \"routeTable\": {\r\n \"routes\": []\r\n },\r\n \"virtualRouterAutoScaleConfiguration\": {\r\n \"minCapacity\": 2\r\n },\r\n \"virtualWan\": {\r\n \"id\": \"/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/virtualWans/ps2646\"\r\n },\r\n \"networkVirtualAppliances\": [],\r\n \"routingState\": \"None\",\r\n \"allowBranchToBranchTraffic\": false,\r\n \"hubRoutingPreference\": \"ExpressRoute\"\r\n }\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/providers/Microsoft.Network/locations/eastus2euap/operations/f43b7b74-14ff-4bc9-b7eb-5d6faff53ff3?api-version=2023-09-01&t=638466308139629530&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1fEojEYKGj84-8gHXFveahRVa6ZPij7XMWfXQZWdo2aj6sMRX8UCAwEAAaOCA-0wggPp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SWUwekpDS0NFdnY3TlVUek5vNk12cEQzS1V4QUFiS2Y3WERPbDhoSFZEaHBKeHI2NGNEb2hxR2lMank3YUk2QV96WTVaV3pRTE1DZF9XeHVYdTZlRWNfZmFvT01MOWx1Z2gxTmtBUjJ0dktldmxmLVMyeEFFTHdGeUUzRGJyZl9KRk91dkE4Tnk3SjVZNDdBNUdvcGJ0WmxqZG5NWGtHZnBVRUNLaWFZX3EyaUxybFN5aEswOTI1Ylg0enozTExEOTAzSFplY3RFeG9DWFNZYjAmcz1ibDZManByUFZ6SV96b0Z0VWVCMUpBQVBWQmZXa3k3YW50QnRFUWNJLXZGNF9JSWZEOUNpYzRlc0dYUG1McmllUU5QakZ5cW42aVNvLUtwU2oxMFZOc2RySWxYMmhYakJVdXM1TnlOQm0tVDY1VUdqSjU2dUdDMGhZZ0VlV1BHZ1RQLVVqYkRXVWgzaWRGYVVrTjlVejlIa1dTMmlQaEdKZVZPTkhnbGJDUW52Z0FfaUo2N1ZYekYyLWpOZ0VHdE5vaGs3aE0tZG94bnd5dlRPU1RsZWRBcWZNS2lEUnA2bFdqcEk4eXRhWUJtQkNlOFhXTUpRdkEtQ0daV3l5eEZtWGRQN3pjRkFINGhYNEsxOWF2UXBPbzFZbExDenhHLS10anZlYklpMTByZ1JxazZ0ckE4SlBpcFRlU292VzA0bjhkdVRwUS0zZXNlU1A1cE1uWXVGa3cmaD03b3JUOF83QXJidHVMOU1ub2RkbWM0bjlhME9oRlVKNENFUGJUOWxfdVlR", + "RequestMethod": "GET", + "RequestHeaders": { + "x-ms-client-request-id": [ + "33c01bb1-0034-4bb4-bb7b-ce79171b16bd" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "10" + ], + "x-ms-request-id": [ + "c72d85d6-2c54-4c28-97bb-6fc9a522cea6" + ], + "x-ms-correlation-request-id": [ + "78bf88fc-7862-428e-a724-0176f576ff91" + ], + "x-ms-arm-service-request-id": [ + "22e40642-bc5b-4df5-919e-cf5b09d06345" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T151344Z:78bf88fc-7862-428e-a724-0176f576ff91" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: AE0D33B59FBB4834AA857B775F674BFB Ref B: SJC211051205009 Ref C: 2024-03-21T15:13:44Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:13:44 GMT" + ], + "Content-Length": [ + "23" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"status\": \"InProgress\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/providers/Microsoft.Network/locations/eastus2euap/operations/f43b7b74-14ff-4bc9-b7eb-5d6faff53ff3?api-version=2023-09-01&t=638466308139629530&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_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Ga3cmaD03b3JUOF83QXJidHVMOU1ub2RkbWM0bjlhME9oRlVKNENFUGJUOWxfdVlR", + "RequestMethod": "GET", + "RequestHeaders": { + "x-ms-client-request-id": [ + "33c01bb1-0034-4bb4-bb7b-ce79171b16bd" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "20" + ], + "x-ms-request-id": [ + "87f16cc5-c726-4554-a085-3f80a939a894" + ], + "x-ms-correlation-request-id": [ + "22c532de-b2ff-432f-96aa-40f6a4c229c2" + ], + "x-ms-arm-service-request-id": [ + "83815b2d-c63b-461d-9b6b-6ce625a0f853" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T151354Z:22c532de-b2ff-432f-96aa-40f6a4c229c2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 234AA597989145FD9284EDC95720542A Ref B: SJC211051205009 Ref C: 2024-03-21T15:13:54Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:13:54 GMT" + ], + "Content-Length": [ + "23" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"status\": \"InProgress\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/providers/Microsoft.Network/locations/eastus2euap/operations/f43b7b74-14ff-4bc9-b7eb-5d6faff53ff3?api-version=2023-09-01&t=638466308139629530&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeG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1TnlOQm0tVDY1VUdqSjU2dUdDMGhZZ0VlV1BHZ1RQLVVqYkRXVWgzaWRGYVVrTjlVejlIa1dTMmlQaEdKZVZPTkhnbGJDUW52Z0FfaUo2N1ZYekYyLWpOZ0VHdE5vaGs3aE0tZG94bnd5dlRPU1RsZWRBcWZNS2lEUnA2bFdqcEk4eXRhWUJtQkNlOFhXTUpRdkEtQ0daV3l5eEZtWGRQN3pjRkFINGhYNEsxOWF2UXBPbzFZbExDenhHLS10anZlYklpMTByZ1JxazZ0ckE4SlBpcFRlU292VzA0bjhkdVRwUS0zZXNlU1A1cE1uWXVGa3cmaD03b3JUOF83QXJidHVMOU1ub2RkbWM0bjlhME9oRlVKNENFUGJUOWxfdVlR", + "RequestMethod": "GET", + "RequestHeaders": { + "x-ms-client-request-id": [ + "33c01bb1-0034-4bb4-bb7b-ce79171b16bd" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "20" + ], + "x-ms-request-id": [ + "a79ee2e5-9196-46bc-8992-88fb3a5a71ef" + ], + "x-ms-correlation-request-id": [ + "cd55c597-03c1-4a05-a590-9b2298826732" + ], + "x-ms-arm-service-request-id": [ + "a4be4099-9952-460f-b23b-61c27db69e69" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T151415Z:cd55c597-03c1-4a05-a590-9b2298826732" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: B127FB9BE77A43B8A482D6D3A0F251FE Ref B: SJC211051205009 Ref C: 2024-03-21T15:14:14Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:14:15 GMT" + ], + "Content-Length": [ + "23" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"status\": \"InProgress\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/providers/Microsoft.Network/locations/eastus2euap/operations/f43b7b74-14ff-4bc9-b7eb-5d6faff53ff3?api-version=2023-09-01&t=638466308139629530&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1fEojEYKGj84-8gHXFveahRVa6ZPij7XMWfXQZWdo2aj6sMRX8UCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmK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96WTVaV3pRTE1DZF9XeHVYdTZlRWNfZmFvT01MOWx1Z2gxTmtBUjJ0dktldmxmLVMyeEFFTHdGeUUzRGJyZl9KRk91dkE4Tnk3SjVZNDdBNUdvcGJ0WmxqZG5NWGtHZnBVRUNLaWFZX3EyaUxybFN5aEswOTI1Ylg0enozTExEOTAzSFplY3RFeG9DWFNZYjAmcz1ibDZManByUFZ6SV96b0Z0VWVCMUpBQVBWQmZXa3k3YW50QnRFUWNJLXZGNF9JSWZEOUNpYzRlc0dYUG1McmllUU5QakZ5cW42aVNvLUtwU2oxMFZOc2RySWxYMmhYakJVdXM1TnlOQm0tVDY1VUdqSjU2dUdDMGhZZ0VlV1BHZ1RQLVVqYkRXVWgzaWRGYVVrTjlVejlIa1dTMmlQaEdKZVZPTkhnbGJDUW52Z0FfaUo2N1ZYekYyLWpOZ0VHdE5vaGs3aE0tZG94bnd5dlRPU1RsZWRBcWZNS2lEUnA2bFdqcEk4eXRhWUJtQkNlOFhXTUpRdkEtQ0daV3l5eEZtWGRQN3pjRkFINGhYNEsxOWF2UXBPbzFZbExDenhHLS10anZlYklpMTByZ1JxazZ0ckE4SlBpcFRlU292VzA0bjhkdVRwUS0zZXNlU1A1cE1uWXVGa3cmaD03b3JUOF83QXJidHVMOU1ub2RkbWM0bjlhME9oRlVKNENFUGJUOWxfdVlR", + "RequestMethod": "GET", + "RequestHeaders": { + "x-ms-client-request-id": [ + "33c01bb1-0034-4bb4-bb7b-ce79171b16bd" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "40" + ], + "x-ms-request-id": [ + "2baa414c-018d-43d5-9651-95a90f6985ed" + ], + "x-ms-correlation-request-id": [ + "9ad4e7bd-f469-4e51-9feb-cdf5f049c4ba" + ], + "x-ms-arm-service-request-id": [ + "b598b1c5-b350-4116-a245-6906351648cf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T151436Z:9ad4e7bd-f469-4e51-9feb-cdf5f049c4ba" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 29A71F80DB6F425C9A76DAD81FFC1624 Ref B: SJC211051205009 Ref C: 2024-03-21T15:14:35Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:14:35 GMT" + ], + "Content-Length": [ + "23" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"status\": \"InProgress\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/providers/Microsoft.Network/locations/eastus2euap/operations/f43b7b74-14ff-4bc9-b7eb-5d6faff53ff3?api-version=2023-09-01&t=638466308139629530&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVy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GET", + "RequestHeaders": { + "x-ms-client-request-id": [ + "33c01bb1-0034-4bb4-bb7b-ce79171b16bd" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "40" + ], + "x-ms-request-id": [ + "75fffae9-6d75-43d3-a0fe-f3718d379f7f" + ], + "x-ms-correlation-request-id": [ + "b47e4205-bed6-45c3-916b-66d1c3616fc4" + ], + "x-ms-arm-service-request-id": [ + "c535c3f9-6055-4e05-a1ed-4aea91430586" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T151517Z:b47e4205-bed6-45c3-916b-66d1c3616fc4" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: E68A85B4E8D0428585866A26268898B5 Ref B: SJC211051205009 Ref C: 2024-03-21T15:15:16Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:15:16 GMT" + ], + "Content-Length": [ + "23" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"status\": \"InProgress\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/providers/Microsoft.Network/locations/eastus2euap/operations/f43b7b74-14ff-4bc9-b7eb-5d6faff53ff3?api-version=2023-09-01&t=638466308139629530&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImi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VejlIa1dTMmlQaEdKZVZPTkhnbGJDUW52Z0FfaUo2N1ZYekYyLWpOZ0VHdE5vaGs3aE0tZG94bnd5dlRPU1RsZWRBcWZNS2lEUnA2bFdqcEk4eXRhWUJtQkNlOFhXTUpRdkEtQ0daV3l5eEZtWGRQN3pjRkFINGhYNEsxOWF2UXBPbzFZbExDenhHLS10anZlYklpMTByZ1JxazZ0ckE4SlBpcFRlU292VzA0bjhkdVRwUS0zZXNlU1A1cE1uWXVGa3cmaD03b3JUOF83QXJidHVMOU1ub2RkbWM0bjlhME9oRlVKNENFUGJUOWxfdVlR", + "RequestMethod": "GET", + "RequestHeaders": { + "x-ms-client-request-id": [ + "33c01bb1-0034-4bb4-bb7b-ce79171b16bd" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "80" + ], + "x-ms-request-id": [ + "d6bababc-8921-4044-aae9-4e565839421f" + ], + "x-ms-correlation-request-id": [ + "d95cad09-ac31-44bd-ad1e-e185898a755c" + ], + "x-ms-arm-service-request-id": [ + "f931dcf0-806d-4ca4-8299-3a8045fd7d6d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T151557Z:d95cad09-ac31-44bd-ad1e-e185898a755c" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 9041EF41287944528E62EC159741D63F Ref B: SJC211051205009 Ref C: 2024-03-21T15:15:57Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:15:57 GMT" + ], + "Content-Length": [ + "23" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"status\": \"InProgress\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/providers/Microsoft.Network/locations/eastus2euap/operations/f43b7b74-14ff-4bc9-b7eb-5d6faff53ff3?api-version=2023-09-01&t=638466308139629530&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1fEojEYKGj84-8gHXFveahRVa6ZPij7XMWfXQZWdo2aj6sMRX8UCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQ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HdGeUUzRGJyZl9KRk91dkE4Tnk3SjVZNDdBNUdvcGJ0WmxqZG5NWGtHZnBVRUNLaWFZX3EyaUxybFN5aEswOTI1Ylg0enozTExEOTAzSFplY3RFeG9DWFNZYjAmcz1ibDZManByUFZ6SV96b0Z0VWVCMUpBQVBWQmZXa3k3YW50QnRFUWNJLXZGNF9JSWZEOUNpYzRlc0dYUG1McmllUU5QakZ5cW42aVNvLUtwU2oxMFZOc2RySWxYMmhYakJVdXM1TnlOQm0tVDY1VUdqSjU2dUdDMGhZZ0VlV1BHZ1RQLVVqYkRXVWgzaWRGYVVrTjlVejlIa1dTMmlQaEdKZVZPTkhnbGJDUW52Z0FfaUo2N1ZYekYyLWpOZ0VHdE5vaGs3aE0tZG94bnd5dlRPU1RsZWRBcWZNS2lEUnA2bFdqcEk4eXRhWUJtQkNlOFhXTUpRdkEtQ0daV3l5eEZtWGRQN3pjRkFINGhYNEsxOWF2UXBPbzFZbExDenhHLS10anZlYklpMTByZ1JxazZ0ckE4SlBpcFRlU292VzA0bjhkdVRwUS0zZXNlU1A1cE1uWXVGa3cmaD03b3JUOF83QXJidHVMOU1ub2RkbWM0bjlhME9oRlVKNENFUGJUOWxfdVlR", + "RequestMethod": "GET", + "RequestHeaders": { + "x-ms-client-request-id": [ + "33c01bb1-0034-4bb4-bb7b-ce79171b16bd" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "160" + ], + "x-ms-request-id": [ + "d3283603-f06a-4b65-9d34-afc25938b907" + ], + "x-ms-correlation-request-id": [ + "8824855e-b400-4222-9ab1-84ec7792199c" + ], + "x-ms-arm-service-request-id": [ + "2e3d5228-3c66-4319-9b3f-aa452693fbc9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T151718Z:8824855e-b400-4222-9ab1-84ec7792199c" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: CA0D3EE5533B498E857AF4B5A12B1FDF Ref B: SJC211051205011 Ref C: 2024-03-21T15:17:17Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:17:17 GMT" + ], + "Content-Length": [ + "23" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"status\": \"InProgress\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/providers/Microsoft.Network/locations/eastus2euap/operations/f43b7b74-14ff-4bc9-b7eb-5d6faff53ff3?api-version=2023-09-01&t=638466308139629530&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z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ion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "100" + ], + "x-ms-request-id": [ + "9da16e2a-171c-4f84-a32e-4bbd794a0c92" + ], + "x-ms-correlation-request-id": [ + "b029fb08-9864-48cc-97d2-7c3107d8d35d" + ], + "x-ms-arm-service-request-id": [ + "8c3e2a23-412e-42ab-96a2-3cd39c85c3e4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T151958Z:b029fb08-9864-48cc-97d2-7c3107d8d35d" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 778E310447F14E98B52092A721F24FF8 Ref B: SJC211051204051 Ref C: 2024-03-21T15:19:58Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:19:58 GMT" + ], + "Content-Length": [ + "23" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"status\": \"InProgress\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/providers/Microsoft.Network/locations/eastus2euap/operations/f43b7b74-14ff-4bc9-b7eb-5d6faff53ff3?api-version=2023-09-01&t=638466308139629530&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1Whc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5dlRPU1RsZWRBcWZNS2lEUnA2bFdqcEk4eXRhWUJtQkNlOFhXTUpRdkEtQ0daV3l5eEZtWGRQN3pjRkFINGhYNEsxOWF2UXBPbzFZbExDenhHLS10anZlYklpMTByZ1JxazZ0ckE4SlBpcFRlU292VzA0bjhkdVRwUS0zZXNlU1A1cE1uWXVGa3cmaD03b3JUOF83QXJidHVMOU1ub2RkbWM0bjlhME9oRlVKNENFUGJUOWxfdVlR", + "RequestMethod": "GET", + "RequestHeaders": { + "x-ms-client-request-id": [ + "33c01bb1-0034-4bb4-bb7b-ce79171b16bd" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "c2364516-8672-4dd7-8569-02cef046a30f" + ], + "x-ms-correlation-request-id": [ + "bbcb313d-7d28-4347-b709-9383fd1cd60a" + ], + "x-ms-arm-service-request-id": [ + "15fa9519-729f-4005-a480-a3264a0adad2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T152139Z:bbcb313d-7d28-4347-b709-9383fd1cd60a" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 9B44F0D2BDF1483DAA3481834E6C06E7 Ref B: SJC211051205033 Ref C: 2024-03-21T15:21:38Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:21:38 GMT" + ], + "Content-Length": [ + "22" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"status\": \"Succeeded\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/azureFirewalls/ps2276?api-version=2023-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYWViNWIwMmEtMGYxOC00NWE0LTg2ZDYtODE4MDgxMTVjYWNmL3Jlc291cmNlR3JvdXBzL3BzNjA3OS9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvYXp1cmVGaXJld2FsbHMvcHMyMjc2P2FwaS12ZXJzaW9uPTIwMjMtMDktMDE=", + "RequestMethod": "GET", + "RequestHeaders": { + "x-ms-client-request-id": [ + "99cd5834-a629-43dd-a598-a7af565f2bdd" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-failure-cause": [ + "gateway" + ], + "x-ms-request-id": [ + "84a057c8-a9b2-43d6-9fc1-9bcfa5ba9725" + ], + "x-ms-correlation-request-id": [ + "84a057c8-a9b2-43d6-9fc1-9bcfa5ba9725" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T152140Z:84a057c8-a9b2-43d6-9fc1-9bcfa5ba9725" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 772F7468ADB4429094D0CF3925399D4F Ref B: SJC211051205011 Ref C: 2024-03-21T15:21:40Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:21:39 GMT" + ], + "Content-Length": [ + "217" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"The Resource 'Microsoft.Network/azureFirewalls/ps2276' under resource group 'ps6079' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix\"\r\n }\r\n}", + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/azureFirewalls/ps2276?api-version=2023-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYWViNWIwMmEtMGYxOC00NWE0LTg2ZDYtODE4MDgxMTVjYWNmL3Jlc291cmNlR3JvdXBzL3BzNjA3OS9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvYXp1cmVGaXJld2FsbHMvcHMyMjc2P2FwaS12ZXJzaW9uPTIwMjMtMDktMDE=", + "RequestMethod": "GET", + "RequestHeaders": { + "x-ms-client-request-id": [ + "99cd5834-a629-43dd-a598-a7af565f2bdd" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "W/\"ebed4126-a7fd-4138-b997-1b8115621d7f\"" + ], + "x-ms-request-id": [ + "4d039e99-1f12-45b3-8479-e9642439741a" + ], + "x-ms-correlation-request-id": [ + "99bd6be9-0fc6-4cf3-b72f-98a870e01dc1" + ], + "x-ms-arm-service-request-id": [ + "9208f5a7-0632-4357-ac7d-73357830ea83" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T153632Z:99bd6be9-0fc6-4cf3-b72f-98a870e01dc1" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: FEB63D342E46433381CBC3A161E12A60 Ref B: SJC211051204019 Ref C: 2024-03-21T15:36:31Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:36:31 GMT" + ], + "Content-Length": [ + "1177" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"name\": \"ps2276\",\r\n \"id\": \"/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/azureFirewalls/ps2276\",\r\n \"etag\": \"W/\\\"ebed4126-a7fd-4138-b997-1b8115621d7f\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"eastus2euap\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_Hub\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"additionalProperties\": {},\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"AzureFirewallIpConfiguration0\",\r\n \"id\": \"/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/azureFirewalls/ps2276/azureFirewallIpConfigurations/AzureFirewallIpConfiguration0\",\r\n \"etag\": \"W/\\\"ebed4126-a7fd-4138-b997-1b8115621d7f\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls/azureFirewallIpConfigurations\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"privateIPAddress\": \"192.168.1.132\",\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\": \"/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/publicIPAddresses/ps4026\"\r\n }\r\n }\r\n }\r\n ],\r\n \"virtualHub\": {\r\n \"id\": \"/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/virtualHubs/ps780\"\r\n }\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/azureFirewalls/ps2276?api-version=2023-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYWViNWIwMmEtMGYxOC00NWE0LTg2ZDYtODE4MDgxMTVjYWNmL3Jlc291cmNlR3JvdXBzL3BzNjA3OS9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvYXp1cmVGaXJld2FsbHMvcHMyMjc2P2FwaS12ZXJzaW9uPTIwMjMtMDktMDE=", + "RequestMethod": "GET", + "RequestHeaders": { + "x-ms-client-request-id": [ + "99cd5834-a629-43dd-a598-a7af565f2bdd" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "W/\"ebed4126-a7fd-4138-b997-1b8115621d7f\"" + ], + "x-ms-request-id": [ + "b647c233-830b-43d5-ad11-74a93eb3bada" + ], + "x-ms-correlation-request-id": [ + "90f08957-be0f-4e6f-a3a0-f4844627dbf7" + ], + "x-ms-arm-service-request-id": [ + "c9dbb00b-0fb6-4e92-920b-587dd28c7a2e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T153633Z:90f08957-be0f-4e6f-a3a0-f4844627dbf7" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 5209B8B4DD1744E7B4ED2AE5B25708E2 Ref B: SJC211051204019 Ref C: 2024-03-21T15:36:32Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:36:32 GMT" + ], + "Content-Length": [ + "1177" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"name\": \"ps2276\",\r\n \"id\": \"/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/azureFirewalls/ps2276\",\r\n \"etag\": \"W/\\\"ebed4126-a7fd-4138-b997-1b8115621d7f\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"eastus2euap\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_Hub\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"additionalProperties\": {},\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"AzureFirewallIpConfiguration0\",\r\n \"id\": \"/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/azureFirewalls/ps2276/azureFirewallIpConfigurations/AzureFirewallIpConfiguration0\",\r\n \"etag\": \"W/\\\"ebed4126-a7fd-4138-b997-1b8115621d7f\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls/azureFirewallIpConfigurations\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"privateIPAddress\": \"192.168.1.132\",\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\": \"/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/publicIPAddresses/ps4026\"\r\n }\r\n }\r\n }\r\n ],\r\n \"virtualHub\": {\r\n \"id\": \"/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/virtualHubs/ps780\"\r\n }\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/azureFirewalls/ps2276?api-version=2023-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYWViNWIwMmEtMGYxOC00NWE0LTg2ZDYtODE4MDgxMTVjYWNmL3Jlc291cmNlR3JvdXBzL3BzNjA3OS9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvYXp1cmVGaXJld2FsbHMvcHMyMjc2P2FwaS12ZXJzaW9uPTIwMjMtMDktMDE=", + "RequestMethod": "GET", + "RequestHeaders": { + "x-ms-client-request-id": [ + "40f2f14a-d33b-4eee-850f-0377459ac120" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "W/\"ebed4126-a7fd-4138-b997-1b8115621d7f\"" + ], + "x-ms-request-id": [ + "bbf6fa51-7c11-4633-bc6f-1e910770e09a" + ], + "x-ms-correlation-request-id": [ + "29d80a57-eb59-44e4-b654-4139c845a256" + ], + "x-ms-arm-service-request-id": [ + "94341913-b296-49e6-8a19-419f7e76a4eb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T153633Z:29d80a57-eb59-44e4-b654-4139c845a256" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 409A9E879A954AA7A58EF5FE49BC8903 Ref B: SJC211051204031 Ref C: 2024-03-21T15:36:33Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:36:33 GMT" + ], + "Content-Length": [ + "1177" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"name\": \"ps2276\",\r\n \"id\": \"/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/azureFirewalls/ps2276\",\r\n \"etag\": \"W/\\\"ebed4126-a7fd-4138-b997-1b8115621d7f\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"eastus2euap\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_Hub\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"additionalProperties\": {},\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"AzureFirewallIpConfiguration0\",\r\n \"id\": \"/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/azureFirewalls/ps2276/azureFirewallIpConfigurations/AzureFirewallIpConfiguration0\",\r\n \"etag\": \"W/\\\"ebed4126-a7fd-4138-b997-1b8115621d7f\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls/azureFirewallIpConfigurations\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"privateIPAddress\": \"192.168.1.132\",\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\": \"/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/publicIPAddresses/ps4026\"\r\n }\r\n }\r\n }\r\n ],\r\n \"virtualHub\": {\r\n \"id\": \"/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/virtualHubs/ps780\"\r\n }\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/azureFirewalls/ps2276?api-version=2023-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYWViNWIwMmEtMGYxOC00NWE0LTg2ZDYtODE4MDgxMTVjYWNmL3Jlc291cmNlR3JvdXBzL3BzNjA3OS9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvYXp1cmVGaXJld2FsbHMvcHMyMjc2P2FwaS12ZXJzaW9uPTIwMjMtMDktMDE=", + "RequestMethod": "PUT", + "RequestHeaders": { + "x-ms-client-request-id": [ + "99cd5834-a629-43dd-a598-a7af565f2bdd" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "782" + ] + }, + "RequestBody": "{\r\n \"zones\": [],\r\n \"properties\": {\r\n \"applicationRuleCollections\": [],\r\n \"natRuleCollections\": [],\r\n \"networkRuleCollections\": [],\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"AzureFirewallIpConfiguration0\",\r\n \"properties\": {\r\n \"publicIPAddress\": {\r\n \"id\": \"/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/publicIPAddresses/ps4026\"\r\n }\r\n }\r\n }\r\n ],\r\n \"virtualHub\": {\r\n \"id\": \"/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/virtualHubs/ps780\"\r\n },\r\n \"sku\": {\r\n \"name\": \"AZFW_Hub\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"additionalProperties\": {}\r\n },\r\n \"location\": \"eastus2euap\"\r\n}", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "10" + ], + "x-ms-request-id": [ + "aecd8503-c178-494c-aac5-a42e994af54e" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/providers/Microsoft.Network/locations/eastus2euap/operations/aecd8503-c178-494c-aac5-a42e994af54e?api-version=2023-09-01&t=638466313028173473&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1fEojEYKGj84-8gHXFveahRVa6ZPij7XMWfXQZWdo2aj6sMRX8UCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX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MjBJbmZyYSUyMENBJTIwMDUuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAF9wsVY5GPv3eQNDdOO3pX2IJsz5n5bMuVN0DqeMoBkFFfk4UWmFDChWzbFNYlcFaVFC2RHGlRYoa4Shec_5_9qIkBA7MbjW1rd15-n3LCXGb_SUGAoJ2QjX_OAXbzgS4slLZCIe0zJCKCEvv7NUTzNo6MvpD3KUxAAbKf7XDOl8hHVDhpJxr64cDohqGiLjy7aI6A_zY5ZWzQLMCd_WxuXu6eEc_faoOML9lugh1NkAR2tvKevlf-S2xAELwFyE3Dbrf_JFOuvA8Ny7J5Y47A5GopbtZljdnMXkGfpUECKiaY_q2iLrlSyhK0925bX4zz3LLD903HZectExoCXSYb0&s=Cz7o_LOxS3LbgzAeoDZooT3EYHOwAICobeY6kynYjIpqqUk4sghhGn4UTrYSpQQtQqkT0K8efuRy1Yfan8OlAPbt9XjZYNnBzYGH626nxr5zR92oEfhVIdbJ9qHyAH2U0mnunpbOLS4uhD5KXr-sgrfcEYu64AWXUzCDiQVKnlJSNyfO8mHykFRaqjGIWQxW2dK0CGUL2vi7MKttnH84OQ6eXYg-eSIqYn6VPObTvyBNuOic5pvlTVOZGjUKNMDbnH4kld0uv_Cz06bI-Y1_fQwwOk7f5zMZLEEECn7S0f-37BDj330gp0XymTkDZ2m7JkFMXsgDF6VbO1pr-NiH2w&h=en7vfX7wcN-O2aLNPBgW53jYr_eKvs3UGZq2VndVbfo" + ], + "x-ms-correlation-request-id": [ + "ee18d42c-c0b5-432d-8011-46b0fad5672a" + ], + "azure-asyncnotification": [ + "Enabled" + ], + "x-ms-arm-service-request-id": [ + "cdcf0fe8-a330-4623-b6fb-b1c45c84609c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T152142Z:ee18d42c-c0b5-432d-8011-46b0fad5672a" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: AEF0BB3368C142388A8C816F8AB0A33A Ref B: SJC211051205011 Ref C: 2024-03-21T15:21:41Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:21:41 GMT" + ], + "Content-Length": [ + "1141" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"name\": \"ps2276\",\r\n \"id\": \"/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/azureFirewalls/ps2276\",\r\n \"etag\": \"W/\\\"1ba46b46-d0d8-482e-a5c0-6df38b644167\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"eastus2euap\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"sku\": {\r\n \"name\": \"AZFW_Hub\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"additionalProperties\": {},\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"AzureFirewallIpConfiguration0\",\r\n \"id\": \"/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/azureFirewalls/ps2276/azureFirewallIpConfigurations/AzureFirewallIpConfiguration0\",\r\n \"etag\": \"W/\\\"1ba46b46-d0d8-482e-a5c0-6df38b644167\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls/azureFirewallIpConfigurations\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\": \"/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/publicIPAddresses/ps4026\"\r\n }\r\n }\r\n }\r\n ],\r\n \"virtualHub\": {\r\n \"id\": \"/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourceGroups/ps6079/providers/Microsoft.Network/virtualHubs/ps780\"\r\n }\r\n }\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/providers/Microsoft.Network/locations/eastus2euap/operations/aecd8503-c178-494c-aac5-a42e994af54e?api-version=2023-09-01&t=638466313028173473&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1fEojEYKGj84-8gHXFveahRVa6ZPij7XMWfXQZWdo2aj6sMRX8UCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAG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NGNEb2hxR2lMank3YUk2QV96WTVaV3pRTE1DZF9XeHVYdTZlRWNfZmFvT01MOWx1Z2gxTmtBUjJ0dktldmxmLVMyeEFFTHdGeUUzRGJyZl9KRk91dkE4Tnk3SjVZNDdBNUdvcGJ0WmxqZG5NWGtHZnBVRUNLaWFZX3EyaUxybFN5aEswOTI1Ylg0enozTExEOTAzSFplY3RFeG9DWFNZYjAmcz1DejdvX0xPeFMzTGJnekFlb0Rab29UM0VZSE93QUlDb2JlWTZreW5ZaklwcXFVazRzZ2hoR240VVRyWVNwUVF0UXFrVDBLOGVmdVJ5MVlmYW44T2xBUGJ0OVhqWllObkJ6WUdINjI2bnhyNXpSOTJvRWZoVklkYko5cUh5QUgyVTBtbnVucGJPTFM0dWhENUtYci1zZ3JmY0VZdTY0QVdYVXpDRGlRVktubEpTTnlmTzhtSHlrRlJhcWpHSVdReFcyZEswQ0dVTDJ2aTdNS3R0bkg4NE9RNmVYWWctZVNJcVluNlZQT2JUdnlCTnVPaWM1cHZsVFZPWkdqVUtOTURibkg0a2xkMHV2X0N6MDZiSS1ZMV9mUXd3T2s3ZjV6TVpMRUVFQ243UzBmLTM3QkRqMzMwZ3AwWHltVGtEWjJtN0prRk1Yc2dERjZWYk8xcHItTmlIMncmaD1lbjd2Zlg3d2NOLU8yYUxOUEJnVzUzallyX2VLdnMzVUdacTJWbmRWYmZv", + "RequestMethod": "GET", + "RequestHeaders": { + "x-ms-client-request-id": [ + "99cd5834-a629-43dd-a598-a7af565f2bdd" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "10" + ], + "x-ms-request-id": [ + "cad4bbec-9535-4b63-a3c4-842ae84f7704" + ], + "x-ms-correlation-request-id": [ + "c99510a9-0353-4fc0-91bd-357deca7992d" + ], + "x-ms-arm-service-request-id": [ + "e1b6a21c-1888-48cb-9842-fe56c4152e9b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T152153Z:c99510a9-0353-4fc0-91bd-357deca7992d" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 1D99F33CBE91443095AF02C672C34C1C Ref B: SJC211051205011 Ref C: 2024-03-21T15:21:52Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:21:52 GMT" + ], + "Content-Length": [ + "23" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"status\": \"InProgress\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/providers/Microsoft.Network/locations/eastus2euap/operations/aecd8503-c178-494c-aac5-a42e994af54e?api-version=2023-09-01&t=638466313028173473&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVy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ethod": "GET", + "RequestHeaders": { + "x-ms-client-request-id": [ + "99cd5834-a629-43dd-a598-a7af565f2bdd" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "20" + ], + "x-ms-request-id": [ + "b0c91044-ac55-4d2b-bd57-bb6afeb86e30" + ], + "x-ms-correlation-request-id": [ + "1353cb3e-78ad-4b38-af0d-a833f54f16aa" + ], + "x-ms-arm-service-request-id": [ + "e445b5ea-f4e1-4853-9872-25cbb4c770c1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T152204Z:1353cb3e-78ad-4b38-af0d-a833f54f16aa" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: E64C368C72674D73B3E98D21B372799B Ref B: SJC211051205011 Ref C: 2024-03-21T15:22:03Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:22:03 GMT" + ], + "Content-Length": [ + "23" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"status\": \"InProgress\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/providers/Microsoft.Network/locations/eastus2euap/operations/aecd8503-c178-494c-aac5-a42e994af54e?api-version=2023-09-01&t=638466313028173473&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZP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3JmY0VZdTY0QVdYVXpDRGlRVktubEpTTnlmTzhtSHlrRlJhcWpHSVdReFcyZEswQ0dVTDJ2aTdNS3R0bkg4NE9RNmVYWWctZVNJcVluNlZQT2JUdnlCTnVPaWM1cHZsVFZPWkdqVUtOTURibkg0a2xkMHV2X0N6MDZiSS1ZMV9mUXd3T2s3ZjV6TVpMRUVFQ243UzBmLTM3QkRqMzMwZ3AwWHltVGtEWjJtN0prRk1Yc2dERjZWYk8xcHItTmlIMncmaD1lbjd2Zlg3d2NOLU8yYUxOUEJnVzUzallyX2VLdnMzVUdacTJWbmRWYmZv", + "RequestMethod": "GET", + "RequestHeaders": { + "x-ms-client-request-id": [ + "99cd5834-a629-43dd-a598-a7af565f2bdd" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "20" + ], + "x-ms-request-id": [ + "52f877b4-4121-41a0-878d-58506d10f18d" + ], + "x-ms-correlation-request-id": [ + "2d4d2d02-0fb3-45dc-bd40-6dd95ec9fc82" + ], + "x-ms-arm-service-request-id": [ + "a68ba500-ed51-4667-81f3-bf5dd3933bb3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T152224Z:2d4d2d02-0fb3-45dc-bd40-6dd95ec9fc82" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 274EDE0819AB4E0CA1EEA43A2DAB5C88 Ref B: SJC211051205011 Ref C: 2024-03-21T15:22:24Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:22:23 GMT" + ], + "Content-Length": [ + "23" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"status\": \"InProgress\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/providers/Microsoft.Network/locations/eastus2euap/operations/aecd8503-c178-494c-aac5-a42e994af54e?api-version=2023-09-01&t=638466313028173473&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1fEojEYKGj84-8gHXFveahRVa6ZPij7XMWfXQZWdo2aj6sMRX8UCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCA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UjJ0dktldmxmLVMyeEFFTHdGeUUzRGJyZl9KRk91dkE4Tnk3SjVZNDdBNUdvcGJ0WmxqZG5NWGtHZnBVRUNLaWFZX3EyaUxybFN5aEswOTI1Ylg0enozTExEOTAzSFplY3RFeG9DWFNZYjAmcz1DejdvX0xPeFMzTGJnekFlb0Rab29UM0VZSE93QUlDb2JlWTZreW5ZaklwcXFVazRzZ2hoR240VVRyWVNwUVF0UXFrVDBLOGVmdVJ5MVlmYW44T2xBUGJ0OVhqWllObkJ6WUdINjI2bnhyNXpSOTJvRWZoVklkYko5cUh5QUgyVTBtbnVucGJPTFM0dWhENUtYci1zZ3JmY0VZdTY0QVdYVXpDRGlRVktubEpTTnlmTzhtSHlrRlJhcWpHSVdReFcyZEswQ0dVTDJ2aTdNS3R0bkg4NE9RNmVYWWctZVNJcVluNlZQT2JUdnlCTnVPaWM1cHZsVFZPWkdqVUtOTURibkg0a2xkMHV2X0N6MDZiSS1ZMV9mUXd3T2s3ZjV6TVpMRUVFQ243UzBmLTM3QkRqMzMwZ3AwWHltVGtEWjJtN0prRk1Yc2dERjZWYk8xcHItTmlIMncmaD1lbjd2Zlg3d2NOLU8yYUxOUEJnVzUzallyX2VLdnMzVUdacTJWbmRWYmZv", + "RequestMethod": "GET", + "RequestHeaders": { + "x-ms-client-request-id": [ + "99cd5834-a629-43dd-a598-a7af565f2bdd" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "40" + ], + "x-ms-request-id": [ + "eaa5377d-6029-4a97-92a2-a8895066f0fc" + ], + "x-ms-correlation-request-id": [ + "4f9b217a-4448-47ac-948e-3958165d39eb" + ], + "x-ms-arm-service-request-id": [ + "60d8805b-5d8d-4f89-8ab7-2f311aafbd1e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T152245Z:4f9b217a-4448-47ac-948e-3958165d39eb" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: B5C049D70CA4428E9C84B6FA3B10CD84 Ref B: SJC211051205011 Ref C: 2024-03-21T15:22:44Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:22:44 GMT" + ], + "Content-Length": [ + "23" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"status\": \"InProgress\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/providers/Microsoft.Network/locations/eastus2euap/operations/aecd8503-c178-494c-aac5-a42e994af54e?api-version=2023-09-01&t=638466313028173473&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt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+ "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "40" + ], + "x-ms-request-id": [ + "fb1ce26b-8925-412a-96ae-2fc937beedcd" + ], + "x-ms-correlation-request-id": [ + "81013a9a-4754-4a7f-858f-b6af4b3b33b8" + ], + "x-ms-arm-service-request-id": [ + "188116ac-7caa-4885-8723-d9dd8193fe40" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T152326Z:81013a9a-4754-4a7f-858f-b6af4b3b33b8" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 4A3287F90AC84D2485C35C4C98C78258 Ref B: SJC211051205011 Ref C: 2024-03-21T15:23:25Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:23:26 GMT" + ], + "Content-Length": [ + "23" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"status\": \"InProgress\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/providers/Microsoft.Network/locations/eastus2euap/operations/aecd8503-c178-494c-aac5-a42e994af54e?api-version=2023-09-01&t=638466313028173473&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjA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DJ2aTdNS3R0bkg4NE9RNmVYWWctZVNJcVluNlZQT2JUdnlCTnVPaWM1cHZsVFZPWkdqVUtOTURibkg0a2xkMHV2X0N6MDZiSS1ZMV9mUXd3T2s3ZjV6TVpMRUVFQ243UzBmLTM3QkRqMzMwZ3AwWHltVGtEWjJtN0prRk1Yc2dERjZWYk8xcHItTmlIMncmaD1lbjd2Zlg3d2NOLU8yYUxOUEJnVzUzallyX2VLdnMzVUdacTJWbmRWYmZv", + "RequestMethod": "GET", + "RequestHeaders": { + "x-ms-client-request-id": [ + "99cd5834-a629-43dd-a598-a7af565f2bdd" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "80" + ], + "x-ms-request-id": [ + "72a005e6-386f-4743-8a80-f24364df7581" + ], + "x-ms-correlation-request-id": [ + "638859cb-5232-44bc-8ca0-16fa70f216fa" + ], + "x-ms-arm-service-request-id": [ + "ece5a72d-b05b-4cf2-b554-dd7e5983f032" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T152406Z:638859cb-5232-44bc-8ca0-16fa70f216fa" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 3FA06E98B134425A9E62BCC0D52C6791 Ref B: SJC211051205011 Ref C: 2024-03-21T15:24:06Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:24:06 GMT" + ], + "Content-Length": [ + "23" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"status\": \"InProgress\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/providers/Microsoft.Network/locations/eastus2euap/operations/aecd8503-c178-494c-aac5-a42e994af54e?api-version=2023-09-01&t=638466313028173473&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1fEojEYKGj84-8gHXFveahRVa6ZPij7XMWfXQZWdo2aj6sMRX8UCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5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NLaWFZX3EyaUxybFN5aEswOTI1Ylg0enozTExEOTAzSFplY3RFeG9DWFNZYjAmcz1DejdvX0xPeFMzTGJnekFlb0Rab29UM0VZSE93QUlDb2JlWTZreW5ZaklwcXFVazRzZ2hoR240VVRyWVNwUVF0UXFrVDBLOGVmdVJ5MVlmYW44T2xBUGJ0OVhqWllObkJ6WUdINjI2bnhyNXpSOTJvRWZoVklkYko5cUh5QUgyVTBtbnVucGJPTFM0dWhENUtYci1zZ3JmY0VZdTY0QVdYVXpDRGlRVktubEpTTnlmTzhtSHlrRlJhcWpHSVdReFcyZEswQ0dVTDJ2aTdNS3R0bkg4NE9RNmVYWWctZVNJcVluNlZQT2JUdnlCTnVPaWM1cHZsVFZPWkdqVUtOTURibkg0a2xkMHV2X0N6MDZiSS1ZMV9mUXd3T2s3ZjV6TVpMRUVFQ243UzBmLTM3QkRqMzMwZ3AwWHltVGtEWjJtN0prRk1Yc2dERjZWYk8xcHItTmlIMncmaD1lbjd2Zlg3d2NOLU8yYUxOUEJnVzUzallyX2VLdnMzVUdacTJWbmRWYmZv", + "RequestMethod": "GET", + "RequestHeaders": { + "x-ms-client-request-id": [ + "99cd5834-a629-43dd-a598-a7af565f2bdd" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "160" + ], + "x-ms-request-id": [ + "803769ca-45b7-4d36-b074-3c6febb72c5c" + ], + "x-ms-correlation-request-id": [ + "50c1a7f1-12f4-412d-8d52-a6efe50fa297" + ], + "x-ms-arm-service-request-id": [ + "44eae0f3-77ab-415c-8914-682718f5b03b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T152527Z:50c1a7f1-12f4-412d-8d52-a6efe50fa297" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 849EB0415F06491E87F4592C52EEE726 Ref B: SJC211051204021 Ref C: 2024-03-21T15:25:26Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:25:27 GMT" + ], + "Content-Length": [ + "23" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"status\": \"InProgress\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/providers/Microsoft.Network/locations/eastus2euap/operations/aecd8503-c178-494c-aac5-a42e994af54e?api-version=2023-09-01&t=638466313028173473&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwn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emJGTllsY0ZhVkZDMlJIR2xSWW9hNFNoZWNfNV85cUlrQkE3TWJqVzFyZDE1LW4zTENYR2JfU1VHQW9KMlFqWF9PQVhiemdTNHNsTFpDSWUwekpDS0NFdnY3TlVUek5vNk12cEQzS1V4QUFiS2Y3WERPbDhoSFZEaHBKeHI2NGNEb2hxR2lMank3YUk2QV96WTVaV3pRTE1DZF9XeHVYdTZlRWNfZmFvT01MOWx1Z2gxTmtBUjJ0dktldmxmLVMyeEFFTHdGeUUzRGJyZl9KRk91dkE4Tnk3SjVZNDdBNUdvcGJ0WmxqZG5NWGtHZnBVRUNLaWFZX3EyaUxybFN5aEswOTI1Ylg0enozTExEOTAzSFplY3RFeG9DWFNZYjAmcz1DejdvX0xPeFMzTGJnekFlb0Rab29UM0VZSE93QUlDb2JlWTZreW5ZaklwcXFVazRzZ2hoR240VVRyWVNwUVF0UXFrVDBLOGVmdVJ5MVlmYW44T2xBUGJ0OVhqWllObkJ6WUdINjI2bnhyNXpSOTJvRWZoVklkYko5cUh5QUgyVTBtbnVucGJPTFM0dWhENUtYci1zZ3JmY0VZdTY0QVdYVXpDRGlRVktubEpTTnlmTzhtSHlrRlJhcWpHSVdReFcyZEswQ0dVTDJ2aTdNS3R0bkg4NE9RNmVYWWctZVNJcVluNlZQT2JUdnlCTnVPaWM1cHZsVFZPWkdqVUtOTURibkg0a2xkMHV2X0N6MDZiSS1ZMV9mUXd3T2s3ZjV6TVpMRUVFQ243UzBmLTM3QkRqMzMwZ3AwWHltVGtEWjJtN0prRk1Yc2dERjZWYk8xcHItTmlIMncmaD1lbjd2Zlg3d2NOLU8yYUxOUEJnVzUzallyX2VLdnMzVUdacTJWbmRWYmZv", + "RequestMethod": "GET", + "RequestHeaders": { + "x-ms-client-request-id": [ + "99cd5834-a629-43dd-a598-a7af565f2bdd" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "100" + ], + "x-ms-request-id": [ + "6456d8e6-f38d-4d10-9c9a-9e909a748e3e" + ], + "x-ms-correlation-request-id": [ + "de1b5525-a943-4e87-9092-b87889f1f964" + ], + "x-ms-arm-service-request-id": [ + "d1189629-3938-4020-87df-e2175d20e721" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T152807Z:de1b5525-a943-4e87-9092-b87889f1f964" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 91E0CF593A9945DCB71748739F5F5074 Ref B: SJC211051204053 Ref C: 2024-03-21T15:28:07Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:28:07 GMT" + ], + "Content-Length": [ + "23" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"status\": \"InProgress\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/providers/Microsoft.Network/locations/eastus2euap/operations/aecd8503-c178-494c-aac5-a42e994af54e?api-version=2023-09-01&t=638466313028173473&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2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ZMV9mUXd3T2s3ZjV6TVpMRUVFQ243UzBmLTM3QkRqMzMwZ3AwWHltVGtEWjJtN0prRk1Yc2dERjZWYk8xcHItTmlIMncmaD1lbjd2Zlg3d2NOLU8yYUxOUEJnVzUzallyX2VLdnMzVUdacTJWbmRWYmZv", + "RequestMethod": "GET", + "RequestHeaders": { + "x-ms-client-request-id": [ + "99cd5834-a629-43dd-a598-a7af565f2bdd" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "100" + ], + "x-ms-request-id": [ + "2c22465e-5939-474d-bd4a-3ba8f43981bb" + ], + "x-ms-correlation-request-id": [ + "76bbb339-bd52-4884-852d-a9fadad571d3" + ], + "x-ms-arm-service-request-id": [ + "67823169-9532-4e28-b6fc-e1e93b38b1a9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T152948Z:76bbb339-bd52-4884-852d-a9fadad571d3" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: EAD7AFDAE6B14573B075D735C4EA2193 Ref B: SJC211051204047 Ref C: 2024-03-21T15:29:47Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:29:48 GMT" + ], + "Content-Length": [ + "23" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"status\": \"InProgress\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/providers/Microsoft.Network/locations/eastus2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lDb2JlWTZreW5ZaklwcXFVazRzZ2hoR240VVRyWVNwUVF0UXFrVDBLOGVmdVJ5MVlmYW44T2xBUGJ0OVhqWllObkJ6WUdINjI2bnhyNXpSOTJvRWZoVklkYko5cUh5QUgyVTBtbnVucGJPTFM0dWhENUtYci1zZ3JmY0VZdTY0QVdYVXpDRGlRVktubEpTTnlmTzhtSHlrRlJhcWpHSVdReFcyZEswQ0dVTDJ2aTdNS3R0bkg4NE9RNmVYWWctZVNJcVluNlZQT2JUdnlCTnVPaWM1cHZsVFZPWkdqVUtOTURibkg0a2xkMHV2X0N6MDZiSS1ZMV9mUXd3T2s3ZjV6TVpMRUVFQ243UzBmLTM3QkRqMzMwZ3AwWHltVGtEWjJtN0prRk1Yc2dERjZWYk8xcHItTmlIMncmaD1lbjd2Zlg3d2NOLU8yYUxOUEJnVzUzallyX2VLdnMzVUdacTJWbmRWYmZv", + "RequestMethod": "GET", + "RequestHeaders": { + "x-ms-client-request-id": [ + "99cd5834-a629-43dd-a598-a7af565f2bdd" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "100" + ], + "x-ms-request-id": [ + "083cc7d5-33a0-4a7e-a90a-1a990ba5165e" + ], + "x-ms-correlation-request-id": [ + "bb6c0b5d-ab49-44a7-bb7d-94b0c259c0a8" + ], + "x-ms-arm-service-request-id": [ + "217f90e8-62be-47ce-9718-e3391041788c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T153129Z:bb6c0b5d-ab49-44a7-bb7d-94b0c259c0a8" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 650B202615E945F1845B7E2B05228D97 Ref B: SJC211051205033 Ref C: 2024-03-21T15:31:28Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:31:29 GMT" + ], + "Content-Length": [ + "23" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"status\": \"InProgress\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/providers/Microsoft.Network/locations/eastus2euap/operations/aecd8503-c178-494c-aac5-a42e994af54e?api-version=2023-09-01&t=638466313028173473&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1fEojEYKGj84-8gHXFveahRVa6ZPij7XMWfXQZWdo2aj6sMRX8UCAwEAAaOC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hiemdTNHNsTFpDSWUwekpDS0NFdnY3TlVUek5vNk12cEQzS1V4QUFiS2Y3WERPbDhoSFZEaHBKeHI2NGNEb2hxR2lMank3YUk2QV96WTVaV3pRTE1DZF9XeHVYdTZlRWNfZmFvT01MOWx1Z2gxTmtBUjJ0dktldmxmLVMyeEFFTHdGeUUzRGJyZl9KRk91dkE4Tnk3SjVZNDdBNUdvcGJ0WmxqZG5NWGtHZnBVRUNLaWFZX3EyaUxybFN5aEswOTI1Ylg0enozTExEOTAzSFplY3RFeG9DWFNZYjAmcz1DejdvX0xPeFMzTGJnekFlb0Rab29UM0VZSE93QUlDb2JlWTZreW5ZaklwcXFVazRzZ2hoR240VVRyWVNwUVF0UXFrVDBLOGVmdVJ5MVlmYW44T2xBUGJ0OVhqWllObkJ6WUdINjI2bnhyNXpSOTJvRWZoVklkYko5cUh5QUgyVTBtbnVucGJPTFM0dWhENUtYci1zZ3JmY0VZdTY0QVdYVXpDRGlRVktubEpTTnlmTzhtSHlrRlJhcWpHSVdReFcyZEswQ0dVTDJ2aTdNS3R0bkg4NE9RNmVYWWctZVNJcVluNlZQT2JUdnlCTnVPaWM1cHZsVFZPWkdqVUtOTURibkg0a2xkMHV2X0N6MDZiSS1ZMV9mUXd3T2s3ZjV6TVpMRUVFQ243UzBmLTM3QkRqMzMwZ3AwWHltVGtEWjJtN0prRk1Yc2dERjZWYk8xcHItTmlIMncmaD1lbjd2Zlg3d2NOLU8yYUxOUEJnVzUzallyX2VLdnMzVUdacTJWbmRWYmZv", + "RequestMethod": "GET", + "RequestHeaders": { + "x-ms-client-request-id": [ + "99cd5834-a629-43dd-a598-a7af565f2bdd" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "100" + ], + "x-ms-request-id": [ + "39aee15b-2ced-4094-a5b7-1b000225a8f3" + ], + "x-ms-correlation-request-id": [ + "347c4d37-7aa2-42ac-9e06-69f4f3d1b1d2" + ], + "x-ms-arm-service-request-id": [ + "1df9e67c-e444-4ac2-a365-e08eaa165561" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T153310Z:347c4d37-7aa2-42ac-9e06-69f4f3d1b1d2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 0A0E93B8B5E84C76AA8EA6C4C89D9F6A Ref B: SJC211051205021 Ref C: 2024-03-21T15:33:09Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:33:09 GMT" + ], + "Content-Length": [ + "23" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"status\": \"InProgress\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/providers/Microsoft.Network/locations/eastus2euap/operations/aecd8503-c178-494c-aac5-a42e994af54e?api-version=2023-09-01&t=638466313028173473&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSud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Rk1Yc2dERjZWYk8xcHItTmlIMncmaD1lbjd2Zlg3d2NOLU8yYUxOUEJnVzUzallyX2VLdnMzVUdacTJWbmRWYmZv", + "RequestMethod": "GET", + "RequestHeaders": { + "x-ms-client-request-id": [ + "99cd5834-a629-43dd-a598-a7af565f2bdd" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "100" + ], + "x-ms-request-id": [ + "fe2a8b85-bc2e-41fc-ac7d-949a3d0f7868" + ], + "x-ms-correlation-request-id": [ + "adb896c6-3d8e-403b-b615-e72f56aaaa64" + ], + "x-ms-arm-service-request-id": [ + "3d35437c-516c-4760-b9f2-ce885eb2bd34" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T153451Z:adb896c6-3d8e-403b-b615-e72f56aaaa64" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: FB8C2736EBAC4E53B9D5B40550902C89 Ref B: SJC211051205039 Ref C: 2024-03-21T15:34:50Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:34:50 GMT" + ], + "Content-Length": [ + "23" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"status\": \"InProgress\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/providers/Microsoft.Network/locations/eastus2euap/operations/aecd8503-c178-494c-aac5-a42e994af54e?api-version=2023-09-01&t=638466313028173473&c=MIIH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VJ5MVlmYW44T2xBUGJ0OVhqWllObkJ6WUdINjI2bnhyNXpSOTJvRWZoVklkYko5cUh5QUgyVTBtbnVucGJPTFM0dWhENUtYci1zZ3JmY0VZdTY0QVdYVXpDRGlRVktubEpTTnlmTzhtSHlrRlJhcWpHSVdReFcyZEswQ0dVTDJ2aTdNS3R0bkg4NE9RNmVYWWctZVNJcVluNlZQT2JUdnlCTnVPaWM1cHZsVFZPWkdqVUtOTURibkg0a2xkMHV2X0N6MDZiSS1ZMV9mUXd3T2s3ZjV6TVpMRUVFQ243UzBmLTM3QkRqMzMwZ3AwWHltVGtEWjJtN0prRk1Yc2dERjZWYk8xcHItTmlIMncmaD1lbjd2Zlg3d2NOLU8yYUxOUEJnVzUzallyX2VLdnMzVUdacTJWbmRWYmZv", + "RequestMethod": "GET", + "RequestHeaders": { + "x-ms-client-request-id": [ + "99cd5834-a629-43dd-a598-a7af565f2bdd" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Network.NetworkManagementClient/27.0.0.0" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "8fefe818-d2ba-4a05-ab53-aaad101630bd" + ], + "x-ms-correlation-request-id": [ + "51b67514-3bcc-41b1-a9b3-12e29c038e3d" + ], + "x-ms-arm-service-request-id": [ + "7388ed54-b49f-40e8-86e4-9a769a27d81d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T153631Z:51b67514-3bcc-41b1-a9b3-12e29c038e3d" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 1D82F074C1CE4351AC196E7E6CDC05B7 Ref B: SJC211051204019 Ref C: 2024-03-21T15:36:31Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:36:31 GMT" + ], + "Content-Length": [ + "22" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"status\": \"Succeeded\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/resourcegroups/ps6079?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYWViNWIwMmEtMGYxOC00NWE0LTg2ZDYtODE4MDgxMTVjYWNmL3Jlc291cmNlZ3JvdXBzL3BzNjA3OT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", + "RequestMethod": "DELETE", + "RequestHeaders": { + "x-ms-client-request-id": [ + "8d428ea5-8a2c-411b-b906-7658ded181b6" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466321953115988&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMj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5Y47A5GopbtZljdnMXkGfpUECKiaY_q2iLrlSyhK0925bX4zz3LLD903HZectExoCXSYb0&s=kaU6xgOdf7hbR1-mPTXV2jRZJf3EM-71crYKLSY0lkw2FL2QY83wRNxfXXeMbNbU8cBbbzvo_wrlQtdG42nvE_7kWRURE7HAQ_uozvN3rjzHW2MNOwAE7vFjJYtIaRoSDDLuMbDLMGUWytEWEi93XtsIlBYwY63mV8iWdY2D2xiQhmcYgujS8FeNoYRyzsxFZynTrmsiwJRi6XcIg0xNPKOp2IrM4zP3lH6ZCgGxQchXn88-iLIDFoPKaEbCISIgjXumTVWjv_RtVkPreabgTjT8ioVDqwQJf2ibmHLkpe0-pyE9ZVqAE4VfOJq6c2nihA0h5S43npbpowGihpks2A&h=xKQm2G6s_PsATwPGasf_cmS27ZQPx2YwbljF9oafbk4" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-request-id": [ + "a1fade35-14a5-40b6-9357-7b41deb8bcca" + ], + "x-ms-correlation-request-id": [ + "a1fade35-14a5-40b6-9357-7b41deb8bcca" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T153635Z:a1fade35-14a5-40b6-9357-7b41deb8bcca" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 837E18DB0D154D81948B2011BDD1F601 Ref B: SJC211051205037 Ref C: 2024-03-21T15:36:33Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:36:34 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQV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RXhvQ1hTWWIwJnM9a2FVNnhnT2RmN2hiUjEtbVBUWFYyalJaSmYzRU0tNzFjcllLTFNZMGxrdzJGTDJRWTgzd1JOeGZYWGVNYk5iVThjQmJienZvX3dybFF0ZEc0Mm52RV83a1dSVVJFN0hBUV91b3p2TjNyanpIVzJNTk93QUU3dkZqSll0SWFSb1NEREx1TWJETE1HVVd5dEVXRWk5M1h0c0lsQll3WTYzbVY4aVdkWTJEMnhpUWhtY1lndWpTOEZlTm9ZUnl6c3hGWnluVHJtc2l3SlJpNlhjSWcweE5QS09wMklyTTR6UDNsSDZaQ2dHeFFjaFhuODgtaUxJREZvUEthRWJDSVNJZ2pYdW1UVldqdl9SdFZrUHJlYWJnVGpUOGlvVkRxd1FKZjJpYm1ITGtwZTAtcHlFOVpWcUFFNFZmT0pxNmMybmloQTBoNVM0M25wYnBvd0dpaHBrczJBJmg9eEtRbTJHNnNfUHNBVHdQR2FzZl9jbVMyN1pRUHgyWXdibGpGOW9hZmJrNA==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466322106834208&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgS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6eEc_faoOML9lugh1NkAR2tvKevlf-S2xAELwFyE3Dbrf_JFOuvA8Ny7J5Y47A5GopbtZljdnMXkGfpUECKiaY_q2iLrlSyhK0925bX4zz3LLD903HZectExoCXSYb0&s=KTpIUNhxlMyZQyn-1XoIyCkgyIu7mFVdtha9FJEFWKTGMK1b_VrgZPBdZmoVUL7XnRYLC43xXKRE7peJrryyYzf8jFOyseM4WCrSHJT9doeEwRjoYybuYG2I63nzpGlwRsjS2DlITVkYtsFvUkyb3qHnBSL8Mos_iRhw-YEASUpb5JdkicEQwjQWaUja2evaAqp5zGUXK3tH2dSF7fW6VTi5JB4ZcMkP22F7lBFv2s54LXC-868xIbw7JatpjLhj6-qb1ovX2x1XdVyxTSC1QcHdH6VfayHpwlHVZy90YOM7sAy7W4VtllKeBIwcSc3M6AE8xrzaXv0vtyiGXnF2MA&h=uBK0b1ugP3MsCTWPoPMo-pp_jlNG472Yd5u96Yn730E" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "f69547c9-46e8-444f-9d9e-b797fc4f4fa1" + ], + "x-ms-correlation-request-id": [ + "f69547c9-46e8-444f-9d9e-b797fc4f4fa1" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T153650Z:f69547c9-46e8-444f-9d9e-b797fc4f4fa1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 0E259CC9270D48469424D567C1E9643F Ref B: SJC211051205037 Ref C: 2024-03-21T15:36:50Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:36:50 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJ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VhrR2ZwVUVDS2lhWV9xMmlMcmxTeWhLMDkyNWJYNHp6M0xMRDkwM0haZWN0RXhvQ1hTWWIwJnM9S1RwSVVOaHhsTXlaUXluLTFYb0l5Q2tneUl1N21GVmR0aGE5RkpFRldLVEdNSzFiX1ZyZ1pQQmRabW9WVUw3WG5SWUxDNDN4WEtSRTdwZUpycnl5WXpmOGpGT3lzZU00V0NyU0hKVDlkb2VFd1Jqb1l5YnVZRzJJNjNuenBHbHdSc2pTMkRsSVRWa1l0c0Z2VWt5YjNxSG5CU0w4TW9zX2lSaHctWUVBU1VwYjVKZGtpY0VRd2pRV2FVamEyZXZhQXFwNXpHVVhLM3RIMmRTRjdmVzZWVGk1SkI0WmNNa1AyMkY3bEJGdjJzNTRMWEMtODY4eElidzdKYXRwakxoajYtcWIxb3ZYMngxWGRWeXhUU0MxUWNIZEg2VmZheUhwd2xIVlp5OTBZT003c0F5N1c0VnRsbEtlQkl3Y1NjM002QUU4eHJ6YVh2MHZ0eWlHWG5GMk1BJmg9dUJLMGIxdWdQM01zQ1RXUG9QTW8tcHBfamxORzQ3MllkNXU5NlluNzMwRQ==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466322261541867&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQ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NUTzNo6MvpD3KUxAAbKf7XDOl8hHVDhpJxr64cDohqGiLjy7aI6A_zY5ZWzQLMCd_WxuXu6eEc_faoOML9lugh1NkAR2tvKevlf-S2xAELwFyE3Dbrf_JFOuvA8Ny7J5Y47A5GopbtZljdnMXkGfpUECKiaY_q2iLrlSyhK0925bX4zz3LLD903HZectExoCXSYb0&s=DhX-HZ7NYlVOiXqbN8kZmuboIHvlo5U4o8cAVnqBf7Mn0BwkZoYs24QJ-o53pHltSm9wYNi1HY3lYYWEoG4FEmEHemLG76tIbcmZXAOO5Df8pjHEgdwBUp4E5xx78NxF7UgFgTGvYpR2TrE_7gKud0IqNNzAOD6rDRwup71U--6Hpi13kHXpmLdgaGy9K0810uYujbx1MugZpHad7QQn3jy3DU37jK7QKdsoMxr7ZB_EgtCkg9-HfMVpCVzO1BYB-rt5hxKPcvChT-PbcjEA6tPVtIxuhhmkX0B7ASdqp8BURTzIQnO1dbhi-bWKfdnJwxQTXx67pIineCPj6VCcTQ&h=4Lv1LFbSkEQ_6qPwbueW5N-AVBbfsDdWH8LyCUMvV6o" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "b3461418-f796-4ce2-a5a2-7632e2fb16f2" + ], + "x-ms-correlation-request-id": [ + "b3461418-f796-4ce2-a5a2-7632e2fb16f2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T153706Z:b3461418-f796-4ce2-a5a2-7632e2fb16f2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 7B74F8BFC9EF4AEF9AAD9F775B43EBFC Ref B: SJC211051205037 Ref C: 2024-03-21T15:37:05Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:37:05 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466322261541867&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1fEojEYKGj84-8gHXFveahRVa6ZPij7XMWfXQZWdo2aj6sMRX8UCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5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X2Zhb09NTDlsdWdoMU5rQVIydHZLZXZsZi1TMnhBRUx3RnlFM0RicmZfSkZPdXZBOE55N0o1WTQ3QTVHb3BidFpsamRuTVhrR2ZwVUVDS2lhWV9xMmlMcmxTeWhLMDkyNWJYNHp6M0xMRDkwM0haZWN0RXhvQ1hTWWIwJnM9RGhYLUhaN05ZbFZPaVhxYk44a1ptdWJvSUh2bG81VTRvOGNBVm5xQmY3TW4wQndrWm9ZczI0UUotbzUzcEhsdFNtOXdZTmkxSFkzbFlZV0VvRzRGRW1FSGVtTEc3NnRJYmNtWlhBT081RGY4cGpIRWdkd0JVcDRFNXh4NzhOeEY3VWdGZ1RHdllwUjJUckVfN2dLdWQwSXFOTnpBT0Q2ckRSd3VwNzFVLS02SHBpMTNrSFhwbUxkZ2FHeTlLMDgxMHVZdWpieDFNdWdacEhhZDdRUW4zankzRFUzN2pLN1FLZHNvTXhyN1pCX0VndENrZzktSGZNVnBDVnpPMUJZQi1ydDVoeEtQY3ZDaFQtUGJjakVBNnRQVnRJeHVoaG1rWDBCN0FTZHFwOEJVUlR6SVFuTzFkYmhpLWJXS2Zkbkp3eFFUWHg2N3BJaW5lQ1BqNlZDY1RRJmg9NEx2MUxGYlNrRVFfNnFQd2J1ZVc1Ti1BVkJiZnNEZFdIOEx5Q1VNdlY2bw==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cz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UWmFDChWzbFNYlcFaVFC2RHGlRYoa4Shec_5_9qIkBA7MbjW1rd15-n3LCXGb_SUGAoJ2QjX_OAXbzgS4slLZCIe0zJCKCEvv7NUTzNo6MvpD3KUxAAbKf7XDOl8hHVDhpJxr64cDohqGiLjy7aI6A_zY5ZWzQLMCd_WxuXu6eEc_faoOML9lugh1NkAR2tvKevlf-S2xAELwFyE3Dbrf_JFOuvA8Ny7J5Y47A5GopbtZljdnMXkGfpUECKiaY_q2iLrlSyhK0925bX4zz3LLD903HZectExoCXSYb0&s=Pg-T4HdISaJcFvLquqUxRekOPVlfWMkZtBAhYn18uUVbSUGwpwNrVr7vwGFjXp9on3f4jOVV5r3UMN76EfiL6YkNG7PP8MRoOXK7CJ2cA_xT8oIS_LQzUM6-esxxUaiZmkGicM1cOQY0rnm1gKYGFpEBWfUDvqN8Fxfe5UubTIT3j5D0YZcnmZYD5J4M7zd1UPhGH1HdDw_tGAtoaU_AipIU2twbalX2YCZ18Lq-lX3CIggHlzb0Kl5KoVPa_PSA0SSC09mxIqFgpm2s6aqRIByEogxoU4VonNQZiNcnjLucrdiK19uQVAwZkX3JO_9Z_8CUdCkNU-9bvVEy5IXKrw&h=yHacwiFdurv0KyMw5QdERYPU36NM9qOlmAXIyK_w-cA" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "a6e8fbc7-f143-4ac5-9ed9-e2a614ff465f" + ], + "x-ms-correlation-request-id": [ + "a6e8fbc7-f143-4ac5-9ed9-e2a614ff465f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T153721Z:a6e8fbc7-f143-4ac5-9ed9-e2a614ff465f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 3E9D7D8C3E1F4841B5F9E0735AC2DA76 Ref B: SJC211051205037 Ref C: 2024-03-21T15:37:21Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:37:21 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466322414992272&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1fEojEYKGj84-8gHXFveahRVa6ZPij7XMWfXQZWdo2aj6sMRX8UCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJ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RXZ2N05VVHpObzZNdnBEM0tVeEFBYktmN1hET2w4aEhWRGhwSnhyNjRjRG9ocUdpTGp5N2FJNkFfelk1Wld6UUxNQ2RfV3h1WHU2ZUVjX2Zhb09NTDlsdWdoMU5rQVIydHZLZXZsZi1TMnhBRUx3RnlFM0RicmZfSkZPdXZBOE55N0o1WTQ3QTVHb3BidFpsamRuTVhrR2ZwVUVDS2lhWV9xMmlMcmxTeWhLMDkyNWJYNHp6M0xMRDkwM0haZWN0RXhvQ1hTWWIwJnM9UGctVDRIZElTYUpjRnZMcXVxVXhSZWtPUFZsZldNa1p0QkFoWW4xOHVVVmJTVUd3cHdOclZyN3Z3R0ZqWHA5b24zZjRqT1ZWNXIzVU1ONzZFZmlMNllrTkc3UFA4TVJvT1hLN0NKMmNBX3hUOG9JU19MUXpVTTYtZXN4eFVhaVpta0dpY00xY09RWTBybm0xZ0tZR0ZwRUJXZlVEdnFOOEZ4ZmU1VXViVElUM2o1RDBZWmNubVpZRDVKNE03emQxVVBoR0gxSGREd190R0F0b2FVX0FpcElVMnR3YmFsWDJZQ1oxOExxLWxYM0NJZ2dIbHpiMEtsNUtvVlBhX1BTQTBTU0MwOW14SXFGZ3BtMnM2YXFSSUJ5RW9neG9VNFZvbk5RWmlOY25qTHVjcmRpSzE5dVFWQXdaa1gzSk9fOVpfOENVZENrTlUtOWJ2VkV5NUlYS3J3Jmg9eUhhY3dpRmR1cnYwS3lNdzVRZEVSWVBVMzZOTTlxT2xtQVhJeUtfdy1jQQ==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults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AUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAF9wsVY5GPv3eQNDdOO3pX2IJsz5n5bMuVN0DqeMoBkFFfk4UWmFDChWzbFNYlcFaVFC2RHGlRYoa4Shec_5_9qIkBA7MbjW1rd15-n3LCXGb_SUGAoJ2QjX_OAXbzgS4slLZCIe0zJCKCEvv7NUTzNo6MvpD3KUxAAbKf7XDOl8hHVDhpJxr64cDohqGiLjy7aI6A_zY5ZWzQLMCd_WxuXu6eEc_faoOML9lugh1NkAR2tvKevlf-S2xAELwFyE3Dbrf_JFOuvA8Ny7J5Y47A5GopbtZljdnMXkGfpUECKiaY_q2iLrlSyhK0925bX4zz3LLD903HZectExoCXSYb0&s=QkKfO2-3rjCDPupmvXYDBIXb7h9dEggSxkt4KGe96pt_ufs7u5d4ZvGpikdQpoKcSh1Tpp407EYasPX2-zmSIahm5M0v1AJWQvwVxzEd3REqBqQ839sIAmKIcX7wvfnaSqKHJuOWbJCYZPu6QmkkkPULAjih9DbhX_0GD4hvakmQqPZ7EO8RzPabVcaFxxkGC36W7hSP4Vetpwzk_3sq2mbmG3PJIoQLRqCMP2pOwB4XKuSOms-os01woXRWnGujzfi0jbaDszFeDnDYHHQjFp-wljScBj7exwM4ZtLxVHnYez0oJJKkoHopuOlrQaiYbM9hrITB48bSJWcRVGbp4Q&h=g_3Irc4yEz9FVziKj5qeXc6npxtD4hAAxJAnf3xpoNk" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-request-id": [ + "da3874ab-ae45-41b8-8cbd-2df528041388" + ], + "x-ms-correlation-request-id": [ + "da3874ab-ae45-41b8-8cbd-2df528041388" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T153736Z:da3874ab-ae45-41b8-8cbd-2df528041388" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 63334752959743E2A6D7370DAA3D0216 Ref B: SJC211051205037 Ref C: 2024-03-21T15:37:36Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:37:36 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466322568989865&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1fEojEYKGj84-8gHXFveahRVa6ZPij7XMWfXQZWdo2aj6sMRX8UCAwEAAaOCA-0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xNS1uM0xDWEdiX1NVR0FvSjJRalhfT0FYYnpnUzRzbExaQ0llMHpKQ0tDRXZ2N05VVHpObzZNdnBEM0tVeEFBYktmN1hET2w4aEhWRGhwSnhyNjRjRG9ocUdpTGp5N2FJNkFfelk1Wld6UUxNQ2RfV3h1WHU2ZUVjX2Zhb09NTDlsdWdoMU5rQVIydHZLZXZsZi1TMnhBRUx3RnlFM0RicmZfSkZPdXZBOE55N0o1WTQ3QTVHb3BidFpsamRuTVhrR2ZwVUVDS2lhWV9xMmlMcmxTeWhLMDkyNWJYNHp6M0xMRDkwM0haZWN0RXhvQ1hTWWIwJnM9UWtLZk8yLTNyakNEUHVwbXZYWURCSVhiN2g5ZEVnZ1N4a3Q0S0dlOTZwdF91ZnM3dTVkNFp2R3Bpa2RRcG9LY1NoMVRwcDQwN0VZYXNQWDItem1TSWFobTVNMHYxQUpXUXZ3Vnh6RWQzUkVxQnFRODM5c0lBbUtJY1g3d3ZmbmFTcUtISnVPV2JKQ1laUHU2UW1ra2tQVUxBamloOURiaFhfMEdENGh2YWttUXFQWjdFTzhSelBhYlZjYUZ4eGtHQzM2VzdoU1A0VmV0cHd6a18zc3EybWJtRzNQSklvUUxScUNNUDJwT3dCNFhLdVNPbXMtb3MwMXdvWFJXbkd1anpmaTBqYmFEc3pGZURuRFlISFFqRnAtd2xqU2NCajdleHdNNFp0THhWSG5ZZXowb0pKS2tvSG9wdU9sclFhaVliTTlocklUQjQ4YlNKV2NSVkdicDRRJmg9Z18zSXJjNHlFejlGVnppS2o1cWVYYzZucHh0RDRoQUF4SkFuZjN4cG9Oaw==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466322722888009&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1fEojEYKGj84-8gHXFveahRVa6ZPij7XMWfXQZWdo2aj6sMRX8UCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY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HSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAF9wsVY5GPv3eQNDdOO3pX2IJsz5n5bMuVN0DqeMoBkFFfk4UWmFDChWzbFNYlcFaVFC2RHGlRYoa4Shec_5_9qIkBA7MbjW1rd15-n3LCXGb_SUGAoJ2QjX_OAXbzgS4slLZCIe0zJCKCEvv7NUTzNo6MvpD3KUxAAbKf7XDOl8hHVDhpJxr64cDohqGiLjy7aI6A_zY5ZWzQLMCd_WxuXu6eEc_faoOML9lugh1NkAR2tvKevlf-S2xAELwFyE3Dbrf_JFOuvA8Ny7J5Y47A5GopbtZljdnMXkGfpUECKiaY_q2iLrlSyhK0925bX4zz3LLD903HZectExoCXSYb0&s=XG-hiM7Ob1BrvK7c2OGFfzumCBlSiykdz4DeQIHs6LeJKCRDOh3lPST30s1PynirXlmHheb-bZZYJis2s4qQe1WSbzawvm4hdz-2ExygHdlNdTlDFG6qXXO-FUj_8cwqCBng-P7KJ6xWP0Udo7xT8EdcJhrlgO_1A9Ep7pBny3YV79YZLvcjyJ3edgs-h-55hbkuDxCQ4pGEWGDDYMi3-kVNOEtWtcgauxMotZP9kIbt8lA_VHF-tBRuBKQDN-InVgL0KNTRSL0YhJ2TCFTHLec7JW89CiME8LzNiyv0P7hnfaxbqGnNMmWToHmMQQn22lSDL6dYUWZzJKnCE1gzrA&h=qi6Gwt6-rQ4WEWC9817oho4JKobxsUmc029-x6Ouzl0" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "91f28953-0525-442b-9f1f-082e73a04ce3" + ], + "x-ms-correlation-request-id": [ + "91f28953-0525-442b-9f1f-082e73a04ce3" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T153752Z:91f28953-0525-442b-9f1f-082e73a04ce3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 630DD977D2F9428E9BD6B4F87CF9568F Ref B: SJC211051205037 Ref C: 2024-03-21T15:37:51Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:37:51 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466322722888009&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1fEoj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GRENoV3piRk5ZbGNGYVZGQzJSSEdsUllvYTRTaGVjXzVfOXFJa0JBN01ialcxcmQxNS1uM0xDWEdiX1NVR0FvSjJRalhfT0FYYnpnUzRzbExaQ0llMHpKQ0tDRXZ2N05VVHpObzZNdnBEM0tVeEFBYktmN1hET2w4aEhWRGhwSnhyNjRjRG9ocUdpTGp5N2FJNkFfelk1Wld6UUxNQ2RfV3h1WHU2ZUVjX2Zhb09NTDlsdWdoMU5rQVIydHZLZXZsZi1TMnhBRUx3RnlFM0RicmZfSkZPdXZBOE55N0o1WTQ3QTVHb3BidFpsamRuTVhrR2ZwVUVDS2lhWV9xMmlMcmxTeWhLMDkyNWJYNHp6M0xMRDkwM0haZWN0RXhvQ1hTWWIwJnM9WEctaGlNN09iMUJydks3YzJPR0ZmenVtQ0JsU2l5a2R6NERlUUlIczZMZUpLQ1JET2gzbFBTVDMwczFQeW5pclhsbUhoZWItYlpaWUppczJzNHFRZTFXU2J6YXd2bTRoZHotMkV4eWdIZGxOZFRsREZHNnFYWE8tRlVqXzhjd3FDQm5nLVA3S0o2eFdQMFVkbzd4VDhFZGNKaHJsZ09fMUE5RXA3cEJueTNZVjc5WVpMdmNqeUozZWRncy1oLTU1aGJrdUR4Q1E0cEdFV0dERFlNaTMta1ZOT0V0V3RjZ2F1eE1vdFpQOWtJYnQ4bEFfVkhGLXRCUnVCS1FETi1JblZnTDBLTlRSU0wwWWhKMlRDRlRITGVjN0pXODlDaU1FOEx6Tml5djBQN2huZmF4YnFHbk5NbVdUb0htTVFRbjIybFNETDZkWVVXWnpKS25DRTFnenJBJmg9cWk2R3d0Ni1yUTRXRVdDOTgxN29obzRKS29ieHNVbWMwMjkteDZPdXpsMA==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466322877030320&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1fEojEYKGj84-8gHXFveahRVa6ZPij7XMWfXQZWdo2aj6sMRX8UCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQC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MENBJTIwMDUuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAF9wsVY5GPv3eQNDdOO3pX2IJsz5n5bMuVN0DqeMoBkFFfk4UWmFDChWzbFNYlcFaVFC2RHGlRYoa4Shec_5_9qIkBA7MbjW1rd15-n3LCXGb_SUGAoJ2QjX_OAXbzgS4slLZCIe0zJCKCEvv7NUTzNo6MvpD3KUxAAbKf7XDOl8hHVDhpJxr64cDohqGiLjy7aI6A_zY5ZWzQLMCd_WxuXu6eEc_faoOML9lugh1NkAR2tvKevlf-S2xAELwFyE3Dbrf_JFOuvA8Ny7J5Y47A5GopbtZljdnMXkGfpUECKiaY_q2iLrlSyhK0925bX4zz3LLD903HZectExoCXSYb0&s=ZMgLwQ5RVFfdgvltn8Kq0SdvWIYaYw1cy6EmDRyZhMO6kLIOu7fwQO2yt0NAv0DBJ2PukjsejOU03ahHHnko7zy-xYP5Ea-9SBMdoAYjRED8KAjoUPxn2Y_CIo1dboQpH-vpkP5r3YcIvO8w-PgE1T0ZPRwJScqM8gbbgQV0_kfxld5qksjrW0y5CDLIySvM3nelIjPK2DIXALicOO-9TgzM4ec9nU3iQ69kkE9UiYl1nkF68IkcqJGQ97UaDQzHXBhN1xB8KU3QY0xw9BRWE8jb5bWjIE1yLk8C8rwE6PXaEP6duvfLuf3Nx4feIhj2hS2iXtQPTdV544Zc5hf0mg&h=hcsZxTDLBkQlKL_B7c5OBEpKnTBg87kIniIGjfWgS_k" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "fc8f1e95-5f0a-49fb-8dab-8cc308a2b89c" + ], + "x-ms-correlation-request-id": [ + "fc8f1e95-5f0a-49fb-8dab-8cc308a2b89c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T153807Z:fc8f1e95-5f0a-49fb-8dab-8cc308a2b89c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 132FD4C4E64249BFBFE44054D30873EB Ref B: SJC211051205037 Ref C: 2024-03-21T15:38:07Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:38:07 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466322877030320&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwM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2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466323031024551&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1fEojEYKGj84-8gHXFveahRVa6ZPij7XMWfXQZWdo2aj6sMRX8UCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBB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sMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAF9wsVY5GPv3eQNDdOO3pX2IJsz5n5bMuVN0DqeMoBkFFfk4UWmFDChWzbFNYlcFaVFC2RHGlRYoa4Shec_5_9qIkBA7MbjW1rd15-n3LCXGb_SUGAoJ2QjX_OAXbzgS4slLZCIe0zJCKCEvv7NUTzNo6MvpD3KUxAAbKf7XDOl8hHVDhpJxr64cDohqGiLjy7aI6A_zY5ZWzQLMCd_WxuXu6eEc_faoOML9lugh1NkAR2tvKevlf-S2xAELwFyE3Dbrf_JFOuvA8Ny7J5Y47A5GopbtZljdnMXkGfpUECKiaY_q2iLrlSyhK0925bX4zz3LLD903HZectExoCXSYb0&s=JFOPg6dwRObminJLoHo0uvWIEiQGX0arX6xwbxLUFHvjmY48lFOw7PtnIiDaKKUpj1WSrCijLPTBxtwVr0DO7vloPsvTgTneQnOi3v8gjnAPPrDKj7_ICiOyNEQKd0xKpKh0h8-BRt5FbxKveMSrg-4OR7yCBzcs3-6voVJkcaYWYCaa_hV7sM0CRu94guuNF1sctTNOorgMqW6NRwNe_qwlwRRVU2jJ7W70tg0TrfsdSGMg8zJeMM36SEhS27slH6Lyn_E_GRNuhZf8ErVIxriE9SZ9xMTQvMJYJ_dmGHgsXdAnX_-f9ej6i4K94Inv6JqLBGntgdGWbt6cTYdFkA&h=ccAk-ghvmBIDgTaoFGx3ea_4XxtdAzydEfP7w-PJCdU" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "359ae0f5-37f6-4c19-9ca9-0b6a6d34f1fc" + ], + "x-ms-correlation-request-id": [ + "359ae0f5-37f6-4c19-9ca9-0b6a6d34f1fc" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T153823Z:359ae0f5-37f6-4c19-9ca9-0b6a6d34f1fc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 8F83E74F66B245D4A7A38202D6C74B2A Ref B: SJC211051205037 Ref C: 2024-03-21T15:38:22Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:38:22 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466323031024551&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0x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Z1Rhb0ZHeDNlYV80WHh0ZEF6eWRFZlA3dy1QSkNkVQ==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466323185516147&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1f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mH4Gp8WG-4ZxG8IvubA-lwIZPDTTkz3Xw" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "c487aa72-3ab5-497b-b170-0d8a7c64d4f1" + ], + "x-ms-correlation-request-id": [ + "c487aa72-3ab5-497b-b170-0d8a7c64d4f1" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T153838Z:c487aa72-3ab5-497b-b170-0d8a7c64d4f1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 06B57CF473A4441B9DED11968E7A2269 Ref B: SJC211051205037 Ref C: 2024-03-21T15:38:38Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:38:38 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466323185516147&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd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ZmQ3Y0R2laUGd6STVYUkc0UG1vQmstZkdtRWhWMDRtbjh3Z0o0WE1SWmcxWVFkZjRLNkNxcmtyTEZTOUwxdFM2LTF5Wk1HSVhBJmg9MTdWYldIbFhVOW1INEdwOFdHLTRaeEc4SXZ1YkEtbHdJWlBEVFRrejNYdw==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466323340101241&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9y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EY3IGHsPJYXsZoZmlmw0pq1l1KTV5W3zcfwXca2UDoO1h0KS7_gfDVeLP2swXQ75xsB2PmLLllvwA&h=hQYnocBX4BYgZm6tzUhY9yNUBQaV3bnyF-JVF-EslS4" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "2c19c748-c8a7-4185-9e7d-d5f9e7be69ab" + ], + "x-ms-correlation-request-id": [ + "2c19c748-c8a7-4185-9e7d-d5f9e7be69ab" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T153854Z:2c19c748-c8a7-4185-9e7d-d5f9e7be69ab" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 51AAA1C6C60A48E2BA36E41B31AB1DAC Ref B: SJC211051205037 Ref C: 2024-03-21T15:38:53Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:38:53 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466323340101241&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmd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SUGJOem5qVmpPRHotVktiYmlVTWFETzlZRnZhMnp3ZElZN3R6NWVFeHdqYUVZM0lHSHNQSllYc1pvWm1sbXcwcHExbDFLVFY1VzN6Y2Z3WGNhMlVEb08xaDBLUzdfZ2ZEVmVMUDJzd1hRNzV4c0IyUG1MTGxsdndBJmg9aFFZbm9jQlg0QllnWm02dHpVaFk5eU5VQlFhVjNibnlGLUpWRi1Fc2xTNA==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466323493984316&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GI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dyZOl55Ymex_UEQnQWdR3hXduU8NhmpVjoyhRIAIStXz3ItSoQa_N2kIe321qxHVkDVv81JE98d7CVDG_IAnAnWikWCEX5-rsjugzA8Z2OtfbqG2ko8aj87GTckQq3-rZj7Dgyea1RvboZCVjxXK4SO1nQ&h=meiWV-PCCYLyMoRnjOof0qj4l-nJjaBWEvPH1W_1VV8" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11997" + ], + "x-ms-request-id": [ + "f866508d-8dec-4d1e-9d1e-2d5c043c038c" + ], + "x-ms-correlation-request-id": [ + "f866508d-8dec-4d1e-9d1e-2d5c043c038c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T153909Z:f866508d-8dec-4d1e-9d1e-2d5c043c038c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 6A83974840FE445FBFE5EAB6FB4EA27A Ref B: SJC211051205037 Ref C: 2024-03-21T15:39:09Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:39:08 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466323493984316&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1Whc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E0czB3MTdRcG1CRWxZNzkxd3ZkeVpPbDU1WW1leF9VRVFuUVdkUjNoWGR1VThOaG1wVmpveWhSSUFJU3RYejNJdFNvUWFfTjJrSWUzMjFxeEhWa0RWdjgxSkU5OGQ3Q1ZER19JQW5Bbldpa1dDRVg1LXJzanVnekE4WjJPdGZicUcya284YWo4N0dUY2tRcTMtclpqN0RneWVhMVJ2Ym9aQ1ZqeFhLNFNPMW5RJmg9bWVpV1YtUENDWUx5TW9SbmpPb2YwcWo0bC1uSmphQldFdlBIMVdfMVZWOA==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466323648003685&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1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q0kbq9TR_PFKsSKZkMuDA6sHLCHpJxROCMoKZvutQnOyV8VZbre2SXqdJbsAKOHH5LV5QEyfk4NgWlD-9cmATj6jiKoY5b8yuZvf1yyPNWO0kUikh9UOFO-1oSEWmEkj-FksvdV3VuQW7pHltZv69Ml62YBRPS6ajqLuB2TnmP0Rg_u-eXBtaa1ON7PBd_GHeCXaVsRqEnRSayU2laO5eUp4NMrDEYkg&h=E_o47pfsUmoYhrjMJ46vSW3VHDLg1TcIQCvROuub7aY" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "be089245-fc5f-4cbc-aa7b-4a84213e304c" + ], + "x-ms-correlation-request-id": [ + "be089245-fc5f-4cbc-aa7b-4a84213e304c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T153924Z:be089245-fc5f-4cbc-aa7b-4a84213e304c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 9A1E6C404F7C4598B141CB66D6CD5ACB Ref B: SJC211051205037 Ref C: 2024-03-21T15:39:24Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:39:24 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466323648003685&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQB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REdnZvbnEwa2JxOVRSX1BGS3NTS1prTXVEQTZzSExDSHBKeFJPQ01vS1p2dXRRbk95VjhWWmJyZTJTWHFkSmJzQUtPSEg1TFY1UUV5Zms0TmdXbEQtOWNtQVRqNmppS29ZNWI4eXVadmYxeXlQTldPMGtVaWtoOVVPRk8tMW9TRVdtRWtqLUZrc3ZkVjNWdVFXN3BIbHRadjY5TWw2MllCUlBTNmFqcUx1QjJUbm1QMFJnX3UtZVhCdGFhMU9ON1BCZF9HSGVDWGFWc1JxRW5SU2F5VTJsYU81ZVVwNE5NckRFWWtnJmg9RV9vNDdwZnNVbW9ZaHJqTUo0NnZTVzNWSERMZzFUY0lRQ3ZST3V1YjdhWQ==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466323801994817&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASI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OpjW4dJm0j7UoippGvNIeaGmZRXKAWGAX19c0AwtONDh2bIDtMZ5-soibgkuDo_dnQ7jDz-v4sWjas4XNNd17D1OjsTByK4IhTf3Z-wNmBfgEz6dhqDEs5oZHthSXZZlFURJzO2LJYsoUYdF7_wSGfXwvDugyzoM7bmszue0SAk50CKHAG7UpBD-BU1GqV7J6aGNzMLndAyegRVMyWQiXjj_q1u8xAWnf4R8gwVg-yuB8yqAHZjOw8Y2dN2faUl9BOjgc4Q0QVj8QnQ9rTnp6IKm_QHMalJIAxUqTBOmb5MUYT9Rdcn4Q&h=dfHUteqK4DNts85yWFOVQKh4o-MsuZyoSYLyYTQUiu0" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "13f274dd-cb0e-4f77-b406-b56d09dde7ad" + ], + "x-ms-correlation-request-id": [ + "13f274dd-cb0e-4f77-b406-b56d09dde7ad" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T153940Z:13f274dd-cb0e-4f77-b406-b56d09dde7ad" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 63D1D33BFB1A4C54BB8AF6BEF37386AA Ref B: SJC211051205037 Ref C: 2024-03-21T15:39:39Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:39:39 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466323801994817&c=MIIHADCCBeigAwIBAgIT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0wajdVb2lwcEd2TkllYUdtWlJYS0FXR0FYMTljMEF3dE9ORGgyYklEdE1aNS1zb2liZ2t1RG9fZG5RN2pEei12NHNXamFzNFhOTmQxN0QxT2pzVEJ5SzRJaFRmM1otd05tQmZnRXo2ZGhxREVzNW9aSHRoU1haWmxGVVJKek8yTEpZc29VWWRGN193U0dmWHd2RHVneXpvTTdibXN6dWUwU0FrNTBDS0hBRzdVcEJELUJVMUdxVjdKNmFHTnpNTG5kQXllZ1JWTXlXUWlYampfcTF1OHhBV25mNFI4Z3dWZy15dUI4eXFBSFpqT3c4WTJkTjJmYVVsOUJPamdjNFEwUVZqOFFuUTlyVG5wNklLbV9RSE1hbEpJQXhVcVRCT21iNU1VWVQ5UmRjbjRRJmg9ZGZIVXRlcUs0RE50czg1eVdGT1ZRS2g0by1Nc3VaeW9TWUx5WVRRVWl1MA==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466323955761004&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYD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MXkGfpUECKiaY_q2iLrlSyhK0925bX4zz3LLD903HZectExoCXSYb0&s=jTmPIqsJEI64cIB30exVMlcQXQZmrx8HTxmUqJ0DeMMXXFE4oNTrwWHhQHyzpRRNpAKBerZLtAPxWyat4ZjvAwsMQPPdmcReP2bV3oOxiX_HuDRBLhUGVBdljjWeQYcDQKIOxKw567Q9xotWkmmdDJRJ98F_ywhYB0SvDungjvhia9p1dUmDBia_N1pS305224l69WZsGDTj7a_T0B01iLq2mtlU-7abXyUIysq5ZMPcl6hLIWpfpEUY1ZEyNHqxRhiFuc0iDKKgQrCSh7yHNX7-1182N1ycBU-lnK5j6FOI0eOcgqo5hJw05TW8gstEqcEKN9156soYZYdv6dg6LQ&h=UmHr3yI9njH51v29X8l_rG_BQgM6-htyJqWCEfxLV-s" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-request-id": [ + "06579c4a-33bd-4195-a2c6-f07870456d50" + ], + "x-ms-correlation-request-id": [ + "06579c4a-33bd-4195-a2c6-f07870456d50" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T153955Z:06579c4a-33bd-4195-a2c6-f07870456d50" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 1D5D24381E424690A803CF7FB172403A Ref B: SJC211051205037 Ref C: 2024-03-21T15:39:55Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:39:55 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVh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Y0Y0lCMzBleFZNbGNRWFFabXJ4OEhUeG1VcUowRGVNTVhYRkU0b05UcndXSGhRSHl6cFJSTnBBS0JlclpMdEFQeFd5YXQ0Wmp2QXdzTVFQUGRtY1JlUDJiVjNvT3hpWF9IdURSQkxoVUdWQmRsampXZVFZY0RRS0lPeEt3NTY3UTl4b3RXa21tZERKUko5OEZfeXdoWUIwU3ZEdW5nanZoaWE5cDFkVW1EQmlhX04xcFMzMDUyMjRsNjlXWnNHRFRqN2FfVDBCMDFpTHEybXRsVS03YWJYeVVJeXNxNVpNUGNsNmhMSVdwZnBFVVkxWkV5TkhxeFJoaUZ1YzBpREtLZ1FyQ1NoN3lITlg3LTExODJOMXljQlUtbG5LNWo2Rk9JMGVPY2dxbzVoSncwNVRXOGdzdEVxY0VLTjkxNTZzb1laWWR2NmRnNkxRJmg9VW1IcjN5STluakg1MXYyOVg4bF9yR19CUWdNNi1odHlKcVdDRWZ4TFYtcw==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466324109887590&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwM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-S2xAELwFyE3Dbrf_JFOuvA8Ny7J5Y47A5GopbtZljdnMXkGfpUECKiaY_q2iLrlSyhK0925bX4zz3LLD903HZectExoCXSYb0&s=IyDK51RyGNX57v0DHQQC9TCYv36x2hRZbcHbpRIJLQexo1kr-wV_36gAWMApounOV6NaP-b3jl32UD7UFU1Od85vg73IFafFcYjEGlHsUwrvlYbmU8ipNGvxPq6_9bshtlZL7yBXodnRsOxSpX3gB371xwZOc0cMr1lODwWpSTzi8vs0_KuOq7rar-R-jHVP5aCeiKiwkEDudN5uMSRtZ82tQnrbhhvjEGYtjj8Jqj6rxOW9KMn3x_RZTosj3-WAs_OlcC--_CZghxej1MRiVeZjok0V3_I0zmU-yV8l9O9cy_X5nhNY1bwngUI1XtwK3zT8ckOO4b2JcpjfQm80aA&h=AIcSRoF0WW3ps06kYk7_hUVD33d7FN3VUJ6yP0IbFvQ" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "d4bfba39-f915-462c-b933-f4d0c1b54dd2" + ], + "x-ms-correlation-request-id": [ + "d4bfba39-f915-462c-b933-f4d0c1b54dd2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T154010Z:d4bfba39-f915-462c-b933-f4d0c1b54dd2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 396A1983D36D4029984DA9FD41089610 Ref B: SJC211051205037 Ref C: 2024-03-21T15:40:10Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:40:10 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPT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MDkyNWJYNHp6M0xMRDkwM0haZWN0RXhvQ1hTWWIwJnM9SXlESzUxUnlHTlg1N3YwREhRUUM5VENZdjM2eDJoUlpiY0hicFJJSkxRZXhvMWtyLXdWXzM2Z0FXTUFwb3VuT1Y2TmFQLWIzamwzMlVEN1VGVTFPZDg1dmc3M0lGYWZGY1lqRUdsSHNVd3J2bFlibVU4aXBOR3Z4UHE2Xzlic2h0bFpMN3lCWG9kblJzT3hTcFgzZ0IzNzF4d1pPYzBjTXIxbE9Ed1dwU1R6aTh2czBfS3VPcTdyYXItUi1qSFZQNWFDZWlLaXdrRUR1ZE41dU1TUnRaODJ0UW5yYmhodmpFR1l0amo4SnFqNnJ4T1c5S01uM3hfUlpUb3NqMy1XQXNfT2xjQy0tX0NaZ2h4ZWoxTVJpVmVaam9rMFYzX0kwem1VLXlWOGw5TzljeV9YNW5oTlkxYnduZ1VJMVh0d0szelQ4Y2tPTzRiMkpjcGpmUW04MGFBJmg9QUljU1JvRjBXVzNwczA2a1lrN19oVVZEMzNkN0ZOM1ZVSjZ5UDBJYkZ2UQ==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466324263404661&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRM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l8hHVDhpJxr64cDohqGiLjy7aI6A_zY5ZWzQLMCd_WxuXu6eEc_faoOML9lugh1NkAR2tvKevlf-S2xAELwFyE3Dbrf_JFOuvA8Ny7J5Y47A5GopbtZljdnMXkGfpUECKiaY_q2iLrlSyhK0925bX4zz3LLD903HZectExoCXSYb0&s=XzwPbcL5XdvkY1lMXJfDjAqEiFSFmr1PIx-lIAYes7WbKTLffZmTA6uuemhHs89DlGcSvL0UMlLP0jMXxLVrLJSDFYGFYU--btu1C-Ws3OBlvMWH6n4eDOGY0F4Y-pWdulwSuvdW2YKqpU9UzuDUsXjBedj49_QT6gqwcS_UtT3snc92P7IIzV0kSWMVKlsFWZ9xZjs9EMZUhuFOSBSm56scsF4nl--0iYBUnT2vplUjVwsnPyHhf7d9oB5q6ArYG_1J40yg0J91qfdrkr9QzifXUgZyQTbeDB_FNWUDt42RIfRFOgxzPAnxOihDh0vjgPV1MT_wYH8--Zdo3NO8cg&h=IbWJkj79y7vnEkXD5bXIXr5xxT6tDX7GiRYwZrtOwz4" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "533aecd9-2ea5-49a9-af74-eb6b2992c19e" + ], + "x-ms-correlation-request-id": [ + "533aecd9-2ea5-49a9-af74-eb6b2992c19e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T154026Z:533aecd9-2ea5-49a9-af74-eb6b2992c19e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: B3614886A8D04BF08CAAB72F9BF045A8 Ref B: SJC211051205037 Ref C: 2024-03-21T15:40:26Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:40:25 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466324263404661&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1fEojEYKGj84-8gHXFveahRVa6ZPij7XMWfXQZWdo2aj6sMRX8UCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm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i1TMnhBRUx3RnlFM0RicmZfSkZPdXZBOE55N0o1WTQ3QTVHb3BidFpsamRuTVhrR2ZwVUVDS2lhWV9xMmlMcmxTeWhLMDkyNWJYNHp6M0xMRDkwM0haZWN0RXhvQ1hTWWIwJnM9WHp3UGJjTDVYZHZrWTFsTVhKZkRqQXFFaUZTRm1yMVBJeC1sSUFZZXM3V2JLVExmZlptVEE2dXVlbWhIczg5RGxHY1N2TDBVTWxMUDBqTVh4TFZyTEpTREZZR0ZZVS0tYnR1MUMtV3MzT0Jsdk1XSDZuNGVET0dZMEY0WS1wV2R1bHdTdXZkVzJZS3FwVTlVenVEVXNYakJlZGo0OV9RVDZncXdjU19VdFQzc25jOTJQN0lJelYwa1NXTVZLbHNGV1o5eFpqczlFTVpVaHVGT1NCU201NnNjc0Y0bmwtLTBpWUJVblQydnBsVWpWd3NuUHlIaGY3ZDlvQjVxNkFyWUdfMUo0MHlnMEo5MXFmZHJrcjlRemlmWFVnWnlRVGJlREJfRk5XVUR0NDJSSWZSRk9neHpQQW54T2loRGgwdmpnUFYxTVRfd1lIOC0tWmRvM05POGNnJmg9SWJXSmtqNzl5N3ZuRWtYRDViWElYcjV4eFQ2dERYN0dpUll3WnJ0T3d6NA==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466324417399912&c=MIIHADCCBeigAwI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jW1rd15-n3LCXGb_SUGAoJ2QjX_OAXbzgS4slLZCIe0zJCKCEvv7NUTzNo6MvpD3KUxAAbKf7XDOl8hHVDhpJxr64cDohqGiLjy7aI6A_zY5ZWzQLMCd_WxuXu6eEc_faoOML9lugh1NkAR2tvKevlf-S2xAELwFyE3Dbrf_JFOuvA8Ny7J5Y47A5GopbtZljdnMXkGfpUECKiaY_q2iLrlSyhK0925bX4zz3LLD903HZectExoCXSYb0&s=QmfrqwKChd7M-DbNpLDRACsugRoB_JQpg3ijTQjZxcUjEij2XsOeTaSff5KdXsj1CabY4oOw7djyqQEekYNEvygZEki0o5J2bI8BwK7XaWjxtE0p1g7VPoZcOy6fOBQ3boQR9MO_sUYfn3h-W6DGcYH6_WEWXNHVLoYfpPqey6Xvs9vlPSaMgnXIln6hSF2AXJ_pQ8kEMyc1gGvgWJVIvETqFstrWqGiHuXeQGzyJTrlPj9qs0T9vMoSa_9ecxM7L0gzeFkT90-8-_skMdNumL_s3wezBrL-wTJowhfQT6LE-gr85OBf4wD6-3TefXkAjFLgf3NViBkFrDQUmuZfFw&h=3B_5Jgv8Y6vtJsvISsh09JroQA8dEx42dQbmRiZfljo" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "8e8e6b58-12ef-4126-944a-347f5e8e1a07" + ], + "x-ms-correlation-request-id": [ + "8e8e6b58-12ef-4126-944a-347f5e8e1a07" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T154041Z:8e8e6b58-12ef-4126-944a-347f5e8e1a07" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 548106E822AA490095C2E6692863966E Ref B: SJC211051205037 Ref C: 2024-03-21T15:40:41Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:40:41 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466324417399912&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1fEojEYKGj84-8gHXFveahRVa6ZPij7XMWfXQZWdo2aj6sMRX8UCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0S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Wld6UUxNQ2RfV3h1WHU2ZUVjX2Zhb09NTDlsdWdoMU5rQVIydHZLZXZsZi1TMnhBRUx3RnlFM0RicmZfSkZPdXZBOE55N0o1WTQ3QTVHb3BidFpsamRuTVhrR2ZwVUVDS2lhWV9xMmlMcmxTeWhLMDkyNWJYNHp6M0xMRDkwM0haZWN0RXhvQ1hTWWIwJnM9UW1mcnF3S0NoZDdNLURiTnBMRFJBQ3N1Z1JvQl9KUXBnM2lqVFFqWnhjVWpFaWoyWHNPZVRhU2ZmNUtkWHNqMUNhYlk0b093N2RqeXFRRWVrWU5FdnlnWkVraTBvNUoyYkk4QndLN1hhV2p4dEUwcDFnN1ZQb1pjT3k2Zk9CUTNib1FSOU1PX3NVWWZuM2gtVzZER2NZSDZfV0VXWE5IVkxvWWZwUHFleTZYdnM5dmxQU2FNZ25YSWxuNmhTRjJBWEpfcFE4a0VNeWMxZ0d2Z1dKVkl2RVRxRnN0cldxR2lIdVhlUUd6eUpUcmxQajlxczBUOXZNb1NhXzllY3hNN0wwZ3plRmtUOTAtOC1fc2tNZE51bUxfczN3ZXpCckwtd1RKb3doZlFUNkxFLWdyODVPQmY0d0Q2LTNUZWZYa0FqRkxnZjNOVmlCa0ZyRFFVbXVaZkZ3Jmg9M0JfNUpndjhZNnZ0SnN2SVNzaDA5SnJvUUE4ZEV4NDJkUWJtUmlaZmxqbw==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVA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O3pX2IJsz5n5bMuVN0DqeMoBkFFfk4UWmFDChWzbFNYlcFaVFC2RHGlRYoa4Shec_5_9qIkBA7MbjW1rd15-n3LCXGb_SUGAoJ2QjX_OAXbzgS4slLZCIe0zJCKCEvv7NUTzNo6MvpD3KUxAAbKf7XDOl8hHVDhpJxr64cDohqGiLjy7aI6A_zY5ZWzQLMCd_WxuXu6eEc_faoOML9lugh1NkAR2tvKevlf-S2xAELwFyE3Dbrf_JFOuvA8Ny7J5Y47A5GopbtZljdnMXkGfpUECKiaY_q2iLrlSyhK0925bX4zz3LLD903HZectExoCXSYb0&s=rEKcvB9-jHj7PGh0wWxrac7VQ9rnoKowoH35P64zu8dxEvRv4uiRg2PNs465dyfOdgcRlj7vxBYJsPz1LoOfUEBdhQPKV4XxT-Eo3aoP6KS8lB-TMidifi2cHc7n3q6xt0bj7BQcUF1DQBPj0kqunO2UnPs-Ct5WvKJZktK57XZjsSb7RCimwGTrOG-PrPGhGQPH9hIpbJOVYLFVKE9pyD71pi9zdE52ZOI0avqOAK1TUa7542QSL_19yxG5twaBFehWaFHzRUkXdge7EETAfEqRIGt07gIfnWe2OZr0bO3vlj5oOOZ2EtXALtPCLYYeaqAmPKjMK-m6I_GixcZ4LA&h=8oVOGYCKfnO4w7UYh277kjEyAG2TgL1OlyvdpGxGdlE" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "4fda5932-b014-4f09-9925-4556e4aa2ab6" + ], + "x-ms-correlation-request-id": [ + "4fda5932-b014-4f09-9925-4556e4aa2ab6" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T154057Z:4fda5932-b014-4f09-9925-4556e4aa2ab6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 4E7C1B2F664D4069948E47356B8C5E9F Ref B: SJC211051205037 Ref C: 2024-03-21T15:40:56Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:40:56 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466324571597419&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1fEojEYKGj84-8gHXFveahRVa6ZPij7XMWfXQZWdo2aj6sMRX8UCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQU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KQ0tDRXZ2N05VVHpObzZNdnBEM0tVeEFBYktmN1hET2w4aEhWRGhwSnhyNjRjRG9ocUdpTGp5N2FJNkFfelk1Wld6UUxNQ2RfV3h1WHU2ZUVjX2Zhb09NTDlsdWdoMU5rQVIydHZLZXZsZi1TMnhBRUx3RnlFM0RicmZfSkZPdXZBOE55N0o1WTQ3QTVHb3BidFpsamRuTVhrR2ZwVUVDS2lhWV9xMmlMcmxTeWhLMDkyNWJYNHp6M0xMRDkwM0haZWN0RXhvQ1hTWWIwJnM9ckVLY3ZCOS1qSGo3UEdoMHdXeHJhYzdWUTlybm9Lb3dvSDM1UDY0enU4ZHhFdlJ2NHVpUmcyUE5zNDY1ZHlmT2RnY1Jsajd2eEJZSnNQejFMb09mVUVCZGhRUEtWNFh4VC1FbzNhb1A2S1M4bEItVE1pZGlmaTJjSGM3bjNxNnh0MGJqN0JRY1VGMURRQlBqMGtxdW5PMlVuUHMtQ3Q1V3ZLSlprdEs1N1haanNTYjdSQ2ltd0dUck9HLVByUEdoR1FQSDloSXBiSk9WWUxGVktFOXB5RDcxcGk5emRFNTJaT0kwYXZxT0FLMVRVYTc1NDJRU0xfMTl5eEc1dHdhQkZlaFdhRkh6UlVrWGRnZTdFRVRBZkVxUklHdDA3Z0lmbldlMk9acjBiTzN2bGo1b09PWjJFdFhBTHRQQ0xZWWVhcUFtUEtqTUstbTZJX0dpeGNaNExBJmg9OG9WT0dZQ0tmbk80dzdVWWgyNzdrakV5QUcyVGdMMU9seXZkcEd4R2RsRQ==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115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NVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAF9wsVY5GPv3eQNDdOO3pX2IJsz5n5bMuVN0DqeMoBkFFfk4UWmFDChWzbFNYlcFaVFC2RHGlRYoa4Shec_5_9qIkBA7MbjW1rd15-n3LCXGb_SUGAoJ2QjX_OAXbzgS4slLZCIe0zJCKCEvv7NUTzNo6MvpD3KUxAAbKf7XDOl8hHVDhpJxr64cDohqGiLjy7aI6A_zY5ZWzQLMCd_WxuXu6eEc_faoOML9lugh1NkAR2tvKevlf-S2xAELwFyE3Dbrf_JFOuvA8Ny7J5Y47A5GopbtZljdnMXkGfpUECKiaY_q2iLrlSyhK0925bX4zz3LLD903HZectExoCXSYb0&s=NILq5ubu2Pn0HUPySwvgYJIiLhmo_G5O07mJy0gBjw1fE-MX-ixMhjYA1ThtXocnai8_vr1PF3cIXXjAN9tv6VtrLDXEJURg07cx8d0p_yUZvbNlWht4K8DR35iI5Vo3yk0MAD4JFhJvxHN7_ocPZWcRL1B04oWxMRrD1voOhMvUYNkPKnGop31MvvzeuE49lP3WCplYAFOmPBSoujtrLkjzcc67K_Rc3aCJQVQcOvKCLxjW5Mr4BRxB4Ak-zzcoq1KTFc165BdzkS7R7VKHgXrYUfsiQjHpsrjIzIDXUG6uS5nMJCwuWSc1sOxN-A3jOUGfQIDUHP2uopHk74KPiA&h=ozafAuSBt1X9a6zGuy-zR8X-o_xnlb8-EoSHPFMRG7A" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-request-id": [ + "c29b1eab-9385-4b91-80d0-0286d4a5a7bb" + ], + "x-ms-correlation-request-id": [ + "c29b1eab-9385-4b91-80d0-0286d4a5a7bb" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T154112Z:c29b1eab-9385-4b91-80d0-0286d4a5a7bb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 7317979CF6E94226ADAD4EEB7DAEED00 Ref B: SJC211051205037 Ref C: 2024-03-21T15:41:12Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:41:11 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466324725571363&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1fEojEYKGj84-8gHXFveahRVa6ZPij7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GQzJSSEdsUllvYTRTaGVjXzVfOXFJa0JBN01ialcxcmQxNS1uM0xDWEdiX1NVR0FvSjJRalhfT0FYYnpnUzRzbExaQ0llMHpKQ0tDRXZ2N05VVHpObzZNdnBEM0tVeEFBYktmN1hET2w4aEhWRGhwSnhyNjRjRG9ocUdpTGp5N2FJNkFfelk1Wld6UUxNQ2RfV3h1WHU2ZUVjX2Zhb09NTDlsdWdoMU5rQVIydHZLZXZsZi1TMnhBRUx3RnlFM0RicmZfSkZPdXZBOE55N0o1WTQ3QTVHb3BidFpsamRuTVhrR2ZwVUVDS2lhWV9xMmlMcmxTeWhLMDkyNWJYNHp6M0xMRDkwM0haZWN0RXhvQ1hTWWIwJnM9TklMcTV1YnUyUG4wSFVQeVN3dmdZSklpTGhtb19HNU8wN21KeTBnQmp3MWZFLU1YLWl4TWhqWUExVGh0WG9jbmFpOF92cjFQRjNjSVhYakFOOXR2NlZ0ckxEWEVKVVJnMDdjeDhkMHBfeVVadmJObFdodDRLOERSMzVpSTVWbzN5azBNQUQ0SkZoSnZ4SE43X29jUFpXY1JMMUIwNG9XeE1SckQxdm9PaE12VVlOa1BLbkdvcDMxTXZ2emV1RTQ5bFAzV0NwbFlBRk9tUEJTb3VqdHJMa2p6Y2M2N0tfUmMzYUNKUVZRY092S0NMeGpXNU1yNEJSeEI0QWstenpjb3ExS1RGYzE2NUJkemtTN1I3VktIZ1hyWVVmc2lRakhwc3JqSXpJRFhVRzZ1UzVuTUpDd3VXU2Mxc094Ti1BM2pPVUdmUUlEVUhQMnVvcEhrNzRLUGlBJmg9b3phZkF1U0J0MVg5YTZ6R3V5LXpSOFgtb194bmxiOC1Fb1NIUEZNUkc3QQ==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466324879111492&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1fEojEYKGj84-8gHXFveahRVa6ZPij7XMWfXQZWdo2aj6sMRX8UCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBgg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DUuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAF9wsVY5GPv3eQNDdOO3pX2IJsz5n5bMuVN0DqeMoBkFFfk4UWmFDChWzbFNYlcFaVFC2RHGlRYoa4Shec_5_9qIkBA7MbjW1rd15-n3LCXGb_SUGAoJ2QjX_OAXbzgS4slLZCIe0zJCKCEvv7NUTzNo6MvpD3KUxAAbKf7XDOl8hHVDhpJxr64cDohqGiLjy7aI6A_zY5ZWzQLMCd_WxuXu6eEc_faoOML9lugh1NkAR2tvKevlf-S2xAELwFyE3Dbrf_JFOuvA8Ny7J5Y47A5GopbtZljdnMXkGfpUECKiaY_q2iLrlSyhK0925bX4zz3LLD903HZectExoCXSYb0&s=xIR9bFltte_2YuYd_J-yPtTDtZCYn1z9sh97XN5vKwrKr7tVv-3ONoYDKoBHOaX5aAyV2jD_GlvTbzOTixGd6HzR9h_-F6aKtVx3g2NurqrJLN18FAiHJARRynMSCxiZkGDnIrUwnTUBLLPuzohFXJQaTVrQV4RZVAfKrP1AuXGYErBcAAe4rXer8MZO6h3LG5bp09C5PUQ7hwxjq0Gei3nyFBiIzOfEIqu0ow-tSPCgHv5FPipHwKq02l2k7adOjYuBIL3JLPphAUmtciDFABbe9LQA_zo1KxYJa53B4_ONxLUt8w9vCqpW10VxlEhpkcnikVhnoAfrvU3Go1DRaQ&h=cCHe67Xm0fPGCYtGc_mxr20bXcgWscEZ28y0gMM4XnU" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "ada82df5-e716-4331-9eee-b77400785772" + ], + "x-ms-correlation-request-id": [ + "ada82df5-e716-4331-9eee-b77400785772" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T154127Z:ada82df5-e716-4331-9eee-b77400785772" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: A5EC3EB32FCA469CB07FEA3821A6EAAA Ref B: SJC211051205037 Ref C: 2024-03-21T15:41:27Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:41:27 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466324879111492&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpY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BYMklKc3o1bjViTXVWTjBEcWVNb0JrRkZmazRVV21GRENoV3piRk5ZbGNGYVZGQzJSSEdsUllvYTRTaGVjXzVfOXFJa0JBN01ialcxcmQxNS1uM0xDWEdiX1NVR0FvSjJRalhfT0FYYnpnUzRzbExaQ0llMHpKQ0tDRXZ2N05VVHpObzZNdnBEM0tVeEFBYktmN1hET2w4aEhWRGhwSnhyNjRjRG9ocUdpTGp5N2FJNkFfelk1Wld6UUxNQ2RfV3h1WHU2ZUVjX2Zhb09NTDlsdWdoMU5rQVIydHZLZXZsZi1TMnhBRUx3RnlFM0RicmZfSkZPdXZBOE55N0o1WTQ3QTVHb3BidFpsamRuTVhrR2ZwVUVDS2lhWV9xMmlMcmxTeWhLMDkyNWJYNHp6M0xMRDkwM0haZWN0RXhvQ1hTWWIwJnM9eElSOWJGbHR0ZV8yWXVZZF9KLXlQdFREdFpDWW4xejlzaDk3WE41dkt3cktyN3RWdi0zT05vWURLb0JIT2FYNWFBeVYyakRfR2x2VGJ6T1RpeEdkNkh6UjloXy1GNmFLdFZ4M2cyTnVycXJKTE4xOEZBaUhKQVJSeW5NU0N4aVprR0RuSXJVd25UVUJMTFB1em9oRlhKUWFUVnJRVjRSWlZBZktyUDFBdVhHWUVyQmNBQWU0clhlcjhNWk82aDNMRzVicDA5QzVQVVE3aHd4anEwR2VpM255RkJpSXpPZkVJcXUwb3ctdFNQQ2dIdjVGUGlwSHdLcTAybDJrN2FkT2pZdUJJTDNKTFBwaEFVbXRjaURGQUJiZTlMUUFfem8xS3hZSmE1M0I0X09OeExVdDh3OXZDcXBXMTBWeGxFaHBrY25pa1Zobm9BZnJ2VTNHbzFEUmFRJmg9Y0NIZTY3WG0wZlBHQ1l0R2NfbXhyMjBiWGNnV3NjRVoyOHkwZ01NNFhuVQ==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466325032940108&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1fEojEYKGj84-8gHXFveahRVa6ZPij7XMWfXQZWdo2aj6sMRX8UCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCN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RwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAF9wsVY5GPv3eQNDdOO3pX2IJsz5n5bMuVN0DqeMoBkFFfk4UWmFDChWzbFNYlcFaVFC2RHGlRYoa4Shec_5_9qIkBA7MbjW1rd15-n3LCXGb_SUGAoJ2QjX_OAXbzgS4slLZCIe0zJCKCEvv7NUTzNo6MvpD3KUxAAbKf7XDOl8hHVDhpJxr64cDohqGiLjy7aI6A_zY5ZWzQLMCd_WxuXu6eEc_faoOML9lugh1NkAR2tvKevlf-S2xAELwFyE3Dbrf_JFOuvA8Ny7J5Y47A5GopbtZljdnMXkGfpUECKiaY_q2iLrlSyhK0925bX4zz3LLD903HZectExoCXSYb0&s=p2Pg6zIYg1fcKDsD-4cxR3_p-Gk-jS4pvg3RKr5IztFPf4FfOnfz0sCOk5Rq2ZYzOlWX95DcBGb6Q7yokAmg2HXVwom69KGQecMKTZEiNw1S5fTkPx3s5l0gnaOhj5QDWLZ-FOf1dszwru9kfGAXXfbo6kZywnnL2uI6KnEmkZ53p3LqULIFiqHc_Yn7NggutC3_TRNxcQME_x0wG_whqj_eYTo6wahisGbx1xGMV1DrZ4JEtxsXB7mMmGo9hNO3uFhW7xUwhH4hVyNKS4sOH07xq5RNP5wd2kiSoUKFvgE8wHLnL1YYmFobz1tiyIksob6sxn6eUsJRAwRsyaAl3A&h=cgGlMdvgsrRHpGQMYgNx9yEMVlz2whsYJkBwXrw1GQk" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "7a710a95-c72f-4c2c-836d-4f65753cb6b3" + ], + "x-ms-correlation-request-id": [ + "7a710a95-c72f-4c2c-836d-4f65753cb6b3" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T154143Z:7a710a95-c72f-4c2c-836d-4f65753cb6b3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 62480CE3AB5A4325AADEE4FD5BAF09C9 Ref B: SJC211051205037 Ref C: 2024-03-21T15:41:42Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:41:42 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466325032940108&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21i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ET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466325186666742&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1fEojEYKGj84-8gHXFveahRVa6ZPij7XMWfXQZWdo2aj6sMRX8UCAwEAAaOCA-0wgg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-reads": [ + "11999" + ], + "x-ms-request-id": [ + "c1b2e64c-42a2-47b7-8554-5a991d03ba6c" + ], + "x-ms-correlation-request-id": [ + "c1b2e64c-42a2-47b7-8554-5a991d03ba6c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T154158Z:c1b2e64c-42a2-47b7-8554-5a991d03ba6c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: F314105F56E848B18CB474E33C8E2D46 Ref B: SJC211051205037 Ref C: 2024-03-21T15:41:58Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:41:58 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466325186666742&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-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FMUms2THgwVnd4RnltaDIyQkZxSUFxUWRzRVB3N0tDd2xEQmljVTZPUQ==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466325341591533&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX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LhxTxSQmRaW-xPCoktQaUyCooak" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "17222b69-5a79-4b8f-b98e-416f0817e161" + ], + "x-ms-correlation-request-id": [ + "17222b69-5a79-4b8f-b98e-416f0817e161" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T154214Z:17222b69-5a79-4b8f-b98e-416f0817e161" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: E113B7264FFA4C7A9215A8A097894C55 Ref B: SJC211051205037 Ref C: 2024-03-21T15:42:13Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:42:13 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466325341591533&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ck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5EWk4yWklIYjM1d2U0YzQzUWRpRldnWTZzVmdVTndBeFZ1T01vSk93Jmg9Tk8wTzdBODFtMko0Z3lKVExoeFR4U1FtUmFXLXhQQ29rdFFhVXlDb29haw==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466325495996505&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4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gBcBOfWH-v2YZqkatkE_v46QBSC4fHM-b32qnsjuyA&h=QbWekpPcyl-wmHWRomGqstmmGW0_DLJNRiWuSvJCYOs" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-request-id": [ + "e9f41b46-721c-4fe7-8172-bc4e59c2f31f" + ], + "x-ms-correlation-request-id": [ + "e9f41b46-721c-4fe7-8172-bc4e59c2f31f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T154229Z:e9f41b46-721c-4fe7-8172-bc4e59c2f31f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: ECEE9B1A665E4652A42B46B4FA1969F8 Ref B: SJC211051205037 Ref C: 2024-03-21T15:42:29Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:42:29 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466325495996505&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLm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wZ1VYQ3pNVjVzNXZOUzNEcVNoTzVjajA1Mmk1TkZEYTZEWHhScG9EaGRwbUJPd1g4dVVwZ0JjQk9mV0gtdjJZWnFrYXRrRV92NDZRQlNDNGZITS1iMzJxbnNqdXlBJmg9UWJXZWtwUGN5bC13bUhXUm9tR3FzdG1tR1cwX0RMSk5SaVd1U3ZKQ1lPcw==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466325651584364&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlof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nDLKFWweWvKi-ubLUFPV4WOsMen66BYaJ1ITeFiVRS6RuAS4nXekZdaOvA5T_haigWDWW6sNw7mdD8Yo_mCMqtTstNRCRZIOEVNUeY2mSKlHayVVS5Qpz_f_gMS99IrA&h=_Rlx59optAV5-sqT6OO10-J8YoLZ6DcHNGot_Bh3T_A" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "266473a9-8d44-4efb-9d6e-8e50f0c6d17e" + ], + "x-ms-correlation-request-id": [ + "266473a9-8d44-4efb-9d6e-8e50f0c6d17e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T154245Z:266473a9-8d44-4efb-9d6e-8e50f0c6d17e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 140679032A0D4040952B30A267E3A45C Ref B: SJC211051205037 Ref C: 2024-03-21T15:42:44Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:42:44 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466325651584364&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4w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AxWk5xelpMcGk5cHZRTHhoUllsc0pNakhITGRfdG5ETEtGV3dlV3ZLaS11YkxVRlBWNFdPc01lbjY2QllhSjFJVGVGaVZSUzZSdUFTNG5YZWtaZGFPdkE1VF9oYWlnV0RXVzZzTnc3bWREOFlvX21DTXF0VHN0TlJDUlpJT0VWTlVlWTJtU0tsSGF5VlZTNVFwel9mX2dNUzk5SXJBJmg9X1JseDU5b3B0QVY1LXNxVDZPTzEwLUo4WW9MWjZEY0hOR290X0JoM1RfQQ==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466325805586434&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f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ogsrTRFYpGlkv8mrhbzgbsH7ygk7R3sPPgKhtWPOpFE5RilgIjBVJmq6_U-ds5C7CQ83wuctoYHzTcTDbnHhHX3NDFV6V8TYlqtahtiLffn7f8hduiL1kgnqrYucGATbe3SBnOdMseX-j9oPAqY5DPpML2cZe8zTA-xkM_AgsDkhjAsYix89MvDttVOFulTB79T8BIJZG4KdQ&h=b7by4dGGpyPVotC1r0DCH_Vj_cOYWStMO6LJoWFNark" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "59de1564-be6f-49d4-b337-431c4a3ea770" + ], + "x-ms-correlation-request-id": [ + "59de1564-be6f-49d4-b337-431c4a3ea770" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T154300Z:59de1564-be6f-49d4-b337-431c4a3ea770" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 637F8CF4E1144DD1A2539951D6AC3FFF Ref B: SJC211051205037 Ref C: 2024-03-21T15:43:00Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:42:59 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466325805586434&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5m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NyVFJGWXBHbGt2OG1yaGJ6Z2JzSDd5Z2s3UjNzUFBnS2h0V1BPcEZFNVJpbGdJakJWSm1xNl9VLWRzNUM3Q1E4M3d1Y3RvWUh6VGNURGJuSGhIWDNOREZWNlY4VFlscXRhaHRpTGZmbjdmOGhkdWlMMWtnbnFyWXVjR0FUYmUzU0JuT2RNc2VYLWo5b1BBcVk1RFBwTUwyY1plOHpUQS14a01fQWdzRGtoakFzWWl4ODlNdkR0dFZPRnVsVEI3OVQ4QklKWkc0S2RRJmg9YjdieTRkR0dweVBWb3RDMXIwRENIX1ZqX2NPWVdTdE1PNkxKb1dGTmFyaw==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466325959319657&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBA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nwjyM6rjEqCOblQnbH261pOZnY1KuLaW1E8IEqF47AaeeIpsR3QcZWgYnFY03UvfNE7VegiJkkIKd8eUw6n6wAeHl6RESBhHPryTOIYLQtTLlhrlLgT6SEfRV6Nn6wL3pIpyXRCcY1oo4o7B7lOK8XjE0XKArtCTDUaufqejtN9gbt0sY3hd4H14lBEx3YXqzID-Bg6I3hVjgD2s8DBgcnr37D2LLmn-gHdA8N_rcBgu06d9fnQMpy9UquU1e1MJkpBnnUS6lgSKw&h=3fUtmILyTYbU8JdpNxrzk4e6XI5j0w3J1dNkgp9mDs0" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "e276a747-3654-4d0e-bd0e-b2137101abd4" + ], + "x-ms-correlation-request-id": [ + "e276a747-3654-4d0e-bd0e-b2137101abd4" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T154315Z:e276a747-3654-4d0e-bd0e-b2137101abd4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 38D39968C27342DE99FA88CA5DC578E2 Ref B: SJC211051205037 Ref C: 2024-03-21T15:43:15Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:43:15 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466325959319657&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZ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UW5iSDI2MXBPWm5ZMUt1TGFXMUU4SUVxRjQ3QWFlZUlwc1IzUWNaV2dZbkZZMDNVdmZORTdWZWdpSmtrSUtkOGVVdzZuNndBZUhsNlJFU0JoSFByeVRPSVlMUXRUTGxocmxMZ1Q2U0VmUlY2Tm42d0wzcElweVhSQ2NZMW9vNG83QjdsT0s4WGpFMFhLQXJ0Q1REVWF1ZnFlanROOWdidDBzWTNoZDRIMTRsQkV4M1lYcXpJRC1CZzZJM2hWamdEMnM4REJnY25yMzdEMkxMbW4tZ0hkQThOX3JjQmd1MDZkOWZuUU1weTlVcXVVMWUxTUprcEJublVTNmxnU0t3Jmg9M2ZVdG1JTHlUWWJVOEpkcE54cnprNGU2WEk1ajB3M0oxZE5rZ3A5bURzMA==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466326113496913&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5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wMVZRCrKhqc-et1gxXaFWSGgtyuSF9RYG5dipruTA4B1EnetiGSvtdIgxyGAr-pBtj8ASRugw24efSlLA7rNz-U4UETSayQ1JPYxiOxemOVMvB9pl2rXW4yKn5ZsTNjei1cWg4shM33_-W814mHzvcLPKY5NoTxilEIFlqlDg-9ZXrH3OHiNBirbzgaSDgnVkZSqHC1pmRpf8kzzXin8a3FB8u4AGG6BH_vIGIiyp3MTF5AxAqz6d7IdOmVPuLvfFOiPmJksHexzcpzabkxrDjPaBd1ptlZIJua9wDlKeUtV0vg9j_oXxjSELhB4Xk9zMOTBR34QY3HDFVwGmjpg&h=DaiUlthD9NA9F1Gg3mPr-uJ8gCBbGkMQUp5e1f4BE6A" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "a4a709d0-64c3-43a2-8f21-578045f8fa16" + ], + "x-ms-correlation-request-id": [ + "a4a709d0-64c3-43a2-8f21-578045f8fa16" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T154331Z:a4a709d0-64c3-43a2-8f21-578045f8fa16" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: DCFB6061E4A44E6CA07BBE73CD00826C Ref B: SJC211051205037 Ref C: 2024-03-21T15:43:31Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:43:30 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466326113496913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VTRjlSWUc1ZGlwcnVUQTRCMUVuZXRpR1N2dGRJZ3h5R0FyLXBCdGo4QVNSdWd3MjRlZlNsTEE3ck56LVU0VUVUU2F5UTFKUFl4aU94ZW1PVk12QjlwbDJyWFc0eUtuNVpzVE5qZWkxY1dnNHNoTTMzXy1XODE0bUh6dmNMUEtZNU5vVHhpbEVJRmxxbERnLTlaWHJIM09IaU5CaXJiemdhU0RnblZrWlNxSEMxcG1ScGY4a3p6WGluOGEzRkI4dTRBR0c2QkhfdklHSWl5cDNNVEY1QXhBcXo2ZDdJZE9tVlB1THZmRk9pUG1Ka3NIZXh6Y3B6YWJreHJEalBhQmQxcHRsWklKdWE5d0RsS2VVdFYwdmc5al9vWHhqU0VMaEI0WGs5ek1PVEJSMzRRWTNIREZWd0dtanBnJmg9RGFpVWx0aEQ5TkE5RjFHZzNtUHItdUo4Z0NCYkdrTVFVcDVlMWY0QkU2QQ==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466326267038014&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcN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f_JFOuvA8Ny7J5Y47A5GopbtZljdnMXkGfpUECKiaY_q2iLrlSyhK0925bX4zz3LLD903HZectExoCXSYb0&s=yBcZ8d4pKyOWZQpN_2pZfjvMmW9PvHOAnO5CIIDWqLTARVl6tdjiITboyPy_txoIFTOtHofd5Zqp9OFk3S4Q251JOOnVB7nJv0ZYyXXFcfL0U_LCMO93VVYRJAOF7zxHopcnvnl18JJt-U14eg9OimiF1AhhItdLDPsgzBhsuQNnU-ZSexNHIlOMC_5ac6JZLt5S6gdGN-LfYYiXN6h5_whS6J2myn8jYT-UDNBTNGyArkBoTWNrCEzT_YkLopQrWU6Behezw58EG-Mcj8aZ8ABolCloh1CRuet8VGRWyQS40uFJFVato748cqEUYk941G8xcl8xJGT1tDQNWtUfmQ&h=KWhQcGMedRYNSBI3DU7BbZWd_d4bZg0ojfzLY0_k7Kg" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "0a1e5ce9-aa0c-489d-be5a-2085de01d400" + ], + "x-ms-correlation-request-id": [ + "0a1e5ce9-aa0c-489d-be5a-2085de01d400" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T154346Z:0a1e5ce9-aa0c-489d-be5a-2085de01d400" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: DAF2826E88674F8EAEBB316F73ECBBB5 Ref B: SJC211051205037 Ref C: 2024-03-21T15:43:46Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:43:46 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QU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JYNHp6M0xMRDkwM0haZWN0RXhvQ1hTWWIwJnM9eUJjWjhkNHBLeU9XWlFwTl8ycFpmanZNbVc5UHZIT0FuTzVDSUlEV3FMVEFSVmw2dGRqaUlUYm95UHlfdHhvSUZUT3RIb2ZkNVpxcDlPRmszUzRRMjUxSk9PblZCN25KdjBaWXlYWEZjZkwwVV9MQ01POTNWVllSSkFPRjd6eEhvcGNudm5sMThKSnQtVTE0ZWc5T2ltaUYxQWhoSXRkTERQc2d6QmhzdVFOblUtWlNleE5ISWxPTUNfNWFjNkpaTHQ1UzZnZEdOLUxmWVlpWE42aDVfd2hTNkoybXluOGpZVC1VRE5CVE5HeUFya0JvVFdOckNFelRfWWtMb3BRcldVNkJlaGV6dzU4RUctTWNqOGFaOEFCb2xDbG9oMUNSdWV0OFZHUld5UVM0MHVGSkZWYXRvNzQ4Y3FFVVlrOTQxRzh4Y2w4eEpHVDF0RFFOV3RVZm1RJmg9S1doUWNHTWVkUllOU0JJM0RVN0JiWldkX2Q0YlpnMG9qZnpMWTBfazdLZw==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466326421262559&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGR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Ljy7aI6A_zY5ZWzQLMCd_WxuXu6eEc_faoOML9lugh1NkAR2tvKevlf-S2xAELwFyE3Dbrf_JFOuvA8Ny7J5Y47A5GopbtZljdnMXkGfpUECKiaY_q2iLrlSyhK0925bX4zz3LLD903HZectExoCXSYb0&s=tKYvei7z5U_Lq7WJqjer8_GQGSxtUeeOJYE38h9ncu2DEsQiK-0us6BpcbE7V9jolDPBjnyJ60O5Y4PpEwLFQt5NDNh6uwVXeBbmZYfvdS82nr7JieeK2G-ihG1_F9FmUw9r0pJMElkKPnOMVrPyUJlYeHe3NF9pwnt6BIH0BbPt6Q9KwGKfBmhj8Je9E5TW4prJu2PDmEa4Lpwke4ALKAIaVSPRUMLpNXfMnmpktYU-LpJdgS2ydlXOEjvwO23WL1VOrP0JOq6mGX4NNuBpahOiQMk_zJKkxZLmRzjdwW9h8cLxPA3Ubm9iZdAuIjtc-IpzZRK-0sQd7rqyTa3lsg&h=4K6pC3gypi2KG8imXslTsWaawOZpFy3kmx3miRtzIwM" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "a9f52573-0eaa-4aee-baac-4691ce997bc0" + ], + "x-ms-correlation-request-id": [ + "a9f52573-0eaa-4aee-baac-4691ce997bc0" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T154402Z:a9f52573-0eaa-4aee-baac-4691ce997bc0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 13A57952D8EC4338A32160BE3821E9C1 Ref B: SJC211051205037 Ref C: 2024-03-21T15:44:01Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:44:01 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02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lFM0RicmZfSkZPdXZBOE55N0o1WTQ3QTVHb3BidFpsamRuTVhrR2ZwVUVDS2lhWV9xMmlMcmxTeWhLMDkyNWJYNHp6M0xMRDkwM0haZWN0RXhvQ1hTWWIwJnM9dEtZdmVpN3o1VV9McTdXSnFqZXI4X0dRR1N4dFVlZU9KWUUzOGg5bmN1MkRFc1FpSy0wdXM2QnBjYkU3Vjlqb2xEUEJqbnlKNjBPNVk0UHBFd0xGUXQ1TkROaDZ1d1ZYZUJibVpZZnZkUzgybnI3SmllZUsyRy1paEcxX0Y5Rm1VdzlyMHBKTUVsa0tQbk9NVnJQeVVKbFllSGUzTkY5cHdudDZCSUgwQmJQdDZROUt3R0tmQm1oajhKZTlFNVRXNHBySnUyUERtRWE0THB3a2U0QUxLQUlhVlNQUlVNTHBOWGZNbm1wa3RZVS1McEpkZ1MyeWRsWE9FanZ3TzIzV0wxVk9yUDBKT3E2bUdYNE5OdUJwYWhPaVFNa196SktreFpMbVJ6amR3VzloOGNMeFBBM1VibTlpWmRBdUlqdGMtSXB6WlJLLTBzUWQ3cnF5VGEzbHNnJmg9NEs2cEMzZ3lwaTJLRzhpbVhzbFRzV2Fhd09acEZ5M2tteDNtaVJ0ekl3TQ==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466326575308311&c=MIIHADCCBeigAwIBAg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rd15-n3LCXGb_SUGAoJ2QjX_OAXbzgS4slLZCIe0zJCKCEvv7NUTzNo6MvpD3KUxAAbKf7XDOl8hHVDhpJxr64cDohqGiLjy7aI6A_zY5ZWzQLMCd_WxuXu6eEc_faoOML9lugh1NkAR2tvKevlf-S2xAELwFyE3Dbrf_JFOuvA8Ny7J5Y47A5GopbtZljdnMXkGfpUECKiaY_q2iLrlSyhK0925bX4zz3LLD903HZectExoCXSYb0&s=n1vgqMJNNmmvYFVQ-jGOmMyK2zt1oD2MSzn8OVyRNBoojra42NzgWiNqxZUI6_VRZHJJPt9u8pwAgFdluhKk2dd0Fxyqp7fMYHpgwzS-6PItUgpbRUz8z9Zu8y3Glvq2zuq2cFJ6Lu9_FeAgRIAVRVZ-MMrVh2GD44m54C8zMjcbpvLDSAeNRpaZFM3KDNQeQ9N3w7p7DOhwLzpodBWOVRmlYYCHrPCu12MaexB_r-YowLdk2QN_XcDitYdB55Zlasmyug6q9RszulyKgiMJ9ORRVLw6LLL7xv056cKkvflcxdMTcWD5dqmpNGpAYhtsfKqLoYn-wCZW9N0Kidh6ig&h=Tg2QVQl3AIJB152SwddyXGhco5Tr3o0w21_EbwAxNzE" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "216e2424-2d58-4f05-9306-88aded4b0d42" + ], + "x-ms-correlation-request-id": [ + "216e2424-2d58-4f05-9306-88aded4b0d42" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T154417Z:216e2424-2d58-4f05-9306-88aded4b0d42" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: FEA7B7C231A842328CA70B73BA028F4C Ref B: SJC211051205037 Ref C: 2024-03-21T15:44:17Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:44:16 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466326575308311&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1fEojEYKGj84-8gHXFveahRVa6ZPij7XMWfXQZWdo2aj6sMRX8UCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0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2FJNkFfelk1Wld6UUxNQ2RfV3h1WHU2ZUVjX2Zhb09NTDlsdWdoMU5rQVIydHZLZXZsZi1TMnhBRUx3RnlFM0RicmZfSkZPdXZBOE55N0o1WTQ3QTVHb3BidFpsamRuTVhrR2ZwVUVDS2lhWV9xMmlMcmxTeWhLMDkyNWJYNHp6M0xMRDkwM0haZWN0RXhvQ1hTWWIwJnM9bjF2Z3FNSk5ObW12WUZWUS1qR09tTXlLMnp0MW9EMk1Tem44T1Z5Uk5Cb29qcmE0Mk56Z1dpTnF4WlVJNl9WUlpISkpQdDl1OHB3QWdGZGx1aEtrMmRkMEZ4eXFwN2ZNWUhwZ3d6Uy02UEl0VWdwYlJVejh6OVp1OHkzR2x2cTJ6dXEyY0ZKNkx1OV9GZUFnUklBVlJWWi1NTXJWaDJHRDQ0bTU0Qzh6TWpjYnB2TERTQWVOUnBhWkZNM0tETlFlUTlOM3c3cDdET2h3THpwb2RCV09WUm1sWVlDSHJQQ3UxMk1hZXhCX3ItWW93TGRrMlFOX1hjRGl0WWRCNTVabGFzbXl1ZzZxOVJzenVseUtnaU1KOU9SUlZMdzZMTEw3eHYwNTZjS2t2ZmxjeGRNVGNXRDVkcW1wTkdwQVlodHNmS3FMb1luLXdDWlc5TjBLaWRoNmlnJmg9VGcyUVZRbDNBSUpCMTUyU3dkZHlYR2hjbzVUcjNvMHcyMV9FYndBeE56RQ==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTV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GPv3eQNDdOO3pX2IJsz5n5bMuVN0DqeMoBkFFfk4UWmFDChWzbFNYlcFaVFC2RHGlRYoa4Shec_5_9qIkBA7MbjW1rd15-n3LCXGb_SUGAoJ2QjX_OAXbzgS4slLZCIe0zJCKCEvv7NUTzNo6MvpD3KUxAAbKf7XDOl8hHVDhpJxr64cDohqGiLjy7aI6A_zY5ZWzQLMCd_WxuXu6eEc_faoOML9lugh1NkAR2tvKevlf-S2xAELwFyE3Dbrf_JFOuvA8Ny7J5Y47A5GopbtZljdnMXkGfpUECKiaY_q2iLrlSyhK0925bX4zz3LLD903HZectExoCXSYb0&s=HJ1jJ0Eg_CZfBszLFrmwrEo7sErWjL5VVd0U1s2chn7jEXc4_EdGvcnaAMbQxv-PyVA1EfbOwYh8lu49VaROZEEiwTj8EKd5-0p5N7Z79T55WNfX0H8Jt4hA9RnqPGIWweaSlAgcDffDPHjVn7G5JV2ciVELpmkcS_g1oN7t2Xg_JKL3buSXZv1oxo2pA5EObKZEAhF-R-gfOhDlrcb9qVOLOFQY9wW_WfAOeWRKdYOUCisvatqJMajdtsQ2w14DmWm_1Tzbj6epQgHFVyLgwhMA_5ba96DhiQWClfjDH5SezN6foRuQ4cXJgJJ-HkFhEbV9HtAw8i34MjTv5Y-hGQ&h=5MZ3YoZ2nEoyQPn55l3Ppfx3GIcR7twB-uoSKV9ATAY" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "655d47de-b4cf-4e07-b382-ec0e09bfa6c9" + ], + "x-ms-correlation-request-id": [ + "655d47de-b4cf-4e07-b382-ec0e09bfa6c9" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T154432Z:655d47de-b4cf-4e07-b382-ec0e09bfa6c9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: E0D6ACAD002E4653B4AED7FC3F13AD7C Ref B: SJC211051205037 Ref C: 2024-03-21T15:44:32Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:44:32 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466326729014280&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1fEojEYKGj84-8gHXFveahRVa6ZPij7XMWfXQZWdo2aj6sMRX8UCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaM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EdiX1NVR0FvSjJRalhfT0FYYnpnUzRzbExaQ0llMHpKQ0tDRXZ2N05VVHpObzZNdnBEM0tVeEFBYktmN1hET2w4aEhWRGhwSnhyNjRjRG9ocUdpTGp5N2FJNkFfelk1Wld6UUxNQ2RfV3h1WHU2ZUVjX2Zhb09NTDlsdWdoMU5rQVIydHZLZXZsZi1TMnhBRUx3RnlFM0RicmZfSkZPdXZBOE55N0o1WTQ3QTVHb3BidFpsamRuTVhrR2ZwVUVDS2lhWV9xMmlMcmxTeWhLMDkyNWJYNHp6M0xMRDkwM0haZWN0RXhvQ1hTWWIwJnM9SEoxakowRWdfQ1pmQnN6TEZybXdyRW83c0VyV2pMNVZWZDBVMXMyY2huN2pFWGM0X0VkR3ZjbmFBTWJReHYtUHlWQTFFZmJPd1loOGx1NDlWYVJPWkVFaXdUajhFS2Q1LTBwNU43Wjc5VDU1V05mWDBIOEp0NGhBOVJucVBHSVd3ZWFTbEFnY0RmZkRQSGpWbjdHNUpWMmNpVkVMcG1rY1NfZzFvTjd0MlhnX0pLTDNidVNYWnYxb3hvMnBBNUVPYktaRUFoRi1SLWdmT2hEbHJjYjlxVk9MT0ZRWTl3V19XZkFPZVdSS2RZT1VDaXN2YXRxSk1hamR0c1EydzE0RG1XbV8xVHpiajZlcFFnSEZWeUxnd2hNQV81YmE5NkRoaVFXQ2xmakRINVNlek42Zm9SdVE0Y1hKZ0pKLUhrRmhFYlY5SHRBdzhpMzRNalR2NVktaEdRJmg9NU1aM1lvWjJuRW95UVBuNTVsM1BwZngzR0ljUjd0d0ItdW9TS1Y5QVRBWQ==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466326882830520&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1fEojEYKGj84-8gHXFveahRVa6ZPij7XMWfXQZWdo2aj6sMRX8UCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3Js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EGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAF9wsVY5GPv3eQNDdOO3pX2IJsz5n5bMuVN0DqeMoBkFFfk4UWmFDChWzbFNYlcFaVFC2RHGlRYoa4Shec_5_9qIkBA7MbjW1rd15-n3LCXGb_SUGAoJ2QjX_OAXbzgS4slLZCIe0zJCKCEvv7NUTzNo6MvpD3KUxAAbKf7XDOl8hHVDhpJxr64cDohqGiLjy7aI6A_zY5ZWzQLMCd_WxuXu6eEc_faoOML9lugh1NkAR2tvKevlf-S2xAELwFyE3Dbrf_JFOuvA8Ny7J5Y47A5GopbtZljdnMXkGfpUECKiaY_q2iLrlSyhK0925bX4zz3LLD903HZectExoCXSYb0&s=RZLM9g-XLCxz2NMQJWqs1dRBdwQSez6SgSkklgCWpkCanzA63fKFgncAtUr4nWD-EfWVpKLwAW7gP1hyBnSvxwAV-17QmF-8Q3oMVvbg-TJbDKaW4nkL4J2FBaJBtBUfN4obditzr0nOJGkNXim7DmVbC_OrVBvvdCqc7PWIBOpQK2dEHYVHpzTgj3pGMKjbGrSmRQkegTNJF_86iceGDvETykuUypU1pn1wRHy10C-BAkgOe7DFBb71rn5ob1ymRAgUdNqceUOT02kH7BxHKrwptQyhsmoV6_ZXbIRoP_Itmi7xizbVV4Q6sTCJ9IEZAMKYcWrGdNWYTgrfx5hOEQ&h=Wl4JngMC47-Z7mrFyfcbWFacZVCZvrHlQLfZiJdfBbA" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "8279461e-0c26-45ee-9716-65ad2841bce0" + ], + "x-ms-correlation-request-id": [ + "8279461e-0c26-45ee-9716-65ad2841bce0" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T154448Z:8279461e-0c26-45ee-9716-65ad2841bce0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 89AE32888FDE433F9EE5A7C7BFFBF99A Ref B: SJC211051205037 Ref C: 2024-03-21T15:44:47Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:44:47 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466326882830520&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1fE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VV21GRENoV3piRk5ZbGNGYVZGQzJSSEdsUllvYTRTaGVjXzVfOXFJa0JBN01ialcxcmQxNS1uM0xDWEdiX1NVR0FvSjJRalhfT0FYYnpnUzRzbExaQ0llMHpKQ0tDRXZ2N05VVHpObzZNdnBEM0tVeEFBYktmN1hET2w4aEhWRGhwSnhyNjRjRG9ocUdpTGp5N2FJNkFfelk1Wld6UUxNQ2RfV3h1WHU2ZUVjX2Zhb09NTDlsdWdoMU5rQVIydHZLZXZsZi1TMnhBRUx3RnlFM0RicmZfSkZPdXZBOE55N0o1WTQ3QTVHb3BidFpsamRuTVhrR2ZwVUVDS2lhWV9xMmlMcmxTeWhLMDkyNWJYNHp6M0xMRDkwM0haZWN0RXhvQ1hTWWIwJnM9UlpMTTlnLVhMQ3h6Mk5NUUpXcXMxZFJCZHdRU2V6NlNnU2trbGdDV3BrQ2FuekE2M2ZLRmduY0F0VXI0bldELUVmV1ZwS0x3QVc3Z1AxaHlCblN2eHdBVi0xN1FtRi04UTNvTVZ2YmctVEpiREthVzRua0w0SjJGQmFKQnRCVWZONG9iZGl0enIwbk9KR2tOWGltN0RtVmJDX09yVkJ2dmRDcWM3UFdJQk9wUUsyZEVIWVZIcHpUZ2ozcEdNS2piR3JTbVJRa2VnVE5KRl84NmljZUdEdkVUeWt1VXlwVTFwbjF3Ukh5MTBDLUJBa2dPZTdERkJiNzFybjVvYjF5bVJBZ1VkTnFjZVVPVDAya0g3QnhIS3J3cHRReWhzbW9WNl9aWGJJUm9QX0l0bWk3eGl6YlZWNFE2c1RDSjlJRVpBTUtZY1dyR2ROV1lUZ3JmeDVoT0VRJmg9V2w0Sm5nTUM0Ny1aN21yRnlmY2JXRmFjWlZDWnZySGxRTGZaaUpkZkJiQQ==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466327036996718&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1fEojEYKGj84-8gHXFveahRVa6ZPij7XMWfXQZWdo2aj6sMRX8UCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdF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NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAF9wsVY5GPv3eQNDdOO3pX2IJsz5n5bMuVN0DqeMoBkFFfk4UWmFDChWzbFNYlcFaVFC2RHGlRYoa4Shec_5_9qIkBA7MbjW1rd15-n3LCXGb_SUGAoJ2QjX_OAXbzgS4slLZCIe0zJCKCEvv7NUTzNo6MvpD3KUxAAbKf7XDOl8hHVDhpJxr64cDohqGiLjy7aI6A_zY5ZWzQLMCd_WxuXu6eEc_faoOML9lugh1NkAR2tvKevlf-S2xAELwFyE3Dbrf_JFOuvA8Ny7J5Y47A5GopbtZljdnMXkGfpUECKiaY_q2iLrlSyhK0925bX4zz3LLD903HZectExoCXSYb0&s=ICeL1vSiyRvJk9kbv8EtrNnkzK_Io_0cjHe04JEY0j2GBRBXIpP_dtrXu7yibJ4ZC5gFjoqhBVU5z-tuwpVQdlFSDib9Judp7VlRVT8fFXZIqzSOPKWtzOeCVqkv5tBXCP5-uOXsOpj-Kf38Pp0qmP01yg-w2rXfP5FWk4TcK7oWg3OeQIifDnn2QmUe2cjJDe_UWL73GG86JWY9KVUTz1nVf2BzO01XJSK2v5FgpRpJeM1mZiqCHM71zGpSAM1Zc3aboLBp32fKm3Av6FOER1H0hFuHIlPffsLlqhlSJJfyImFnTlHpafv_64WQi-6AmpQD6YyTKa6jRBlkSzv3TQ&h=RwvXB8zD_HKbbXBO-rrIa3VAYKL7hN5DmsvB-RphX2E" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "fc377a6a-1492-44db-a5c5-705036caa265" + ], + "x-ms-correlation-request-id": [ + "fc377a6a-1492-44db-a5c5-705036caa265" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T154503Z:fc377a6a-1492-44db-a5c5-705036caa265" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 5E4582A8AC5242999676263DC43AD6E8 Ref B: SJC211051205037 Ref C: 2024-03-21T15:45:03Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:45:02 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466327036996718&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwM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", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466327191181373&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1fEojEYKGj84-8gHXFveahRVa6ZPij7XMWfXQZWdo2aj6sMRX8UCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAw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bWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAF9wsVY5GPv3eQNDdOO3pX2IJsz5n5bMuVN0DqeMoBkFFfk4UWmFDChWzbFNYlcFaVFC2RHGlRYoa4Shec_5_9qIkBA7MbjW1rd15-n3LCXGb_SUGAoJ2QjX_OAXbzgS4slLZCIe0zJCKCEvv7NUTzNo6MvpD3KUxAAbKf7XDOl8hHVDhpJxr64cDohqGiLjy7aI6A_zY5ZWzQLMCd_WxuXu6eEc_faoOML9lugh1NkAR2tvKevlf-S2xAELwFyE3Dbrf_JFOuvA8Ny7J5Y47A5GopbtZljdnMXkGfpUECKiaY_q2iLrlSyhK0925bX4zz3LLD903HZectExoCXSYb0&s=Vbo7mo4KuRf8MwB0mv8X3OO1ulsrCNc6Lp3mXsqtgNHV4Hq_DxFo1cZetaWZaPpVga2MpS-qHMhK92p47dbNDzx4ycabor3n91R86-2PFE9ylxYMjVIGAc2NiiiZ32dNfotRIdeJenwspULXt2JPva-z0TrPrzgarDx8b_fk3_G8HcI3jZCIHedJ3VQJKko_tocN7pkAtCsOPEji_te5kORrICANjLrgF4Dd4_7nmRbBvoDQR4eT-lef1f6KWSI3wP8xhA5eVtT7cWpr8P9XXpbLy_bpGWQRG0F9Io9cdkNSVE1Cy2EymE-7NG7xQMnXNaBVQ9sr6b0MUvUZniI03A&h=F15c8T-ul0n06bavzjjkoph03dMp7ajpKKsoFlmxMhg" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "815d462a-66d9-4012-bb97-77cd21278b5c" + ], + "x-ms-correlation-request-id": [ + "815d462a-66d9-4012-bb97-77cd21278b5c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T154519Z:815d462a-66d9-4012-bb97-77cd21278b5c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 3EF2FE864F1546D09C673D5DDFB571BB Ref B: SJC211051205037 Ref C: 2024-03-21T15:45:18Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:45:18 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466327191181373&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cd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", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466327345210197&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1fEojEYKGj84-8gHXFveahRVa6ZPij7XMWfXQZWdo2aj6sMRX8UCA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-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "3b4db645-05ff-44da-837d-9c965ecdda67" + ], + "x-ms-correlation-request-id": [ + "3b4db645-05ff-44da-837d-9c965ecdda67" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T154534Z:3b4db645-05ff-44da-837d-9c965ecdda67" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 3CC0B83302BA430E86E2C5AD925E0A96 Ref B: SJC211051205037 Ref C: 2024-03-21T15:45:34Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:45:33 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466327345210197&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-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RNVVpVLVBCX1pWQUJfc2dCQmhVS3hFa0xHVVdrOHQ2MA==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466327499211615&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1fE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ISFrG40fRoLFm0QJjtSAkw" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "06849c4a-5bee-4bfd-8e5d-c86c3b7fd49d" + ], + "x-ms-correlation-request-id": [ + "06849c4a-5bee-4bfd-8e5d-c86c3b7fd49d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T154549Z:06849c4a-5bee-4bfd-8e5d-c86c3b7fd49d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 47222FFDFE8F4EC6A24AAA9F5DD78224 Ref B: SJC211051205037 Ref C: 2024-03-21T15:45:49Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:45:49 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466327499211615&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5Ji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5S2VSbXBXeGIwQ25odVdCMGp4VG1KOWVPaVZmeGZ0eDQ3ZGRkdXpBTmVjdDNyMDZoeDNSY19jbjZBJmg9NWw0dmVQZzVlY2xWbTVKVHhTMENfSVNGckc0MGZSb0xGbTBRSmp0U0Frdw==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466327653290870&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7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286neRjhMsrC8eoDRkhx-yDJ8ZuYuw_UDpAUIAoUYU6tAZ5LZu0juANd8Sib8dj76J2w&h=zQ-bcJD1yMnPzGuqJQNUcedYMx2n7CgbCckQ62XURUc" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "1fe34a08-8b9e-49a5-971b-b1070de6d0ff" + ], + "x-ms-correlation-request-id": [ + "1fe34a08-8b9e-49a5-971b-b1070de6d0ff" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T154605Z:1fe34a08-8b9e-49a5-971b-b1070de6d0ff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: EC62464E8570440CAAD529CC6A9C48F5 Ref B: SJC211051205037 Ref C: 2024-03-21T15:46:04Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:46:04 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466327653290870&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0Z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1LMHFnaUxobl8yVGh0VVQwMnpXY2VrUGRXWjkzallBTTk2emtUZDJMRlVVS0daajI4Nm5lUmpoTXNyQzhlb0RSa2h4LXlESjhadVl1d19VRHBBVUlBb1VZVTZ0QVo1TFp1MGp1QU5kOFNpYjhkajc2SjJ3Jmg9elEtYmNKRDF5TW5Qekd1cUpRTlVjZWRZTXgybjdDZ2JDY2tRNjJYVVJVYw==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466327807115051&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJ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4pZhoO2HoqGiWZ8AF4vOaG3nSax37244-g7ubH-3Z0TTEU3y59ALO8DuDQ3M2fUhuUiY89zf6zWcdqKJ4GtGz-RBMc-ms62ZBKoBNzSAaR3_krwleQChMiXUyD2B6pUn3FnO6qVuBnBR8i0OdJ30fAmjA&h=BEJ1SFxytchuDmTe1zkYCVbkXavGGCcrhAG8k1AgvUI" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "8f6038cd-7274-43f9-b556-1c308c61aa26" + ], + "x-ms-correlation-request-id": [ + "8f6038cd-7274-43f9-b556-1c308c61aa26" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T154620Z:8f6038cd-7274-43f9-b556-1c308c61aa26" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 3A550DE752654E0E91CFE1BAA9CC6DC6 Ref B: SJC211051205037 Ref C: 2024-03-21T15:46:20Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:46:19 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466327807115051&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1Whc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tX1NUc2hLVzhCRDYyZGtiMWJGbUg0Q0NzX2xhV25QNHBaaG9PMkhvcUdpV1o4QUY0dk9hRzNuU2F4MzcyNDQtZzd1YkgtM1owVFRFVTN5NTlBTE84RHVEUTNNMmZVaHVVaVk4OXpmNnpXY2RxS0o0R3RHei1SQk1jLW1zNjJaQktvQk56U0FhUjNfa3J3bGVRQ2hNaVhVeUQyQjZwVW4zRm5PNnFWdUJuQlI4aTBPZEozMGZBbWpBJmg9QkVKMVNGeHl0Y2h1RG1UZTF6a1lDVmJrWGF2R0dDY3JoQUc4azFBZ3ZVSQ==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466327961381970&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9L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M8jPhbqCVLbPYcZ52w4nCNGCnx_8S_wvC6CgyPAV6XQNSXkcjah2AlBmZskSWL62Up7crpVV-zi90PPPHLWLg1u8GOrKft_qR3D__GQpoEZMpB2heTdZ9pen2QLCGK_eOOvuWECeBAsNTikRLpEOZjSybvR336uknAgfjoaREI0-lHKwXyHEAfhOdWTifa6KUlAN-h0Cw-szxIhrFIz4iJMsikDiAln9XjunE-SEVuVZvKDjLOiaTSnnHCzRQ&h=PJrrFHNxT6CrdSQaBiYCs3yoqBdu4ucPDXhlSn3F5M0" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "1bdfdd22-e337-4e86-bc8c-8b7d7e59f5b2" + ], + "x-ms-correlation-request-id": [ + "1bdfdd22-e337-4e86-bc8c-8b7d7e59f5b2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T154636Z:1bdfdd22-e337-4e86-bc8c-8b7d7e59f5b2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: FF37FD0D26BE42EB872DAEAD9A1ADC89 Ref B: SJC211051205037 Ref C: 2024-03-21T15:46:35Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:46:35 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466327961381970&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQY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tPT1Nta3kwUHFNOGpQaGJxQ1ZMYlBZY1o1Mnc0bkNOR0NueF84U193dkM2Q2d5UEFWNlhRTlNYa2NqYWgyQWxCbVpza1NXTDYyVXA3Y3JwVlYtemk5MFBQUEhMV0xnMXU4R09yS2Z0X3FSM0RfX0dRcG9FWk1wQjJoZVRkWjlwZW4yUUxDR0tfZU9PdnVXRUNlQkFzTlRpa1JMcEVPWmpTeWJ2UjMzNnVrbkFnZmpvYVJFSTAtbEhLd1h5SEVBZmhPZFdUaWZhNktVbEFOLWgwQ3ctc3p4SWhyRkl6NGlKTXNpa0RpQWxuOVhqdW5FLVNFVnVWWnZLRGpMT2lhVFNubkhDelJRJmg9UEpyckZITnhUNkNyZFNRYUJpWUNzM3lvcUJkdTR1Y1BEWGhsU24zRjVNMA==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466328114592611&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZ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HZectExoCXSYb0&s=cUYobvHGinOAzbnt9Vrta0yCJeucoy9koP4_IvnoMT8HAAWMyrhTrGYWX-RlG3AwS-XXTimbspMLc-pZ8nha4Z11Ne5umz35zuWIVKHNdMUhVkrzTwNzHUr7U0V7vcgbWgDDVEpT5f2Zs_30BWm4GkfdXj5v4WYjy0_yFHE8wZxZckHGDrMV9W8toCBcu73CUqzbmZwFGNo9NoVT2Oj4ghZ0zQ0S2ABtoSE-ofkYR0fI0S45nSN-ZHsNvJ5NNlri4hUrJGtLXidA3E7flUHjCF_ClDBTZJpKoXNpDJ5XW3-rvkryHNM1JhEIhGhGNwwMjWLjMxjQRD08vWqzOh7Psg&h=K69esTZmZ5l2-LKs0CmZkj6Oo9oz1oGuBrXCwN6tJOc" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-request-id": [ + "265d2787-dde6-44a2-a774-ab3f14a478e7" + ], + "x-ms-correlation-request-id": [ + "265d2787-dde6-44a2-a774-ab3f14a478e7" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T154651Z:265d2787-dde6-44a2-a774-ab3f14a478e7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: FE4B9CC577404A719FCD57CCAA34B50A Ref B: SJC211051205037 Ref C: 2024-03-21T15:46:51Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:46:50 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn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2J2SEdpbk9BemJudDlWcnRhMHlDSmV1Y295OWtvUDRfSXZub01UOEhBQVdNeXJoVHJHWVdYLVJsRzNBd1MtWFhUaW1ic3BNTGMtcFo4bmhhNFoxMU5lNXVtejM1enVXSVZLSE5kTVVoVmtyelR3TnpIVXI3VTBWN3ZjZ2JXZ0REVkVwVDVmMlpzXzMwQldtNEdrZmRYajV2NFdZankwX3lGSEU4d1p4WmNrSEdEck1WOVc4dG9DQmN1NzNDVXF6Ym1ad0ZHTm85Tm9WVDJPajRnaFowelEwUzJBQnRvU0Utb2ZrWVIwZkkwUzQ1blNOLVpIc052SjVOTmxyaTRoVXJKR3RMWGlkQTNFN2ZsVUhqQ0ZfQ2xEQlRaSnBLb1hOcERKNVhXMy1ydmtyeUhOTTFKaEVJaEdoR053d01qV0xqTXhqUVJEMDh2V3F6T2g3UHNnJmg9SzY5ZXNUWm1aNWwyLUxLczBDbVprajZPbzlvejFvR3VCclhDd042dEpPYw==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466328268439681&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwH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R2tvKevlf-S2xAELwFyE3Dbrf_JFOuvA8Ny7J5Y47A5GopbtZljdnMXkGfpUECKiaY_q2iLrlSyhK0925bX4zz3LLD903HZectExoCXSYb0&s=oudfcGa8TyCIPXx_cWmOp3POiyXMMaFFaJGXiZb3zbDqbSuw7Veri1DXfxWG138cJJourkncY97d50XjRDD4GMPiEruxzykDir3gzPE5Zio4cHDMHHfsA7NQtwWac38NGFtAdkge7N4iM5XUlpiBL9Wo6omNZAa71NiVRvZqspZBEBOoglqQ6cNMaIR8zsdFQ8UWs6LkDfX8Ffd9_RFZ39MyaQ9xc_5L0HYPA8t4rk49mcRfTG5ic4VbBEzm2FCRxEypmr91lP8orOnu9ivTo_rgliy5PiT3hZZ6W5t0_E4C7kK_XyNxbGN49BwJoBfR08Duwir7YuFRsIn92j7coA&h=C5yj8LmOgxAh0C8bpD2cFHG0_y886ujYAv-wiwaU7eY" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "f5aacb50-b6a8-4c1d-bfab-a6acb394530c" + ], + "x-ms-correlation-request-id": [ + "f5aacb50-b6a8-4c1d-bfab-a6acb394530c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T154706Z:f5aacb50-b6a8-4c1d-bfab-a6acb394530c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 97B558C72F224A5099C3574A7253C58C Ref B: SJC211051205037 Ref C: 2024-03-21T15:47:06Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:47:06 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPV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lMcmxTeWhLMDkyNWJYNHp6M0xMRDkwM0haZWN0RXhvQ1hTWWIwJnM9b3VkZmNHYThUeUNJUFh4X2NXbU9wM1BPaXlYTU1hRkZhSkdYaVpiM3piRHFiU3V3N1ZlcmkxRFhmeFdHMTM4Y0pKb3Vya25jWTk3ZDUwWGpSREQ0R01QaUVydXh6eWtEaXIzZ3pQRTVaaW80Y0hETUhIZnNBN05RdHdXYWMzOE5HRnRBZGtnZTdONGlNNVhVbHBpQkw5V282b21OWkFhNzFOaVZSdlpxc3BaQkVCT29nbHFRNmNOTWFJUjh6c2RGUThVV3M2TGtEZlg4RmZkOV9SRlozOU15YVE5eGNfNUwwSFlQQTh0NHJrNDltY1JmVEc1aWM0VmJCRXptMkZDUnhFeXBtcjkxbFA4b3JPbnU5aXZUb19yZ2xpeTVQaVQzaFpaNlc1dDBfRTRDN2tLX1h5TnhiR040OUJ3Sm9CZlIwOER1d2lyN1l1RlJzSW45Mmo3Y29BJmg9QzV5ajhMbU9neEFoMEM4YnBEMmNGSEcwX3k4ODZ1allBdi13aXdhVTdlWQ==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466328423007948&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRM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l8hHVDhpJxr64cDohqGiLjy7aI6A_zY5ZWzQLMCd_WxuXu6eEc_faoOML9lugh1NkAR2tvKevlf-S2xAELwFyE3Dbrf_JFOuvA8Ny7J5Y47A5GopbtZljdnMXkGfpUECKiaY_q2iLrlSyhK0925bX4zz3LLD903HZectExoCXSYb0&s=nwGx5oIyAeqBsPcARTSxdFgMj9JHiJuVbGzW-6ELWRU8REazmWHDxfRzkhmhjCf1-Bn7SGhD4obv9F23gfqH-6vz_Z9sFGpxLuGFbJk3IooPtMkan6JOVGHwZQK6W3PaXhikrz_5R0S9C76Z6rDbP_I4NiIKAOcojZykKaHZ5XobSpHCALYfm6KRsXoJR22bsoCgdxjtaI5_fJKKMznJxDGdQxag4UUlddw5uCH-0uNSVP3lGRwzra4unlxVM9UsAW40-jYONzHvCeZmjTGqkNFUBIsocpDD53rZ3bwDY4CMsCGBDVwJM8wtdWF2eaSipbauZadZrqBwM1duRScuTQ&h=5VpgNSw8trAIfFPNCom_mheU9hHCwuEnCfntSkjAw18" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "20505181-7c86-40dd-bd13-e4f3b2f85cdf" + ], + "x-ms-correlation-request-id": [ + "20505181-7c86-40dd-bd13-e4f3b2f85cdf" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T154722Z:20505181-7c86-40dd-bd13-e4f3b2f85cdf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: ABBEC493DD6B4EF2B35EAB618183D3A8 Ref B: SJC211051205037 Ref C: 2024-03-21T15:47:21Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:47:21 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subsc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RicmZfSkZPdXZBOE55N0o1WTQ3QTVHb3BidFpsamRuTVhrR2ZwVUVDS2lhWV9xMmlMcmxTeWhLMDkyNWJYNHp6M0xMRDkwM0haZWN0RXhvQ1hTWWIwJnM9bndHeDVvSXlBZXFCc1BjQVJUU3hkRmdNajlKSGlKdVZiR3pXLTZFTFdSVThSRWF6bVdIRHhmUnpraG1oakNmMS1CbjdTR2hENG9idjlGMjNnZnFILTZ2el9aOXNGR3B4THVHRmJKazNJb29QdE1rYW42Sk9WR0h3WlFLNlczUGFYaGlrcnpfNVIwUzlDNzZaNnJEYlBfSTROaUlLQU9jb2paeWtLYUhaNVhvYlNwSENBTFlmbTZLUnNYb0pSMjJic29DZ2R4anRhSTVfZkpLS016bkp4REdkUXhhZzRVVWxkZHc1dUNILTB1TlNWUDNsR1J3enJhNHVubHhWTTlVc0FXNDAtallPTnpIdkNlWm1qVEdxa05GVUJJc29jcERENTNyWjNid0RZNENNc0NHQkRWd0pNOHd0ZFdGMmVhU2lwYmF1WmFkWnJxQndNMWR1UlNjdVRRJmg9NVZwZ05Tdzh0ckFJZkZQTkNvbV9taGVVOWhIQ3d1RW5DZm50U2tqQXcxOA==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466328576826159&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBg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AXbzgS4slLZCIe0zJCKCEvv7NUTzNo6MvpD3KUxAAbKf7XDOl8hHVDhpJxr64cDohqGiLjy7aI6A_zY5ZWzQLMCd_WxuXu6eEc_faoOML9lugh1NkAR2tvKevlf-S2xAELwFyE3Dbrf_JFOuvA8Ny7J5Y47A5GopbtZljdnMXkGfpUECKiaY_q2iLrlSyhK0925bX4zz3LLD903HZectExoCXSYb0&s=ZjXhhzAxrZOqPDW5aw6eujzFevqPW_5VePpULul8VS32Dfi1g6s_dzEEIh9JSbmkrs4tdjZoT2h8VAs4NIaMHVbI3scN06j7kIgaHiQhu3LoVK9w5_QDY92oU7chw9weQqXO3wwiaf-70qsNpvnOLdTAt3LkVevWwBmBpQczSPFgDd-2MDcRrGMwtM-cCKVuflixCvAto9fYH6CNou86IyY1e7Jpd95NVnlOStBvzYIKnYc0nY1F0YnVTPP9NgKZquXrM-4zwH7uwECtcECq7ZJuFeQuTqWcxG11lJv1gOxH4UuEpiISbgfgoJi3lPxc0m1qn33Y0dFRzYEj4oiV9g&h=woTMp_Ni0Fwq-UGq2CWQJsC_mboB5lv0NEYx5H1P8as" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "325f66fd-d3e0-4869-b310-2a0c84909b50" + ], + "x-ms-correlation-request-id": [ + "325f66fd-d3e0-4869-b310-2a0c84909b50" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T154737Z:325f66fd-d3e0-4869-b310-2a0c84909b50" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 0B4E0B2A5D7E42D886B765A093651579 Ref B: SJC211051205037 Ref C: 2024-03-21T15:47:37Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:47:36 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466328576826159&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1fEojEYKGj84-8gHXFveahRVa6ZPij7XMWfXQZWdo2aj6sMRX8UCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0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zhb09NTDlsdWdoMU5rQVIydHZLZXZsZi1TMnhBRUx3RnlFM0RicmZfSkZPdXZBOE55N0o1WTQ3QTVHb3BidFpsamRuTVhrR2ZwVUVDS2lhWV9xMmlMcmxTeWhLMDkyNWJYNHp6M0xMRDkwM0haZWN0RXhvQ1hTWWIwJnM9WmpYaGh6QXhyWk9xUERXNWF3NmV1anpGZXZxUFdfNVZlUHBVTHVsOFZTMzJEZmkxZzZzX2R6RUVJaDlKU2Jta3JzNHRkalpvVDJoOFZBczROSWFNSFZiSTNzY04wNmo3a0lnYUhpUWh1M0xvVks5dzVfUURZOTJvVTdjaHc5d2VRcVhPM3d3aWFmLTcwcXNOcHZuT0xkVEF0M0xrVmV2V3dCbUJwUWN6U1BGZ0RkLTJNRGNSckdNd3RNLWNDS1Z1ZmxpeEN2QXRvOWZZSDZDTm91ODZJeVkxZTdKcGQ5NU5WbmxPU3RCdnpZSUtuWWMwblkxRjBZblZUUFA5TmdLWnF1WHJNLTR6d0g3dXdFQ3RjRUNxN1pKdUZlUXVUcVdjeEcxMWxKdjFnT3hINFV1RXBpSVNiZ2Znb0ppM2xQeGMwbTFxbjMzWTBkRlJ6WUVqNG9pVjlnJmg9d29UTXBfTmkwRndxLVVHcTJDV1FKc0NfbWJvQjVsdjBORVl4NUgxUDhhcw==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWF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DChWzbFNYlcFaVFC2RHGlRYoa4Shec_5_9qIkBA7MbjW1rd15-n3LCXGb_SUGAoJ2QjX_OAXbzgS4slLZCIe0zJCKCEvv7NUTzNo6MvpD3KUxAAbKf7XDOl8hHVDhpJxr64cDohqGiLjy7aI6A_zY5ZWzQLMCd_WxuXu6eEc_faoOML9lugh1NkAR2tvKevlf-S2xAELwFyE3Dbrf_JFOuvA8Ny7J5Y47A5GopbtZljdnMXkGfpUECKiaY_q2iLrlSyhK0925bX4zz3LLD903HZectExoCXSYb0&s=GQm3BkdV-NRdf49l8oz-Kuy9yQPB6R1q6YZBN7_uS1W_ONSiIM7itN4HPsAdmrj80NgZt96cUN72BPYFSEcbwOT-0k_lBoKIehbE0WtEl5Js4WSlrjsZiJlnmWRHmzov0dTbWuYhVwm8dR7Ygkq6LHxhFgzH5Zv4D1R_FZabwcNzASh4im4H1NkUoNIdMOX9T-Mv4XsghOfJJpyQf6Oq2VlyeLqDApz8LrHXjtaqv02-ALLIcdzsP8qsYb0FHr6rjAapMRKCy7bvLmGfphoJYbcLDt7qVuq1zbQEuL2OQqUha69l0IVrVVUM4MXAXCnVAP4tOhXOjuV9aqCBuXf8NA&h=acIedk3Z6encqWe0bh3FOSVNsBxjoUz1zsasiwZuiMI" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-request-id": [ + "0dde4712-343c-4269-9709-9243726f98f5" + ], + "x-ms-correlation-request-id": [ + "0dde4712-343c-4269-9709-9243726f98f5" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T154753Z:0dde4712-343c-4269-9709-9243726f98f5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: E3F4A18A13FD4162A4FB34C720DDCC95 Ref B: SJC211051205037 Ref C: 2024-03-21T15:47:52Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:47:52 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466328730668963&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1fEojEYKGj84-8gHXFveahRVa6ZPij7XMWfXQZWdo2aj6sMRX8UCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxU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N1hET2w4aEhWRGhwSnhyNjRjRG9ocUdpTGp5N2FJNkFfelk1Wld6UUxNQ2RfV3h1WHU2ZUVjX2Zhb09NTDlsdWdoMU5rQVIydHZLZXZsZi1TMnhBRUx3RnlFM0RicmZfSkZPdXZBOE55N0o1WTQ3QTVHb3BidFpsamRuTVhrR2ZwVUVDS2lhWV9xMmlMcmxTeWhLMDkyNWJYNHp6M0xMRDkwM0haZWN0RXhvQ1hTWWIwJnM9R1FtM0JrZFYtTlJkZjQ5bDhvei1LdXk5eVFQQjZSMXE2WVpCTjdfdVMxV19PTlNpSU03aXRONEhQc0FkbXJqODBOZ1p0OTZjVU43MkJQWUZTRWNid09ULTBrX2xCb0tJZWhiRTBXdEVsNUpzNFdTbHJqc1ppSmxubVdSSG16b3YwZFRiV3VZaFZ3bThkUjdZZ2txNkxIeGhGZ3pINVp2NEQxUl9GWmFid2NOekFTaDRpbTRIMU5rVW9OSWRNT1g5VC1NdjRYc2doT2ZKSnB5UWY2T3EyVmx5ZUxxREFwejhMckhYanRhcXYwMi1BTExJY2R6c1A4cXNZYjBGSHI2cmpBYXBNUktDeTdidkxtR2ZwaG9KWWJjTER0N3FWdXExemJRRXVMMk9RcVVoYTY5bDBJVnJWVlVNNE1YQVhDblZBUDR0T2hYT2p1VjlhcUNCdVhmOE5BJmg9YWNJZWRrM1o2ZW5jcVdlMGJoM0ZPU1ZOc0J4am9VejF6c2FzaXdadWlNSQ==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFV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IhvcNAQELBQADggEBAF9wsVY5GPv3eQNDdOO3pX2IJsz5n5bMuVN0DqeMoBkFFfk4UWmFDChWzbFNYlcFaVFC2RHGlRYoa4Shec_5_9qIkBA7MbjW1rd15-n3LCXGb_SUGAoJ2QjX_OAXbzgS4slLZCIe0zJCKCEvv7NUTzNo6MvpD3KUxAAbKf7XDOl8hHVDhpJxr64cDohqGiLjy7aI6A_zY5ZWzQLMCd_WxuXu6eEc_faoOML9lugh1NkAR2tvKevlf-S2xAELwFyE3Dbrf_JFOuvA8Ny7J5Y47A5GopbtZljdnMXkGfpUECKiaY_q2iLrlSyhK0925bX4zz3LLD903HZectExoCXSYb0&s=fVBIw2BlfF1RvzAvpy6vMVk3qaRcFr3MZZJ652qM29t5e-fxgqqL6FyaQL0a76nIKQYD196GETHr3UA87tgVoMfCRiLP2cMdjwdNsHtJtr17xnFxL0LDzdmwdr82ObCf1Zg9o0SgmHkSiC14BcuOMIUqPzXvM2fC96676j1TylhuHqPS9n24RFJ81sNaiuocRLkfRWJXstHyzlI7ECePZCCUGl5q6t6seZJpqpC8DAlBDEQc0lHBnZl5wBQEkyUmsYJqLWMxbISuC4RTkWPKESfs3bvQBmZyrjZCMkN6E3gyAppEmppd9m9pCPWeS46dYDtcxvIJi3TPTd7Av200TQ&h=CEl_YNJuaZMXCYPqKLPURZmSQU8rC0x9rnDDkMLP0vI" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-request-id": [ + "ff5716f1-83e5-448a-835c-1ff8a0359ca7" + ], + "x-ms-correlation-request-id": [ + "ff5716f1-83e5-448a-835c-1ff8a0359ca7" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T154808Z:ff5716f1-83e5-448a-835c-1ff8a0359ca7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 0571BF172CF44F04B8C0140202B13B42 Ref B: SJC211051205037 Ref C: 2024-03-21T15:48:08Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:48:07 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466328884106773&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1fEojEYKGj84-8gHXFveahRVa6ZPij7XMWfXQZWdo2aj6sMRX8UCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMB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hfT0FYYnpnUzRzbExaQ0llMHpKQ0tDRXZ2N05VVHpObzZNdnBEM0tVeEFBYktmN1hET2w4aEhWRGhwSnhyNjRjRG9ocUdpTGp5N2FJNkFfelk1Wld6UUxNQ2RfV3h1WHU2ZUVjX2Zhb09NTDlsdWdoMU5rQVIydHZLZXZsZi1TMnhBRUx3RnlFM0RicmZfSkZPdXZBOE55N0o1WTQ3QTVHb3BidFpsamRuTVhrR2ZwVUVDS2lhWV9xMmlMcmxTeWhLMDkyNWJYNHp6M0xMRDkwM0haZWN0RXhvQ1hTWWIwJnM9ZlZCSXcyQmxmRjFSdnpBdnB5NnZNVmszcWFSY0ZyM01aWko2NTJxTTI5dDVlLWZ4Z3FxTDZGeWFRTDBhNzZuSUtRWUQxOTZHRVRIcjNVQTg3dGdWb01mQ1JpTFAyY01kandkTnNIdEp0cjE3eG5GeEwwTER6ZG13ZHI4Mk9iQ2YxWmc5bzBTZ21Ia1NpQzE0QmN1T01JVXFQelh2TTJmQzk2Njc2ajFUeWxodUhxUFM5bjI0UkZKODFzTmFpdW9jUkxrZlJXSlhzdEh5emxJN0VDZVBaQ0NVR2w1cTZ0NnNlWkpwcXBDOERBbEJERVFjMGxIQm5abDV3QlFFa3lVbXNZSnFMV014YklTdUM0UlRrV1BLRVNmczNidlFCbVp5cmpaQ01rTjZFM2d5QXBwRW1wcGQ5bTlwQ1BXZVM0NmRZRHRjeHZJSmkzVFBUZDdBdjIwMFRRJmg9Q0VsX1lOSnVhWk1YQ1lQcUtMUFVSWm1TUVU4ckMweDlybkREa01MUDB2SQ==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscript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FKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAF9wsVY5GPv3eQNDdOO3pX2IJsz5n5bMuVN0DqeMoBkFFfk4UWmFDChWzbFNYlcFaVFC2RHGlRYoa4Shec_5_9qIkBA7MbjW1rd15-n3LCXGb_SUGAoJ2QjX_OAXbzgS4slLZCIe0zJCKCEvv7NUTzNo6MvpD3KUxAAbKf7XDOl8hHVDhpJxr64cDohqGiLjy7aI6A_zY5ZWzQLMCd_WxuXu6eEc_faoOML9lugh1NkAR2tvKevlf-S2xAELwFyE3Dbrf_JFOuvA8Ny7J5Y47A5GopbtZljdnMXkGfpUECKiaY_q2iLrlSyhK0925bX4zz3LLD903HZectExoCXSYb0&s=lT0rYDv5KiOCBzlR6iVZ7ydQM6kW9d7mOP6ZZKIUE3eM6XKhniyELcC9bi5VMFEACMcTbE7aKnlI0tfM-ym3ONXoWpzkeL--PnXDY6U0tC1dk5_-PHctQ5kdqNaEu94ialriX1Bt18ZBv5eTVzOwymdX6BmDUECZ7pArFJLhIk4eOYREQlHUdWOhbKTUH0iaZ9OkjNk1zq5-OTj0ZME8OmX8haJZrJat8ZGQuoXO-OKTLAV7uTF4JnFWAXTu06Crr4NhBluemyAb60sAXLO8fWgdbR5tDe85QY819grzMTQyCAzzOr2WLc24WT1J-ue7E7ri_5f2ykqAYIDYpntkhw&h=3Ln93LYiq4ltbadLnaTrGR0QQBGgnXboc9DrD_IE1bU" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "fd815a39-d8cd-4deb-b475-8e0d1b24065d" + ], + "x-ms-correlation-request-id": [ + "fd815a39-d8cd-4deb-b475-8e0d1b24065d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T154823Z:fd815a39-d8cd-4deb-b475-8e0d1b24065d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 86F6E52ECD9F429BA48D60BC8D006061 Ref B: SJC211051205037 Ref C: 2024-03-21T15:48:23Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:48:23 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466329038292928&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1fEojEYKG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oV3piRk5ZbGNGYVZGQzJSSEdsUllvYTRTaGVjXzVfOXFJa0JBN01ialcxcmQxNS1uM0xDWEdiX1NVR0FvSjJRalhfT0FYYnpnUzRzbExaQ0llMHpKQ0tDRXZ2N05VVHpObzZNdnBEM0tVeEFBYktmN1hET2w4aEhWRGhwSnhyNjRjRG9ocUdpTGp5N2FJNkFfelk1Wld6UUxNQ2RfV3h1WHU2ZUVjX2Zhb09NTDlsdWdoMU5rQVIydHZLZXZsZi1TMnhBRUx3RnlFM0RicmZfSkZPdXZBOE55N0o1WTQ3QTVHb3BidFpsamRuTVhrR2ZwVUVDS2lhWV9xMmlMcmxTeWhLMDkyNWJYNHp6M0xMRDkwM0haZWN0RXhvQ1hTWWIwJnM9bFQwcllEdjVLaU9DQnpsUjZpVlo3eWRRTTZrVzlkN21PUDZaWktJVUUzZU02WEtobml5RUxjQzliaTVWTUZFQUNNY1RiRTdhS25sSTB0Zk0teW0zT05Yb1dwemtlTC0tUG5YRFk2VTB0QzFkazVfLVBIY3RRNWtkcU5hRXU5NGlhbHJpWDFCdDE4WkJ2NWVUVnpPd3ltZFg2Qm1EVUVDWjdwQXJGSkxoSWs0ZU9ZUkVRbEhVZFdPaGJLVFVIMGlhWjlPa2pOazF6cTUtT1RqMFpNRThPbVg4aGFKWnJKYXQ4WkdRdW9YTy1PS1RMQVY3dVRGNEpuRldBWFR1MDZDcnI0TmhCbHVlbXlBYjYwc0FYTE84ZldnZGJSNXREZTg1UVk4MTlncnpNVFF5Q0F6ek9yMldMYzI0V1QxSi11ZTdFN3JpXzVmMnlrcUFZSURZcG50a2h3Jmg9M0xuOTNMWWlxNGx0YmFkTG5hVHJHUjBRUUJHZ25YYm9jOURyRF9JRTFiVQ==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466329191859846&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1fEojEYKGj84-8gHXFveahRVa6ZPij7XMWfXQZWdo2aj6sMRX8UCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX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MjBJbmZyYSUyMENBJTIwMDUuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAF9wsVY5GPv3eQNDdOO3pX2IJsz5n5bMuVN0DqeMoBkFFfk4UWmFDChWzbFNYlcFaVFC2RHGlRYoa4Shec_5_9qIkBA7MbjW1rd15-n3LCXGb_SUGAoJ2QjX_OAXbzgS4slLZCIe0zJCKCEvv7NUTzNo6MvpD3KUxAAbKf7XDOl8hHVDhpJxr64cDohqGiLjy7aI6A_zY5ZWzQLMCd_WxuXu6eEc_faoOML9lugh1NkAR2tvKevlf-S2xAELwFyE3Dbrf_JFOuvA8Ny7J5Y47A5GopbtZljdnMXkGfpUECKiaY_q2iLrlSyhK0925bX4zz3LLD903HZectExoCXSYb0&s=H0KYoiV4AG0WXOg7XG00e9e4brYHYl4gnzoTAdQLYTyYW4vW1eKqu9vVyhZO9QIwDqhpCR-hxWNc8vh9WbXu1FrMC94vfY2OwrUhM-utfGf16ofhUyQi1VQm5lfTTz09kK2M4RplKlvZBgDlW0awjKpzOnci8BKmEcL6nktrYQQMM2dWCQrNW0E6NYIlUB2tmqcqc9Tr-Z-0qU-eRnXQnNKTexSchHLEirPGfhoBsBYRnk8YDsyUTHhPNksAKnCyFubgtbSq8t5MkLcGvOyNjVcrGR2qPULmaPWzdT2uSEM1cwwFgpsvGs14MKA2TtQ_SM_iPH3uq4XWm8NoLsAhzQ&h=eEMrrWq91kaFRcI6mPVFUQpbvcY3JKdTcNg2FRPp_1I" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-request-id": [ + "4b9e5fb1-e0d8-4e0c-88ee-31bae37bfd31" + ], + "x-ms-correlation-request-id": [ + "4b9e5fb1-e0d8-4e0c-88ee-31bae37bfd31" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T154839Z:4b9e5fb1-e0d8-4e0c-88ee-31bae37bfd31" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 1E1EE10735184DEC94BF000B5E43844D Ref B: SJC211051205037 Ref C: 2024-03-21T15:48:38Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:48:38 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466329191859846&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttP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Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466329345607078&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1fEojEYKGj84-8gHXFveahRVa6ZPij7XMWfXQZWdo2aj6sMRX8UCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjc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uY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAF9wsVY5GPv3eQNDdOO3pX2IJsz5n5bMuVN0DqeMoBkFFfk4UWmFDChWzbFNYlcFaVFC2RHGlRYoa4Shec_5_9qIkBA7MbjW1rd15-n3LCXGb_SUGAoJ2QjX_OAXbzgS4slLZCIe0zJCKCEvv7NUTzNo6MvpD3KUxAAbKf7XDOl8hHVDhpJxr64cDohqGiLjy7aI6A_zY5ZWzQLMCd_WxuXu6eEc_faoOML9lugh1NkAR2tvKevlf-S2xAELwFyE3Dbrf_JFOuvA8Ny7J5Y47A5GopbtZljdnMXkGfpUECKiaY_q2iLrlSyhK0925bX4zz3LLD903HZectExoCXSYb0&s=MI3fk1Ri_hJEanDvVcUcHfXPX8Fig5J5fTZqEUpwj074ReTwEwsITh5Mdjt-AMBKVWVz8GJmgg_olkITunLeU0wtVwrTABXDLchZj4s0Hyb3AkPB5TeM6xcamFiMGr-0ObKHahhhsGraU2fkJc-jZMJI3eD195Aq0bUUKhKRjlihrP6R_LILB5ma9XfMHvYI5JKYcFy22wF16YMuquJwt7b3Jxi6aBTkNsZsKL6eInY3VVeeLDuSrZHhHjq6FovA2qr8cakMpF4_EmIlWzUsCCATqKora7GynVZ2pPFGmBDvQ0HMqT4xyYjLed2q0YBfTva8BfumDInqMTSijtZuQg&h=vxKn-LAcHiGXhpRvO_Xb9zEVyYpP0Q84cajgA7MEaAc" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "a4b2fc9b-dad5-44a0-8267-b4be9b8e5e0a" + ], + "x-ms-correlation-request-id": [ + "a4b2fc9b-dad5-44a0-8267-b4be9b8e5e0a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T154854Z:a4b2fc9b-dad5-44a0-8267-b4be9b8e5e0a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: C0901A985F4F40FDB622EAF7ACBDF100 Ref B: SJC211051205037 Ref C: 2024-03-21T15:48:54Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:48:53 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466329345607078&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxs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IaUdYaHBSdk9fWGI5ekVWeVlwUDBRODRjYWpnQTdNRWFBYw==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466329499137013&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1f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3pVTPI2RQ8" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "2df25062-f4be-47c9-b857-6604ea19c7ad" + ], + "x-ms-correlation-request-id": [ + "2df25062-f4be-47c9-b857-6604ea19c7ad" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T154909Z:2df25062-f4be-47c9-b857-6604ea19c7ad" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 4D295651BC6A4563854459A007338CC8 Ref B: SJC211051205037 Ref C: 2024-03-21T15:49:09Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:49:09 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466329499137013&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMu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3hHeDE4QV9BbkV3ZF8tZFBiYW4zdmYyenVBJmg9VkZLaUpuWjVnM0JKSHVOSm5tYmFGclU0UW9rS0xLZlNrM3BWVFBJMlJROA==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466329654033044&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdM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EFKya0P2Rq-MZiPiMBbbcfN4tfStlg&h=xoC9UCWe59yk-LiHDeOOfCvy64QGaSYJCgOI6mAMH1k" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "6f62b793-34d0-4555-bfd0-3f4c1cf79930" + ], + "x-ms-correlation-request-id": [ + "6f62b793-34d0-4555-bfd0-3f4c1cf79930" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T154925Z:6f62b793-34d0-4555-bfd0-3f4c1cf79930" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: BBD2ADC1D5044176AA1E911A2A5F141E Ref B: SJC211051205037 Ref C: 2024-03-21T15:49:24Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:49:24 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466329654033044&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJ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FlBNGRocjloOWFNcWF3bEF6WWYtTkRCczhYbGF1VmNhX1l2ZlV5b2VsTmFKMUJtZDNlYm9OeFpDbVFURUZLeWEwUDJScS1NWmlQaU1CYmJjZk40dGZTdGxnJmg9eG9DOVVDV2U1OXlrLUxpSERlT09mQ3Z5NjRRR2FTWUpDZ09JNm1BTUgxaw==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466329807832485&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpG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IMKcL3sCEuXnL-_VA_fX5slWYrOGuOTK9ppUNWtjgQZISQF83q-NBzsL9aB1Xromu6qaWrlZ1vPSkAovfJ2FKf7lB7cXEELxPsz7idr231K0kn23b8A&h=jOTdTfoiZZZe8jLSbRx77A2Wyp9stsb0Xy2oQE_J3sg" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-request-id": [ + "fb0e95ce-bc79-45a2-9069-9df831947a26" + ], + "x-ms-correlation-request-id": [ + "fb0e95ce-bc79-45a2-9069-9df831947a26" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T154940Z:fb0e95ce-bc79-45a2-9069-9df831947a26" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 9B6638BE456242EB9F68B014230015BE Ref B: SJC211051205037 Ref C: 2024-03-21T15:49:40Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:49:39 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466329807832485&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJ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mlVNFhQTzlxd3BDaUhvQk5BTk5tMUxtalBJTUtjTDNzQ0V1WG5MLV9WQV9mWDVzbFdZck9HdU9USzlwcFVOV3RqZ1FaSVNRRjgzcS1OQnpzTDlhQjFYcm9tdTZxYVdybFoxdlBTa0FvdmZKMkZLZjdsQjdjWEVFTHhQc3o3aWRyMjMxSzBrbjIzYjhBJmg9ak9UZFRmb2laWlplOGpMU2JSeDc3QTJXeXA5c3RzYjBYeTJvUUVfSjNzZw==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466329961666197&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUt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QTvoURP0DP3UXNE4ETu8avLYwvPxrUdOi9QP-VLgIL0iuFvD_6baYpl6twY443IF9f0lQe3XWUTJQNSpWiCgbHgmWXTF5-sITCOLSM8zHlduv0nEMgLs1m-TWWeTYvuAaOTgUL7v9-lFATFmax55o6CqVQROtGQuD85wLebe2yNr1See2Cau9g&h=ErAr4AD1eu5tr1RXWKyF-2mXM8vYgE_EYK9j81iExFc" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "16d1897f-99b4-4ae2-a4ed-88a9d9db4d1f" + ], + "x-ms-correlation-request-id": [ + "16d1897f-99b4-4ae2-a4ed-88a9d9db4d1f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T154956Z:16d1897f-99b4-4ae2-a4ed-88a9d9db4d1f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: D20DBE8287A5487BA1CF6E5E72B5D1BD Ref B: SJC211051205037 Ref C: 2024-03-21T15:49:55Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:49:55 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466329961666197&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEg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em1QTnhpV3lrQlZXRVFUdm9VUlAwRFAzVVhORTRFVHU4YXZMWXd2UHhyVWRPaTlRUC1WTGdJTDBpdUZ2RF82YmFZcGw2dHdZNDQzSUY5ZjBsUWUzWFdVVEpRTlNwV2lDZ2JIZ21XWFRGNS1zSVRDT0xTTTh6SGxkdXYwbkVNZ0xzMW0tVFdXZVRZdnVBYU9UZ1VMN3Y5LWxGQVRGbWF4NTVvNkNxVlFST3RHUXVEODV3TGViZTJ5TnIxU2VlMkNhdTlnJmg9RXJBcjRBRDFldTV0cjFSWFdLeUYtMm1YTTh2WWdFX0VZSzlqODFpRXhGYw==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466330115105352&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJS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54g-LPhxG6187nhiYkIHXBEmQOaywzVQlhbrSJ2WJ1nvrY-HXG9pvLbOI23SybVR-POfoppSmTdHk7het0-W7xy8d8qJ9UypUcZGIZayp4PwHSP_v_x0O_zp56U6lm2a8Sv-zRlys-krePHwMmtM49HmCEiaPF0gbb1jSqfdRLnar0j088zVyjMomR2tuPnFidVM7OdnL4CdjCfO180U0XnWLar5xrPQiPqzXZoAR057LYjYmEjgHQC7FoDGq94I0Gnhtw&h=MmS6k3WDiouVPRmvsSk94pTTpgtxMa_RnBUFGr5uru8" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11997" + ], + "x-ms-request-id": [ + "e0454711-21ea-4370-a00d-be0fa6fb2f3a" + ], + "x-ms-correlation-request-id": [ + "e0454711-21ea-4370-a00d-be0fa6fb2f3a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T155011Z:e0454711-21ea-4370-a00d-be0fa6fb2f3a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: A1E26E54E6E84388B4E7515B0FF04129 Ref B: SJC211051205037 Ref C: 2024-03-21T15:50:11Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:50:10 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466330115105352&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRY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1RT2F5d3pWUWxoYnJTSjJXSjFudnJZLUhYRzlwdkxiT0kyM1N5YlZSLVBPZm9wcFNtVGRIazdoZXQwLVc3eHk4ZDhxSjlVeXBVY1pHSVpheXA0UHdIU1Bfdl94ME9fenA1NlU2bG0yYThTdi16Umx5cy1rcmVQSHdNbXRNNDlIbUNFaWFQRjBnYmIxalNxZmRSTG5hcjBqMDg4elZ5ak1vbVIydHVQbkZpZFZNN09kbkw0Q2RqQ2ZPMTgwVTBYbldMYXI1eHJQUWlQcXpYWm9BUjA1N0xZalltRWpnSFFDN0ZvREdxOTRJMEduaHR3Jmg9TW1TNmszV0Rpb3VWUFJtdnNTazk0cFRUcGd0eE1hX1JuQlVGR3I1dXJ1OA==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466330388673032&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJ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U4_VMfWBvVLnpQK7eC3G8rAnH5fGgJPTwwXV2MFRT0lnShwQf2Xuk5GNAOnk4Yr79ZifWkfqvGmxZIuJdbGK5D8jF_ZjOzStke-3MyoaMjlrRxOaXhJopb95UeESpNu1VpLcMmelzjnd_EGp9j4PaQopO4XIRrI2dDf5Y6lTlwSfsGEHV3k4dZUoUP5j3gmR-iPfk6UvmVVX-qu0uqJHQIcWavQEht_Nd0K4V3zpI4dz-epMuBsc_O4J0Uyya2oww8fSPq_7QpbEPAXa5b1SyjYH7yQcHtyWN_kcfLiEC4BaLLCMkxS2aj4F7BKJFbtw&h=Sx4-1CjIr29Truh5Ko4r1ZfOnZIZXUwx6nS15dJB38o" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-request-id": [ + "2c403e1f-0b7f-4a6b-b55c-e3db123b4a52" + ], + "x-ms-correlation-request-id": [ + "2c403e1f-0b7f-4a6b-b55c-e3db123b4a52" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T155038Z:2c403e1f-0b7f-4a6b-b55c-e3db123b4a52" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: F9A73620CB5A438A83CAE93768206254 Ref B: SJC211051205037 Ref C: 2024-03-21T15:50:26Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:50:38 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466330388673032&c=MI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ZNZldCdlZMbnBRSzdlQzNHOHJBbkg1ZkdnSlBUd3dYVjJNRlJUMGxuU2h3UWYyWHVrNUdOQU9uazRZcjc5WmlmV2tmcXZHbXhaSXVKZGJHSzVEOGpGX1pqT3pTdGtlLTNNeW9hTWpsclJ4T2FYaEpvcGI5NVVlRVNwTnUxVnBMY01tZWx6am5kX0VHcDlqNFBhUW9wTzRYSVJySTJkRGY1WTZsVGx3U2ZzR0VIVjNrNGRaVW9VUDVqM2dtUi1pUGZrNlV2bVZWWC1xdTB1cUpIUUljV2F2UUVodF9OZDBLNFYzenBJNGR6LWVwTXVCc2NfTzRKMFV5eWEyb3d3OGZTUHFfN1FwYkVQQVhhNWIxU3lqWUg3eVFjSHR5V05fa2NmTGlFQzRCYUxMQ01reFMyYWo0RjdCS0pGYnR3Jmg9U3g0LTFDaklyMjlUcnVoNUtvNHIxWmZPblpJWlhVd3g2blMxNWRKQjM4bw==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466330541153818&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1W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dbrf_JFOuvA8Ny7J5Y47A5GopbtZljdnMXkGfpUECKiaY_q2iLrlSyhK0925bX4zz3LLD903HZectExoCXSYb0&s=SQB6Vcc5P3230e8dAdd-5TfSnW-gVx9DSIJcipMZtM8TyNFFr7lYd0WAePLMHVU7Qrdz3zO4dOn6OOO0_df9s6GOgAsn8s5wsKL1kIHKDuslZY-oCyE1Cn7wONsasMZgqVm2PLkbEW84xrkbNRdan-sOEs3UueM86PtyKNg6hH2MraENoivfar2RAgW5r9UJ3rJEVcxOCyUeIYbOOs_m4XW654xXcPZEQcTvXikVAtqEfooOlHJJzvlIZDHMqvUnIfQUoJbXfFws7NS_83sgQK-PSS2W8wDCE3ZaxRnCvlDgwsOcTKF2iNK10wP6mc31obIbBZkeL94hHY5vyz8X5Q&h=ixcHU0N0oBaR6riXgJ5lgog8Zdu0FCSEKaEfa2oOJ_I" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "487263a4-43c3-4b43-bedb-c059dcf0daa9" + ], + "x-ms-correlation-request-id": [ + "487263a4-43c3-4b43-bedb-c059dcf0daa9" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T155054Z:487263a4-43c3-4b43-bedb-c059dcf0daa9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: E8699A9F27774C6CB84033D7328C13C0 Ref B: SJC211051205037 Ref C: 2024-03-21T15:50:53Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:50:53 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1Q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kyNWJYNHp6M0xMRDkwM0haZWN0RXhvQ1hTWWIwJnM9U1FCNlZjYzVQMzIzMGU4ZEFkZC01VGZTblctZ1Z4OURTSUpjaXBNWnRNOFR5TkZGcjdsWWQwV0FlUExNSFZVN1FyZHozek80ZE9uNk9PTzBfZGY5czZHT2dBc244czV3c0tMMWtJSEtEdXNsWlktb0N5RTFDbjd3T05zYXNNWmdxVm0yUExrYkVXODR4cmtiTlJkYW4tc09FczNVdWVNODZQdHlLTmc2aEgyTXJhRU5vaXZmYXIyUkFnVzVyOVVKM3JKRVZjeE9DeVVlSVliT09zX200WFc2NTR4WGNQWkVRY1R2WGlrVkF0cUVmb29PbEhKSnp2bElaREhNcXZVbklmUVVvSmJYZkZ3czdOU184M3NnUUstUFNTMlc4d0RDRTNaYXhSbkN2bERnd3NPY1RLRjJpTksxMHdQNm1jMzFvYkliQlprZUw5NGhIWTV2eXo4WDVRJmg9aXhjSFUwTjBvQmFSNnJpWGdKNWxnb2c4WmR1MEZDU0VLYUVmYTJvT0pfSQ==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466330695165296&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FM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A_zY5ZWzQLMCd_WxuXu6eEc_faoOML9lugh1NkAR2tvKevlf-S2xAELwFyE3Dbrf_JFOuvA8Ny7J5Y47A5GopbtZljdnMXkGfpUECKiaY_q2iLrlSyhK0925bX4zz3LLD903HZectExoCXSYb0&s=ITXdHJHJnLvuj4sMdmVyQcXwcig3NKULlp0mQZkegMZ2yezec07njtjzBCLqgtMemRBot6XW0nt2sgzwX0caYECCupA-b2IOW8phrF6UnIAz6RlxxcQ-556mhFzUvJXjlBcCUhcHOORLWNOR_BJoI2cflqsv1qjIff_hafJe7VFdW77X4n2oEm-Kmt342_SaHymhNRj99mioNeRglt6PGqoUpo5OyNjplp1AyA4F9KJsaMGFHTUFLgwASNeoCrlgMXQQgc1196kfWmMa_ZjEwz2cxdIGJHWY8XaHG9sUToHDsjLONaodtxMtMa5TarvoTfNDrwbqGC2zzwL8SI321A&h=22MOoJfGwfqdGq2Q-VTKCg1G0SPHbQAT75S3sr-j2IA" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "a3d7dfc8-f54b-4165-9914-9087a78dfb07" + ], + "x-ms-correlation-request-id": [ + "a3d7dfc8-f54b-4165-9914-9087a78dfb07" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T155109Z:a3d7dfc8-f54b-4165-9914-9087a78dfb07" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: F3B885A3FEEF4D2FACBD57A3DFF0B788 Ref B: SJC211051205037 Ref C: 2024-03-21T15:51:09Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:51:08 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf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amRuTVhrR2ZwVUVDS2lhWV9xMmlMcmxTeWhLMDkyNWJYNHp6M0xMRDkwM0haZWN0RXhvQ1hTWWIwJnM9SVRYZEhKSEpuTHZ1ajRzTWRtVnlRY1h3Y2lnM05LVUxscDBtUVprZWdNWjJ5ZXplYzA3bmp0anpCQ0xxZ3RNZW1SQm90NlhXMG50MnNnendYMGNhWUVDQ3VwQS1iMklPVzhwaHJGNlVuSUF6NlJseHhjUS01NTZtaEZ6VXZKWGpsQmNDVWhjSE9PUkxXTk9SX0JKb0kyY2ZscXN2MXFqSWZmX2hhZkplN1ZGZFc3N1g0bjJvRW0tS210MzQyX1NhSHltaE5Sajk5bWlvTmVSZ2x0NlBHcW9VcG81T3lOanBscDFBeUE0RjlLSnNhTUdGSFRVRkxnd0FTTmVvQ3JsZ01YUVFnYzExOTZrZldtTWFfWmpFd3oyY3hkSUdKSFdZOFhhSEc5c1VUb0hEc2pMT05hb2R0eE10TWE1VGFydm9UZk5EcndicUdDMnp6d0w4U0kzMjFBJmg9MjJNT29KZkd3ZnFkR3EyUS1WVEtDZzFHMFNQSGJRQVQ3NVMzc3ItajJJQQ==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466330848361759&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMR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Evv7NUTzNo6MvpD3KUxAAbKf7XDOl8hHVDhpJxr64cDohqGiLjy7aI6A_zY5ZWzQLMCd_WxuXu6eEc_faoOML9lugh1NkAR2tvKevlf-S2xAELwFyE3Dbrf_JFOuvA8Ny7J5Y47A5GopbtZljdnMXkGfpUECKiaY_q2iLrlSyhK0925bX4zz3LLD903HZectExoCXSYb0&s=MnIHTCysIMR3Y12TVDIelNiVvePTPpvnvNIkHBOCzKqJ4Yplm3mqPB3Mn63fnYN3XnzjMqHSR2wNjVdD92yJmoY2wGryd6Rnma5xc5RpdegtrPUs4UcW0dWVzVfjOEgAnTc994GrQQEBk7zgQ9LgVS4MiLUocV77ZbzlHfNDt89MwBUPCqZVShLLOlUmcLpvTZL4ONBOZMZgcsEpI62yuOHi2Fe4XRWvx6m4afUvH51Wzi9IlB1FSLv9q-Nz-TqMTjRnMWysRO0n3q1OHHjm3tZQQYpbV1FQ1HMNByWDt5tCYcquF5HT3B8KrxwY48whto5zwuv6YWVZZ4gEG2coTw&h=ZEK7vrZ_WRagpARlAvsQirKM0v_Zr1tq_venyBYJA6Y" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "e8b0d4c8-2b52-4b7f-90d1-a90204ee447e" + ], + "x-ms-correlation-request-id": [ + "e8b0d4c8-2b52-4b7f-90d1-a90204ee447e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T155124Z:e8b0d4c8-2b52-4b7f-90d1-a90204ee447e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: CC3F2021F6A3433B8975CD77ED939ED0 Ref B: SJC211051205037 Ref C: 2024-03-21T15:51:24Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:51:23 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466330848361759&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1fEojEYKGj84-8gHXFveahRVa6ZPij7XMWfXQZWdo2aj6sMRX8UCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCA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U2ZUVjX2Zhb09NTDlsdWdoMU5rQVIydHZLZXZsZi1TMnhBRUx3RnlFM0RicmZfSkZPdXZBOE55N0o1WTQ3QTVHb3BidFpsamRuTVhrR2ZwVUVDS2lhWV9xMmlMcmxTeWhLMDkyNWJYNHp6M0xMRDkwM0haZWN0RXhvQ1hTWWIwJnM9TW5JSFRDeXNJTVIzWTEyVFZESWVsTmlWdmVQVFBwdm52TklrSEJPQ3pLcUo0WXBsbTNtcVBCM01uNjNmbllOM1huempNcUhTUjJ3TmpWZEQ5MnlKbW9ZMndHcnlkNlJubWE1eGM1UnBkZWd0clBVczRVY1cwZFdWelZmak9FZ0FuVGM5OTRHclFRRUJrN3pnUTlMZ1ZTNE1pTFVvY1Y3N1piemxIZk5EdDg5TXdCVVBDcVpWU2hMTE9sVW1jTHB2VFpMNE9OQk9aTVpnY3NFcEk2Mnl1T0hpMkZlNFhSV3Z4Nm00YWZVdkg1MVd6aTlJbEIxRlNMdjlxLU56LVRxTVRqUm5NV3lzUk8wbjNxMU9ISGptM3RaUVFZcGJWMUZRMUhNTkJ5V0R0NXRDWWNxdUY1SFQzQjhLcnh3WTQ4d2h0bzV6d3V2NllXVlpaNGdFRzJjb1R3Jmg9WkVLN3ZyWl9XUmFncEFSbEF2c1FpcktNMHZfWnIxdHFfdmVueUJZSkE2WQ==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6Im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BkFFfk4UWmFDChWzbFNYlcFaVFC2RHGlRYoa4Shec_5_9qIkBA7MbjW1rd15-n3LCXGb_SUGAoJ2QjX_OAXbzgS4slLZCIe0zJCKCEvv7NUTzNo6MvpD3KUxAAbKf7XDOl8hHVDhpJxr64cDohqGiLjy7aI6A_zY5ZWzQLMCd_WxuXu6eEc_faoOML9lugh1NkAR2tvKevlf-S2xAELwFyE3Dbrf_JFOuvA8Ny7J5Y47A5GopbtZljdnMXkGfpUECKiaY_q2iLrlSyhK0925bX4zz3LLD903HZectExoCXSYb0&s=nhrGzuN5jwyMNBWBUoO9MuQ8tOeTyFx94-d9ADNGYjShnxq_zD8BNcLTzhqWf0YuNEHctARlNohqF3E5UWU1cPL4qF_yredmHci4dn2V6NgSTsHQqVYYj924CdyRPVsgp3R730vmrljekhwRbZ2wcIigvFy3EwcHUU8gcoZ42MGTqVyh9m2zAP3mS80vOPq1v5m95y63L4YSmGKkwsFzWC7yH2LEav21hM-nwNJH5UNY3-nTm1KbKe8PeFfTOVNZrtyd9uQMuwSHm7l4durbT3zVWZbLmv_GO_0-Vv22k0elHMuNUVGirr0uVN1r9cqUpv0aQvERwW1lSGgIIKKqiQ&h=lQwDdcW1gC2pB1yFTx1EwbQKNsJtSFPx44Q0CiNONNg" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "c7fae427-95bd-4aa6-97cd-e64ddce547a6" + ], + "x-ms-correlation-request-id": [ + "c7fae427-95bd-4aa6-97cd-e64ddce547a6" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T155140Z:c7fae427-95bd-4aa6-97cd-e64ddce547a6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 006BC509F94C49B499405102A0DB9A62 Ref B: SJC211051205037 Ref C: 2024-03-21T15:51:39Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:51:39 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466331002344864&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1fEojEYKGj84-8gHXFveahRVa6ZPij7XMWfXQZWdo2aj6sMRX8UCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAw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tVeEFBYktmN1hET2w4aEhWRGhwSnhyNjRjRG9ocUdpTGp5N2FJNkFfelk1Wld6UUxNQ2RfV3h1WHU2ZUVjX2Zhb09NTDlsdWdoMU5rQVIydHZLZXZsZi1TMnhBRUx3RnlFM0RicmZfSkZPdXZBOE55N0o1WTQ3QTVHb3BidFpsamRuTVhrR2ZwVUVDS2lhWV9xMmlMcmxTeWhLMDkyNWJYNHp6M0xMRDkwM0haZWN0RXhvQ1hTWWIwJnM9bmhyR3p1TjVqd3lNTkJXQlVvTzlNdVE4dE9lVHlGeDk0LWQ5QUROR1lqU2hueHFfekQ4Qk5jTFR6aHFXZjBZdU5FSGN0QVJsTm9ocUYzRTVVV1UxY1BMNHFGX3lyZWRtSGNpNGRuMlY2TmdTVHNIUXFWWVlqOTI0Q2R5UlBWc2dwM1I3MzB2bXJsamVraHdSYloyd2NJaWd2RnkzRXdjSFVVOGdjb1o0Mk1HVHFWeWg5bTJ6QVAzbVM4MHZPUHExdjVtOTV5NjNMNFlTbUdLa3dzRnpXQzd5SDJMRWF2MjFoTS1ud05KSDVVTlkzLW5UbTFLYktlOFBlRmZUT1ZOWnJ0eWQ5dVFNdXdTSG03bDRkdXJiVDN6VldaYkxtdl9HT18wLVZ2MjJrMGVsSE11TlVWR2lycjB1Vk4xcjljcVVwdjBhUXZFUndXMWxTR2dJSUtLcWlRJmg9bFF3RGRjVzFnQzJwQjF5RlR4MUV3YlFLTnNKdFNGUHg0NFEwQ2lOT05OZw==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6I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QYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAF9wsVY5GPv3eQNDdOO3pX2IJsz5n5bMuVN0DqeMoBkFFfk4UWmFDChWzbFNYlcFaVFC2RHGlRYoa4Shec_5_9qIkBA7MbjW1rd15-n3LCXGb_SUGAoJ2QjX_OAXbzgS4slLZCIe0zJCKCEvv7NUTzNo6MvpD3KUxAAbKf7XDOl8hHVDhpJxr64cDohqGiLjy7aI6A_zY5ZWzQLMCd_WxuXu6eEc_faoOML9lugh1NkAR2tvKevlf-S2xAELwFyE3Dbrf_JFOuvA8Ny7J5Y47A5GopbtZljdnMXkGfpUECKiaY_q2iLrlSyhK0925bX4zz3LLD903HZectExoCXSYb0&s=QospaDlTPWHk1mFNYewg7Vn8w8IPX8EroMblRtxoODLu1GdokxQV1p4JayFbwb-3djQ7TKKDlEBmcvtevtGQFDQcgK-KZMzLXT0Phbcj5-BZwxxDgAQgVuyMYDD5NLoyJ1fjqdsS1EMAKWwvB49hobmWUkvHiILLZzSW8V7J-eyeO3EOEgKHu08qJuvbC6aK-Y1rR5vYznrtMN0hiV45J9dKqfqJf8jNqgUKSVTj7IbOOzo72k1kTUx5S5jaUpi1IB3pfuOb8ZBtYt-9i6tAJSvSjQfHo3hgeQoOCA990Q3FrxYCcWX-dLS9d9eME08ERDDZrzpXcQLSbeD6tatCUA&h=E2sDCOwK0V4HoNloEyvluAZkSoxWeV3B5JBfUNOmxq0" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "bff942cb-dea4-4a03-8f08-5aac98c6f727" + ], + "x-ms-correlation-request-id": [ + "bff942cb-dea4-4a03-8f08-5aac98c6f727" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T155155Z:bff942cb-dea4-4a03-8f08-5aac98c6f727" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 3CF4641213684177918B57F2FA066E33 Ref B: SJC211051205037 Ref C: 2024-03-21T15:51:55Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:51:54 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466331156692604&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1fEojEYKGj84-8gHXFveahRVa6ZPij7XMWfXQZWdo2aj6sMRX8UCAwEAAaOCA-0wgg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xcmQxNS1uM0xDWEdiX1NVR0FvSjJRalhfT0FYYnpnUzRzbExaQ0llMHpKQ0tDRXZ2N05VVHpObzZNdnBEM0tVeEFBYktmN1hET2w4aEhWRGhwSnhyNjRjRG9ocUdpTGp5N2FJNkFfelk1Wld6UUxNQ2RfV3h1WHU2ZUVjX2Zhb09NTDlsdWdoMU5rQVIydHZLZXZsZi1TMnhBRUx3RnlFM0RicmZfSkZPdXZBOE55N0o1WTQ3QTVHb3BidFpsamRuTVhrR2ZwVUVDS2lhWV9xMmlMcmxTeWhLMDkyNWJYNHp6M0xMRDkwM0haZWN0RXhvQ1hTWWIwJnM9UW9zcGFEbFRQV0hrMW1GTllld2c3Vm44dzhJUFg4RXJvTWJsUnR4b09ETHUxR2Rva3hRVjFwNEpheUZid2ItM2RqUTdUS0tEbEVCbWN2dGV2dEdRRkRRY2dLLUtaTXpMWFQwUGhiY2o1LUJad3h4RGdBUWdWdXlNWURENU5Mb3lKMWZqcWRzUzFFTUFLV3d2QjQ5aG9ibVdVa3ZIaUlMTFp6U1c4VjdKLWV5ZU8zRU9FZ0tIdTA4cUp1dmJDNmFLLVkxclI1dll6bnJ0TU4waGlWNDVKOWRLcWZxSmY4ak5xZ1VLU1ZUajdJYk9Pem83Mmsxa1RVeDVTNWphVXBpMUlCM3BmdU9iOFpCdFl0LTlpNnRBSlN2U2pRZkhvM2hnZVFvT0NBOTkwUTNGcnhZQ2NXWC1kTFM5ZDllTUUwOEVSRERacnpwWGNRTFNiZUQ2dGF0Q1VBJmg9RTJzRENPd0swVjRIb05sb0V5dmx1QVprU294V2VWM0I1SkJmVU5PbXhxMA==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466331310376143&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1fEojEYKGj84-8gHXFveahRVa6ZPij7XMWfXQZWdo2aj6sMRX8UCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQU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BAGCN3sBATAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAF9wsVY5GPv3eQNDdOO3pX2IJsz5n5bMuVN0DqeMoBkFFfk4UWmFDChWzbFNYlcFaVFC2RHGlRYoa4Shec_5_9qIkBA7MbjW1rd15-n3LCXGb_SUGAoJ2QjX_OAXbzgS4slLZCIe0zJCKCEvv7NUTzNo6MvpD3KUxAAbKf7XDOl8hHVDhpJxr64cDohqGiLjy7aI6A_zY5ZWzQLMCd_WxuXu6eEc_faoOML9lugh1NkAR2tvKevlf-S2xAELwFyE3Dbrf_JFOuvA8Ny7J5Y47A5GopbtZljdnMXkGfpUECKiaY_q2iLrlSyhK0925bX4zz3LLD903HZectExoCXSYb0&s=P277TzNXrNWQ6ehNtrN26oKclVW0DHKTE0fnwvIZEPlDDl0glUd1DdXcZXV__kMPJc719bcLWgUPc8Kyel6MUe5Qa-kwFd9qOnQnhBtd3-qY69ZuBYFTcZQ5ajzKGLppl2GIu2VfY0TNoJCNXNj5h6w2Fn9-M9n2zpxw89OCtvE7sP4RNsmoHjnIvADlpqAMmvjaPG3xnfx-jbbaob4nhg9__6YSm0ViE0v_qsZ6S06hlEjDpjN0cDXPa3uveuzIu-uLXSro9XGrHuWnpOAY-N97cxCIsh3bkzJrm2vsVBCdjohAPIHuKVOr0_BqTLd9iIJYSWx1py1DNl693garGA&h=SMu_scWH3qfyF4zH2zGdh8moYkSwm3DDwtTYX3BrFJ4" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "1bfa095f-3d65-475a-aed9-9cb17e2fc69c" + ], + "x-ms-correlation-request-id": [ + "1bfa095f-3d65-475a-aed9-9cb17e2fc69c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T155211Z:1bfa095f-3d65-475a-aed9-9cb17e2fc69c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 9C29DF742D6241888F87389FE78338BD Ref B: SJC211051205037 Ref C: 2024-03-21T15:52:10Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:52:10 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466331310376143&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEA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TXVWTjBEcWVNb0JrRkZmazRVV21GRENoV3piRk5ZbGNGYVZGQzJSSEdsUllvYTRTaGVjXzVfOXFJa0JBN01ialcxcmQxNS1uM0xDWEdiX1NVR0FvSjJRalhfT0FYYnpnUzRzbExaQ0llMHpKQ0tDRXZ2N05VVHpObzZNdnBEM0tVeEFBYktmN1hET2w4aEhWRGhwSnhyNjRjRG9ocUdpTGp5N2FJNkFfelk1Wld6UUxNQ2RfV3h1WHU2ZUVjX2Zhb09NTDlsdWdoMU5rQVIydHZLZXZsZi1TMnhBRUx3RnlFM0RicmZfSkZPdXZBOE55N0o1WTQ3QTVHb3BidFpsamRuTVhrR2ZwVUVDS2lhWV9xMmlMcmxTeWhLMDkyNWJYNHp6M0xMRDkwM0haZWN0RXhvQ1hTWWIwJnM9UDI3N1R6TlhyTldRNmVoTnRyTjI2b0tjbFZXMERIS1RFMGZud3ZJWkVQbEREbDBnbFVkMURkWGNaWFZfX2tNUEpjNzE5YmNMV2dVUGM4S3llbDZNVWU1UWEta3dGZDlxT25RbmhCdGQzLXFZNjladUJZRlRjWlE1YWp6S0dMcHBsMkdJdTJWZlkwVE5vSkNOWE5qNWg2dzJGbjktTTluMnpweHc4OU9DdHZFN3NQNFJOc21vSGpuSXZBRGxwcUFNbXZqYVBHM3huZngtamJiYW9iNG5oZzlfXzZZU20wVmlFMHZfcXNaNlMwNmhsRWpEcGpOMGNEWFBhM3V2ZXV6SXUtdUxYU3JvOVhHckh1V25wT0FZLU45N2N4Q0lzaDNia3pKcm0ydnNWQkNkam9oQVBJSHVLVk9yMF9CcVRMZDlpSUpZU1d4MXB5MURObDY5M2dhckdBJmg9U011X3NjV0gzcWZ5RjR6SDJ6R2RoOG1vWWtTd20zRER3dFRZWDNCckZKNA==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466331464654802&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1fEojEYKGj84-8gHXFveahRVa6ZPij7XMWfXQZWdo2aj6sMRX8UCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-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2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAF9wsVY5GPv3eQNDdOO3pX2IJsz5n5bMuVN0DqeMoBkFFfk4UWmFDChWzbFNYlcFaVFC2RHGlRYoa4Shec_5_9qIkBA7MbjW1rd15-n3LCXGb_SUGAoJ2QjX_OAXbzgS4slLZCIe0zJCKCEvv7NUTzNo6MvpD3KUxAAbKf7XDOl8hHVDhpJxr64cDohqGiLjy7aI6A_zY5ZWzQLMCd_WxuXu6eEc_faoOML9lugh1NkAR2tvKevlf-S2xAELwFyE3Dbrf_JFOuvA8Ny7J5Y47A5GopbtZljdnMXkGfpUECKiaY_q2iLrlSyhK0925bX4zz3LLD903HZectExoCXSYb0&s=RkPD8oKLBXP7I0ctDbCTljdcsPRdmhBJtcsJp7AXbeoSU23Lz4soVo1F_b7qLhqMX856GOWKiVm2uARhTyhV7U4Eq99xCHBYC6trnF19qi0quWlT9l_aemC1Hrhp-PsDKyBf8drrva0u01KXDPCqEuQp0SHNjsnz-LsI4QW9CwVVv2c0sbNLFTuSA-ozptz53t5eyI5bFVVHHDly_oxGdXJ7EG1lUiEVcBZ33cOjk41WfD8ezQHJjwvn4mD9cxZLBzOEOuCZKT0GBAc-3iPn2LMhEGhFmmU7O18Q9XpQv6tOfAyKbu_2cpoBH-_-eUxEDvv2gsOLcVBz5kBi7bjntw&h=p5TdTEz44ezm9cFQGgUVOpY8bj8fnN7fpgdAfHYV-hk" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "ee931b90-646e-435f-acf0-99fafa849736" + ], + "x-ms-correlation-request-id": [ + "ee931b90-646e-435f-acf0-99fafa849736" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T155226Z:ee931b90-646e-435f-acf0-99fafa849736" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: BDDC7EFEB1994FA1B14C85A88DCA05AD Ref B: SJC211051205037 Ref C: 2024-03-21T15:52:26Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:52:25 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466331464654802&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepX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Version/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466331618273989&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1fEojEYKGj84-8gHXFveahRVa6ZPij7XMWfXQZWdo2aj6sMRX8UCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwC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wOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAF9wsVY5GPv3eQNDdOO3pX2IJsz5n5bMuVN0DqeMoBkFFfk4UWmFDChWzbFNYlcFaVFC2RHGlRYoa4Shec_5_9qIkBA7MbjW1rd15-n3LCXGb_SUGAoJ2QjX_OAXbzgS4slLZCIe0zJCKCEvv7NUTzNo6MvpD3KUxAAbKf7XDOl8hHVDhpJxr64cDohqGiLjy7aI6A_zY5ZWzQLMCd_WxuXu6eEc_faoOML9lugh1NkAR2tvKevlf-S2xAELwFyE3Dbrf_JFOuvA8Ny7J5Y47A5GopbtZljdnMXkGfpUECKiaY_q2iLrlSyhK0925bX4zz3LLD903HZectExoCXSYb0&s=LUK-FeOqAJJc1PDOMcEworjiylE3tjbylQNzzdnCOz8frrygz89Tezv15nYfddYbd-lNfvnHbPMTiBzDJZVeQTkx5an8WluOIrmQKIkm85E979cA4eHRtKtHEXvp6qA20nCjrGr68X9FB7RrwnyDZ3qu5IIPM-8JOApWwKjSADaNjaeq4ClqjZUcIvLDoH5CNdHEFHetjBg5A9mFse_dz-nUprP1DChpAIK8vcgUmD-D0YtEDzMGSs9ERsgFxamBNj-zm77AebhlhzZRjTCW03LLPR2-mQxmyXXTaVesdryrcas_wSuT_fp-JvWryz1l8qd34_4tjMmLZCr9x235cQ&h=kNt-fCKWQ-s3uAi7EHagsNtjvOJF_mv_wzP97-qhVD0" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "565bf9b6-0e33-4efe-a5ea-5a92d629db63" + ], + "x-ms-correlation-request-id": [ + "565bf9b6-0e33-4efe-a5ea-5a92d629db63" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T155241Z:565bf9b6-0e33-4efe-a5ea-5a92d629db63" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: F26C97A5F29D42FB9CFBBCFA257EE1D1 Ref B: SJC211051205037 Ref C: 2024-03-21T15:52:41Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:52:40 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466331618273989&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJ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==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466331772026585&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1fEojEYKGj84-8gHXFveahRVa6ZPij7XMWfXQZWdo2aj6sMRX8UC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-subscription-reads": [ + "11998" + ], + "x-ms-request-id": [ + "526e858f-38a0-4216-914a-cc5284f5b355" + ], + "x-ms-correlation-request-id": [ + "526e858f-38a0-4216-914a-cc5284f5b355" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T155257Z:526e858f-38a0-4216-914a-cc5284f5b355" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: C124E35F5CF34E8B93C30191A4D7CDD4 Ref B: SJC211051205037 Ref C: 2024-03-21T15:52:56Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:52:56 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466331772026585&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxs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RQRmtPci1sQkU4UWM0djlnUUtsM3lvcnhvTU85dzlsWQ==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466331926108785&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1fEojEY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ezLdJQsKXBcart9Q" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-request-id": [ + "c2f7864c-efc4-4cae-a56c-2d6f0d739024" + ], + "x-ms-correlation-request-id": [ + "c2f7864c-efc4-4cae-a56c-2d6f0d739024" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T155312Z:c2f7864c-efc4-4cae-a56c-2d6f0d739024" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 755DE12CE7324D43BC208655993EDF99 Ref B: SJC211051205037 Ref C: 2024-03-21T15:53:12Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:53:11 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466331926108785&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7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ZzY0w5aGh6T1AxdXZ3aWo0MC1nUjZibmlfQkVvcUxFajZwUS1qM3JVVWR5dkhnJmg9bkVTY2lwa0dLUk9QczRwR1pkRXViSUZBeHBzZXpMZEpRc0tYQmNhcnQ5UQ==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466332080093688&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXw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p7xpFyLuBg3-KaRKl21GSm3LOTxhdo-LC--2orPgyPXNuVNr0w9ug&h=Vij3CYKkx6rdQkYXURRvTnvjGs6hlMGy2DI_Wrc748g" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-request-id": [ + "c487f943-f683-4da2-8fe9-008a441464b6" + ], + "x-ms-correlation-request-id": [ + "c487f943-f683-4da2-8fe9-008a441464b6" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T155328Z:c487f943-f683-4da2-8fe9-008a441464b6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 51A30D2DB7AF42AEB684488C5007A996 Ref B: SJC211051205037 Ref C: 2024-03-21T15:53:27Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:53:27 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466332080093688&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTC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xNWktFUlVUaC04X2lwY3ZqbmNNZGtSZ0lsTmpPUlAyT2pwN1BZRXA3eHBGeUx1QmczLUthUktsMjFHU20zTE9UeGhkby1MQy0tMm9yUGd5UFhOdVZOcjB3OXVnJmg9VmlqM0NZS2t4NnJkUWtZWFVSUnZUbnZqR3M2aGxNR3kyRElfV3JjNzQ4Zw==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466332234554484&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGd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zTLF0zzOhxFUn4p03JuDyWPBVPoDZL6RmFEsMZNHcC7707tpPtqc4eANqkyTHNsUYMAWFMQDIk_KC2hZ-9ecU-66Z2COba7SW1T9VIxSwJVDWKJWt_vX3Q7Q&h=MT_X2nsJ8RBAdn7lm91z51KOkGouy9HZR1Vkm7dm9CU" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "845a943e-cb63-4580-9874-8abdc603b4dd" + ], + "x-ms-correlation-request-id": [ + "845a943e-cb63-4580-9874-8abdc603b4dd" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T155343Z:845a943e-cb63-4580-9874-8abdc603b4dd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: EC458CD7F1894FB487C6286D343C70DE Ref B: SJC211051205037 Ref C: 2024-03-21T15:53:43Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:53:42 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466332234554484&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3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F3MUtHRzBqN3o3cGpxLTNNcFBrcDViQVJMRnFzMnpSelRMRjB6ek9oeEZVbjRwMDNKdUR5V1BCVlBvRFpMNlJtRkVzTVpOSGNDNzcwN3RwUHRxYzRlQU5xa3lUSE5zVVlNQVdGTVFESWtfS0MyaFotOWVjVS02NloyQ09iYTdTVzFUOVZJeFN3SlZEV0tKV3RfdlgzUTdRJmg9TVRfWDJuc0o4UkJBZG43bG05MXo1MUtPa0dvdXk5SFpSMVZrbTdkbTlDVQ==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466332388516644&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor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ik7xrHd9FyWMDeR3KRBRjXdENDnIcgUoULrF2Pj2zzoGjOR0iAKiKJQ33wB0HKm7gnlfflPTGYhLGox6cyVDKjha4p3upGs6JnWTE_uCOQjNR3uMpbsgW3WHHGljpCCYp-FHvJGJzUGSKvrALlIWEMw7Cnn48PzxPfxZQPwRYWTsfsU7fMcOCEbvwWhyNL-S-ZZ6lAcAtig&h=ZIvsFy70MAAVrNxrDi-2kKdH6C97oFzBkqfKw3wgmrI" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "a30b86ed-54c4-4d1e-95a0-c83ad1a20e29" + ], + "x-ms-correlation-request-id": [ + "a30b86ed-54c4-4d1e-95a0-c83ad1a20e29" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T155358Z:a30b86ed-54c4-4d1e-95a0-c83ad1a20e29" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: DC7647D0A6ED450E8181605FCE973D15 Ref B: SJC211051205037 Ref C: 2024-03-21T15:53:58Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:53:58 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466332388516644&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgw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VUt6ejdmNjk3b0pkTDZkX2JBWVBlRmlZd2lrN3hySGQ5RnlXTURlUjNLUkJSalhkRU5EbkljZ1VvVUxyRjJQajJ6em9Hak9SMGlBS2lLSlEzM3dCMEhLbTdnbmxmZmxQVEdZaExHb3g2Y3lWREtqaGE0cDN1cEdzNkpuV1RFX3VDT1FqTlIzdU1wYnNnVzNXSEhHbGpwQ0NZcC1GSHZKR0p6VUdTS3ZyQUxsSVdFTXc3Q25uNDhQenhQZnhaUVB3UllXVHNmc1U3Zk1jT0NFYnZ3V2h5TkwtUy1aWjZsQWNBdGlnJmg9Wkl2c0Z5NzBNQUFWck54ckRpLTJrS2RINkM5N29GekJrcWZLdzN3Z21ySQ==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466332540081431&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCAS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-maT3LYUSCW8tvAd7qVarjSVMS9Jnwt3rWpoqqOPUzni74RxpKVokv5zhikxla9lIilbz6cxole0Yt50lAu6hagOTowxWM-IbtopHXnQbQenJ9np5Xrzw_God6_NO0fNTKJxi8a8QNj9mGf1-U46E2G1WqPCl5bRJBSVO5-Hk5lp18b3C31YI0ypomC3a1mW7utv9bm4QRH1exWNwqq_w3xc5J8dOHPSDEPsS0AaueJplrmHijHozGomHZk8xywAdAUxdr7hYBkSNcQAYYtdQDdnhN5sw8bSjplO6_prJA7yIAXxje-1w&h=XuqidNf6Ewtrx4OoZEjf6bFcOo1KhZ5-GV-rIjOSb3Y" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-request-id": [ + "8d81a2e2-43d9-4f9a-869b-c6b24edee38c" + ], + "x-ms-correlation-request-id": [ + "8d81a2e2-43d9-4f9a-869b-c6b24edee38c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T155414Z:8d81a2e2-43d9-4f9a-869b-c6b24edee38c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 4A8EE57FB8D14D36ABF7546A4D85538D Ref B: SJC211051205037 Ref C: 2024-03-21T15:54:13Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:54:14 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466332540081431&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0O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TVM5Sm53dDNyV3BvcXFPUFV6bmk3NFJ4cEtWb2t2NXpoaWt4bGE5bElpbGJ6NmN4b2xlMFl0NTBsQXU2aGFnT1Rvd3hXTS1JYnRvcEhYblFiUWVuSjlucDVYcnp3X0dvZDZfTk8wZk5US0p4aThhOFFOajltR2YxLVU0NkUyRzFXcVBDbDViUkpCU1ZPNS1IazVscDE4YjNDMzFZSTB5cG9tQzNhMW1XN3V0djlibTRRUkgxZXhXTndxcV93M3hjNUo4ZE9IUFNERVBzUzBBYXVlSnBscm1IaWpIb3pHb21IWms4eHl3QWRBVXhkcjdoWUJrU05jUUFZWXRkUURkbmhONXN3OGJTanBsTzZfcHJKQTd5SUFYeGplLTF3Jmg9WHVxaWROZjZFd3RyeDRPb1pFamY2YkZjT28xS2haNS1HVi1ySWpPU2IzWQ==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466332693697984&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGl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hK0925bX4zz3LLD903HZectExoCXSYb0&s=yQTEEL4drQ8j-jgsWEzeDl-qLO4APEXavFWPtz33TfF61aoypcLdpRd8dojRLWvziVL611ajfJknwAkgwL4v_n6WDDc75OJ8LOxkVI-SUO-nsYKiQOcv5YjDDEwTaKn0JHhk82rwd3mGspfOTrGp9GHMcFRxzknS0EwoyHZD2y_y0xgIl7246qBn-y7qf7LOv4wsAOg9bytZSwLnQY3vQS_tXIfemEfb3Mqee_rwgUHSX2Wpt2YWvGL1fcWCZDJ26fWpDgxcwA4JjSq7ID1PlUY07NE88m5t8CvjVWr_icNedT1O53-zC_fkbcjs2RSi6onvObsAY4DeD9_K21XlJg&h=Rnotg0Uy3CfaXM_Hfq4L2cu1RegF08fo_x15BPPCheg" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "a83172c9-8dcf-4ff2-8f9a-840920eed6a6" + ], + "x-ms-correlation-request-id": [ + "a83172c9-8dcf-4ff2-8f9a-840920eed6a6" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T155429Z:a83172c9-8dcf-4ff2-8f9a-840920eed6a6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 6A667CEC93F44AAA895A8204F5485BBC Ref B: SJC211051205037 Ref C: 2024-03-21T15:54:29Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:54:29 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1cz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pnc1dFemVEbC1xTE80QVBFWGF2RldQdHozM1RmRjYxYW95cGNMZHBSZDhkb2pSTFd2emlWTDYxMWFqZkprbndBa2d3TDR2X242V0REYzc1T0o4TE94a1ZJLVNVTy1uc1lLaVFPY3Y1WWpEREV3VGFLbjBKSGhrODJyd2QzbUdzcGZPVHJHcDlHSE1jRlJ4emtuUzBFd295SFpEMnlfeTB4Z0lsNzI0NnFCbi15N3FmN0xPdjR3c0FPZzlieXRaU3dMblFZM3ZRU190WElmZW1FZmIzTXFlZV9yd2dVSFNYMldwdDJZV3ZHTDFmY1dDWkRKMjZmV3BEZ3hjd0E0SmpTcTdJRDFQbFVZMDdORTg4bTV0OEN2alZXcl9pY05lZFQxTzUzLXpDX2ZrYmNqczJSU2k2b252T2JzQVk0RGVEOV9LMjFYbEpnJmg9Um5vdGcwVXkzQ2ZhWE1fSGZxNEwyY3UxUmVnRjA4Zm9feDE1QlBQQ2hlZw==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "23d70c17-6d8c-40c3-8548-aabddbf19ee8" + ], + "x-ms-correlation-request-id": [ + "23d70c17-6d8c-40c3-8548-aabddbf19ee8" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T155444Z:23d70c17-6d8c-40c3-8548-aabddbf19ee8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: D58153224FAF40B88038CCD8E4D2AB05 Ref B: SJC211051205037 Ref C: 2024-03-21T15:54:44Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:54:44 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/aeb5b02a-0f18-45a4-86d6-81808115cacf/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYwNzktRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01&t=638466332693697984&c=MIIHADCCBeigAwIBAgITfARnJNBquoML0OGeGQAABGck0DANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMjAxMjAwMjM1WhcNMjUwMTI2MjAwMjM1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjcJSudd5JiagCaO5L0tH9LHCwY_7Ckh7DuLuAEwTMuo1Tb9GahjQRXuBukNCRgQ6f58Xor0k2pYaRt3RUtnt-CmojofFxsp-hrVyQDhP0xkJ5GIrmJ6tZJJFXgoHW5h43ftb6F88cdehlofXBbjpemGdtFpGaINH4e8DcZAt21iMn9yOr0Tmg-z_2Ixj-TaVP7ttPQcKYAo1eiepXwMCT-I4ty_aieF4Qk_MxoPqnnypdMzIThkixWJRCEQvpYHwnbQQw5uyPgEAxKjHjERG2nlO2EIX7lGH_1fEojEYKGj84-8gHXFveahRVa6ZPij7XMWfXQZWdo2aj6sMRX8UCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxU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0tVeEFBYktmN1hET2w4aEhWRGhwSnhyNjRjRG9ocUdpTGp5N2FJNkFfelk1Wld6UUxNQ2RfV3h1WHU2ZUVjX2Zhb09NTDlsdWdoMU5rQVIydHZLZXZsZi1TMnhBRUx3RnlFM0RicmZfSkZPdXZBOE55N0o1WTQ3QTVHb3BidFpsamRuTVhrR2ZwVUVDS2lhWV9xMmlMcmxTeWhLMDkyNWJYNHp6M0xMRDkwM0haZWN0RXhvQ1hTWWIwJnM9eVFURUVMNGRyUThqLWpnc1dFemVEbC1xTE80QVBFWGF2RldQdHozM1RmRjYxYW95cGNMZHBSZDhkb2pSTFd2emlWTDYxMWFqZkprbndBa2d3TDR2X242V0REYzc1T0o4TE94a1ZJLVNVTy1uc1lLaVFPY3Y1WWpEREV3VGFLbjBKSGhrODJyd2QzbUdzcGZPVHJHcDlHSE1jRlJ4emtuUzBFd295SFpEMnlfeTB4Z0lsNzI0NnFCbi15N3FmN0xPdjR3c0FPZzlieXRaU3dMblFZM3ZRU190WElmZW1FZmIzTXFlZV9yd2dVSFNYMldwdDJZV3ZHTDFmY1dDWkRKMjZmV3BEZ3hjd0E0SmpTcTdJRDFQbFVZMDdORTg4bTV0OEN2alZXcl9pY05lZFQxTzUzLXpDX2ZrYmNqczJSU2k2b252T2JzQVk0RGVEOV9LMjFYbEpnJmg9Um5vdGcwVXkzQ2ZhWE1fSGZxNEwyY3UxUmVnRjA4Zm9feDE1QlBQQ2hlZw==", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/6.0.2824.12007", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22631", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.91" + ] + }, + "RequestBody": "", + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "c0b340f3-6a63-4a30-87fb-7fe27ca4cd21" + ], + "x-ms-correlation-request-id": [ + "c0b340f3-6a63-4a30-87fb-7fe27ca4cd21" + ], + "x-ms-routing-request-id": [ + "WESTUS:20240321T155445Z:c0b340f3-6a63-4a30-87fb-7fe27ca4cd21" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Cache": [ + "CONFIG_NOCACHE" + ], + "X-MSEdge-Ref": [ + "Ref A: 8BE01611A5284A308D206E9CAA0989BF Ref B: SJC211051205037 Ref C: 2024-03-21T15:54:44Z" + ], + "Date": [ + "Thu, 21 Mar 2024 15:54:45 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + } + ], + "Names": { + "Test-InvokeAzureByopipHubFirewall": [ + "ps6079", + "ps2276", + "ps2139", + "ps4026", + "ps2646", + "ps780" + ] + }, + "Variables": { + "SubscriptionId": "aeb5b02a-0f18-45a4-86d6-81808115cacf" + } +} \ No newline at end of file diff --git a/src/Network/Network/AzureFirewall/NewAzureFirewallCommand.cs b/src/Network/Network/AzureFirewall/NewAzureFirewallCommand.cs index 3adbfba8ac59..f3db3ff01d16 100644 --- a/src/Network/Network/AzureFirewall/NewAzureFirewallCommand.cs +++ b/src/Network/Network/AzureFirewall/NewAzureFirewallCommand.cs @@ -83,7 +83,6 @@ public class NewAzureFirewallCommand : AzureFirewallBaseCmdlet [Parameter( Mandatory = false, ValueFromPipelineByPropertyName = true, - ParameterSetName = "IpConfigurationParameterValues", HelpMessage = "One or more Public IP Addresses. The Public IP addresses must use Standard SKU and must belong to the same resource group as the Firewall.")] [ValidateNotNullOrEmpty] public PSPublicIpAddress[] PublicIpAddress { get; set; } @@ -302,6 +301,16 @@ private PSAzureFirewall CreateAzureFirewall() throw new ArgumentException("The Route Server is not supported on AZFW_Hub SKU Firewalls"); } + if (this.VirtualNetwork != null) + { + throw new ArgumentException("Virtual Network is not supported on AZFW_Hub sku Firewalls"); + } + + if (this.PublicIpAddress != null && this.HubIPAddress != null) + { + throw new ArgumentException("Public IP address can only be provided as part of PublicIps or HubIPAddresses. Not both at the same time."); + } + firewall = new PSAzureFirewall() { Name = this.Name, @@ -315,6 +324,11 @@ private PSAzureFirewall CreateAzureFirewall() EnableFatFlowLogging = (this.EnableFatFlowLogging.IsPresent ? "True" : null), EnableUDPLogOptimization = (this.EnableUDPLogOptimization.IsPresent ? "True" : null) }; + + if (this.PublicIpAddress != null) + { + firewall.AddIpAddressesForByopipHubFirewall(this.PublicIpAddress); + } } else { diff --git a/src/Network/Network/ChangeLog.md b/src/Network/Network/ChangeLog.md index 785ec5aa5a46..c9b42bbe6695 100644 --- a/src/Network/Network/ChangeLog.md +++ b/src/Network/Network/ChangeLog.md @@ -22,6 +22,7 @@ ## Version 7.4.1 * Fixed a bug caused by the introduction of the new property `GlobalConfiguration` in `PSApplicationGateway` +* Added support for Bring Your Own Public IP feature for Hub Firewalls ## Version 7.4.0 * Fixed a few minor issues diff --git a/src/Network/Network/Models/AzureFirewall/PSAzureFirewall.cs b/src/Network/Network/Models/AzureFirewall/PSAzureFirewall.cs index b03576bd7af7..dc88b7a571f1 100644 --- a/src/Network/Network/Models/AzureFirewall/PSAzureFirewall.cs +++ b/src/Network/Network/Models/AzureFirewall/PSAzureFirewall.cs @@ -386,6 +386,24 @@ public void RemovePublicIpAddress(PSPublicIpAddress publicIpAddress) } } + public void AddIpAddressesForByopipHubFirewall(PSPublicIpAddress[] publicIpAddresses) + { + this.IpConfigurations = new List(); + + if (publicIpAddresses != null && publicIpAddresses.Length > 0) + { + for (var i = 0; i < publicIpAddresses.Length; i++) + { + this.IpConfigurations.Add( + new PSAzureFirewallIpConfiguration + { + Name = $"{AzureFirewallIpConfigurationName}{i}", + PublicIpAddress = new PSResourceId { Id = publicIpAddresses[i].Id } + }); + } + } + } + #endregion // Ip Configuration Operations #region Application Rule Collections Operations From 216fce6ae396709ede2c1a493e29760e2172165a Mon Sep 17 00:00:00 2001 From: Vincent Dai <23257217+vidai-msft@users.noreply.github.com> Date: Mon, 1 Apr 2024 10:09:50 -0700 Subject: [PATCH 06/12] Add upcoming breaking changes for secrets detection (#24552) --- documentation/breaking-changes/upcoming-breaking-changes.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/documentation/breaking-changes/upcoming-breaking-changes.md b/documentation/breaking-changes/upcoming-breaking-changes.md index eef2e45f8434..7c0cb597b8b5 100644 --- a/documentation/breaking-changes/upcoming-breaking-changes.md +++ b/documentation/breaking-changes/upcoming-breaking-changes.md @@ -1,5 +1,11 @@ # Upcoming breaking changes in Azure PowerShell +## General + +- In the upcoming major release of Azure PowerShell (Az 12.0.0), the `DisplaySecretsWarning` configuration option will be activated by default. A warning message will be shown when secrets are detected in the output of a cmdlet. + For additional context, please visit [Hardening your defense in depth with secrets awareness in Azure command line tools](https://techcommunity.microsoft.com/t5/azure-tools-blog/hardening-your-defense-in-depth-with-secrets-awareness-in-azure/ba-p/4049883). + For command usage details, please refer to [Protect secrets in Azure PowerShell](https://go.microsoft.com/fwlink/?linkid=2258844). + ## Az.Accounts ### `Clear-AzConfig` From 1862a9ab2a4c1cecbc10da6d0ff8476146c4edc5 Mon Sep 17 00:00:00 2001 From: Azure PowerShell <65331932+azure-powershell-bot@users.noreply.github.com> Date: Tue, 2 Apr 2024 17:57:07 +0800 Subject: [PATCH 07/12] Move EdgeZones to main (#24569) --- .../EdgeZones.Autorest/Az.EdgeZones.csproj | 10 + .../Az.EdgeZones.format.ps1xml | 469 ++ .../EdgeZones.Autorest/Az.EdgeZones.psd1 | 23 + .../EdgeZones.Autorest/Az.EdgeZones.psm1 | 119 + src/EdgeZones/EdgeZones.Autorest/README.md | 80 + .../UX/Microsoft.EdgeZones/extendedZones.json | 108 + .../EdgeZones.Autorest/build-module.ps1 | 180 + .../EdgeZones.Autorest/check-dependencies.ps1 | 65 + .../create-model-cmdlets.ps1 | 262 + .../custom/Az.EdgeZones.custom.psm1 | 17 + .../EdgeZones.Autorest/custom/README.md | 41 + .../examples/Get-AzEdgeZonesExtendedZone.md | 44 + .../Register-AzEdgeZonesExtendedZone.md | 32 + .../Unregister-AzEdgeZonesExtendedZone.md | 31 + .../EdgeZones.Autorest/export-surface.ps1 | 41 + .../exports/Get-AzEdgeZonesExtendedZone.ps1 | 205 + .../exports/ProxyCmdletDefinitions.ps1 | 577 ++ .../EdgeZones.Autorest/exports/README.md | 20 + .../Register-AzEdgeZonesExtendedZone.ps1 | 201 + .../Unregister-AzEdgeZonesExtendedZone.ps1 | 201 + .../EdgeZones.Autorest/generate-help.ps1 | 74 + .../EdgeZones.Autorest/generate-portal-ux.ps1 | 374 ++ .../EdgeZones.Autorest/generated/Module.cs | 202 + .../generated/api/EdgeZones.cs | 1525 +++++ .../generated/api/Models/Any.PowerShell.cs | 156 + .../generated/api/Models/Any.TypeConverter.cs | 146 + .../generated/api/Models/Any.cs | 34 + .../generated/api/Models/Any.json.cs | 104 + .../Models/EdgeZonesIdentity.PowerShell.cs | 178 + .../Models/EdgeZonesIdentity.TypeConverter.cs | 157 + .../generated/api/Models/EdgeZonesIdentity.cs | 91 + .../api/Models/EdgeZonesIdentity.json.cs | 111 + .../Models/ErrorAdditionalInfo.PowerShell.cs | 172 + .../ErrorAdditionalInfo.TypeConverter.cs | 147 + .../api/Models/ErrorAdditionalInfo.cs | 80 + .../api/Models/ErrorAdditionalInfo.json.cs | 116 + .../api/Models/ErrorDetail.PowerShell.cs | 196 + .../api/Models/ErrorDetail.TypeConverter.cs | 147 + .../generated/api/Models/ErrorDetail.cs | 149 + .../generated/api/Models/ErrorDetail.json.cs | 147 + .../api/Models/ErrorResponse.PowerShell.cs | 208 + .../api/Models/ErrorResponse.TypeConverter.cs | 147 + .../generated/api/Models/ErrorResponse.cs | 151 + .../api/Models/ErrorResponse.json.cs | 111 + .../api/Models/ExtendedZone.PowerShell.cs | 334 + .../api/Models/ExtendedZone.TypeConverter.cs | 147 + .../generated/api/Models/ExtendedZone.cs | 358 ++ .../generated/api/Models/ExtendedZone.json.cs | 115 + .../ExtendedZoneListResult.PowerShell.cs | 172 + .../ExtendedZoneListResult.TypeConverter.cs | 147 + .../api/Models/ExtendedZoneListResult.cs | 77 + .../api/Models/ExtendedZoneListResult.json.cs | 121 + .../ExtendedZoneProperties.PowerShell.cs | 244 + .../ExtendedZoneProperties.TypeConverter.cs | 147 + .../api/Models/ExtendedZoneProperties.cs | 297 + .../api/Models/ExtendedZoneProperties.json.cs | 161 + .../api/Models/Operation.PowerShell.cs | 230 + .../api/Models/Operation.TypeConverter.cs | 146 + .../generated/api/Models/Operation.cs | 284 + .../generated/api/Models/Operation.json.cs | 128 + .../api/Models/OperationDisplay.PowerShell.cs | 188 + .../Models/OperationDisplay.TypeConverter.cs | 147 + .../generated/api/Models/OperationDisplay.cs | 153 + .../api/Models/OperationDisplay.json.cs | 126 + .../Models/OperationListResult.PowerShell.cs | 176 + .../OperationListResult.TypeConverter.cs | 147 + .../api/Models/OperationListResult.cs | 85 + .../api/Models/OperationListResult.json.cs | 127 + .../api/Models/ProxyResource.PowerShell.cs | 238 + .../api/Models/ProxyResource.TypeConverter.cs | 147 + .../generated/api/Models/ProxyResource.cs | 112 + .../api/Models/ProxyResource.json.cs | 110 + .../api/Models/Resource.PowerShell.cs | 238 + .../api/Models/Resource.TypeConverter.cs | 146 + .../generated/api/Models/Resource.cs | 239 + .../generated/api/Models/Resource.json.cs | 126 + .../api/Models/SystemData.PowerShell.cs | 204 + .../api/Models/SystemData.TypeConverter.cs | 146 + .../generated/api/Models/SystemData.cs | 158 + .../generated/api/Models/SystemData.json.cs | 116 + .../cmdlets/GetAzEdgeZonesExtendedZone_Get.cs | 486 ++ ...tAzEdgeZonesExtendedZone_GetViaIdentity.cs | 473 ++ .../GetAzEdgeZonesExtendedZone_List.cs | 498 ++ .../cmdlets/GetAzEdgeZonesOperation_List.cs | 477 ++ ...egisterAzEdgeZonesExtendedZone_Register.cs | 486 ++ ...geZonesExtendedZone_RegisterViaIdentity.cs | 476 ++ ...isterAzEdgeZonesExtendedZone_Unregister.cs | 486 ++ ...ZonesExtendedZone_UnregisterViaIdentity.cs | 476 ++ .../generated/runtime/AsyncCommandRuntime.cs | 832 +++ .../generated/runtime/AsyncJob.cs | 270 + .../runtime/AsyncOperationResponse.cs | 176 + .../Attributes/ExternalDocsAttribute.cs | 30 + .../PSArgumentCompleterAttribute.cs | 52 + .../BuildTime/Cmdlets/ExportCmdletSurface.cs | 113 + .../BuildTime/Cmdlets/ExportExampleStub.cs | 74 + .../BuildTime/Cmdlets/ExportFormatPs1xml.cs | 103 + .../BuildTime/Cmdlets/ExportHelpMarkdown.cs | 56 + .../BuildTime/Cmdlets/ExportModelSurface.cs | 117 + .../BuildTime/Cmdlets/ExportProxyCmdlet.cs | 180 + .../runtime/BuildTime/Cmdlets/ExportPsd1.cs | 193 + .../BuildTime/Cmdlets/ExportTestStub.cs | 197 + .../BuildTime/Cmdlets/GetCommonParameter.cs | 52 + .../BuildTime/Cmdlets/GetModuleGuid.cs | 31 + .../BuildTime/Cmdlets/GetScriptCmdlet.cs | 54 + .../runtime/BuildTime/CollectionExtensions.cs | 20 + .../runtime/BuildTime/MarkdownRenderer.cs | 122 + .../runtime/BuildTime/Models/PsFormatTypes.cs | 138 + .../BuildTime/Models/PsHelpMarkdownOutputs.cs | 199 + .../runtime/BuildTime/Models/PsHelpTypes.cs | 202 + .../BuildTime/Models/PsMarkdownTypes.cs | 329 + .../BuildTime/Models/PsProxyOutputs.cs | 662 ++ .../runtime/BuildTime/Models/PsProxyTypes.cs | 544 ++ .../runtime/BuildTime/PsAttributes.cs | 131 + .../runtime/BuildTime/PsExtensions.cs | 176 + .../generated/runtime/BuildTime/PsHelpers.cs | 105 + .../runtime/BuildTime/StringExtensions.cs | 24 + .../runtime/BuildTime/XmlExtensions.cs | 28 + .../generated/runtime/CmdInfoHandler.cs | 40 + .../generated/runtime/Context.cs | 33 + .../Conversions/ConversionException.cs | 17 + .../runtime/Conversions/IJsonConverter.cs | 13 + .../Conversions/Instances/BinaryConverter.cs | 24 + .../Conversions/Instances/BooleanConverter.cs | 13 + .../Instances/DateTimeConverter.cs | 18 + .../Instances/DateTimeOffsetConverter.cs | 15 + .../Conversions/Instances/DecimalConverter.cs | 16 + .../Conversions/Instances/DoubleConverter.cs | 13 + .../Conversions/Instances/EnumConverter.cs | 30 + .../Conversions/Instances/GuidConverter.cs | 15 + .../Instances/HashSet'1Converter.cs | 27 + .../Conversions/Instances/Int16Converter.cs | 13 + .../Conversions/Instances/Int32Converter.cs | 13 + .../Conversions/Instances/Int64Converter.cs | 13 + .../Instances/JsonArrayConverter.cs | 13 + .../Instances/JsonObjectConverter.cs | 13 + .../Conversions/Instances/SingleConverter.cs | 13 + .../Conversions/Instances/StringConverter.cs | 13 + .../Instances/TimeSpanConverter.cs | 15 + .../Conversions/Instances/UInt16Converter.cs | 13 + .../Conversions/Instances/UInt32Converter.cs | 13 + .../Conversions/Instances/UInt64Converter.cs | 13 + .../Conversions/Instances/UriConverter.cs | 15 + .../runtime/Conversions/JsonConverter.cs | 21 + .../Conversions/JsonConverterAttribute.cs | 18 + .../Conversions/JsonConverterFactory.cs | 91 + .../Conversions/StringLikeConverter.cs | 45 + .../Customizations/IJsonSerializable.cs | 263 + .../runtime/Customizations/JsonArray.cs | 13 + .../runtime/Customizations/JsonBoolean.cs | 16 + .../runtime/Customizations/JsonNode.cs | 21 + .../runtime/Customizations/JsonNumber.cs | 78 + .../runtime/Customizations/JsonObject.cs | 183 + .../runtime/Customizations/JsonString.cs | 34 + .../runtime/Customizations/XNodeArray.cs | 44 + .../generated/runtime/Debugging.cs | 28 + .../generated/runtime/DictionaryExtensions.cs | 33 + .../generated/runtime/EventData.cs | 78 + .../generated/runtime/EventDataExtensions.cs | 94 + .../generated/runtime/EventListener.cs | 247 + .../generated/runtime/Events.cs | 27 + .../generated/runtime/EventsExtensions.cs | 27 + .../generated/runtime/Extensions.cs | 117 + .../Extensions/StringBuilderExtensions.cs | 23 + .../Helpers/Extensions/TypeExtensions.cs | 61 + .../generated/runtime/Helpers/Seperator.cs | 11 + .../generated/runtime/Helpers/TypeDetails.cs | 116 + .../generated/runtime/Helpers/XHelper.cs | 75 + .../generated/runtime/HttpPipeline.cs | 88 + .../generated/runtime/HttpPipelineMocking.ps1 | 110 + .../generated/runtime/IAssociativeArray.cs | 24 + .../generated/runtime/IHeaderSerializable.cs | 14 + .../generated/runtime/ISendAsync.cs | 413 ++ .../generated/runtime/InfoAttribute.cs | 38 + .../generated/runtime/InputHandler.cs | 22 + .../generated/runtime/Iso/IsoDate.cs | 214 + .../generated/runtime/JsonType.cs | 18 + .../generated/runtime/MessageAttribute.cs | 350 + .../runtime/MessageAttributeHelper.cs | 184 + .../generated/runtime/Method.cs | 19 + .../generated/runtime/Models/JsonMember.cs | 83 + .../generated/runtime/Models/JsonModel.cs | 89 + .../runtime/Models/JsonModelCache.cs | 19 + .../runtime/Nodes/Collections/JsonArray.cs | 65 + .../Nodes/Collections/XImmutableArray.cs | 62 + .../runtime/Nodes/Collections/XList.cs | 64 + .../runtime/Nodes/Collections/XNodeArray.cs | 73 + .../runtime/Nodes/Collections/XSet.cs | 60 + .../generated/runtime/Nodes/JsonBoolean.cs | 42 + .../generated/runtime/Nodes/JsonDate.cs | 173 + .../generated/runtime/Nodes/JsonNode.cs | 250 + .../generated/runtime/Nodes/JsonNumber.cs | 109 + .../generated/runtime/Nodes/JsonObject.cs | 172 + .../generated/runtime/Nodes/JsonString.cs | 42 + .../generated/runtime/Nodes/XBinary.cs | 40 + .../generated/runtime/Nodes/XNull.cs | 15 + .../Parser/Exceptions/ParseException.cs | 24 + .../generated/runtime/Parser/JsonParser.cs | 180 + .../generated/runtime/Parser/JsonToken.cs | 66 + .../generated/runtime/Parser/JsonTokenizer.cs | 177 + .../generated/runtime/Parser/Location.cs | 43 + .../runtime/Parser/Readers/SourceReader.cs | 130 + .../generated/runtime/Parser/TokenReader.cs | 39 + .../generated/runtime/PipelineMocking.cs | 262 + .../runtime/Properties/Resources.Designer.cs | 5655 +++++++++++++++++ .../runtime/Properties/Resources.resx | 1747 +++++ .../generated/runtime/Response.cs | 27 + .../runtime/Serialization/JsonSerializer.cs | 350 + .../Serialization/PropertyTransformation.cs | 21 + .../Serialization/SerializationOptions.cs | 65 + .../generated/runtime/SerializationMode.cs | 18 + .../runtime/TypeConverterExtensions.cs | 261 + .../runtime/UndeclaredResponseException.cs | 112 + .../generated/runtime/Writers/JsonWriter.cs | 223 + .../generated/runtime/delegates.cs | 23 + .../EdgeZones.Autorest/help/Az.EdgeZones.md | 22 + .../help/Get-AzEdgeZonesExtendedZone.md | 159 + .../EdgeZones.Autorest/help/README.md | 11 + .../help/Register-AzEdgeZonesExtendedZone.md | 172 + .../Unregister-AzEdgeZonesExtendedZone.md | 172 + src/EdgeZones/EdgeZones.Autorest/how-to.md | 58 + .../internal/Az.EdgeZones.internal.psm1 | 38 + .../internal/Get-AzEdgeZonesOperation.ps1 | 125 + .../internal/ProxyCmdletDefinitions.ps1 | 125 + .../EdgeZones.Autorest/internal/README.md | 14 + .../EdgeZones.Autorest/pack-module.ps1 | 17 + .../EdgeZones.Autorest/run-module.ps1 | 62 + .../EdgeZones.Autorest/test-module.ps1 | 98 + ...Get-AzEdgeZonesExtendedZone.Recording.json | 190 + .../Get-AzEdgeZonesExtendedZone.Tests.ps1 | 39 + .../EdgeZones.Autorest/test/README.md | 17 + ...ter-AzEdgeZonesExtendedZone.Recording.json | 96 + ...Register-AzEdgeZonesExtendedZone.Tests.ps1 | 33 + ...ter-AzEdgeZonesExtendedZone.Recording.json | 143 + ...register-AzEdgeZonesExtendedZone.Tests.ps1 | 32 + .../EdgeZones.Autorest/test/env.json | 6 + .../EdgeZones.Autorest/test/loadEnv.ps1 | 29 + .../EdgeZones.Autorest/test/utils.ps1 | 59 + .../utils/Get-SubscriptionIdTestSafe.ps1 | 7 + .../utils/Unprotect-SecureString.ps1 | 16 + src/EdgeZones/EdgeZones.sln | 74 + src/EdgeZones/EdgeZones/Az.EdgeZones.psd1 | 133 + src/EdgeZones/EdgeZones/ChangeLog.md | 24 + src/EdgeZones/EdgeZones/EdgeZones.csproj | 28 + .../EdgeZones/Properties/AssemblyInfo.cs | 28 + src/EdgeZones/EdgeZones/help/Az.EdgeZones.md | 22 + .../help/Get-AzEdgeZonesExtendedZone.md | 174 + .../help/Register-AzEdgeZonesExtendedZone.md | 186 + .../Unregister-AzEdgeZonesExtendedZone.md | 186 + tools/CreateMappings_rules.json | 1750 ++--- 249 files changed, 40899 insertions(+), 873 deletions(-) create mode 100644 src/EdgeZones/EdgeZones.Autorest/Az.EdgeZones.csproj create mode 100644 src/EdgeZones/EdgeZones.Autorest/Az.EdgeZones.format.ps1xml create mode 100644 src/EdgeZones/EdgeZones.Autorest/Az.EdgeZones.psd1 create mode 100644 src/EdgeZones/EdgeZones.Autorest/Az.EdgeZones.psm1 create mode 100644 src/EdgeZones/EdgeZones.Autorest/README.md create mode 100644 src/EdgeZones/EdgeZones.Autorest/UX/Microsoft.EdgeZones/extendedZones.json create mode 100644 src/EdgeZones/EdgeZones.Autorest/build-module.ps1 create mode 100644 src/EdgeZones/EdgeZones.Autorest/check-dependencies.ps1 create mode 100644 src/EdgeZones/EdgeZones.Autorest/create-model-cmdlets.ps1 create mode 100644 src/EdgeZones/EdgeZones.Autorest/custom/Az.EdgeZones.custom.psm1 create mode 100644 src/EdgeZones/EdgeZones.Autorest/custom/README.md create mode 100644 src/EdgeZones/EdgeZones.Autorest/examples/Get-AzEdgeZonesExtendedZone.md create mode 100644 src/EdgeZones/EdgeZones.Autorest/examples/Register-AzEdgeZonesExtendedZone.md create mode 100644 src/EdgeZones/EdgeZones.Autorest/examples/Unregister-AzEdgeZonesExtendedZone.md create mode 100644 src/EdgeZones/EdgeZones.Autorest/export-surface.ps1 create mode 100644 src/EdgeZones/EdgeZones.Autorest/exports/Get-AzEdgeZonesExtendedZone.ps1 create mode 100644 src/EdgeZones/EdgeZones.Autorest/exports/ProxyCmdletDefinitions.ps1 create mode 100644 src/EdgeZones/EdgeZones.Autorest/exports/README.md create mode 100644 src/EdgeZones/EdgeZones.Autorest/exports/Register-AzEdgeZonesExtendedZone.ps1 create mode 100644 src/EdgeZones/EdgeZones.Autorest/exports/Unregister-AzEdgeZonesExtendedZone.ps1 create mode 100644 src/EdgeZones/EdgeZones.Autorest/generate-help.ps1 create mode 100644 src/EdgeZones/EdgeZones.Autorest/generate-portal-ux.ps1 create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/Module.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/EdgeZones.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Any.PowerShell.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Any.TypeConverter.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Any.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Any.json.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/EdgeZonesIdentity.PowerShell.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/EdgeZonesIdentity.TypeConverter.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/EdgeZonesIdentity.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/EdgeZonesIdentity.json.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorAdditionalInfo.PowerShell.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorAdditionalInfo.TypeConverter.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorAdditionalInfo.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorAdditionalInfo.json.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorDetail.PowerShell.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorDetail.TypeConverter.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorDetail.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorDetail.json.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorResponse.PowerShell.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorResponse.TypeConverter.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorResponse.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorResponse.json.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZone.PowerShell.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZone.TypeConverter.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZone.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZone.json.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZoneListResult.PowerShell.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZoneListResult.TypeConverter.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZoneListResult.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZoneListResult.json.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZoneProperties.PowerShell.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZoneProperties.TypeConverter.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZoneProperties.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZoneProperties.json.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Operation.PowerShell.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Operation.TypeConverter.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Operation.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Operation.json.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/OperationDisplay.PowerShell.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/OperationDisplay.TypeConverter.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/OperationDisplay.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/OperationDisplay.json.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/OperationListResult.PowerShell.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/OperationListResult.TypeConverter.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/OperationListResult.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/OperationListResult.json.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ProxyResource.PowerShell.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ProxyResource.TypeConverter.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ProxyResource.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ProxyResource.json.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Resource.PowerShell.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Resource.TypeConverter.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Resource.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Resource.json.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/SystemData.PowerShell.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/SystemData.TypeConverter.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/SystemData.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/api/Models/SystemData.json.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/cmdlets/GetAzEdgeZonesExtendedZone_Get.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/cmdlets/GetAzEdgeZonesExtendedZone_GetViaIdentity.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/cmdlets/GetAzEdgeZonesExtendedZone_List.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/cmdlets/GetAzEdgeZonesOperation_List.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/cmdlets/RegisterAzEdgeZonesExtendedZone_Register.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/cmdlets/RegisterAzEdgeZonesExtendedZone_RegisterViaIdentity.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/cmdlets/UnregisterAzEdgeZonesExtendedZone_Unregister.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/cmdlets/UnregisterAzEdgeZonesExtendedZone_UnregisterViaIdentity.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/AsyncCommandRuntime.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/AsyncJob.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/AsyncOperationResponse.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Attributes/ExternalDocsAttribute.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Attributes/PSArgumentCompleterAttribute.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Cmdlets/ExportCmdletSurface.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Cmdlets/ExportExampleStub.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Cmdlets/ExportHelpMarkdown.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Cmdlets/GetCommonParameter.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Cmdlets/GetModuleGuid.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Cmdlets/GetScriptCmdlet.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/CollectionExtensions.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Models/PsFormatTypes.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Models/PsHelpMarkdownOutputs.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Models/PsHelpTypes.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/PsAttributes.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/PsExtensions.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/PsHelpers.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/StringExtensions.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/XmlExtensions.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/CmdInfoHandler.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Context.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/ConversionException.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/IJsonConverter.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/BinaryConverter.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/BooleanConverter.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/DateTimeConverter.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/DateTimeOffsetConverter.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/DecimalConverter.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/DoubleConverter.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/EnumConverter.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/GuidConverter.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/HashSet'1Converter.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/Int16Converter.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/Int32Converter.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/Int64Converter.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/JsonArrayConverter.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/JsonObjectConverter.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/SingleConverter.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/StringConverter.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/TimeSpanConverter.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/UInt16Converter.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/UInt32Converter.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/UInt64Converter.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/UriConverter.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/JsonConverter.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/JsonConverterAttribute.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/JsonConverterFactory.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/StringLikeConverter.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Customizations/IJsonSerializable.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Customizations/JsonArray.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Customizations/JsonBoolean.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Customizations/JsonNode.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Customizations/JsonNumber.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Customizations/JsonObject.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Customizations/JsonString.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Customizations/XNodeArray.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Debugging.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/DictionaryExtensions.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/EventData.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/EventDataExtensions.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/EventListener.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Events.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/EventsExtensions.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Extensions.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Helpers/Extensions/StringBuilderExtensions.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Helpers/Extensions/TypeExtensions.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Helpers/Seperator.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Helpers/TypeDetails.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Helpers/XHelper.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/HttpPipeline.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/HttpPipelineMocking.ps1 create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/IAssociativeArray.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/IHeaderSerializable.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/ISendAsync.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/InfoAttribute.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/InputHandler.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Iso/IsoDate.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/JsonType.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/MessageAttribute.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/MessageAttributeHelper.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Method.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Models/JsonMember.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Models/JsonModel.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Models/JsonModelCache.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/Collections/JsonArray.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/Collections/XImmutableArray.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/Collections/XList.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/Collections/XNodeArray.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/Collections/XSet.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/JsonBoolean.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/JsonDate.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/JsonNode.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/JsonNumber.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/JsonObject.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/JsonString.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/XBinary.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/XNull.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Parser/Exceptions/ParseException.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Parser/JsonParser.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Parser/JsonToken.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Parser/JsonTokenizer.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Parser/Location.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Parser/Readers/SourceReader.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Parser/TokenReader.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/PipelineMocking.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Properties/Resources.Designer.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Properties/Resources.resx create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Response.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Serialization/JsonSerializer.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Serialization/PropertyTransformation.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Serialization/SerializationOptions.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/SerializationMode.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/TypeConverterExtensions.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/UndeclaredResponseException.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/Writers/JsonWriter.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/generated/runtime/delegates.cs create mode 100644 src/EdgeZones/EdgeZones.Autorest/help/Az.EdgeZones.md create mode 100644 src/EdgeZones/EdgeZones.Autorest/help/Get-AzEdgeZonesExtendedZone.md create mode 100644 src/EdgeZones/EdgeZones.Autorest/help/README.md create mode 100644 src/EdgeZones/EdgeZones.Autorest/help/Register-AzEdgeZonesExtendedZone.md create mode 100644 src/EdgeZones/EdgeZones.Autorest/help/Unregister-AzEdgeZonesExtendedZone.md create mode 100644 src/EdgeZones/EdgeZones.Autorest/how-to.md create mode 100644 src/EdgeZones/EdgeZones.Autorest/internal/Az.EdgeZones.internal.psm1 create mode 100644 src/EdgeZones/EdgeZones.Autorest/internal/Get-AzEdgeZonesOperation.ps1 create mode 100644 src/EdgeZones/EdgeZones.Autorest/internal/ProxyCmdletDefinitions.ps1 create mode 100644 src/EdgeZones/EdgeZones.Autorest/internal/README.md create mode 100644 src/EdgeZones/EdgeZones.Autorest/pack-module.ps1 create mode 100644 src/EdgeZones/EdgeZones.Autorest/run-module.ps1 create mode 100644 src/EdgeZones/EdgeZones.Autorest/test-module.ps1 create mode 100644 src/EdgeZones/EdgeZones.Autorest/test/Get-AzEdgeZonesExtendedZone.Recording.json create mode 100644 src/EdgeZones/EdgeZones.Autorest/test/Get-AzEdgeZonesExtendedZone.Tests.ps1 create mode 100644 src/EdgeZones/EdgeZones.Autorest/test/README.md create mode 100644 src/EdgeZones/EdgeZones.Autorest/test/Register-AzEdgeZonesExtendedZone.Recording.json create mode 100644 src/EdgeZones/EdgeZones.Autorest/test/Register-AzEdgeZonesExtendedZone.Tests.ps1 create mode 100644 src/EdgeZones/EdgeZones.Autorest/test/Unregister-AzEdgeZonesExtendedZone.Recording.json create mode 100644 src/EdgeZones/EdgeZones.Autorest/test/Unregister-AzEdgeZonesExtendedZone.Tests.ps1 create mode 100644 src/EdgeZones/EdgeZones.Autorest/test/env.json create mode 100644 src/EdgeZones/EdgeZones.Autorest/test/loadEnv.ps1 create mode 100644 src/EdgeZones/EdgeZones.Autorest/test/utils.ps1 create mode 100644 src/EdgeZones/EdgeZones.Autorest/utils/Get-SubscriptionIdTestSafe.ps1 create mode 100644 src/EdgeZones/EdgeZones.Autorest/utils/Unprotect-SecureString.ps1 create mode 100644 src/EdgeZones/EdgeZones.sln create mode 100644 src/EdgeZones/EdgeZones/Az.EdgeZones.psd1 create mode 100644 src/EdgeZones/EdgeZones/ChangeLog.md create mode 100644 src/EdgeZones/EdgeZones/EdgeZones.csproj create mode 100644 src/EdgeZones/EdgeZones/Properties/AssemblyInfo.cs create mode 100644 src/EdgeZones/EdgeZones/help/Az.EdgeZones.md create mode 100644 src/EdgeZones/EdgeZones/help/Get-AzEdgeZonesExtendedZone.md create mode 100644 src/EdgeZones/EdgeZones/help/Register-AzEdgeZonesExtendedZone.md create mode 100644 src/EdgeZones/EdgeZones/help/Unregister-AzEdgeZonesExtendedZone.md diff --git a/src/EdgeZones/EdgeZones.Autorest/Az.EdgeZones.csproj b/src/EdgeZones/EdgeZones.Autorest/Az.EdgeZones.csproj new file mode 100644 index 000000000000..b11a7d911a12 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/Az.EdgeZones.csproj @@ -0,0 +1,10 @@ + + + EdgeZones + EdgeZones + EdgeZones.Autorest + + + + + diff --git a/src/EdgeZones/EdgeZones.Autorest/Az.EdgeZones.format.ps1xml b/src/EdgeZones/EdgeZones.Autorest/Az.EdgeZones.format.ps1xml new file mode 100644 index 000000000000..074216bda612 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/Az.EdgeZones.format.ps1xml @@ -0,0 +1,469 @@ + + + + + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.EdgeZonesIdentity + + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.EdgeZonesIdentity#Multiple + + + + + + + + + + + + + + + ExtendedZoneName + + + SubscriptionId + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ErrorDetail + + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ErrorDetail#Multiple + + + + + + + + + + + + + + + + + + Code + + + Message + + + Target + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ExtendedZone + + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ExtendedZone#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ExtendedZoneListResult + + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ExtendedZoneListResult#Multiple + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ExtendedZoneProperties + + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ExtendedZoneProperties#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DisplayName + + + Geography + + + GeographyGroup + + + HomeLocation + + + Latitude + + + Longitude + + + ProvisioningState + + + RegionCategory + + + RegionType + + + RegionalDisplayName + + + RegistrationState + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.Operation + + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.Operation#Multiple + + + + + + + + + + + + + + + + + + + + + ActionType + + + IsDataAction + + + Name + + + Origin + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.OperationDisplay + + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.OperationDisplay#Multiple + + + + + + + + + + + + + + + + + + + + + Description + + + Operation + + + Provider + + + Resource + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.OperationListResult + + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.OperationListResult#Multiple + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ProxyResource + + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ProxyResource#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.Resource + + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.Resource#Multiple + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.SystemData + + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.SystemData#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + CreatedAt + + + CreatedBy + + + CreatedByType + + + LastModifiedAt + + + LastModifiedBy + + + LastModifiedByType + + + + + + + + \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/Az.EdgeZones.psd1 b/src/EdgeZones/EdgeZones.Autorest/Az.EdgeZones.psd1 new file mode 100644 index 000000000000..7b1482b372ad --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/Az.EdgeZones.psd1 @@ -0,0 +1,23 @@ +@{ + GUID = '40bf94d1-ec66-4236-9396-2eac6bd6b1fe' + RootModule = './Az.EdgeZones.psm1' + ModuleVersion = '0.1.0' + CompatiblePSEditions = 'Core', 'Desktop' + Author = 'Microsoft Corporation' + CompanyName = 'Microsoft Corporation' + Copyright = 'Microsoft Corporation. All rights reserved.' + Description = 'Microsoft Azure PowerShell: EdgeZones cmdlets' + PowerShellVersion = '5.1' + DotNetFrameworkVersion = '4.7.2' + RequiredAssemblies = './bin/Az.EdgeZones.private.dll' + FormatsToProcess = './Az.EdgeZones.format.ps1xml' + FunctionsToExport = 'Get-AzEdgeZonesExtendedZone', 'Register-AzEdgeZonesExtendedZone', 'Unregister-AzEdgeZonesExtendedZone' + PrivateData = @{ + PSData = @{ + Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'EdgeZones' + LicenseUri = 'https://aka.ms/azps-license' + ProjectUri = 'https://github.com/Azure/azure-powershell' + ReleaseNotes = '' + } + } +} diff --git a/src/EdgeZones/EdgeZones.Autorest/Az.EdgeZones.psm1 b/src/EdgeZones/EdgeZones.Autorest/Az.EdgeZones.psm1 new file mode 100644 index 000000000000..fcba7b3e0ca3 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/Az.EdgeZones.psm1 @@ -0,0 +1,119 @@ +# region Generated + # ---------------------------------------------------------------------------------- + # Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. + # ---------------------------------------------------------------------------------- + # Load required Az.Accounts module + $accountsName = 'Az.Accounts' + $accountsModule = Get-Module -Name $accountsName + if(-not $accountsModule) { + $localAccountsPath = Join-Path $PSScriptRoot 'generated\modules' + if(Test-Path -Path $localAccountsPath) { + $localAccounts = Get-ChildItem -Path $localAccountsPath -Recurse -Include 'Az.Accounts.psd1' | Select-Object -Last 1 + if($localAccounts) { + $accountsModule = Import-Module -Name ($localAccounts.FullName) -Scope Global -PassThru + } + } + if(-not $accountsModule) { + $hasAdequateVersion = (Get-Module -Name $accountsName -ListAvailable | Where-Object { $_.Version -ge [System.Version]'2.7.5' } | Measure-Object).Count -gt 0 + if($hasAdequateVersion) { + $accountsModule = Import-Module -Name $accountsName -MinimumVersion 2.7.5 -Scope Global -PassThru + } + } + } + + if(-not $accountsModule) { + Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. For installation instructions, please see: https://learn.microsoft.com/powershell/azure/install-az-ps" -ErrorAction Stop + } elseif (($accountsModule.Version -lt [System.Version]'2.7.5') -and (-not $localAccounts)) { + Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to add the switch '-RegenerateSupportModule' when executing 'test-module.ps1'. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop + } + Write-Information "Loaded Module '$($accountsModule.Name)'" + + # Load the private module dll + $null = Import-Module -Name (Join-Path $PSScriptRoot './bin/Az.EdgeZones.private.dll') + + # Get the private module's instance + $instance = [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module]::Instance + + # Ask for the shared functionality table + $VTable = Register-AzModule + + # Tweaks the pipeline on module load + $instance.OnModuleLoad = $VTable.OnModuleLoad + + # Following two delegates are added for telemetry + $instance.GetTelemetryId = $VTable.GetTelemetryId + $instance.Telemetry = $VTable.Telemetry + + # Delegate to sanitize the output object + $instance.SanitizeOutput = $VTable.SanitizerHandler + + # Delegate to get the telemetry info + $instance.GetTelemetryInfo = $VTable.GetTelemetryInfo + + # Tweaks the pipeline per call + $instance.OnNewRequest = $VTable.OnNewRequest + + # Gets shared parameter values + $instance.GetParameterValue = $VTable.GetParameterValue + + # Allows shared module to listen to events from this module + $instance.EventListener = $VTable.EventListener + + # Gets shared argument completers + $instance.ArgumentCompleter = $VTable.ArgumentCompleter + + # The name of the currently selected Azure profile + $instance.ProfileName = $VTable.ProfileName + + # Load the custom module + $customModulePath = Join-Path $PSScriptRoot './custom/Az.EdgeZones.custom.psm1' + if(Test-Path $customModulePath) { + $null = Import-Module -Name $customModulePath + } + + # Export nothing to clear implicit exports + Export-ModuleMember + + # Export proxy cmdlet scripts + $exportsPath = Join-Path $PSScriptRoot './exports' + $directories = Get-ChildItem -Directory -Path $exportsPath + $profileDirectory = $null + if($instance.ProfileName) { + if(($directories | ForEach-Object { $_.Name }) -contains $instance.ProfileName) { + $profileDirectory = $directories | Where-Object { $_.Name -eq $instance.ProfileName } + } else { + # Don't export anything if the profile doesn't exist for the module + $exportsPath = $null + Write-Warning "Selected Azure profile '$($instance.ProfileName)' does not exist for module '$($instance.Name)'. No cmdlets were loaded." + } + } elseif(($directories | Measure-Object).Count -gt 0) { + # Load the last folder if no profile is selected + $profileDirectory = $directories | Select-Object -Last 1 + } + + if($profileDirectory) { + Write-Information "Loaded Azure profile '$($profileDirectory.Name)' for module '$($instance.Name)'" + $exportsPath = $profileDirectory.FullName + } + + if($exportsPath) { + Get-ChildItem -Path $exportsPath -Recurse -Include '*.ps1' -File | ForEach-Object { . $_.FullName } + $cmdletNames = Get-ScriptCmdlet -ScriptFolder $exportsPath + Export-ModuleMember -Function $cmdletNames -Alias (Get-ScriptCmdlet -ScriptFolder $exportsPath -AsAlias) + } + + # Finalize initialization of this module + $instance.Init(); + Write-Information "Loaded Module '$($instance.Name)'" +# endregion diff --git a/src/EdgeZones/EdgeZones.Autorest/README.md b/src/EdgeZones/EdgeZones.Autorest/README.md new file mode 100644 index 000000000000..bc573f479994 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/README.md @@ -0,0 +1,80 @@ + +# Az.EdgeZones +This directory contains the PowerShell module for the EdgeZones service. + +--- +## Info +- Modifiable: yes +- Generated: all +- Committed: yes +- Packaged: yes + +--- +## Detail +This module was primarily generated via [AutoRest](https://github.com/Azure/autorest) using the [PowerShell](https://github.com/Azure/autorest.powershell) extension. + +## Module Requirements +- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version 2.7.5 or greater + +## Authentication +AutoRest does not generate authentication code for the module. Authentication is handled via Az.Accounts by altering the HTTP payload before it is sent. + +## Development +For information on how to develop for `Az.EdgeZones`, see [how-to.md](how-to.md). + + +### AutoRest Configuration +> see https://aka.ms/autorest + +```yaml +# pin the swagger version by using the commit id instead of branch name +commit: 2d973fccf9f28681a481e9760fa12b2334216e21 +require: +# readme.azure.noprofile.md is the common configuration file + - $(this-folder)/../../readme.azure.noprofile.md + - $(repo)/specification/edgezones/resource-manager/readme.md +# If the swagger has not been put in the repo, you may uncomment the following line and refer to it locally +# - (this-folder)/relative-path-to-your-local-readme.md + +try-require: + - $(repo)/specification/edgezones/resource-manager/readme.powershell.md + +# For new RP, the version is 0.1.0 +module-version: 0.1.0 +# Normally, title is the service name +title: EdgeZones +subject-prefix: $(service-name) + +# The next three configurations are exclusive to v3, and in v4, they are activated by default. If you are still using v3, please uncomment them. +# identity-correction-for-post: true +# resourcegroup-append: true +# nested-object-to-string: true + +directive: + # Following are common directives which are normally required in all the RPs + # 1. Remove the unexpanded parameter set + # 2. For New-* cmdlets, ViaIdentity is not required + # Following two directives are v4 specific + - where: + variant: ^(Create|Update)(?!.*?(Expanded|JsonFilePath|JsonString)) + remove: true + - where: + variant: ^CreateViaIdentity.*$ + remove: true + # Follow directive is v3 specific. If you are using v3, uncomment following directive and comments out two directives above + #- where: + # variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$ + # remove: true + + # Remove the set-* cmdlet + - where: + verb: Set + remove: true + + # Add preview announcement + - where: + subject: EdgeZones + set: + preview-announcement: + preview-message: This is a preview version of Azure Extended Zones. +``` diff --git a/src/EdgeZones/EdgeZones.Autorest/UX/Microsoft.EdgeZones/extendedZones.json b/src/EdgeZones/EdgeZones.Autorest/UX/Microsoft.EdgeZones/extendedZones.json new file mode 100644 index 000000000000..36f0c5338946 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/UX/Microsoft.EdgeZones/extendedZones.json @@ -0,0 +1,108 @@ +{ + "resourceType": "extendedZones", + "apiVersion": "2024-04-01-preview", + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.edgezones" + }, + "commands": [ + { + "name": "Get-AzEdgeZonesExtendedZone", + "description": "Gets an Azure Extended Zone for a subscription", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.EdgeZones/extendedZones/{extendedZoneName}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.edgezones/get-azedgezonesextendedzone" + }, + "parameterSets": [ + { + "parameters": [ + "-Name ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Gets an Azure Extended Zone for a subscription", + "parameters": [ + { + "name": "-Name", + "value": "[Path.extendedZoneName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + }, + { + "name": "Register-AzEdgeZonesExtendedZone", + "description": "Registers a subscription for an Extended Zone", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.EdgeZones/extendedZones/{extendedZoneName}/register", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.edgezones/register-azedgezonesextendedzone" + }, + "parameterSets": [ + { + "parameters": [ + "-Name ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Registers a subscription for an Extended Zone", + "parameters": [ + { + "name": "-Name", + "value": "[Path.extendedZoneName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + }, + { + "name": "Unregister-AzEdgeZonesExtendedZone", + "description": "Unregisters a subscription for an Extended Zone", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.EdgeZones/extendedZones/{extendedZoneName}/unregister", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.edgezones/unregister-azedgezonesextendedzone" + }, + "parameterSets": [ + { + "parameters": [ + "-Name ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Unregisters a subscription for an Extended Zone", + "parameters": [ + { + "name": "-Name", + "value": "[Path.extendedZoneName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + } + ] +} diff --git a/src/EdgeZones/EdgeZones.Autorest/build-module.ps1 b/src/EdgeZones/EdgeZones.Autorest/build-module.ps1 new file mode 100644 index 000000000000..31816d419919 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/build-module.ps1 @@ -0,0 +1,180 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- +param([switch]$NotIsolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs, [switch]$UX) +$ErrorActionPreference = 'Stop' + +if($PSEdition -ne 'Core') { + Write-Error 'This script requires PowerShell Core to execute. [Note] Generated cmdlets will work in both PowerShell Core or Windows PowerShell.' +} + +if(-not $NotIsolated -and -not $Debugger) { + Write-Host -ForegroundColor Green 'Creating isolated process...' + $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path + & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated + + if($LastExitCode -ne 0) { + # Build failed. Don't attempt to run the module. + return + } + + if($Test) { + . (Join-Path $PSScriptRoot 'test-module.ps1') + if($LastExitCode -ne 0) { + # Tests failed. Don't attempt to run the module. + return + } + } + + if($Docs) { + . (Join-Path $PSScriptRoot 'generate-help.ps1') + if($LastExitCode -ne 0) { + # Docs generation failed. Don't attempt to run the module. + return + } + } + + if($UX) { + . (Join-Path $PSScriptRoot 'generate-portal-ux.ps1') + if($LastExitCode -ne 0) { + # UX generation failed. Don't attempt to run the module. + return + } + } + + if($Pack) { + . (Join-Path $PSScriptRoot 'pack-module.ps1') + if($LastExitCode -ne 0) { + # Packing failed. Don't attempt to run the module. + return + } + } + + $runModulePath = Join-Path $PSScriptRoot 'run-module.ps1' + if($Code) { + . $runModulePath -Code + } elseif($Run) { + . $runModulePath + } else { + Write-Host -ForegroundColor Cyan "To run this module in an isolated PowerShell session, run the 'run-module.ps1' script or provide the '-Run' parameter to this script." + } + return +} + +$binFolder = Join-Path $PSScriptRoot 'bin' +$objFolder = Join-Path $PSScriptRoot 'obj' + +if(-not $Debugger) { + Write-Host -ForegroundColor Green 'Cleaning build folders...' + $null = Remove-Item -Recurse -ErrorAction SilentlyContinue -Path $binFolder, $objFolder + + if((Test-Path $binFolder) -or (Test-Path $objFolder)) { + Write-Host -ForegroundColor Cyan 'Did you forget to exit your isolated module session before rebuilding?' + Write-Error 'Unable to clean ''bin'' or ''obj'' folder. A process may have an open handle.' + } + + Write-Host -ForegroundColor Green 'Compiling module...' + $buildConfig = 'Debug' + if($Release) { + $buildConfig = 'Release' + } + dotnet publish $PSScriptRoot --verbosity quiet --configuration $buildConfig /nologo + if($LastExitCode -ne 0) { + Write-Error 'Compilation failed.' + } + + $null = Remove-Item -Recurse -ErrorAction SilentlyContinue -Path (Join-Path $binFolder 'Debug'), (Join-Path $binFolder 'Release') +} + +$dll = Join-Path $PSScriptRoot 'bin\Az.EdgeZones.private.dll' +if(-not (Test-Path $dll)) { + Write-Error "Unable to find output assembly in '$binFolder'." +} + +# Load DLL to use build-time cmdlets +$null = Import-Module -Name $dll + +$modulePaths = $dll +$customPsm1 = Join-Path $PSScriptRoot 'custom\Az.EdgeZones.custom.psm1' +if(Test-Path $customPsm1) { + $modulePaths = @($dll, $customPsm1) +} + +$exportsFolder = Join-Path $PSScriptRoot 'exports' +if(Test-Path $exportsFolder) { + $null = Get-ChildItem -Path $exportsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue +} +$null = New-Item -ItemType Directory -Force -Path $exportsFolder + +$internalFolder = Join-Path $PSScriptRoot 'internal' +if(Test-Path $internalFolder) { + $null = Get-ChildItem -Path $internalFolder -Recurse -Exclude '*.psm1', 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue +} +$null = New-Item -ItemType Directory -Force -Path $internalFolder + +$psd1 = Join-Path $PSScriptRoot './Az.EdgeZones.psd1' +$guid = Get-ModuleGuid -Psd1Path $psd1 +$moduleName = 'Az.EdgeZones' +$examplesFolder = Join-Path $PSScriptRoot 'examples' +$null = New-Item -ItemType Directory -Force -Path $examplesFolder + +Write-Host -ForegroundColor Green 'Creating cmdlets for specified models...' +$modelCmdlets = @() +$modelCmdletFolder = Join-Path (Join-Path $PSScriptRoot './custom') 'autogen-model-cmdlets' +if (Test-Path $modelCmdletFolder) { + $null = Remove-Item -Force -Recurse -Path $modelCmdletFolder +} +if ($modelCmdlets.Count -gt 0) { + . (Join-Path $PSScriptRoot 'create-model-cmdlets.ps1') + CreateModelCmdlet($modelCmdlets) +} + +if($NoDocs) { + Write-Host -ForegroundColor Green 'Creating exports...' + Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ExcludeDocs -ExamplesFolder $examplesFolder +} else { + Write-Host -ForegroundColor Green 'Creating exports and docs...' + $moduleDescription = 'Microsoft Azure PowerShell: EdgeZones cmdlets' + $docsFolder = Join-Path $PSScriptRoot 'docs' + if(Test-Path $docsFolder) { + $null = Get-ChildItem -Path $docsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue + } + $null = New-Item -ItemType Directory -Force -Path $docsFolder + $addComplexInterfaceInfo = ![System.Convert]::ToBoolean('true') + Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid -AddComplexInterfaceInfo:$addComplexInterfaceInfo +} + +Write-Host -ForegroundColor Green 'Creating format.ps1xml...' +$formatPs1xml = Join-Path $PSScriptRoot './Az.EdgeZones.format.ps1xml' +Export-FormatPs1xml -FilePath $formatPs1xml + +Write-Host -ForegroundColor Green 'Creating psd1...' +$customFolder = Join-Path $PSScriptRoot 'custom' +Export-Psd1 -ExportsFolder $exportsFolder -CustomFolder $customFolder -Psd1Path $psd1 -ModuleGuid $guid + +Write-Host -ForegroundColor Green 'Creating test stubs...' +$testFolder = Join-Path $PSScriptRoot 'test' +$null = New-Item -ItemType Directory -Force -Path $testFolder +Export-TestStub -ModuleName $moduleName -ExportsFolder $exportsFolder -OutputFolder $testFolder + +Write-Host -ForegroundColor Green 'Creating example stubs...' +Export-ExampleStub -ExportsFolder $exportsFolder -OutputFolder $examplesFolder + +if (Test-Path (Join-Path $PSScriptRoot 'generate-portal-ux.ps1')) +{ + Write-Host -ForegroundColor Green 'Creating ux metadata...' + . (Join-Path $PSScriptRoot 'generate-portal-ux.ps1') +} + +Write-Host -ForegroundColor Green '-------------Done-------------' diff --git a/src/EdgeZones/EdgeZones.Autorest/check-dependencies.ps1 b/src/EdgeZones/EdgeZones.Autorest/check-dependencies.ps1 new file mode 100644 index 000000000000..90ca9867ae40 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/check-dependencies.ps1 @@ -0,0 +1,65 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- +param([switch]$NotIsolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources) +$ErrorActionPreference = 'Stop' + +if(-not $NotIsolated) { + Write-Host -ForegroundColor Green 'Creating isolated process...' + $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path + & "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated + return +} + +function DownloadModule ([bool]$predicate, [string]$path, [string]$moduleName, [string]$versionMinimum, [string]$requiredVersion) { + if($predicate) { + $module = Get-Module -ListAvailable -Name $moduleName + if((-not $module) -or ($versionMinimum -and ($module | ForEach-Object { $_.Version } | Where-Object { $_ -ge [System.Version]$versionMinimum } | Measure-Object).Count -eq 0) -or ($requiredVersion -and ($module | ForEach-Object { $_.Version } | Where-Object { $_ -eq [System.Version]$requiredVersion } | Measure-Object).Count -eq 0)) { + $null = New-Item -ItemType Directory -Force -Path $path + Write-Host -ForegroundColor Green "Installing local $moduleName module into '$path'..." + if ($requiredVersion) { + Find-Module -Name $moduleName -RequiredVersion $requiredVersion -Repository PSGallery | Save-Module -Path $path + }elseif($versionMinimum) { + Find-Module -Name $moduleName -MinimumVersion $versionMinimum -Repository PSGallery | Save-Module -Path $path + } else { + Find-Module -Name $moduleName -Repository PSGallery | Save-Module -Path $path + } + } + } +} + +$ProgressPreference = 'SilentlyContinue' +$all = (@($Accounts.IsPresent, $Pester.IsPresent) | Select-Object -Unique | Measure-Object).Count -eq 1 + +$localModulesPath = Join-Path $PSScriptRoot 'generated\modules' +if(Test-Path -Path $localModulesPath) { + $env:PSModulePath = "$localModulesPath$([IO.Path]::PathSeparator)$env:PSModulePath" +} + +DownloadModule -predicate ($all -or $Accounts) -path $localModulesPath -moduleName 'Az.Accounts' -versionMinimum '2.7.5' +DownloadModule -predicate ($all -or $Pester) -path $localModulesPath -moduleName 'Pester' -requiredVersion '4.10.1' + +$tools = Join-Path $PSScriptRoot 'tools' +$resourceDir = Join-Path $tools 'Resources' +$resourceModule = Join-Path $HOME '.PSSharedModules\Resources\Az.Resources.TestSupport.psm1' + +if ($Resources.IsPresent -and ((-not (Test-Path -Path $resourceModule)) -or $RegenerateSupportModule.IsPresent)) { + Write-Host -ForegroundColor Green "Building local Resource module used for test..." + Set-Location $resourceDir + $null = autorest .\README.md --use:@autorest/powershell@3.0.414 --output-folder=$HOME/.PSSharedModules/Resources + $null = Copy-Item custom/* $HOME/.PSSharedModules/Resources/custom/ + Set-Location $HOME/.PSSharedModules/Resources + $null = .\build-module.ps1 + Set-Location $PSScriptRoot +} diff --git a/src/EdgeZones/EdgeZones.Autorest/create-model-cmdlets.ps1 b/src/EdgeZones/EdgeZones.Autorest/create-model-cmdlets.ps1 new file mode 100644 index 000000000000..c8d8aaade00a --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/create-model-cmdlets.ps1 @@ -0,0 +1,262 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +function CreateModelCmdlet { + + param([Hashtable[]]$Models) + + if ($Models.Count -eq 0) + { + return + } + + $ModelCsPath = Join-Path (Join-Path $PSScriptRoot 'generated\api') 'Models' + $OutputDir = Join-Path $PSScriptRoot 'custom\autogen-model-cmdlets' + $null = New-Item -ItemType Directory -Force -Path $OutputDir + if (''.length -gt 0) { + $ModuleName = '' + } else { + $ModuleName = 'Az.EdgeZones' + } + $CsFiles = Get-ChildItem -Path $ModelCsPath -Recurse -Filter *.cs + $Content = '' + $null = $CsFiles | ForEach-Object -Process { if ($_.Name.Split('.').count -eq 2 ) + { $Content += get-content $_.fullname -raw + } } + + $Tree = [Microsoft.CodeAnalysis.CSharp.SyntaxFactory]::ParseCompilationUnit($Content) + $Nodes = $Tree.ChildNodes().ChildNodes() + $classConstantMember = @{} + foreach ($Model in $Models) + { + $ModelName = $Model.modelName + $InterfaceNode = $Nodes | Where-Object { ($_.Keyword.value -eq 'interface') -and ($_.Identifier.value -eq "I$ModelName") } + $ClassNode = $Nodes | Where-Object { ($_.Keyword.value -eq 'class') -and ($_.Identifier.value -eq "$ModelName") } + $classConstantMember = @() + foreach ($class in $ClassNode) { + foreach ($member in $class.Members) { + $isConstant = $false + foreach ($attr in $member.AttributeLists) { + $memberName = $attr.Attributes.Name.ToString() + if ($memberName.EndsWith('.Constant')) { + $isConstant = $true + break + } + } + if (($member.Modifiers.ToString() -eq 'public') -and $isConstant) { + $classConstantMember += $member.Identifier.Value + } + } + } + if ($InterfaceNode.count -eq 0) { + continue + } + # through a queue, we iterate all the parent models. + $Queue = @($InterfaceNode) + $visited = @("I$ModelName") + $AllInterfaceNodes = @() + while ($Queue.count -ne 0) + { + $AllInterfaceNodes += $Queue[0] + # Baselist contains the direct parent models. + foreach ($parent in $Queue[0].BaseList.Types) + { + if (($parent.Type.Right.Identifier.Value -ne 'IJsonSerializable') -and (-not $visited.Contains($parent.Type.Right.Identifier.Value))) + { + $Queue = [Array]$Queue + ($Nodes | Where-Object { ($_.Keyword.value -eq 'interface') -and ($_.Identifier.value -eq $parent.Type.Right.Identifier.Value) }) + $visited = [Array]$visited + $parent.Type.Right.Identifier.Value + } + } + $first, $Queue = $Queue + } + + $Namespace = $InterfaceNode.Parent.Name + $ObjectType = $ModelName + $ObjectTypeWithNamespace = "${Namespace}.${ObjectType}" + # remove duplicated module name + if ($ObjectType.StartsWith('EdgeZones')) { + $ModulePrefix = '' + } else { + $ModulePrefix = 'EdgeZones' + } + $OutputPath = Join-Path -ChildPath "New-Az${ModulePrefix}${ObjectType}Object.ps1" -Path $OutputDir + + $ParameterDefineScriptList = New-Object System.Collections.Generic.List[string] + $ParameterAssignScriptList = New-Object System.Collections.Generic.List[string] + foreach ($Node in $AllInterfaceNodes) + { + foreach ($Member in $Node.Members) + { + if ($classConstantMember.Contains($Member.Identifier.Value)) { + # skip constant member + continue + } + $Arguments = $Member.AttributeLists.Attributes.ArgumentList.Arguments + $Required = $false + $Description = "" + $Readonly = $False + $mutability = @{Read = $true; Create = $true; Update = $true} + foreach ($Argument in $Arguments) + { + if ($Argument.NameEquals.Name.Identifier.Value -eq "Required") + { + $Required = $Argument.Expression.Token.Value + } + if ($Argument.NameEquals.Name.Identifier.Value -eq "Description") + { + $Description = $Argument.Expression.Token.Value.Trim('.').replace('"', '`"') + } + if ($Argument.NameEquals.Name.Identifier.Value -eq "Readonly") + { + $Readonly = $Argument.Expression.Token.Value + } + if ($Argument.NameEquals.Name.Identifier.Value -eq "Read") + { + $mutability.Read = $Argument.Expression.Token.Value + } + if ($Argument.NameEquals.Name.Identifier.Value -eq "Create") + { + $mutability.Create = $Argument.Expression.Token.Value + } + if ($Argument.NameEquals.Name.Identifier.Value -eq "Update") + { + $mutability.Update = $Argument.Expression.Token.Value + } + } + if ($Readonly) + { + continue + } + $Identifier = $Member.Identifier.Value + $Type = $Member.Type.ToString().replace('?', '').Split("::")[-1] + $Type = $Member.Type.ToString().replace('?', '').Split("::")[-1] + if ($Type.StartsWith("System.Collections.Generic.List")) + { + # if the type is a list, we need to convert it to array + $matched = $Type -match '\<(?.+)\>$' + if ($matched) + { + $Type = $matches.Name + '[]'; + } + } + $ParameterDefinePropertyList = New-Object System.Collections.Generic.List[string] + if ($Required -and $mutability.Create -and $mutability.Update) + { + $ParameterDefinePropertyList.Add("Mandatory") + } + if ($Description -ne "") + { + $ParameterDefinePropertyList.Add("HelpMessage=`"${Description}.`"") + } + $ParameterDefineProperty = [System.String]::Join(", ", $ParameterDefinePropertyList) + # check whether completer is needed + $completer = ''; + if(IsEnumType($Member)){ + $completer += GetCompleter($Member) + } + $ParameterDefineScript = " + [Parameter($ParameterDefineProperty)]${completer} + [${Type}] + `$${Identifier}" + $ParameterDefineScriptList.Add($ParameterDefineScript) + $ParameterAssignScriptList.Add(" + if (`$PSBoundParameters.ContainsKey('${Identifier}')) { + `$Object.${Identifier} = `$${Identifier} + }") + } + } + $ParameterDefineScript = $ParameterDefineScriptList | Join-String -Separator "," + $ParameterAssignScript = $ParameterAssignScriptList | Join-String -Separator "" + + $cmdletName = "New-Az${ModulePrefix}${ObjectType}Object" + if ('' -ne $Model.cmdletName) { + $cmdletName = $Model.cmdletName + } + $OutputPath = Join-Path -ChildPath "${cmdletName}.ps1" -Path $OutputDir + $cmdletNameInLowerCase = $cmdletName.ToLower() + $Script = " +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for ${ObjectType}. +.Description +Create an in-memory object for ${ObjectType}. + +.Outputs +${ObjectTypeWithNamespace} +.Link +https://learn.microsoft.com/powershell/module/${ModuleName}/${cmdletNameInLowerCase} +#> +function ${cmdletName} { + [OutputType('${ObjectTypeWithNamespace}')] + [CmdletBinding(PositionalBinding=`$false)] + Param( +${ParameterDefineScript} + ) + + process { + `$Object = [${ObjectTypeWithNamespace}]::New() +${ParameterAssignScript} + return `$Object + } +} +" + Set-Content -Path $OutputPath -Value $Script + } +} + +function IsEnumType { + param ( + [Microsoft.CodeAnalysis.CSharp.Syntax.PropertyDeclarationSyntax]$property + ) + $isEnum = $false + foreach ($attr in $property.AttributeLists) { + $attributeName = $attr.Attributes.Name.ToString() + if ($attributeName.Contains('ArgumentCompleter')) { + $isEnum = $true + break + } + } + return $isEnum; +} + +function GetCompleter { + param ( + [Microsoft.CodeAnalysis.CSharp.Syntax.PropertyDeclarationSyntax]$property + ) + foreach ($attr in $property.AttributeLists) { + $attributeName = $attr.Attributes.Name.ToString() + if ($attributeName.Contains('ArgumentCompleter')) { + $attributeName = $attributeName.Split("::")[-1] + $possibleValues = [System.String]::Join(", ", $attr.Attributes.ArgumentList.Arguments) + $completer += "`n [${attributeName}(${possibleValues})]" + return $completer + } + } +} diff --git a/src/EdgeZones/EdgeZones.Autorest/custom/Az.EdgeZones.custom.psm1 b/src/EdgeZones/EdgeZones.Autorest/custom/Az.EdgeZones.custom.psm1 new file mode 100644 index 000000000000..786a78131307 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/custom/Az.EdgeZones.custom.psm1 @@ -0,0 +1,17 @@ +# region Generated + # Load the private module dll + $null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.EdgeZones.private.dll') + + # Load the internal module + $internalModulePath = Join-Path $PSScriptRoot '..\internal\Az.EdgeZones.internal.psm1' + if(Test-Path $internalModulePath) { + $null = Import-Module -Name $internalModulePath + } + + # Export nothing to clear implicit exports + Export-ModuleMember + + # Export script cmdlets + Get-ChildItem -Path $PSScriptRoot -Recurse -Include '*.ps1' -File | ForEach-Object { . $_.FullName } + Export-ModuleMember -Function (Get-ScriptCmdlet -ScriptFolder $PSScriptRoot) -Alias (Get-ScriptCmdlet -ScriptFolder $PSScriptRoot -AsAlias) +# endregion diff --git a/src/EdgeZones/EdgeZones.Autorest/custom/README.md b/src/EdgeZones/EdgeZones.Autorest/custom/README.md new file mode 100644 index 000000000000..53407c49812b --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/custom/README.md @@ -0,0 +1,41 @@ +# Custom +This directory contains custom implementation for non-generated cmdlets for the `Az.EdgeZones` module. Both scripts (`.ps1`) and C# files (`.cs`) can be implemented here. They will be used during the build process in `build-module.ps1`, and create cmdlets into the `..\exports` folder. The only generated file into this folder is the `Az.EdgeZones.custom.psm1`. This file should not be modified. + +## Info +- Modifiable: yes +- Generated: partial +- Committed: yes +- Packaged: yes + +## Details +For `Az.EdgeZones` to use custom cmdlets, it does this two different ways. We **highly recommend** creating script cmdlets, as they are easier to write and allow access to the other exported cmdlets. C# cmdlets *cannot access exported cmdlets*. + +For C# cmdlets, they are compiled with the rest of the generated low-level cmdlets into the `./bin/Az.EdgeZones.private.dll`. The names of the cmdlets (methods) and files must follow the `[cmdletName]_[variantName]` syntax used for generated cmdlets. The `variantName` is used as the `ParameterSetName`, so use something appropriate that doesn't clash with already created variant or parameter set names. You cannot use the `ParameterSetName` property in the `Parameter` attribute on C# cmdlets. Each cmdlet must be separated into variants using the same pattern as seen in the `generated/cmdlets` folder. + +For script cmdlets, these are loaded via the `Az.EdgeZones.custom.psm1`. Then, during the build process, this module is loaded and processed in the same manner as the C# cmdlets. The fundamental difference is the script cmdlets use the `ParameterSetName` attribute and C# cmdlets do not. To create a script cmdlet variant of a generated cmdlet, simply decorate all parameters in the script with the new `ParameterSetName` in the `Parameter` attribute. This will appropriately treat each parameter set as a separate variant when processed to be exported during the build. + +## Purpose +This allows the modules to have cmdlets that were not defined in the REST specification. It also allows combining logic using generated cmdlets. This is a level of customization beyond what can be done using the [readme configuration options](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md) that are currently available. These custom cmdlets are then referenced by the cmdlets created at build-time in the `..\exports` folder. + +## Usage +The easiest way currently to start developing custom cmdlets is to copy an existing cmdlet. For C# cmdlets, copy one from the `generated/cmdlets` folder. For script cmdlets, build the project using `build-module.ps1` and copy one of the scripts from the `..\exports` folder. After that, if you want to add new parameter sets, follow the guidelines in the `Details` section above. For implementing a new cmdlets, at minimum, please keep these parameters: +- Break +- DefaultProfile +- HttpPipelineAppend +- HttpPipelinePrepend +- Proxy +- ProxyCredential +- ProxyUseDefaultCredentials + +These provide functionality to our HTTP pipeline and other useful features. In script, you can forward these parameters using `$PSBoundParameters` to the other cmdlets you're calling within `Az.EdgeZones`. For C#, follow the usage seen in the `ProcessRecordAsync` method. + +### Attributes +For processing the cmdlets, we've created some additional attributes: +- `Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.DescriptionAttribute` + - Used in C# cmdlets to provide a high-level description of the cmdlet. This is propagated to reference documentation via [help comments](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) in the exported scripts. +- `Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.DoNotExportAttribute` + - Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.EdgeZones`. +- `Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.InternalExportAttribute` + - Used in C# cmdlets to route exported cmdlets to the `..\internal`, which are *not exposed* by `Az.EdgeZones`. For more information, see [README.md](..\internal/README.md) in the `..\internal` folder. +- `Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ProfileAttribute` + - Used in C# and script cmdlets to define which Azure profiles the cmdlet supports. This is only supported for Azure (`--azure`) modules. \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/examples/Get-AzEdgeZonesExtendedZone.md b/src/EdgeZones/EdgeZones.Autorest/examples/Get-AzEdgeZonesExtendedZone.md new file mode 100644 index 000000000000..04da85a00889 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/examples/Get-AzEdgeZonesExtendedZone.md @@ -0,0 +1,44 @@ +### Example 1: List all Azure Extended Zones under a subscription +```powershell +Get-AzEdgeZonesExtendedZone +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +losangeles +``` + +This command list all Azure Extended Zones under a subscription + +### Example 2: Get an Azure Extended Zone by name +```powershell +Get-AzEdgeZonesExtendedZone -Name losangeles +``` + +```output +DisplayName : Los Angeles +Geography : usa +GeographyGroup : US +HomeLocation : westus +Id : /subscriptions/2027ff61-4414-4aa3-bd20-170c46f69b19/providers/Microsoft.EdgeZones/extendedZones/losangeles +Latitude : 34.058414 +Longitude : -118.23537 +Name : losangeles +ProvisioningState : Succeeded +RegionCategory : Other +RegionType : Physical +RegionalDisplayName : (US) Los Angeles +RegistrationState : NotRegistered +ResourceGroupName : +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.EdgeZones/extendedZones +``` + +This command gets an Azure Extended Zones by name + diff --git a/src/EdgeZones/EdgeZones.Autorest/examples/Register-AzEdgeZonesExtendedZone.md b/src/EdgeZones/EdgeZones.Autorest/examples/Register-AzEdgeZonesExtendedZone.md new file mode 100644 index 000000000000..3f354d61fdae --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/examples/Register-AzEdgeZonesExtendedZone.md @@ -0,0 +1,32 @@ +### Example 1: Register subscription for an Azure Extended Zone +```powershell +Register-AzEdgeZonesExtendedZone -Name losangeles +``` + +```output +DisplayName : Los Angeles +Geography : usa +GeographyGroup : US +HomeLocation : westus +Id : /subscriptions/2027ff61-4414-4aa3-bd20-170c46f69b19/providers/Microsoft.EdgeZones/extendedZones/losangeles +Latitude : 34.058414 +Longitude : -118.23537 +Name : losangeles +ProvisioningState : Succeeded +RegionCategory : Other +RegionType : Physical +RegionalDisplayName : (US) Los Angeles +RegistrationState : PendingRegister +ResourceGroupName : +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.EdgeZones/extendedZones +``` + +This command register subscription for an Azure Extended Zone + + diff --git a/src/EdgeZones/EdgeZones.Autorest/examples/Unregister-AzEdgeZonesExtendedZone.md b/src/EdgeZones/EdgeZones.Autorest/examples/Unregister-AzEdgeZonesExtendedZone.md new file mode 100644 index 000000000000..00aa97173403 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/examples/Unregister-AzEdgeZonesExtendedZone.md @@ -0,0 +1,31 @@ +### Example 1: Register subscription for an Azure Extended Zone +```powershell +Unregister-AzEdgeZonesExtendedZone -Name losangeles +``` + +```output +DisplayName : Los Angeles +Geography : usa +GeographyGroup : US +HomeLocation : westus +Id : /subscriptions/2027ff61-4414-4aa3-bd20-170c46f69b19/providers/Microsoft.EdgeZones/extendedZones/losangeles +Latitude : 34.058414 +Longitude : -118.23537 +Name : losangeles +ProvisioningState : Succeeded +RegionCategory : Other +RegionType : Physical +RegionalDisplayName : (US) Los Angeles +RegistrationState : PendingUnregister +ResourceGroupName : +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.EdgeZones/extendedZones +``` + +This command unregister subscription for an Azure Extended Zone + diff --git a/src/EdgeZones/EdgeZones.Autorest/export-surface.ps1 b/src/EdgeZones/EdgeZones.Autorest/export-surface.ps1 new file mode 100644 index 000000000000..1a9018a96428 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/export-surface.ps1 @@ -0,0 +1,41 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- +param([switch]$NotIsolated, [switch]$IncludeGeneralParameters, [switch]$UseExpandedFormat) +$ErrorActionPreference = 'Stop' + +$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path +if(-not $NotIsolated) { + Write-Host -ForegroundColor Green 'Creating isolated process...' + & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated + return +} + +$dll = Join-Path $PSScriptRoot 'bin\Az.EdgeZones.private.dll' +if(-not (Test-Path $dll)) { + Write-Error "Unable to find output assembly in '$binFolder'." +} +$null = Import-Module -Name $dll + +$moduleName = 'Az.EdgeZones' +$exportsFolder = Join-Path $PSScriptRoot 'exports' +$resourcesFolder = Join-Path $PSScriptRoot 'resources' + +Export-CmdletSurface -ModuleName $moduleName -CmdletFolder $exportsFolder -OutputFolder $resourcesFolder -IncludeGeneralParameters $IncludeGeneralParameters.IsPresent -UseExpandedFormat $UseExpandedFormat.IsPresent +Write-Host -ForegroundColor Green "CmdletSurface file(s) created in '$resourcesFolder'" + +Export-ModelSurface -OutputFolder $resourcesFolder -UseExpandedFormat $UseExpandedFormat.IsPresent +Write-Host -ForegroundColor Green "ModelSurface file created in '$resourcesFolder'" + +Write-Host -ForegroundColor Green '-------------Done-------------' \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/exports/Get-AzEdgeZonesExtendedZone.ps1 b/src/EdgeZones/EdgeZones.Autorest/exports/Get-AzEdgeZonesExtendedZone.ps1 new file mode 100644 index 000000000000..38f65e03068e --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/exports/Get-AzEdgeZonesExtendedZone.ps1 @@ -0,0 +1,205 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Gets an Azure Extended Zone for a subscription +.Description +Gets an Azure Extended Zone for a subscription +.Example +Get-AzEdgeZonesExtendedZone +.Example +Get-AzEdgeZonesExtendedZone -Name losangeles + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [ExtendedZoneName ]: The name of the ExtendedZone + [Id ]: Resource identity path + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. +.Link +https://learn.microsoft.com/powershell/module/az.edgezones/get-azedgezonesextendedzone +#> +function Get-AzEdgeZonesExtendedZone { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('ExtendedZoneName')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Path')] + [System.String] + # The name of the ExtendedZone + ${Name}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.EdgeZones.private\Get-AzEdgeZonesExtendedZone_Get'; + GetViaIdentity = 'Az.EdgeZones.private\Get-AzEdgeZonesExtendedZone_GetViaIdentity'; + List = 'Az.EdgeZones.private\Get-AzEdgeZonesExtendedZone_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/EdgeZones/EdgeZones.Autorest/exports/ProxyCmdletDefinitions.ps1 b/src/EdgeZones/EdgeZones.Autorest/exports/ProxyCmdletDefinitions.ps1 new file mode 100644 index 000000000000..486ec14f3c53 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/exports/ProxyCmdletDefinitions.ps1 @@ -0,0 +1,577 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Gets an Azure Extended Zone for a subscription +.Description +Gets an Azure Extended Zone for a subscription +.Example +Get-AzEdgeZonesExtendedZone +.Example +Get-AzEdgeZonesExtendedZone -Name losangeles + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [ExtendedZoneName ]: The name of the ExtendedZone + [Id ]: Resource identity path + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. +.Link +https://learn.microsoft.com/powershell/module/az.edgezones/get-azedgezonesextendedzone +#> +function Get-AzEdgeZonesExtendedZone { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('ExtendedZoneName')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Path')] + [System.String] + # The name of the ExtendedZone + ${Name}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.EdgeZones.private\Get-AzEdgeZonesExtendedZone_Get'; + GetViaIdentity = 'Az.EdgeZones.private\Get-AzEdgeZonesExtendedZone_GetViaIdentity'; + List = 'Az.EdgeZones.private\Get-AzEdgeZonesExtendedZone_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Registers a subscription for an Extended Zone +.Description +Registers a subscription for an Extended Zone +.Example +Register-AzEdgeZonesExtendedZone -Name losangeles + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [ExtendedZoneName ]: The name of the ExtendedZone + [Id ]: Resource identity path + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. +.Link +https://learn.microsoft.com/powershell/module/az.edgezones/register-azedgezonesextendedzone +#> +function Register-AzEdgeZonesExtendedZone { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone])] +[CmdletBinding(DefaultParameterSetName='Register', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Register', Mandatory)] + [Alias('ExtendedZoneName')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Path')] + [System.String] + # The name of the ExtendedZone + ${Name}, + + [Parameter(ParameterSetName='Register')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='RegisterViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Register = 'Az.EdgeZones.private\Register-AzEdgeZonesExtendedZone_Register'; + RegisterViaIdentity = 'Az.EdgeZones.private\Register-AzEdgeZonesExtendedZone_RegisterViaIdentity'; + } + if (('Register') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Unregisters a subscription for an Extended Zone +.Description +Unregisters a subscription for an Extended Zone +.Example +Unregister-AzEdgeZonesExtendedZone -Name losangeles + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [ExtendedZoneName ]: The name of the ExtendedZone + [Id ]: Resource identity path + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. +.Link +https://learn.microsoft.com/powershell/module/az.edgezones/unregister-azedgezonesextendedzone +#> +function Unregister-AzEdgeZonesExtendedZone { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone])] +[CmdletBinding(DefaultParameterSetName='Unregister', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Unregister', Mandatory)] + [Alias('ExtendedZoneName')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Path')] + [System.String] + # The name of the ExtendedZone + ${Name}, + + [Parameter(ParameterSetName='Unregister')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UnregisterViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Unregister = 'Az.EdgeZones.private\Unregister-AzEdgeZonesExtendedZone_Unregister'; + UnregisterViaIdentity = 'Az.EdgeZones.private\Unregister-AzEdgeZonesExtendedZone_UnregisterViaIdentity'; + } + if (('Unregister') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/EdgeZones/EdgeZones.Autorest/exports/README.md b/src/EdgeZones/EdgeZones.Autorest/exports/README.md new file mode 100644 index 000000000000..f75088eccb0e --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/exports/README.md @@ -0,0 +1,20 @@ +# Exports +This directory contains the cmdlets *exported by* `Az.EdgeZones`. No other cmdlets in this repository are directly exported. What that means is the `Az.EdgeZones` module will run [Export-ModuleMember](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/export-modulemember) on the cmldets in this directory. The cmdlets in this directory are generated at **build-time**. Do not put any custom code, files, cmdlets, etc. into this directory. Please use `..\custom` for all custom implementation. + +## Info +- Modifiable: no +- Generated: all +- Committed: no +- Packaged: yes + +## Details +The cmdlets generated here are created every time you run `build-module.ps1`. These cmdlets are a merge of all (excluding `InternalExport`) cmdlets from the private binary (`..\bin\Az.EdgeZones.private.dll`) and from the `..\custom\Az.EdgeZones.custom.psm1` module. Cmdlets that are *not merged* from those directories are decorated with the `InternalExport` attribute. This happens when you set the cmdlet to **hide** from configuration. For more information on hiding, see [cmdlet hiding](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md#cmdlet-hiding-exportation-suppression) or the [README.md](..\internal/README.md) in the `..\internal` folder. + +## Purpose +We generate script cmdlets out of the binary cmdlets and custom cmdlets. The format of script cmdlets are simplistic; thus, easier to generate at build time. Generating the cmdlets is required as to allow merging of generated binary, hand-written binary, and hand-written custom cmdlets. For Azure cmdlets, having script cmdlets simplifies the mechanism for exporting Azure profiles. + +## Structure +The cmdlets generated here will flat in the directory (no sub-folders) as long as there are no Azure profiles specified for any cmdlets. Azure profiles (the `Profiles` attribute) is only applied when generating with the `--azure` attribute (or `azure: true` in the configuration). When Azure profiles are applied, the folder structure has a folder per profile. Each profile folder has only those cmdlets that apply to that profile. + +## Usage +When `./Az.EdgeZones.psm1` is loaded, it dynamically exports cmdlets here based on the folder structure and on the selected profile. If there are no sub-folders, it exports all cmdlets at the root of this folder. If there are sub-folders, it checks to see the selected profile. If no profile is selected, it exports the cmdlets in the last sub-folder (alphabetically). If a profile is selected, it exports the cmdlets in the sub-folder that matches the profile name. If there is no sub-folder that matches the profile name, it exports no cmdlets and writes a warning message. \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/exports/Register-AzEdgeZonesExtendedZone.ps1 b/src/EdgeZones/EdgeZones.Autorest/exports/Register-AzEdgeZonesExtendedZone.ps1 new file mode 100644 index 000000000000..b70524c4457e --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/exports/Register-AzEdgeZonesExtendedZone.ps1 @@ -0,0 +1,201 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Registers a subscription for an Extended Zone +.Description +Registers a subscription for an Extended Zone +.Example +Register-AzEdgeZonesExtendedZone -Name losangeles + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [ExtendedZoneName ]: The name of the ExtendedZone + [Id ]: Resource identity path + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. +.Link +https://learn.microsoft.com/powershell/module/az.edgezones/register-azedgezonesextendedzone +#> +function Register-AzEdgeZonesExtendedZone { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone])] +[CmdletBinding(DefaultParameterSetName='Register', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Register', Mandatory)] + [Alias('ExtendedZoneName')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Path')] + [System.String] + # The name of the ExtendedZone + ${Name}, + + [Parameter(ParameterSetName='Register')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='RegisterViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Register = 'Az.EdgeZones.private\Register-AzEdgeZonesExtendedZone_Register'; + RegisterViaIdentity = 'Az.EdgeZones.private\Register-AzEdgeZonesExtendedZone_RegisterViaIdentity'; + } + if (('Register') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/EdgeZones/EdgeZones.Autorest/exports/Unregister-AzEdgeZonesExtendedZone.ps1 b/src/EdgeZones/EdgeZones.Autorest/exports/Unregister-AzEdgeZonesExtendedZone.ps1 new file mode 100644 index 000000000000..e12c2722626c --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/exports/Unregister-AzEdgeZonesExtendedZone.ps1 @@ -0,0 +1,201 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Unregisters a subscription for an Extended Zone +.Description +Unregisters a subscription for an Extended Zone +.Example +Unregister-AzEdgeZonesExtendedZone -Name losangeles + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [ExtendedZoneName ]: The name of the ExtendedZone + [Id ]: Resource identity path + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. +.Link +https://learn.microsoft.com/powershell/module/az.edgezones/unregister-azedgezonesextendedzone +#> +function Unregister-AzEdgeZonesExtendedZone { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone])] +[CmdletBinding(DefaultParameterSetName='Unregister', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Unregister', Mandatory)] + [Alias('ExtendedZoneName')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Path')] + [System.String] + # The name of the ExtendedZone + ${Name}, + + [Parameter(ParameterSetName='Unregister')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UnregisterViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Unregister = 'Az.EdgeZones.private\Unregister-AzEdgeZonesExtendedZone_Unregister'; + UnregisterViaIdentity = 'Az.EdgeZones.private\Unregister-AzEdgeZonesExtendedZone_UnregisterViaIdentity'; + } + if (('Unregister') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/EdgeZones/EdgeZones.Autorest/generate-help.ps1 b/src/EdgeZones/EdgeZones.Autorest/generate-help.ps1 new file mode 100644 index 000000000000..d861c087878d --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generate-help.ps1 @@ -0,0 +1,74 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- +param([switch]$NotIsolated) +$ErrorActionPreference = 'Stop' + +$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path +if(-not $NotIsolated) { + Write-Host -ForegroundColor Green 'Creating isolated process...' + & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated + return +} + +$exportsFolder = Join-Path $PSScriptRoot 'exports' +if(-not (Test-Path $exportsFolder)) { + Write-Error "Exports folder '$exportsFolder' was not found." +} + +$directories = Get-ChildItem -Directory -Path $exportsFolder +$hasProfiles = ($directories | Measure-Object).Count -gt 0 +if(-not $hasProfiles) { + $directories = Get-Item -Path $exportsFolder +} + +$docsFolder = Join-Path $PSScriptRoot 'docs' +if(Test-Path $docsFolder) { + $null = Get-ChildItem -Path $docsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue +} +$null = New-Item -ItemType Directory -Force -Path $docsFolder -ErrorAction SilentlyContinue +$examplesFolder = Join-Path $PSScriptRoot 'examples' + +$modulePsd1 = Get-Item -Path (Join-Path $PSScriptRoot './Az.EdgeZones.psd1') +$modulePath = $modulePsd1.FullName +$moduleName = $modulePsd1.BaseName + +# Load DLL to use build-time cmdlets +Import-Module -Name $modulePath +Import-Module -Name (Join-Path $PSScriptRoot './bin/Az.EdgeZones.private.dll') +$instance = [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module]::Instance +# Module info is shared per profile +$moduleInfo = Get-Module -Name $moduleName + +foreach($directory in $directories) +{ + if($hasProfiles) { + Select-AzProfile -Name $directory.Name + } + # Reload module per profile + Import-Module -Name $modulePath -Force + + $cmdletNames = Get-ScriptCmdlet -ScriptFolder $directory.FullName + $cmdletHelpInfo = $cmdletNames | ForEach-Object { Get-Help -Name $_ -Full } + $cmdletFunctionInfo = Get-ScriptCmdlet -ScriptFolder $directory.FullName -AsFunctionInfo + + $docsPath = Join-Path $docsFolder $directory.Name + $null = New-Item -ItemType Directory -Force -Path $docsPath -ErrorAction SilentlyContinue + $examplesPath = Join-Path $examplesFolder $directory.Name + $addComplexInterfaceInfo = ![System.Convert]::ToBoolean('true') + Export-HelpMarkdown -ModuleInfo $moduleInfo -FunctionInfo $cmdletFunctionInfo -HelpInfo $cmdletHelpInfo -DocsFolder $docsPath -ExamplesFolder $examplesPath -AddComplexInterfaceInfo:$addComplexInterfaceInfo + Write-Host -ForegroundColor Green "Created documentation in '$docsPath'" +} + +Write-Host -ForegroundColor Green '-------------Done-------------' \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generate-portal-ux.ps1 b/src/EdgeZones/EdgeZones.Autorest/generate-portal-ux.ps1 new file mode 100644 index 000000000000..904a1c9784b4 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generate-portal-ux.ps1 @@ -0,0 +1,374 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# +# This Script will create a folder dedicated to Azure-specific content and includes metadata files essential for enhancing the user experience (UX) within the Azure portal. +# These files are utilized by the Azure portal to effectively present the usage of cmdlets related to specific resources on portal pages. +# ---------------------------------------------------------------------------------- +param([switch]$NotIsolated) +$ErrorActionPreference = 'Stop' + +$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path +if(-not $NotIsolated) { + Write-Host -ForegroundColor Green 'Creating isolated process...' + & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated + return +} + +$moduleName = 'Az.EdgeZones' +$rootModuleName = '' +if ($rootModuleName -eq "") +{ + $rootModuleName = $moduleName +} +$modulePsd1 = Get-Item -Path (Join-Path $PSScriptRoot "./$moduleName.psd1") +$modulePath = $modulePsd1.FullName + +# Load DLL to use build-time cmdlets +Import-Module -Name $modulePath +Import-Module -Name (Join-Path $PSScriptRoot "./bin/$moduleName.private.dll") +$instance = [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module]::Instance +# Module info is shared per profile +$moduleInfo = Get-Module -Name $moduleName +$parameterSetsInfo = Get-Module -Name "$moduleName.private" + +function Test-FunctionSupported() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [string] + $FunctionName + ) + + If (-not $FunctionName.Contains("_")) { + return $false + } + + $cmdletName, $parameterSetName = $FunctionName.Split("_") + If ($parameterSetName.Contains("List") -or $parameterSetName.Contains("ViaIdentity") -or $parameterSetName.Contains("ViaJson")) { + return $false + } + If ($cmdletName.StartsWith("New") -or $cmdletName.StartsWith("Set") -or $cmdletName.StartsWith("Update")) { + return $false + } + + $parameterSetInfo = $parameterSetsInfo.ExportedCmdlets[$FunctionName] + foreach ($parameterInfo in $parameterSetInfo.Parameters.Values) + { + $category = (Get-ParameterAttribute -ParameterInfo $parameterInfo -AttributeName "CategoryAttribute").Categories + $invalideCategory = @('Query', 'Body') + if ($invalideCategory -contains $category) + { + return $false + } + } + + $customFiles = Get-ChildItem -Path custom -Filter "$cmdletName.*" + if ($customFiles.Length -ne 0) + { + Write-Host -ForegroundColor Yellow "There are come custom files for $cmdletName, skip generate UX data for it." + return $false + } + + return $true +} + +function Get-MappedCmdletFromFunctionName() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [string] + $FunctionName + ) + + $cmdletName, $parameterSetName = $FunctionName.Split("_") + + return $cmdletName +} + +function Get-ParameterAttribute() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.ParameterMetadata] + $ParameterInfo, + [Parameter()] + [String] + $AttributeName + ) + return $ParameterInfo.Attributes | Where-Object { $_.TypeId.Name -eq $AttributeName } +} + +function Get-CmdletAttribute() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.CommandInfo] + $CmdletInfo, + [Parameter()] + [String] + $AttributeName + ) + + return $CmdletInfo.ImplementingType.GetTypeInfo().GetCustomAttributes([System.object], $true) | Where-Object { $_.TypeId.Name -eq $AttributeName } +} + +function Get-CmdletDescription() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [String] + $CmdletName + ) + $helpInfo = Get-Help $CmdletName -Full + + $description = $helpInfo.Description.Text + if ($null -eq $description) + { + return "" + } + return $description +} + +# Test whether the parameter is from swagger http path +function Test-ParameterFromSwagger() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.ParameterMetadata] + $ParameterInfo + ) + $category = (Get-ParameterAttribute -ParameterInfo $ParameterInfo -AttributeName "CategoryAttribute").Categories + $doNotExport = Get-ParameterAttribute -ParameterInfo $ParameterInfo -AttributeName "DoNotExportAttribute" + if ($null -ne $doNotExport) + { + return $false + } + + $valideCategory = @('Path') + if ($valideCategory -contains $category) + { + return $true + } + return $false +} + +function New-ExampleForParameterSet() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.CommandInfo] + $ParameterSetInfo + ) + $parameters = $ParameterSetInfo.Parameters.Values | Where-Object { Test-ParameterFromSwagger $_ } + $result = @() + foreach ($parameter in $parameters) + { + $category = (Get-ParameterAttribute -parameterInfo $parameter -AttributeName "CategoryAttribute").Categories + $sourceName = (Get-ParameterAttribute -parameterInfo $parameter -AttributeName "InfoAttribute").SerializedName + $name = $parameter.Name + $result += [ordered]@{ + name = "-$Name" + value = "[$category.$sourceName]" + } + } + + return $result +} + +function New-ParameterArrayInParameterSet() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.CommandInfo] + $ParameterSetInfo + ) + $parameters = $ParameterSetInfo.Parameters.Values | Where-Object { Test-ParameterFromSwagger $_ } + $result = @() + foreach ($parameter in $parameters) + { + $isMandatory = (Get-ParameterAttribute -parameterInfo $parameter -AttributeName "ParameterAttribute").Mandatory + $parameterName = $parameter.Name + $parameterType = $parameter.ParameterType.ToString().Split('.')[1] + if ($parameter.SwitchParameter) + { + $parameterSignature = "-$parameterName" + } + else + { + $parameterSignature = "-$parameterName <$parameterType>" + } + if ($parameterName -eq "SubscriptionId") + { + $isMandatory = $false + } + if (-not $isMandatory) + { + $parameterSignature = "[$parameterSignature]" + } + $result += $parameterSignature + } + + return $result +} + +function New-MetadataForParameterSet() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.CommandInfo] + $ParameterSetInfo + ) + $httpAttribute = Get-CmdletAttribute -CmdletInfo $ParameterSetInfo -AttributeName "HttpPathAttribute" + $httpPath = $httpAttribute.Path + $apiVersion = $httpAttribute.ApiVersion + $provider = [System.Text.RegularExpressions.Regex]::New("/providers/([\w+\.]+)/").Match($httpPath).Groups[1].Value + $resourcePath = "/" + $httpPath.Split("$provider/")[1] + $resourceType = [System.Text.RegularExpressions.Regex]::New("/([\w]+)/\{\w+\}").Matches($resourcePath) | ForEach-Object {$_.groups[1].Value} | Join-String -Separator "/" + $cmdletName = Get-MappedCmdletFromFunctionName $ParameterSetInfo.Name + $description = (Get-CmdletAttribute -CmdletInfo $ParameterSetInfo -AttributeName "DescriptionAttribute").Description + [object[]]$example = New-ExampleForParameterSet $ParameterSetInfo + [string[]]$signature = New-ParameterArrayInParameterSet $ParameterSetInfo + + return @{ + Path = $httpPath + Provider = $provider + ResourceType = $resourceType + ApiVersion = $apiVersion + CmdletName = $cmdletName + Description = $description + Example = $example + Signature = @{ + parameters = $signature + } + } +} + +function Merge-WithExistCmdletMetadata() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Collections.Specialized.OrderedDictionary] + $ExistedCmdletInfo, + [Parameter()] + [Hashtable] + $ParameterSetMetadata + ) + $ExistedCmdletInfo.help.parameterSets += $ParameterSetMetadata.Signature + $ExistedCmdletInfo.examples += [ordered]@{ + description = $ParameterSetMetadata.Description + parameters = $ParameterSetMetadata.Example + } + + return $ExistedCmdletInfo +} + +function New-MetadataForCmdlet() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [Hashtable] + $ParameterSetMetadata + ) + $cmdletName = $ParameterSetMetadata.CmdletName + $description = Get-CmdletDescription $cmdletName + $result = [ordered]@{ + name = $cmdletName + description = $description + path = $ParameterSetMetadata.Path + help = [ordered]@{ + learnMore = [ordered]@{ + url = "https://learn.microsoft.com/powershell/module/$rootModuleName/$cmdletName".ToLower() + } + parameterSets = @() + } + examples = @() + } + $result = Merge-WithExistCmdletMetadata -ExistedCmdletInfo $result -ParameterSetMetadata $ParameterSetMetadata + return $result +} + +$parameterSets = $parameterSetsInfo.ExportedCmdlets.Keys | Where-Object { Test-FunctionSupported($_) } +$resourceTypes = @{} +foreach ($parameterSetName in $parameterSets) +{ + $cmdletInfo = $parameterSetsInfo.ExportedCommands[$parameterSetName] + $parameterSetMetadata = New-MetadataForParameterSet -ParameterSetInfo $cmdletInfo + $cmdletName = $parameterSetMetadata.CmdletName + if (-not ($moduleInfo.ExportedCommands.ContainsKey($cmdletName))) + { + continue + } + if ($resourceTypes.ContainsKey($parameterSetMetadata.ResourceType)) + { + $ExistedCmdletInfo = $resourceTypes[$parameterSetMetadata.ResourceType].commands | Where-Object { $_.name -eq $cmdletName } + if ($ExistedCmdletInfo) + { + $ExistedCmdletInfo = Merge-WithExistCmdletMetadata -ExistedCmdletInfo $ExistedCmdletInfo -ParameterSetMetadata $parameterSetMetadata + } + else + { + $cmdletInfo = New-MetadataForCmdlet -ParameterSetMetadata $parameterSetMetadata + $resourceTypes[$parameterSetMetadata.ResourceType].commands += $cmdletInfo + } + } + else + { + $cmdletInfo = New-MetadataForCmdlet -ParameterSetMetadata $parameterSetMetadata + $resourceTypes[$parameterSetMetadata.ResourceType] = [ordered]@{ + resourceType = $parameterSetMetadata.ResourceType + apiVersion = $parameterSetMetadata.ApiVersion + learnMore = @{ + url = "https://learn.microsoft.com/powershell/module/$rootModuleName".ToLower() + } + commands = @($cmdletInfo) + provider = $parameterSetMetadata.Provider + } + } +} + +$UXFolder = 'UX' +if (Test-Path $UXFolder) +{ + Remove-Item -Path $UXFolder -Recurse +} +$null = New-Item -ItemType Directory -Path $UXFolder + +foreach ($resourceType in $resourceTypes.Keys) +{ + $resourceTypeFileName = $resourceType -replace "/", "-" + if ($resourceTypeFileName -eq "") + { + continue + } + $resourceTypeInfo = $resourceTypes[$resourceType] + $provider = $resourceTypeInfo.provider + $providerFolder = "$UXFolder/$provider" + if (-not (Test-Path $providerFolder)) + { + $null = New-Item -ItemType Directory -Path $providerFolder + } + $resourceTypeInfo.Remove("provider") + $resourceTypeInfo | ConvertTo-Json -Depth 10 | Out-File "$providerFolder/$resourceTypeFileName.json" +} diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/Module.cs b/src/EdgeZones/EdgeZones.Autorest/generated/Module.cs new file mode 100644 index 000000000000..9f767392cae6 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/Module.cs @@ -0,0 +1,202 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Extensions; + using SendAsyncStepDelegate = global::System.Func, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>; + using PipelineChangeDelegate = global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>; + using GetParameterDelegate = global::System.Func; + using ModuleLoadPipelineDelegate = global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>, global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>>; + using ArgumentCompleterDelegate = global::System.Func; + using GetTelemetryIdDelegate = global::System.Func; + using TelemetryDelegate = global::System.Action; + using NewRequestPipelineDelegate = global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>, global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>>; + using SignalDelegate = global::System.Func, global::System.Threading.Tasks.Task>; + using EventListenerDelegate = global::System.Func, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Management.Automation.InvocationInfo, string, string, string, global::System.Exception, global::System.Threading.Tasks.Task>; + using NextDelegate = global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>; + using SanitizerDelegate = global::System.Action; + using GetTelemetryInfoDelegate = global::System.Func>; + + /// A class that contains the module-common code and data. + public partial class Module + { + /// The currently selected profile. + public string Profile = global::System.String.Empty; + + public global::System.Net.Http.HttpClientHandler _handler = new global::System.Net.Http.HttpClientHandler(); + + private static bool _init = false; + + private static readonly global::System.Object _initLock = new global::System.Object(); + + private static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module _instance; + + /// the ISendAsync pipeline instance + private Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.HttpPipeline _pipeline; + + /// the ISendAsync pipeline instance (when proxy is enabled) + private Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.HttpPipeline _pipelineWithProxy; + + private static readonly global::System.Object _singletonLock = new global::System.Object(); + + public bool _useProxy = false; + + public global::System.Net.WebProxy _webProxy = new global::System.Net.WebProxy(); + + /// Gets completion data for azure specific fields + public ArgumentCompleterDelegate ArgumentCompleter { get; set; } + + /// The instance of the Client API + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.EdgeZones ClientAPI { get; set; } + + /// A delegate that gets called for each signalled event + public EventListenerDelegate EventListener { get; set; } + + /// The delegate to call to get parameter data from a common module. + public GetParameterDelegate GetParameterValue { get; set; } + + /// The delegate to get the telemetry Id. + public GetTelemetryIdDelegate GetTelemetryId { get; set; } + + /// The delegate to get the telemetry info. + public GetTelemetryInfoDelegate GetTelemetryInfo { get; set; } + + /// the singleton of this module class + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module Instance { get { if (_instance == null) { lock (_singletonLock) { if (_instance == null) { _instance = new Module(); }}} return _instance; } } + + /// The Name of this module + public string Name => @"Az.EdgeZones"; + + /// The delegate to call when this module is loaded (supporting a commmon module). + public ModuleLoadPipelineDelegate OnModuleLoad { get; set; } + + /// The delegate to call before each new request (supporting a commmon module). + public NewRequestPipelineDelegate OnNewRequest { get; set; } + + /// The name of the currently selected Azure profile + public global::System.String ProfileName { get; set; } + + /// The ResourceID for this module (azure arm). + public string ResourceId => @"Az.EdgeZones"; + + /// The delegate to call in WriteObject to sanitize the output object. + public SanitizerDelegate SanitizeOutput { get; set; } + + /// The delegate for creating a telemetry. + public TelemetryDelegate Telemetry { get; set; } + + /// The from the cmdlet + /// The HttpPipeline for the request + + partial void AfterCreatePipeline(global::System.Management.Automation.InvocationInfo invocationInfo, ref Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.HttpPipeline pipeline); + + /// The from the cmdlet + /// The HttpPipeline for the request + + partial void BeforeCreatePipeline(global::System.Management.Automation.InvocationInfo invocationInfo, ref Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.HttpPipeline pipeline); + + partial void CustomInit(); + + /// Creates an instance of the HttpPipeline for each call. + /// The from the cmdlet + /// the cmdlet's correlation id. + /// the cmdlet's process record correlation id. + /// the cmdlet's parameterset name. + /// a dict for extensible parameters + /// An instance of Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.HttpPipeline for the remote call. + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.HttpPipeline CreatePipeline(global::System.Management.Automation.InvocationInfo invocationInfo, string correlationId, string processRecordId, string parameterSetName = null, global::System.Collections.Generic.IDictionary extensibleParameters = null) + { + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.HttpPipeline pipeline = null; + BeforeCreatePipeline(invocationInfo, ref pipeline); + pipeline = (pipeline ?? (_useProxy ? _pipelineWithProxy : _pipeline)).Clone(); + AfterCreatePipeline(invocationInfo, ref pipeline); + pipeline.Append(new Runtime.CmdInfoHandler(processRecordId, invocationInfo, parameterSetName).SendAsync); + OnNewRequest?.Invoke( invocationInfo, correlationId,processRecordId, (step)=> { pipeline.Prepend(step); } , (step)=> { pipeline.Append(step); } ); + return pipeline; + } + + /// Gets parameters from a common module. + /// The from the cmdlet + /// the cmdlet's correlation id. + /// The name of the parameter to get the value for. + /// + /// The parameter value from the common module. (Note: this should be type converted on the way back) + /// + public object GetParameter(global::System.Management.Automation.InvocationInfo invocationInfo, string correlationId, string parameterName) => GetParameterValue?.Invoke( ResourceId, Name, invocationInfo, correlationId,parameterName ); + + /// Initialization steps performed after the module is loaded. + public void Init() + { + if (_init == false) + { + lock (_initLock) { + if (_init == false) { + OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipeline.Prepend(step); } , (step)=> { _pipeline.Append(step); } ); + OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipelineWithProxy.Prepend(step); } , (step)=> { _pipelineWithProxy.Append(step); } ); + CustomInit(); + _init = true; + } + } + } + } + + /// Creates the module instance. + private Module() + { + // constructor + ClientAPI = new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.EdgeZones(); + _handler.Proxy = _webProxy; + _pipeline = new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.HttpPipeline(new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.HttpClientFactory(new global::System.Net.Http.HttpClient())); + _pipelineWithProxy = new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.HttpPipeline(new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.HttpClientFactory(new global::System.Net.Http.HttpClient(_handler))); + } + + /// The HTTP Proxy to use. + /// The HTTP Proxy Credentials + /// True if the proxy should use default credentials + public void SetProxyConfiguration(global::System.Uri proxy, global::System.Management.Automation.PSCredential proxyCredential, bool proxyUseDefaultCredentials) + { + _useProxy = proxy != null; + if (proxy == null) + { + return; + } + // set the proxy configuration + _webProxy.Address = proxy; + _webProxy.BypassProxyOnLocal = false; + if (proxyUseDefaultCredentials) + { + _webProxy.Credentials = null; + _webProxy.UseDefaultCredentials = true; + } + else + { + _webProxy.UseDefaultCredentials = false; + _webProxy.Credentials = proxyCredential ?.GetNetworkCredential(); + } + } + + /// Called to dispatch events to the common module listener + /// The ID of the event + /// The cancellation token for the event + /// A delegate to get the detailed event data + /// The callback for the event dispatcher + /// The from the cmdlet + /// the cmdlet's parameterset name. + /// the cmdlet's correlation id. + /// the cmdlet's process record correlation id. + /// the exception that is being thrown (if available) + /// + /// A that will be complete when handling of the event is completed. + /// + public async global::System.Threading.Tasks.Task Signal(string id, global::System.Threading.CancellationToken token, global::System.Func getEventData, SignalDelegate signal, global::System.Management.Automation.InvocationInfo invocationInfo, string parameterSetName, string correlationId, string processRecordId, global::System.Exception exception) + { + using( NoSynchronizationContext ) + { + await EventListener?.Invoke(id,token,getEventData, signal, invocationInfo, parameterSetName, correlationId,processRecordId,exception); + } + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/EdgeZones.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/EdgeZones.cs new file mode 100644 index 000000000000..47945626583a --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/EdgeZones.cs @@ -0,0 +1,1525 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Extensions; + + /// + /// Low-level API implementation for the EdgeZones service. + /// + public partial class EdgeZones + { + + /// Gets an Azure Extended Zone for a subscription + /// The ID of the target subscription. The value must be an UUID. + /// The name of the ExtendedZone + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExtendedZonesGet(string subscriptionId, string extendedZoneName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.EdgeZones/extendedZones/" + + global::System.Uri.EscapeDataString(extendedZoneName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExtendedZonesGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets an Azure Extended Zone for a subscription + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExtendedZonesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.EdgeZones/extendedZones/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.EdgeZones/extendedZones/{extendedZoneName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var extendedZoneName = _match.Groups["extendedZoneName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Microsoft.EdgeZones/extendedZones/" + + extendedZoneName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExtendedZonesGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets an Azure Extended Zone for a subscription + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExtendedZonesGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.EdgeZones/extendedZones/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.EdgeZones/extendedZones/{extendedZoneName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var extendedZoneName = _match.Groups["extendedZoneName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Microsoft.EdgeZones/extendedZones/" + + extendedZoneName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ExtendedZonesGetWithResult_Call (request, eventListener,sender); + } + } + + /// Gets an Azure Extended Zone for a subscription + /// The ID of the target subscription. The value must be an UUID. + /// The name of the ExtendedZone + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExtendedZonesGetWithResult(string subscriptionId, string extendedZoneName, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.EdgeZones/extendedZones/" + + global::System.Uri.EscapeDataString(extendedZoneName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ExtendedZonesGetWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExtendedZonesGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ExtendedZone.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExtendedZonesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ExtendedZone.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the ExtendedZone + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExtendedZonesGet_Validate(string subscriptionId, string extendedZoneName, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(extendedZoneName),extendedZoneName); + await eventListener.AssertRegEx(nameof(extendedZoneName), extendedZoneName, @"^[a-zA-Z0-9-]{3,24}$"); + } + } + + /// Lists the Azure Extended Zones available to a subscription + /// The ID of the target subscription. The value must be an UUID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExtendedZonesListBySubscription(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.EdgeZones/extendedZones" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExtendedZonesListBySubscription_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Lists the Azure Extended Zones available to a subscription + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExtendedZonesListBySubscriptionViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.EdgeZones/extendedZones$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.EdgeZones/extendedZones'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Microsoft.EdgeZones/extendedZones" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExtendedZonesListBySubscription_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Lists the Azure Extended Zones available to a subscription + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExtendedZonesListBySubscriptionViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.EdgeZones/extendedZones$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.EdgeZones/extendedZones'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Microsoft.EdgeZones/extendedZones" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ExtendedZonesListBySubscriptionWithResult_Call (request, eventListener,sender); + } + } + + /// Lists the Azure Extended Zones available to a subscription + /// The ID of the target subscription. The value must be an UUID. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExtendedZonesListBySubscriptionWithResult(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.EdgeZones/extendedZones" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ExtendedZonesListBySubscriptionWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExtendedZonesListBySubscriptionWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ExtendedZoneListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExtendedZonesListBySubscription_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ExtendedZoneListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExtendedZonesListBySubscription_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + } + } + + /// Registers a subscription for an Extended Zone + /// The ID of the target subscription. The value must be an UUID. + /// The name of the ExtendedZone + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExtendedZonesRegister(string subscriptionId, string extendedZoneName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.EdgeZones/extendedZones/" + + global::System.Uri.EscapeDataString(extendedZoneName) + + "/register" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExtendedZonesRegister_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Registers a subscription for an Extended Zone + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExtendedZonesRegisterViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.EdgeZones/extendedZones/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.EdgeZones/extendedZones/{extendedZoneName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var extendedZoneName = _match.Groups["extendedZoneName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Microsoft.EdgeZones/extendedZones/" + + extendedZoneName + + "/register" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExtendedZonesRegister_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Registers a subscription for an Extended Zone + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExtendedZonesRegisterViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.EdgeZones/extendedZones/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.EdgeZones/extendedZones/{extendedZoneName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var extendedZoneName = _match.Groups["extendedZoneName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Microsoft.EdgeZones/extendedZones/" + + extendedZoneName + + "/register" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ExtendedZonesRegisterWithResult_Call (request, eventListener,sender); + } + } + + /// Registers a subscription for an Extended Zone + /// The ID of the target subscription. The value must be an UUID. + /// The name of the ExtendedZone + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExtendedZonesRegisterWithResult(string subscriptionId, string extendedZoneName, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.EdgeZones/extendedZones/" + + global::System.Uri.EscapeDataString(extendedZoneName) + + "/register" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ExtendedZonesRegisterWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExtendedZonesRegisterWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ExtendedZone.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExtendedZonesRegister_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ExtendedZone.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the ExtendedZone + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExtendedZonesRegister_Validate(string subscriptionId, string extendedZoneName, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(extendedZoneName),extendedZoneName); + await eventListener.AssertRegEx(nameof(extendedZoneName), extendedZoneName, @"^[a-zA-Z0-9-]{3,24}$"); + } + } + + /// Unregisters a subscription for an Extended Zone + /// The ID of the target subscription. The value must be an UUID. + /// The name of the ExtendedZone + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExtendedZonesUnregister(string subscriptionId, string extendedZoneName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.EdgeZones/extendedZones/" + + global::System.Uri.EscapeDataString(extendedZoneName) + + "/unregister" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExtendedZonesUnregister_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Unregisters a subscription for an Extended Zone + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExtendedZonesUnregisterViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.EdgeZones/extendedZones/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.EdgeZones/extendedZones/{extendedZoneName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var extendedZoneName = _match.Groups["extendedZoneName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Microsoft.EdgeZones/extendedZones/" + + extendedZoneName + + "/unregister" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExtendedZonesUnregister_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Unregisters a subscription for an Extended Zone + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExtendedZonesUnregisterViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.EdgeZones/extendedZones/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.EdgeZones/extendedZones/{extendedZoneName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var extendedZoneName = _match.Groups["extendedZoneName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Microsoft.EdgeZones/extendedZones/" + + extendedZoneName + + "/unregister" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ExtendedZonesUnregisterWithResult_Call (request, eventListener,sender); + } + } + + /// Unregisters a subscription for an Extended Zone + /// The ID of the target subscription. The value must be an UUID. + /// The name of the ExtendedZone + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExtendedZonesUnregisterWithResult(string subscriptionId, string extendedZoneName, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.EdgeZones/extendedZones/" + + global::System.Uri.EscapeDataString(extendedZoneName) + + "/unregister" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ExtendedZonesUnregisterWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExtendedZonesUnregisterWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ExtendedZone.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExtendedZonesUnregister_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ExtendedZone.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the ExtendedZone + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExtendedZonesUnregister_Validate(string subscriptionId, string extendedZoneName, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(extendedZoneName),extendedZoneName); + await eventListener.AssertRegEx(nameof(extendedZoneName), extendedZoneName, @"^[a-zA-Z0-9-]{3,24}$"); + } + } + + /// List the operations for the provider + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OperationsList(global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.EdgeZones/operations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OperationsList_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List the operations for the provider + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OperationsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.EdgeZones/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.EdgeZones/operations'"); + } + + // replace URI parameters with values from identity + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.EdgeZones/operations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OperationsList_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List the operations for the provider + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OperationsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.EdgeZones/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.EdgeZones/operations'"); + } + + // replace URI parameters with values from identity + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.EdgeZones/operations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.OperationsListWithResult_Call (request, eventListener,sender); + } + } + + /// List the operations for the provider + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OperationsListWithResult(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.EdgeZones/operations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.OperationsListWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OperationsListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.OperationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OperationsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.OperationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OperationsList_Validate(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + + } + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Any.PowerShell.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Any.PowerShell.cs new file mode 100644 index 000000000000..cd083a9d3845 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Any.PowerShell.cs @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell; + + /// Anything + [System.ComponentModel.TypeConverter(typeof(AnyTypeConverter))] + public partial class Any + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Any(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Any(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IAny DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Any(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IAny DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Any(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IAny FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Anything + [System.ComponentModel.TypeConverter(typeof(AnyTypeConverter))] + public partial interface IAny + + { + + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Any.TypeConverter.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Any.TypeConverter.cs new file mode 100644 index 000000000000..4581c6cf70b7 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Any.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AnyTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IAny ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IAny).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Any.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Any.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Any.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Any.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Any.cs new file mode 100644 index 000000000000..0687b8f45c2b --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Any.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Extensions; + + /// Anything + public partial class Any : + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IAny, + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IAnyInternal + { + + /// Creates an new instance. + public Any() + { + + } + } + /// Anything + public partial interface IAny : + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IJsonSerializable + { + + } + /// Anything + internal partial interface IAnyInternal + + { + + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Any.json.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Any.json.cs new file mode 100644 index 000000000000..c12bb2357df2 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Any.json.cs @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Extensions; + + /// Anything + public partial class Any + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject instance to deserialize from. + internal Any(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IAny. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IAny. + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IAny FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json ? new Any(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/EdgeZonesIdentity.PowerShell.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/EdgeZonesIdentity.PowerShell.cs new file mode 100644 index 000000000000..de8fe946d51d --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/EdgeZonesIdentity.PowerShell.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(EdgeZonesIdentityTypeConverter))] + public partial class EdgeZonesIdentity + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new EdgeZonesIdentity(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new EdgeZonesIdentity(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal EdgeZonesIdentity(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SubscriptionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentityInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentityInternal)this).SubscriptionId, global::System.Convert.ToString); + } + if (content.Contains("ExtendedZoneName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentityInternal)this).ExtendedZoneName = (string) content.GetValueForProperty("ExtendedZoneName",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentityInternal)this).ExtendedZoneName, global::System.Convert.ToString); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentityInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentityInternal)this).Id, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal EdgeZonesIdentity(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SubscriptionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentityInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentityInternal)this).SubscriptionId, global::System.Convert.ToString); + } + if (content.Contains("ExtendedZoneName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentityInternal)this).ExtendedZoneName = (string) content.GetValueForProperty("ExtendedZoneName",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentityInternal)this).ExtendedZoneName, global::System.Convert.ToString); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentityInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentityInternal)this).Id, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + [System.ComponentModel.TypeConverter(typeof(EdgeZonesIdentityTypeConverter))] + public partial interface IEdgeZonesIdentity + + { + + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/EdgeZonesIdentity.TypeConverter.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/EdgeZonesIdentity.TypeConverter.cs new file mode 100644 index 000000000000..b53f913023c6 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/EdgeZonesIdentity.TypeConverter.cs @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class EdgeZonesIdentityTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + // we allow string conversion too. + if (type == typeof(global::System.String)) + { + return true; + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentity ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + // support direct string to id type conversion. + if (type == typeof(global::System.String)) + { + return new EdgeZonesIdentity { Id = sourceValue }; + } + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentity).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return EdgeZonesIdentity.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return EdgeZonesIdentity.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return EdgeZonesIdentity.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/EdgeZonesIdentity.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/EdgeZonesIdentity.cs new file mode 100644 index 000000000000..057a0d8a4616 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/EdgeZonesIdentity.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Extensions; + + public partial class EdgeZonesIdentity : + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentity, + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentityInternal + { + + /// Backing field for property. + private string _extendedZoneName; + + /// The name of the ExtendedZone + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Owned)] + public string ExtendedZoneName { get => this._extendedZoneName; set => this._extendedZoneName = value; } + + /// Backing field for property. + private string _id; + + /// Resource identity path + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Owned)] + public string Id { get => this._id; set => this._id = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Owned)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Creates an new instance. + public EdgeZonesIdentity() + { + + } + } + public partial interface IEdgeZonesIdentity : + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IJsonSerializable + { + /// The name of the ExtendedZone + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the ExtendedZone", + SerializedName = @"extendedZoneName", + PossibleTypes = new [] { typeof(string) })] + string ExtendedZoneName { get; set; } + /// Resource identity path + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Resource identity path", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; set; } + /// The ID of the target subscription. The value must be an UUID. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + string SubscriptionId { get; set; } + + } + internal partial interface IEdgeZonesIdentityInternal + + { + /// The name of the ExtendedZone + string ExtendedZoneName { get; set; } + /// Resource identity path + string Id { get; set; } + /// The ID of the target subscription. The value must be an UUID. + string SubscriptionId { get; set; } + + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/EdgeZonesIdentity.json.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/EdgeZonesIdentity.json.cs new file mode 100644 index 000000000000..5563798f04b5 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/EdgeZonesIdentity.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Extensions; + + public partial class EdgeZonesIdentity + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject instance to deserialize from. + internal EdgeZonesIdentity(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_subscriptionId = If( json?.PropertyT("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)_subscriptionId;} + {_extendedZoneName = If( json?.PropertyT("extendedZoneName"), out var __jsonExtendedZoneName) ? (string)__jsonExtendedZoneName : (string)_extendedZoneName;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentity. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentity. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json ? new EdgeZonesIdentity(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._subscriptionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonString(this._subscriptionId.ToString()) : null, "subscriptionId" ,container.Add ); + AddIf( null != (((object)this._extendedZoneName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonString(this._extendedZoneName.ToString()) : null, "extendedZoneName" ,container.Add ); + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorAdditionalInfo.PowerShell.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorAdditionalInfo.PowerShell.cs new file mode 100644 index 000000000000..db8cfa356591 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorAdditionalInfo.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell; + + /// The resource management error additional info. + [System.ComponentModel.TypeConverter(typeof(ErrorAdditionalInfoTypeConverter))] + public partial class ErrorAdditionalInfo + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorAdditionalInfo DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ErrorAdditionalInfo(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorAdditionalInfo DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ErrorAdditionalInfo(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ErrorAdditionalInfo(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Info")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.AnyTypeConverter.ConvertFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ErrorAdditionalInfo(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Info")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.AnyTypeConverter.ConvertFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorAdditionalInfo FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The resource management error additional info. + [System.ComponentModel.TypeConverter(typeof(ErrorAdditionalInfoTypeConverter))] + public partial interface IErrorAdditionalInfo + + { + + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorAdditionalInfo.TypeConverter.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorAdditionalInfo.TypeConverter.cs new file mode 100644 index 000000000000..7a681d9e6b50 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorAdditionalInfo.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ErrorAdditionalInfoTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorAdditionalInfo ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorAdditionalInfo).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ErrorAdditionalInfo.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ErrorAdditionalInfo.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ErrorAdditionalInfo.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorAdditionalInfo.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorAdditionalInfo.cs new file mode 100644 index 000000000000..7f3eb4036e78 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorAdditionalInfo.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Extensions; + + /// The resource management error additional info. + public partial class ErrorAdditionalInfo : + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorAdditionalInfo, + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorAdditionalInfoInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IAny _info; + + /// The additional info. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IAny Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.Any()); } + + /// Internal Acessors for Info + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IAny Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorAdditionalInfoInternal.Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.Any()); set { {_info = value;} } } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorAdditionalInfoInternal.Type { get => this._type; set { {_type = value;} } } + + /// Backing field for property. + private string _type; + + /// The additional info type. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Owned)] + public string Type { get => this._type; } + + /// Creates an new instance. + public ErrorAdditionalInfo() + { + + } + } + /// The resource management error additional info. + public partial interface IErrorAdditionalInfo : + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IJsonSerializable + { + /// The additional info. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The additional info.", + SerializedName = @"info", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IAny) })] + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IAny Info { get; } + /// The additional info type. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The additional info type.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + string Type { get; } + + } + /// The resource management error additional info. + internal partial interface IErrorAdditionalInfoInternal + + { + /// The additional info. + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IAny Info { get; set; } + /// The additional info type. + string Type { get; set; } + + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorAdditionalInfo.json.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorAdditionalInfo.json.cs new file mode 100644 index 000000000000..0a3762cc4165 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorAdditionalInfo.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Extensions; + + /// The resource management error additional info. + public partial class ErrorAdditionalInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject instance to deserialize from. + internal ErrorAdditionalInfo(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} + {_info = If( json?.PropertyT("info"), out var __jsonInfo) ? Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.Any.FromJson(__jsonInfo) : _info;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorAdditionalInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorAdditionalInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorAdditionalInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json ? new ErrorAdditionalInfo(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._info ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode) this._info.ToJson(null,serializationMode) : null, "info" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorDetail.PowerShell.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorDetail.PowerShell.cs new file mode 100644 index 000000000000..1179415ddd85 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorDetail.PowerShell.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell; + + /// The error detail. + [System.ComponentModel.TypeConverter(typeof(ErrorDetailTypeConverter))] + public partial class ErrorDetail + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetail DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ErrorDetail(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetail DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ErrorDetail(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ErrorDetail(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetailInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetailInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetailInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetailInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetailInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ErrorDetail(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetailInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetailInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetailInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetailInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetailInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetail FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The error detail. + [System.ComponentModel.TypeConverter(typeof(ErrorDetailTypeConverter))] + public partial interface IErrorDetail + + { + + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorDetail.TypeConverter.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorDetail.TypeConverter.cs new file mode 100644 index 000000000000..0465353b39e6 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorDetail.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ErrorDetailTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetail ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetail).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ErrorDetail.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ErrorDetail.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ErrorDetail.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorDetail.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorDetail.cs new file mode 100644 index 000000000000..1f9436592581 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorDetail.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Extensions; + + /// The error detail. + public partial class ErrorDetail : + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetail, + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetailInternal + { + + /// Backing field for property. + private System.Collections.Generic.List _additionalInfo; + + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Owned)] + public System.Collections.Generic.List AdditionalInfo { get => this._additionalInfo; } + + /// Backing field for property. + private string _code; + + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Owned)] + public string Code { get => this._code; } + + /// Backing field for property. + private System.Collections.Generic.List _detail; + + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Owned)] + public System.Collections.Generic.List Detail { get => this._detail; } + + /// Backing field for property. + private string _message; + + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Owned)] + public string Message { get => this._message; } + + /// Internal Acessors for AdditionalInfo + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetailInternal.AdditionalInfo { get => this._additionalInfo; set { {_additionalInfo = value;} } } + + /// Internal Acessors for Code + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetailInternal.Code { get => this._code; set { {_code = value;} } } + + /// Internal Acessors for Detail + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetailInternal.Detail { get => this._detail; set { {_detail = value;} } } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetailInternal.Message { get => this._message; set { {_message = value;} } } + + /// Internal Acessors for Target + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetailInternal.Target { get => this._target; set { {_target = value;} } } + + /// Backing field for property. + private string _target; + + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Owned)] + public string Target { get => this._target; } + + /// Creates an new instance. + public ErrorDetail() + { + + } + } + /// The error detail. + public partial interface IErrorDetail : + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IJsonSerializable + { + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error additional info.", + SerializedName = @"additionalInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorAdditionalInfo) })] + System.Collections.Generic.List AdditionalInfo { get; } + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error code.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; } + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error details.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetail) })] + System.Collections.Generic.List Detail { get; } + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error message.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; } + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error target.", + SerializedName = @"target", + PossibleTypes = new [] { typeof(string) })] + string Target { get; } + + } + /// The error detail. + internal partial interface IErrorDetailInternal + + { + /// The error additional info. + System.Collections.Generic.List AdditionalInfo { get; set; } + /// The error code. + string Code { get; set; } + /// The error details. + System.Collections.Generic.List Detail { get; set; } + /// The error message. + string Message { get; set; } + /// The error target. + string Target { get; set; } + + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorDetail.json.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorDetail.json.cs new file mode 100644 index 000000000000..56e83aa4c0f4 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorDetail.json.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Extensions; + + /// The error detail. + public partial class ErrorDetail + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject instance to deserialize from. + internal ErrorDetail(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)_code;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)_message;} + {_target = If( json?.PropertyT("target"), out var __jsonTarget) ? (string)__jsonTarget : (string)_target;} + {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? If( __jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetail) (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ErrorDetail.FromJson(__u) )) ))() : null : _detail;} + {_additionalInfo = If( json?.PropertyT("additionalInfo"), out var __jsonAdditionalInfo) ? If( __jsonAdditionalInfo as Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonArray, out var __q) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorAdditionalInfo) (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ErrorAdditionalInfo.FromJson(__p) )) ))() : null : _additionalInfo;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetail. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetail. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetail FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json ? new ErrorDetail(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._target)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonString(this._target.ToString()) : null, "target" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeRead)) + { + if (null != this._detail) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.XNodeArray(); + foreach( var __x in this._detail ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("details",__w); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeRead)) + { + if (null != this._additionalInfo) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.XNodeArray(); + foreach( var __s in this._additionalInfo ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("additionalInfo",__r); + } + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorResponse.PowerShell.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorResponse.PowerShell.cs new file mode 100644 index 000000000000..b9f9f1ba8928 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorResponse.PowerShell.cs @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell; + + /// + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + /// + [System.ComponentModel.TypeConverter(typeof(ErrorResponseTypeConverter))] + public partial class ErrorResponse + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ErrorResponse(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ErrorResponse(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ErrorResponse(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponseInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponseInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponseInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponseInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponseInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ErrorResponse(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponseInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponseInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponseInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponseInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponseInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + [System.ComponentModel.TypeConverter(typeof(ErrorResponseTypeConverter))] + public partial interface IErrorResponse + + { + + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorResponse.TypeConverter.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorResponse.TypeConverter.cs new file mode 100644 index 000000000000..9379a8ee0575 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorResponse.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ErrorResponseTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponse ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponse).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ErrorResponse.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ErrorResponse.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ErrorResponse.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorResponse.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorResponse.cs new file mode 100644 index 000000000000..c2124e0ff391 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorResponse.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Extensions; + + /// + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + /// + public partial class ErrorResponse : + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponse, + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponseInternal + { + + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Inlined)] + public System.Collections.Generic.List AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetailInternal)Error).AdditionalInfo; } + + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Inlined)] + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetailInternal)Error).Code; } + + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Inlined)] + public System.Collections.Generic.List Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetailInternal)Error).Detail; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetail _error; + + /// The error object. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetail Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ErrorDetail()); set => this._error = value; } + + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Inlined)] + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetailInternal)Error).Message; } + + /// Internal Acessors for AdditionalInfo + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponseInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetailInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetailInternal)Error).AdditionalInfo = value; } + + /// Internal Acessors for Code + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponseInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetailInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetailInternal)Error).Code = value; } + + /// Internal Acessors for Detail + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponseInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetailInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetailInternal)Error).Detail = value; } + + /// Internal Acessors for Error + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponseInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ErrorDetail()); set { {_error = value;} } } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponseInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetailInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetailInternal)Error).Message = value; } + + /// Internal Acessors for Target + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponseInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetailInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetailInternal)Error).Target = value; } + + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Inlined)] + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetailInternal)Error).Target; } + + /// Creates an new instance. + public ErrorResponse() + { + + } + } + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + public partial interface IErrorResponse : + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IJsonSerializable + { + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error additional info.", + SerializedName = @"additionalInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorAdditionalInfo) })] + System.Collections.Generic.List AdditionalInfo { get; } + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error code.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; } + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error details.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetail) })] + System.Collections.Generic.List Detail { get; } + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error message.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; } + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error target.", + SerializedName = @"target", + PossibleTypes = new [] { typeof(string) })] + string Target { get; } + + } + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + internal partial interface IErrorResponseInternal + + { + /// The error additional info. + System.Collections.Generic.List AdditionalInfo { get; set; } + /// The error code. + string Code { get; set; } + /// The error details. + System.Collections.Generic.List Detail { get; set; } + /// The error object. + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorDetail Error { get; set; } + /// The error message. + string Message { get; set; } + /// The error target. + string Target { get; set; } + + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorResponse.json.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorResponse.json.cs new file mode 100644 index 000000000000..34604477a0f1 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ErrorResponse.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Extensions; + + /// + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + /// + public partial class ErrorResponse + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject instance to deserialize from. + internal ErrorResponse(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ErrorDetail.FromJson(__jsonError) : _error;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponse. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponse. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json ? new ErrorResponse(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode) this._error.ToJson(null,serializationMode) : null, "error" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZone.PowerShell.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZone.PowerShell.cs new file mode 100644 index 000000000000..34e5289f8869 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZone.PowerShell.cs @@ -0,0 +1,334 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell; + + /// + /// Resource that represents an Azure Extended Zone available to a subscription for registering and unregistering. + /// + [System.ComponentModel.TypeConverter(typeof(ExtendedZoneTypeConverter))] + public partial class ExtendedZone + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ExtendedZone(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ExtendedZone(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ExtendedZone(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ExtendedZonePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("RegistrationState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).RegistrationState = (string) content.GetValueForProperty("RegistrationState",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).RegistrationState, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("RegionalDisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).RegionalDisplayName = (string) content.GetValueForProperty("RegionalDisplayName",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).RegionalDisplayName, global::System.Convert.ToString); + } + if (content.Contains("RegionType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).RegionType = (string) content.GetValueForProperty("RegionType",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).RegionType, global::System.Convert.ToString); + } + if (content.Contains("RegionCategory")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).RegionCategory = (string) content.GetValueForProperty("RegionCategory",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).RegionCategory, global::System.Convert.ToString); + } + if (content.Contains("Geography")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).Geography = (string) content.GetValueForProperty("Geography",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).Geography, global::System.Convert.ToString); + } + if (content.Contains("GeographyGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).GeographyGroup = (string) content.GetValueForProperty("GeographyGroup",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).GeographyGroup, global::System.Convert.ToString); + } + if (content.Contains("Longitude")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).Longitude = (string) content.GetValueForProperty("Longitude",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).Longitude, global::System.Convert.ToString); + } + if (content.Contains("Latitude")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).Latitude = (string) content.GetValueForProperty("Latitude",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).Latitude, global::System.Convert.ToString); + } + if (content.Contains("HomeLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).HomeLocation = (string) content.GetValueForProperty("HomeLocation",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).HomeLocation, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ExtendedZone(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ExtendedZonePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("RegistrationState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).RegistrationState = (string) content.GetValueForProperty("RegistrationState",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).RegistrationState, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("RegionalDisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).RegionalDisplayName = (string) content.GetValueForProperty("RegionalDisplayName",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).RegionalDisplayName, global::System.Convert.ToString); + } + if (content.Contains("RegionType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).RegionType = (string) content.GetValueForProperty("RegionType",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).RegionType, global::System.Convert.ToString); + } + if (content.Contains("RegionCategory")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).RegionCategory = (string) content.GetValueForProperty("RegionCategory",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).RegionCategory, global::System.Convert.ToString); + } + if (content.Contains("Geography")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).Geography = (string) content.GetValueForProperty("Geography",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).Geography, global::System.Convert.ToString); + } + if (content.Contains("GeographyGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).GeographyGroup = (string) content.GetValueForProperty("GeographyGroup",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).GeographyGroup, global::System.Convert.ToString); + } + if (content.Contains("Longitude")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).Longitude = (string) content.GetValueForProperty("Longitude",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).Longitude, global::System.Convert.ToString); + } + if (content.Contains("Latitude")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).Latitude = (string) content.GetValueForProperty("Latitude",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).Latitude, global::System.Convert.ToString); + } + if (content.Contains("HomeLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).HomeLocation = (string) content.GetValueForProperty("HomeLocation",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal)this).HomeLocation, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Resource that represents an Azure Extended Zone available to a subscription for registering and unregistering. + [System.ComponentModel.TypeConverter(typeof(ExtendedZoneTypeConverter))] + public partial interface IExtendedZone + + { + + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZone.TypeConverter.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZone.TypeConverter.cs new file mode 100644 index 000000000000..8a7cf8a7bab4 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZone.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ExtendedZoneTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ExtendedZone.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ExtendedZone.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ExtendedZone.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZone.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZone.cs new file mode 100644 index 000000000000..785176cb41cd --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZone.cs @@ -0,0 +1,358 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Extensions; + + /// + /// Resource that represents an Azure Extended Zone available to a subscription for registering and unregistering. + /// + public partial class ExtendedZone : + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone, + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal, + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ProxyResource(); + + /// Display name of the Azure Extended Zone. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Inlined)] + public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)Property).DisplayName; } + + /// Geography of the Azure Extended Zone. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Inlined)] + public string Geography { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)Property).Geography; } + + /// The Geography Group of the Azure Extended Zone. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Inlined)] + public string GeographyGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)Property).GeographyGroup; } + + /// The Home Location of the Azure Extended Zone. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Inlined)] + public string HomeLocation { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)Property).HomeLocation; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__proxyResource).Id; } + + /// The Latitude of the Azure Extended Zone. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Inlined)] + public string Latitude { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)Property).Latitude; } + + /// The Longitude of the Azure Extended Zone. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Inlined)] + public string Longitude { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)Property).Longitude; } + + /// Internal Acessors for DisplayName + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal.DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)Property).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)Property).DisplayName = value; } + + /// Internal Acessors for Geography + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal.Geography { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)Property).Geography; set => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)Property).Geography = value; } + + /// Internal Acessors for GeographyGroup + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal.GeographyGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)Property).GeographyGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)Property).GeographyGroup = value; } + + /// Internal Acessors for HomeLocation + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal.HomeLocation { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)Property).HomeLocation; set => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)Property).HomeLocation = value; } + + /// Internal Acessors for Latitude + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal.Latitude { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)Property).Latitude; set => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)Property).Latitude = value; } + + /// Internal Acessors for Longitude + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal.Longitude { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)Property).Longitude; set => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)Property).Longitude = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneProperties Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ExtendedZoneProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for RegionCategory + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal.RegionCategory { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)Property).RegionCategory; set => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)Property).RegionCategory = value; } + + /// Internal Acessors for RegionType + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal.RegionType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)Property).RegionType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)Property).RegionType = value; } + + /// Internal Acessors for RegionalDisplayName + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal.RegionalDisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)Property).RegionalDisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)Property).RegionalDisplayName = value; } + + /// Internal Acessors for RegistrationState + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneInternal.RegistrationState { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)Property).RegistrationState; set => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)Property).RegistrationState = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__proxyResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__proxyResource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__proxyResource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__proxyResource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__proxyResource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ExtendedZoneProperties()); set => this._property = value; } + + /// + /// Status of the last operation performed by the subscription on the Edge Zone resource + /// + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)Property).ProvisioningState; } + + /// Category of region for the Azure Extended Zone. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Inlined)] + public string RegionCategory { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)Property).RegionCategory; } + + /// Type of region for the Azure Extended Zone. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Inlined)] + public string RegionType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)Property).RegionType; } + + /// Regional display name of the Azure Extended Zone. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Inlined)] + public string RegionalDisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)Property).RegionalDisplayName; } + + /// Indicates the Azure Extended Zone registration’s approval status. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Inlined)] + public string RegistrationState { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)Property).RegistrationState; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Owned)] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__proxyResource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType = value ?? null; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType = value ?? null; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__proxyResource).Type; } + + /// Creates an new instance. + public ExtendedZone() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); + } + } + /// Resource that represents an Azure Extended Zone available to a subscription for registering and unregistering. + public partial interface IExtendedZone : + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IProxyResource + { + /// Display name of the Azure Extended Zone. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Display name of the Azure Extended Zone.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; } + /// Geography of the Azure Extended Zone. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Geography of the Azure Extended Zone.", + SerializedName = @"geography", + PossibleTypes = new [] { typeof(string) })] + string Geography { get; } + /// The Geography Group of the Azure Extended Zone. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The Geography Group of the Azure Extended Zone.", + SerializedName = @"geographyGroup", + PossibleTypes = new [] { typeof(string) })] + string GeographyGroup { get; } + /// The Home Location of the Azure Extended Zone. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The Home Location of the Azure Extended Zone.", + SerializedName = @"homeLocation", + PossibleTypes = new [] { typeof(string) })] + string HomeLocation { get; } + /// The Latitude of the Azure Extended Zone. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The Latitude of the Azure Extended Zone.", + SerializedName = @"latitude", + PossibleTypes = new [] { typeof(string) })] + string Latitude { get; } + /// The Longitude of the Azure Extended Zone. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The Longitude of the Azure Extended Zone.", + SerializedName = @"longitude", + PossibleTypes = new [] { typeof(string) })] + string Longitude { get; } + /// + /// Status of the last operation performed by the subscription on the Edge Zone resource + /// + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Status of the last operation performed by the subscription on the Edge Zone resource", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")] + string ProvisioningState { get; } + /// Category of region for the Azure Extended Zone. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Category of region for the Azure Extended Zone.", + SerializedName = @"regionCategory", + PossibleTypes = new [] { typeof(string) })] + string RegionCategory { get; } + /// Type of region for the Azure Extended Zone. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Type of region for the Azure Extended Zone.", + SerializedName = @"regionType", + PossibleTypes = new [] { typeof(string) })] + string RegionType { get; } + /// Regional display name of the Azure Extended Zone. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Regional display name of the Azure Extended Zone.", + SerializedName = @"regionalDisplayName", + PossibleTypes = new [] { typeof(string) })] + string RegionalDisplayName { get; } + /// Indicates the Azure Extended Zone registration’s approval status. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Indicates the Azure Extended Zone registration’s approval status.", + SerializedName = @"registrationState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PSArgumentCompleterAttribute("NotRegistered", "PendingRegister", "Registered", "PendingUnregister")] + string RegistrationState { get; } + + } + /// Resource that represents an Azure Extended Zone available to a subscription for registering and unregistering. + internal partial interface IExtendedZoneInternal : + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IProxyResourceInternal + { + /// Display name of the Azure Extended Zone. + string DisplayName { get; set; } + /// Geography of the Azure Extended Zone. + string Geography { get; set; } + /// The Geography Group of the Azure Extended Zone. + string GeographyGroup { get; set; } + /// The Home Location of the Azure Extended Zone. + string HomeLocation { get; set; } + /// The Latitude of the Azure Extended Zone. + string Latitude { get; set; } + /// The Longitude of the Azure Extended Zone. + string Longitude { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneProperties Property { get; set; } + /// + /// Status of the last operation performed by the subscription on the Edge Zone resource + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")] + string ProvisioningState { get; set; } + /// Category of region for the Azure Extended Zone. + string RegionCategory { get; set; } + /// Type of region for the Azure Extended Zone. + string RegionType { get; set; } + /// Regional display name of the Azure Extended Zone. + string RegionalDisplayName { get; set; } + /// Indicates the Azure Extended Zone registration’s approval status. + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PSArgumentCompleterAttribute("NotRegistered", "PendingRegister", "Registered", "PendingUnregister")] + string RegistrationState { get; set; } + + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZone.json.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZone.json.cs new file mode 100644 index 000000000000..ae149d8de611 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZone.json.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Extensions; + + /// + /// Resource that represents an Azure Extended Zone available to a subscription for registering and unregistering. + /// + public partial class ExtendedZone + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject instance to deserialize from. + internal ExtendedZone(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ExtendedZoneProperties.FromJson(__jsonProperties) : _property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json ? new ExtendedZone(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __proxyResource?.ToJson(container, serializationMode); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZoneListResult.PowerShell.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZoneListResult.PowerShell.cs new file mode 100644 index 000000000000..904bc359011f --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZoneListResult.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell; + + /// The response of a ExtendedZone list operation. + [System.ComponentModel.TypeConverter(typeof(ExtendedZoneListResultTypeConverter))] + public partial class ExtendedZoneListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ExtendedZoneListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ExtendedZoneListResult(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ExtendedZoneListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ExtendedZoneTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ExtendedZoneListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ExtendedZoneTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The response of a ExtendedZone list operation. + [System.ComponentModel.TypeConverter(typeof(ExtendedZoneListResultTypeConverter))] + public partial interface IExtendedZoneListResult + + { + + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZoneListResult.TypeConverter.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZoneListResult.TypeConverter.cs new file mode 100644 index 000000000000..d3c5a75812d4 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZoneListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ExtendedZoneListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ExtendedZoneListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ExtendedZoneListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ExtendedZoneListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZoneListResult.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZoneListResult.cs new file mode 100644 index 000000000000..3a550f5440d2 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZoneListResult.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Extensions; + + /// The response of a ExtendedZone list operation. + public partial class ExtendedZoneListResult : + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneListResult, + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneListResultInternal + { + + /// Internal Acessors for NextLink + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// The ExtendedZone items on this page + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public ExtendedZoneListResult() + { + + } + } + /// The response of a ExtendedZone list operation. + public partial interface IExtendedZoneListResult : + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; } + /// The ExtendedZone items on this page + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The ExtendedZone items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone) })] + System.Collections.Generic.List Value { get; set; } + + } + /// The response of a ExtendedZone list operation. + internal partial interface IExtendedZoneListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The ExtendedZone items on this page + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZoneListResult.json.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZoneListResult.json.cs new file mode 100644 index 000000000000..314479d50a18 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZoneListResult.json.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Extensions; + + /// The response of a ExtendedZone list operation. + public partial class ExtendedZoneListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject instance to deserialize from. + internal ExtendedZoneListResult(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone) (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ExtendedZone.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json ? new ExtendedZoneListResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZoneProperties.PowerShell.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZoneProperties.PowerShell.cs new file mode 100644 index 000000000000..2c9c795d7e5b --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZoneProperties.PowerShell.cs @@ -0,0 +1,244 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell; + + /// The properties of an Extended Zone resource. + [System.ComponentModel.TypeConverter(typeof(ExtendedZonePropertiesTypeConverter))] + public partial class ExtendedZoneProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ExtendedZoneProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ExtendedZoneProperties(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ExtendedZoneProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("RegistrationState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)this).RegistrationState = (string) content.GetValueForProperty("RegistrationState",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)this).RegistrationState, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("RegionalDisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)this).RegionalDisplayName = (string) content.GetValueForProperty("RegionalDisplayName",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)this).RegionalDisplayName, global::System.Convert.ToString); + } + if (content.Contains("RegionType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)this).RegionType = (string) content.GetValueForProperty("RegionType",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)this).RegionType, global::System.Convert.ToString); + } + if (content.Contains("RegionCategory")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)this).RegionCategory = (string) content.GetValueForProperty("RegionCategory",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)this).RegionCategory, global::System.Convert.ToString); + } + if (content.Contains("Geography")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)this).Geography = (string) content.GetValueForProperty("Geography",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)this).Geography, global::System.Convert.ToString); + } + if (content.Contains("GeographyGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)this).GeographyGroup = (string) content.GetValueForProperty("GeographyGroup",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)this).GeographyGroup, global::System.Convert.ToString); + } + if (content.Contains("Longitude")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)this).Longitude = (string) content.GetValueForProperty("Longitude",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)this).Longitude, global::System.Convert.ToString); + } + if (content.Contains("Latitude")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)this).Latitude = (string) content.GetValueForProperty("Latitude",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)this).Latitude, global::System.Convert.ToString); + } + if (content.Contains("HomeLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)this).HomeLocation = (string) content.GetValueForProperty("HomeLocation",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)this).HomeLocation, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ExtendedZoneProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("RegistrationState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)this).RegistrationState = (string) content.GetValueForProperty("RegistrationState",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)this).RegistrationState, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("RegionalDisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)this).RegionalDisplayName = (string) content.GetValueForProperty("RegionalDisplayName",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)this).RegionalDisplayName, global::System.Convert.ToString); + } + if (content.Contains("RegionType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)this).RegionType = (string) content.GetValueForProperty("RegionType",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)this).RegionType, global::System.Convert.ToString); + } + if (content.Contains("RegionCategory")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)this).RegionCategory = (string) content.GetValueForProperty("RegionCategory",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)this).RegionCategory, global::System.Convert.ToString); + } + if (content.Contains("Geography")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)this).Geography = (string) content.GetValueForProperty("Geography",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)this).Geography, global::System.Convert.ToString); + } + if (content.Contains("GeographyGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)this).GeographyGroup = (string) content.GetValueForProperty("GeographyGroup",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)this).GeographyGroup, global::System.Convert.ToString); + } + if (content.Contains("Longitude")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)this).Longitude = (string) content.GetValueForProperty("Longitude",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)this).Longitude, global::System.Convert.ToString); + } + if (content.Contains("Latitude")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)this).Latitude = (string) content.GetValueForProperty("Latitude",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)this).Latitude, global::System.Convert.ToString); + } + if (content.Contains("HomeLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)this).HomeLocation = (string) content.GetValueForProperty("HomeLocation",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal)this).HomeLocation, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The properties of an Extended Zone resource. + [System.ComponentModel.TypeConverter(typeof(ExtendedZonePropertiesTypeConverter))] + public partial interface IExtendedZoneProperties + + { + + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZoneProperties.TypeConverter.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZoneProperties.TypeConverter.cs new file mode 100644 index 000000000000..289d0bf83e99 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZoneProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ExtendedZonePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ExtendedZoneProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ExtendedZoneProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ExtendedZoneProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZoneProperties.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZoneProperties.cs new file mode 100644 index 000000000000..e5804b9c5267 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZoneProperties.cs @@ -0,0 +1,297 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Extensions; + + /// The properties of an Extended Zone resource. + public partial class ExtendedZoneProperties : + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneProperties, + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal + { + + /// Backing field for property. + private string _displayName; + + /// Display name of the Azure Extended Zone. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Owned)] + public string DisplayName { get => this._displayName; } + + /// Backing field for property. + private string _geography; + + /// Geography of the Azure Extended Zone. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Owned)] + public string Geography { get => this._geography; } + + /// Backing field for property. + private string _geographyGroup; + + /// The Geography Group of the Azure Extended Zone. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Owned)] + public string GeographyGroup { get => this._geographyGroup; } + + /// Backing field for property. + private string _homeLocation; + + /// The Home Location of the Azure Extended Zone. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Owned)] + public string HomeLocation { get => this._homeLocation; } + + /// Backing field for property. + private string _latitude; + + /// The Latitude of the Azure Extended Zone. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Owned)] + public string Latitude { get => this._latitude; } + + /// Backing field for property. + private string _longitude; + + /// The Longitude of the Azure Extended Zone. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Owned)] + public string Longitude { get => this._longitude; } + + /// Internal Acessors for DisplayName + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal.DisplayName { get => this._displayName; set { {_displayName = value;} } } + + /// Internal Acessors for Geography + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal.Geography { get => this._geography; set { {_geography = value;} } } + + /// Internal Acessors for GeographyGroup + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal.GeographyGroup { get => this._geographyGroup; set { {_geographyGroup = value;} } } + + /// Internal Acessors for HomeLocation + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal.HomeLocation { get => this._homeLocation; set { {_homeLocation = value;} } } + + /// Internal Acessors for Latitude + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal.Latitude { get => this._latitude; set { {_latitude = value;} } } + + /// Internal Acessors for Longitude + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal.Longitude { get => this._longitude; set { {_longitude = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for RegionCategory + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal.RegionCategory { get => this._regionCategory; set { {_regionCategory = value;} } } + + /// Internal Acessors for RegionType + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal.RegionType { get => this._regionType; set { {_regionType = value;} } } + + /// Internal Acessors for RegionalDisplayName + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal.RegionalDisplayName { get => this._regionalDisplayName; set { {_regionalDisplayName = value;} } } + + /// Internal Acessors for RegistrationState + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZonePropertiesInternal.RegistrationState { get => this._registrationState; set { {_registrationState = value;} } } + + /// Backing field for property. + private string _provisioningState; + + /// + /// Status of the last operation performed by the subscription on the Edge Zone resource + /// + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private string _regionCategory; + + /// Category of region for the Azure Extended Zone. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Owned)] + public string RegionCategory { get => this._regionCategory; } + + /// Backing field for property. + private string _regionType; + + /// Type of region for the Azure Extended Zone. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Owned)] + public string RegionType { get => this._regionType; } + + /// Backing field for property. + private string _regionalDisplayName; + + /// Regional display name of the Azure Extended Zone. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Owned)] + public string RegionalDisplayName { get => this._regionalDisplayName; } + + /// Backing field for property. + private string _registrationState; + + /// Indicates the Azure Extended Zone registration’s approval status. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Owned)] + public string RegistrationState { get => this._registrationState; } + + /// Creates an new instance. + public ExtendedZoneProperties() + { + + } + } + /// The properties of an Extended Zone resource. + public partial interface IExtendedZoneProperties : + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IJsonSerializable + { + /// Display name of the Azure Extended Zone. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = true, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Display name of the Azure Extended Zone.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; } + /// Geography of the Azure Extended Zone. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = true, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Geography of the Azure Extended Zone.", + SerializedName = @"geography", + PossibleTypes = new [] { typeof(string) })] + string Geography { get; } + /// The Geography Group of the Azure Extended Zone. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = true, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The Geography Group of the Azure Extended Zone.", + SerializedName = @"geographyGroup", + PossibleTypes = new [] { typeof(string) })] + string GeographyGroup { get; } + /// The Home Location of the Azure Extended Zone. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = true, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The Home Location of the Azure Extended Zone.", + SerializedName = @"homeLocation", + PossibleTypes = new [] { typeof(string) })] + string HomeLocation { get; } + /// The Latitude of the Azure Extended Zone. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = true, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The Latitude of the Azure Extended Zone.", + SerializedName = @"latitude", + PossibleTypes = new [] { typeof(string) })] + string Latitude { get; } + /// The Longitude of the Azure Extended Zone. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = true, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The Longitude of the Azure Extended Zone.", + SerializedName = @"longitude", + PossibleTypes = new [] { typeof(string) })] + string Longitude { get; } + /// + /// Status of the last operation performed by the subscription on the Edge Zone resource + /// + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Status of the last operation performed by the subscription on the Edge Zone resource", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")] + string ProvisioningState { get; } + /// Category of region for the Azure Extended Zone. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = true, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Category of region for the Azure Extended Zone.", + SerializedName = @"regionCategory", + PossibleTypes = new [] { typeof(string) })] + string RegionCategory { get; } + /// Type of region for the Azure Extended Zone. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = true, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Type of region for the Azure Extended Zone.", + SerializedName = @"regionType", + PossibleTypes = new [] { typeof(string) })] + string RegionType { get; } + /// Regional display name of the Azure Extended Zone. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = true, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Regional display name of the Azure Extended Zone.", + SerializedName = @"regionalDisplayName", + PossibleTypes = new [] { typeof(string) })] + string RegionalDisplayName { get; } + /// Indicates the Azure Extended Zone registration’s approval status. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Indicates the Azure Extended Zone registration’s approval status.", + SerializedName = @"registrationState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PSArgumentCompleterAttribute("NotRegistered", "PendingRegister", "Registered", "PendingUnregister")] + string RegistrationState { get; } + + } + /// The properties of an Extended Zone resource. + internal partial interface IExtendedZonePropertiesInternal + + { + /// Display name of the Azure Extended Zone. + string DisplayName { get; set; } + /// Geography of the Azure Extended Zone. + string Geography { get; set; } + /// The Geography Group of the Azure Extended Zone. + string GeographyGroup { get; set; } + /// The Home Location of the Azure Extended Zone. + string HomeLocation { get; set; } + /// The Latitude of the Azure Extended Zone. + string Latitude { get; set; } + /// The Longitude of the Azure Extended Zone. + string Longitude { get; set; } + /// + /// Status of the last operation performed by the subscription on the Edge Zone resource + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")] + string ProvisioningState { get; set; } + /// Category of region for the Azure Extended Zone. + string RegionCategory { get; set; } + /// Type of region for the Azure Extended Zone. + string RegionType { get; set; } + /// Regional display name of the Azure Extended Zone. + string RegionalDisplayName { get; set; } + /// Indicates the Azure Extended Zone registration’s approval status. + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PSArgumentCompleterAttribute("NotRegistered", "PendingRegister", "Registered", "PendingUnregister")] + string RegistrationState { get; set; } + + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZoneProperties.json.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZoneProperties.json.cs new file mode 100644 index 000000000000..55424507403c --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ExtendedZoneProperties.json.cs @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Extensions; + + /// The properties of an Extended Zone resource. + public partial class ExtendedZoneProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject instance to deserialize from. + internal ExtendedZoneProperties(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} + {_registrationState = If( json?.PropertyT("registrationState"), out var __jsonRegistrationState) ? (string)__jsonRegistrationState : (string)_registrationState;} + {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)_displayName;} + {_regionalDisplayName = If( json?.PropertyT("regionalDisplayName"), out var __jsonRegionalDisplayName) ? (string)__jsonRegionalDisplayName : (string)_regionalDisplayName;} + {_regionType = If( json?.PropertyT("regionType"), out var __jsonRegionType) ? (string)__jsonRegionType : (string)_regionType;} + {_regionCategory = If( json?.PropertyT("regionCategory"), out var __jsonRegionCategory) ? (string)__jsonRegionCategory : (string)_regionCategory;} + {_geography = If( json?.PropertyT("geography"), out var __jsonGeography) ? (string)__jsonGeography : (string)_geography;} + {_geographyGroup = If( json?.PropertyT("geographyGroup"), out var __jsonGeographyGroup) ? (string)__jsonGeographyGroup : (string)_geographyGroup;} + {_longitude = If( json?.PropertyT("longitude"), out var __jsonLongitude) ? (string)__jsonLongitude : (string)_longitude;} + {_latitude = If( json?.PropertyT("latitude"), out var __jsonLatitude) ? (string)__jsonLatitude : (string)_latitude;} + {_homeLocation = If( json?.PropertyT("homeLocation"), out var __jsonHomeLocation) ? (string)__jsonHomeLocation : (string)_homeLocation;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json ? new ExtendedZoneProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._registrationState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonString(this._registrationState.ToString()) : null, "registrationState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._regionalDisplayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonString(this._regionalDisplayName.ToString()) : null, "regionalDisplayName" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._regionType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonString(this._regionType.ToString()) : null, "regionType" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._regionCategory)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonString(this._regionCategory.ToString()) : null, "regionCategory" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._geography)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonString(this._geography.ToString()) : null, "geography" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._geographyGroup)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonString(this._geographyGroup.ToString()) : null, "geographyGroup" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._longitude)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonString(this._longitude.ToString()) : null, "longitude" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._latitude)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonString(this._latitude.ToString()) : null, "latitude" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._homeLocation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonString(this._homeLocation.ToString()) : null, "homeLocation" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Operation.PowerShell.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Operation.PowerShell.cs new file mode 100644 index 000000000000..fc8f6a67786d --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Operation.PowerShell.cs @@ -0,0 +1,230 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell; + + /// + /// Details of a REST API operation, returned from the Resource Provider Operations API + /// + [System.ComponentModel.TypeConverter(typeof(OperationTypeConverter))] + public partial class Operation + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Operation(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Operation(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Operation(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Display")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.OperationDisplayTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("IsDataAction")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Origin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationInternal)this).Origin = (string) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationInternal)this).Origin, global::System.Convert.ToString); + } + if (content.Contains("ActionType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationInternal)this).ActionType = (string) content.GetValueForProperty("ActionType",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationInternal)this).ActionType, global::System.Convert.ToString); + } + if (content.Contains("DisplayProvider")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString); + } + if (content.Contains("DisplayResource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationInternal)this).DisplayResource, global::System.Convert.ToString); + } + if (content.Contains("DisplayOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString); + } + if (content.Contains("DisplayDescription")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationInternal)this).DisplayDescription, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Operation(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Display")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.OperationDisplayTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("IsDataAction")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Origin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationInternal)this).Origin = (string) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationInternal)this).Origin, global::System.Convert.ToString); + } + if (content.Contains("ActionType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationInternal)this).ActionType = (string) content.GetValueForProperty("ActionType",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationInternal)this).ActionType, global::System.Convert.ToString); + } + if (content.Contains("DisplayProvider")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString); + } + if (content.Contains("DisplayResource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationInternal)this).DisplayResource, global::System.Convert.ToString); + } + if (content.Contains("DisplayOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString); + } + if (content.Contains("DisplayDescription")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationInternal)this).DisplayDescription, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Details of a REST API operation, returned from the Resource Provider Operations API + [System.ComponentModel.TypeConverter(typeof(OperationTypeConverter))] + public partial interface IOperation + + { + + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Operation.TypeConverter.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Operation.TypeConverter.cs new file mode 100644 index 000000000000..5df2dede3eac --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Operation.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OperationTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperation ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperation).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Operation.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Operation.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Operation.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Operation.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Operation.cs new file mode 100644 index 000000000000..b9b0d5a1b701 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Operation.cs @@ -0,0 +1,284 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Extensions; + + /// + /// Details of a REST API operation, returned from the Resource Provider Operations API + /// + public partial class Operation : + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperation, + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationInternal + { + + /// Backing field for property. + private string _actionType; + + /// + /// Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + /// + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Owned)] + public string ActionType { get => this._actionType; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplay _display; + + /// Localized display information for this particular operation. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplay Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.OperationDisplay()); set => this._display = value; } + + /// + /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. + /// + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Inlined)] + public string DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplayInternal)Display).Description; } + + /// + /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", + /// "Restart Virtual Machine". + /// + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Inlined)] + public string DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplayInternal)Display).Operation; } + + /// + /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". + /// + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Inlined)] + public string DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplayInternal)Display).Provider; } + + /// + /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + /// + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Inlined)] + public string DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplayInternal)Display).Resource; } + + /// Backing field for property. + private bool? _isDataAction; + + /// + /// Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane + /// operations. + /// + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Owned)] + public bool? IsDataAction { get => this._isDataAction; } + + /// Internal Acessors for ActionType + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationInternal.ActionType { get => this._actionType; set { {_actionType = value;} } } + + /// Internal Acessors for Display + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplay Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationInternal.Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.OperationDisplay()); set { {_display = value;} } } + + /// Internal Acessors for DisplayDescription + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationInternal.DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplayInternal)Display).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplayInternal)Display).Description = value; } + + /// Internal Acessors for DisplayOperation + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationInternal.DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplayInternal)Display).Operation = value; } + + /// Internal Acessors for DisplayProvider + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationInternal.DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplayInternal)Display).Provider = value; } + + /// Internal Acessors for DisplayResource + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationInternal.DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplayInternal)Display).Resource = value; } + + /// Internal Acessors for IsDataAction + bool? Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationInternal.IsDataAction { get => this._isDataAction; set { {_isDataAction = value;} } } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationInternal.Name { get => this._name; set { {_name = value;} } } + + /// Internal Acessors for Origin + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationInternal.Origin { get => this._origin; set { {_origin = value;} } } + + /// Backing field for property. + private string _name; + + /// + /// The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", + /// "Microsoft.Compute/virtualMachines/capture/action" + /// + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Owned)] + public string Name { get => this._name; } + + /// Backing field for property. + private string _origin; + + /// + /// The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is + /// "user,system" + /// + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Owned)] + public string Origin { get => this._origin; } + + /// Creates an new instance. + public Operation() + { + + } + } + /// Details of a REST API operation, returned from the Resource Provider Operations API + public partial interface IOperation : + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IJsonSerializable + { + /// + /// Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + /// + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Enum. Indicates the action type. ""Internal"" refers to actions that are for internal only APIs.", + SerializedName = @"actionType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PSArgumentCompleterAttribute("Internal")] + string ActionType { get; } + /// + /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. + /// + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The short, localized friendly description of the operation; suitable for tool tips and detailed views.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string DisplayDescription { get; } + /// + /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", + /// "Restart Virtual Machine". + /// + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The concise, localized friendly name for the operation; suitable for dropdowns. E.g. ""Create or Update Virtual Machine"", ""Restart Virtual Machine"".", + SerializedName = @"operation", + PossibleTypes = new [] { typeof(string) })] + string DisplayOperation { get; } + /// + /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". + /// + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The localized friendly form of the resource provider name, e.g. ""Microsoft Monitoring Insights"" or ""Microsoft Compute"".", + SerializedName = @"provider", + PossibleTypes = new [] { typeof(string) })] + string DisplayProvider { get; } + /// + /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + /// + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The localized friendly name of the resource type related to this operation. E.g. ""Virtual Machines"" or ""Job Schedule Collections"".", + SerializedName = @"resource", + PossibleTypes = new [] { typeof(string) })] + string DisplayResource { get; } + /// + /// Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane + /// operations. + /// + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Whether the operation applies to data-plane. This is ""true"" for data-plane operations and ""false"" for ARM/control-plane operations.", + SerializedName = @"isDataAction", + PossibleTypes = new [] { typeof(bool) })] + bool? IsDataAction { get; } + /// + /// The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", + /// "Microsoft.Compute/virtualMachines/capture/action" + /// + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The name of the operation, as per Resource-Based Access Control (RBAC). Examples: ""Microsoft.Compute/virtualMachines/write"", ""Microsoft.Compute/virtualMachines/capture/action""", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; } + /// + /// The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is + /// "user,system" + /// + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is ""user,system""", + SerializedName = @"origin", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PSArgumentCompleterAttribute("user", "system", "user,system")] + string Origin { get; } + + } + /// Details of a REST API operation, returned from the Resource Provider Operations API + internal partial interface IOperationInternal + + { + /// + /// Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PSArgumentCompleterAttribute("Internal")] + string ActionType { get; set; } + /// Localized display information for this particular operation. + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplay Display { get; set; } + /// + /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. + /// + string DisplayDescription { get; set; } + /// + /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", + /// "Restart Virtual Machine". + /// + string DisplayOperation { get; set; } + /// + /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". + /// + string DisplayProvider { get; set; } + /// + /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + /// + string DisplayResource { get; set; } + /// + /// Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane + /// operations. + /// + bool? IsDataAction { get; set; } + /// + /// The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", + /// "Microsoft.Compute/virtualMachines/capture/action" + /// + string Name { get; set; } + /// + /// The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is + /// "user,system" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PSArgumentCompleterAttribute("user", "system", "user,system")] + string Origin { get; set; } + + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Operation.json.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Operation.json.cs new file mode 100644 index 000000000000..f18a1cccef95 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Operation.json.cs @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Extensions; + + /// + /// Details of a REST API operation, returned from the Resource Provider Operations API + /// + public partial class Operation + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperation. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperation. + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json ? new Operation(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject instance to deserialize from. + internal Operation(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_display = If( json?.PropertyT("display"), out var __jsonDisplay) ? Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.OperationDisplay.FromJson(__jsonDisplay) : _display;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_isDataAction = If( json?.PropertyT("isDataAction"), out var __jsonIsDataAction) ? (bool?)__jsonIsDataAction : _isDataAction;} + {_origin = If( json?.PropertyT("origin"), out var __jsonOrigin) ? (string)__jsonOrigin : (string)_origin;} + {_actionType = If( json?.PropertyT("actionType"), out var __jsonActionType) ? (string)__jsonActionType : (string)_actionType;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._display ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode) this._display.ToJson(null,serializationMode) : null, "display" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._isDataAction ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonBoolean((bool)this._isDataAction) : null, "isDataAction" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._origin)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonString(this._origin.ToString()) : null, "origin" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._actionType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonString(this._actionType.ToString()) : null, "actionType" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/OperationDisplay.PowerShell.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/OperationDisplay.PowerShell.cs new file mode 100644 index 000000000000..8af98db44fc8 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/OperationDisplay.PowerShell.cs @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell; + + /// Localized display information for this particular operation. + [System.ComponentModel.TypeConverter(typeof(OperationDisplayTypeConverter))] + public partial class OperationDisplay + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplay DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OperationDisplay(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplay DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OperationDisplay(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplay FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OperationDisplay(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Provider")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString); + } + if (content.Contains("Resource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString); + } + if (content.Contains("Operation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplayInternal)this).Description, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OperationDisplay(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Provider")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString); + } + if (content.Contains("Resource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString); + } + if (content.Contains("Operation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplayInternal)this).Description, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Localized display information for this particular operation. + [System.ComponentModel.TypeConverter(typeof(OperationDisplayTypeConverter))] + public partial interface IOperationDisplay + + { + + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/OperationDisplay.TypeConverter.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/OperationDisplay.TypeConverter.cs new file mode 100644 index 000000000000..2435b28972fe --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/OperationDisplay.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OperationDisplayTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplay ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplay).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OperationDisplay.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OperationDisplay.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OperationDisplay.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/OperationDisplay.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/OperationDisplay.cs new file mode 100644 index 000000000000..ab7e61fcb2f1 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/OperationDisplay.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Extensions; + + /// Localized display information for this particular operation. + public partial class OperationDisplay : + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplay, + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplayInternal + { + + /// Backing field for property. + private string _description; + + /// + /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. + /// + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Owned)] + public string Description { get => this._description; } + + /// Internal Acessors for Description + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplayInternal.Description { get => this._description; set { {_description = value;} } } + + /// Internal Acessors for Operation + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplayInternal.Operation { get => this._operation; set { {_operation = value;} } } + + /// Internal Acessors for Provider + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplayInternal.Provider { get => this._provider; set { {_provider = value;} } } + + /// Internal Acessors for Resource + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplayInternal.Resource { get => this._resource; set { {_resource = value;} } } + + /// Backing field for property. + private string _operation; + + /// + /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", + /// "Restart Virtual Machine". + /// + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Owned)] + public string Operation { get => this._operation; } + + /// Backing field for property. + private string _provider; + + /// + /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". + /// + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Owned)] + public string Provider { get => this._provider; } + + /// Backing field for property. + private string _resource; + + /// + /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + /// + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Owned)] + public string Resource { get => this._resource; } + + /// Creates an new instance. + public OperationDisplay() + { + + } + } + /// Localized display information for this particular operation. + public partial interface IOperationDisplay : + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IJsonSerializable + { + /// + /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. + /// + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The short, localized friendly description of the operation; suitable for tool tips and detailed views.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; } + /// + /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", + /// "Restart Virtual Machine". + /// + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The concise, localized friendly name for the operation; suitable for dropdowns. E.g. ""Create or Update Virtual Machine"", ""Restart Virtual Machine"".", + SerializedName = @"operation", + PossibleTypes = new [] { typeof(string) })] + string Operation { get; } + /// + /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". + /// + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The localized friendly form of the resource provider name, e.g. ""Microsoft Monitoring Insights"" or ""Microsoft Compute"".", + SerializedName = @"provider", + PossibleTypes = new [] { typeof(string) })] + string Provider { get; } + /// + /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + /// + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The localized friendly name of the resource type related to this operation. E.g. ""Virtual Machines"" or ""Job Schedule Collections"".", + SerializedName = @"resource", + PossibleTypes = new [] { typeof(string) })] + string Resource { get; } + + } + /// Localized display information for this particular operation. + internal partial interface IOperationDisplayInternal + + { + /// + /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. + /// + string Description { get; set; } + /// + /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", + /// "Restart Virtual Machine". + /// + string Operation { get; set; } + /// + /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". + /// + string Provider { get; set; } + /// + /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + /// + string Resource { get; set; } + + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/OperationDisplay.json.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/OperationDisplay.json.cs new file mode 100644 index 000000000000..4beb8dc0c38c --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/OperationDisplay.json.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Extensions; + + /// Localized display information for this particular operation. + public partial class OperationDisplay + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplay. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplay. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationDisplay FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json ? new OperationDisplay(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject instance to deserialize from. + internal OperationDisplay(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_provider = If( json?.PropertyT("provider"), out var __jsonProvider) ? (string)__jsonProvider : (string)_provider;} + {_resource = If( json?.PropertyT("resource"), out var __jsonResource) ? (string)__jsonResource : (string)_resource;} + {_operation = If( json?.PropertyT("operation"), out var __jsonOperation) ? (string)__jsonOperation : (string)_operation;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)_description;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._provider)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonString(this._provider.ToString()) : null, "provider" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._resource)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonString(this._resource.ToString()) : null, "resource" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._operation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonString(this._operation.ToString()) : null, "operation" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/OperationListResult.PowerShell.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/OperationListResult.PowerShell.cs new file mode 100644 index 000000000000..bb84a6fc8aae --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/OperationListResult.PowerShell.cs @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell; + + /// + /// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of + /// results. + /// + [System.ComponentModel.TypeConverter(typeof(OperationListResultTypeConverter))] + public partial class OperationListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OperationListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OperationListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OperationListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.OperationTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OperationListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.OperationTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of + /// results. + [System.ComponentModel.TypeConverter(typeof(OperationListResultTypeConverter))] + public partial interface IOperationListResult + + { + + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/OperationListResult.TypeConverter.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/OperationListResult.TypeConverter.cs new file mode 100644 index 000000000000..cc85d9de98aa --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/OperationListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OperationListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OperationListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OperationListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OperationListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/OperationListResult.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/OperationListResult.cs new file mode 100644 index 000000000000..f36157854b0e --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/OperationListResult.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Extensions; + + /// + /// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of + /// results. + /// + public partial class OperationListResult : + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationListResult, + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationListResultInternal + { + + /// Internal Acessors for NextLink + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + + /// Internal Acessors for Value + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationListResultInternal.Value { get => this._value; set { {_value = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// URL to get the next set of operation list results (if there are any). + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// List of operations supported by the resource provider + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; } + + /// Creates an new instance. + public OperationListResult() + { + + } + } + /// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of + /// results. + public partial interface IOperationListResult : + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IJsonSerializable + { + /// URL to get the next set of operation list results (if there are any). + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"URL to get the next set of operation list results (if there are any).", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; } + /// List of operations supported by the resource provider + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"List of operations supported by the resource provider", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperation) })] + System.Collections.Generic.List Value { get; } + + } + /// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of + /// results. + internal partial interface IOperationListResultInternal + + { + /// URL to get the next set of operation list results (if there are any). + string NextLink { get; set; } + /// List of operations supported by the resource provider + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/OperationListResult.json.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/OperationListResult.json.cs new file mode 100644 index 000000000000..be6a473fd10b --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/OperationListResult.json.cs @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Extensions; + + /// + /// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of + /// results. + /// + public partial class OperationListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json ? new OperationListResult(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject instance to deserialize from. + internal OperationListResult(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperation) (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.Operation.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeRead)) + { + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ProxyResource.PowerShell.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ProxyResource.PowerShell.cs new file mode 100644 index 000000000000..1d045d60724d --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ProxyResource.PowerShell.cs @@ -0,0 +1,238 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell; + + /// + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + /// + [System.ComponentModel.TypeConverter(typeof(ProxyResourceTypeConverter))] + public partial class ProxyResource + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IProxyResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ProxyResource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IProxyResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ProxyResource(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IProxyResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ProxyResource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ProxyResource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + [System.ComponentModel.TypeConverter(typeof(ProxyResourceTypeConverter))] + public partial interface IProxyResource + + { + + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ProxyResource.TypeConverter.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ProxyResource.TypeConverter.cs new file mode 100644 index 000000000000..ef9f84419678 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ProxyResource.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ProxyResourceTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IProxyResource ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IProxyResource).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ProxyResource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ProxyResource.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ProxyResource.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ProxyResource.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ProxyResource.cs new file mode 100644 index 000000000000..494081addce0 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ProxyResource.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Extensions; + + /// + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + /// + public partial class ProxyResource : + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IProxyResource, + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IProxyResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.Resource(); + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__resource).Id; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__resource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__resource).Name; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__resource).SystemDataCreatedByType = value ?? null; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? null; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public ProxyResource() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + public partial interface IProxyResource : + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResource + { + + } + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + internal partial interface IProxyResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal + { + + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ProxyResource.json.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ProxyResource.json.cs new file mode 100644 index 000000000000..ee2eb7e19079 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/ProxyResource.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Extensions; + + /// + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + /// + public partial class ProxyResource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IProxyResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IProxyResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IProxyResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json ? new ProxyResource(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject instance to deserialize from. + internal ProxyResource(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.Resource(json); + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Resource.PowerShell.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Resource.PowerShell.cs new file mode 100644 index 000000000000..76ab087c845d --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Resource.PowerShell.cs @@ -0,0 +1,238 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell; + + /// + /// Common fields that are returned in the response for all Azure Resource Manager resources + /// + [System.ComponentModel.TypeConverter(typeof(ResourceTypeConverter))] + public partial class Resource + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Resource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Resource(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Resource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Resource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Common fields that are returned in the response for all Azure Resource Manager resources + [System.ComponentModel.TypeConverter(typeof(ResourceTypeConverter))] + public partial interface IResource + + { + + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Resource.TypeConverter.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Resource.TypeConverter.cs new file mode 100644 index 000000000000..e728e9044344 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Resource.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ResourceTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResource ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResource).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Resource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Resource.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Resource.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Resource.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Resource.cs new file mode 100644 index 000000000000..d365f349ea0b --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Resource.cs @@ -0,0 +1,239 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Extensions; + + /// + /// Common fields that are returned in the response for all Azure Resource Manager resources + /// + public partial class Resource : + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResource, + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal + { + + /// Backing field for property. + private string _id; + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Owned)] + public string Id { get => this._id; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal.Id { get => this._id; set { {_id = value;} } } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal.Name { get => this._name; set { {_name = value;} } } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.SystemData()); set { {_systemData = value;} } } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResourceInternal.Type { get => this._type; set { {_type = value;} } } + + /// Backing field for property. + private string _name; + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Owned)] + public string Name { get => this._name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemData _systemData; + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.SystemData()); } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Inlined)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Inlined)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Inlined)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemDataInternal)SystemData).CreatedByType = value ?? null; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Inlined)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Inlined)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Inlined)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemDataInternal)SystemData).LastModifiedByType = value ?? null; } + + /// Backing field for property. + private string _type; + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Owned)] + public string Type { get => this._type; } + + /// Creates an new instance. + public Resource() + { + + } + } + /// Common fields that are returned in the response for all Azure Resource Manager resources + public partial interface IResource : + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IJsonSerializable + { + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Fully qualified resource ID for the resource. E.g. ""/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}""", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; } + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The name of the resource", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; } + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The timestamp of resource creation (UTC).", + SerializedName = @"createdAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataCreatedAt { get; } + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The identity that created the resource.", + SerializedName = @"createdBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataCreatedBy { get; } + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The type of identity that created the resource.", + SerializedName = @"createdByType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; } + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The timestamp of resource last modification (UTC)", + SerializedName = @"lastModifiedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataLastModifiedAt { get; } + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The identity that last modified the resource.", + SerializedName = @"lastModifiedBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataLastModifiedBy { get; } + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The type of identity that last modified the resource.", + SerializedName = @"lastModifiedByType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; } + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The type of the resource. E.g. ""Microsoft.Compute/virtualMachines"" or ""Microsoft.Storage/storageAccounts""", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + string Type { get; } + + } + /// Common fields that are returned in the response for all Azure Resource Manager resources + internal partial interface IResourceInternal + + { + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + string Id { get; set; } + /// The name of the resource + string Name { get; set; } + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemData SystemData { get; set; } + /// The timestamp of resource creation (UTC). + global::System.DateTime? SystemDataCreatedAt { get; set; } + /// The identity that created the resource. + string SystemDataCreatedBy { get; set; } + /// The type of identity that created the resource. + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + global::System.DateTime? SystemDataLastModifiedAt { get; set; } + /// The identity that last modified the resource. + string SystemDataLastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; set; } + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + string Type { get; set; } + + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Resource.json.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Resource.json.cs new file mode 100644 index 000000000000..0a5a165f9c10 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/Resource.json.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Extensions; + + /// + /// Common fields that are returned in the response for all Azure Resource Manager resources + /// + public partial class Resource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResource. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResource. + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json ? new Resource(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject instance to deserialize from. + internal Resource(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.SystemData.FromJson(__jsonSystemData) : _systemData;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/SystemData.PowerShell.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/SystemData.PowerShell.cs new file mode 100644 index 000000000000..9a5a12ef9ace --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/SystemData.PowerShell.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell; + + /// Metadata pertaining to creation and last modification of the resource. + [System.ComponentModel.TypeConverter(typeof(SystemDataTypeConverter))] + public partial class SystemData + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemData DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SystemData(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemData DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SystemData(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemData FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SystemData(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); + } + if (content.Contains("CreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemDataInternal)this).CreatedByType = (string) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemDataInternal)this).CreatedByType, global::System.Convert.ToString); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("LastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemDataInternal)this).LastModifiedByType = (string) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemDataInternal)this).LastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("LastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemDataInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SystemData(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); + } + if (content.Contains("CreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemDataInternal)this).CreatedByType = (string) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemDataInternal)this).CreatedByType, global::System.Convert.ToString); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("LastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemDataInternal)this).LastModifiedByType = (string) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemDataInternal)this).LastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("LastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemDataInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Metadata pertaining to creation and last modification of the resource. + [System.ComponentModel.TypeConverter(typeof(SystemDataTypeConverter))] + public partial interface ISystemData + + { + + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/SystemData.TypeConverter.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/SystemData.TypeConverter.cs new file mode 100644 index 000000000000..e38a1328d768 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/SystemData.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SystemDataTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemData ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemData).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SystemData.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SystemData.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SystemData.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/SystemData.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/SystemData.cs new file mode 100644 index 000000000000..bb638414426b --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/SystemData.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Extensions; + + /// Metadata pertaining to creation and last modification of the resource. + public partial class SystemData : + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemData, + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemDataInternal + { + + /// Backing field for property. + private global::System.DateTime? _createdAt; + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Owned)] + public global::System.DateTime? CreatedAt { get => this._createdAt; set => this._createdAt = value; } + + /// Backing field for property. + private string _createdBy; + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Owned)] + public string CreatedBy { get => this._createdBy; set => this._createdBy = value; } + + /// Backing field for property. + private string _createdByType; + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Owned)] + public string CreatedByType { get => this._createdByType; set => this._createdByType = value; } + + /// Backing field for property. + private global::System.DateTime? _lastModifiedAt; + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Owned)] + public global::System.DateTime? LastModifiedAt { get => this._lastModifiedAt; set => this._lastModifiedAt = value; } + + /// Backing field for property. + private string _lastModifiedBy; + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Owned)] + public string LastModifiedBy { get => this._lastModifiedBy; set => this._lastModifiedBy = value; } + + /// Backing field for property. + private string _lastModifiedByType; + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PropertyOrigin.Owned)] + public string LastModifiedByType { get => this._lastModifiedByType; set => this._lastModifiedByType = value; } + + /// Creates an new instance. + public SystemData() + { + + } + } + /// Metadata pertaining to creation and last modification of the resource. + public partial interface ISystemData : + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IJsonSerializable + { + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The timestamp of resource creation (UTC).", + SerializedName = @"createdAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? CreatedAt { get; set; } + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The identity that created the resource.", + SerializedName = @"createdBy", + PossibleTypes = new [] { typeof(string) })] + string CreatedBy { get; set; } + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The type of identity that created the resource.", + SerializedName = @"createdByType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string CreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The timestamp of resource last modification (UTC)", + SerializedName = @"lastModifiedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastModifiedAt { get; set; } + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The identity that last modified the resource.", + SerializedName = @"lastModifiedBy", + PossibleTypes = new [] { typeof(string) })] + string LastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The type of identity that last modified the resource.", + SerializedName = @"lastModifiedByType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string LastModifiedByType { get; set; } + + } + /// Metadata pertaining to creation and last modification of the resource. + internal partial interface ISystemDataInternal + + { + /// The timestamp of resource creation (UTC). + global::System.DateTime? CreatedAt { get; set; } + /// The identity that created the resource. + string CreatedBy { get; set; } + /// The type of identity that created the resource. + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string CreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + global::System.DateTime? LastModifiedAt { get; set; } + /// The identity that last modified the resource. + string LastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string LastModifiedByType { get; set; } + + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/SystemData.json.cs b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/SystemData.json.cs new file mode 100644 index 000000000000..4a945c26804e --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/api/Models/SystemData.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Extensions; + + /// Metadata pertaining to creation and last modification of the resource. + public partial class SystemData + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemData. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemData. + public static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.ISystemData FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json ? new SystemData(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject instance to deserialize from. + internal SystemData(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_createdBy = If( json?.PropertyT("createdBy"), out var __jsonCreatedBy) ? (string)__jsonCreatedBy : (string)_createdBy;} + {_createdByType = If( json?.PropertyT("createdByType"), out var __jsonCreatedByType) ? (string)__jsonCreatedByType : (string)_createdByType;} + {_createdAt = If( json?.PropertyT("createdAt"), out var __jsonCreatedAt) ? global::System.DateTime.TryParse((string)__jsonCreatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedAtValue) ? __jsonCreatedAtValue : _createdAt : _createdAt;} + {_lastModifiedBy = If( json?.PropertyT("lastModifiedBy"), out var __jsonLastModifiedBy) ? (string)__jsonLastModifiedBy : (string)_lastModifiedBy;} + {_lastModifiedByType = If( json?.PropertyT("lastModifiedByType"), out var __jsonLastModifiedByType) ? (string)__jsonLastModifiedByType : (string)_lastModifiedByType;} + {_lastModifiedAt = If( json?.PropertyT("lastModifiedAt"), out var __jsonLastModifiedAt) ? global::System.DateTime.TryParse((string)__jsonLastModifiedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastModifiedAtValue) ? __jsonLastModifiedAtValue : _lastModifiedAt : _lastModifiedAt;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._createdBy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonString(this._createdBy.ToString()) : null, "createdBy" ,container.Add ); + AddIf( null != (((object)this._createdByType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonString(this._createdByType.ToString()) : null, "createdByType" ,container.Add ); + AddIf( null != this._createdAt ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonString(this._createdAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "createdAt" ,container.Add ); + AddIf( null != (((object)this._lastModifiedBy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonString(this._lastModifiedBy.ToString()) : null, "lastModifiedBy" ,container.Add ); + AddIf( null != (((object)this._lastModifiedByType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonString(this._lastModifiedByType.ToString()) : null, "lastModifiedByType" ,container.Add ); + AddIf( null != this._lastModifiedAt ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonString(this._lastModifiedAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "lastModifiedAt" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/cmdlets/GetAzEdgeZonesExtendedZone_Get.cs b/src/EdgeZones/EdgeZones.Autorest/generated/cmdlets/GetAzEdgeZonesExtendedZone_Get.cs new file mode 100644 index 000000000000..3c50335e5b40 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/cmdlets/GetAzEdgeZonesExtendedZone_Get.cs @@ -0,0 +1,486 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Cmdlets; + using System; + + /// Gets an Azure Extended Zone for a subscription + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/providers/Microsoft.EdgeZones/extendedZones/{extendedZoneName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEdgeZonesExtendedZone_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Description(@"Gets an Azure Extended Zone for a subscription")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.EdgeZones/extendedZones/{extendedZoneName}", ApiVersion = "2024-04-01-preview")] + public partial class GetAzEdgeZonesExtendedZone_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.EdgeZones Client => Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the ExtendedZone + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the ExtendedZone")] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the ExtendedZone", + SerializedName = @"extendedZoneName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ExtendedZoneName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzEdgeZonesExtendedZone_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ExtendedZonesGet(SubscriptionId, Name, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/cmdlets/GetAzEdgeZonesExtendedZone_GetViaIdentity.cs b/src/EdgeZones/EdgeZones.Autorest/generated/cmdlets/GetAzEdgeZonesExtendedZone_GetViaIdentity.cs new file mode 100644 index 000000000000..906557b3f263 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/cmdlets/GetAzEdgeZonesExtendedZone_GetViaIdentity.cs @@ -0,0 +1,473 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Cmdlets; + using System; + + /// Gets an Azure Extended Zone for a subscription + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/providers/Microsoft.EdgeZones/extendedZones/{extendedZoneName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEdgeZonesExtendedZone_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Description(@"Gets an Azure Extended Zone for a subscription")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.EdgeZones/extendedZones/{extendedZoneName}", ApiVersion = "2024-04-01-preview")] + public partial class GetAzEdgeZonesExtendedZone_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.EdgeZones Client => Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzEdgeZonesExtendedZone_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.ExtendedZonesGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ExtendedZoneName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ExtendedZoneName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.ExtendedZonesGet(InputObject.SubscriptionId ?? null, InputObject.ExtendedZoneName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/cmdlets/GetAzEdgeZonesExtendedZone_List.cs b/src/EdgeZones/EdgeZones.Autorest/generated/cmdlets/GetAzEdgeZonesExtendedZone_List.cs new file mode 100644 index 000000000000..4cb18ca291ce --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/cmdlets/GetAzEdgeZonesExtendedZone_List.cs @@ -0,0 +1,498 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Cmdlets; + using System; + + /// Lists the Azure Extended Zones available to a subscription + /// + /// [OpenAPI] ListBySubscription=>GET:"/subscriptions/{subscriptionId}/providers/Microsoft.EdgeZones/extendedZones" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEdgeZonesExtendedZone_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Description(@"Lists the Azure Extended Zones available to a subscription")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.EdgeZones/extendedZones", ApiVersion = "2024-04-01-preview")] + public partial class GetAzEdgeZonesExtendedZone_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.EdgeZones Client => Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzEdgeZonesExtendedZone_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ExtendedZonesListBySubscription(SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZoneListResult + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ExtendedZonesListBySubscription_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/cmdlets/GetAzEdgeZonesOperation_List.cs b/src/EdgeZones/EdgeZones.Autorest/generated/cmdlets/GetAzEdgeZonesOperation_List.cs new file mode 100644 index 000000000000..0562d0cb4798 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/cmdlets/GetAzEdgeZonesOperation_List.cs @@ -0,0 +1,477 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Cmdlets; + using System; + + /// List the operations for the provider + /// + /// [OpenAPI] List=>GET:"/providers/Microsoft.EdgeZones/operations" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEdgeZonesOperation_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperation))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Description(@"List the operations for the provider")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.HttpPath(Path = "/providers/Microsoft.EdgeZones/operations", ApiVersion = "2024-04-01-preview")] + public partial class GetAzEdgeZonesOperation_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.EdgeZones Client => Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzEdgeZonesOperation_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.OperationsList(onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperationListResult + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.OperationsList_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/cmdlets/RegisterAzEdgeZonesExtendedZone_Register.cs b/src/EdgeZones/EdgeZones.Autorest/generated/cmdlets/RegisterAzEdgeZonesExtendedZone_Register.cs new file mode 100644 index 000000000000..c03e015cd03c --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/cmdlets/RegisterAzEdgeZonesExtendedZone_Register.cs @@ -0,0 +1,486 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Cmdlets; + using System; + + /// Registers a subscription for an Extended Zone + /// + /// [OpenAPI] Register=>POST:"/subscriptions/{subscriptionId}/providers/Microsoft.EdgeZones/extendedZones/{extendedZoneName}/register" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Register, @"AzEdgeZonesExtendedZone_Register", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Description(@"Registers a subscription for an Extended Zone")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.EdgeZones/extendedZones/{extendedZoneName}/register", ApiVersion = "2024-04-01-preview")] + public partial class RegisterAzEdgeZonesExtendedZone_Register : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.EdgeZones Client => Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the ExtendedZone + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the ExtendedZone")] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the ExtendedZone", + SerializedName = @"extendedZoneName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ExtendedZoneName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ExtendedZonesRegister' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ExtendedZonesRegister(SubscriptionId, Name, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RegisterAzEdgeZonesExtendedZone_Register() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/cmdlets/RegisterAzEdgeZonesExtendedZone_RegisterViaIdentity.cs b/src/EdgeZones/EdgeZones.Autorest/generated/cmdlets/RegisterAzEdgeZonesExtendedZone_RegisterViaIdentity.cs new file mode 100644 index 000000000000..abd0cdc4e0f6 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/cmdlets/RegisterAzEdgeZonesExtendedZone_RegisterViaIdentity.cs @@ -0,0 +1,476 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Cmdlets; + using System; + + /// Registers a subscription for an Extended Zone + /// + /// [OpenAPI] Register=>POST:"/subscriptions/{subscriptionId}/providers/Microsoft.EdgeZones/extendedZones/{extendedZoneName}/register" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Register, @"AzEdgeZonesExtendedZone_RegisterViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Description(@"Registers a subscription for an Extended Zone")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.EdgeZones/extendedZones/{extendedZoneName}/register", ApiVersion = "2024-04-01-preview")] + public partial class RegisterAzEdgeZonesExtendedZone_RegisterViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.EdgeZones Client => Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ExtendedZonesRegister' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.ExtendedZonesRegisterViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ExtendedZoneName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ExtendedZoneName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.ExtendedZonesRegister(InputObject.SubscriptionId ?? null, InputObject.ExtendedZoneName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RegisterAzEdgeZonesExtendedZone_RegisterViaIdentity() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/cmdlets/UnregisterAzEdgeZonesExtendedZone_Unregister.cs b/src/EdgeZones/EdgeZones.Autorest/generated/cmdlets/UnregisterAzEdgeZonesExtendedZone_Unregister.cs new file mode 100644 index 000000000000..9767cd76c1d9 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/cmdlets/UnregisterAzEdgeZonesExtendedZone_Unregister.cs @@ -0,0 +1,486 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Cmdlets; + using System; + + /// Unregisters a subscription for an Extended Zone + /// + /// [OpenAPI] Unregister=>POST:"/subscriptions/{subscriptionId}/providers/Microsoft.EdgeZones/extendedZones/{extendedZoneName}/unregister" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Unregister, @"AzEdgeZonesExtendedZone_Unregister", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Description(@"Unregisters a subscription for an Extended Zone")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.EdgeZones/extendedZones/{extendedZoneName}/unregister", ApiVersion = "2024-04-01-preview")] + public partial class UnregisterAzEdgeZonesExtendedZone_Unregister : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.EdgeZones Client => Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the ExtendedZone + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the ExtendedZone")] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the ExtendedZone", + SerializedName = @"extendedZoneName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ExtendedZoneName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ExtendedZonesUnregister' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ExtendedZonesUnregister(SubscriptionId, Name, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UnregisterAzEdgeZonesExtendedZone_Unregister() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/cmdlets/UnregisterAzEdgeZonesExtendedZone_UnregisterViaIdentity.cs b/src/EdgeZones/EdgeZones.Autorest/generated/cmdlets/UnregisterAzEdgeZonesExtendedZone_UnregisterViaIdentity.cs new file mode 100644 index 000000000000..e32b533c3efb --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/cmdlets/UnregisterAzEdgeZonesExtendedZone_UnregisterViaIdentity.cs @@ -0,0 +1,476 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Cmdlets; + using System; + + /// Unregisters a subscription for an Extended Zone + /// + /// [OpenAPI] Unregister=>POST:"/subscriptions/{subscriptionId}/providers/Microsoft.EdgeZones/extendedZones/{extendedZoneName}/unregister" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Unregister, @"AzEdgeZonesExtendedZone_UnregisterViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Description(@"Unregisters a subscription for an Extended Zone")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.EdgeZones/extendedZones/{extendedZoneName}/unregister", ApiVersion = "2024-04-01-preview")] + public partial class UnregisterAzEdgeZonesExtendedZone_UnregisterViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.EdgeZones Client => Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ExtendedZonesUnregister' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.ExtendedZonesUnregisterViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ExtendedZoneName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ExtendedZoneName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.ExtendedZonesUnregister(InputObject.SubscriptionId ?? null, InputObject.ExtendedZoneName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UnregisterAzEdgeZonesExtendedZone_UnregisterViaIdentity() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/AsyncCommandRuntime.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/AsyncCommandRuntime.cs new file mode 100644 index 000000000000..93fea2394e4b --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/AsyncCommandRuntime.cs @@ -0,0 +1,832 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell +{ + using System.Management.Automation; + using System.Management.Automation.Host; + using System.Threading; + using System.Linq; + + internal interface IAsyncCommandRuntimeExtensions + { + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SendAsyncStep Wrap(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SendAsyncStep func); + System.Collections.Generic.IEnumerable Wrap(System.Collections.Generic.IEnumerable funcs); + + T ExecuteSync(System.Func step); + } + + public class AsyncCommandRuntime : System.Management.Automation.ICommandRuntime2, IAsyncCommandRuntimeExtensions, System.IDisposable + { + private ICommandRuntime2 originalCommandRuntime; + private System.Threading.Thread originalThread; + public bool AllowInteractive { get; set; } = false; + + public CancellationToken cancellationToken; + SemaphoreSlim semaphore = new SemaphoreSlim(1, 1); + ManualResetEventSlim readyToRun = new ManualResetEventSlim(false); + ManualResetEventSlim completed = new ManualResetEventSlim(false); + + System.Action runOnMainThread; + + private System.Management.Automation.PSCmdlet cmdlet; + + internal AsyncCommandRuntime(System.Management.Automation.PSCmdlet cmdlet, CancellationToken cancellationToken) + { + this.originalCommandRuntime = cmdlet.CommandRuntime as ICommandRuntime2; + this.originalThread = System.Threading.Thread.CurrentThread; + this.cancellationToken = cancellationToken; + this.cmdlet = cmdlet; + if (cmdlet.PagingParameters != null) + { + WriteDebug("Client side pagination is enabled for this cmdlet"); + } + cmdlet.CommandRuntime = this; + } + + public PSHost Host => this.originalCommandRuntime.Host; + + public PSTransactionContext CurrentPSTransaction => this.originalCommandRuntime.CurrentPSTransaction; + + private void CheckForInteractive() + { + // This is an interactive call -- if we are not on the original thread, this will only work if this was done at ACR creation time; + if (!AllowInteractive) + { + throw new System.Exception("AsyncCommandRuntime is not configured for interactive calls"); + } + } + private void WaitOurTurn() + { + // wait for our turn to play + semaphore?.Wait(cancellationToken); + + // ensure that completed is not set + completed.Reset(); + } + + private void WaitForCompletion() + { + // wait for the result (or cancellation!) + WaitHandle.WaitAny(new[] { cancellationToken.WaitHandle, completed?.WaitHandle }); + + // let go of the semaphore + semaphore?.Release(); + + } + + public bool ShouldContinue(string query, string caption, bool hasSecurityImpact, ref bool yesToAll, ref bool noToAll) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + return originalCommandRuntime.ShouldContinue(query, caption, hasSecurityImpact, ref yesToAll, ref noToAll); + } + + CheckForInteractive(); + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + bool yta = yesToAll; + bool nta = noToAll; + bool result = false; + + // set the function to run + runOnMainThread = () => result = originalCommandRuntime.ShouldContinue(query, caption, hasSecurityImpact, ref yta, ref nta); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // set the output variables + yesToAll = yta; + noToAll = nta; + return result; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public bool ShouldContinue(string query, string caption) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + return originalCommandRuntime.ShouldContinue(query, caption); + } + + CheckForInteractive(); + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + bool result = false; + + // set the function to run + runOnMainThread = () => result = originalCommandRuntime.ShouldContinue(query, caption); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // set the output variables + return result; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public bool ShouldContinue(string query, string caption, ref bool yesToAll, ref bool noToAll) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + return originalCommandRuntime.ShouldContinue(query, caption, ref yesToAll, ref noToAll); + } + + CheckForInteractive(); + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + bool yta = yesToAll; + bool nta = noToAll; + bool result = false; + + // set the function to run + runOnMainThread = () => result = originalCommandRuntime.ShouldContinue(query, caption, ref yta, ref nta); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // set the output variables + yesToAll = yta; + noToAll = nta; + return result; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public bool ShouldProcess(string target) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + return originalCommandRuntime.ShouldProcess(target); + } + + CheckForInteractive(); + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + bool result = false; + + // set the function to run + runOnMainThread = () => result = originalCommandRuntime.ShouldProcess(target); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // set the output variables + return result; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public bool ShouldProcess(string target, string action) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + return originalCommandRuntime.ShouldProcess(target, action); + } + + CheckForInteractive(); + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + bool result = false; + + // set the function to run + runOnMainThread = () => result = originalCommandRuntime.ShouldProcess(target, action); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // set the output variables + return result; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public bool ShouldProcess(string verboseDescription, string verboseWarning, string caption) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + return originalCommandRuntime.ShouldProcess(verboseDescription, verboseWarning, caption); + } + + CheckForInteractive(); + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + bool result = false; + + // set the function to run + runOnMainThread = () => result = originalCommandRuntime.ShouldProcess(verboseDescription, verboseWarning, caption); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // set the output variables + return result; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public bool ShouldProcess(string verboseDescription, string verboseWarning, string caption, out ShouldProcessReason shouldProcessReason) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + return originalCommandRuntime.ShouldProcess(verboseDescription, verboseWarning, caption, out shouldProcessReason); + } + + CheckForInteractive(); + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + bool result = false; + ShouldProcessReason reason = ShouldProcessReason.None; + + // set the function to run + runOnMainThread = () => result = originalCommandRuntime.ShouldProcess(verboseDescription, verboseWarning, caption, out reason); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // set the output variables + shouldProcessReason = reason; + return result; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void ThrowTerminatingError(ErrorRecord errorRecord) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.ThrowTerminatingError(errorRecord); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.ThrowTerminatingError(errorRecord); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public bool TransactionAvailable() + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + return originalCommandRuntime.TransactionAvailable(); + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + bool result = false; + + // set the function to run + runOnMainThread = () => result = originalCommandRuntime.TransactionAvailable(); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // set the output variables + return result; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteCommandDetail(string text) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteCommandDetail(text); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteCommandDetail(text); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteDebug(string text) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteDebug(text); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteDebug(text); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteError(ErrorRecord errorRecord) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteError(errorRecord); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteError(errorRecord); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteInformation(InformationRecord informationRecord) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteInformation(informationRecord); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteInformation(informationRecord); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteObject(object sendToPipeline) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteObject(sendToPipeline); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteObject(sendToPipeline); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteObject(object sendToPipeline, bool enumerateCollection) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteObject(sendToPipeline, enumerateCollection); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteObject(sendToPipeline, enumerateCollection); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteProgress(ProgressRecord progressRecord) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteProgress(progressRecord); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteProgress(progressRecord); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteProgress(long sourceId, ProgressRecord progressRecord) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteProgress(sourceId, progressRecord); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteProgress(sourceId, progressRecord); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteVerbose(string text) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteVerbose(text); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteVerbose(text); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteWarning(string text) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteWarning(text); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteWarning(text); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void Wait(System.Threading.Tasks.Task ProcessRecordAsyncTask, System.Threading.CancellationToken cancellationToken) + { + do + { + WaitHandle.WaitAny(new[] { readyToRun.WaitHandle, ((System.IAsyncResult)ProcessRecordAsyncTask).AsyncWaitHandle }); + if (readyToRun.IsSet) + { + // reset the request for the next time + readyToRun.Reset(); + + // run the delegate on this thread + runOnMainThread(); + + // tell the originator everything is complete + completed.Set(); + } + } + while (!ProcessRecordAsyncTask.IsCompleted); + if (ProcessRecordAsyncTask.IsFaulted) + { + // don't unwrap a Aggregate Exception -- we'll lose the stack trace of the actual exception. + // if( ProcessRecordAsyncTask.Exception is System.AggregateException aggregate ) { + // throw aggregate.InnerException; + // } + throw ProcessRecordAsyncTask.Exception; + } + } + public Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SendAsyncStep Wrap(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SendAsyncStep func) => func.Target.GetType().Name != "Closure" ? func : (p1, p2, p3) => ExecuteSync>(() => func(p1, p2, p3)); + public System.Collections.Generic.IEnumerable Wrap(System.Collections.Generic.IEnumerable funcs) => funcs?.Select(Wrap); + + public T ExecuteSync(System.Func step) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + return step(); + } + + T result = default(T); + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + // set the function to run + runOnMainThread = () => { result = step(); }; + // tell the main thread to go ahead + readyToRun.Set(); + // wait for the result (or cancellation!) + WaitForCompletion(); + // return + return result; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void Dispose() + { + if (cmdlet != null) + { + cmdlet.CommandRuntime = this.originalCommandRuntime; + cmdlet = null; + } + + semaphore?.Dispose(); + semaphore = null; + readyToRun?.Dispose(); + readyToRun = null; + completed?.Dispose(); + completed = null; + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/AsyncJob.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/AsyncJob.cs new file mode 100644 index 000000000000..841dc69dc8de --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/AsyncJob.cs @@ -0,0 +1,270 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell +{ + using System.Management.Automation; + using System.Management.Automation.Host; + using System.Threading; + + using System.Threading.Tasks; + + public class LongRunningJobCancelledException : System.Exception + { + public LongRunningJobCancelledException(string message) : base(message) + { + + } + } + + public class AsyncJob : Job, System.Management.Automation.ICommandRuntime2 + { + const int MaxRecords = 1000; + + private string _statusMessage = string.Empty; + + public override string StatusMessage => _statusMessage; + + public override bool HasMoreData => Output.Count > 0 || Progress.Count > 0 || Error.Count > 0 || Warning.Count > 0 || Verbose.Count > 0 || Debug.Count > 0; + + public override string Location => "localhost"; + + public PSHost Host => originalCommandRuntime.Host; + + public PSTransactionContext CurrentPSTransaction => originalCommandRuntime.CurrentPSTransaction; + + public override void StopJob() + { + Cancel(); + } + + private readonly PSCmdlet cmdlet; + private readonly ICommandRuntime2 originalCommandRuntime; + private readonly System.Threading.Thread originalThread; + + private void CheckForInteractive() + { + // This is an interactive call -- We should never allow interactivity in AsnycJob cmdlets. + throw new System.Exception("Cmdlets in AsyncJob; interactive calls are not permitted."); + } + private bool IsJobDone => CancellationToken.IsCancellationRequested || this.JobStateInfo.State == JobState.Failed || this.JobStateInfo.State == JobState.Stopped || this.JobStateInfo.State == JobState.Stopping || this.JobStateInfo.State == JobState.Completed; + + private readonly System.Action Cancel; + private readonly CancellationToken CancellationToken; + + internal AsyncJob(PSCmdlet cmdlet, string line, string name, CancellationToken cancellationToken, System.Action cancelMethod) : base(line, name) + { + SetJobState(JobState.NotStarted); + // know how to cancel/check for cancelation + this.CancellationToken = cancellationToken; + this.Cancel = cancelMethod; + + // we might need these. + this.originalCommandRuntime = cmdlet.CommandRuntime as ICommandRuntime2; + this.originalThread = System.Threading.Thread.CurrentThread; + + // the instance of the cmdlet we're going to run + this.cmdlet = cmdlet; + + // set the command runtime to the AsyncJob + cmdlet.CommandRuntime = this; + } + + /// + /// Monitors the task (which should be ProcessRecordAsync) to control + /// the lifetime of the job itself + /// + /// + public void Monitor(Task task) + { + SetJobState(JobState.Running); + task.ContinueWith(antecedent => + { + if (antecedent.IsCanceled) + { + // if the task was canceled, we're just going to call it completed. + SetJobState(JobState.Completed); + } + else if (antecedent.IsFaulted) + { + foreach (var innerException in antecedent.Exception.Flatten().InnerExceptions) + { + WriteError(new System.Management.Automation.ErrorRecord(innerException, string.Empty, System.Management.Automation.ErrorCategory.NotSpecified, null)); + } + + // a fault indicates an actual failure + SetJobState(JobState.Failed); + } + else + { + // otherwiser it's a completed state. + SetJobState(JobState.Completed); + } + }, CancellationToken); + } + + private void CheckForCancellation() + { + if (IsJobDone) + { + throw new LongRunningJobCancelledException("Long running job is canceled or stopping, continuation of the cmdlet is not permitted."); + } + } + + public void WriteInformation(InformationRecord informationRecord) + { + CheckForCancellation(); + + this.Information.Add(informationRecord); + } + + public bool ShouldContinue(string query, string caption, bool hasSecurityImpact, ref bool yesToAll, ref bool noToAll) + { + CheckForInteractive(); + return false; + } + + public void WriteDebug(string text) + { + _statusMessage = text; + CheckForCancellation(); + + if (Debug.IsOpen && Debug.Count < MaxRecords) + { + Debug.Add(new DebugRecord(text)); + } + } + + public void WriteError(ErrorRecord errorRecord) + { + if (Error.IsOpen) + { + Error.Add(errorRecord); + } + } + + public void WriteObject(object sendToPipeline) + { + CheckForCancellation(); + + if (Output.IsOpen) + { + Output.Add(new PSObject(sendToPipeline)); + } + } + + public void WriteObject(object sendToPipeline, bool enumerateCollection) + { + CheckForCancellation(); + + if (enumerateCollection && sendToPipeline is System.Collections.IEnumerable enumerable) + { + foreach (var item in enumerable) + { + WriteObject(item); + } + } + else + { + WriteObject(sendToPipeline); + } + } + + public void WriteProgress(ProgressRecord progressRecord) + { + CheckForCancellation(); + + if (Progress.IsOpen && Progress.Count < MaxRecords) + { + Progress.Add(progressRecord); + } + } + + public void WriteProgress(long sourceId, ProgressRecord progressRecord) + { + CheckForCancellation(); + + if (Progress.IsOpen && Progress.Count < MaxRecords) + { + Progress.Add(progressRecord); + } + } + + public void WriteVerbose(string text) + { + CheckForCancellation(); + + if (Verbose.IsOpen && Verbose.Count < MaxRecords) + { + Verbose.Add(new VerboseRecord(text)); + } + } + + public void WriteWarning(string text) + { + CheckForCancellation(); + + if (Warning.IsOpen && Warning.Count < MaxRecords) + { + Warning.Add(new WarningRecord(text)); + } + } + + public void WriteCommandDetail(string text) + { + WriteVerbose(text); + } + + public bool ShouldProcess(string target) + { + CheckForInteractive(); + return false; + } + + public bool ShouldProcess(string target, string action) + { + CheckForInteractive(); + return false; + } + + public bool ShouldProcess(string verboseDescription, string verboseWarning, string caption) + { + CheckForInteractive(); + return false; + } + + public bool ShouldProcess(string verboseDescription, string verboseWarning, string caption, out ShouldProcessReason shouldProcessReason) + { + CheckForInteractive(); + shouldProcessReason = ShouldProcessReason.None; + return false; + } + + public bool ShouldContinue(string query, string caption) + { + CheckForInteractive(); + return false; + } + + public bool ShouldContinue(string query, string caption, ref bool yesToAll, ref bool noToAll) + { + CheckForInteractive(); + return false; + } + + public bool TransactionAvailable() + { + // interactivity required? + return false; + } + + public void ThrowTerminatingError(ErrorRecord errorRecord) + { + if (Error.IsOpen) + { + Error.Add(errorRecord); + } + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/AsyncOperationResponse.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/AsyncOperationResponse.cs new file mode 100644 index 000000000000..8fe5b8868bb7 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/AsyncOperationResponse.cs @@ -0,0 +1,176 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Extensions; + + [System.ComponentModel.TypeConverter(typeof(AsyncOperationResponseTypeConverter))] + public class AsyncOperationResponse + { + private string _target; + public string Target { get => _target; set => _target = value; } + public AsyncOperationResponse() + { + } + internal AsyncOperationResponse(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json) + { + // pull target + { Target = If(json?.PropertyT("target"), out var _v) ? (string)_v : (string)Target; } + } + public string ToJsonString() + { + return $"{{ \"target\" : \"{this.Target}\" }}"; + } + + public static AsyncOperationResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject json ? new AsyncOperationResponse(json) : null; + } + + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static AsyncOperationResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(jsonText)); + + } + + public partial class AsyncOperationResponseTypeConverter : System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to a type + /// parameter. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static object ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(AsyncOperationResponse).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AsyncOperationResponse.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString()); ; + } + catch + { + // Unable to use JSON pattern + } + + if (typeof(System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return new AsyncOperationResponse { Target = (sourceValue as System.Management.Automation.PSObject).GetValueForProperty("target", "", global::System.Convert.ToString) }; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return new AsyncOperationResponse { Target = (sourceValue as global::System.Collections.IDictionary).GetValueForProperty("target", "", global::System.Convert.ToString) }; + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Attributes/ExternalDocsAttribute.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Attributes/ExternalDocsAttribute.cs new file mode 100644 index 000000000000..7110fbfffe61 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Attributes/ExternalDocsAttribute.cs @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones +{ + using System; + using System.Collections.Generic; + using System.Text; + + [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = true)] + public class ExternalDocsAttribute : Attribute + { + + public string Description { get; } + + public string Url { get; } + + public ExternalDocsAttribute(string url) + { + Url = url; + } + + public ExternalDocsAttribute(string url, string description) + { + Url = url; + Description = description; + } + } +} diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Attributes/PSArgumentCompleterAttribute.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Attributes/PSArgumentCompleterAttribute.cs new file mode 100644 index 000000000000..5ebc3447152e --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Attributes/PSArgumentCompleterAttribute.cs @@ -0,0 +1,52 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones +{ + public class PSArgumentCompleterAttribute : ArgumentCompleterAttribute + { + internal string[] ResourceTypes; + + public PSArgumentCompleterAttribute(params string[] argumentList) : base(CreateScriptBlock(argumentList)) + { + ResourceTypes = argumentList; + } + + public static ScriptBlock CreateScriptBlock(string[] resourceTypes) + { + List outputResourceTypes = new List(); + foreach (string resourceType in resourceTypes) + { + if (resourceType.Contains(" ")) + { + outputResourceTypes.Add("\'\'" + resourceType + "\'\'"); + } + else + { + outputResourceTypes.Add(resourceType); + } + } + string scriptResourceTypeList = "'" + String.Join("' , '", outputResourceTypes) + "'"; + string script = "param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)\n" + + String.Format("$values = {0}\n", scriptResourceTypeList) + + "$values | Where-Object { $_ -Like \"$wordToComplete*\" -or $_ -Like \"'$wordToComplete*\" } | Sort-Object | ForEach-Object { [System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_) }"; + ScriptBlock scriptBlock = ScriptBlock.Create(script); + return scriptBlock; + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Cmdlets/ExportCmdletSurface.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Cmdlets/ExportCmdletSurface.cs new file mode 100644 index 000000000000..732425a857d6 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Cmdlets/ExportCmdletSurface.cs @@ -0,0 +1,113 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Text; +using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell.PsHelpers; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell +{ + [Cmdlet(VerbsData.Export, "CmdletSurface")] + [DoNotExport] + public class ExportCmdletSurface : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ModuleName { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string CmdletFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string OutputFolder { get; set; } + + [Parameter] + public bool IncludeGeneralParameters { get; set; } + + [Parameter] + public bool UseExpandedFormat { get; set; } + + protected override void ProcessRecord() + { + try + { + var variants = GetScriptCmdlets(this, CmdletFolder) + .SelectMany(fi => fi.ToVariants()) + .Where(v => !v.IsDoNotExport) + .ToArray(); + var allProfiles = variants.SelectMany(v => v.Profiles).Distinct().ToArray(); + var profileGroups = allProfiles.Any() + ? variants + .SelectMany(v => (v.Profiles.Any() ? v.Profiles : allProfiles).Select(p => (profile: p, variant: v))) + .GroupBy(pv => pv.profile) + .Select(pvg => new ProfileGroup(pvg.Select(pv => pv.variant).ToArray(), pvg.Key)) + : new[] { new ProfileGroup(variants) }; + foreach (var profileGroup in profileGroups) + { + var variantGroups = profileGroup.Variants + .GroupBy(v => new { v.CmdletName }) + .Select(vg => new VariantGroup(ModuleName, vg.Key.CmdletName, vg.Select(v => v).ToArray(), String.Empty, profileGroup.ProfileName)); + var sb = UseExpandedFormat ? ExpandedFormat(variantGroups) : CondensedFormat(variantGroups); + Directory.CreateDirectory(OutputFolder); + File.WriteAllText(Path.Combine(OutputFolder, $"CmdletSurface-{profileGroup.ProfileName}.md"), sb.ToString()); + } + } + catch (Exception ee) + { + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + + private StringBuilder ExpandedFormat(IEnumerable variantGroups) + { + var sb = new StringBuilder(); + foreach (var variantGroup in variantGroups.OrderBy(vg => vg.CmdletName)) + { + sb.Append($"### {variantGroup.CmdletName}{Environment.NewLine}"); + var parameterGroups = variantGroup.ParameterGroups + .Where(pg => !pg.DontShow && (IncludeGeneralParameters || (pg.OrderCategory != ParameterCategory.Azure && pg.OrderCategory != ParameterCategory.Runtime))); + foreach (var parameterGroup in parameterGroups) + { + sb.Append($" - {parameterGroup.ParameterName} `{parameterGroup.ParameterType.ToSyntaxTypeName()}`{Environment.NewLine}"); + } + sb.AppendLine(); + } + + return sb; + } + + private StringBuilder CondensedFormat(IEnumerable variantGroups) + { + var sb = new StringBuilder(); + var condensedGroups = variantGroups + .GroupBy(vg => vg.CmdletNoun) + .Select(vgg => ( + CmdletNoun: vgg.Key, + CmdletVerbs: vgg.Select(vg => vg.CmdletVerb).OrderBy(cv => cv).ToArray(), + ParameterGroups: vgg.SelectMany(vg => vg.ParameterGroups).DistinctBy(p => p.ParameterName).ToArray(), + OutputTypes: vgg.SelectMany(vg => vg.OutputTypes).Select(ot => ot.Type).DistinctBy(t => t.Name).Select(t => t.ToSyntaxTypeName()).ToArray())) + .OrderBy(vg => vg.CmdletNoun); + foreach (var condensedGroup in condensedGroups) + { + sb.Append($"### {condensedGroup.CmdletNoun} [{String.Join(", ", condensedGroup.CmdletVerbs)}] `{String.Join(", ", condensedGroup.OutputTypes)}`{Environment.NewLine}"); + var parameterGroups = condensedGroup.ParameterGroups + .Where(pg => !pg.DontShow && (IncludeGeneralParameters || (pg.OrderCategory != ParameterCategory.Azure && pg.OrderCategory != ParameterCategory.Runtime))); + foreach (var parameterGroup in parameterGroups) + { + sb.Append($" - {parameterGroup.ParameterName} `{parameterGroup.ParameterType.ToSyntaxTypeName()}`{Environment.NewLine}"); + } + sb.AppendLine(); + } + + return sb; + } + } +} diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Cmdlets/ExportExampleStub.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Cmdlets/ExportExampleStub.cs new file mode 100644 index 000000000000..f5f35760730a --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Cmdlets/ExportExampleStub.cs @@ -0,0 +1,74 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.IO; +using System.Linq; +using System.Management.Automation; +using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell.MarkdownTypesExtensions; +using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell.PsHelpers; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell +{ + [Cmdlet(VerbsData.Export, "ExampleStub")] + [DoNotExport] + public class ExportExampleStub : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ExportsFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string OutputFolder { get; set; } + + protected override void ProcessRecord() + { + try + { + if (!Directory.Exists(ExportsFolder)) + { + throw new ArgumentException($"Exports folder '{ExportsFolder}' does not exist"); + } + + var exportDirectories = Directory.GetDirectories(ExportsFolder); + if (!exportDirectories.Any()) + { + exportDirectories = new[] { ExportsFolder }; + } + + var exampleText = String.Join(String.Empty, DefaultExampleHelpInfos.Select(ehi => ehi.ToHelpExampleOutput())); + foreach (var exportDirectory in exportDirectories) + { + var outputFolder = OutputFolder; + if (exportDirectory != ExportsFolder) + { + outputFolder = Path.Combine(OutputFolder, Path.GetFileName(exportDirectory)); + Directory.CreateDirectory(outputFolder); + } + + var cmdletFilePaths = GetScriptCmdlets(exportDirectory).Select(fi => Path.Combine(outputFolder, $"{fi.Name}.md")).ToArray(); + var currentExamplesFilePaths = Directory.GetFiles(outputFolder).ToArray(); + // Remove examples of non-existing cmdlets + var removedCmdletFilePaths = currentExamplesFilePaths.Except(cmdletFilePaths); + foreach (var removedCmdletFilePath in removedCmdletFilePaths) + { + File.Delete(removedCmdletFilePath); + } + + // Only create example stubs if they don't exist + foreach (var cmdletFilePath in cmdletFilePaths.Except(currentExamplesFilePaths)) + { + File.WriteAllText(cmdletFilePath, exampleText); + } + } + } + catch (Exception ee) + { + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + } +} diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs new file mode 100644 index 000000000000..f9e067d9dfd1 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs @@ -0,0 +1,103 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Reflection; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell +{ + [Cmdlet(VerbsData.Export, "FormatPs1xml")] + [DoNotExport] + public class ExportFormatPs1xml : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string FilePath { get; set; } + + private const string ModelNamespace = @"Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models"; + private const string SupportNamespace = @"${$project.supportNamespace.fullName}"; + private const string PropertiesExcludedForTableview = @"Id,Type"; + + private static readonly bool IsAzure = Convert.ToBoolean(@"true"); + + private static string SelectedBySuffix = @"#Multiple"; + + protected override void ProcessRecord() + { + try + { + var viewModels = GetFilteredViewParameters().Select(CreateViewModel).ToList(); + var ps1xml = new Configuration + { + ViewDefinitions = new ViewDefinitions + { + Views = viewModels + } + }; + File.WriteAllText(FilePath, ps1xml.ToXmlString()); + } + catch (Exception ee) + { + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + + private static IEnumerable GetFilteredViewParameters() + { + //https://stackoverflow.com/a/79738/294804 + //https://stackoverflow.com/a/949285/294804 + var types = Assembly.GetExecutingAssembly().GetExportedTypes() + .Where(t => t.IsClass + && (t.Namespace.StartsWith(ModelNamespace) || t.Namespace.StartsWith(SupportNamespace)) + && !t.GetCustomAttributes().Any()); + return types.Select(t => new ViewParameters(t, t.GetProperties() + .Select(p => new PropertyFormat(p)) + .Where(pf => !pf.Property.GetCustomAttributes().Any() + && (!PropertiesExcludedForTableview.Split(',').Contains(pf.Property.Name)) + && (pf.FormatTable != null || (pf.Origin != PropertyOrigin.Inlined && pf.Property.PropertyType.IsPsSimple()))) + .OrderByDescending(pf => pf.Index.HasValue) + .ThenBy(pf => pf.Index) + .ThenByDescending(pf => pf.Origin.HasValue) + .ThenBy(pf => pf.Origin))).Where(vp => vp.Properties.Any()); + } + + private static View CreateViewModel(ViewParameters viewParameters) + { + var entries = viewParameters.Properties.Select(pf => + (TableColumnHeader: new TableColumnHeader { Label = pf.Label, Width = pf.Width }, + TableColumnItem: new TableColumnItem { PropertyName = pf.Property.Name })).ToArray(); + + return new View + { + Name = viewParameters.Type.FullName, + ViewSelectedBy = new ViewSelectedBy + { + TypeName = string.Concat(viewParameters.Type.FullName, SelectedBySuffix) + }, + TableControl = new TableControl + { + TableHeaders = new TableHeaders + { + TableColumnHeaders = entries.Select(e => e.TableColumnHeader).ToList() + }, + TableRowEntries = new TableRowEntries + { + TableRowEntry = new TableRowEntry + { + TableColumnItems = new TableColumnItems + { + TableItems = entries.Select(e => e.TableColumnItem).ToList() + } + } + } + } + }; + } + } +} diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Cmdlets/ExportHelpMarkdown.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Cmdlets/ExportHelpMarkdown.cs new file mode 100644 index 000000000000..065c07c49416 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Cmdlets/ExportHelpMarkdown.cs @@ -0,0 +1,56 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Linq; +using System.Management.Automation; +using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell.MarkdownRenderer; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell +{ + [Cmdlet(VerbsData.Export, "HelpMarkdown")] + [DoNotExport] + public class ExportHelpMarkdown : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public PSModuleInfo ModuleInfo { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public PSObject[] FunctionInfo { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public PSObject[] HelpInfo { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string DocsFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ExamplesFolder { get; set; } + + [Parameter()] + public SwitchParameter AddComplexInterfaceInfo { get; set; } + + protected override void ProcessRecord() + { + try + { + var helpInfos = HelpInfo.Select(hi => hi.ToPsHelpInfo()); + var variantGroups = FunctionInfo.Select(fi => fi.BaseObject).Cast() + .Join(helpInfos, fi => fi.Name, phi => phi.CmdletName, (fi, phi) => fi.ToVariants(phi)) + .Select(va => new VariantGroup(ModuleInfo.Name, va.First().CmdletName, va, String.Empty)); + WriteMarkdowns(variantGroups, ModuleInfo.ToModuleInfo(), DocsFolder, ExamplesFolder, AddComplexInterfaceInfo.IsPresent); + } + catch (Exception ee) + { + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + } +} diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs new file mode 100644 index 000000000000..9b875aaa9399 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs @@ -0,0 +1,117 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Reflection; +using System.Text; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell +{ + [Cmdlet(VerbsData.Export, "ModelSurface")] + [DoNotExport] + public class ExportModelSurface : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string OutputFolder { get; set; } + + [Parameter] + public bool UseExpandedFormat { get; set; } + + private const string ModelNamespace = @"Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models"; + private const string SupportNamespace = @"${$project.supportNamespace.fullName}"; + + protected override void ProcessRecord() + { + try + { + var types = Assembly.GetExecutingAssembly().GetExportedTypes() + .Where(t => t.IsClass && (t.Namespace.StartsWith(ModelNamespace) || t.Namespace.StartsWith(SupportNamespace))); + var typeInfos = types.Select(t => new ModelTypeInfo + { + Type = t, + TypeName = t.Name, + Properties = t.GetProperties(BindingFlags.Public | BindingFlags.Instance).Where(p => !p.GetIndexParameters().Any()).OrderBy(p => p.Name).ToArray(), + NamespaceGroup = t.Namespace.Split('.').LastOrDefault().EmptyIfNull() + }).Where(mti => mti.Properties.Any()); + var sb = UseExpandedFormat ? ExpandedFormat(typeInfos) : CondensedFormat(typeInfos); + Directory.CreateDirectory(OutputFolder); + File.WriteAllText(Path.Combine(OutputFolder, "ModelSurface.md"), sb.ToString()); + } + catch (Exception ee) + { + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + + private static StringBuilder ExpandedFormat(IEnumerable typeInfos) + { + var sb = new StringBuilder(); + foreach (var typeInfo in typeInfos.OrderBy(mti => mti.TypeName).ThenBy(mti => mti.NamespaceGroup)) + { + sb.Append($"### {typeInfo.TypeName} [{typeInfo.NamespaceGroup}]{Environment.NewLine}"); + foreach (var property in typeInfo.Properties) + { + sb.Append($" - {property.Name} `{property.PropertyType.ToSyntaxTypeName()}`{Environment.NewLine}"); + } + sb.AppendLine(); + } + + return sb; + } + + private static StringBuilder CondensedFormat(IEnumerable typeInfos) + { + var sb = new StringBuilder(); + var typeGroups = typeInfos + .GroupBy(mti => mti.TypeName) + .Select(tig => ( + Types: tig.Select(mti => mti.Type).ToArray(), + TypeName: tig.Key, + Properties: tig.SelectMany(mti => mti.Properties).DistinctBy(p => p.Name).OrderBy(p => p.Name).ToArray(), + NamespaceGroups: tig.Select(mti => mti.NamespaceGroup).OrderBy(ng => ng).ToArray() + )) + .OrderBy(tg => tg.TypeName); + foreach (var typeGroup in typeGroups) + { + var aType = typeGroup.Types.Select(GetAssociativeType).FirstOrDefault(t => t != null); + var aText = aType != null ? $@" \<{aType.ToSyntaxTypeName()}\>" : String.Empty; + sb.Append($"### {typeGroup.TypeName}{aText} [{String.Join(", ", typeGroup.NamespaceGroups)}]{Environment.NewLine}"); + foreach (var property in typeGroup.Properties) + { + var propertyAType = GetAssociativeType(property.PropertyType); + var propertyAText = propertyAType != null ? $" <{propertyAType.ToSyntaxTypeName()}>" : String.Empty; + var enumNames = GetEnumFieldNames(property.PropertyType.Unwrap()); + var enumNamesText = enumNames.Any() ? $" **{{{String.Join(", ", enumNames)}}}**" : String.Empty; + sb.Append($" - {property.Name} `{property.PropertyType.ToSyntaxTypeName()}{propertyAText}`{enumNamesText}{Environment.NewLine}"); + } + sb.AppendLine(); + } + + return sb; + } + + //https://stackoverflow.com/a/4963190/294804 + private static Type GetAssociativeType(Type type) => + type.GetInterfaces().FirstOrDefault(i => i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IAssociativeArray<>))?.GetGenericArguments().First(); + + private static string[] GetEnumFieldNames(Type type) => + type.IsValueType && !type.IsPrimitive && type != typeof(decimal) && type != typeof(DateTime) + ? type.GetFields(BindingFlags.Public | BindingFlags.Static).Where(f => f.FieldType == type).Select(p => p.Name).ToArray() + : new string[] { }; + + private class ModelTypeInfo + { + public Type Type { get; set; } + public string TypeName { get; set; } + public PropertyInfo[] Properties { get; set; } + public string NamespaceGroup { get; set; } + } + } +} diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs new file mode 100644 index 000000000000..ca3991e754a0 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs @@ -0,0 +1,180 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Text; +using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell.PsHelpers; +using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell.MarkdownRenderer; +using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell.PsProxyTypeExtensions; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell +{ + [Cmdlet(VerbsData.Export, "ProxyCmdlet", DefaultParameterSetName = "Docs")] + [DoNotExport] + public class ExportProxyCmdlet : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ModuleName { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string[] ModulePath { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ExportsFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string InternalFolder { get; set; } + + [Parameter(Mandatory = true, ParameterSetName = "Docs")] + [AllowEmptyString] + public string ModuleDescription { get; set; } + + [Parameter(Mandatory = true, ParameterSetName = "Docs")] + [ValidateNotNullOrEmpty] + public string DocsFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ExamplesFolder { get; set; } + + [Parameter(Mandatory = true, ParameterSetName = "Docs")] + public Guid ModuleGuid { get; set; } + + [Parameter(Mandatory = true, ParameterSetName = "NoDocs")] + public SwitchParameter ExcludeDocs { get; set; } + + [Parameter(ParameterSetName = "Docs")] + public SwitchParameter AddComplexInterfaceInfo { get; set; } + + protected override void ProcessRecord() + { + try + { + var variants = GetModuleCmdletsAndHelpInfo(this, ModulePath).SelectMany(ci => ci.ToVariants()).Where(v => !v.IsDoNotExport).ToArray(); + var allProfiles = variants.SelectMany(v => v.Profiles).Distinct().ToArray(); + var profileGroups = allProfiles.Any() + ? variants + .SelectMany(v => (v.Profiles.Any() ? v.Profiles : allProfiles).Select(p => (profile: p, variant: v))) + .GroupBy(pv => pv.profile) + .Select(pvg => new ProfileGroup(pvg.Select(pv => pv.variant).ToArray(), pvg.Key)) + : new[] { new ProfileGroup(variants) }; + var variantGroups = profileGroups.SelectMany(pg => pg.Variants + .GroupBy(v => new { v.CmdletName, v.IsInternal }) + .Select(vg => new VariantGroup(ModuleName, vg.Key.CmdletName, vg.Select(v => v).ToArray(), + Path.Combine(vg.Key.IsInternal ? InternalFolder : ExportsFolder, pg.ProfileFolder), pg.ProfileName, isInternal: vg.Key.IsInternal))) + .ToArray(); + var license = new StringBuilder(); + license.Append(@" +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- +"); + HashSet LicenseSet = new HashSet(); + foreach (var variantGroup in variantGroups) + { + var parameterGroups = variantGroup.ParameterGroups.ToList(); + var isValidProfile = !String.IsNullOrEmpty(variantGroup.ProfileName) && variantGroup.ProfileName != NoProfiles; + var examplesFolder = isValidProfile ? Path.Combine(ExamplesFolder, variantGroup.ProfileName) : ExamplesFolder; + var markdownInfo = new MarkdownHelpInfo(variantGroup, examplesFolder); + List examples = new List(); + foreach (var it in markdownInfo.Examples) + { + examples.Add(it); + } + variantGroup.HelpInfo.Examples = examples.ToArray(); + var sb = new StringBuilder(); + sb.Append($"{Environment.NewLine}"); + sb.Append(variantGroup.ToHelpCommentOutput()); + sb.Append($"function {variantGroup.CmdletName} {{{Environment.NewLine}"); + sb.Append(variantGroup.Aliases.ToAliasOutput()); + sb.Append(variantGroup.OutputTypes.ToOutputTypeOutput()); + sb.Append(variantGroup.ToCmdletBindingOutput()); + sb.Append(variantGroup.ProfileName.ToProfileOutput()); + + sb.Append("param("); + sb.Append($"{(parameterGroups.Any() ? Environment.NewLine : String.Empty)}"); + + foreach (var parameterGroup in parameterGroups) + { + var parameters = parameterGroup.HasAllVariants ? parameterGroup.Parameters.Take(1) : parameterGroup.Parameters; + parameters = parameters.Where(p => !p.IsHidden()); + if (!parameters.Any()) + { + continue; + } + foreach (var parameter in parameters) + { + sb.Append(parameter.ToParameterOutput(variantGroup.HasMultipleVariants, parameterGroup.HasAllVariants)); + } + sb.Append(parameterGroup.Aliases.ToAliasOutput(true)); + sb.Append(parameterGroup.HasValidateNotNull.ToValidateNotNullOutput()); + sb.Append(parameterGroup.HasAllowEmptyArray.ToAllowEmptyArray()); + sb.Append(parameterGroup.CompleterInfo.ToArgumentCompleterOutput()); + sb.Append(parameterGroup.OrderCategory.ToParameterCategoryOutput()); + sb.Append(parameterGroup.InfoAttribute.ToInfoOutput(parameterGroup.ParameterType)); + sb.Append(parameterGroup.ToDefaultInfoOutput()); + sb.Append(parameterGroup.ParameterType.ToParameterTypeOutput()); + sb.Append(parameterGroup.Description.ToParameterDescriptionOutput()); + sb.Append(parameterGroup.ParameterName.ToParameterNameOutput(parameterGroups.IndexOf(parameterGroup) == parameterGroups.Count - 1)); + } + sb.Append($"){Environment.NewLine}{Environment.NewLine}"); + + sb.Append(variantGroup.ToBeginOutput()); + sb.Append(variantGroup.ToProcessOutput()); + sb.Append(variantGroup.ToEndOutput()); + + sb.Append($"}}{Environment.NewLine}"); + + Directory.CreateDirectory(variantGroup.OutputFolder); + File.WriteAllText(variantGroup.FilePath, license.ToString()); + File.AppendAllText(variantGroup.FilePath, sb.ToString()); + if (!LicenseSet.Contains(Path.Combine(variantGroup.OutputFolder, "ProxyCmdletDefinitions.ps1"))) + { + // only add license in the header + File.AppendAllText(Path.Combine(variantGroup.OutputFolder, "ProxyCmdletDefinitions.ps1"), license.ToString()); + LicenseSet.Add(Path.Combine(variantGroup.OutputFolder, "ProxyCmdletDefinitions.ps1")); + } + File.AppendAllText(Path.Combine(variantGroup.OutputFolder, "ProxyCmdletDefinitions.ps1"), sb.ToString()); + } + + if (!ExcludeDocs) + { + var moduleInfo = new PsModuleHelpInfo(ModuleName, ModuleGuid, ModuleDescription); + foreach (var variantGroupsByProfile in variantGroups.GroupBy(vg => vg.ProfileName)) + { + var profileName = variantGroupsByProfile.Key; + var isValidProfile = !String.IsNullOrEmpty(profileName) && profileName != NoProfiles; + var docsFolder = isValidProfile ? Path.Combine(DocsFolder, profileName) : DocsFolder; + var examplesFolder = isValidProfile ? Path.Combine(ExamplesFolder, profileName) : ExamplesFolder; + WriteMarkdowns(variantGroupsByProfile, moduleInfo, docsFolder, examplesFolder, AddComplexInterfaceInfo.IsPresent); + } + } + } + catch (Exception ee) + { + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + } +} diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs new file mode 100644 index 000000000000..db8d2bf20c64 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs @@ -0,0 +1,193 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Text; +using System.Text.RegularExpressions; +using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell.PsHelpers; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell +{ + [Cmdlet(VerbsData.Export, "Psd1")] + [DoNotExport] + public class ExportPsd1 : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ExportsFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string CustomFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string Psd1Path { get; set; } + + [Parameter(Mandatory = true)] + public Guid ModuleGuid { get; set; } + + private static readonly bool IsAzure = Convert.ToBoolean(@"true"); + private const string CustomFolderRelative = "./custom"; + private const string Indent = Psd1Indent; + private const string Undefined = "undefined"; + private bool IsUndefined(string value) => string.Equals(Undefined, value, StringComparison.OrdinalIgnoreCase); + + protected override void ProcessRecord() + { + try + { + if (!Directory.Exists(ExportsFolder)) + { + throw new ArgumentException($"Exports folder '{ExportsFolder}' does not exist"); + } + + if (!Directory.Exists(CustomFolder)) + { + throw new ArgumentException($"Custom folder '{CustomFolder}' does not exist"); + } + + string version = Convert.ToString(@"0.1.0"); + // Validate the module version should be semantic version + // Following regex is official from https://semver.org/ + Regex rx = new Regex(@"^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$", RegexOptions.Compiled); + if (rx.Matches(version).Count != 1) + { + throw new ArgumentException("Module-version is not a valid Semantic Version"); + } + + string previewVersion = null; + if (version.Contains('-')) + { + string[] versions = version.Split("-".ToCharArray(), 2); + version = versions[0]; + previewVersion = versions[1]; + } + + var sb = new StringBuilder(); + sb.AppendLine("@{"); + sb.AppendLine($@"{GuidStart} = '{ModuleGuid}'"); + sb.AppendLine($@"{Indent}RootModule = '{"./Az.EdgeZones.psm1"}'"); + sb.AppendLine($@"{Indent}ModuleVersion = '{version}'"); + sb.AppendLine($@"{Indent}CompatiblePSEditions = 'Core', 'Desktop'"); + sb.AppendLine($@"{Indent}Author = '{"Microsoft Corporation"}'"); + sb.AppendLine($@"{Indent}CompanyName = '{"Microsoft Corporation"}'"); + sb.AppendLine($@"{Indent}Copyright = '{"Microsoft Corporation. All rights reserved."}'"); + sb.AppendLine($@"{Indent}Description = '{"Microsoft Azure PowerShell: EdgeZones cmdlets"}'"); + sb.AppendLine($@"{Indent}PowerShellVersion = '5.1'"); + sb.AppendLine($@"{Indent}DotNetFrameworkVersion = '4.7.2'"); + + // RequiredModules + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}RequiredModules = @({"undefined"})"); + } + + // RequiredAssemblies + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}RequiredAssemblies = @({"undefined"})"); + } + else + { + sb.AppendLine($@"{Indent}RequiredAssemblies = '{"./bin/Az.EdgeZones.private.dll"}'"); + } + + // NestedModules + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}NestedModules = @({"undefined"})"); + } + + // FormatsToProcess + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}FormatsToProcess = @({"undefined"})"); + } + else + { + var customFormatPs1xmlFiles = Directory.GetFiles(CustomFolder) + .Where(f => f.EndsWith(".format.ps1xml")) + .Select(f => $"{CustomFolderRelative}/{Path.GetFileName(f)}"); + var formatList = customFormatPs1xmlFiles.Prepend("./Az.EdgeZones.format.ps1xml").ToPsList(); + sb.AppendLine($@"{Indent}FormatsToProcess = {formatList}"); + } + + // TypesToProcess + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}TypesToProcess = @({"undefined"})"); + } + + // ScriptsToProcess + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}ScriptsToProcess = @({"undefined"})"); + } + + var functionInfos = GetScriptCmdlets(ExportsFolder).ToArray(); + // FunctionsToExport + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}FunctionsToExport = @({"undefined"})"); + } + else + { + var cmdletsList = functionInfos.Select(fi => fi.Name).Distinct().ToPsList(); + sb.AppendLine($@"{Indent}FunctionsToExport = {cmdletsList}"); + } + + // AliasesToExport + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}AliasesToExport = @({"undefined"})"); + } + else + { + var aliasesList = functionInfos.SelectMany(fi => fi.ScriptBlock.Attributes).ToAliasNames().ToPsList(); + if (!String.IsNullOrEmpty(aliasesList)) { + sb.AppendLine($@"{Indent}AliasesToExport = {aliasesList}"); + } + } + + // CmdletsToExport + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}CmdletsToExport = @({"undefined"})"); + } + + sb.AppendLine($@"{Indent}PrivateData = @{{"); + sb.AppendLine($@"{Indent}{Indent}PSData = @{{"); + + if (previewVersion != null) + { + sb.AppendLine($@"{Indent}{Indent}{Indent}Prerelease = '{previewVersion}'"); + } + sb.AppendLine($@"{Indent}{Indent}{Indent}Tags = {"Azure ResourceManager ARM PSModule EdgeZones".Split(' ').ToPsList().NullIfEmpty() ?? "''"}"); + sb.AppendLine($@"{Indent}{Indent}{Indent}LicenseUri = '{"https://aka.ms/azps-license"}'"); + sb.AppendLine($@"{Indent}{Indent}{Indent}ProjectUri = '{"https://github.com/Azure/azure-powershell"}'"); + sb.AppendLine($@"{Indent}{Indent}{Indent}ReleaseNotes = ''"); + var profilesList = ""; + if (IsAzure && !String.IsNullOrEmpty(profilesList)) + { + sb.AppendLine($@"{Indent}{Indent}{Indent}Profiles = {profilesList}"); + } + + sb.AppendLine($@"{Indent}{Indent}}}"); + sb.AppendLine($@"{Indent}}}"); + sb.AppendLine(@"}"); + + File.WriteAllText(Psd1Path, sb.ToString()); + } + catch (Exception ee) + { + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + } +} diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs new file mode 100644 index 000000000000..38e1ee48e2d9 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs @@ -0,0 +1,197 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Text; +using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell.PsProxyOutputExtensions; +using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell.PsHelpers; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell +{ + [Cmdlet(VerbsData.Export, "TestStub")] + [DoNotExport] + public class ExportTestStub : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ModuleName { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ExportsFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string OutputFolder { get; set; } + + [Parameter] + public SwitchParameter IncludeGenerated { get; set; } + + protected override void ProcessRecord() + { + try + { + if (!Directory.Exists(ExportsFolder)) + { + throw new ArgumentException($"Exports folder '{ExportsFolder}' does not exist"); + } + + var exportDirectories = Directory.GetDirectories(ExportsFolder); + if (!exportDirectories.Any()) + { + exportDirectories = new[] { ExportsFolder }; + } + /*var loadEnvFile = Path.Combine(OutputFolder, "loadEnv.ps1"); + if (!File.Exists(loadEnvFile)) + { + var sc = new StringBuilder(); + sc.AppendLine(@" +$envFile = 'env.json' +if ($TestMode -eq 'live') { + $envFile = 'localEnv.json' +} + +if (Test-Path -Path (Join-Path $PSScriptRoot $envFile)) { + $envFilePath = Join-Path $PSScriptRoot $envFile +} else { + $envFilePath = Join-Path $PSScriptRoot '..\$envFile' +} +$env = @{} +if (Test-Path -Path $envFilePath) { + $env = Get-Content (Join-Path $PSScriptRoot $envFile) | ConvertFrom-Json +}"); + File.WriteAllText(loadEnvFile, sc.ToString()); + }*/ + var utilFile = Path.Combine(OutputFolder, "utils.ps1"); + if (!File.Exists(utilFile)) + { + var sc = new StringBuilder(); + sc.AppendLine(@"function RandomString([bool]$allChars, [int32]$len) { + if ($allChars) { + return -join ((33..126) | Get-Random -Count $len | % {[char]$_}) + } else { + return -join ((48..57) + (97..122) | Get-Random -Count $len | % {[char]$_}) + } +} +function Start-TestSleep { + [CmdletBinding(DefaultParameterSetName = 'SleepBySeconds')] + param( + [parameter(Mandatory = $true, Position = 0, ParameterSetName = 'SleepBySeconds')] + [ValidateRange(0.0, 2147483.0)] + [double] $Seconds, + + [parameter(Mandatory = $true, ParameterSetName = 'SleepByMilliseconds')] + [ValidateRange('NonNegative')] + [Alias('ms')] + [int] $Milliseconds + ) + + if ($TestMode -ne 'playback') { + switch ($PSCmdlet.ParameterSetName) { + 'SleepBySeconds' { + Start-Sleep -Seconds $Seconds + } + 'SleepByMilliseconds' { + Start-Sleep -Milliseconds $Milliseconds + } + } + } +} + +$env = @{} +if ($UsePreviousConfigForRecord) { + $previousEnv = Get-Content (Join-Path $PSScriptRoot 'env.json') | ConvertFrom-Json + $previousEnv.psobject.properties | Foreach-Object { $env[$_.Name] = $_.Value } +} +# Add script method called AddWithCache to $env, when useCache is set true, it will try to get the value from the $env first. +# example: $val = $env.AddWithCache('key', $val, $true) +$env | Add-Member -Type ScriptMethod -Value { param( [string]$key, [object]$val, [bool]$useCache) if ($this.Contains($key) -and $useCache) { return $this[$key] } else { $this[$key] = $val; return $val } } -Name 'AddWithCache' +function setupEnv() { + # Preload subscriptionId and tenant from context, which will be used in test + # as default. You could change them if needed. + $env.SubscriptionId = (Get-AzContext).Subscription.Id + $env.Tenant = (Get-AzContext).Tenant.Id + # For any resources you created for test, you should add it to $env here. + $envFile = 'env.json' + if ($TestMode -eq 'live') { + $envFile = 'localEnv.json' + } + set-content -Path (Join-Path $PSScriptRoot $envFile) -Value (ConvertTo-Json $env) +} +function cleanupEnv() { + # Clean resources you create for testing +} +"); + File.WriteAllText(utilFile, sc.ToString()); + } + + + + foreach (var exportDirectory in exportDirectories) + { + var outputFolder = OutputFolder; + if (exportDirectory != ExportsFolder) + { + outputFolder = Path.Combine(OutputFolder, Path.GetFileName(exportDirectory)); + Directory.CreateDirectory(outputFolder); + } + + var variantGroups = GetScriptCmdlets(exportDirectory) + .SelectMany(fi => fi.ToVariants()) + .Where(v => !v.IsDoNotExport) + .GroupBy(v => v.CmdletName) + .Select(vg => new VariantGroup(ModuleName, vg.Key, vg.Select(v => v).ToArray(), outputFolder, isTest: true)) + .Where(vtg => !File.Exists(vtg.FilePath) && (IncludeGenerated || !vtg.IsGenerated)); + + foreach (var variantGroup in variantGroups) + { + var sb = new StringBuilder(); + sb.AppendLine($"if(($null -eq $TestName) -or ($TestName -contains '{variantGroup.CmdletName}'))"); + sb.AppendLine(@"{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath)" + ); + sb.AppendLine($@" $TestRecordingFile = Join-Path $PSScriptRoot '{variantGroup.CmdletName}.Recording.json'"); + sb.AppendLine(@" $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} +"); + + + sb.AppendLine($"Describe '{variantGroup.CmdletName}' {{"); + var variants = variantGroup.Variants + .Where(v => IncludeGenerated || !v.Attributes.OfType().Any()) + .ToList(); + + foreach (var variant in variants) + { + sb.AppendLine($"{Indent}It '{variant.VariantName}' -skip {{"); + sb.AppendLine($"{Indent}{Indent}{{ throw [System.NotImplementedException] }} | Should -Not -Throw"); + var variantSeparator = variants.IndexOf(variant) == variants.Count - 1 ? String.Empty : Environment.NewLine; + sb.AppendLine($"{Indent}}}{variantSeparator}"); + } + sb.AppendLine("}"); + + File.WriteAllText(variantGroup.FilePath, sb.ToString()); + } + } + } + catch (Exception ee) + { + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + } +} diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Cmdlets/GetCommonParameter.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Cmdlets/GetCommonParameter.cs new file mode 100644 index 000000000000..4aeee5e9d204 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Cmdlets/GetCommonParameter.cs @@ -0,0 +1,52 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell +{ + [Cmdlet(VerbsCommon.Get, "CommonParameter")] + [OutputType(typeof(Dictionary))] + [DoNotExport] + public class GetCommonParameter : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public PSCmdlet PSCmdlet { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public Dictionary PSBoundParameter { get; set; } + + protected override void ProcessRecord() + { + try + { + var variants = PSCmdlet.MyInvocation.MyCommand.ToVariants(); + var commonParameterNames = variants.ToParameterGroups() + .Where(pg => pg.OrderCategory == ParameterCategory.Azure || pg.OrderCategory == ParameterCategory.Runtime) + .Select(pg => pg.ParameterName); + if (variants.Any(v => v.SupportsShouldProcess)) + { + commonParameterNames = commonParameterNames.Append("Confirm").Append("WhatIf"); + } + if (variants.Any(v => v.SupportsPaging)) + { + commonParameterNames = commonParameterNames.Append("First").Append("Skip").Append("IncludeTotalCount"); + } + + var names = commonParameterNames.ToArray(); + var keys = PSBoundParameter.Keys.Where(k => names.Contains(k)); + WriteObject(keys.ToDictionary(key => key, key => PSBoundParameter[key]), true); + } + catch (System.Exception ee) + { + System.Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + } +} diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Cmdlets/GetModuleGuid.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Cmdlets/GetModuleGuid.cs new file mode 100644 index 000000000000..72c769dff94f --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Cmdlets/GetModuleGuid.cs @@ -0,0 +1,31 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System.Management.Automation; +using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell.PsHelpers; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell +{ + [Cmdlet(VerbsCommon.Get, "ModuleGuid")] + [DoNotExport] + public class GetModuleGuid : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string Psd1Path { get; set; } + + protected override void ProcessRecord() + { + try + { + WriteObject(ReadGuidFromPsd1(Psd1Path)); + } + catch (System.Exception ee) + { + System.Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + } +} diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Cmdlets/GetScriptCmdlet.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Cmdlets/GetScriptCmdlet.cs new file mode 100644 index 000000000000..1f2a256d9588 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Cmdlets/GetScriptCmdlet.cs @@ -0,0 +1,54 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System.Linq; +using System.Management.Automation; +using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell.PsHelpers; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell +{ + [Cmdlet(VerbsCommon.Get, "ScriptCmdlet")] + [OutputType(typeof(string[]))] + [DoNotExport] + public class GetScriptCmdlet : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ScriptFolder { get; set; } + + [Parameter] + public SwitchParameter IncludeDoNotExport { get; set; } + + [Parameter] + public SwitchParameter AsAlias { get; set; } + + [Parameter] + public SwitchParameter AsFunctionInfo { get; set; } + + protected override void ProcessRecord() + { + try + { + var functionInfos = GetScriptCmdlets(this, ScriptFolder) + .Where(fi => IncludeDoNotExport || !fi.ScriptBlock.Attributes.OfType().Any()) + .ToArray(); + if (AsFunctionInfo) + { + WriteObject(functionInfos, true); + return; + } + var aliases = functionInfos.SelectMany(i => i.ScriptBlock.Attributes).ToAliasNames(); + var names = functionInfos.Select(fi => fi.Name).Distinct(); + var output = (AsAlias ? aliases : names).DefaultIfEmpty("''").ToArray(); + WriteObject(output, true); + } + catch (System.Exception ee) + { + System.Console.Error.WriteLine($"{ee.GetType().Name}: {ee.Message}"); + System.Console.Error.WriteLine(ee.StackTrace); + throw ee; + } + } + } +} diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/CollectionExtensions.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/CollectionExtensions.cs new file mode 100644 index 000000000000..286df8172abc --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/CollectionExtensions.cs @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell +{ + internal static class CollectionExtensions + { + public static T[] NullIfEmpty(this T[] collection) => (collection?.Any() ?? false) ? collection : null; + public static IEnumerable EmptyIfNull(this IEnumerable collection) => collection ?? Enumerable.Empty(); + + // https://stackoverflow.com/a/4158364/294804 + public static IEnumerable DistinctBy(this IEnumerable collection, Func selector) => + collection.GroupBy(selector).Select(group => group.First()); + } +} diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs new file mode 100644 index 000000000000..3cd0c3289ce2 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs @@ -0,0 +1,122 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell.MarkdownTypesExtensions; +using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell.PsProxyOutputExtensions; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell +{ + internal static class MarkdownRenderer + { + public static void WriteMarkdowns(IEnumerable variantGroups, PsModuleHelpInfo moduleHelpInfo, string docsFolder, string examplesFolder, bool AddComplexInterfaceInfo = true) + { + Directory.CreateDirectory(docsFolder); + var markdownInfos = variantGroups.Where(vg => !vg.IsInternal).Select(vg => new MarkdownHelpInfo(vg, examplesFolder)).OrderBy(mhi => mhi.CmdletName).ToArray(); + + foreach (var markdownInfo in markdownInfos) + { + var sb = new StringBuilder(); + sb.Append(markdownInfo.ToHelpMetadataOutput()); + sb.Append($"# {markdownInfo.CmdletName}{Environment.NewLine}{Environment.NewLine}"); + sb.Append($"## SYNOPSIS{Environment.NewLine}{markdownInfo.Synopsis.ToDescriptionFormat()}{Environment.NewLine}{Environment.NewLine}"); + + sb.Append($"## SYNTAX{Environment.NewLine}{Environment.NewLine}"); + var hasMultipleParameterSets = markdownInfo.SyntaxInfos.Length > 1; + foreach (var syntaxInfo in markdownInfo.SyntaxInfos) + { + sb.Append(syntaxInfo.ToHelpSyntaxOutput(hasMultipleParameterSets)); + } + + sb.Append($"## DESCRIPTION{Environment.NewLine}{markdownInfo.Description.ToDescriptionFormat()}{Environment.NewLine}{Environment.NewLine}"); + + sb.Append($"## EXAMPLES{Environment.NewLine}{Environment.NewLine}"); + foreach (var exampleInfo in markdownInfo.Examples) + { + sb.Append(exampleInfo.ToHelpExampleOutput()); + } + + sb.Append($"## PARAMETERS{Environment.NewLine}{Environment.NewLine}"); + foreach (var parameter in markdownInfo.Parameters) + { + sb.Append(parameter.ToHelpParameterOutput()); + } + if (markdownInfo.SupportsShouldProcess) + { + foreach (var parameter in SupportsShouldProcessParameters) + { + sb.Append(parameter.ToHelpParameterOutput()); + } + } + + sb.Append($"### CommonParameters{Environment.NewLine}This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).{Environment.NewLine}{Environment.NewLine}"); + + sb.Append($"## INPUTS{Environment.NewLine}{Environment.NewLine}"); + foreach (var input in markdownInfo.Inputs) + { + sb.Append($"### {input}{Environment.NewLine}{Environment.NewLine}"); + } + + sb.Append($"## OUTPUTS{Environment.NewLine}{Environment.NewLine}"); + foreach (var output in markdownInfo.Outputs) + { + sb.Append($"### {output}{Environment.NewLine}{Environment.NewLine}"); + } + + sb.Append($"## NOTES{Environment.NewLine}{Environment.NewLine}"); + if (markdownInfo.Aliases.Any()) + { + sb.Append($"ALIASES{Environment.NewLine}{Environment.NewLine}"); + } + foreach (var alias in markdownInfo.Aliases) + { + sb.Append($"{alias}{Environment.NewLine}{Environment.NewLine}"); + } + + if (AddComplexInterfaceInfo) + { + if (markdownInfo.ComplexInterfaceInfos.Any()) + { + sb.Append($"{ComplexParameterHeader}{Environment.NewLine}"); + } + foreach (var complexInterfaceInfo in markdownInfo.ComplexInterfaceInfos) + { + sb.Append($"{complexInterfaceInfo.ToNoteOutput(includeDashes: true, includeBackticks: true)}{Environment.NewLine}{Environment.NewLine}"); + } + + } + + sb.Append($"## RELATED LINKS{Environment.NewLine}{Environment.NewLine}"); + foreach (var relatedLink in markdownInfo.RelatedLinks) + { + sb.Append($"[{relatedLink}]({relatedLink}){Environment.NewLine}{Environment.NewLine}"); + } + + File.WriteAllText(Path.Combine(docsFolder, $"{markdownInfo.CmdletName}.md"), sb.ToString()); + } + + WriteModulePage(moduleHelpInfo, markdownInfos, docsFolder); + } + + private static void WriteModulePage(PsModuleHelpInfo moduleInfo, MarkdownHelpInfo[] markdownInfos, string docsFolder) + { + var sb = new StringBuilder(); + sb.Append(moduleInfo.ToModulePageMetadataOutput()); + sb.Append($"# {moduleInfo.Name} Module{Environment.NewLine}"); + sb.Append($"## Description{Environment.NewLine}{moduleInfo.Description.ToDescriptionFormat()}{Environment.NewLine}{Environment.NewLine}"); + + sb.Append($"## {moduleInfo.Name} Cmdlets{Environment.NewLine}"); + foreach (var markdownInfo in markdownInfos) + { + sb.Append(markdownInfo.ToModulePageCmdletOutput()); + } + + File.WriteAllText(Path.Combine(docsFolder, $"{moduleInfo.Name}.md"), sb.ToString()); + } + } +} diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Models/PsFormatTypes.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Models/PsFormatTypes.cs new file mode 100644 index 000000000000..cc2708a9fdeb --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Models/PsFormatTypes.cs @@ -0,0 +1,138 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Xml.Serialization; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell +{ + internal class ViewParameters + { + public Type Type { get; } + public IEnumerable Properties { get; } + + public ViewParameters(Type type, IEnumerable properties) + { + Type = type; + Properties = properties; + } + } + + internal class PropertyFormat + { + public PropertyInfo Property { get; } + public FormatTableAttribute FormatTable { get; } + + public int? Index { get; } + public string Label { get; } + public int? Width { get; } + public PropertyOrigin? Origin { get; } + + public PropertyFormat(PropertyInfo propertyInfo) + { + Property = propertyInfo; + FormatTable = Property.GetCustomAttributes().FirstOrDefault(); + var origin = Property.GetCustomAttributes().FirstOrDefault(); + + Index = FormatTable?.HasIndex ?? false ? (int?)FormatTable.Index : null; + Label = FormatTable?.Label ?? propertyInfo.Name; + Width = FormatTable?.HasWidth ?? false ? (int?)FormatTable.Width : null; + // If we have an index, we don't want to use Origin. + Origin = FormatTable?.HasIndex ?? false ? null : origin?.Origin; + } + } + + [Serializable] + [XmlRoot(nameof(Configuration))] + public class Configuration + { + [XmlElement("ViewDefinitions")] + public ViewDefinitions ViewDefinitions { get; set; } + } + + [Serializable] + public class ViewDefinitions + { + //https://stackoverflow.com/a/10518657/294804 + [XmlElement("View")] + public List Views { get; set; } + } + + [Serializable] + public class View + { + [XmlElement(nameof(Name))] + public string Name { get; set; } + [XmlElement(nameof(ViewSelectedBy))] + public ViewSelectedBy ViewSelectedBy { get; set; } + [XmlElement(nameof(TableControl))] + public TableControl TableControl { get; set; } + } + + [Serializable] + public class ViewSelectedBy + { + [XmlElement(nameof(TypeName))] + public string TypeName { get; set; } + } + + [Serializable] + public class TableControl + { + [XmlElement(nameof(TableHeaders))] + public TableHeaders TableHeaders { get; set; } + [XmlElement(nameof(TableRowEntries))] + public TableRowEntries TableRowEntries { get; set; } + } + + [Serializable] + public class TableHeaders + { + [XmlElement("TableColumnHeader")] + public List TableColumnHeaders { get; set; } + } + + [Serializable] + public class TableColumnHeader + { + [XmlElement(nameof(Label))] + public string Label { get; set; } + [XmlElement(nameof(Width))] + public int? Width { get; set; } + + //https://stackoverflow.com/a/4095225/294804 + public bool ShouldSerializeWidth() => Width.HasValue; + } + + [Serializable] + public class TableRowEntries + { + [XmlElement(nameof(TableRowEntry))] + public TableRowEntry TableRowEntry { get; set; } + } + + [Serializable] + public class TableRowEntry + { + [XmlElement(nameof(TableColumnItems))] + public TableColumnItems TableColumnItems { get; set; } + } + + [Serializable] + public class TableColumnItems + { + [XmlElement("TableColumnItem")] + public List TableItems { get; set; } + } + + [Serializable] + public class TableColumnItem + { + [XmlElement(nameof(PropertyName))] + public string PropertyName { get; set; } + } +} diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Models/PsHelpMarkdownOutputs.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Models/PsHelpMarkdownOutputs.cs new file mode 100644 index 000000000000..75a0b1bbeddc --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Models/PsHelpMarkdownOutputs.cs @@ -0,0 +1,199 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Linq; +using System.Management.Automation; +using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell.PsHelpOutputExtensions; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell +{ + internal class HelpMetadataOutput + { + public MarkdownHelpInfo HelpInfo { get; } + + public HelpMetadataOutput(MarkdownHelpInfo helpInfo) + { + HelpInfo = helpInfo; + } + + public override string ToString() => $@"--- +external help file:{(!String.IsNullOrEmpty(HelpInfo.ExternalHelpFilename) ? $" {HelpInfo.ExternalHelpFilename}" : String.Empty)} +Module Name: {HelpInfo.ModuleName} +online version: {HelpInfo.OnlineVersion} +schema: {HelpInfo.Schema.ToString(3)} +--- + +"; + } + + internal class HelpSyntaxOutput + { + public MarkdownSyntaxHelpInfo SyntaxInfo { get; } + public bool HasMultipleParameterSets { get; } + + public HelpSyntaxOutput(MarkdownSyntaxHelpInfo syntaxInfo, bool hasMultipleParameterSets) + { + SyntaxInfo = syntaxInfo; + HasMultipleParameterSets = hasMultipleParameterSets; + } + + public override string ToString() + { + var psnText = HasMultipleParameterSets ? $"### {SyntaxInfo.ParameterSetName}{(SyntaxInfo.IsDefault ? " (Default)" : String.Empty)}{Environment.NewLine}" : String.Empty; + return $@"{psnText}``` +{SyntaxInfo.SyntaxText} +``` + +"; + } + } + + internal class HelpExampleOutput + { + private string ExampleTemplate = + "{0}{1}" + Environment.NewLine + + "{2}" + Environment.NewLine + "{3}" + Environment.NewLine + "{4}" + Environment.NewLine + Environment.NewLine + + "{5}" + Environment.NewLine + Environment.NewLine; + + private string ExampleTemplateWithOutput = + "{0}{1}" + Environment.NewLine + + "{2}" + Environment.NewLine + "{3}" + Environment.NewLine + "{4}" + Environment.NewLine + Environment.NewLine + + "{5}" + Environment.NewLine + "{6}" + Environment.NewLine + "{7}" + Environment.NewLine + Environment.NewLine + + "{8}" + Environment.NewLine + Environment.NewLine; + + public MarkdownExampleHelpInfo ExampleInfo { get; } + + public HelpExampleOutput(MarkdownExampleHelpInfo exampleInfo) + { + ExampleInfo = exampleInfo; + } + + public override string ToString() + { + if (string.IsNullOrEmpty(ExampleInfo.Output)) + { + return string.Format(ExampleTemplate, + ExampleNameHeader, ExampleInfo.Name, + ExampleCodeHeader, ExampleInfo.Code, ExampleCodeFooter, + ExampleInfo.Description.ToDescriptionFormat()); + } + else + { + return string.Format(ExampleTemplateWithOutput, + ExampleNameHeader, ExampleInfo.Name, + ExampleCodeHeader, ExampleInfo.Code, ExampleCodeFooter, + ExampleOutputHeader, ExampleInfo.Output, ExampleOutputFooter, + ExampleInfo.Description.ToDescriptionFormat()); ; + } + } + } + + internal class HelpParameterOutput + { + public MarkdownParameterHelpInfo ParameterInfo { get; } + + public HelpParameterOutput(MarkdownParameterHelpInfo parameterInfo) + { + ParameterInfo = parameterInfo; + } + + public override string ToString() + { + var pipelineInputTypes = new[] + { + ParameterInfo.AcceptsPipelineByValue ? "ByValue" : String.Empty, + ParameterInfo.AcceptsPipelineByPropertyName ? "ByPropertyName" : String.Empty + }.JoinIgnoreEmpty(", "); + var pipelineInput = ParameterInfo.AcceptsPipelineByValue || ParameterInfo.AcceptsPipelineByPropertyName + ? $@"{true} ({pipelineInputTypes})" + : false.ToString(); + + return $@"### -{ParameterInfo.Name} +{ParameterInfo.Description.ToDescriptionFormat()} + +```yaml +Type: {ParameterInfo.Type.FullName} +Parameter Sets: {(ParameterInfo.HasAllParameterSets ? "(All)" : ParameterInfo.ParameterSetNames.JoinIgnoreEmpty(", "))} +Aliases:{(ParameterInfo.Aliases.Any() ? $" {ParameterInfo.Aliases.JoinIgnoreEmpty(", ")}" : String.Empty)} + +Required: {ParameterInfo.IsRequired} +Position: {ParameterInfo.Position} +Default value: {ParameterInfo.DefaultValue} +Accept pipeline input: {pipelineInput} +Accept wildcard characters: {ParameterInfo.AcceptsWildcardCharacters} +``` + +"; + } + } + + internal class ModulePageMetadataOutput + { + public PsModuleHelpInfo ModuleInfo { get; } + + private static string HelpLinkPrefix { get; } = @"https://learn.microsoft.com/powershell/module/"; + + public ModulePageMetadataOutput(PsModuleHelpInfo moduleInfo) + { + ModuleInfo = moduleInfo; + } + + public override string ToString() => $@"--- +Module Name: {ModuleInfo.Name} +Module Guid: {ModuleInfo.Guid} +Download Help Link: {HelpLinkPrefix}{ModuleInfo.Name.ToLowerInvariant()} +Help Version: 1.0.0.0 +Locale: en-US +--- + +"; + } + + internal class ModulePageCmdletOutput + { + public MarkdownHelpInfo HelpInfo { get; } + + public ModulePageCmdletOutput(MarkdownHelpInfo helpInfo) + { + HelpInfo = helpInfo; + } + + public override string ToString() => $@"### [{HelpInfo.CmdletName}]({HelpInfo.CmdletName}.md) +{HelpInfo.Synopsis.ToDescriptionFormat()} + +"; + } + + internal static class PsHelpOutputExtensions + { + public static string EscapeAngleBrackets(this string text) => text?.Replace("<", @"\<").Replace(">", @"\>"); + public static string ReplaceSentenceEndWithNewline(this string text) => text?.Replace(". ", $".{Environment.NewLine}").Replace(". ", $".{Environment.NewLine}"); + public static string ReplaceBrWithNewline(this string text) => text?.Replace("
", $"{Environment.NewLine}"); + public static string ToDescriptionFormat(this string text, bool escapeAngleBrackets = true) + { + var description = text?.ReplaceBrWithNewline(); + description = escapeAngleBrackets ? description?.EscapeAngleBrackets() : description; + return description?.ReplaceSentenceEndWithNewline().Trim(); + } + + public const string ExampleNameHeader = "### "; + public const string ExampleCodeHeader = "```powershell"; + public const string ExampleCodeFooter = "```"; + public const string ExampleOutputHeader = "```output"; + public const string ExampleOutputFooter = "```"; + + public static HelpMetadataOutput ToHelpMetadataOutput(this MarkdownHelpInfo helpInfo) => new HelpMetadataOutput(helpInfo); + + public static HelpSyntaxOutput ToHelpSyntaxOutput(this MarkdownSyntaxHelpInfo syntaxInfo, bool hasMultipleParameterSets) => new HelpSyntaxOutput(syntaxInfo, hasMultipleParameterSets); + + public static HelpExampleOutput ToHelpExampleOutput(this MarkdownExampleHelpInfo exampleInfo) => new HelpExampleOutput(exampleInfo); + + public static HelpParameterOutput ToHelpParameterOutput(this MarkdownParameterHelpInfo parameterInfo) => new HelpParameterOutput(parameterInfo); + + public static ModulePageMetadataOutput ToModulePageMetadataOutput(this PsModuleHelpInfo moduleInfo) => new ModulePageMetadataOutput(moduleInfo); + + public static ModulePageCmdletOutput ToModulePageCmdletOutput(this MarkdownHelpInfo helpInfo) => new ModulePageCmdletOutput(helpInfo); + } +} diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Models/PsHelpTypes.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Models/PsHelpTypes.cs new file mode 100644 index 000000000000..0bce990d54f6 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Models/PsHelpTypes.cs @@ -0,0 +1,202 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell +{ + internal class PsHelpInfo + { + public string CmdletName { get; } + public string ModuleName { get; } + public string Synopsis { get; } + public string Description { get; } + public string AlertText { get; } + public string Category { get; } + public PsHelpLinkInfo OnlineVersion { get; } + public PsHelpLinkInfo[] RelatedLinks { get; } + public bool? HasCommonParameters { get; } + public bool? HasWorkflowCommonParameters { get; } + + public PsHelpTypeInfo[] InputTypes { get; } + public PsHelpTypeInfo[] OutputTypes { get; } + public PsHelpExampleInfo[] Examples { get; set; } + public string[] Aliases { get; } + + public PsParameterHelpInfo[] Parameters { get; } + public PsHelpSyntaxInfo[] Syntax { get; } + + public object Component { get; } + public object Functionality { get; } + public object PsSnapIn { get; } + public object Role { get; } + public string NonTerminatingErrors { get; } + + public PsHelpInfo(PSObject helpObject = null) + { + helpObject = helpObject ?? new PSObject(); + CmdletName = helpObject.GetProperty("Name").NullIfEmpty() ?? helpObject.GetNestedProperty("details", "name"); + ModuleName = helpObject.GetProperty("ModuleName"); + Synopsis = helpObject.GetProperty("Synopsis"); + Description = helpObject.GetProperty("description").EmptyIfNull().ToDescriptionText().NullIfEmpty() ?? + helpObject.GetNestedProperty("details", "description").EmptyIfNull().ToDescriptionText(); + AlertText = helpObject.GetNestedProperty("alertSet", "alert").EmptyIfNull().ToDescriptionText(); + Category = helpObject.GetProperty("Category"); + HasCommonParameters = helpObject.GetProperty("CommonParameters").ToNullableBool(); + HasWorkflowCommonParameters = helpObject.GetProperty("WorkflowCommonParameters").ToNullableBool(); + + var links = helpObject.GetNestedProperty("relatedLinks", "navigationLink").EmptyIfNull().Select(nl => nl.ToLinkInfo()).ToArray(); + OnlineVersion = links.FirstOrDefault(l => l.Text?.ToLowerInvariant().StartsWith("online version:") ?? links.Length == 1); + RelatedLinks = links.Where(l => !l.Text?.ToLowerInvariant().StartsWith("online version:") ?? links.Length != 1).ToArray(); + + InputTypes = helpObject.GetNestedProperty("inputTypes", "inputType").EmptyIfNull().Select(it => it.ToTypeInfo()).ToArray(); + OutputTypes = helpObject.GetNestedProperty("returnValues", "returnValue").EmptyIfNull().Select(rv => rv.ToTypeInfo()).ToArray(); + Examples = helpObject.GetNestedProperty("examples", "example").EmptyIfNull().Select(e => e.ToExampleInfo()).ToArray(); + Aliases = helpObject.GetProperty("aliases").EmptyIfNull().Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries); + + Parameters = helpObject.GetNestedProperty("parameters", "parameter").EmptyIfNull().Select(p => p.ToPsParameterHelpInfo()).ToArray(); + Syntax = helpObject.GetNestedProperty("syntax", "syntaxItem").EmptyIfNull().Select(si => si.ToSyntaxInfo()).ToArray(); + + Component = helpObject.GetProperty("Component"); + Functionality = helpObject.GetProperty("Functionality"); + PsSnapIn = helpObject.GetProperty("PSSnapIn"); + Role = helpObject.GetProperty("Role"); + NonTerminatingErrors = helpObject.GetProperty("nonTerminatingErrors"); + } + } + + internal class PsHelpTypeInfo + { + public string Name { get; } + public string Description { get; } + + public PsHelpTypeInfo(PSObject typeObject) + { + Name = typeObject.GetNestedProperty("type", "name").EmptyIfNull().Trim(); + Description = typeObject.GetProperty("description").EmptyIfNull().ToDescriptionText(); + } + } + + internal class PsHelpLinkInfo + { + public string Uri { get; } + public string Text { get; } + + public PsHelpLinkInfo(PSObject linkObject) + { + Uri = linkObject.GetProperty("uri"); + Text = linkObject.GetProperty("linkText"); + } + } + + internal class PsHelpSyntaxInfo + { + public string CmdletName { get; } + public PsParameterHelpInfo[] Parameters { get; } + + public PsHelpSyntaxInfo(PSObject syntaxObject) + { + CmdletName = syntaxObject.GetProperty("name"); + Parameters = syntaxObject.GetProperty("parameter").EmptyIfNull().Select(p => p.ToPsParameterHelpInfo()).ToArray(); + } + } + + internal class PsHelpExampleInfo + { + public string Title { get; } + public string Code { get; } + public string Output { get; } + public string Remarks { get; } + + public PsHelpExampleInfo(PSObject exampleObject) + { + Title = exampleObject.GetProperty("title"); + Code = exampleObject.GetProperty("code"); + Output = exampleObject.GetProperty("output"); + Remarks = exampleObject.GetProperty("remarks").EmptyIfNull().ToDescriptionText(); + } + public PsHelpExampleInfo(MarkdownExampleHelpInfo markdownExample) + { + Title = markdownExample.Name; + Code = markdownExample.Code; + Output = markdownExample.Output; + Remarks = markdownExample.Description; + } + + public static implicit operator PsHelpExampleInfo(MarkdownExampleHelpInfo markdownExample) => new PsHelpExampleInfo(markdownExample); + } + + internal class PsParameterHelpInfo + { + public string DefaultValueAsString { get; } + + public string Name { get; } + public string TypeName { get; } + public string Description { get; } + public string SupportsPipelineInput { get; } + public string PositionText { get; } + public string[] ParameterSetNames { get; } + public string[] Aliases { get; } + + public bool? SupportsGlobbing { get; } + public bool? IsRequired { get; } + public bool? IsVariableLength { get; } + public bool? IsDynamic { get; } + + public PsParameterHelpInfo(PSObject parameterHelpObject = null) + { + parameterHelpObject = parameterHelpObject ?? new PSObject(); + DefaultValueAsString = parameterHelpObject.GetProperty("defaultValue"); + Name = parameterHelpObject.GetProperty("name"); + TypeName = parameterHelpObject.GetProperty("parameterValue").NullIfEmpty() ?? parameterHelpObject.GetNestedProperty("type", "name"); + Description = parameterHelpObject.GetProperty("Description").EmptyIfNull().ToDescriptionText(); + SupportsPipelineInput = parameterHelpObject.GetProperty("pipelineInput"); + PositionText = parameterHelpObject.GetProperty("position"); + ParameterSetNames = parameterHelpObject.GetProperty("parameterSetName").EmptyIfNull().Split(new[] { ", " }, StringSplitOptions.RemoveEmptyEntries); + Aliases = parameterHelpObject.GetProperty("aliases").EmptyIfNull().Split(new[] { ", " }, StringSplitOptions.RemoveEmptyEntries); + + SupportsGlobbing = parameterHelpObject.GetProperty("globbing").ToNullableBool(); + IsRequired = parameterHelpObject.GetProperty("required").ToNullableBool(); + IsVariableLength = parameterHelpObject.GetProperty("variableLength").ToNullableBool(); + IsDynamic = parameterHelpObject.GetProperty("isDynamic").ToNullableBool(); + } + } + + internal class PsModuleHelpInfo + { + public string Name { get; } + public Guid Guid { get; } + public string Description { get; } + + public PsModuleHelpInfo(PSModuleInfo moduleInfo) + : this(moduleInfo?.Name ?? String.Empty, moduleInfo?.Guid ?? Guid.NewGuid(), moduleInfo?.Description ?? String.Empty) + { + } + + public PsModuleHelpInfo(string name, Guid guid, string description) + { + Name = name; + Guid = guid; + Description = description; + } + } + + internal static class HelpTypesExtensions + { + public static PsHelpInfo ToPsHelpInfo(this PSObject helpObject) => new PsHelpInfo(helpObject); + public static PsParameterHelpInfo ToPsParameterHelpInfo(this PSObject parameterHelpObject) => new PsParameterHelpInfo(parameterHelpObject); + + public static string ToDescriptionText(this IEnumerable descriptionObject) => descriptionObject != null + ? String.Join(Environment.NewLine, descriptionObject.Select(dl => dl.GetProperty("Text").EmptyIfNull())).NullIfWhiteSpace() + : null; + public static PsHelpTypeInfo ToTypeInfo(this PSObject typeObject) => new PsHelpTypeInfo(typeObject); + public static PsHelpExampleInfo ToExampleInfo(this PSObject exampleObject) => new PsHelpExampleInfo(exampleObject); + public static PsHelpLinkInfo ToLinkInfo(this PSObject linkObject) => new PsHelpLinkInfo(linkObject); + public static PsHelpSyntaxInfo ToSyntaxInfo(this PSObject syntaxObject) => new PsHelpSyntaxInfo(syntaxObject); + public static PsModuleHelpInfo ToModuleInfo(this PSModuleInfo moduleInfo) => new PsModuleHelpInfo(moduleInfo); + } +} diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs new file mode 100644 index 000000000000..816f28415350 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs @@ -0,0 +1,329 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Management.Automation; +using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell.MarkdownTypesExtensions; +using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell.PsHelpOutputExtensions; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell +{ + internal class MarkdownHelpInfo + { + public string ExternalHelpFilename { get; } + public string ModuleName { get; } + public string OnlineVersion { get; } + public Version Schema { get; } + + public string CmdletName { get; } + public string[] Aliases { get; } + public string Synopsis { get; } + public string Description { get; } + + public MarkdownSyntaxHelpInfo[] SyntaxInfos { get; } + public MarkdownExampleHelpInfo[] Examples { get; } + public MarkdownParameterHelpInfo[] Parameters { get; } + + public string[] Inputs { get; } + public string[] Outputs { get; } + public ComplexInterfaceInfo[] ComplexInterfaceInfos { get; } + public MarkdownRelatedLinkInfo[] RelatedLinks { get; } + + public bool SupportsShouldProcess { get; } + public bool SupportsPaging { get; } + + public MarkdownHelpInfo(VariantGroup variantGroup, string examplesFolder, string externalHelpFilename = "") + { + ExternalHelpFilename = externalHelpFilename; + ModuleName = variantGroup.RootModuleName != "" ? variantGroup.RootModuleName : variantGroup.ModuleName; + var helpInfo = variantGroup.HelpInfo; + var commentInfo = variantGroup.CommentInfo; + Schema = Version.Parse("2.0.0"); + + CmdletName = variantGroup.CmdletName; + Aliases = (variantGroup.Aliases.NullIfEmpty() ?? helpInfo.Aliases).Where(a => a != "None").ToArray(); + Synopsis = commentInfo.Synopsis; + Description = commentInfo.Description; + + SyntaxInfos = variantGroup.Variants + .Select(v => new MarkdownSyntaxHelpInfo(v, variantGroup.ParameterGroups, v.VariantName == variantGroup.DefaultParameterSetName)) + .OrderByDescending(v => v.IsDefault).ThenBy(v => v.ParameterSetName).ToArray(); + Examples = GetExamplesFromMarkdown(examplesFolder).NullIfEmpty() + ?? helpInfo.Examples.Select(e => e.ToExampleHelpInfo()).ToArray().NullIfEmpty() + ?? DefaultExampleHelpInfos; + + Parameters = variantGroup.ParameterGroups + .Where(pg => !pg.DontShow && !pg.Parameters.All(p => p.IsHidden())) + .Select(pg => new MarkdownParameterHelpInfo( + variantGroup.Variants.SelectMany(v => v.HelpInfo.Parameters).Where(phi => phi.Name == pg.ParameterName).ToArray(), pg)) + .OrderBy(phi => phi.Name).ToArray(); + + Inputs = commentInfo.Inputs; + Outputs = commentInfo.Outputs; + + ComplexInterfaceInfos = variantGroup.ComplexInterfaceInfos; + OnlineVersion = commentInfo.OnlineVersion; + + var relatedLinkLists = new List(); + relatedLinkLists.AddRange(commentInfo.RelatedLinks?.Select(link => new MarkdownRelatedLinkInfo(link))); + relatedLinkLists.AddRange(variantGroup.Variants.SelectMany(v => v.Attributes).OfType()?.Distinct()?.Select(link => new MarkdownRelatedLinkInfo(link.Url, link.Description))); + RelatedLinks = relatedLinkLists?.ToArray(); + + SupportsShouldProcess = variantGroup.SupportsShouldProcess; + SupportsPaging = variantGroup.SupportsPaging; + } + + private MarkdownExampleHelpInfo[] GetExamplesFromMarkdown(string examplesFolder) + { + var filePath = Path.Combine(examplesFolder, $"{CmdletName}.md"); + if (!Directory.Exists(examplesFolder) || !File.Exists(filePath)) return null; + + var lines = File.ReadAllLines(filePath); + var nameIndices = lines.Select((l, i) => l.StartsWith(ExampleNameHeader) ? i : -1).Where(i => i != -1).ToArray(); + //https://codereview.stackexchange.com/a/187148/68772 + var indexCountGroups = nameIndices.Skip(1).Append(lines.Length).Zip(nameIndices, (next, current) => (NameIndex: current, LineCount: next - current)); + var exampleGroups = indexCountGroups.Select(icg => lines.Skip(icg.NameIndex).Take(icg.LineCount).ToArray()); + return exampleGroups.Select(eg => + { + var name = eg.First().Replace(ExampleNameHeader, String.Empty); + var codeStartIndex = eg.Select((l, i) => l.StartsWith(ExampleCodeHeader) ? (int?)i : null).FirstOrDefault(i => i.HasValue); + var codeEndIndex = eg.Select((l, i) => l.StartsWith(ExampleCodeFooter) ? (int?)i : null).FirstOrDefault(i => i.HasValue && i != codeStartIndex); + var code = codeStartIndex.HasValue && codeEndIndex.HasValue + ? String.Join(Environment.NewLine, eg.Skip(codeStartIndex.Value + 1).Take(codeEndIndex.Value - (codeStartIndex.Value + 1))) + : String.Empty; + var outputStartIndex = eg.Select((l, i) => l.StartsWith(ExampleOutputHeader) ? (int?)i : null).FirstOrDefault(i => i.HasValue); + var outputEndIndex = eg.Select((l, i) => l.StartsWith(ExampleOutputFooter) ? (int?)i : null).FirstOrDefault(i => i.HasValue && i > outputStartIndex); + var output = outputStartIndex.HasValue && outputEndIndex.HasValue + ? String.Join(Environment.NewLine, eg.Skip(outputStartIndex.Value + 1).Take(outputEndIndex.Value - (outputStartIndex.Value + 1))) + : String.Empty; + var descriptionStartIndex = (outputEndIndex ?? (codeEndIndex ?? 0)) + 1; + descriptionStartIndex = String.IsNullOrWhiteSpace(eg[descriptionStartIndex]) ? descriptionStartIndex + 1 : descriptionStartIndex; + var descriptionEndIndex = eg.Length - 1; + descriptionEndIndex = String.IsNullOrWhiteSpace(eg[descriptionEndIndex]) ? descriptionEndIndex - 1 : descriptionEndIndex; + var description = String.Join(Environment.NewLine, eg.Skip(descriptionStartIndex).Take((descriptionEndIndex + 1) - descriptionStartIndex)); + return new MarkdownExampleHelpInfo(name, code, output, description); + }).ToArray(); + } + } + + internal class MarkdownSyntaxHelpInfo + { + public Variant Variant { get; } + public bool IsDefault { get; } + public string ParameterSetName { get; } + public Parameter[] Parameters { get; } + public string SyntaxText { get; } + + public MarkdownSyntaxHelpInfo(Variant variant, ParameterGroup[] parameterGroups, bool isDefault) + { + Variant = variant; + IsDefault = isDefault; + ParameterSetName = Variant.VariantName; + Parameters = Variant.Parameters + .Where(p => !p.DontShow && !p.IsHidden()).OrderByDescending(p => p.IsMandatory) + //https://stackoverflow.com/a/6461526/294804 + .ThenByDescending(p => p.Position.HasValue).ThenBy(p => p.Position) + // Use the OrderCategory of the parameter group because the final order category is the highest of the group, and not the order category of the individual parameters from the variants. + .ThenBy(p => parameterGroups.First(pg => pg.ParameterName == p.ParameterName).OrderCategory).ThenBy(p => p.ParameterName).ToArray(); + SyntaxText = CreateSyntaxFormat(); + } + + //https://github.com/PowerShell/platyPS/blob/a607a926bfffe1e1a1e53c19e0057eddd0c07611/src/Markdown.MAML/Renderer/Markdownv2Renderer.cs#L29-L32 + private const int SyntaxLineWidth = 110; + private string CreateSyntaxFormat() + { + var parameterStrings = Parameters.Select(p => p.ToPropertySyntaxOutput().ToString()); + if (Variant.SupportsShouldProcess) + { + parameterStrings = parameterStrings.Append(" [-Confirm]").Append(" [-WhatIf]"); + } + parameterStrings = parameterStrings.Append(" []"); + + var lines = new List(20); + return parameterStrings.Aggregate(Variant.CmdletName, (current, ps) => + { + var combined = current + ps; + if (combined.Length <= SyntaxLineWidth) return combined; + + lines.Add(current); + return ps; + }, last => + { + lines.Add(last); + return String.Join(Environment.NewLine, lines); + }); + } + } + + internal class MarkdownExampleHelpInfo + { + public string Name { get; } + public string Code { get; } + public string Output { get; } + public string Description { get; } + + public MarkdownExampleHelpInfo(string name, string code, string output, string description) + { + Name = name; + Code = code; + Output = output; + Description = description; + } + } + + internal class MarkdownParameterHelpInfo + { + public string Name { get; set; } + public string Description { get; set; } + public Type Type { get; set; } + public string Position { get; set; } + public string DefaultValue { get; set; } + + public bool HasAllParameterSets { get; set; } + public string[] ParameterSetNames { get; set; } + public string[] Aliases { get; set; } + + public bool IsRequired { get; set; } + public bool IsDynamic { get; set; } + public bool AcceptsPipelineByValue { get; set; } + public bool AcceptsPipelineByPropertyName { get; set; } + public bool AcceptsWildcardCharacters { get; set; } + + // For use by common parameters that have no backing data in the objects themselves. + public MarkdownParameterHelpInfo() { } + + public MarkdownParameterHelpInfo(PsParameterHelpInfo[] parameterHelpInfos, ParameterGroup parameterGroup) + { + Name = parameterGroup.ParameterName; + Description = parameterGroup.Description.NullIfEmpty() + ?? parameterHelpInfos.Select(phi => phi.Description).FirstOrDefault(d => !String.IsNullOrEmpty(d)).EmptyIfNull(); + Type = parameterGroup.ParameterType; + Position = parameterGroup.FirstPosition?.ToString() + ?? parameterHelpInfos.Select(phi => phi.PositionText).FirstOrDefault(d => !String.IsNullOrEmpty(d)).ToUpperFirstCharacter().NullIfEmpty() + ?? "Named"; + // This no longer uses firstHelpInfo.DefaultValueAsString since it seems to be broken. For example, it has a value of 0 for Int32, but no default value was declared. + DefaultValue = parameterGroup.DefaultInfo?.Script ?? "None"; + + HasAllParameterSets = parameterGroup.HasAllVariants; + ParameterSetNames = (parameterGroup.Parameters.Select(p => p.VariantName).ToArray().NullIfEmpty() + ?? parameterHelpInfos.SelectMany(phi => phi.ParameterSetNames).Distinct()) + .OrderBy(psn => psn).ToArray(); + Aliases = parameterGroup.Aliases.NullIfEmpty() ?? parameterHelpInfos.SelectMany(phi => phi.Aliases).ToArray(); + + IsRequired = parameterHelpInfos.Select(phi => phi.IsRequired).FirstOrDefault(r => r == true) ?? parameterGroup.Parameters.Any(p => p.IsMandatory); + IsDynamic = parameterHelpInfos.Select(phi => phi.IsDynamic).FirstOrDefault(d => d == true) ?? false; + AcceptsPipelineByValue = parameterHelpInfos.Select(phi => phi.SupportsPipelineInput?.Contains("ByValue")).FirstOrDefault(bv => bv == true) ?? parameterGroup.ValueFromPipeline; + AcceptsPipelineByPropertyName = parameterHelpInfos.Select(phi => phi.SupportsPipelineInput?.Contains("ByPropertyName")).FirstOrDefault(bv => bv == true) ?? parameterGroup.ValueFromPipelineByPropertyName; + AcceptsWildcardCharacters = parameterGroup.SupportsWildcards; + } + } + + internal class MarkdownRelatedLinkInfo + { + public string Url { get; } + public string Description { get; } + + public MarkdownRelatedLinkInfo(string url) + { + Url = url; + } + + public MarkdownRelatedLinkInfo(string url, string description) + { + Url = url; + Description = description; + } + + public override string ToString() + { + if (string.IsNullOrEmpty(Description)) + { + return Url; + } + else + { + return $@"[{Description}]({Url})"; + + } + + } + } + + internal static class MarkdownTypesExtensions + { + public static MarkdownExampleHelpInfo ToExampleHelpInfo(this PsHelpExampleInfo exampleInfo) => new MarkdownExampleHelpInfo(exampleInfo.Title, exampleInfo.Code, exampleInfo.Output, exampleInfo.Remarks); + + public static MarkdownExampleHelpInfo[] DefaultExampleHelpInfos = + { + new MarkdownExampleHelpInfo("Example 1: {{ Add title here }}", $@"{{{{ Add code here }}}}", $@"{{{{ Add output here (remove the output block if the example doesn't have an output) }}}}", @"{{ Add description here }}"), + new MarkdownExampleHelpInfo("Example 2: {{ Add title here }}", $@"{{{{ Add code here }}}}", $@"{{{{ Add output here (remove the output block if the example doesn't have an output) }}}}", @"{{ Add description here }}"), + }; + + public static MarkdownParameterHelpInfo[] SupportsShouldProcessParameters = + { + new MarkdownParameterHelpInfo + { + Name = "Confirm", + Description ="Prompts you for confirmation before running the cmdlet.", + Type = typeof(SwitchParameter), + Position = "Named", + DefaultValue = "None", + HasAllParameterSets = true, + ParameterSetNames = new [] { "(All)" }, + Aliases = new [] { "cf" } + }, + new MarkdownParameterHelpInfo + { + Name = "WhatIf", + Description ="Shows what would happen if the cmdlet runs. The cmdlet is not run.", + Type = typeof(SwitchParameter), + Position = "Named", + DefaultValue = "None", + HasAllParameterSets = true, + ParameterSetNames = new [] { "(All)" }, + Aliases = new [] { "wi" } + } + }; + + public static MarkdownParameterHelpInfo[] SupportsPagingParameters = + { + new MarkdownParameterHelpInfo + { + Name = "First", + Description ="Gets only the first 'n' objects.", + Type = typeof(ulong), + Position = "Named", + DefaultValue = "None", + HasAllParameterSets = true, + ParameterSetNames = new [] { "(All)" }, + Aliases = new string[0] + }, + new MarkdownParameterHelpInfo + { + Name = "IncludeTotalCount", + Description ="Reports the number of objects in the data set (an integer) followed by the objects. If the cmdlet cannot determine the total count, it returns \"Unknown total count\".", + Type = typeof(SwitchParameter), + Position = "Named", + DefaultValue = "None", + HasAllParameterSets = true, + ParameterSetNames = new [] { "(All)" }, + Aliases = new string[0] + }, + new MarkdownParameterHelpInfo + { + Name = "Skip", + Description ="Ignores the first 'n' objects and then gets the remaining objects.", + Type = typeof(ulong), + Position = "Named", + DefaultValue = "None", + HasAllParameterSets = true, + ParameterSetNames = new [] { "(All)" }, + Aliases = new string[0] + } + }; + } +} diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs new file mode 100644 index 000000000000..35589a53faae --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs @@ -0,0 +1,662 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using System.Text.RegularExpressions; +using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell.PsProxyOutputExtensions; +using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell.PsProxyTypeExtensions; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell +{ + internal class OutputTypeOutput + { + public PSTypeName[] OutputTypes { get; } + + public OutputTypeOutput(IEnumerable outputTypes) + { + OutputTypes = outputTypes.ToArray(); + } + + public override string ToString() => OutputTypes != null && OutputTypes.Any() ? $"[OutputType({OutputTypes.Select(ot => $"[{ot}]").JoinIgnoreEmpty(ItemSeparator)})]{Environment.NewLine}" : String.Empty; + } + + internal class CmdletBindingOutput + { + public VariantGroup VariantGroup { get; } + + public CmdletBindingOutput(VariantGroup variantGroup) + { + VariantGroup = variantGroup; + } + + public override string ToString() + { + var dpsText = VariantGroup.DefaultParameterSetName.IsValidDefaultParameterSetName() ? $"DefaultParameterSetName='{VariantGroup.DefaultParameterSetName}'" : String.Empty; + var sspText = VariantGroup.SupportsShouldProcess ? $"SupportsShouldProcess{ItemSeparator}ConfirmImpact='Medium'" : String.Empty; + var pbText = $"PositionalBinding={false.ToPsBool()}"; + var propertyText = new[] { dpsText, pbText, sspText }.JoinIgnoreEmpty(ItemSeparator); + return $"[CmdletBinding({propertyText})]{Environment.NewLine}"; + } + } + + internal class ParameterOutput + { + public Parameter Parameter { get; } + public bool HasMultipleVariantsInVariantGroup { get; } + public bool HasAllVariantsInParameterGroup { get; } + + public ParameterOutput(Parameter parameter, bool hasMultipleVariantsInVariantGroup, bool hasAllVariantsInParameterGroup) + { + Parameter = parameter; + HasMultipleVariantsInVariantGroup = hasMultipleVariantsInVariantGroup; + HasAllVariantsInParameterGroup = hasAllVariantsInParameterGroup; + } + + public override string ToString() + { + var psnText = HasMultipleVariantsInVariantGroup && !HasAllVariantsInParameterGroup ? $"ParameterSetName='{Parameter.VariantName}'" : String.Empty; + var positionText = Parameter.Position != null ? $"Position={Parameter.Position}" : String.Empty; + var mandatoryText = Parameter.IsMandatory ? "Mandatory" : String.Empty; + var dontShowText = Parameter.DontShow ? "DontShow" : String.Empty; + var vfpText = Parameter.ValueFromPipeline ? "ValueFromPipeline" : String.Empty; + var vfpbpnText = Parameter.ValueFromPipelineByPropertyName ? "ValueFromPipelineByPropertyName" : String.Empty; + var propertyText = new[] { psnText, positionText, mandatoryText, dontShowText, vfpText, vfpbpnText }.JoinIgnoreEmpty(ItemSeparator); + return $"{Indent}[Parameter({propertyText})]{Environment.NewLine}"; + } + } + + internal class AliasOutput + { + public string[] Aliases { get; } + public bool IncludeIndent { get; } + + public AliasOutput(string[] aliases, bool includeIndent = false) + { + Aliases = aliases; + IncludeIndent = includeIndent; + } + + public override string ToString() => Aliases?.Any() ?? false ? $"{(IncludeIndent ? Indent : String.Empty)}[Alias({Aliases.Select(an => $"'{an}'").JoinIgnoreEmpty(ItemSeparator)})]{Environment.NewLine}" : String.Empty; + } + + internal class ValidateNotNullOutput + { + public bool HasValidateNotNull { get; } + + public ValidateNotNullOutput(bool hasValidateNotNull) + { + HasValidateNotNull = hasValidateNotNull; + } + + public override string ToString() => HasValidateNotNull ? $"{Indent}[ValidateNotNull()]{Environment.NewLine}" : String.Empty; + } + + internal class AllowEmptyArrayOutput + { + public bool HasAllowEmptyArray { get; } + + public AllowEmptyArrayOutput(bool hasAllowEmptyArray) + { + HasAllowEmptyArray = hasAllowEmptyArray; + } + + public override string ToString() => HasAllowEmptyArray ? $"{Indent}[AllowEmptyCollection()]{Environment.NewLine}" : String.Empty; + } + internal class ArgumentCompleterOutput + { + public CompleterInfo CompleterInfo { get; } + + public ArgumentCompleterOutput(CompleterInfo completerInfo) + { + CompleterInfo = completerInfo; + } + + public override string ToString() => CompleterInfo != null + ? $"{Indent}[ArgumentCompleter({(CompleterInfo.IsTypeCompleter ? $"[{CompleterInfo.Type.Unwrap().ToPsType()}]" : $"{{{CompleterInfo.Script.ToPsSingleLine("; ")}}}")})]{Environment.NewLine}" + : String.Empty; + } + + internal class PSArgumentCompleterOutput : ArgumentCompleterOutput + { + public PSArgumentCompleterInfo PSArgumentCompleterInfo { get; } + + public PSArgumentCompleterOutput(PSArgumentCompleterInfo completerInfo) : base(completerInfo) + { + PSArgumentCompleterInfo = completerInfo; + } + + + public override string ToString() => PSArgumentCompleterInfo != null + ? $"{Indent}[{typeof(PSArgumentCompleterAttribute)}({(PSArgumentCompleterInfo.IsTypeCompleter ? $"[{PSArgumentCompleterInfo.Type.Unwrap().ToPsType()}]" : $"{PSArgumentCompleterInfo.ResourceTypes?.Select(r => $"\"{r}\"")?.JoinIgnoreEmpty(", ")}")})]{Environment.NewLine}" + : String.Empty; + } + + internal class DefaultInfoOutput + { + public bool HasDefaultInfo { get; } + public DefaultInfo DefaultInfo { get; } + + public DefaultInfoOutput(ParameterGroup parameterGroup) + { + HasDefaultInfo = parameterGroup.HasDefaultInfo; + DefaultInfo = parameterGroup.DefaultInfo; + } + + public override string ToString() + { + var nameText = !String.IsNullOrEmpty(DefaultInfo?.Name) ? $"Name='{DefaultInfo?.Name}'" : String.Empty; + var descriptionText = !String.IsNullOrEmpty(DefaultInfo?.Description) ? $"Description='{DefaultInfo?.Description.ToPsStringLiteral()}'" : String.Empty; + var scriptText = !String.IsNullOrEmpty(DefaultInfo?.Script) ? $"Script='{DefaultInfo?.Script.ToPsSingleLine("; ")}'" : String.Empty; + var propertyText = new[] { nameText, descriptionText, scriptText }.JoinIgnoreEmpty(ItemSeparator); + return HasDefaultInfo ? $"{Indent}[{typeof(DefaultInfoAttribute).ToPsAttributeType()}({propertyText})]{Environment.NewLine}" : String.Empty; + } + } + + internal class ParameterTypeOutput + { + public Type ParameterType { get; } + + public ParameterTypeOutput(Type parameterType) + { + ParameterType = parameterType; + } + + public override string ToString() => $"{Indent}[{ParameterType.ToPsType()}]{Environment.NewLine}"; + } + + internal class ParameterNameOutput + { + public string ParameterName { get; } + public bool IsLast { get; } + + public ParameterNameOutput(string parameterName, bool isLast) + { + ParameterName = parameterName; + IsLast = isLast; + } + + public override string ToString() => $"{Indent}${{{ParameterName}}}{(IsLast ? String.Empty : $",{Environment.NewLine}")}{Environment.NewLine}"; + } + + internal class BaseOutput + { + public VariantGroup VariantGroup { get; } + + protected static readonly bool IsAzure = Convert.ToBoolean(@"true"); + + public BaseOutput(VariantGroup variantGroup) + { + VariantGroup = variantGroup; + } + public string ClearTelemetryContext() + { + return (!VariantGroup.IsInternal && IsAzure) ? $@"{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()" : ""; + } + } + + internal class BeginOutput : BaseOutput + { + public BeginOutput(VariantGroup variantGroup) : base(variantGroup) + { + } + + public string GetProcessCustomAttributesAtRuntime() + { + return VariantGroup.IsInternal ? "" : IsAzure ? $@"{Indent}{Indent}$cmdInfo = Get-Command -Name $mapping[$parameterSet] +{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) +{Indent}{Indent}if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){{ +{Indent}{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) +{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) +{Indent}{Indent}}}" : $@"{Indent}{Indent}$cmdInfo = Get-Command -Name $mapping[$parameterSet]{Environment.NewLine}{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) +{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)"; + } + + private string GetTelemetry() + { + if (!VariantGroup.IsInternal && IsAzure) + { + return $@" +{Indent}{Indent}if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {{ +{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() +{Indent}{Indent}}} +{Indent}{Indent}$preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId +{Indent}{Indent}if ($preTelemetryId -eq '') {{ +{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() +{Indent}{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) +{Indent}{Indent}}} else {{ +{Indent}{Indent}{Indent}$internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets +{Indent}{Indent}{Indent}if ($internalCalledCmdlets -eq '') {{ +{Indent}{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name +{Indent}{Indent}{Indent}}} else {{ +{Indent}{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name +{Indent}{Indent}{Indent}}} +{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' +{Indent}{Indent}}} +"; + } + return ""; + } + public override string ToString() => $@"begin {{ +{Indent}try {{ +{Indent}{Indent}$outBuffer = $null +{Indent}{Indent}if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {{ +{Indent}{Indent}{Indent}$PSBoundParameters['OutBuffer'] = 1 +{Indent}{Indent}}} +{Indent}{Indent}$parameterSet = $PSCmdlet.ParameterSetName +{GetTelemetry()} +{GetParameterSetToCmdletMapping()}{GetDefaultValuesStatements()} +{GetProcessCustomAttributesAtRuntime()} +{Indent}{Indent}$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) +{Indent}{Indent}$scriptCmd = {{& $wrappedCmd @PSBoundParameters}} +{Indent}{Indent}$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) +{Indent}{Indent}$steppablePipeline.Begin($PSCmdlet) +{Indent}}} catch {{ +{ClearTelemetryContext()} +{Indent}{Indent}throw +{Indent}}} +}} + +"; + + private string GetParameterSetToCmdletMapping() + { + var sb = new StringBuilder(); + sb.AppendLine($"{Indent}{Indent}$mapping = @{{"); + foreach (var variant in VariantGroup.Variants) + { + sb.AppendLine($@"{Indent}{Indent}{Indent}{variant.VariantName} = '{variant.PrivateModuleName}\{variant.PrivateCmdletName}';"); + } + sb.Append($"{Indent}{Indent}}}"); + return sb.ToString(); + } + + private string GetDefaultValuesStatements() + { + var defaultInfos = VariantGroup.ParameterGroups.Where(pg => pg.HasDefaultInfo).Select(pg => pg.DefaultInfo).ToArray(); + var sb = new StringBuilder(); + + foreach (var defaultInfo in defaultInfos) + { + var variantListString = defaultInfo.ParameterGroup.VariantNames.ToPsList(); + var parameterName = defaultInfo.ParameterGroup.ParameterName; + sb.AppendLine(); + var setCondition = " "; + if (!String.IsNullOrEmpty(defaultInfo.SetCondition)) + { + setCondition = $" -and {defaultInfo.SetCondition}"; + } + //Yabo: this is bad to hard code the subscription id, but autorest load input README.md reversely (entry readme -> required readme), there are no other way to + //override default value set in required readme + if ("SubscriptionId".Equals(parameterName)) + { + sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}'){setCondition}) {{"); + sb.AppendLine($"{Indent}{Indent}{Indent}$testPlayback = $false"); + sb.AppendLine($"{Indent}{Indent}{Indent}$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object {{ if ($_) {{ $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) }} }}"); + sb.AppendLine($"{Indent}{Indent}{Indent}if ($testPlayback) {{"); + sb.AppendLine($"{Indent}{Indent}{Indent}{Indent}$PSBoundParameters['{parameterName}'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')"); + sb.AppendLine($"{Indent}{Indent}{Indent}}} else {{"); + sb.AppendLine($"{Indent}{Indent}{Indent}{Indent}$PSBoundParameters['{parameterName}'] = {defaultInfo.Script}"); + sb.AppendLine($"{Indent}{Indent}{Indent}}}"); + sb.Append($"{Indent}{Indent}}}"); + } + else + { + sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}'){setCondition}) {{"); + sb.AppendLine($"{Indent}{Indent}{Indent}$PSBoundParameters['{parameterName}'] = {defaultInfo.Script}"); + sb.Append($"{Indent}{Indent}}}"); + } + + } + return sb.ToString(); + } + + } + + internal class ProcessOutput : BaseOutput + { + public ProcessOutput(VariantGroup variantGroup) : base(variantGroup) + { + } + + private string GetFinally() + { + if (IsAzure && !VariantGroup.IsInternal) + { + return $@" +{Indent}finally {{ +{Indent}{Indent}$backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId +{Indent}{Indent}$backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets +{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() +{Indent}}} +"; + } + return ""; + } + public override string ToString() => $@"process {{ +{Indent}try {{ +{Indent}{Indent}$steppablePipeline.Process($_) +{Indent}}} catch {{ +{ClearTelemetryContext()} +{Indent}{Indent}throw +{Indent}}} +{GetFinally()} +}} +"; + } + + internal class EndOutput : BaseOutput + { + public EndOutput(VariantGroup variantGroup) : base(variantGroup) + { + } + + private string GetTelemetry() + { + if (!VariantGroup.IsInternal && IsAzure) + { + return $@" +{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId +{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets +{Indent}{Indent}if ($preTelemetryId -eq '') {{ +{Indent}{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) +{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() +{Indent}{Indent}}} +{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId +"; + } + return ""; + } + public override string ToString() => $@"end {{ +{Indent}try {{ +{Indent}{Indent}$steppablePipeline.End() +{GetTelemetry()} +{Indent}}} catch {{ +{ClearTelemetryContext()} +{Indent}{Indent}throw +{Indent}}} +}} +"; + } + + internal class HelpCommentOutput + { + public VariantGroup VariantGroup { get; } + public CommentInfo CommentInfo { get; } + + public HelpCommentOutput(VariantGroup variantGroup) + { + VariantGroup = variantGroup; + CommentInfo = variantGroup.CommentInfo; + } + + public override string ToString() + { + var inputs = String.Join(Environment.NewLine, CommentInfo.Inputs.Select(i => $".Inputs{Environment.NewLine}{i}")); + var inputsText = !String.IsNullOrEmpty(inputs) ? $"{Environment.NewLine}{inputs}" : String.Empty; + var outputs = String.Join(Environment.NewLine, CommentInfo.Outputs.Select(o => $".Outputs{Environment.NewLine}{o}")); + var outputsText = !String.IsNullOrEmpty(outputs) ? $"{Environment.NewLine}{outputs}" : String.Empty; + var notes = String.Join($"{Environment.NewLine}{Environment.NewLine}", VariantGroup.ComplexInterfaceInfos.Select(cii => cii.ToNoteOutput())); + var notesText = !String.IsNullOrEmpty(notes) ? $"{Environment.NewLine}.Notes{Environment.NewLine}{ComplexParameterHeader}{notes}" : String.Empty; + var relatedLinks = String.Join(Environment.NewLine, CommentInfo.RelatedLinks.Select(l => $".Link{Environment.NewLine}{l}")); + var relatedLinksText = !String.IsNullOrEmpty(relatedLinks) ? $"{Environment.NewLine}{relatedLinks}" : String.Empty; + var externalUrls = String.Join(Environment.NewLine, CommentInfo.ExternalUrls.Select(l => $".Link{Environment.NewLine}{l}")); + var externalUrlsText = !String.IsNullOrEmpty(externalUrls) ? $"{Environment.NewLine}{externalUrls}" : String.Empty; + var examples = ""; + foreach (var example in VariantGroup.HelpInfo.Examples) + { + examples = examples + ".Example" + "\r\n" + example.Code + "\r\n"; + } + return $@"<# +.Synopsis +{CommentInfo.Synopsis.ToDescriptionFormat(false)} +.Description +{CommentInfo.Description.ToDescriptionFormat(false)} +{examples}{inputsText}{outputsText}{notesText} +.Link +{CommentInfo.OnlineVersion}{relatedLinksText}{externalUrlsText} +#> +"; + } + } + + internal class ParameterDescriptionOutput + { + public string Description { get; } + + public ParameterDescriptionOutput(string description) + { + Description = description; + } + + public override string ToString() => !String.IsNullOrEmpty(Description) + ? Description.ToDescriptionFormat(false).NormalizeNewLines() + .Split(new[] { Environment.NewLine }, StringSplitOptions.None) + .Aggregate(String.Empty, (c, n) => c + $"{Indent}# {n}{Environment.NewLine}") + : String.Empty; + } + + internal class ProfileOutput + { + public string ProfileName { get; } + + public ProfileOutput(string profileName) + { + ProfileName = profileName; + } + + public override string ToString() => ProfileName != NoProfiles ? $"[{typeof(ProfileAttribute).ToPsAttributeType()}('{ProfileName}')]{Environment.NewLine}" : String.Empty; + } + + internal class DescriptionOutput + { + public string Description { get; } + + public DescriptionOutput(string description) + { + Description = description; + } + + public override string ToString() => !String.IsNullOrEmpty(Description) ? $"[{typeof(DescriptionAttribute).ToPsAttributeType()}('{Description.ToPsStringLiteral()}')]{Environment.NewLine}" : String.Empty; + } + + internal class ParameterCategoryOutput + { + public ParameterCategory Category { get; } + + public ParameterCategoryOutput(ParameterCategory category) + { + Category = category; + } + + public override string ToString() => $"{Indent}[{typeof(CategoryAttribute).ToPsAttributeType()}('{Category}')]{Environment.NewLine}"; + } + + internal class InfoOutput + { + public InfoAttribute Info { get; } + public Type ParameterType { get; } + + public InfoOutput(InfoAttribute info, Type parameterType) + { + Info = info; + ParameterType = parameterType; + } + + public override string ToString() + { + // Rendering of InfoAttribute members that are not used currently + /*var serializedNameText = Info.SerializedName != null ? $"SerializedName='{Info.SerializedName}'" : String.Empty; + var readOnlyText = Info.ReadOnly ? "ReadOnly" : String.Empty; + var descriptionText = !String.IsNullOrEmpty(Info.Description) ? $"Description='{Info.Description.ToPsStringLiteral()}'" : String.Empty;*/ + + var requiredText = Info.Required ? "Required" : String.Empty; + var unwrappedType = ParameterType.Unwrap(); + var hasValidPossibleTypes = Info.PossibleTypes.Any(pt => pt != unwrappedType); + var possibleTypesText = hasValidPossibleTypes + ? $"PossibleTypes=({Info.PossibleTypes.Select(pt => $"[{pt.ToPsType()}]").JoinIgnoreEmpty(ItemSeparator)})" + : String.Empty; + var propertyText = new[] { /*serializedNameText, */requiredText,/* readOnlyText,*/ possibleTypesText/*, descriptionText*/ }.JoinIgnoreEmpty(ItemSeparator); + return hasValidPossibleTypes ? $"{Indent}[{typeof(InfoAttribute).ToPsAttributeType()}({propertyText})]{Environment.NewLine}" : String.Empty; + } + } + + internal class PropertySyntaxOutput + { + public string ParameterName { get; } + public Type ParameterType { get; } + public bool IsMandatory { get; } + public int? Position { get; } + + public bool IncludeSpace { get; } + public bool IncludeDash { get; } + + public PropertySyntaxOutput(Parameter parameter) + { + ParameterName = parameter.ParameterName; + ParameterType = parameter.ParameterType; + IsMandatory = parameter.IsMandatory; + Position = parameter.Position; + IncludeSpace = true; + IncludeDash = true; + } + + public PropertySyntaxOutput(ComplexInterfaceInfo complexInterfaceInfo) + { + ParameterName = complexInterfaceInfo.Name; + ParameterType = complexInterfaceInfo.Type; + IsMandatory = complexInterfaceInfo.Required; + Position = null; + IncludeSpace = false; + IncludeDash = false; + } + + public override string ToString() + { + var leftOptional = !IsMandatory ? "[" : String.Empty; + var leftPositional = Position != null ? "[" : String.Empty; + var rightPositional = Position != null ? "]" : String.Empty; + var type = ParameterType != typeof(SwitchParameter) ? $" <{ParameterType.ToSyntaxTypeName()}>" : String.Empty; + var rightOptional = !IsMandatory ? "]" : String.Empty; + var space = IncludeSpace ? " " : String.Empty; + var dash = IncludeDash ? "-" : String.Empty; + return $"{space}{leftOptional}{leftPositional}{dash}{ParameterName}{rightPositional}{type}{rightOptional}"; + } + } + + internal static class PsProxyOutputExtensions + { + public const string NoParameters = "__NoParameters"; + + public const string AllParameterSets = "__AllParameterSets"; + + public const string HalfIndent = " "; + + public const string Indent = HalfIndent + HalfIndent; + + public const string ItemSeparator = ", "; + + public static readonly string ComplexParameterHeader = $"COMPLEX PARAMETER PROPERTIES{Environment.NewLine}{Environment.NewLine}To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.{Environment.NewLine}{Environment.NewLine}"; + + public static string ToPsBool(this bool value) => $"${value.ToString().ToLowerInvariant()}"; + + public static string ToPsType(this Type type) + { + var regex = new Regex(@"^(.*)`{1}\d+(.*)$"); + var typeText = type.ToString(); + var match = regex.Match(typeText); + return match.Success ? $"{match.Groups[1]}{match.Groups[2]}" : typeText; + } + + public static string ToPsAttributeType(this Type type) => type.ToPsType().RemoveEnd("Attribute"); + + // https://stackoverflow.com/a/5284606/294804 + private static string RemoveEnd(this string text, string suffix) => text.EndsWith(suffix) ? text.Substring(0, text.Length - suffix.Length) : text; + + public static string ToPsSingleLine(this string value, string replacer = " ") => value.ReplaceNewLines(replacer, new[] { "
", "\r\n", "\n" }); + + public static string ToPsStringLiteral(this string value) => value?.Replace("'", "''").Replace("‘", "''").Replace("’", "''").ToPsSingleLine().Trim() ?? String.Empty; + + public static string JoinIgnoreEmpty(this IEnumerable values, string separator) => String.Join(separator, values?.Where(v => !String.IsNullOrEmpty(v))); + + // https://stackoverflow.com/a/41961738/294804 + public static string ToSyntaxTypeName(this Type type) + { + if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>)) + { + return $"{type.GetGenericArguments().First().ToSyntaxTypeName()}?"; + } + + if (type.IsGenericType) + { + var genericTypes = String.Join(ItemSeparator, type.GetGenericArguments().Select(ToSyntaxTypeName)); + return $"{type.Name.Split('`').First()}<{genericTypes}>"; + } + + return type.Name; + } + + public static OutputTypeOutput ToOutputTypeOutput(this IEnumerable outputTypes) => new OutputTypeOutput(outputTypes); + + public static CmdletBindingOutput ToCmdletBindingOutput(this VariantGroup variantGroup) => new CmdletBindingOutput(variantGroup); + + public static ParameterOutput ToParameterOutput(this Parameter parameter, bool hasMultipleVariantsInVariantGroup, bool hasAllVariantsInParameterGroup) => new ParameterOutput(parameter, hasMultipleVariantsInVariantGroup, hasAllVariantsInParameterGroup); + + public static AliasOutput ToAliasOutput(this string[] aliases, bool includeIndent = false) => new AliasOutput(aliases, includeIndent); + + public static ValidateNotNullOutput ToValidateNotNullOutput(this bool hasValidateNotNull) => new ValidateNotNullOutput(hasValidateNotNull); + + public static AllowEmptyArrayOutput ToAllowEmptyArray(this bool hasAllowEmptyArray) => new AllowEmptyArrayOutput(hasAllowEmptyArray); + + public static ArgumentCompleterOutput ToArgumentCompleterOutput(this CompleterInfo completerInfo) => (completerInfo is PSArgumentCompleterInfo psArgumentCompleterInfo) ? psArgumentCompleterInfo.ToArgumentCompleterOutput() : new ArgumentCompleterOutput(completerInfo); + + public static PSArgumentCompleterOutput ToArgumentCompleterOutput(this PSArgumentCompleterInfo completerInfo) => new PSArgumentCompleterOutput(completerInfo); + + public static DefaultInfoOutput ToDefaultInfoOutput(this ParameterGroup parameterGroup) => new DefaultInfoOutput(parameterGroup); + + public static ParameterTypeOutput ToParameterTypeOutput(this Type parameterType) => new ParameterTypeOutput(parameterType); + + public static ParameterNameOutput ToParameterNameOutput(this string parameterName, bool isLast) => new ParameterNameOutput(parameterName, isLast); + + public static BeginOutput ToBeginOutput(this VariantGroup variantGroup) => new BeginOutput(variantGroup); + + public static ProcessOutput ToProcessOutput(this VariantGroup variantGroup) => new ProcessOutput(variantGroup); + + public static EndOutput ToEndOutput(this VariantGroup variantGroup) => new EndOutput(variantGroup); + + public static HelpCommentOutput ToHelpCommentOutput(this VariantGroup variantGroup) => new HelpCommentOutput(variantGroup); + + public static ParameterDescriptionOutput ToParameterDescriptionOutput(this string description) => new ParameterDescriptionOutput(description); + + public static ProfileOutput ToProfileOutput(this string profileName) => new ProfileOutput(profileName); + + public static DescriptionOutput ToDescriptionOutput(this string description) => new DescriptionOutput(description); + + public static ParameterCategoryOutput ToParameterCategoryOutput(this ParameterCategory category) => new ParameterCategoryOutput(category); + + public static PropertySyntaxOutput ToPropertySyntaxOutput(this Parameter parameter) => new PropertySyntaxOutput(parameter); + + public static PropertySyntaxOutput ToPropertySyntaxOutput(this ComplexInterfaceInfo complexInterfaceInfo) => new PropertySyntaxOutput(complexInterfaceInfo); + + public static InfoOutput ToInfoOutput(this InfoAttribute info, Type parameterType) => new InfoOutput(info, parameterType); + + public static string ToNoteOutput(this ComplexInterfaceInfo complexInterfaceInfo, string currentIndent = "", bool includeDashes = false, bool includeBackticks = false, bool isFirst = true) + { + string RenderProperty(ComplexInterfaceInfo info, string indent, bool dash, bool backtick) => + $"{indent}{(dash ? "- " : String.Empty)}{(backtick ? "`" : String.Empty)}{info.ToPropertySyntaxOutput()}{(backtick ? "`" : String.Empty)}: {info.Description}"; + + var nested = complexInterfaceInfo.NestedInfos.Select(ni => + { + var nestedIndent = $"{currentIndent}{HalfIndent}"; + return ni.IsComplexInterface + ? ni.ToNoteOutput(nestedIndent, includeDashes, includeBackticks, false) + : RenderProperty(ni, nestedIndent, includeDashes, includeBackticks); + }).Prepend(RenderProperty(complexInterfaceInfo, currentIndent, !isFirst && includeDashes, includeBackticks)); + return String.Join(Environment.NewLine, nested); + } + } +} diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs new file mode 100644 index 000000000000..f6e6b244492a --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs @@ -0,0 +1,544 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Reflection; +using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell.PsProxyOutputExtensions; +using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell.PsProxyTypeExtensions; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell +{ + internal class ProfileGroup + { + public string ProfileName { get; } + public Variant[] Variants { get; } + public string ProfileFolder { get; } + + public ProfileGroup(Variant[] variants, string profileName = NoProfiles) + { + ProfileName = profileName; + Variants = variants; + ProfileFolder = ProfileName != NoProfiles ? ProfileName : String.Empty; + } + } + + internal class VariantGroup + { + public string ModuleName { get; } + + public string RootModuleName { get => @""; } + public string CmdletName { get; } + public string CmdletVerb { get; } + public string CmdletNoun { get; } + public string ProfileName { get; } + public Variant[] Variants { get; } + public ParameterGroup[] ParameterGroups { get; } + public ComplexInterfaceInfo[] ComplexInterfaceInfos { get; } + + public string[] Aliases { get; } + public PSTypeName[] OutputTypes { get; } + public bool SupportsShouldProcess { get; } + public bool SupportsPaging { get; } + public string DefaultParameterSetName { get; } + public bool HasMultipleVariants { get; } + public PsHelpInfo HelpInfo { get; } + public bool IsGenerated { get; } + public bool IsInternal { get; } + public string OutputFolder { get; } + public string FileName { get; } + public string FilePath { get; } + + public CommentInfo CommentInfo { get; } + + public VariantGroup(string moduleName, string cmdletName, Variant[] variants, string outputFolder, string profileName = NoProfiles, bool isTest = false, bool isInternal = false) + { + ModuleName = moduleName; + CmdletName = cmdletName; + var cmdletNameParts = CmdletName.Split('-'); + CmdletVerb = cmdletNameParts.First(); + CmdletNoun = cmdletNameParts.Last(); + ProfileName = profileName; + Variants = variants; + ParameterGroups = Variants.ToParameterGroups().OrderBy(pg => pg.OrderCategory).ThenByDescending(pg => pg.IsMandatory).ToArray(); + var aliasDuplicates = ParameterGroups.SelectMany(pg => pg.Aliases) + //https://stackoverflow.com/a/18547390/294804 + .GroupBy(a => a).Where(g => g.Count() > 1).Select(g => g.Key).ToArray(); + if (aliasDuplicates.Any()) + { + throw new ParsingMetadataException($"The alias(es) [{String.Join(", ", aliasDuplicates)}] are defined on multiple parameters for cmdlet '{CmdletName}', which is not supported."); + } + ComplexInterfaceInfos = ParameterGroups.Where(pg => !pg.DontShow && pg.IsComplexInterface).OrderBy(pg => pg.ParameterName).Select(pg => pg.ComplexInterfaceInfo).ToArray(); + + Aliases = Variants.SelectMany(v => v.Attributes).ToAliasNames().ToArray(); + OutputTypes = Variants.SelectMany(v => v.Info.OutputType).Where(ot => ot.Type != null).GroupBy(ot => ot.Type).Select(otg => otg.First()).ToArray(); + SupportsShouldProcess = Variants.Any(v => v.SupportsShouldProcess); + SupportsPaging = Variants.Any(v => v.SupportsPaging); + DefaultParameterSetName = DetermineDefaultParameterSetName(); + HasMultipleVariants = Variants.Length > 1; + HelpInfo = Variants.Select(v => v.HelpInfo).FirstOrDefault() ?? new PsHelpInfo(); + IsGenerated = Variants.All(v => v.Attributes.OfType().Any()); + IsInternal = isInternal; + OutputFolder = outputFolder; + FileName = $"{CmdletName}{(isTest ? ".Tests" : String.Empty)}.ps1"; + FilePath = Path.Combine(OutputFolder, FileName); + + CommentInfo = new CommentInfo(this); + } + + private string DetermineDefaultParameterSetName() + { + var defaultParameterSet = Variants + .Select(v => v.Metadata.DefaultParameterSetName) + .LastOrDefault(dpsn => dpsn.IsValidDefaultParameterSetName()); + + if (String.IsNullOrEmpty(defaultParameterSet)) + { + var variantParamCountGroups = Variants + .Where(v => !v.IsNotSuggestDefaultParameterSet) + .Select(v => ( + variant: v.VariantName, + paramCount: v.CmdletOnlyParameters.Count(p => p.IsMandatory), + isSimple: v.CmdletOnlyParameters.Where(p => p.IsMandatory).All(p => p.ParameterType.IsPsSimple()))) + .GroupBy(vpc => vpc.isSimple) + .ToArray(); + if (variantParamCountGroups.Length == 0) + { + variantParamCountGroups = Variants + .Select(v => ( + variant: v.VariantName, + paramCount: v.CmdletOnlyParameters.Count(p => p.IsMandatory), + isSimple: v.CmdletOnlyParameters.Where(p => p.IsMandatory).All(p => p.ParameterType.IsPsSimple()))) + .GroupBy(vpc => vpc.isSimple) + .ToArray(); + } + var variantParameterCounts = (variantParamCountGroups.Any(g => g.Key) ? variantParamCountGroups.Where(g => g.Key) : variantParamCountGroups).SelectMany(g => g).ToArray(); + var smallestParameterCount = variantParameterCounts.Min(vpc => vpc.paramCount); + defaultParameterSet = variantParameterCounts.First(vpc => vpc.paramCount == smallestParameterCount).variant; + } + + return defaultParameterSet; + } + } + + internal class Variant + { + public string CmdletName { get; } + public string VariantName { get; } + public CommandInfo Info { get; } + public CommandMetadata Metadata { get; } + public PsHelpInfo HelpInfo { get; } + public bool HasParameterSets { get; } + public bool IsFunction { get; } + public string PrivateModuleName { get; } + public string PrivateCmdletName { get; } + public bool SupportsShouldProcess { get; } + public bool SupportsPaging { get; } + + public Attribute[] Attributes { get; } + public Parameter[] Parameters { get; } + public Parameter[] CmdletOnlyParameters { get; } + public bool IsInternal { get; } + public bool IsDoNotExport { get; } + public bool IsNotSuggestDefaultParameterSet { get; } + public string[] Profiles { get; } + + public Variant(string cmdletName, string variantName, CommandInfo info, CommandMetadata metadata, bool hasParameterSets = false, PsHelpInfo helpInfo = null) + { + CmdletName = cmdletName; + VariantName = variantName; + Info = info; + HelpInfo = helpInfo ?? new PsHelpInfo(); + Metadata = metadata; + HasParameterSets = hasParameterSets; + IsFunction = Info.CommandType == CommandTypes.Function; + PrivateModuleName = Info.Source; + PrivateCmdletName = Metadata.Name; + SupportsShouldProcess = Metadata.SupportsShouldProcess; + SupportsPaging = Metadata.SupportsPaging; + + Attributes = this.ToAttributes(); + Parameters = this.ToParameters().OrderBy(p => p.OrderCategory).ThenByDescending(p => p.IsMandatory).ToArray(); + IsInternal = Attributes.OfType().Any(); + IsDoNotExport = Attributes.OfType().Any(); + IsNotSuggestDefaultParameterSet = Attributes.OfType().Any(); + CmdletOnlyParameters = Parameters.Where(p => !p.Categories.Any(c => c == ParameterCategory.Azure || c == ParameterCategory.Runtime)).ToArray(); + Profiles = Attributes.OfType().SelectMany(pa => pa.Profiles).ToArray(); + } + } + + internal class ParameterGroup + { + public string ParameterName { get; } + public Parameter[] Parameters { get; } + + public string[] VariantNames { get; } + public string[] AllVariantNames { get; } + public bool HasAllVariants { get; } + public Type ParameterType { get; } + public string Description { get; } + + public string[] Aliases { get; } + public bool HasValidateNotNull { get; } + public bool HasAllowEmptyArray { get; } + public CompleterInfo CompleterInfo { get; } + public DefaultInfo DefaultInfo { get; } + public bool HasDefaultInfo { get; } + public ParameterCategory OrderCategory { get; } + public bool DontShow { get; } + public bool IsMandatory { get; } + public bool SupportsWildcards { get; } + public bool IsComplexInterface { get; } + public ComplexInterfaceInfo ComplexInterfaceInfo { get; } + public InfoAttribute InfoAttribute { get; } + + public int? FirstPosition { get; } + public bool ValueFromPipeline { get; } + public bool ValueFromPipelineByPropertyName { get; } + public bool IsInputType { get; } + + public ParameterGroup(string parameterName, Parameter[] parameters, string[] allVariantNames) + { + ParameterName = parameterName; + Parameters = parameters; + + VariantNames = Parameters.Select(p => p.VariantName).ToArray(); + AllVariantNames = allVariantNames; + HasAllVariants = VariantNames.Any(vn => vn == AllParameterSets) || !AllVariantNames.Except(VariantNames).Any(); + var types = Parameters.Select(p => p.ParameterType).Distinct().ToArray(); + if (types.Length > 1) + { + throw new ParsingMetadataException($"The parameter '{ParameterName}' has multiple parameter types [{String.Join(", ", types.Select(t => t.Name))}] defined, which is not supported."); + } + ParameterType = types.First(); + Description = Parameters.Select(p => p.Description).FirstOrDefault(d => !String.IsNullOrEmpty(d)).EmptyIfNull(); + + Aliases = Parameters.SelectMany(p => p.Attributes).ToAliasNames().ToArray(); + HasValidateNotNull = Parameters.SelectMany(p => p.Attributes.OfType()).Any(); + HasAllowEmptyArray = Parameters.SelectMany(p => p.Attributes.OfType()).Any(); + CompleterInfo = Parameters.Select(p => p.CompleterInfoAttribute).FirstOrDefault()?.ToCompleterInfo() + ?? Parameters.Select(p => p.PSArgumentCompleterAttribute).FirstOrDefault()?.ToPSArgumentCompleterInfo() + ?? Parameters.Select(p => p.ArgumentCompleterAttribute).FirstOrDefault()?.ToCompleterInfo(); + DefaultInfo = Parameters.Select(p => p.DefaultInfoAttribute).FirstOrDefault()?.ToDefaultInfo(this) + ?? Parameters.Select(p => p.DefaultValueAttribute).FirstOrDefault(dv => dv != null)?.ToDefaultInfo(this); + HasDefaultInfo = DefaultInfo != null && !String.IsNullOrEmpty(DefaultInfo.Script); + // When DefaultInfo is present, force all parameters from this group to be optional. + if (HasDefaultInfo) + { + foreach (var parameter in Parameters) + { + parameter.IsMandatory = false; + } + } + OrderCategory = Parameters.Select(p => p.OrderCategory).Distinct().DefaultIfEmpty(ParameterCategory.Body).Min(); + DontShow = Parameters.All(p => p.DontShow); + IsMandatory = HasAllVariants && Parameters.Any(p => p.IsMandatory); + SupportsWildcards = Parameters.Any(p => p.SupportsWildcards); + IsComplexInterface = Parameters.Any(p => p.IsComplexInterface); + ComplexInterfaceInfo = Parameters.Where(p => p.IsComplexInterface).Select(p => p.ComplexInterfaceInfo).FirstOrDefault(); + InfoAttribute = Parameters.Select(p => p.InfoAttribute).First(); + + FirstPosition = Parameters.Select(p => p.Position).FirstOrDefault(p => p != null); + ValueFromPipeline = Parameters.Any(p => p.ValueFromPipeline); + ValueFromPipelineByPropertyName = Parameters.Any(p => p.ValueFromPipelineByPropertyName); + IsInputType = ValueFromPipeline || ValueFromPipelineByPropertyName; + } + } + + internal class Parameter + { + public string VariantName { get; } + public string ParameterName { get; } + public ParameterMetadata Metadata { get; } + public PsParameterHelpInfo HelpInfo { get; } + public Type ParameterType { get; } + public Attribute[] Attributes { get; } + public ParameterCategory[] Categories { get; } + public ParameterCategory OrderCategory { get; } + public PSDefaultValueAttribute DefaultValueAttribute { get; } + public DefaultInfoAttribute DefaultInfoAttribute { get; } + public ParameterAttribute ParameterAttribute { get; } + public bool SupportsWildcards { get; } + public CompleterInfoAttribute CompleterInfoAttribute { get; } + public ArgumentCompleterAttribute ArgumentCompleterAttribute { get; } + public PSArgumentCompleterAttribute PSArgumentCompleterAttribute { get; } + + public bool ValueFromPipeline { get; } + public bool ValueFromPipelineByPropertyName { get; } + public int? Position { get; } + public bool DontShow { get; } + public bool IsMandatory { get; set; } + + public InfoAttribute InfoAttribute { get; } + public ComplexInterfaceInfo ComplexInterfaceInfo { get; } + public bool IsComplexInterface { get; } + public string Description { get; } + + public Parameter(string variantName, string parameterName, ParameterMetadata metadata, PsParameterHelpInfo helpInfo = null) + { + VariantName = variantName; + ParameterName = parameterName; + Metadata = metadata; + HelpInfo = helpInfo ?? new PsParameterHelpInfo(); + + Attributes = Metadata.Attributes.ToArray(); + ParameterType = Attributes.OfType().FirstOrDefault()?.Type ?? Metadata.ParameterType; + Categories = Attributes.OfType().SelectMany(ca => ca.Categories).Distinct().ToArray(); + OrderCategory = Categories.DefaultIfEmpty(ParameterCategory.Body).Min(); + DefaultValueAttribute = Attributes.OfType().FirstOrDefault(); + DefaultInfoAttribute = Attributes.OfType().FirstOrDefault(); + ParameterAttribute = Attributes.OfType().FirstOrDefault(pa => pa.ParameterSetName == VariantName || pa.ParameterSetName == AllParameterSets); + if (ParameterAttribute == null) + { + throw new ParsingMetadataException($"The variant '{VariantName}' has multiple parameter sets defined, which is not supported."); + } + SupportsWildcards = Attributes.OfType().Any(); + CompleterInfoAttribute = Attributes.OfType().FirstOrDefault(); + PSArgumentCompleterAttribute = Attributes.OfType().FirstOrDefault(); + ArgumentCompleterAttribute = Attributes.OfType().FirstOrDefault(attr => !attr.GetType().Equals(typeof(PSArgumentCompleterAttribute))); + + ValueFromPipeline = ParameterAttribute.ValueFromPipeline; + ValueFromPipelineByPropertyName = ParameterAttribute.ValueFromPipelineByPropertyName; + Position = ParameterAttribute.Position == Int32.MinValue ? (int?)null : ParameterAttribute.Position; + DontShow = ParameterAttribute.DontShow; + IsMandatory = ParameterAttribute.Mandatory; + + var complexParameterName = ParameterName.ToUpperInvariant(); + var complexMessage = $"{Environment.NewLine}"; + var description = ParameterAttribute.HelpMessage.NullIfEmpty() ?? HelpInfo.Description.NullIfEmpty() ?? InfoAttribute?.Description.NullIfEmpty() ?? String.Empty; + // Remove the complex type message as it will be reinserted if this is a complex type + description = description.NormalizeNewLines(); + // Make an InfoAttribute for processing only if one isn't provided + InfoAttribute = Attributes.OfType().FirstOrDefault() ?? new InfoAttribute { PossibleTypes = new[] { ParameterType.Unwrap() }, Required = IsMandatory }; + // Set the description if the InfoAttribute does not have one since they are exported without a description + InfoAttribute.Description = String.IsNullOrEmpty(InfoAttribute.Description) ? description : InfoAttribute.Description; + ComplexInterfaceInfo = InfoAttribute.ToComplexInterfaceInfo(complexParameterName, ParameterType, true); + IsComplexInterface = ComplexInterfaceInfo.IsComplexInterface; + Description = $"{description}{(IsComplexInterface ? complexMessage : String.Empty)}"; + } + } + + internal class ComplexInterfaceInfo + { + public InfoAttribute InfoAttribute { get; } + + public string Name { get; } + public Type Type { get; } + public bool Required { get; } + public bool ReadOnly { get; } + public string Description { get; } + + public ComplexInterfaceInfo[] NestedInfos { get; } + public bool IsComplexInterface { get; } + + public ComplexInterfaceInfo(string name, Type type, InfoAttribute infoAttribute, bool? required, List seenTypes) + { + Name = name; + Type = type; + InfoAttribute = infoAttribute; + + Required = required ?? InfoAttribute.Required; + ReadOnly = InfoAttribute.ReadOnly; + Description = InfoAttribute.Description.ToPsSingleLine(); + + var unwrappedType = Type.Unwrap(); + var hasBeenSeen = seenTypes?.Contains(unwrappedType) ?? false; + (seenTypes ?? (seenTypes = new List())).Add(unwrappedType); + NestedInfos = hasBeenSeen ? new ComplexInterfaceInfo[] { } : + unwrappedType.GetInterfaces() + .Concat(InfoAttribute.PossibleTypes) + .SelectMany(pt => pt.GetProperties() + .SelectMany(pi => pi.GetCustomAttributes(true).OfType() + .Select(ia => ia.ToComplexInterfaceInfo(pi.Name, pi.PropertyType, seenTypes: seenTypes)))) + .Where(cii => !cii.ReadOnly).OrderByDescending(cii => cii.Required).ToArray(); + // https://stackoverflow.com/a/503359/294804 + var associativeArrayInnerType = Type.GetInterfaces() + .FirstOrDefault(i => i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IAssociativeArray<>)) + ?.GetTypeInfo().GetGenericArguments().First(); + if (!hasBeenSeen && associativeArrayInnerType != null) + { + var anyInfo = new InfoAttribute { Description = "This indicates any property can be added to this object." }; + NestedInfos = NestedInfos.Prepend(anyInfo.ToComplexInterfaceInfo("(Any)", associativeArrayInnerType)).ToArray(); + } + IsComplexInterface = NestedInfos.Any(); + } + } + + internal class CommentInfo + { + public string Description { get; } + public string Synopsis { get; } + + public string[] Examples { get; } + public string[] Inputs { get; } + public string[] Outputs { get; } + + public string OnlineVersion { get; } + public string[] RelatedLinks { get; } + public string[] ExternalUrls { get; } + + private const string HelpLinkPrefix = @"https://learn.microsoft.com/powershell/module/"; + + public CommentInfo(VariantGroup variantGroup) + { + var helpInfo = variantGroup.HelpInfo; + Description = variantGroup.Variants.SelectMany(v => v.Attributes).OfType().FirstOrDefault()?.Description.NullIfEmpty() + ?? helpInfo.Description.EmptyIfNull(); + // If there is no Synopsis, PowerShell may put in the Syntax string as the Synopsis. This seems unintended, so we remove the Synopsis in this situation. + var synopsis = helpInfo.Synopsis.EmptyIfNull().Trim().StartsWith(variantGroup.CmdletName) ? String.Empty : helpInfo.Synopsis; + Synopsis = synopsis.NullIfEmpty() ?? Description; + + Examples = helpInfo.Examples.Select(rl => rl.Code).ToArray(); + + Inputs = (variantGroup.ParameterGroups.Where(pg => pg.IsInputType).Select(pg => pg.ParameterType.FullName).ToArray().NullIfEmpty() ?? + helpInfo.InputTypes.Where(it => it.Name.NullIfWhiteSpace() != null).Select(it => it.Name).ToArray()) + .Where(i => i != "None").Distinct().OrderBy(i => i).ToArray(); + Outputs = (variantGroup.OutputTypes.Select(ot => ot.Type.FullName).ToArray().NullIfEmpty() ?? + helpInfo.OutputTypes.Where(it => it.Name.NullIfWhiteSpace() != null).Select(ot => ot.Name).ToArray()) + .Where(o => o != "None").Distinct().OrderBy(o => o).ToArray(); + + // Use root module name in the help link + var moduleName = variantGroup.RootModuleName == "" ? variantGroup.ModuleName.ToLowerInvariant() : variantGroup.RootModuleName.ToLowerInvariant(); + OnlineVersion = helpInfo.OnlineVersion?.Uri.NullIfEmpty() ?? $@"{HelpLinkPrefix}{moduleName}/{variantGroup.CmdletName.ToLowerInvariant()}"; + RelatedLinks = helpInfo.RelatedLinks.Select(rl => rl.Text).ToArray(); + + // Get external urls from attribute + ExternalUrls = variantGroup.Variants.SelectMany(v => v.Attributes).OfType()?.Select(e => e.Url)?.Distinct()?.ToArray(); + } + } + + internal class CompleterInfo + { + public string Name { get; } + public string Description { get; } + public string Script { get; } + public Type Type { get; } + public bool IsTypeCompleter { get; } + + public CompleterInfo(CompleterInfoAttribute infoAttribute) + { + Name = infoAttribute.Name; + Description = infoAttribute.Description; + Script = infoAttribute.Script; + } + + public CompleterInfo(ArgumentCompleterAttribute completerAttribute) + { + Script = completerAttribute.ScriptBlock?.ToString(); + if (completerAttribute.Type != null) + { + Type = completerAttribute.Type; + IsTypeCompleter = true; + } + } + } + + internal class PSArgumentCompleterInfo : CompleterInfo + { + public string[] ResourceTypes { get; } + + public PSArgumentCompleterInfo(PSArgumentCompleterAttribute completerAttribute) : base(completerAttribute) + { + ResourceTypes = completerAttribute.ResourceTypes; + } + } + + internal class DefaultInfo + { + public string Name { get; } + public string Description { get; } + public string Script { get; } + public string SetCondition { get; } + public ParameterGroup ParameterGroup { get; } + + public DefaultInfo(DefaultInfoAttribute infoAttribute, ParameterGroup parameterGroup) + { + Name = infoAttribute.Name; + Description = infoAttribute.Description; + Script = infoAttribute.Script; + SetCondition = infoAttribute.SetCondition; + ParameterGroup = parameterGroup; + } + + public DefaultInfo(PSDefaultValueAttribute defaultValueAttribute, ParameterGroup parameterGroup) + { + Description = defaultValueAttribute.Help; + ParameterGroup = parameterGroup; + if (defaultValueAttribute.Value != null) + { + Script = defaultValueAttribute.Value.ToString(); + } + } + } + + internal static class PsProxyTypeExtensions + { + public const string NoProfiles = "__NoProfiles"; + + public static bool IsValidDefaultParameterSetName(this string parameterSetName) => + !String.IsNullOrEmpty(parameterSetName) && parameterSetName != AllParameterSets; + + public static Variant[] ToVariants(this CommandInfo info, PsHelpInfo helpInfo) + { + var metadata = new CommandMetadata(info); + var privateCmdletName = metadata.Name.Split('!').First(); + var parts = privateCmdletName.Split('_'); + return parts.Length > 1 + ? new[] { new Variant(parts[0], parts[1], info, metadata, helpInfo: helpInfo) } + // Process multiple parameter sets, so we declare a variant per parameter set. + : info.ParameterSets.Select(ps => new Variant(privateCmdletName, ps.Name, info, metadata, true, helpInfo)).ToArray(); + } + + public static Variant[] ToVariants(this CmdletAndHelpInfo info) => info.CommandInfo.ToVariants(info.HelpInfo); + + public static Variant[] ToVariants(this CommandInfo info, PSObject helpInfo = null) => info.ToVariants(helpInfo?.ToPsHelpInfo()); + + public static Parameter[] ToParameters(this Variant variant) + { + var parameters = variant.Metadata.Parameters.AsEnumerable(); + var parameterHelp = variant.HelpInfo.Parameters.AsEnumerable(); + + if (variant.HasParameterSets) + { + parameters = parameters.Where(p => p.Value.ParameterSets.Keys.Any(k => k == variant.VariantName || k == AllParameterSets)); + parameterHelp = parameterHelp.Where(ph => (!ph.ParameterSetNames.Any() || ph.ParameterSetNames.Any(psn => psn == variant.VariantName || psn == AllParameterSets)) && ph.Name != "IncludeTotalCount"); + } + var result = parameters.Select(p => new Parameter(variant.VariantName, p.Key, p.Value, parameterHelp.FirstOrDefault(ph => ph.Name == p.Key))); + if (variant.SupportsPaging) + { + // If supportsPaging is set, we will need to add First and Skip parameters since they are treated as common parameters which as not contained on Metadata>parameters + variant.Info.Parameters["First"].Attributes.OfType().FirstOrDefault(pa => pa.ParameterSetName == variant.VariantName || pa.ParameterSetName == AllParameterSets).HelpMessage = "Gets only the first 'n' objects."; + variant.Info.Parameters["Skip"].Attributes.OfType().FirstOrDefault(pa => pa.ParameterSetName == variant.VariantName || pa.ParameterSetName == AllParameterSets).HelpMessage = "Ignores the first 'n' objects and then gets the remaining objects."; + result = result.Append(new Parameter(variant.VariantName, "First", variant.Info.Parameters["First"], parameterHelp.FirstOrDefault(ph => ph.Name == "First"))); + result = result.Append(new Parameter(variant.VariantName, "Skip", variant.Info.Parameters["Skip"], parameterHelp.FirstOrDefault(ph => ph.Name == "Skip"))); + } + return result.ToArray(); + } + + public static Attribute[] ToAttributes(this Variant variant) => variant.IsFunction + ? ((FunctionInfo)variant.Info).ScriptBlock.Attributes.ToArray() + : variant.Metadata.CommandType.GetCustomAttributes(false).Cast().ToArray(); + + public static IEnumerable ToParameterGroups(this Variant[] variants) + { + var allVariantNames = variants.Select(vg => vg.VariantName).ToArray(); + return variants + .SelectMany(v => v.Parameters) + .GroupBy(p => p.ParameterName, StringComparer.InvariantCultureIgnoreCase) + .Select(pg => new ParameterGroup(pg.Key, pg.Select(p => p).ToArray(), allVariantNames)); + } + + public static ComplexInterfaceInfo ToComplexInterfaceInfo(this InfoAttribute infoAttribute, string name, Type type, bool? required = null, List seenTypes = null) + => new ComplexInterfaceInfo(name, type, infoAttribute, required, seenTypes); + + public static CompleterInfo ToCompleterInfo(this CompleterInfoAttribute infoAttribute) => new CompleterInfo(infoAttribute); + public static CompleterInfo ToCompleterInfo(this ArgumentCompleterAttribute completerAttribute) => new CompleterInfo(completerAttribute); + public static PSArgumentCompleterInfo ToPSArgumentCompleterInfo(this PSArgumentCompleterAttribute completerAttribute) => new PSArgumentCompleterInfo(completerAttribute); + public static DefaultInfo ToDefaultInfo(this DefaultInfoAttribute infoAttribute, ParameterGroup parameterGroup) => new DefaultInfo(infoAttribute, parameterGroup); + public static DefaultInfo ToDefaultInfo(this PSDefaultValueAttribute defaultValueAttribute, ParameterGroup parameterGroup) => new DefaultInfo(defaultValueAttribute, parameterGroup); + } +} diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/PsAttributes.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/PsAttributes.cs new file mode 100644 index 000000000000..95f7e87c064d --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/PsAttributes.cs @@ -0,0 +1,131 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones +{ + [AttributeUsage(AttributeTargets.Class)] + public class DescriptionAttribute : Attribute + { + public string Description { get; } + + public DescriptionAttribute(string description) + { + Description = description; + } + } + + [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property)] + public class DoNotExportAttribute : Attribute + { + } + + [AttributeUsage(AttributeTargets.Class)] + public class InternalExportAttribute : Attribute + { + } + + [AttributeUsage(AttributeTargets.Class)] + public class GeneratedAttribute : Attribute + { + } + + [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property)] + public class DoNotFormatAttribute : Attribute + { + } + + [AttributeUsage(AttributeTargets.Class)] + public class ProfileAttribute : Attribute + { + public string[] Profiles { get; } + + public ProfileAttribute(params string[] profiles) + { + Profiles = profiles; + } + } + + [AttributeUsage(AttributeTargets.Class)] + public class HttpPathAttribute : Attribute + { + public string Path { get; set; } + public string ApiVersion { get; set; } + } + + [AttributeUsage(AttributeTargets.Class)] + public class NotSuggestDefaultParameterSetAttribute : Attribute + { + } + + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] + public class CategoryAttribute : Attribute + { + public ParameterCategory[] Categories { get; } + + public CategoryAttribute(params ParameterCategory[] categories) + { + Categories = categories; + } + } + + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] + public class ExportAsAttribute : Attribute + { + public Type Type { get; set; } + + public ExportAsAttribute(Type type) + { + Type = type; + } + } + + public enum ParameterCategory + { + // Note: Order is significant + Uri = 0, + Path, + Query, + Header, + Cookie, + Body, + Azure, + Runtime + } + + [AttributeUsage(AttributeTargets.Property)] + public class OriginAttribute : Attribute + { + public PropertyOrigin Origin { get; } + + public OriginAttribute(PropertyOrigin origin) + { + Origin = origin; + } + } + + public enum PropertyOrigin + { + // Note: Order is significant + Inherited = 0, + Owned, + Inlined + } + + [AttributeUsage(AttributeTargets.Property)] + public class ConstantAttribute : Attribute + { + } + + [AttributeUsage(AttributeTargets.Property)] + public class FormatTableAttribute : Attribute + { + public int Index { get; set; } = -1; + public bool HasIndex => Index != -1; + public string Label { get; set; } + public int Width { get; set; } = -1; + public bool HasWidth => Width != -1; + } +} diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/PsExtensions.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/PsExtensions.cs new file mode 100644 index 000000000000..637d1341191d --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/PsExtensions.cs @@ -0,0 +1,176 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Reflection; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell +{ + internal static class PsExtensions + { + public static PSObject AddMultipleTypeNameIntoPSObject(this object obj, string multipleTag = "#Multiple") + { + var psObj = new PSObject(obj); + psObj.TypeNames.Insert(0, $"{psObj.TypeNames[0]}{multipleTag}"); + return psObj; + } + + // https://stackoverflow.com/a/863944/294804 + // https://stackoverflow.com/a/4452598/294804 + // https://stackoverflow.com/a/28701974/294804 + // Note: This will unwrap nested collections, but we don't generate nested collections. + public static Type Unwrap(this Type type) + { + if (type.IsArray) + { + return type.GetElementType().Unwrap(); + } + + var typeInfo = type.GetTypeInfo(); + if (typeInfo.IsGenericType + && (typeInfo.GetGenericTypeDefinition() == typeof(Nullable<>) || typeof(IEnumerable<>).IsAssignableFrom(type))) + { + return typeInfo.GetGenericArguments().First().Unwrap(); + } + + return type; + } + + // https://stackoverflow.com/a/863944/294804 + private static bool IsSimple(this Type type) + { + var typeInfo = type.GetTypeInfo(); + return typeInfo.IsPrimitive + || typeInfo.IsEnum + || type == typeof(string) + || type == typeof(decimal); + } + + // https://stackoverflow.com/a/32025393/294804 + private static bool HasImplicitConversion(this Type baseType, Type targetType) => + baseType.GetMethods(BindingFlags.Public | BindingFlags.Static) + .Where(mi => mi.Name == "op_Implicit" && mi.ReturnType == targetType) + .Any(mi => mi.GetParameters().FirstOrDefault()?.ParameterType == baseType); + + public static bool IsPsSimple(this Type type) + { + var unwrappedType = type.Unwrap(); + return unwrappedType.IsSimple() + || unwrappedType == typeof(SwitchParameter) + || unwrappedType == typeof(Hashtable) + || unwrappedType == typeof(PSCredential) + || unwrappedType == typeof(ScriptBlock) + || unwrappedType == typeof(DateTime) + || unwrappedType == typeof(Uri) + || unwrappedType.HasImplicitConversion(typeof(string)); + } + + public static string ToPsList(this IEnumerable items) => String.Join(", ", items.Select(i => $"'{i}'")); + + public static IEnumerable ToAliasNames(this IEnumerable attributes) => attributes.OfType().SelectMany(aa => aa.AliasNames).Distinct(); + + public static bool IsArrayAndElementTypeIsT(this object item) + { + var itemType = item.GetType(); + var tType = typeof(T); + return itemType.IsArray && !tType.IsArray && tType.IsAssignableFrom(itemType.GetElementType()); + } + + public static bool IsTArrayAndElementTypeIsItem(this object item) + { + var itemType = item.GetType(); + var tType = typeof(T); + return !itemType.IsArray && tType.IsArray && (tType.GetElementType()?.IsAssignableFrom(itemType) ?? false); + } + + public static bool IsTypeOrArrayOfType(this object item) => item is T || item.IsArrayAndElementTypeIsT() || item.IsTArrayAndElementTypeIsItem(); + + public static T NormalizeArrayType(this object item) + { + if (item is T result) + { + return result; + } + + if (item.IsArrayAndElementTypeIsT()) + { + var array = (T[])Convert.ChangeType(item, typeof(T[])); + return array.FirstOrDefault(); + } + + if (item.IsTArrayAndElementTypeIsItem()) + { + var tType = typeof(T); + var array = Array.CreateInstance(tType.GetElementType(), 1); + array.SetValue(item, 0); + return (T)Convert.ChangeType(array, tType); + } + + return default(T); + } + + public static T GetNestedProperty(this PSObject psObject, params string[] names) => psObject.Properties.GetNestedProperty(names); + + public static T GetNestedProperty(this PSMemberInfoCollection properties, params string[] names) + { + var lastName = names.Last(); + var nestedProperties = names.Take(names.Length - 1).Aggregate(properties, (p, n) => p?.GetProperty(n)?.Properties); + return nestedProperties != null ? nestedProperties.GetProperty(lastName) : default(T); + } + + public static T GetProperty(this PSObject psObject, string name) => psObject.Properties.GetProperty(name); + + public static T GetProperty(this PSMemberInfoCollection properties, string name) + { + switch (properties[name]?.Value) + { + case PSObject psObject when psObject.BaseObject is PSCustomObject && psObject.ImmediateBaseObject.IsTypeOrArrayOfType(): + return psObject.ImmediateBaseObject.NormalizeArrayType(); + case PSObject psObject when psObject.BaseObject.IsTypeOrArrayOfType(): + return psObject.BaseObject.NormalizeArrayType(); + case object value when value.IsTypeOrArrayOfType(): + return value.NormalizeArrayType(); + default: + return default(T); + } + } + + public static IEnumerable RunScript(this PSCmdlet cmdlet, string script) + => PsHelpers.RunScript(cmdlet.InvokeCommand, script); + + public static void RunScript(this PSCmdlet cmdlet, string script) + => cmdlet.RunScript(script); + + public static IEnumerable RunScript(this EngineIntrinsics engineIntrinsics, string script) + => PsHelpers.RunScript(engineIntrinsics.InvokeCommand, script); + + public static void RunScript(this EngineIntrinsics engineIntrinsics, string script) + => engineIntrinsics.RunScript(script); + + public static IEnumerable RunScript(this PSCmdlet cmdlet, ScriptBlock block) + => PsHelpers.RunScript(cmdlet.InvokeCommand, block.ToString()); + + public static void RunScript(this PSCmdlet cmdlet, ScriptBlock block) + => cmdlet.RunScript(block.ToString()); + + public static IEnumerable RunScript(this EngineIntrinsics engineIntrinsics, ScriptBlock block) + => PsHelpers.RunScript(engineIntrinsics.InvokeCommand, block.ToString()); + + public static void RunScript(this EngineIntrinsics engineIntrinsics, ScriptBlock block) + => engineIntrinsics.RunScript(block.ToString()); + + /// + /// Returns if a parameter should be hidden by checking for . + /// + /// A PowerShell parameter. + public static bool IsHidden(this Parameter parameter) + { + return parameter.Attributes.Any(attr => attr is DoNotExportAttribute); + } + } +} diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/PsHelpers.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/PsHelpers.cs new file mode 100644 index 000000000000..43ac152b3841 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/PsHelpers.cs @@ -0,0 +1,105 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Management.Automation; +using Pwsh = System.Management.Automation.PowerShell; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell +{ + internal static class PsHelpers + { + public static IEnumerable RunScript(string script) + => Pwsh.Create().AddScript(script).Invoke(); + + public static void RunScript(string script) + => RunScript(script); + + public static IEnumerable RunScript(CommandInvocationIntrinsics cii, string script) + => cii.InvokeScript(script).Select(o => o?.BaseObject).Where(o => o != null).OfType(); + + public static void RunScript(CommandInvocationIntrinsics cii, string script) + => RunScript(cii, script); + + public static IEnumerable GetModuleCmdlets(PSCmdlet cmdlet, params string[] modulePaths) + { + var getCmdletsCommand = String.Join(" + ", modulePaths.Select(mp => $"(Get-Command -Module (Import-Module '{mp}' -PassThru))")); + return (cmdlet?.RunScript(getCmdletsCommand) ?? RunScript(getCmdletsCommand)) + .Where(ci => ci.CommandType != CommandTypes.Alias); + } + + public static IEnumerable GetModuleCmdlets(params string[] modulePaths) + => GetModuleCmdlets(null, modulePaths); + + public static IEnumerable GetScriptCmdlets(PSCmdlet cmdlet, string scriptFolder) + { + // https://stackoverflow.com/a/40969712/294804 + var wrappedFolder = scriptFolder.Contains("'") ? $@"""{scriptFolder}""" : $@"'{scriptFolder}'"; + var getCmdletsCommand = $@" +$currentFunctions = Get-ChildItem function: +Get-ChildItem -Path {wrappedFolder} -Recurse -Include '*.ps1' -File | ForEach-Object {{ . $_.FullName }} +Get-ChildItem function: | Where-Object {{ ($currentFunctions -notcontains $_) -and $_.CmdletBinding }} +"; + return cmdlet?.RunScript(getCmdletsCommand) ?? RunScript(getCmdletsCommand); + } + + public static IEnumerable GetScriptCmdlets(string scriptFolder) + => GetScriptCmdlets(null, scriptFolder); + + public static IEnumerable GetScriptHelpInfo(PSCmdlet cmdlet, params string[] modulePaths) + { + var importModules = String.Join(Environment.NewLine, modulePaths.Select(mp => $"Import-Module '{mp}'")); + var getHelpCommand = $@" +$currentFunctions = Get-ChildItem function: +{importModules} +Get-ChildItem function: | Where-Object {{ ($currentFunctions -notcontains $_) -and $_.CmdletBinding }} | ForEach-Object {{ Get-Help -Name $_.Name -Full }} +"; + return cmdlet?.RunScript(getHelpCommand) ?? RunScript(getHelpCommand); + } + + public static IEnumerable GetScriptHelpInfo(params string[] modulePaths) + => GetScriptHelpInfo(null, modulePaths); + + public static IEnumerable GetModuleCmdletsAndHelpInfo(PSCmdlet cmdlet, params string[] modulePaths) + { + var getCmdletAndHelp = String.Join(" + ", modulePaths.Select(mp => + $@"(Get-Command -Module (Import-Module '{mp}' -PassThru) | Where-Object {{ $_.CommandType -ne 'Alias' }} | ForEach-Object {{ @{{ CommandInfo = $_; HelpInfo = ( invoke-command {{ try {{ Get-Help -Name $_.Name -Full }} catch{{ '' }} }} ) }} }})" + )); + return (cmdlet?.RunScript(getCmdletAndHelp) ?? RunScript(getCmdletAndHelp)) + .Select(h => new CmdletAndHelpInfo { CommandInfo = (h["CommandInfo"] as PSObject)?.BaseObject as CommandInfo, HelpInfo = h["HelpInfo"] as PSObject }); + } + + public static IEnumerable GetModuleCmdletsAndHelpInfo(params string[] modulePaths) + => GetModuleCmdletsAndHelpInfo(null, modulePaths); + + public static CmdletAndHelpInfo ToCmdletAndHelpInfo(this CommandInfo commandInfo, PSObject helpInfo) => new CmdletAndHelpInfo { CommandInfo = commandInfo, HelpInfo = helpInfo }; + + public const string Psd1Indent = " "; + public const string GuidStart = Psd1Indent + "GUID"; + + public static Guid ReadGuidFromPsd1(string psd1Path) + { + var guid = Guid.NewGuid(); + if (File.Exists(psd1Path)) + { + var currentGuid = File.ReadAllLines(psd1Path) + .FirstOrDefault(l => l.TrimStart().StartsWith(GuidStart.TrimStart()))?.Split(new[] { " = " }, StringSplitOptions.RemoveEmptyEntries) + .LastOrDefault()?.Replace("'", String.Empty); + guid = currentGuid != null ? Guid.Parse(currentGuid) : guid; + } + + return guid; + } + } + + internal class CmdletAndHelpInfo + { + public CommandInfo CommandInfo { get; set; } + public PSObject HelpInfo { get; set; } + } +} diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/StringExtensions.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/StringExtensions.cs new file mode 100644 index 000000000000..8f9d6145291c --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/StringExtensions.cs @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Linq; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell +{ + internal static class StringExtensions + { + public static string NullIfEmpty(this string text) => String.IsNullOrEmpty(text) ? null : text; + public static string NullIfWhiteSpace(this string text) => String.IsNullOrWhiteSpace(text) ? null : text; + public static string EmptyIfNull(this string text) => text ?? String.Empty; + + public static bool? ToNullableBool(this string text) => String.IsNullOrEmpty(text) ? (bool?)null : Convert.ToBoolean(text.ToLowerInvariant()); + + public static string ToUpperFirstCharacter(this string text) => String.IsNullOrEmpty(text) ? text : $"{text[0].ToString().ToUpperInvariant()}{text.Remove(0, 1)}"; + + public static string ReplaceNewLines(this string value, string replacer = " ", string[] newLineSymbols = null) + => (newLineSymbols ?? new []{ "\r\n", "\n" }).Aggregate(value.EmptyIfNull(), (current, symbol) => current.Replace(symbol, replacer)); + public static string NormalizeNewLines(this string value) => value.ReplaceNewLines("\u00A0").Replace("\u00A0", Environment.NewLine); + } +} diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/XmlExtensions.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/XmlExtensions.cs new file mode 100644 index 000000000000..902132fba29e --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/BuildTime/XmlExtensions.cs @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System.IO; +using System.Xml; +using System.Xml.Serialization; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell +{ + internal static class XmlExtensions + { + public static string ToXmlString(this T inputObject, bool excludeDeclaration = false) + { + var serializer = new XmlSerializer(typeof(T)); + //https://stackoverflow.com/a/760290/294804 + //https://stackoverflow.com/a/3732234/294804 + var namespaces = new XmlSerializerNamespaces(new[] { XmlQualifiedName.Empty }); + var xmlSettings = new XmlWriterSettings { OmitXmlDeclaration = excludeDeclaration, Indent = true }; + using (var stringWriter = new StringWriter()) + using (var xmlWriter = XmlWriter.Create(stringWriter, xmlSettings)) + { + serializer.Serialize(xmlWriter, inputObject, namespaces); + return stringWriter.ToString(); + } + } + } +} diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/CmdInfoHandler.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/CmdInfoHandler.cs new file mode 100644 index 000000000000..757a11da40d9 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/CmdInfoHandler.cs @@ -0,0 +1,40 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Management.Automation; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime +{ + using NextDelegate = Func, Task>, Task>; + using SignalDelegate = Func, Task>; + + public class CmdInfoHandler + { + private readonly string processRecordId; + private readonly string parameterSetName; + private readonly InvocationInfo invocationInfo; + + public CmdInfoHandler(string processRecordId, InvocationInfo invocationInfo, string parameterSetName) + { + this.processRecordId = processRecordId; + this.parameterSetName = parameterSetName; + this.invocationInfo = invocationInfo; + } + + public Task SendAsync(HttpRequestMessage request, CancellationToken token, Action cancel, SignalDelegate signal, NextDelegate next) + { + request.Headers.Add("x-ms-client-request-id", processRecordId); + request.Headers.Add("CommandName", invocationInfo?.InvocationName); + request.Headers.Add("FullCommandName", invocationInfo?.MyCommand?.Name); + request.Headers.Add("ParameterSetName", parameterSetName); + + // continue with pipeline. + return next(request, token, cancel, signal); + } + } +} diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Context.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Context.cs new file mode 100644 index 000000000000..cdafe96b410d --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Context.cs @@ -0,0 +1,33 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime +{ + + using System; + using System.Linq; + using System.Collections; + using System.Collections.Generic; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + using GetEventData = System.Func; + using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Extensions; + + /// + /// The IContext Interface defines the communication mechanism for input customization. + /// + /// + /// In the context, we will have client, pipeline, PSBoundParamters, default EventListener, Cancellation. + /// + public interface IContext + { + System.Management.Automation.InvocationInfo InvocationInformation { get; set; } + System.Threading.CancellationTokenSource CancellationTokenSource { get; set; } + System.Collections.Generic.IDictionary ExtensibleParameters { get; } + HttpPipeline Pipeline { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.EdgeZones Client { get; } + } +} diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/ConversionException.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/ConversionException.cs new file mode 100644 index 000000000000..4517c1d645f0 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/ConversionException.cs @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + internal class ConversionException : Exception + { + internal ConversionException(string message) + : base(message) { } + + internal ConversionException(JsonNode node, Type targetType) + : base($"Cannot convert '{node.Type}' to a {targetType.Name}") { } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/IJsonConverter.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/IJsonConverter.cs new file mode 100644 index 000000000000..079d13bfde4d --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/IJsonConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + internal interface IJsonConverter + { + JsonNode ToJson(object value); + + object FromJson(JsonNode node); + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/BinaryConverter.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/BinaryConverter.cs new file mode 100644 index 000000000000..b4c68eedc7ae --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/BinaryConverter.cs @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + public sealed class BinaryConverter : JsonConverter + { + internal override JsonNode ToJson(byte[] value) => new XBinary(value); + + internal override byte[] FromJson(JsonNode node) + { + switch (node.Type) + { + case JsonType.String : return Convert.FromBase64String(node.ToString()); // Base64 Encoded + case JsonType.Binary : return ((XBinary)node).Value; + } + + throw new ConversionException(node, typeof(byte[])); + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/BooleanConverter.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/BooleanConverter.cs new file mode 100644 index 000000000000..a7ba2eadd671 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/BooleanConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + public sealed class BooleanConverter : JsonConverter + { + internal override JsonNode ToJson(bool value) => new JsonBoolean(value); + + internal override bool FromJson(JsonNode node) => (bool)node; + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/DateTimeConverter.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/DateTimeConverter.cs new file mode 100644 index 000000000000..5802055a0427 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/DateTimeConverter.cs @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + public sealed class DateTimeConverter : JsonConverter + { + internal override JsonNode ToJson(DateTime value) + { + return new JsonDate(value); + } + + internal override DateTime FromJson(JsonNode node) => (DateTime)node; + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/DateTimeOffsetConverter.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/DateTimeOffsetConverter.cs new file mode 100644 index 000000000000..b6bddeca9965 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/DateTimeOffsetConverter.cs @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + public sealed class DateTimeOffsetConverter : JsonConverter + { + internal override JsonNode ToJson(DateTimeOffset value) => new JsonDate(value); + + internal override DateTimeOffset FromJson(JsonNode node) => (DateTimeOffset)node; + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/DecimalConverter.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/DecimalConverter.cs new file mode 100644 index 000000000000..142e1760fe69 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/DecimalConverter.cs @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + public sealed class DecimalConverter : JsonConverter + { + internal override JsonNode ToJson(decimal value) => new JsonNumber(value.ToString()); + + internal override decimal FromJson(JsonNode node) + { + return (decimal)node; + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/DoubleConverter.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/DoubleConverter.cs new file mode 100644 index 000000000000..9664661a50a4 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/DoubleConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + public sealed class DoubleConverter : JsonConverter + { + internal override JsonNode ToJson(double value) => new JsonNumber(value); + + internal override double FromJson(JsonNode node) => (double)node; + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/EnumConverter.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/EnumConverter.cs new file mode 100644 index 000000000000..5d3faafcc71e --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/EnumConverter.cs @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + public sealed class EnumConverter : IJsonConverter + { + private readonly Type type; + + internal EnumConverter(Type type) + { + this.type = type ?? throw new ArgumentNullException(nameof(type)); + } + + public JsonNode ToJson(object value) => new JsonString(value.ToString()); + + public object FromJson(JsonNode node) + { + if (node.Type == JsonType.Number) + { + return Enum.ToObject(type, (int)node); + } + + return Enum.Parse(type, node.ToString(), ignoreCase: true); + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/GuidConverter.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/GuidConverter.cs new file mode 100644 index 000000000000..fdd389de7097 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/GuidConverter.cs @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + public sealed class GuidConverter : JsonConverter + { + internal override JsonNode ToJson(Guid value) => new JsonString(value.ToString()); + + internal override Guid FromJson(JsonNode node) => (Guid)node; + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/HashSet'1Converter.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/HashSet'1Converter.cs new file mode 100644 index 000000000000..98f50f73d5fa --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/HashSet'1Converter.cs @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System.Collections.Generic; +using System.Linq; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + public sealed class HashSetConverter : JsonConverter> + { + internal override JsonNode ToJson(HashSet value) + { + return new XSet(value); + } + + internal override HashSet FromJson(JsonNode node) + { + var collection = node as ICollection; + + if (collection.Count == 0) return null; + + // TODO: Remove Linq depedency + return new HashSet(collection.Cast()); + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/Int16Converter.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/Int16Converter.cs new file mode 100644 index 000000000000..8a3911c2ef0c --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/Int16Converter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + public sealed class Int16Converter : JsonConverter + { + internal override JsonNode ToJson(short value) => new JsonNumber(value); + + internal override short FromJson(JsonNode node) => (short)node; + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/Int32Converter.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/Int32Converter.cs new file mode 100644 index 000000000000..f23b29e405b9 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/Int32Converter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + public sealed class Int32Converter : JsonConverter + { + internal override JsonNode ToJson(int value) => new JsonNumber(value); + + internal override int FromJson(JsonNode node) => (int)node; + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/Int64Converter.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/Int64Converter.cs new file mode 100644 index 000000000000..a44ef4eb1bba --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/Int64Converter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + public sealed class Int64Converter : JsonConverter + { + internal override JsonNode ToJson(long value) => new JsonNumber(value); + + internal override long FromJson(JsonNode node) => (long)node; + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/JsonArrayConverter.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/JsonArrayConverter.cs new file mode 100644 index 000000000000..eef9a8f009cf --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/JsonArrayConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + public sealed class JsonArrayConverter : JsonConverter + { + internal override JsonNode ToJson(JsonArray value) => value; + + internal override JsonArray FromJson(JsonNode node) => (JsonArray)node; + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/JsonObjectConverter.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/JsonObjectConverter.cs new file mode 100644 index 000000000000..77999c649cee --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/JsonObjectConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + public sealed class JsonObjectConverter : JsonConverter + { + internal override JsonNode ToJson(JsonObject value) => value; + + internal override JsonObject FromJson(JsonNode node) => (JsonObject)node; + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/SingleConverter.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/SingleConverter.cs new file mode 100644 index 000000000000..8c9761f75c0c --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/SingleConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + public sealed class SingleConverter : JsonConverter + { + internal override JsonNode ToJson(float value) => new JsonNumber(value.ToString()); + + internal override float FromJson(JsonNode node) => (float)node; + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/StringConverter.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/StringConverter.cs new file mode 100644 index 000000000000..60bc6aef5ce9 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/StringConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + public sealed class StringConverter : JsonConverter + { + internal override JsonNode ToJson(string value) => new JsonString(value); + + internal override string FromJson(JsonNode node) => node.ToString(); + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/TimeSpanConverter.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/TimeSpanConverter.cs new file mode 100644 index 000000000000..1dd2cf7c37da --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/TimeSpanConverter.cs @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + public sealed class TimeSpanConverter : JsonConverter + { + internal override JsonNode ToJson(TimeSpan value) => new JsonString(value.ToString()); + + internal override TimeSpan FromJson(JsonNode node) => (TimeSpan)node; + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/UInt16Converter.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/UInt16Converter.cs new file mode 100644 index 000000000000..2d8fa5bca183 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/UInt16Converter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + public sealed class UInt16Converter : JsonConverter + { + internal override JsonNode ToJson(ushort value) => new JsonNumber(value); + + internal override ushort FromJson(JsonNode node) => (ushort)node; + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/UInt32Converter.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/UInt32Converter.cs new file mode 100644 index 000000000000..5266077444d9 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/UInt32Converter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + public sealed class UInt32Converter : JsonConverter + { + internal override JsonNode ToJson(uint value) => new JsonNumber(value); + + internal override uint FromJson(JsonNode node) => (uint)node; + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/UInt64Converter.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/UInt64Converter.cs new file mode 100644 index 000000000000..70b7a3acd1d9 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/UInt64Converter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + public sealed class UInt64Converter : JsonConverter + { + internal override JsonNode ToJson(ulong value) => new JsonNumber(value.ToString()); + + internal override ulong FromJson(JsonNode node) => (ulong)node; + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/UriConverter.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/UriConverter.cs new file mode 100644 index 000000000000..6e789e4dda68 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/Instances/UriConverter.cs @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + public sealed class UriConverter : JsonConverter + { + internal override JsonNode ToJson(Uri value) => new JsonString(value.AbsoluteUri); + + internal override Uri FromJson(JsonNode node) => (Uri)node; + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/JsonConverter.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/JsonConverter.cs new file mode 100644 index 000000000000..c3d7b673db02 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/JsonConverter.cs @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + public abstract class JsonConverter : IJsonConverter + { + internal abstract T FromJson(JsonNode node); + + internal abstract JsonNode ToJson(T value); + + #region IConverter + + object IJsonConverter.FromJson(JsonNode node) => FromJson(node); + + JsonNode IJsonConverter.ToJson(object value) => ToJson((T)value); + + #endregion + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/JsonConverterAttribute.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/JsonConverterAttribute.cs new file mode 100644 index 000000000000..e1c06ab8ff42 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/JsonConverterAttribute.cs @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + public sealed class JsonConverterAttribute : Attribute + { + internal JsonConverterAttribute(Type type) + { + Converter = (IJsonConverter)Activator.CreateInstance(type); + } + + internal IJsonConverter Converter { get; } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/JsonConverterFactory.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/JsonConverterFactory.cs new file mode 100644 index 000000000000..15811cbc97ed --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/JsonConverterFactory.cs @@ -0,0 +1,91 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + public sealed class JsonConverterFactory + { + private static readonly Dictionary converters = new Dictionary(); + + static JsonConverterFactory() + { + AddInternal(new BooleanConverter()); + AddInternal(new DateTimeConverter()); + AddInternal(new DateTimeOffsetConverter()); + AddInternal(new BinaryConverter()); + AddInternal(new DecimalConverter()); + AddInternal(new DoubleConverter()); + AddInternal(new GuidConverter()); + AddInternal(new Int16Converter()); + AddInternal(new Int32Converter()); + AddInternal(new Int64Converter()); + AddInternal(new SingleConverter()); + AddInternal(new StringConverter()); + AddInternal(new TimeSpanConverter()); + AddInternal(new UInt16Converter()); + AddInternal(new UInt32Converter()); + AddInternal(new UInt64Converter()); + AddInternal(new UriConverter()); + + // Hash sets + AddInternal(new HashSetConverter()); + AddInternal(new HashSetConverter()); + AddInternal(new HashSetConverter()); + AddInternal(new HashSetConverter()); + AddInternal(new HashSetConverter()); + AddInternal(new HashSetConverter()); + + // JSON + + AddInternal(new JsonObjectConverter()); + AddInternal(new JsonArrayConverter()); + } + + internal static Dictionary Instances => converters; + + internal static IJsonConverter Get(Type type) + { + var details = TypeDetails.Get(type); + + if (details.JsonConverter == null) + { + throw new ConversionException($"No converter found for '{type.Name}'."); + } + + return details.JsonConverter; + } + + internal static bool TryGet(Type type, out IJsonConverter converter) + { + var typeDetails = TypeDetails.Get(type); + + converter = typeDetails.JsonConverter; + + return converter != null; + } + + private static void AddInternal(JsonConverter converter) + => converters.Add(typeof(T), converter); + + private static void AddInternal(IJsonConverter converter) + => converters.Add(typeof(T), converter); + + internal static void Add(JsonConverter converter) + { + if (converter == null) + { + throw new ArgumentNullException(nameof(converter)); + } + + AddInternal(converter); + + var type = TypeDetails.Get(); + + type.JsonConverter = converter; + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/StringLikeConverter.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/StringLikeConverter.cs new file mode 100644 index 000000000000..40920e9c623e --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Conversions/StringLikeConverter.cs @@ -0,0 +1,45 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Reflection; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + public sealed class StringLikeConverter : IJsonConverter + { + private readonly Type type; + private readonly MethodInfo parseMethod; + + internal StringLikeConverter(Type type) + { + this.type = type ?? throw new ArgumentNullException(nameof(type)); + this.parseMethod = StringLikeHelper.GetParseMethod(type); + } + + public object FromJson(JsonNode node) => + parseMethod.Invoke(null, new[] { node.ToString() }); + + public JsonNode ToJson(object value) => new JsonString(value.ToString()); + } + + internal static class StringLikeHelper + { + private static readonly Type[] parseMethodParamaterTypes = new[] { typeof(string) }; + + internal static bool IsStringLike(Type type) + { + return GetParseMethod(type) != null; + } + + internal static MethodInfo GetParseMethod(Type type) + { + MethodInfo method = type.GetMethod("Parse", parseMethodParamaterTypes); + + if (method?.IsPublic != true) return null; + + return method; + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Customizations/IJsonSerializable.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Customizations/IJsonSerializable.cs new file mode 100644 index 000000000000..c73b70b1ec40 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Customizations/IJsonSerializable.cs @@ -0,0 +1,263 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json; +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime +{ + public interface IJsonSerializable + { + JsonNode ToJson(JsonObject container = null, SerializationMode serializationMode = SerializationMode.None); + } + internal static class JsonSerializable + { + /// + /// Serializes an enumerable and returns a JsonNode. + /// + /// an IEnumerable collection of items + /// A JsonNode that contains the collection of items serialized. + private static JsonNode ToJsonValue(System.Collections.IEnumerable enumerable) + { + if (enumerable != null) + { + // is it a byte array of some kind? + if (enumerable is System.Collections.Generic.IEnumerable byteEnumerable) + { + return new XBinary(System.Linq.Enumerable.ToArray(byteEnumerable)); + } + + var hasValues = false; + // just create an array of value nodes. + var result = new XNodeArray(); + foreach (var each in enumerable) + { + // we had at least one value. + hasValues = true; + + // try to serialize it. + var node = ToJsonValue(each); + if (null != node) + { + result.Add(node); + } + } + + // if we were able to add values, (or it was just empty), return it. + if (result.Count > 0 || !hasValues) + { + return result; + } + } + + // we couldn't serialize the values. Sorry. + return null; + } + + /// + /// Serializes a valuetype to a JsonNode. + /// + /// a ValueType (ie, a primitive, enum or struct) to be serialized + /// a JsonNode with the serialized value + private static JsonNode ToJsonValue(ValueType vValue) + { + // numeric type + if (vValue is SByte || vValue is Int16 || vValue is Int32 || vValue is Int64 || vValue is Byte || vValue is UInt16 || vValue is UInt32 || vValue is UInt64 || vValue is decimal || vValue is float || vValue is double) + { + return new JsonNumber(vValue.ToString()); + } + + // boolean type + if (vValue is bool bValue) + { + return new JsonBoolean(bValue); + } + + // dates + if (vValue is DateTime dtValue) + { + return new JsonDate(dtValue); + } + + // DictionaryEntity struct type + if (vValue is System.Collections.DictionaryEntry deValue) + { + return new JsonObject { { deValue.Key.ToString(), ToJsonValue(deValue.Value) } }; + } + + // sorry, no idea. + return null; + } + /// + /// Attempts to serialize an object by using ToJson() or ToJsonString() if they exist. + /// + /// the object to be serialized. + /// the serialized JsonNode (if successful), otherwise, null + private static JsonNode TryToJsonValue(dynamic oValue) + { + object jsonValue = null; + dynamic v = oValue; + try + { + jsonValue = v.ToJson().ToString(); + } + catch + { + // no harm... + try + { + jsonValue = v.ToJsonString().ToString(); + } + catch + { + // no worries here either. + } + } + + // if we got something out, let's use it. + if (null != jsonValue) + { + // JsonNumber is really a literal json value. Just don't try to cast that back to an actual number, ok? + return new JsonNumber(jsonValue.ToString()); + } + + return null; + } + + /// + /// Serialize an object by using a variety of methods. + /// + /// the object to be serialized. + /// the serialized JsonNode (if successful), otherwise, null + internal static JsonNode ToJsonValue(object value) + { + // things that implement our interface are preferred. + if (value is Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IJsonSerializable jsonSerializable) + { + return jsonSerializable.ToJson(); + } + + // strings are easy. + if (value is string || value is char) + { + return new JsonString(value.ToString()); + } + + // value types are fairly straightforward (fallback to ToJson()/ToJsonString() or literal JsonString ) + if (value is System.ValueType vValue) + { + return ToJsonValue(vValue) ?? TryToJsonValue(vValue) ?? new JsonString(vValue.ToString()); + } + + // dictionaries are objects that should be able to serialize + if (value is System.Collections.Generic.IDictionary dictionary) + { + return Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.JsonSerializable.ToJson(dictionary, null); + } + + // hashtables are converted to dictionaries for serialization + if (value is System.Collections.Hashtable hashtable) + { + var dict = new System.Collections.Generic.Dictionary(); + DictionaryExtensions.HashTableToDictionary(hashtable, dict); + return Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.JsonSerializable.ToJson(dict, null); + } + + // enumerable collections are handled like arrays (again, fallback to ToJson()/ToJsonString() or literal JsonString) + if (value is System.Collections.IEnumerable enumerableValue) + { + // some kind of enumerable value + return ToJsonValue(enumerableValue) ?? TryToJsonValue(value) ?? new JsonString(value.ToString()); + } + + // at this point, we're going to fallback to a string literal here, since we really have no idea what it is. + return new JsonString(value.ToString()); + } + + internal static JsonObject ToJson(System.Collections.Generic.Dictionary dictionary, JsonObject container) => ToJson((System.Collections.Generic.IDictionary)dictionary, container); + + /// + /// Serializes a dictionary into a JsonObject container. + /// + /// The dictionary to serailize + /// the container to serialize the dictionary into + /// the container + internal static JsonObject ToJson(System.Collections.Generic.IDictionary dictionary, JsonObject container) + { + container = container ?? new JsonObject(); + if (dictionary != null && dictionary.Count > 0) + { + foreach (var key in dictionary) + { + // currently, we don't serialize null values. + if (null != key.Value) + { + container.Add(key.Key, ToJsonValue(key.Value)); + continue; + } + } + } + return container; + } + + internal static Func> DeserializeDictionary(Func> dictionaryFactory) + { + return (node) => FromJson(node, dictionaryFactory(), (object)(DeserializeDictionary(dictionaryFactory)) as Func); + } + + internal static System.Collections.Generic.IDictionary FromJson(JsonObject json, System.Collections.Generic.Dictionary container, System.Func objectFactory, System.Collections.Generic.HashSet excludes = null) => FromJson(json, (System.Collections.Generic.IDictionary)container, objectFactory, excludes); + + + internal static System.Collections.Generic.IDictionary FromJson(JsonObject json, System.Collections.Generic.IDictionary container, System.Func objectFactory, System.Collections.Generic.HashSet excludes = null) + { + if (null == json) + { + return container; + } + + foreach (var key in json.Keys) + { + if (true == excludes?.Contains(key)) + { + continue; + } + + var value = json[key]; + try + { + switch (value.Type) + { + case JsonType.Null: + // skip null values. + continue; + + case JsonType.Array: + case JsonType.Boolean: + case JsonType.Date: + case JsonType.Binary: + case JsonType.Number: + case JsonType.String: + container.Add(key, (V)value.ToValue()); + break; + case JsonType.Object: + if (objectFactory != null) + { + var v = objectFactory(value as JsonObject); + if (null != v) + { + container.Add(key, v); + } + } + break; + } + } + catch + { + } + } + return container; + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Customizations/JsonArray.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Customizations/JsonArray.cs new file mode 100644 index 000000000000..2cb0ae9230eb --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Customizations/JsonArray.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + public partial class JsonArray + { + internal override object ToValue() => Count == 0 ? new object[0] : System.Linq.Enumerable.ToArray(System.Linq.Enumerable.Select(this, each => each.ToValue())); + } + + +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Customizations/JsonBoolean.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Customizations/JsonBoolean.cs new file mode 100644 index 000000000000..8c1e03b9ba23 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Customizations/JsonBoolean.cs @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + internal partial class JsonBoolean + { + internal static JsonBoolean Create(bool? value) => value is bool b ? new JsonBoolean(b) : null; + internal bool ToBoolean() => Value; + + internal override object ToValue() => Value; + } + + +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Customizations/JsonNode.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Customizations/JsonNode.cs new file mode 100644 index 000000000000..79c5c6182065 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Customizations/JsonNode.cs @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + using System; + using System.Collections.Generic; + + public partial class JsonNode + { + /// + /// Returns the content of this node as the underlying value. + /// Will default to the string representation if not overridden in child classes. + /// + /// an object with the underlying value of the node. + internal virtual object ToValue() { + return this.ToString(); + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Customizations/JsonNumber.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Customizations/JsonNumber.cs new file mode 100644 index 000000000000..a997615064a6 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Customizations/JsonNumber.cs @@ -0,0 +1,78 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + using System; + + public partial class JsonNumber + { + internal static readonly DateTime EpochDate = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); + private static long ToUnixTime(DateTime dateTime) + { + return (long)dateTime.Subtract(EpochDate).TotalSeconds; + } + private static DateTime FromUnixTime(long totalSeconds) + { + return EpochDate.AddSeconds(totalSeconds); + } + internal byte ToByte() => this; + internal int ToInt() => this; + internal long ToLong() => this; + internal short ToShort() => this; + internal UInt16 ToUInt16() => this; + internal UInt32 ToUInt32() => this; + internal UInt64 ToUInt64() => this; + internal decimal ToDecimal() => this; + internal double ToDouble() => this; + internal float ToFloat() => this; + + internal static JsonNumber Create(int? value) => value is int n ? new JsonNumber(n) : null; + internal static JsonNumber Create(long? value) => value is long n ? new JsonNumber(n) : null; + internal static JsonNumber Create(float? value) => value is float n ? new JsonNumber(n) : null; + internal static JsonNumber Create(double? value) => value is double n ? new JsonNumber(n) : null; + internal static JsonNumber Create(decimal? value) => value is decimal n ? new JsonNumber(n) : null; + internal static JsonNumber Create(DateTime? value) => value is DateTime date ? new JsonNumber(ToUnixTime(date)) : null; + + public static implicit operator DateTime(JsonNumber number) => FromUnixTime(number); + internal DateTime ToDateTime() => this; + + internal JsonNumber(decimal value) + { + this.value = value.ToString(); + } + internal override object ToValue() + { + if (IsInteger) + { + if (int.TryParse(this.value, out int iValue)) + { + return iValue; + } + if (long.TryParse(this.value, out long lValue)) + { + return lValue; + } + } + else + { + if (float.TryParse(this.value, out float fValue)) + { + return fValue; + } + if (double.TryParse(this.value, out double dValue)) + { + return dValue; + } + if (decimal.TryParse(this.value, out decimal dcValue)) + { + return dcValue; + } + } + return null; + } + } + + +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Customizations/JsonObject.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Customizations/JsonObject.cs new file mode 100644 index 000000000000..cdeecd046487 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Customizations/JsonObject.cs @@ -0,0 +1,183 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + using System; + using System.Collections.Generic; + + public partial class JsonObject + { + internal override object ToValue() => Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.JsonSerializable.FromJson(this, new System.Collections.Generic.Dictionary(), (obj) => obj.ToValue()); + + internal void SafeAdd(string name, Func valueFn) + { + if (valueFn != null) + { + var value = valueFn(); + if (null != value) + { + items.Add(name, value); + } + } + } + + internal void SafeAdd(string name, JsonNode value) + { + if (null != value) + { + items.Add(name, value); + } + } + + internal T NullableProperty(string propertyName) where T : JsonNode + { + if (this.TryGetValue(propertyName, out JsonNode value)) + { + if (value.IsNull) + { + return null; + } + if (value is T tval) + { + return tval; + } + /* it's present, but not the correct type... */ + //throw new Exception($"Property {propertyName} in object expected type {typeof(T).Name} but value of type {value.Type.ToString()} was found."); + } + return null; + } + + internal JsonObject Property(string propertyName) + { + return PropertyT(propertyName); + } + + internal T PropertyT(string propertyName) where T : JsonNode + { + if (this.TryGetValue(propertyName, out JsonNode value)) + { + if (value.IsNull) + { + return null; // we're going to assume that the consumer knows what to do if null is explicity returned? + } + + if (value is T tval) + { + return tval; + } + /* it's present, but not the correct type... */ + // throw new Exception($"Property {propertyName} in object expected type {typeof(T).Name} but value of type {value.Type.ToString()} was found."); + } + return null; + } + + internal int NumberProperty(string propertyName, ref int output) => output = this.PropertyT(propertyName)?.ToInt() ?? output; + internal float NumberProperty(string propertyName, ref float output) => output = this.PropertyT(propertyName)?.ToFloat() ?? output; + internal byte NumberProperty(string propertyName, ref byte output) => output = this.PropertyT(propertyName)?.ToByte() ?? output; + internal long NumberProperty(string propertyName, ref long output) => output = this.PropertyT(propertyName)?.ToLong() ?? output; + internal double NumberProperty(string propertyName, ref double output) => output = this.PropertyT(propertyName)?.ToDouble() ?? output; + internal decimal NumberProperty(string propertyName, ref decimal output) => output = this.PropertyT(propertyName)?.ToDecimal() ?? output; + internal short NumberProperty(string propertyName, ref short output) => output = this.PropertyT(propertyName)?.ToShort() ?? output; + internal DateTime NumberProperty(string propertyName, ref DateTime output) => output = this.PropertyT(propertyName)?.ToDateTime() ?? output; + + internal int? NumberProperty(string propertyName, ref int? output) => output = this.NullableProperty(propertyName)?.ToInt() ?? null; + internal float? NumberProperty(string propertyName, ref float? output) => output = this.NullableProperty(propertyName)?.ToFloat() ?? null; + internal byte? NumberProperty(string propertyName, ref byte? output) => output = this.NullableProperty(propertyName)?.ToByte() ?? null; + internal long? NumberProperty(string propertyName, ref long? output) => output = this.NullableProperty(propertyName)?.ToLong() ?? null; + internal double? NumberProperty(string propertyName, ref double? output) => output = this.NullableProperty(propertyName)?.ToDouble() ?? null; + internal decimal? NumberProperty(string propertyName, ref decimal? output) => output = this.NullableProperty(propertyName)?.ToDecimal() ?? null; + internal short? NumberProperty(string propertyName, ref short? output) => output = this.NullableProperty(propertyName)?.ToShort() ?? null; + + internal DateTime? NumberProperty(string propertyName, ref DateTime? output) => output = this.NullableProperty(propertyName)?.ToDateTime() ?? null; + + + internal string StringProperty(string propertyName) => this.PropertyT(propertyName)?.ToString(); + internal string StringProperty(string propertyName, ref string output) => output = this.PropertyT(propertyName)?.ToString() ?? output; + internal char StringProperty(string propertyName, ref char output) => output = this.PropertyT(propertyName)?.ToChar() ?? output; + internal char? StringProperty(string propertyName, ref char? output) => output = this.PropertyT(propertyName)?.ToChar() ?? null; + + internal DateTime StringProperty(string propertyName, ref DateTime output) => DateTime.TryParse(this.PropertyT(propertyName)?.ToString(), out output) ? output : output; + internal DateTime? StringProperty(string propertyName, ref DateTime? output) => output = DateTime.TryParse(this.PropertyT(propertyName)?.ToString(), out var o) ? o : output; + + + internal bool BooleanProperty(string propertyName, ref bool output) => output = this.PropertyT(propertyName)?.ToBoolean() ?? output; + internal bool? BooleanProperty(string propertyName, ref bool? output) => output = this.PropertyT(propertyName)?.ToBoolean() ?? null; + + internal T[] ArrayProperty(string propertyName, ref T[] output, Func deserializer) + { + var array = this.PropertyT(propertyName); + if (array != null) + { + output = new T[array.Count]; + for (var i = 0; i < output.Length; i++) + { + output[i] = deserializer(array[i]); + } + } + return output; + } + internal T[] ArrayProperty(string propertyName, Func deserializer) + { + var array = this.PropertyT(propertyName); + if (array != null) + { + var output = new T[array.Count]; + for (var i = 0; i < output.Length; i++) + { + output[i] = deserializer(array[i]); + } + return output; + } + return new T[0]; + } + internal void IterateArrayProperty(string propertyName, Action deserializer) + { + var array = this.PropertyT(propertyName); + if (array != null) + { + for (var i = 0; i < array.Count; i++) + { + deserializer(array[i]); + } + } + } + + internal Dictionary DictionaryProperty(string propertyName, ref Dictionary output, Func deserializer) + { + var dictionary = this.PropertyT(propertyName); + if (output == null) + { + output = new Dictionary(); + } + else + { + output.Clear(); + } + if (dictionary != null) + { + foreach (var key in dictionary.Keys) + { + output[key] = deserializer(dictionary[key]); + } + } + return output; + } + + internal static JsonObject Create(IDictionary source, Func selector) + { + if (source == null || selector == null) + { + return null; + } + var result = new JsonObject(); + + foreach (var key in source.Keys) + { + result.SafeAdd(key, selector(source[key])); + } + return result; + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Customizations/JsonString.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Customizations/JsonString.cs new file mode 100644 index 000000000000..49ba4ff29d2f --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Customizations/JsonString.cs @@ -0,0 +1,34 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + using System; + using System.Globalization; + using System.Linq; + + public partial class JsonString + { + internal static string DateFormat = "yyyy-MM-dd"; + internal static string DateTimeFormat = "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK"; + internal static string DateTimeRfc1123Format = "R"; + + internal static JsonString Create(string value) => value == null ? null : new JsonString(value); + internal static JsonString Create(char? value) => value is char c ? new JsonString(c.ToString()) : null; + + internal static JsonString CreateDate(DateTime? value) => value is DateTime date ? new JsonString(date.ToString(DateFormat, CultureInfo.CurrentCulture)) : null; + internal static JsonString CreateDateTime(DateTime? value) => value is DateTime date ? new JsonString(date.ToString(DateTimeFormat, CultureInfo.CurrentCulture)) : null; + internal static JsonString CreateDateTimeRfc1123(DateTime? value) => value is DateTime date ? new JsonString(date.ToString(DateTimeRfc1123Format, CultureInfo.CurrentCulture)) : null; + + internal char ToChar() => this.Value?.ToString()?.FirstOrDefault() ?? default(char); + public static implicit operator char(JsonString value) => value?.ToString()?.FirstOrDefault() ?? default(char); + public static implicit operator char? (JsonString value) => value?.ToString()?.FirstOrDefault(); + + public static implicit operator DateTime(JsonString value) => DateTime.TryParse(value, out var output) ? output : default(DateTime); + public static implicit operator DateTime? (JsonString value) => DateTime.TryParse(value, out var output) ? output : default(DateTime?); + + } + + +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Customizations/XNodeArray.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Customizations/XNodeArray.cs new file mode 100644 index 000000000000..05fcabea1283 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Customizations/XNodeArray.cs @@ -0,0 +1,44 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + using System; + using System.Linq; + + public partial class XNodeArray + { + internal static XNodeArray Create(T[] source, Func selector) + { + if (source == null || selector == null) + { + return null; + } + var result = new XNodeArray(); + foreach (var item in source.Select(selector)) + { + result.SafeAdd(item); + } + return result; + } + internal void SafeAdd(JsonNode item) + { + if (item != null) + { + items.Add(item); + } + } + internal void SafeAdd(Func itemFn) + { + if (itemFn != null) + { + var item = itemFn(); + if (item != null) + { + items.Add(item); + } + } + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Debugging.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Debugging.cs new file mode 100644 index 000000000000..e0e2ff436170 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Debugging.cs @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime +{ + internal static class AttachDebugger + { + internal static void Break() + { + while (!System.Diagnostics.Debugger.IsAttached) + { + System.Console.Error.WriteLine($"Waiting for debugger to attach to process {System.Diagnostics.Process.GetCurrentProcess().Id}"); + for (int i = 0; i < 50; i++) + { + if (System.Diagnostics.Debugger.IsAttached) + { + break; + } + System.Threading.Thread.Sleep(100); + System.Console.Error.Write("."); + } + System.Console.Error.WriteLine(); + } + System.Diagnostics.Debugger.Break(); + } + } +} diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/DictionaryExtensions.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/DictionaryExtensions.cs new file mode 100644 index 000000000000..42f7b661bf9e --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/DictionaryExtensions.cs @@ -0,0 +1,33 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime +{ + internal static class DictionaryExtensions + { + internal static void HashTableToDictionary(System.Collections.Hashtable hashtable, System.Collections.Generic.IDictionary dictionary) + { + if (null == hashtable) + { + return; + } + foreach (var each in hashtable.Keys) + { + var key = each.ToString(); + var value = hashtable[key]; + if (null != value) + { + try + { + dictionary[key] = (V)value; + } + catch + { + // Values getting dropped; not compatible with target dictionary. Not sure what to do here. + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/EventData.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/EventData.cs new file mode 100644 index 000000000000..160cc4995445 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/EventData.cs @@ -0,0 +1,78 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime +{ + + using System; + using System.Threading; + + ///Represents the data in signaled event. + public partial class EventData + { + /// + /// The type of the event being signaled + /// + public string Id; + + /// + /// The user-ready message from the event. + /// + public string Message; + + /// + /// When the event is about a parameter, this is the parameter name. + /// Used in Validation Events + /// + public string Parameter; + + /// + /// This represents a numeric value associated with the event. + /// Use for progress-style events + /// + public double Value; + + /// + /// Any extended data for an event should be serialized and stored here. + /// + public string ExtendedData; + + /// + /// If the event triggers after the request message has been created, this will contain the Request Message (which in HTTP calls would be HttpRequestMessage) + /// + /// Typically you'd cast this to the expected type to use it: + /// + /// if(eventData.RequestMessgae is HttpRequestMessage httpRequest) + /// { + /// httpRequest.Headers.Add("x-request-flavor", "vanilla"); + /// } + /// + /// + public object RequestMessage; + + /// + /// If the event triggers after the response is back, this will contain the Response Message (which in HTTP calls would be HttpResponseMessage) + /// + /// Typically you'd cast this to the expected type to use it: + /// + /// if(eventData.ResponseMessage is HttpResponseMessage httpResponse){ + /// var flavor = httpResponse.Headers.GetValue("x-request-flavor"); + /// } + /// + /// + public object ResponseMessage; + + /// + /// Cancellation method for this event. + /// + /// If the event consumer wishes to cancel the request that initiated this event, call Cancel() + /// + /// + /// The original initiator of the request must provide the implementation of this. + /// + public System.Action Cancel; + } + +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/EventDataExtensions.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/EventDataExtensions.cs new file mode 100644 index 000000000000..056080a4d5f2 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/EventDataExtensions.cs @@ -0,0 +1,94 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime +{ + using System; + + /// + /// PowerShell-specific data on top of the llc# EventData + /// + /// + /// In PowerShell, we add on the EventDataConverter to support sending events between modules. + /// Obviously, this code would need to be duplcated on both modules. + /// This is preferable to sharing a common library, as versioning makes that problematic. + /// + [System.ComponentModel.TypeConverter(typeof(EventDataConverter))] + public partial class EventData : EventArgs + { + } + + /// + /// A PowerShell PSTypeConverter to adapt an EventData object that has been passed. + /// Usually used between modules. + /// + public class EventDataConverter : System.Management.Automation.PSTypeConverter + { + public override bool CanConvertTo(object sourceValue, Type destinationType) => false; + public override object ConvertTo(object sourceValue, Type destinationType, IFormatProvider formatProvider, bool ignoreCase) => null; + public override bool CanConvertFrom(dynamic sourceValue, Type destinationType) => destinationType == typeof(EventData) && CanConvertFrom(sourceValue); + public override object ConvertFrom(dynamic sourceValue, Type destinationType, IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Verifies that a given object has the required members to convert it to the target type (EventData) + /// + /// Uses a dynamic type so that it is able to use the simplest code without excessive checking. + /// + /// The instance to verify + /// True, if the object has all the required parameters. + public static bool CanConvertFrom(dynamic sourceValue) + { + try + { + // check if this has *required* parameters... + sourceValue?.Id?.GetType(); + sourceValue?.Message?.GetType(); + sourceValue?.Cancel?.GetType(); + + // remaining parameters are not *required*, + // and if they have values, it will copy them at conversion time. + } + catch + { + // if anything throws an exception (because it's null, or doesn't have that member) + return false; + } + return true; + } + + /// + /// Returns result of the delegate as the expected type, or default(T) + /// + /// This isolates any exceptions from the consumer. + /// + /// A delegate that returns a value + /// The desired output type + /// The value from the function if the type is correct + private static T To(Func srcValue) + { + try { return srcValue(); } + catch { return default(T); } + } + + /// + /// Converts an incoming object to the expected type by treating the incoming object as a dynamic, and coping the expected values. + /// + /// the incoming object + /// EventData + public static EventData ConvertFrom(dynamic sourceValue) + { + return new EventData + { + Id = To(() => sourceValue.Id), + Message = To(() => sourceValue.Message), + Parameter = To(() => sourceValue.Parameter), + Value = To(() => sourceValue.Value), + RequestMessage = To(() => sourceValue.RequestMessage), + ResponseMessage = To(() => sourceValue.ResponseMessage), + Cancel = To(() => sourceValue.Cancel) + }; + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/EventListener.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/EventListener.cs new file mode 100644 index 000000000000..e6c8a4b9c353 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/EventListener.cs @@ -0,0 +1,247 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime +{ + + using System; + using System.Linq; + using System.Collections; + using System.Collections.Generic; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + using GetEventData = System.Func; + using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Extensions; + + public interface IValidates + { + Task Validate(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IEventListener listener); + } + + /// + /// The IEventListener Interface defines the communication mechanism for Signaling events during a remote call. + /// + /// + /// The interface is designed to be as minimal as possible, allow for quick peeking of the event type (id) + /// and the cancellation status and provides a delegate for retrieving the event details themselves. + /// + public interface IEventListener + { + Task Signal(string id, CancellationToken token, GetEventData createMessage); + CancellationToken Token { get; } + System.Action Cancel { get; } + } + + internal static partial class Extensions + { + public static Task Signal(this IEventListener instance, string id, CancellationToken token, Func createMessage) => instance.Signal(id, token, createMessage); + public static Task Signal(this IEventListener instance, string id, CancellationToken token) => instance.Signal(id, token, () => new EventData { Id = id, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, string messageText) => instance.Signal(id, token, () => new EventData { Id = id, Message = messageText, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, string messageText, HttpRequestMessage request) => instance.Signal(id, token, () => new EventData { Id = id, Message = messageText, RequestMessage = request, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, string messageText, HttpResponseMessage response) => instance.Signal(id, token, () => new EventData { Id = id, Message = messageText, RequestMessage = response.RequestMessage, ResponseMessage = response, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, string messageText, double magnitude) => instance.Signal(id, token, () => new EventData { Id = id, Message = messageText, Value = magnitude, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, string messageText, double magnitude, HttpRequestMessage request) => instance.Signal(id, token, () => new EventData { Id = id, Message = messageText, RequestMessage = request, Value = magnitude, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, string messageText, double magnitude, HttpResponseMessage response) => instance.Signal(id, token, () => new EventData { Id = id, Message = messageText, RequestMessage = response.RequestMessage, ResponseMessage = response, Value = magnitude, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, HttpRequestMessage request) => instance.Signal(id, token, () => new EventData { Id = id, RequestMessage = request, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, HttpRequestMessage request, HttpResponseMessage response) => instance.Signal(id, token, () => new EventData { Id = id, RequestMessage = request, ResponseMessage = response, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, HttpResponseMessage response) => instance.Signal(id, token, () => new EventData { Id = id, RequestMessage = response.RequestMessage, ResponseMessage = response, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, EventData message) => instance.Signal(id, token, () => { message.Id = id; message.Cancel = instance.Cancel; return message; }); + + public static Task Signal(this IEventListener instance, string id, Func createMessage) => instance.Signal(id, instance.Token, createMessage); + public static Task Signal(this IEventListener instance, string id) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, string messageText) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = messageText, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, string messageText, HttpRequestMessage request) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = messageText, RequestMessage = request, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, string messageText, HttpResponseMessage response) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = messageText, RequestMessage = response.RequestMessage, ResponseMessage = response, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, string messageText, double magnitude) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = messageText, Value = magnitude, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, string messageText, double magnitude, HttpRequestMessage request) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = messageText, RequestMessage = request, Value = magnitude, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, string messageText, double magnitude, HttpResponseMessage response) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = messageText, RequestMessage = response.RequestMessage, ResponseMessage = response, Value = magnitude, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, HttpRequestMessage request) => instance.Signal(id, instance.Token, () => new EventData { Id = id, RequestMessage = request, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, HttpRequestMessage request, HttpResponseMessage response) => instance.Signal(id, instance.Token, () => new EventData { Id = id, RequestMessage = request, ResponseMessage = response, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, HttpResponseMessage response) => instance.Signal(id, instance.Token, () => new EventData { Id = id, RequestMessage = response.RequestMessage, ResponseMessage = response, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, EventData message) => instance.Signal(id, instance.Token, () => { message.Id = id; message.Cancel = instance.Cancel; return message; }); + + public static Task Signal(this IEventListener instance, string id, System.Uri uri) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = uri.ToString(), Cancel = instance.Cancel }); + + public static async Task AssertNotNull(this IEventListener instance, string parameterName, object value) + { + if (value == null) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.ValidationWarning, Message = $"'{parameterName}' should not be null", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertMinimumLength(this IEventListener instance, string parameterName, string value, int length) + { + if (value != null && value.Length < length) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.ValidationWarning, Message = $"Length of '{parameterName}' is less than {length}", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertMaximumLength(this IEventListener instance, string parameterName, string value, int length) + { + if (value != null && value.Length > length) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.ValidationWarning, Message = $"Length of '{parameterName}' is greater than {length}", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + + public static async Task AssertRegEx(this IEventListener instance, string parameterName, string value, string regularExpression) + { + if (value != null && !System.Text.RegularExpressions.Regex.Match(value, regularExpression).Success) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.ValidationWarning, Message = $"'{parameterName}' does not validate against pattern /{regularExpression}/", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertEnum(this IEventListener instance, string parameterName, string value, params string[] values) + { + if (!values.Any(each => each.Equals(value))) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.ValidationWarning, Message = $"'{parameterName}' is not one of ({values.Aggregate((c, e) => $"'{e}',{c}")}", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertObjectIsValid(this IEventListener instance, string parameterName, object inst) + { + await (inst as Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IValidates)?.Validate(instance); + } + + public static async Task AssertIsLessThan(this IEventListener instance, string parameterName, T? value, T max) where T : struct, System.IComparable + { + if (null != value && ((T)value).CompareTo(max) >= 0) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be less than {max} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertIsGreaterThan(this IEventListener instance, string parameterName, T? value, T max) where T : struct, System.IComparable + { + if (null != value && ((T)value).CompareTo(max) <= 0) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be greater than {max} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertIsLessThanOrEqual(this IEventListener instance, string parameterName, T? value, T max) where T : struct, System.IComparable + { + if (null != value && ((T)value).CompareTo(max) > 0) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be less than or equal to {max} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertIsGreaterThanOrEqual(this IEventListener instance, string parameterName, T? value, T max) where T : struct, System.IComparable + { + if (null != value && ((T)value).CompareTo(max) < 0) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be greater than or equal to {max} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertIsMultipleOf(this IEventListener instance, string parameterName, Int64? value, Int64 multiple) + { + if (null != value && value % multiple != 0) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be multiple of {multiple} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertIsMultipleOf(this IEventListener instance, string parameterName, double? value, double multiple) + { + if (null != value) + { + var i = (Int64)(value / multiple); + if (i != value / multiple) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be multiple of {multiple} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + } + public static async Task AssertIsMultipleOf(this IEventListener instance, string parameterName, decimal? value, decimal multiple) + { + if (null != value) + { + var i = (Int64)(value / multiple); + if (i != value / multiple) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be multiple of {multiple} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + } + } + + /// + /// An Implementation of the IEventListener that supports subscribing to events and dispatching them + /// (used for manually using the lowlevel interface) + /// + public class EventListener : CancellationTokenSource, IEnumerable>, IEventListener + { + private Dictionary calls = new Dictionary(); + public IEnumerator> GetEnumerator() => calls.GetEnumerator(); + IEnumerator IEnumerable.GetEnumerator() => calls.GetEnumerator(); + public EventListener() + { + } + + public new Action Cancel => base.Cancel; + private Event tracer; + + public EventListener(params (string name, Event callback)[] initializer) + { + foreach (var each in initializer) + { + Add(each.name, each.callback); + } + } + + public void Add(string name, SynchEvent callback) + { + Add(name, (message) => { callback(message); return Task.CompletedTask; }); + } + + public void Add(string name, Event callback) + { + if (callback != null) + { + if (string.IsNullOrEmpty(name)) + { + if (calls.ContainsKey(name)) + { + tracer += callback; + } + else + { + tracer = callback; + } + } + else + { + if (calls.ContainsKey(name)) + { + calls[name ?? System.String.Empty] += callback; + } + else + { + calls[name ?? System.String.Empty] = callback; + } + } + } + } + + + public async Task Signal(string id, CancellationToken token, GetEventData createMessage) + { + using (NoSynchronizationContext) + { + if (!string.IsNullOrEmpty(id) && (calls.TryGetValue(id, out Event listener) || tracer != null)) + { + var message = createMessage(); + message.Id = id; + + await listener?.Invoke(message); + await tracer?.Invoke(message); + + if (token.IsCancellationRequested) + { + throw new OperationCanceledException($"Canceled by event {id} ", this.Token); + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Events.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Events.cs new file mode 100644 index 000000000000..4e144ddb8a3a --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Events.cs @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime +{ + public static partial class Events + { + public const string Log = nameof(Log); + public const string Validation = nameof(Validation); + public const string ValidationWarning = nameof(ValidationWarning); + public const string AfterValidation = nameof(AfterValidation); + public const string RequestCreated = nameof(RequestCreated); + public const string ResponseCreated = nameof(ResponseCreated); + public const string URLCreated = nameof(URLCreated); + public const string Finally = nameof(Finally); + public const string HeaderParametersAdded = nameof(HeaderParametersAdded); + public const string BodyContentSet = nameof(BodyContentSet); + public const string BeforeCall = nameof(BeforeCall); + public const string BeforeResponseDispatch = nameof(BeforeResponseDispatch); + public const string FollowingNextLink = nameof(FollowingNextLink); + public const string DelayBeforePolling = nameof(DelayBeforePolling); + public const string Polling = nameof(Polling); + public const string Progress = nameof(Progress); + } +} diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/EventsExtensions.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/EventsExtensions.cs new file mode 100644 index 000000000000..60b7d625267c --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/EventsExtensions.cs @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime +{ + public static partial class Events + { + public const string CmdletProcessRecordStart = nameof(CmdletProcessRecordStart); + public const string CmdletProcessRecordAsyncStart = nameof(CmdletProcessRecordAsyncStart); + public const string CmdletException = nameof(CmdletException); + public const string CmdletGetPipeline = nameof(CmdletGetPipeline); + public const string CmdletBeforeAPICall = nameof(CmdletBeforeAPICall); + public const string CmdletBeginProcessing = nameof(CmdletBeginProcessing); + public const string CmdletEndProcessing = nameof(CmdletEndProcessing); + public const string CmdletProcessRecordEnd = nameof(CmdletProcessRecordEnd); + public const string CmdletProcessRecordAsyncEnd = nameof(CmdletProcessRecordAsyncEnd); + public const string CmdletAfterAPICall = nameof(CmdletAfterAPICall); + + public const string Verbose = nameof(Verbose); + public const string Debug = nameof(Debug); + public const string Information = nameof(Information); + public const string Error = nameof(Error); + public const string Warning = nameof(Warning); + } + +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Extensions.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Extensions.cs new file mode 100644 index 000000000000..24ec4120c424 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Extensions.cs @@ -0,0 +1,117 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime +{ + using System.Linq; + using System; + + internal static partial class Extensions + { + public static T[] SubArray(this T[] array, int offset, int length) + { + return new ArraySegment(array, offset, length) + .ToArray(); + } + + public static T ReadHeaders(this T instance, global::System.Net.Http.Headers.HttpResponseHeaders headers) where T : class + { + (instance as IHeaderSerializable)?.ReadHeaders(headers); + return instance; + } + + internal static bool If(T input, out T output) + { + if (null == input) + { + output = default(T); + return false; + } + output = input; + return true; + } + + internal static void AddIf(T value, System.Action addMethod) + { + // if value is present (and it's not just an empty JSON Object) + if (null != value && (value as Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject)?.Keys.Count != 0) + { + addMethod(value); + } + } + + internal static void AddIf(T value, string serializedName, System.Action addMethod) + { + // if value is present (and it's not just an empty JSON Object) + if (null != value && (value as Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject)?.Keys.Count != 0) + { + addMethod(serializedName, value); + } + } + + /// + /// Returns the first header value as a string from an HttpReponseMessage. + /// + /// the HttpResponseMessage to fetch a header from + /// the header name + /// the first header value as a string from an HttpReponseMessage. string.empty if there is no header value matching + internal static string GetFirstHeader(this System.Net.Http.HttpResponseMessage response, string headerName) => response.Headers.FirstOrDefault(each => string.Equals(headerName, each.Key, System.StringComparison.OrdinalIgnoreCase)).Value?.FirstOrDefault() ?? string.Empty; + + /// + /// Sets the Synchronization Context to null, and returns an IDisposable that when disposed, + /// will restore the synchonization context to the original value. + /// + /// This is used a less-invasive means to ensure that code in the library that doesn't + /// need to be continued in the original context doesn't have to have ConfigureAwait(false) + /// on every single await + /// + /// If the SynchronizationContext is null when this is used, the resulting IDisposable + /// will not do anything (this prevents excessive re-setting of the SynchronizationContext) + /// + /// Usage: + /// + /// using(NoSynchronizationContext) { + /// await SomeAsyncOperation(); + /// await SomeOtherOperation(); + /// } + /// + /// + /// + /// An IDisposable that will return the SynchronizationContext to original state + internal static System.IDisposable NoSynchronizationContext => System.Threading.SynchronizationContext.Current == null ? Dummy : new NoSyncContext(); + + /// + /// An instance of the Dummy IDispoable. + /// + /// + internal static System.IDisposable Dummy = new DummyDisposable(); + + /// + /// An IDisposable that does absolutely nothing. + /// + internal class DummyDisposable : System.IDisposable + { + public void Dispose() + { + } + } + /// + /// An IDisposable that saves the SynchronizationContext,sets it to null and + /// restores it to the original upon Dispose(). + /// + /// NOTE: This is designed to be less invasive than using .ConfigureAwait(false) + /// on every single await in library code (ie, places where we know we don't need + /// to continue in the same context as we went async) + /// + internal class NoSyncContext : System.IDisposable + { + private System.Threading.SynchronizationContext original = System.Threading.SynchronizationContext.Current; + internal NoSyncContext() + { + System.Threading.SynchronizationContext.SetSynchronizationContext(null); + } + public void Dispose() => System.Threading.SynchronizationContext.SetSynchronizationContext(original); + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Helpers/Extensions/StringBuilderExtensions.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Helpers/Extensions/StringBuilderExtensions.cs new file mode 100644 index 000000000000..d40d00db35e6 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Helpers/Extensions/StringBuilderExtensions.cs @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System.Text; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + internal static class StringBuilderExtensions + { + /// + /// Extracts the buffered value and resets the buffer + /// + internal static string Extract(this StringBuilder builder) + { + var text = builder.ToString(); + + builder.Clear(); + + return text; + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Helpers/Extensions/TypeExtensions.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Helpers/Extensions/TypeExtensions.cs new file mode 100644 index 000000000000..72d4fb51e4dc --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Helpers/Extensions/TypeExtensions.cs @@ -0,0 +1,61 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + internal static class TypeExtensions + { + internal static bool IsNullable(this Type type) => + type.IsGenericType && type.GetGenericTypeDefinition().Equals(typeof(Nullable<>)); + + internal static Type GetOpenGenericInterface(this Type candidateType, Type openGenericInterfaceType) + { + + if (candidateType.IsGenericType && candidateType.GetGenericTypeDefinition() == openGenericInterfaceType) + { + return candidateType; + } + + // Check if it references it's own converter.... + + foreach (Type interfaceType in candidateType.GetInterfaces()) + { + if (interfaceType.IsGenericType + && interfaceType.GetGenericTypeDefinition().Equals(openGenericInterfaceType)) + { + return interfaceType; + } + } + + return null; + } + + // Author: Sebastian Good + // http://stackoverflow.com/questions/503263/how-to-determine-if-a-type-implements-a-specific-generic-interface-type + internal static bool ImplementsOpenGenericInterface(this Type candidateType, Type openGenericInterfaceType) + { + if (candidateType.Equals(openGenericInterfaceType)) + { + return true; + } + + if (candidateType.IsGenericType && candidateType.GetGenericTypeDefinition().Equals(openGenericInterfaceType)) + { + return true; + } + + foreach (Type i in candidateType.GetInterfaces()) + { + if (i.IsGenericType && i.ImplementsOpenGenericInterface(openGenericInterfaceType)) + { + return true; + } + } + + return false; + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Helpers/Seperator.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Helpers/Seperator.cs new file mode 100644 index 000000000000..d162c420c132 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Helpers/Seperator.cs @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + internal static class Seperator + { + internal static readonly char[] Dash = { '-' }; + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Helpers/TypeDetails.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Helpers/TypeDetails.cs new file mode 100644 index 000000000000..9f824e7b4ca1 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Helpers/TypeDetails.cs @@ -0,0 +1,116 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Reflection; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + + + + internal class TypeDetails + { + private readonly Type info; + + internal TypeDetails(Type info) + { + this.info = info ?? throw new ArgumentNullException(nameof(info)); + } + + internal Type NonNullType { get; set; } + + internal object DefaultValue { get; set; } + + internal bool IsNullable { get; set; } + + internal bool IsList { get; set; } + + internal bool IsStringLike { get; set; } + + internal bool IsEnum => info.IsEnum; + + internal bool IsArray => info.IsArray; + + internal bool IsValueType => info.IsValueType; + + internal Type ElementType { get; set; } + + internal IJsonConverter JsonConverter { get; set; } + + #region Creation + + private static readonly ConcurrentDictionary cache = new ConcurrentDictionary(); + + internal static TypeDetails Get() => Get(typeof(T)); + + internal static TypeDetails Get(Type type) => cache.GetOrAdd(type, Create); + + private static TypeDetails Create(Type type) + { + var isGenericList = !type.IsPrimitive && type.ImplementsOpenGenericInterface(typeof(IList<>)); + var isList = !type.IsPrimitive && (isGenericList || typeof(IList).IsAssignableFrom(type)); + + var isNullable = type.IsNullable(); + + Type elementType; + + if (type.IsArray) + { + elementType = type.GetElementType(); + } + else if (isGenericList) + { + var iList = type.GetOpenGenericInterface(typeof(IList<>)); + + elementType = iList.GetGenericArguments()[0]; + } + else + { + elementType = null; + } + + var nonNullType = isNullable ? type.GetGenericArguments()[0] : type; + + var isStringLike = false; + + IJsonConverter converter; + + var jsonConverterAttribute = type.GetCustomAttribute(); + + if (jsonConverterAttribute != null) + { + converter = jsonConverterAttribute.Converter; + } + else if (nonNullType.IsEnum) + { + converter = new EnumConverter(nonNullType); + } + else if (JsonConverterFactory.Instances.TryGetValue(nonNullType, out converter)) + { + } + else if (StringLikeHelper.IsStringLike(nonNullType)) + { + isStringLike = true; + + converter = new StringLikeConverter(nonNullType); + } + + return new TypeDetails(nonNullType) { + NonNullType = nonNullType, + DefaultValue = type.IsValueType ? Activator.CreateInstance(type) : null, + IsNullable = isNullable, + IsList = isList, + IsStringLike = isStringLike, + ElementType = elementType, + JsonConverter = converter + }; + } + + #endregion + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Helpers/XHelper.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Helpers/XHelper.cs new file mode 100644 index 000000000000..1be88b2e9fdc --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Helpers/XHelper.cs @@ -0,0 +1,75 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + internal static class XHelper + { + internal static JsonNode Create(JsonType type, TypeCode code, object value) + { + switch (type) + { + case JsonType.Binary : return new XBinary((byte[])value); + case JsonType.Boolean : return new JsonBoolean((bool)value); + case JsonType.Number : return new JsonNumber(value.ToString()); + case JsonType.String : return new JsonString((string)value); + } + + throw new Exception($"JsonType '{type}' does not have a fast conversion"); + } + + internal static bool TryGetElementType(TypeCode code, out JsonType type) + { + switch (code) + { + case TypeCode.Boolean : type = JsonType.Boolean; return true; + case TypeCode.Byte : type = JsonType.Number; return true; + case TypeCode.DateTime : type = JsonType.Date; return true; + case TypeCode.Decimal : type = JsonType.Number; return true; + case TypeCode.Double : type = JsonType.Number; return true; + case TypeCode.Empty : type = JsonType.Null; return true; + case TypeCode.Int16 : type = JsonType.Number; return true; + case TypeCode.Int32 : type = JsonType.Number; return true; + case TypeCode.Int64 : type = JsonType.Number; return true; + case TypeCode.SByte : type = JsonType.Number; return true; + case TypeCode.Single : type = JsonType.Number; return true; + case TypeCode.String : type = JsonType.String; return true; + case TypeCode.UInt16 : type = JsonType.Number; return true; + case TypeCode.UInt32 : type = JsonType.Number; return true; + case TypeCode.UInt64 : type = JsonType.Number; return true; + } + + type = default; + + return false; + } + + internal static JsonType GetElementType(TypeCode code) + { + switch (code) + { + case TypeCode.Boolean : return JsonType.Boolean; + case TypeCode.Byte : return JsonType.Number; + case TypeCode.DateTime : return JsonType.Date; + case TypeCode.Decimal : return JsonType.Number; + case TypeCode.Double : return JsonType.Number; + case TypeCode.Empty : return JsonType.Null; + case TypeCode.Int16 : return JsonType.Number; + case TypeCode.Int32 : return JsonType.Number; + case TypeCode.Int64 : return JsonType.Number; + case TypeCode.SByte : return JsonType.Number; + case TypeCode.Single : return JsonType.Number; + case TypeCode.String : return JsonType.String; + case TypeCode.UInt16 : return JsonType.Number; + case TypeCode.UInt32 : return JsonType.Number; + case TypeCode.UInt64 : return JsonType.Number; + default : return JsonType.Object; + } + + throw new Exception($"TypeCode '{code}' does not have a fast converter"); + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/HttpPipeline.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/HttpPipeline.cs new file mode 100644 index 000000000000..2251df5b3957 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/HttpPipeline.cs @@ -0,0 +1,88 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime +{ + using System.Net.Http; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + using System.Collections; + using System.Linq; + + using GetEventData = System.Func; + using NextDelegate = System.Func, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>; + + using SignalDelegate = System.Func, System.Threading.Tasks.Task>; + using GetParameterDelegate = System.Func, string, object>; + using SendAsyncStepDelegate = System.Func, System.Threading.Tasks.Task>, System.Func, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>; + using PipelineChangeDelegate = System.Action, System.Threading.Tasks.Task>, System.Func, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>>; + using ModuleLoadPipelineDelegate = System.Action, System.Threading.Tasks.Task>, System.Func, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>>, System.Action, System.Threading.Tasks.Task>, System.Func, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>>>; + using NewRequestPipelineDelegate = System.Action, System.Action, System.Threading.Tasks.Task>, System.Func, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>>, System.Action, System.Threading.Tasks.Task>, System.Func, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>>>; + +/* + public class DelegateBasedEventListener : IEventListener + { + private EventListenerDelegate _listener; + public DelegateBasedEventListener(EventListenerDelegate listener) + { + _listener = listener; + } + public CancellationToken Token => CancellationToken.None; + public System.Action Cancel => () => { }; + + + public Task Signal(string id, CancellationToken token, GetEventData createMessage) + { + return _listener(id, token, () => createMessage()); + } + } +*/ + /// + /// This is a necessary extension to the SendAsyncFactory to support the 'generic' delegate format. + /// + public partial class SendAsyncFactory + { + /// + /// This translates a generic-defined delegate for a listener into one that fits our ISendAsync pattern. + /// (Provided to support out-of-module delegation for Azure Cmdlets) + /// + /// The Pipeline Step as a delegate + public SendAsyncFactory(SendAsyncStepDelegate step) => this.implementation = (request, listener, next) => + step( + request, + listener.Token, + listener.Cancel, + (id, token, getEventData) => listener.Signal(id, token, () => { + var data = EventDataConverter.ConvertFrom( getEventData() ) as EventData; + data.Id = id; + data.Cancel = listener.Cancel; + data.RequestMessage = request; + return data; + }), + (req, token, cancel, listenerDelegate) => next.SendAsync(req, listener)); + } + + public partial class HttpPipeline : ISendAsync + { + public HttpPipeline Append(SendAsyncStepDelegate item) + { + if (item != null) + { + Append(new SendAsyncFactory(item)); + } + return this; + } + + public HttpPipeline Prepend(SendAsyncStepDelegate item) + { + if (item != null) + { + Prepend(new SendAsyncFactory(item)); + } + return this; + } + } +} diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/HttpPipelineMocking.ps1 b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/HttpPipelineMocking.ps1 new file mode 100644 index 000000000000..a409ab14dd20 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/HttpPipelineMocking.ps1 @@ -0,0 +1,110 @@ +$ErrorActionPreference = "Stop" + +# get the recording path +if (-not $TestRecordingFile) { + $TestRecordingFile = Join-Path $PSScriptRoot 'recording.json' +} + +# create the Http Pipeline Recorder +$Mock = New-Object -Type Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PipelineMock $TestRecordingFile + +# set the recorder to the appropriate mode (default to 'live') +Write-Host -ForegroundColor Green "Running '$TestMode' mode..." +switch ($TestMode) { + 'record' { + Write-Host -ForegroundColor Green "Recording to $TestRecordingFile" + $Mock.SetRecord() + $null = erase -ea 0 $TestRecordingFile + } + 'playback' { + if (-not (Test-Path $TestRecordingFile)) { + Write-Host -fore:yellow "Recording file '$TestRecordingFile' is not present. Tests expecting recorded responses will fail" + } else { + Write-Host -ForegroundColor Green "Using recording $TestRecordingFile" + } + $Mock.SetPlayback() + $Mock.ForceResponseHeaders["Retry-After"] = "0"; + } + default: { + $Mock.SetLive() + } +} + +# overrides for Pester Describe/Context/It + +function Describe( + [Parameter(Mandatory = $true, Position = 0)] + [string] $Name, + + [Alias('Tags')] + [string[]] $Tag = @(), + + [Parameter(Position = 1)] + [ValidateNotNull()] + [ScriptBlock] $Fixture = $(Throw "No test script block is provided. (Have you put the open curly brace on the next line?)") +) { + $Mock.PushDescription($Name) + try { + return pester\Describe -Name $Name -Tag $Tag -Fixture $fixture + } + finally { + $Mock.PopDescription() + } +} + +function Context( + [Parameter(Mandatory = $true, Position = 0)] + [string] $Name, + + [Alias('Tags')] + [string[]] $Tag = @(), + + [Parameter(Position = 1)] + [ValidateNotNull()] + [ScriptBlock] $Fixture = $(Throw "No test script block is provided. (Have you put the open curly brace on the next line?)") +) { + $Mock.PushContext($Name) + try { + return pester\Context -Name $Name -Tag $Tag -Fixture $fixture + } + finally { + $Mock.PopContext() + } +} + +function It { + [CmdletBinding(DefaultParameterSetName = 'Normal')] + param( + [Parameter(Mandatory = $true, Position = 0)] + [string]$Name, + + [Parameter(Position = 1)] + [ScriptBlock] $Test = { }, + + [System.Collections.IDictionary[]] $TestCases, + + [Parameter(ParameterSetName = 'Pending')] + [Switch] $Pending, + + [Parameter(ParameterSetName = 'Skip')] + [Alias('Ignore')] + [Switch] $Skip + ) + $Mock.PushScenario($Name) + + try { + if ($skip) { + return pester\It -Name $Name -Test $Test -TestCases $TestCases -Skip + } + if ($pending) { + return pester\It -Name $Name -Test $Test -TestCases $TestCases -Pending + } + return pester\It -Name $Name -Test $Test -TestCases $TestCases + } + finally { + $null = $Mock.PopScenario() + } +} + +# set the HttpPipelineAppend for all the cmdlets +$PSDefaultParameterValues["*:HttpPipelinePrepend"] = $Mock diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/IAssociativeArray.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/IAssociativeArray.cs new file mode 100644 index 000000000000..ab621df5e040 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/IAssociativeArray.cs @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +#define DICT_PROPERTIES +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime +{ + /// A subset of IDictionary that doesn't implement IEnumerable or IDictionary to work around PowerShell's aggressive formatter + public interface IAssociativeArray + { +#if DICT_PROPERTIES + System.Collections.Generic.IEnumerable Keys { get; } + System.Collections.Generic.IEnumerable Values { get; } + int Count { get; } +#endif + System.Collections.Generic.IDictionary AdditionalProperties { get; } + T this[string index] { get; set; } + void Add(string key, T value); + bool ContainsKey(string key); + bool Remove(string key); + bool TryGetValue(string key, out T value); + void Clear(); + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/IHeaderSerializable.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/IHeaderSerializable.cs new file mode 100644 index 000000000000..0e239181946a --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/IHeaderSerializable.cs @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime +{ + public interface IHeaderSerializable + { + void ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers); + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/ISendAsync.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/ISendAsync.cs new file mode 100644 index 000000000000..471f25795c16 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/ISendAsync.cs @@ -0,0 +1,413 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime +{ + using System.Net.Http; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + using System.Collections; + using System.Linq; + using System; + + + /// + /// The interface for sending an HTTP request across the wire. + /// + public interface ISendAsync + { + Task SendAsync(HttpRequestMessage request, IEventListener callback); + } + + public class SendAsyncTerminalFactory : ISendAsyncTerminalFactory, ISendAsync + { + SendAsync implementation; + + public SendAsyncTerminalFactory(SendAsync implementation) => this.implementation = implementation; + public SendAsyncTerminalFactory(ISendAsync implementation) => this.implementation = implementation.SendAsync; + public ISendAsync Create() => this; + public Task SendAsync(HttpRequestMessage request, IEventListener callback) => implementation(request, callback); + } + + public partial class SendAsyncFactory : ISendAsyncFactory + { + public class Sender : ISendAsync + { + internal ISendAsync next; + internal SendAsyncStep implementation; + + public Task SendAsync(HttpRequestMessage request, IEventListener callback) => implementation(request, callback, next); + } + SendAsyncStep implementation; + + public SendAsyncFactory(SendAsyncStep implementation) => this.implementation = implementation; + public ISendAsync Create(ISendAsync next) => new Sender { next = next, implementation = implementation }; + + } + + public class HttpClientFactory : ISendAsyncTerminalFactory, ISendAsync + { + HttpClient client; + public HttpClientFactory() : this(new HttpClient()) + { + } + public HttpClientFactory(HttpClient client) => this.client = client; + public ISendAsync Create() => this; + + public Task SendAsync(HttpRequestMessage request, IEventListener callback) => client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead, callback.Token); + } + + public interface ISendAsyncFactory + { + ISendAsync Create(ISendAsync next); + } + + public interface ISendAsyncTerminalFactory + { + ISendAsync Create(); + } + + public partial class HttpPipeline : ISendAsync + { + private const int DefaultMaxRetry = 3; + private ISendAsync pipeline; + private ISendAsyncTerminalFactory terminal; + private List steps = new List(); + + public HttpPipeline() : this(new HttpClientFactory()) + { + } + + public HttpPipeline(ISendAsyncTerminalFactory terminalStep) + { + if (terminalStep == null) + { + throw new System.ArgumentNullException(nameof(terminalStep), "Terminal Step Factory in HttpPipeline may not be null"); + } + TerminalFactory = terminalStep; + } + + /// + /// Returns an HttpPipeline with the current state of this pipeline. + /// + public HttpPipeline Clone() => new HttpPipeline(terminal) { steps = this.steps.ToList(), pipeline = this.pipeline }; + + private bool shouldRetry429(HttpResponseMessage response) + { + if (response.StatusCode == (System.Net.HttpStatusCode)429) + { + var retryAfter = response.Headers.RetryAfter; + if (retryAfter != null && retryAfter.Delta.HasValue) + { + return true; + } + } + return false; + } + /// + /// The step to handle 429 response with retry-after header. + /// + public async Task Retry429(HttpRequestMessage request, IEventListener callback, ISendAsync next) + { + int retryCount = int.MaxValue; + + try + { + try + { + retryCount = int.Parse(System.Environment.GetEnvironmentVariable("PS_HTTP_MAX_RETRIES_FOR_429")); + } + finally + { + retryCount = int.Parse(System.Environment.GetEnvironmentVariable("AZURE_PS_HTTP_MAX_RETRIES_FOR_429")); + } + } + catch (System.Exception) + { + //no action + } + var cloneRequest = await request.CloneWithContent(); + var response = await next.SendAsync(request, callback); + int count = 0; + while (shouldRetry429(response) && count++ < retryCount) + { + request = await cloneRequest.CloneWithContent(); + var retryAfter = response.Headers.RetryAfter; + await Task.Delay(retryAfter.Delta.Value, callback.Token); + await callback.Signal("Debug", $"Start to retry {count} time(s) on status code 429 after waiting {retryAfter.Delta.Value.TotalSeconds} seconds."); + response = await next.SendAsync(request, callback); + } + return response; + } + + private bool shouldRetryError(HttpResponseMessage response) + { + if (response.StatusCode >= System.Net.HttpStatusCode.InternalServerError) + { + if (response.StatusCode != System.Net.HttpStatusCode.NotImplemented && + response.StatusCode != System.Net.HttpStatusCode.HttpVersionNotSupported) + { + return true; + } + } + else if (response.StatusCode == System.Net.HttpStatusCode.RequestTimeout) + { + return true; + } + else if (response.StatusCode == (System.Net.HttpStatusCode)429 && response.Headers.RetryAfter == null) + { + return true; + } + return false; + } + + /// + /// Returns true if status code in HttpRequestExceptionWithStatus exception is greater + /// than or equal to 500 and not NotImplemented (501) or HttpVersionNotSupported (505). + /// Or it's 429 (TOO MANY REQUESTS) without Retry-After header. + /// + public async Task RetryError(HttpRequestMessage request, IEventListener callback, ISendAsync next) + { + int retryCount = DefaultMaxRetry; + + try + { + try + { + retryCount = int.Parse(System.Environment.GetEnvironmentVariable("PS_HTTP_MAX_RETRIES")); + } + finally + { + retryCount = int.Parse(System.Environment.GetEnvironmentVariable("AZURE_PS_HTTP_MAX_RETRIES")); + } + } + catch (System.Exception) + { + //no action + } + var cloneRequest = await request.CloneWithContent(); + var response = await next.SendAsync(request, callback); + int count = 0; + while (shouldRetryError(response) && count++ < retryCount) + { + await callback.Signal("Debug", $"Start to retry {count} time(s) on status code {response.StatusCode}"); + request = await cloneRequest.CloneWithContent(); + response = await next.SendAsync(request, callback); + } + return response; + } + + public ISendAsyncTerminalFactory TerminalFactory + { + get => terminal; + set + { + if (value == null) + { + throw new System.ArgumentNullException("TerminalFactory in HttpPipeline may not be null"); + } + terminal = value; + } + } + + public ISendAsync Pipeline + { + get + { + // if the pipeline has been created and not invalidated, return it. + if (this.pipeline != null) + { + return this.pipeline; + } + + // create the pipeline from scratch. + var next = terminal.Create(); + if (Convert.ToBoolean(@"true")) + { + next = (new SendAsyncFactory(Retry429)).Create(next) ?? next; + next = (new SendAsyncFactory(RetryError)).Create(next) ?? next; + } + foreach (var factory in steps) + { + // skip factories that return null. + next = factory.Create(next) ?? next; + } + return this.pipeline = next; + } + } + + public int Count => steps.Count; + + public HttpPipeline Prepend(ISendAsyncFactory item) + { + if (item != null) + { + steps.Add(item); + pipeline = null; + } + return this; + } + + public HttpPipeline Append(SendAsyncStep item) + { + if (item != null) + { + Append(new SendAsyncFactory(item)); + } + return this; + } + + public HttpPipeline Prepend(SendAsyncStep item) + { + if (item != null) + { + Prepend(new SendAsyncFactory(item)); + } + return this; + } + public HttpPipeline Append(IEnumerable items) + { + if (items != null) + { + foreach (var item in items) + { + Append(new SendAsyncFactory(item)); + } + } + return this; + } + + public HttpPipeline Prepend(IEnumerable items) + { + if (items != null) + { + foreach (var item in items) + { + Prepend(new SendAsyncFactory(item)); + } + } + return this; + } + + public HttpPipeline Append(ISendAsyncFactory item) + { + if (item != null) + { + steps.Insert(0, item); + pipeline = null; + } + return this; + } + public HttpPipeline Prepend(IEnumerable items) + { + if (items != null) + { + foreach (var item in items) + { + Prepend(item); + } + } + return this; + } + + public HttpPipeline Append(IEnumerable items) + { + if (items != null) + { + foreach (var item in items) + { + Append(item); + } + } + return this; + } + + // you can use this as the ISendAsync Implementation + public Task SendAsync(HttpRequestMessage request, IEventListener callback) => Pipeline.SendAsync(request, callback); + } + + internal static partial class Extensions + { + internal static HttpRequestMessage CloneAndDispose(this HttpRequestMessage original, System.Uri requestUri = null, System.Net.Http.HttpMethod method = null) + { + using (original) + { + return original.Clone(requestUri, method); + } + } + + internal static Task CloneWithContentAndDispose(this HttpRequestMessage original, System.Uri requestUri = null, System.Net.Http.HttpMethod method = null) + { + using (original) + { + return original.CloneWithContent(requestUri, method); + } + } + + /// + /// Clones an HttpRequestMessage (without the content) + /// + /// Original HttpRequestMessage (Will be diposed before returning) + /// + /// + /// A clone of the HttpRequestMessage + internal static HttpRequestMessage Clone(this HttpRequestMessage original, System.Uri requestUri = null, System.Net.Http.HttpMethod method = null) + { + var clone = new HttpRequestMessage + { + Method = method ?? original.Method, + RequestUri = requestUri ?? original.RequestUri, + Version = original.Version, + }; + + foreach (KeyValuePair prop in original.Properties) + { + clone.Properties.Add(prop); + } + + foreach (KeyValuePair> header in original.Headers) + { + /* + **temporarily skip cloning telemetry related headers** + clone.Headers.TryAddWithoutValidation(header.Key, header.Value); + */ + if (!"x-ms-unique-id".Equals(header.Key) && !"x-ms-client-request-id".Equals(header.Key) && !"CommandName".Equals(header.Key) && !"FullCommandName".Equals(header.Key) && !"ParameterSetName".Equals(header.Key) && !"User-Agent".Equals(header.Key)) + { + clone.Headers.TryAddWithoutValidation(header.Key, header.Value); + } + } + + return clone; + } + + /// + /// Clones an HttpRequestMessage (including the content stream and content headers) + /// + /// Original HttpRequestMessage (Will be diposed before returning) + /// + /// + /// A clone of the HttpRequestMessage + internal static async Task CloneWithContent(this HttpRequestMessage original, System.Uri requestUri = null, System.Net.Http.HttpMethod method = null) + { + var clone = original.Clone(requestUri, method); + var stream = new System.IO.MemoryStream(); + if (original.Content != null) + { + await original.Content.CopyToAsync(stream).ConfigureAwait(false); + stream.Position = 0; + clone.Content = new StreamContent(stream); + if (original.Content.Headers != null) + { + foreach (var h in original.Content.Headers) + { + clone.Content.Headers.Add(h.Key, h.Value); + } + } + } + return clone; + } + } +} diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/InfoAttribute.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/InfoAttribute.cs new file mode 100644 index 000000000000..369f9b1294a2 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/InfoAttribute.cs @@ -0,0 +1,38 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime +{ + using System; + + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Class)] + public class InfoAttribute : Attribute + { + public bool Required { get; set; } = false; + public bool ReadOnly { get; set; } = false; + public bool Read { get; set; } = true; + public bool Create { get; set; } = true; + public bool Update { get; set; } = true; + public Type[] PossibleTypes { get; set; } = new Type[0]; + public string Description { get; set; } = ""; + public string SerializedName { get; set; } = ""; + } + + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] + public class CompleterInfoAttribute : Attribute + { + public string Script { get; set; } = ""; + public string Name { get; set; } = ""; + public string Description { get; set; } = ""; + } + + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] + public class DefaultInfoAttribute : Attribute + { + public string Script { get; set; } = ""; + public string Name { get; set; } = ""; + public string Description { get; set; } = ""; + public string SetCondition { get; set; } = ""; + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/InputHandler.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/InputHandler.cs new file mode 100644 index 000000000000..5553eca2e361 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/InputHandler.cs @@ -0,0 +1,22 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +using System; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Cmdlets +{ + public abstract class InputHandler + { + protected InputHandler NextHandler = null; + + public void SetNextHandler(InputHandler nextHandler) + { + this.NextHandler = nextHandler; + } + + public abstract void Process(Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.IContext context); + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Iso/IsoDate.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Iso/IsoDate.cs new file mode 100644 index 000000000000..1dfd32f28a2f --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Iso/IsoDate.cs @@ -0,0 +1,214 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Text; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + internal struct IsoDate + { + internal int Year { get; set; } // 0-3000 + + internal int Month { get; set; } // 1-12 + + internal int Day { get; set; } // 1-31 + + internal int Hour { get; set; } // 0-24 + + internal int Minute { get; set; } // 0-60 (60 is a special case) + + internal int Second { get; set; } // 0-60 (60 is used for leap seconds) + + internal double Millisecond { get; set; } // 0-999.9... + + internal TimeSpan Offset { get; set; } + + internal DateTimeKind Kind { get; set; } + + internal TimeSpan TimeOfDay => new TimeSpan(Hour, Minute, Second); + + internal DateTime ToDateTime() + { + if (Kind == DateTimeKind.Utc || Offset == TimeSpan.Zero) + { + return new DateTime(Year, Month, Day, Hour, Minute, Second, (int)Millisecond, DateTimeKind.Utc); + } + + return ToDateTimeOffset().DateTime; + } + + internal DateTimeOffset ToDateTimeOffset() + { + return new DateTimeOffset( + Year, + Month, + Day, + Hour, + Minute, + Second, + (int)Millisecond, + Offset + ); + } + + internal DateTime ToUtcDateTime() + { + return ToDateTimeOffset().UtcDateTime; + } + + public override string ToString() + { + var sb = new StringBuilder(); + + // yyyy-MM-dd + sb.Append($"{Year}-{Month:00}-{Day:00}"); + + if (TimeOfDay > new TimeSpan(0)) + { + sb.Append($"T{Hour:00}:{Minute:00}"); + + if (TimeOfDay.Seconds > 0) + { + sb.Append($":{Second:00}"); + } + } + + if (Offset.Ticks == 0) + { + sb.Append('Z'); // UTC + } + else + { + if (Offset.Ticks >= 0) + { + sb.Append('+'); + } + + sb.Append($"{Offset.Hours:00}:{Offset.Minutes:00}"); + } + + return sb.ToString(); + } + + internal static IsoDate FromDateTimeOffset(DateTimeOffset date) + { + return new IsoDate { + Year = date.Year, + Month = date.Month, + Day = date.Day, + Hour = date.Hour, + Minute = date.Minute, + Second = date.Second, + Offset = date.Offset, + Kind = date.Offset == TimeSpan.Zero ? DateTimeKind.Utc : DateTimeKind.Unspecified + }; + } + + private static readonly char[] timeSeperators = { ':', '.' }; + + internal static IsoDate Parse(string text) + { + var tzIndex = -1; + var timeIndex = text.IndexOf('T'); + + var builder = new IsoDate { Day = 1, Month = 1 }; + + // TODO: strip the time zone offset off the end + string dateTime = text; + string timeZone = null; + + if (dateTime.IndexOf('Z') > -1) + { + tzIndex = dateTime.LastIndexOf('Z'); + + builder.Kind = DateTimeKind.Utc; + } + else if (dateTime.LastIndexOf('+') > 10) + { + tzIndex = dateTime.LastIndexOf('+'); + } + else if (dateTime.LastIndexOf('-') > 10) + { + tzIndex = dateTime.LastIndexOf('-'); + } + + if (tzIndex > -1) + { + timeZone = dateTime.Substring(tzIndex); + dateTime = dateTime.Substring(0, tzIndex); + } + + string date = (timeIndex == -1) ? dateTime : dateTime.Substring(0, timeIndex); + + var dateParts = date.Split(Seperator.Dash); // '-' + + for (int i = 0; i < dateParts.Length; i++) + { + var part = dateParts[i]; + + switch (i) + { + case 0: builder.Year = int.Parse(part); break; + case 1: builder.Month = int.Parse(part); break; + case 2: builder.Day = int.Parse(part); break; + } + } + + if (timeIndex > -1) + { + string[] timeParts = dateTime.Substring(timeIndex + 1).Split(timeSeperators); + + for (int i = 0; i < timeParts.Length; i++) + { + var part = timeParts[i]; + + switch (i) + { + case 0: builder.Hour = int.Parse(part); break; + case 1: builder.Minute = int.Parse(part); break; + case 2: builder.Second = int.Parse(part); break; + case 3: builder.Millisecond = double.Parse("0." + part) * 1000; break; + } + } + } + + if (timeZone != null && timeZone != "Z") + { + var hours = int.Parse(timeZone.Substring(1, 2)); + var minutes = int.Parse(timeZone.Substring(4, 2)); + + if (timeZone[0] == '-') + { + hours = -hours; + minutes = -minutes; + } + + builder.Offset = new TimeSpan(hours, minutes, 0); + } + + return builder; + } + } + + /* + YYYY # eg 1997 + YYYY-MM # eg 1997-07 + YYYY-MM-DD # eg 1997-07-16 + YYYY-MM-DDThh:mmTZD # eg 1997-07-16T19:20+01:00 + YYYY-MM-DDThh:mm:ssTZD # eg 1997-07-16T19:20:30+01:00 + YYYY-MM-DDThh:mm:ss.sTZD # eg 1997-07-16T19:20:30.45+01:00 + + where: + + YYYY = four-digit year + MM = two-digit month (01=January, etc.) + DD = two-digit day of month (01 through 31) + hh = two digits of hour (00 through 23) (am/pm NOT allowed) + mm = two digits of minute (00 through 59) + ss = two digits of second (00 through 59) + s = one or more digits representing a decimal fraction of a second + TZD = time zone designator (Z or +hh:mm or -hh:mm) + */ +} diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/JsonType.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/JsonType.cs new file mode 100644 index 000000000000..cc3b87f33b0a --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/JsonType.cs @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + internal enum JsonType + { + Null = 0, + Object = 1, + Array = 2, + Binary = 3, + Boolean = 4, + Date = 5, + Number = 6, + String = 7 + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/MessageAttribute.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/MessageAttribute.cs new file mode 100644 index 000000000000..50dfe11e3509 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/MessageAttribute.cs @@ -0,0 +1,350 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime +{ + using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.generated.runtime.Properties; + using System; + using System.Collections.Generic; + using System.Globalization; + using System.Linq; + using System.Management.Automation; + using System.Text; + + [AttributeUsage(AttributeTargets.All)] + public class GenericBreakingChangeAttribute : Attribute + { + private string _message; + //A dexcription of what the change is about, non mandatory + public string ChangeDescription { get; set; } = null; + + //The version the change is effective from, non mandatory + public string DeprecateByVersion { get; } + public string DeprecateByAzVersion { get; } + + //The date on which the change comes in effect + public DateTime ChangeInEfectByDate { get; } + public bool ChangeInEfectByDateSet { get; } = false; + + //Old way of calling the cmdlet + public string OldWay { get; set; } + //New way fo calling the cmdlet + public string NewWay { get; set; } + + public GenericBreakingChangeAttribute(string message, string deprecateByAzVersion, string deprecateByVersion) + { + _message = message; + this.DeprecateByAzVersion = deprecateByAzVersion; + this.DeprecateByVersion = deprecateByVersion; + } + + public GenericBreakingChangeAttribute(string message, string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) + { + _message = message; + this.DeprecateByVersion = deprecateByVersion; + this.DeprecateByAzVersion = deprecateByAzVersion; + + if (DateTime.TryParse(changeInEfectByDate, new CultureInfo("en-US"), DateTimeStyles.None, out DateTime result)) + { + this.ChangeInEfectByDate = result; + this.ChangeInEfectByDateSet = true; + } + } + + public DateTime getInEffectByDate() + { + return this.ChangeInEfectByDate.Date; + } + + + /** + * This function prints out the breaking change message for the attribute on the cmdline + * */ + public void PrintCustomAttributeInfo(Action writeOutput) + { + + if (!GetAttributeSpecificMessage().StartsWith(Environment.NewLine)) + { + writeOutput(Environment.NewLine); + } + writeOutput(string.Format(Resources.BreakingChangesAttributesDeclarationMessage, GetAttributeSpecificMessage())); + + + if (!string.IsNullOrWhiteSpace(ChangeDescription)) + { + writeOutput(string.Format(Resources.BreakingChangesAttributesChangeDescriptionMessage, this.ChangeDescription)); + } + + if (ChangeInEfectByDateSet) + { + writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByDateMessage, this.ChangeInEfectByDate.ToString("d"))); + } + + writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByAzVersion, this.DeprecateByAzVersion)); + writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByVersion, this.DeprecateByVersion)); + + if (OldWay != null && NewWay != null) + { + writeOutput(string.Format(Resources.BreakingChangesAttributesUsageChangeMessageConsole, OldWay, NewWay)); + } + } + + public virtual bool IsApplicableToInvocation(InvocationInfo invocation) + { + return true; + } + + protected virtual string GetAttributeSpecificMessage() + { + return _message; + } + } + + [AttributeUsage(AttributeTargets.All)] + public class CmdletBreakingChangeAttribute : GenericBreakingChangeAttribute + { + + public string ReplacementCmdletName { get; set; } + + public CmdletBreakingChangeAttribute(string deprecateByAzVersion, string deprecateByVersion) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion) + { + } + + public CmdletBreakingChangeAttribute(string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion, changeInEfectByDate) + { + } + + protected override string GetAttributeSpecificMessage() + { + if (string.IsNullOrWhiteSpace(ReplacementCmdletName)) + { + return Resources.BreakingChangesAttributesCmdLetDeprecationMessageNoReplacement; + } + else + { + return string.Format(Resources.BreakingChangesAttributesCmdLetDeprecationMessageWithReplacement, ReplacementCmdletName); + } + } + } + + [AttributeUsage(AttributeTargets.All)] + public class ParameterSetBreakingChangeAttribute : GenericBreakingChangeAttribute + { + public string[] ChangedParameterSet { set; get; } + + public ParameterSetBreakingChangeAttribute(string[] changedParameterSet, string deprecateByAzVersion, string deprecateByVersion) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion) + { + ChangedParameterSet = changedParameterSet; + } + + public ParameterSetBreakingChangeAttribute(string[] changedParameterSet, string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion, changeInEfectByDate) + { + ChangedParameterSet = changedParameterSet; + } + + protected override string GetAttributeSpecificMessage() + { + + return Resources.BreakingChangesAttributesParameterSetDeprecationMessageNoReplacement; + + } + + public bool IsApplicableToInvocation(InvocationInfo invocation, string parameterSetName) + { + if (ChangedParameterSet != null) + return ChangedParameterSet.Contains(parameterSetName); + return false; + } + + } + + [AttributeUsage(AttributeTargets.All)] + public class PreviewMessageAttribute : Attribute + { + public string _message; + + public DateTime EstimatedGaDate { get; } + + public bool IsEstimatedGaDateSet { get; } = false; + + + public PreviewMessageAttribute() + { + this._message = Resources.PreviewCmdletMessage; + } + + public PreviewMessageAttribute(string message) + { + this._message = string.IsNullOrEmpty(message) ? Resources.PreviewCmdletMessage : message; + } + + public PreviewMessageAttribute(string message, string estimatedDateOfGa) : this(message) + { + if (DateTime.TryParse(estimatedDateOfGa, new CultureInfo("en-US"), DateTimeStyles.None, out DateTime result)) + { + this.EstimatedGaDate = result; + this.IsEstimatedGaDateSet = true; + } + } + + public void PrintCustomAttributeInfo(Action writeOutput) + { + writeOutput(this._message); + + if (IsEstimatedGaDateSet) + { + writeOutput(string.Format(Resources.PreviewCmdletETAMessage, this.EstimatedGaDate.ToShortDateString())); + } + } + + public virtual bool IsApplicableToInvocation(InvocationInfo invocation) + { + return true; + } + } + + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] + public class ParameterBreakingChangeAttribute : GenericBreakingChangeAttribute + { + public string NameOfParameterChanging { get; } + + public string ReplaceMentCmdletParameterName { get; set; } = null; + + public bool IsBecomingMandatory { get; set; } = false; + + public String OldParamaterType { get; set; } + + public String NewParameterType { get; set; } + + public ParameterBreakingChangeAttribute(string nameOfParameterChanging, string deprecateByAzVersion, string deprecateByVersion) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion) + { + this.NameOfParameterChanging = nameOfParameterChanging; + } + + public ParameterBreakingChangeAttribute(string nameOfParameterChanging, string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion, changeInEfectByDate) + { + this.NameOfParameterChanging = nameOfParameterChanging; + } + + protected override string GetAttributeSpecificMessage() + { + StringBuilder message = new StringBuilder(); + if (!string.IsNullOrWhiteSpace(ReplaceMentCmdletParameterName)) + { + if (IsBecomingMandatory) + { + message.Append(string.Format(Resources.BreakingChangeAttributeParameterReplacedMandatory, NameOfParameterChanging, ReplaceMentCmdletParameterName)); + } + else + { + message.Append(string.Format(Resources.BreakingChangeAttributeParameterReplaced, NameOfParameterChanging, ReplaceMentCmdletParameterName)); + } + } + else + { + if (IsBecomingMandatory) + { + message.Append(string.Format(Resources.BreakingChangeAttributeParameterMandatoryNow, NameOfParameterChanging)); + } + else + { + message.Append(string.Format(Resources.BreakingChangeAttributeParameterChanging, NameOfParameterChanging)); + } + } + + //See if the type of the param is changing + if (OldParamaterType != null && !string.IsNullOrWhiteSpace(NewParameterType)) + { + message.Append(string.Format(Resources.BreakingChangeAttributeParameterTypeChange, OldParamaterType, NewParameterType)); + } + return message.ToString(); + } + + /// + /// See if the bound parameters contain the current parameter, if they do + /// then the attribbute is applicable + /// If the invocationInfo is null we return true + /// + /// + /// bool + public override bool IsApplicableToInvocation(InvocationInfo invocationInfo) + { + bool? applicable = invocationInfo == null ? true : invocationInfo.BoundParameters?.Keys?.Contains(this.NameOfParameterChanging); + return applicable.HasValue ? applicable.Value : false; + } + } + + [AttributeUsage(AttributeTargets.All)] + public class OutputBreakingChangeAttribute : GenericBreakingChangeAttribute + { + public string DeprecatedCmdLetOutputType { get; } + + //This is still a String instead of a Type as this + //might be undefined at the time of adding the attribute + public string ReplacementCmdletOutputType { get; set; } + + public string[] DeprecatedOutputProperties { get; set; } + + public string[] NewOutputProperties { get; set; } + + public OutputBreakingChangeAttribute(string deprecatedCmdletOutputType, string deprecateByAzVersion, string deprecateByVersion) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion) + { + this.DeprecatedCmdLetOutputType = deprecatedCmdletOutputType; + } + + public OutputBreakingChangeAttribute(string deprecatedCmdletOutputType, string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion, changeInEfectByDate) + { + this.DeprecatedCmdLetOutputType = deprecatedCmdletOutputType; + } + + protected override string GetAttributeSpecificMessage() + { + StringBuilder message = new StringBuilder(); + + //check for the deprecation scenario + if (string.IsNullOrWhiteSpace(ReplacementCmdletOutputType) && NewOutputProperties == null && DeprecatedOutputProperties == null && string.IsNullOrWhiteSpace(ChangeDescription)) + { + message.Append(string.Format(Resources.BreakingChangesAttributesCmdLetOutputTypeDeprecated, DeprecatedCmdLetOutputType)); + } + else + { + if (!string.IsNullOrWhiteSpace(ReplacementCmdletOutputType)) + { + message.Append(string.Format(Resources.BreakingChangesAttributesCmdLetOutputChange1, DeprecatedCmdLetOutputType, ReplacementCmdletOutputType)); + } + else + { + message.Append(string.Format(Resources.BreakingChangesAttributesCmdLetOutputChange2, DeprecatedCmdLetOutputType)); + } + + if (DeprecatedOutputProperties != null && DeprecatedOutputProperties.Length > 0) + { + message.Append(Resources.BreakingChangesAttributesCmdLetOutputPropertiesRemoved); + foreach (string property in DeprecatedOutputProperties) + { + message.Append(" '" + property + "'"); + } + } + + if (NewOutputProperties != null && NewOutputProperties.Length > 0) + { + message.Append(Resources.BreakingChangesAttributesCmdLetOutputPropertiesAdded); + foreach (string property in NewOutputProperties) + { + message.Append(" '" + property + "'"); + } + } + } + return message.ToString(); + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/MessageAttributeHelper.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/MessageAttributeHelper.cs new file mode 100644 index 000000000000..30cf0d1d76ca --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/MessageAttributeHelper.cs @@ -0,0 +1,184 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime +{ + using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.generated.runtime.Properties; + using System; + using System.Collections.Generic; + using System.Linq; + using System.Management.Automation; + using System.Reflection; + using System.Text; + using System.Threading.Tasks; + public class MessageAttributeHelper + { + private static readonly bool IsAzure = Convert.ToBoolean(@"true"); + public const string BREAKING_CHANGE_ATTRIBUTE_INFORMATION_LINK = "https://aka.ms/azps-changewarnings"; + public const string SUPPRESS_ERROR_OR_WARNING_MESSAGE_ENV_VARIABLE_NAME = "SuppressAzurePowerShellBreakingChangeWarnings"; + + /** + * This function takes in a CommandInfo (CmdletInfo or FunctionInfo) + * And reads all the deprecation attributes attached to it + * Prints a message on the cmdline For each of the attribute found + * + * the boundParameterNames is a list of parameters bound to the cmdlet at runtime, + * We only process the Parameter beaking change attributes attached only params listed in this list (if present) + * */ + public static void ProcessCustomAttributesAtRuntime(CommandInfo commandInfo, InvocationInfo invocationInfo, String parameterSet, System.Management.Automation.PSCmdlet psCmdlet, bool showPreviewMessage = true) + { + bool supressWarningOrError = false; + + try + { + supressWarningOrError = bool.Parse(System.Environment.GetEnvironmentVariable(SUPPRESS_ERROR_OR_WARNING_MESSAGE_ENV_VARIABLE_NAME)); + } + catch (Exception) + { + //no action + } + + if (supressWarningOrError) + { + //Do not process the attributes at runtime... The env variable to override the warning messages is set + return; + } + if (IsAzure && invocationInfo.BoundParameters.ContainsKey("DefaultProfile")) + { + psCmdlet.WriteWarning("The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription."); + } + + ProcessBreakingChangeAttributesAtRuntime(commandInfo, invocationInfo, parameterSet, psCmdlet); + + } + + private static void ProcessBreakingChangeAttributesAtRuntime(CommandInfo commandInfo, InvocationInfo invocationInfo, String parameterSet, System.Management.Automation.PSCmdlet psCmdlet) + { + List attributes = new List(GetAllBreakingChangeAttributesInType(commandInfo, invocationInfo, parameterSet)); + StringBuilder sb = new StringBuilder(); + Action appendAttributeMessage = (string s) => sb.Append(s); + + if (attributes != null && attributes.Count > 0) + { + appendAttributeMessage(string.Format(Resources.BreakingChangesAttributesHeaderMessage, commandInfo.Name.Split('_')[0])); + + foreach (GenericBreakingChangeAttribute attribute in attributes) + { + attribute.PrintCustomAttributeInfo(appendAttributeMessage); + } + + appendAttributeMessage(string.Format(Resources.BreakingChangesAttributesFooterMessage, BREAKING_CHANGE_ATTRIBUTE_INFORMATION_LINK)); + + psCmdlet.WriteWarning(sb.ToString()); + } + } + + + public static void ProcessPreviewMessageAttributesAtRuntime(CommandInfo commandInfo, InvocationInfo invocationInfo, String parameterSet, System.Management.Automation.PSCmdlet psCmdlet) + { + List previewAttributes = new List(GetAllPreviewAttributesInType(commandInfo, invocationInfo)); + StringBuilder sb = new StringBuilder(); + Action appendAttributeMessage = (string s) => sb.Append(s); + + if (previewAttributes != null && previewAttributes.Count > 0) + { + foreach (PreviewMessageAttribute attribute in previewAttributes) + { + attribute.PrintCustomAttributeInfo(appendAttributeMessage); + } + psCmdlet.WriteWarning(sb.ToString()); + } + } + + /** + * This function takes in a CommandInfo (CmdletInfo or FunctionInfo) + * And returns all the deprecation attributes attached to it + * + * the boundParameterNames is a list of parameters bound to the cmdlet at runtime, + * We only process the Parameter beaking change attributes attached only params listed in this list (if present) + **/ + private static IEnumerable GetAllBreakingChangeAttributesInType(CommandInfo commandInfo, InvocationInfo invocationInfo, String parameterSet) + { + List attributeList = new List(); + + if (commandInfo.GetType() == typeof(CmdletInfo)) + { + var type = ((CmdletInfo)commandInfo).ImplementingType; + attributeList.AddRange(type.GetCustomAttributes(typeof(GenericBreakingChangeAttribute), false).Cast()); + + foreach (MethodInfo m in type.GetRuntimeMethods()) + { + attributeList.AddRange((m.GetCustomAttributes(typeof(GenericBreakingChangeAttribute), false).Cast())); + } + + foreach (FieldInfo f in type.GetRuntimeFields()) + { + attributeList.AddRange(f.GetCustomAttributes(typeof(GenericBreakingChangeAttribute), false).Cast()); + } + + foreach (PropertyInfo p in type.GetRuntimeProperties()) + { + attributeList.AddRange(p.GetCustomAttributes(typeof(GenericBreakingChangeAttribute), false).Cast()); + } + } + else if (commandInfo.GetType() == typeof(FunctionInfo)) + { + attributeList.AddRange(((FunctionInfo)commandInfo).ScriptBlock.Attributes.Where(e => typeof(GenericBreakingChangeAttribute).IsAssignableFrom(e.GetType())).Cast()); + foreach (var parameter in ((FunctionInfo)commandInfo).Parameters) + { + attributeList.AddRange(parameter.Value.Attributes.Where(e => typeof(GenericBreakingChangeAttribute).IsAssignableFrom(e.GetType())).Cast()); + } + } + return invocationInfo == null ? attributeList : attributeList.Where(e => e.GetType() == typeof(ParameterSetBreakingChangeAttribute) ? ((ParameterSetBreakingChangeAttribute)e).IsApplicableToInvocation(invocationInfo, parameterSet) : e.IsApplicableToInvocation(invocationInfo)); + } + + public static bool ContainsPreviewAttribute(CommandInfo commandInfo, InvocationInfo invocationInfo) + { + return GetAllPreviewAttributesInType(commandInfo, invocationInfo)?.Count() > 0; + } + + private static IEnumerable GetAllPreviewAttributesInType(CommandInfo commandInfo, InvocationInfo invocationInfo) + { + List attributeList = new List(); + if (commandInfo.GetType() == typeof(CmdletInfo)) + { + var type = ((CmdletInfo)commandInfo).ImplementingType; + attributeList.AddRange(type.GetCustomAttributes(typeof(PreviewMessageAttribute), false).Cast()); + + foreach (MethodInfo m in type.GetRuntimeMethods()) + { + attributeList.AddRange((m.GetCustomAttributes(typeof(PreviewMessageAttribute), false).Cast())); + } + + foreach (FieldInfo f in type.GetRuntimeFields()) + { + attributeList.AddRange(f.GetCustomAttributes(typeof(PreviewMessageAttribute), false).Cast()); + } + + foreach (PropertyInfo p in type.GetRuntimeProperties()) + { + attributeList.AddRange(p.GetCustomAttributes(typeof(PreviewMessageAttribute), false).Cast()); + } + } + else if (commandInfo.GetType() == typeof(FunctionInfo)) + { + attributeList.AddRange(((FunctionInfo)commandInfo).ScriptBlock.Attributes.Where(e => typeof(PreviewMessageAttribute).IsAssignableFrom(e.GetType())).Cast()); + foreach (var parameter in ((FunctionInfo)commandInfo).Parameters) + { + attributeList.AddRange(parameter.Value.Attributes.Where(e => typeof(PreviewMessageAttribute).IsAssignableFrom(e.GetType())).Cast()); + } + } + return invocationInfo == null ? attributeList : attributeList.Where(e => e.IsApplicableToInvocation(invocationInfo)); + } + } +} diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Method.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Method.cs new file mode 100644 index 000000000000..45bc1ecc3788 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Method.cs @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime +{ + internal static class Method + { + internal static System.Net.Http.HttpMethod Get = System.Net.Http.HttpMethod.Get; + internal static System.Net.Http.HttpMethod Put = System.Net.Http.HttpMethod.Put; + internal static System.Net.Http.HttpMethod Head = System.Net.Http.HttpMethod.Head; + internal static System.Net.Http.HttpMethod Post = System.Net.Http.HttpMethod.Post; + internal static System.Net.Http.HttpMethod Delete = System.Net.Http.HttpMethod.Delete; + internal static System.Net.Http.HttpMethod Options = System.Net.Http.HttpMethod.Options; + internal static System.Net.Http.HttpMethod Trace = System.Net.Http.HttpMethod.Trace; + internal static System.Net.Http.HttpMethod Patch = new System.Net.Http.HttpMethod("PATCH"); + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Models/JsonMember.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Models/JsonMember.cs new file mode 100644 index 000000000000..b02befa5b0e4 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Models/JsonMember.cs @@ -0,0 +1,83 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Reflection; +using System.Runtime.Serialization; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + + + internal sealed class JsonMember + { + private readonly TypeDetails type; + + private readonly Func getter; + private readonly Action setter; + + internal JsonMember(PropertyInfo property, int defaultOrder) + { + getter = property.GetValue; + setter = property.SetValue; + + var dataMember = property.GetCustomAttribute(); + + Name = dataMember?.Name ?? property.Name; + Order = dataMember?.Order ?? defaultOrder; + EmitDefaultValue = dataMember?.EmitDefaultValue ?? true; + + this.type = TypeDetails.Get(property.PropertyType); + + CanRead = property.CanRead; + } + + internal JsonMember(FieldInfo field, int defaultOrder) + { + getter = field.GetValue; + setter = field.SetValue; + + var dataMember = field.GetCustomAttribute(); + + Name = dataMember?.Name ?? field.Name; + Order = dataMember?.Order ?? defaultOrder; + EmitDefaultValue = dataMember?.EmitDefaultValue ?? true; + + this.type = TypeDetails.Get(field.FieldType); + + CanRead = true; + } + + internal string Name { get; } + + internal int Order { get; } + + internal TypeDetails TypeDetails => type; + + internal Type Type => type.NonNullType; + + internal bool IsList => type.IsList; + + // Arrays, Sets, ... + internal Type ElementType => type.ElementType; + + internal IJsonConverter Converter => type.JsonConverter; + + internal bool EmitDefaultValue { get; } + + internal bool IsStringLike => type.IsStringLike; + + internal object DefaultValue => type.DefaultValue; + + internal bool CanRead { get; } + + #region Helpers + + internal object GetValue(object instance) => getter(instance); + + internal void SetValue(object instance, object value) => setter(instance, value); + + #endregion + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Models/JsonModel.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Models/JsonModel.cs new file mode 100644 index 000000000000..690c9fce3306 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Models/JsonModel.cs @@ -0,0 +1,89 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; +using System.Reflection; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + internal class JsonModel + { + private Dictionary map; + private readonly object _sync = new object(); + + private JsonModel(Type type, List members) + { + Type = type ?? throw new ArgumentNullException(nameof(type)); + Members = members ?? throw new ArgumentNullException(nameof(members)); + } + + internal string Name => Type.Name; + + internal Type Type { get; } + + internal List Members { get; } + + internal JsonMember this[string name] + { + get + { + if (map == null) + { + lock (_sync) + { + if (map == null) + { + map = new Dictionary(); + + foreach (JsonMember m in Members) + { + map[m.Name.ToLower()] = m; + } + } + } + } + + + map.TryGetValue(name.ToLower(), out JsonMember member); + + return member; + } + } + + internal static JsonModel FromType(Type type) + { + var members = new List(); + + int i = 0; + + // BindingFlags.Instance | BindingFlags.Public + + foreach (var member in type.GetFields()) + { + if (member.IsStatic) continue; + + if (member.IsDefined(typeof(IgnoreDataMemberAttribute))) continue; + + members.Add(new JsonMember(member, i)); + + i++; + } + + foreach (var member in type.GetProperties(BindingFlags.Public | BindingFlags.Instance)) + { + if (member.IsDefined(typeof(IgnoreDataMemberAttribute))) continue; + + members.Add(new JsonMember(member, i)); + + i++; + } + + members.Sort((a, b) => a.Order.CompareTo(b.Order)); // inline sort + + return new JsonModel(type, members); + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Models/JsonModelCache.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Models/JsonModelCache.cs new file mode 100644 index 000000000000..3341c3e5ff7c --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Models/JsonModelCache.cs @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Runtime.CompilerServices; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + internal static class JsonModelCache + { + private static readonly ConditionalWeakTable cache + = new ConditionalWeakTable(); + + internal static JsonModel Get(Type type) => cache.GetValue(type, Create); + + private static JsonModel Create(Type type) => JsonModel.FromType(type); + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/Collections/JsonArray.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/Collections/JsonArray.cs new file mode 100644 index 000000000000..63a17c70c0ec --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/Collections/JsonArray.cs @@ -0,0 +1,65 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + public abstract partial class JsonArray : JsonNode, IEnumerable + { + internal override JsonType Type => JsonType.Array; + + internal abstract JsonType? ElementType { get; } + + public abstract int Count { get; } + + internal virtual bool IsSet => false; + + internal bool IsEmpty => Count == 0; + + #region IEnumerable + + IEnumerator IEnumerable.GetEnumerator() + { + throw new NotImplementedException(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + throw new NotImplementedException(); + } + + #endregion + + #region Static Helpers + + internal static JsonArray Create(short[] values) + => new XImmutableArray(values); + + internal static JsonArray Create(int[] values) + => new XImmutableArray(values); + + internal static JsonArray Create(long[] values) + => new XImmutableArray(values); + + internal static JsonArray Create(decimal[] values) + => new XImmutableArray(values); + + internal static JsonArray Create(float[] values) + => new XImmutableArray(values); + + internal static JsonArray Create(string[] values) + => new XImmutableArray(values); + + internal static JsonArray Create(XBinary[] values) + => new XImmutableArray(values); + + #endregion + + internal static new JsonArray Parse(string text) + => (JsonArray)JsonNode.Parse(text); + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/Collections/XImmutableArray.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/Collections/XImmutableArray.cs new file mode 100644 index 000000000000..6f45fcd5cb7b --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/Collections/XImmutableArray.cs @@ -0,0 +1,62 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + internal sealed class XImmutableArray : JsonArray, IEnumerable + { + private readonly T[] values; + private readonly JsonType elementType; + private readonly TypeCode elementCode; + + internal XImmutableArray(T[] values) + { + this.values = values ?? throw new ArgumentNullException(nameof(values)); + this.elementCode = System.Type.GetTypeCode(typeof(T)); + this.elementType = XHelper.GetElementType(this.elementCode); + } + + public override JsonNode this[int index] => + XHelper.Create(elementType, elementCode, values[index]); + + internal override JsonType? ElementType => elementType; + + public override int Count => values.Length; + + public bool IsReadOnly => true; + + #region IEnumerable Members + + IEnumerator IEnumerable.GetEnumerator() + { + foreach (T value in values) + { + yield return XHelper.Create(elementType, elementCode, value); + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + foreach (T value in values) + { + yield return XHelper.Create(elementType, elementCode, value); + } + } + + #endregion + + #region Static Constructor + + internal XImmutableArray Create(T[] items) + { + return new XImmutableArray(items); + } + + #endregion + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/Collections/XList.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/Collections/XList.cs new file mode 100644 index 000000000000..031289069bc2 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/Collections/XList.cs @@ -0,0 +1,64 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + internal sealed class XList : JsonArray, IEnumerable + { + private readonly IList values; + private readonly JsonType elementType; + private readonly TypeCode elementCode; + + internal XList(IList values) + { + this.values = values ?? throw new ArgumentNullException(nameof(values)); + this.elementCode = System.Type.GetTypeCode(typeof(T)); + this.elementType = XHelper.GetElementType(this.elementCode); + } + + public override JsonNode this[int index] => + XHelper.Create(elementType, elementCode, values[index]); + + internal override JsonType? ElementType => elementType; + + public override int Count => values.Count; + + public bool IsReadOnly => values.IsReadOnly; + + #region IList + + public void Add(T value) + { + values.Add(value); + } + + public bool Contains(T value) => values.Contains(value); + + #endregion + + #region IEnumerable Members + + IEnumerator IEnumerable.GetEnumerator() + { + foreach (var value in values) + { + yield return XHelper.Create(elementType, elementCode, value); + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + foreach (var value in values) + { + yield return XHelper.Create(elementType, elementCode, value); + } + } + + #endregion + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/Collections/XNodeArray.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/Collections/XNodeArray.cs new file mode 100644 index 000000000000..1718b79534df --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/Collections/XNodeArray.cs @@ -0,0 +1,73 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System.Collections; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + public sealed partial class XNodeArray : JsonArray, ICollection + { + private readonly List items; + + internal XNodeArray() + { + items = new List(); + } + + internal XNodeArray(params JsonNode[] values) + { + items = new List(values); + } + + internal XNodeArray(System.Collections.Generic.List values) + { + items = new List(values); + } + + public override JsonNode this[int index] => items[index]; + + internal override JsonType? ElementType => null; + + public bool IsReadOnly => false; + + public override int Count => items.Count; + + #region ICollection Members + + public void Add(JsonNode item) + { + items.Add(item); + } + + void ICollection.Clear() + { + items.Clear(); + } + + public bool Contains(JsonNode item) => items.Contains(item); + + void ICollection.CopyTo(JsonNode[] array, int arrayIndex) + { + items.CopyTo(array, arrayIndex); + } + + public bool Remove(JsonNode item) + { + return items.Remove(item); + } + + #endregion + + #region IEnumerable Members + + IEnumerator IEnumerable.GetEnumerator() + => items.GetEnumerator(); + + IEnumerator IEnumerable.GetEnumerator() + => items.GetEnumerator(); + + #endregion + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/Collections/XSet.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/Collections/XSet.cs new file mode 100644 index 000000000000..b4a9165f0945 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/Collections/XSet.cs @@ -0,0 +1,60 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + internal sealed class XSet : JsonArray, IEnumerable + { + private readonly HashSet values; + private readonly JsonType elementType; + private readonly TypeCode elementCode; + + internal XSet(IEnumerable values) + : this(new HashSet(values)) + { } + + internal XSet(HashSet values) + { + this.values = values ?? throw new ArgumentNullException(nameof(values)); + this.elementCode = System.Type.GetTypeCode(typeof(T)); + this.elementType = XHelper.GetElementType(this.elementCode); + } + + internal override JsonType Type => JsonType.Array; + + internal override JsonType? ElementType => elementType; + + public bool IsReadOnly => true; + + public override int Count => values.Count; + + internal override bool IsSet => true; + + #region IEnumerable Members + + IEnumerator IEnumerable.GetEnumerator() + { + foreach (var value in values) + { + yield return XHelper.Create(elementType, elementCode, value); + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + foreach (var value in values) + { + yield return XHelper.Create(elementType, elementCode, value); + } + } + + #endregion + + internal HashSet AsHashSet() => values; + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/JsonBoolean.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/JsonBoolean.cs new file mode 100644 index 000000000000..949019ca6f18 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/JsonBoolean.cs @@ -0,0 +1,42 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + internal sealed partial class JsonBoolean : JsonNode + { + internal static readonly JsonBoolean True = new JsonBoolean(true); + internal static readonly JsonBoolean False = new JsonBoolean(false); + + internal JsonBoolean(bool value) + { + Value = value; + } + + internal bool Value { get; } + + internal override JsonType Type => JsonType.Boolean; + + internal static new JsonBoolean Parse(string text) + { + switch (text) + { + case "false": return False; + case "true": return True; + + default: throw new ArgumentException($"Expected true or false. Was {text}."); + } + } + + #region Implicit Casts + + public static implicit operator bool(JsonBoolean data) => data.Value; + + public static implicit operator JsonBoolean(bool data) => new JsonBoolean(data); + + #endregion + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/JsonDate.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/JsonDate.cs new file mode 100644 index 000000000000..30c34318a42b --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/JsonDate.cs @@ -0,0 +1,173 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + + + internal sealed partial class JsonDate : JsonNode, IEquatable, IComparable + { + internal static bool AssumeUtcWhenKindIsUnspecified = true; + + private readonly DateTimeOffset value; + + internal JsonDate(DateTime value) + { + if (value.Kind == DateTimeKind.Unspecified && AssumeUtcWhenKindIsUnspecified) + { + value = DateTime.SpecifyKind(value, DateTimeKind.Utc); + } + + this.value = value; + } + + internal JsonDate(DateTimeOffset value) + { + this.value = value; + } + + internal override JsonType Type => JsonType.Date; + + #region Helpers + + internal DateTimeOffset ToDateTimeOffset() + { + return value; + } + + internal DateTime ToDateTime() + { + if (value.Offset == TimeSpan.Zero) + { + return value.UtcDateTime; + } + + return value.DateTime; + } + + internal DateTime ToUtcDateTime() => value.UtcDateTime; + + internal int ToUnixTimeSeconds() + { + return (int)value.ToUnixTimeSeconds(); + } + + internal long ToUnixTimeMilliseconds() + { + return (int)value.ToUnixTimeMilliseconds(); + } + + internal string ToIsoString() + { + return IsoDate.FromDateTimeOffset(value).ToString(); + } + + #endregion + + public override string ToString() + { + return ToIsoString(); + } + + internal static new JsonDate Parse(string text) + { + if (text == null) throw new ArgumentNullException(nameof(text)); + + // TODO support: unixtimeseconds.partialseconds + + if (text.Length > 4 && _IsNumber(text)) // UnixTime + { + var date = DateTimeOffset.FromUnixTimeSeconds(long.Parse(text)); + + return new JsonDate(date); + } + else if (text.Length <= 4 || text[4] == '-') // ISO: 2012- + { + return new JsonDate(IsoDate.Parse(text).ToDateTimeOffset()); + } + else + { + // NOT ISO ENCODED + // "Thu, 5 Apr 2012 16:59:01 +0200", + return new JsonDate(DateTimeOffset.Parse(text)); + } + } + + private static bool _IsNumber(string text) + { + foreach (var c in text) + { + if (!char.IsDigit(c)) return false; + } + + return true; + } + + internal static JsonDate FromUnixTime(int seconds) + { + return new JsonDate(DateTimeOffset.FromUnixTimeSeconds(seconds)); + } + + internal static JsonDate FromUnixTime(double seconds) + { + var milliseconds = (long)(seconds * 1000d); + + return new JsonDate(DateTimeOffset.FromUnixTimeMilliseconds(milliseconds)); + } + + #region Implicit Casts + + public static implicit operator DateTimeOffset(JsonDate value) + => value.ToDateTimeOffset(); + + public static implicit operator DateTime(JsonDate value) + => value.ToDateTime(); + + // From Date + public static implicit operator JsonDate(DateTimeOffset value) + { + return new JsonDate(value); + } + + public static implicit operator JsonDate(DateTime value) + { + return new JsonDate(value); + } + + // From String + public static implicit operator JsonDate(string value) + { + return Parse(value); + } + + #endregion + + #region Equality + + public override bool Equals(object obj) + { + return obj is JsonDate date && date.value == this.value; + } + + public bool Equals(JsonDate other) + { + return this.value == other.value; + } + + public override int GetHashCode() => value.GetHashCode(); + + #endregion + + #region IComparable Members + + int IComparable.CompareTo(JsonDate other) + { + return value.CompareTo(other.value); + } + + #endregion + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/JsonNode.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/JsonNode.cs new file mode 100644 index 000000000000..114f027ea04f --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/JsonNode.cs @@ -0,0 +1,250 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.IO; +using System.Text; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + + + public abstract partial class JsonNode + { + internal abstract JsonType Type { get; } + + public virtual JsonNode this[int index] => throw new NotImplementedException(); + + public virtual JsonNode this[string name] + { + get => throw new NotImplementedException(); + set => throw new NotImplementedException(); + } + + #region Type Helpers + + internal bool IsArray => Type == JsonType.Array; + + internal bool IsDate => Type == JsonType.Date; + + internal bool IsObject => Type == JsonType.Object; + + internal bool IsNumber => Type == JsonType.Number; + + internal bool IsNull => Type == JsonType.Null; + + #endregion + + internal void WriteTo(TextWriter textWriter, bool pretty = true) + { + var writer = new JsonWriter(textWriter, pretty); + + writer.WriteNode(this); + } + + internal T As() + where T : new() + => new JsonSerializer().Deseralize((JsonObject)this); + + internal T[] ToArrayOf() + { + return (T[])new JsonSerializer().DeserializeArray(typeof(T[]), (JsonArray)this); + } + + #region ToString Overrides + + public override string ToString() => ToString(pretty: true); + + internal string ToString(bool pretty) + { + var sb = new StringBuilder(); + + using (var writer = new StringWriter(sb)) + { + WriteTo(writer, pretty); + + return sb.ToString(); + } + } + + #endregion + + #region Static Constructors + + internal static JsonNode Parse(string text) + { + return Parse(new SourceReader(new StringReader(text))); + } + + internal static JsonNode Parse(TextReader textReader) + => Parse(new SourceReader(textReader)); + + private static JsonNode Parse(SourceReader sourceReader) + { + using (var parser = new JsonParser(sourceReader)) + { + return parser.ReadNode(); + } + } + + internal static JsonNode FromObject(object instance) + => new JsonSerializer().Serialize(instance); + + #endregion + + #region Implict Casts + + public static implicit operator string(JsonNode node) => node.ToString(); + + #endregion + + #region Explict Casts + + public static explicit operator DateTime(JsonNode node) + { + switch (node.Type) + { + case JsonType.Date: + return ((JsonDate)node).ToDateTime(); + + case JsonType.String: + return JsonDate.Parse(node.ToString()).ToDateTime(); + + case JsonType.Number: + var num = (JsonNumber)node; + + if (num.IsInteger) + { + return DateTimeOffset.FromUnixTimeSeconds(num).UtcDateTime; + } + else + { + return DateTimeOffset.FromUnixTimeMilliseconds((long)((double)num * 1000)).UtcDateTime; + } + } + + throw new ConversionException(node, typeof(DateTime)); + } + + public static explicit operator DateTimeOffset(JsonNode node) + { + switch (node.Type) + { + case JsonType.Date : return ((JsonDate)node).ToDateTimeOffset(); + case JsonType.String : return JsonDate.Parse(node.ToString()).ToDateTimeOffset(); + + case JsonType.Number: + var num = (JsonNumber)node; + + if (num.IsInteger) + { + return DateTimeOffset.FromUnixTimeSeconds(num); + } + else + { + return DateTimeOffset.FromUnixTimeMilliseconds((long)((double)num * 1000)); + } + + } + + throw new ConversionException(node, typeof(DateTimeOffset)); + } + + public static explicit operator float(JsonNode node) + { + switch (node.Type) + { + case JsonType.Number : return (JsonNumber)node; + case JsonType.String : return float.Parse(node.ToString()); + } + + throw new ConversionException(node, typeof(float)); + } + + public static explicit operator double(JsonNode node) + { + switch (node.Type) + { + case JsonType.Number : return (JsonNumber)node; + case JsonType.String : return double.Parse(node.ToString()); + } + + throw new ConversionException(node, typeof(double)); + } + + public static explicit operator decimal(JsonNode node) + { + switch (node.Type) + { + case JsonType.Number: return (JsonNumber)node; + case JsonType.String: return decimal.Parse(node.ToString()); + } + + throw new ConversionException(node, typeof(decimal)); + } + + public static explicit operator Guid(JsonNode node) + => new Guid(node.ToString()); + + public static explicit operator short(JsonNode node) + { + switch (node.Type) + { + case JsonType.Number : return (JsonNumber)node; + case JsonType.String : return short.Parse(node.ToString()); + } + + throw new ConversionException(node, typeof(short)); + } + + public static explicit operator int(JsonNode node) + { + switch (node.Type) + { + case JsonType.Number : return (JsonNumber)node; + case JsonType.String : return int.Parse(node.ToString()); + } + + throw new ConversionException(node, typeof(int)); + } + + public static explicit operator long(JsonNode node) + { + switch (node.Type) + { + case JsonType.Number: return (JsonNumber)node; + case JsonType.String: return long.Parse(node.ToString()); + } + + throw new ConversionException(node, typeof(long)); + } + + public static explicit operator bool(JsonNode node) + => ((JsonBoolean)node).Value; + + public static explicit operator ushort(JsonNode node) + => (JsonNumber)node; + + public static explicit operator uint(JsonNode node) + => (JsonNumber)node; + + public static explicit operator ulong(JsonNode node) + => (JsonNumber)node; + + public static explicit operator TimeSpan(JsonNode node) + => TimeSpan.Parse(node.ToString()); + + public static explicit operator Uri(JsonNode node) + { + if (node.Type == JsonType.String) + { + return new Uri(node.ToString()); + } + + throw new ConversionException(node, typeof(Uri)); + } + + #endregion + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/JsonNumber.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/JsonNumber.cs new file mode 100644 index 000000000000..43e96f0b9684 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/JsonNumber.cs @@ -0,0 +1,109 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + public sealed partial class JsonNumber : JsonNode + { + private readonly string value; + private readonly bool overflows = false; + + internal JsonNumber(string value) + { + this.value = value ?? throw new ArgumentNullException(nameof(value)); + } + + internal JsonNumber(int value) + { + this.value = value.ToString(); + } + + internal JsonNumber(long value) + { + this.value = value.ToString(); + + if (value > 9007199254740991) + { + overflows = true; + } + } + + internal JsonNumber(float value) + { + this.value = value.ToString(System.Globalization.CultureInfo.InvariantCulture); + } + + internal JsonNumber(double value) + { + this.value = value.ToString(System.Globalization.CultureInfo.InvariantCulture); + } + + internal override JsonType Type => JsonType.Number; + + internal string Value => value; + + #region Helpers + + internal bool Overflows => overflows; + + internal bool IsInteger => !value.Contains("."); + + internal bool IsFloat => value.Contains("."); + + #endregion + + #region Casting + + public static implicit operator byte(JsonNumber number) + => byte.Parse(number.Value); + + public static implicit operator short(JsonNumber number) + => short.Parse(number.Value); + + public static implicit operator int(JsonNumber number) + => int.Parse(number.Value); + + public static implicit operator long(JsonNumber number) + => long.Parse(number.value); + + public static implicit operator UInt16(JsonNumber number) + => ushort.Parse(number.Value); + + public static implicit operator UInt32(JsonNumber number) + => uint.Parse(number.Value); + + public static implicit operator UInt64(JsonNumber number) + => ulong.Parse(number.Value); + + public static implicit operator decimal(JsonNumber number) + => decimal.Parse(number.Value, System.Globalization.CultureInfo.InvariantCulture); + + public static implicit operator Double(JsonNumber number) + => double.Parse(number.value, System.Globalization.CultureInfo.InvariantCulture); + + public static implicit operator float(JsonNumber number) + => float.Parse(number.value, System.Globalization.CultureInfo.InvariantCulture); + + public static implicit operator JsonNumber(short data) + => new JsonNumber(data.ToString()); + + public static implicit operator JsonNumber(int data) + => new JsonNumber(data); + + public static implicit operator JsonNumber(long data) + => new JsonNumber(data); + + public static implicit operator JsonNumber(Single data) + => new JsonNumber(data.ToString()); + + public static implicit operator JsonNumber(double data) + => new JsonNumber(data.ToString()); + + #endregion + + public override string ToString() => value; + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/JsonObject.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/JsonObject.cs new file mode 100644 index 000000000000..585502cd5843 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/JsonObject.cs @@ -0,0 +1,172 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + public partial class JsonObject : JsonNode, IDictionary + { + private readonly Dictionary items; + + internal JsonObject() + { + items = new Dictionary(); + } + + internal JsonObject(IEnumerable> properties) + { + if (properties == null) throw new ArgumentNullException(nameof(properties)); + + items = new Dictionary(); + + foreach (var field in properties) + { + items.Add(field.Key, field.Value); + } + } + + #region IDictionary Constructors + + internal JsonObject(IDictionary dic) + { + items = new Dictionary(dic.Count); + + foreach (var pair in dic) + { + Add(pair.Key, pair.Value); + } + } + + #endregion + + internal override JsonType Type => JsonType.Object; + + #region Add Overloads + + public void Add(string name, JsonNode value) => + items.Add(name, value); + + public void Add(string name, byte[] value) => + items.Add(name, new XBinary(value)); + + public void Add(string name, DateTime value) => + items.Add(name, new JsonDate(value)); + + public void Add(string name, int value) => + items.Add(name, new JsonNumber(value.ToString())); + + public void Add(string name, long value) => + items.Add(name, new JsonNumber(value.ToString())); + + public void Add(string name, float value) => + items.Add(name, new JsonNumber(value.ToString())); + + public void Add(string name, double value) => + items.Add(name, new JsonNumber(value.ToString())); + + public void Add(string name, string value) => + items.Add(name, new JsonString(value)); + + public void Add(string name, bool value) => + items.Add(name, new JsonBoolean(value)); + + public void Add(string name, Uri url) => + items.Add(name, new JsonString(url.AbsoluteUri)); + + public void Add(string name, string[] values) => + items.Add(name, new XImmutableArray(values)); + + public void Add(string name, int[] values) => + items.Add(name, new XImmutableArray(values)); + + #endregion + + #region ICollection> Members + + void ICollection>.Add(KeyValuePair item) + { + items.Add(item.Key, item.Value); + } + + void ICollection>.Clear() + { + items.Clear(); + } + + bool ICollection>.Contains(KeyValuePair item) => + throw new NotImplementedException(); + + void ICollection>.CopyTo(KeyValuePair[] array, int arrayIndex) => + throw new NotImplementedException(); + + + int ICollection>.Count => items.Count; + + bool ICollection>.IsReadOnly => false; + + bool ICollection>.Remove(KeyValuePair item) => + throw new NotImplementedException(); + + #endregion + + #region IDictionary Members + + public bool ContainsKey(string key) => items.ContainsKey(key); + + public ICollection Keys => items.Keys; + + public bool Remove(string key) => items.Remove(key); + + public bool TryGetValue(string key, out JsonNode value) => + items.TryGetValue(key, out value); + + public ICollection Values => items.Values; + + public override JsonNode this[string key] + { + get => items[key]; + set => items[key] = value; + } + + #endregion + + #region IEnumerable + + IEnumerator> IEnumerable>.GetEnumerator() + => items.GetEnumerator(); + + IEnumerator IEnumerable.GetEnumerator() + => items.GetEnumerator(); + + #endregion + + #region Helpers + + internal static new JsonObject FromObject(object instance) => + (JsonObject)new JsonSerializer().Serialize(instance); + + #endregion + + #region Static Constructors + + internal static JsonObject FromStream(Stream stream) + { + using (var tr = new StreamReader(stream)) + { + return (JsonObject)Parse(tr); + } + } + + internal static new JsonObject Parse(string text) + { + return (JsonObject)JsonNode.Parse(text); + } + + #endregion + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/JsonString.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/JsonString.cs new file mode 100644 index 000000000000..b6b2e86fbf2c --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/JsonString.cs @@ -0,0 +1,42 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + public sealed partial class JsonString : JsonNode, IEquatable + { + private readonly string value; + + internal JsonString(string value) + { + this.value = value ?? throw new ArgumentNullException(nameof(value)); + } + + internal override JsonType Type => JsonType.String; + + internal string Value => value; + + internal int Length => value.Length; + + #region #region Implicit Casts + + public static implicit operator string(JsonString data) => data.Value; + + public static implicit operator JsonString(string value) => new JsonString(value); + + #endregion + + public override int GetHashCode() => value.GetHashCode(); + + public override string ToString() => value; + + #region IEquatable + + bool IEquatable.Equals(JsonString other) => this.Value == other.Value; + + #endregion + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/XBinary.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/XBinary.cs new file mode 100644 index 000000000000..6cd672a7ac87 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/XBinary.cs @@ -0,0 +1,40 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + internal sealed class XBinary : JsonNode + { + private readonly byte[] _value; + private readonly string _base64; + + internal XBinary(byte[] value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + internal XBinary(string base64EncodedString) + { + _base64 = base64EncodedString ?? throw new ArgumentNullException(nameof(base64EncodedString)); + } + + internal override JsonType Type => JsonType.Binary; + + internal byte[] Value => _value ?? Convert.FromBase64String(_base64); + + #region #region Implicit Casts + + public static implicit operator byte[] (XBinary data) => data.Value; + + public static implicit operator XBinary(byte[] data) => new XBinary(data); + + #endregion + + public override int GetHashCode() => Value.GetHashCode(); + + public override string ToString() => _base64 ?? Convert.ToBase64String(_value); + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/XNull.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/XNull.cs new file mode 100644 index 000000000000..72430b524750 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Nodes/XNull.cs @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + internal sealed class XNull : JsonNode + { + internal static readonly XNull Instance = new XNull(); + + private XNull() { } + + internal override JsonType Type => JsonType.Null; + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Parser/Exceptions/ParseException.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Parser/Exceptions/ParseException.cs new file mode 100644 index 000000000000..628287035221 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Parser/Exceptions/ParseException.cs @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + internal class ParserException : Exception + { + internal ParserException(string message) + : base(message) + { } + + internal ParserException(string message, SourceLocation location) + : base(message) + { + + Location = location; + } + + internal SourceLocation Location { get; } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Parser/JsonParser.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Parser/JsonParser.cs new file mode 100644 index 000000000000..e5ba347e731b --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Parser/JsonParser.cs @@ -0,0 +1,180 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.IO; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + public class JsonParser : IDisposable + { + private readonly TokenReader reader; + + internal JsonParser(TextReader reader) + : this(new SourceReader(reader)) { } + + internal JsonParser(SourceReader sourceReader) + { + if (sourceReader == null) + throw new ArgumentNullException(nameof(sourceReader)); + + this.reader = new TokenReader(new JsonTokenizer(sourceReader)); + + this.reader.Next(); // Start with the first token + } + + internal IEnumerable ReadNodes() + { + JsonNode node; + + while ((node = ReadNode()) != null) yield return node; + } + + internal JsonNode ReadNode() + { + if (reader.Current.Kind == TokenKind.Eof || reader.Current.IsTerminator) + { + return null; + } + + switch (reader.Current.Kind) + { + case TokenKind.LeftBrace : return ReadObject(); // { + case TokenKind.LeftBracket : return ReadArray(); // [ + + default: throw new ParserException($"Expected '{{' or '['. Was {reader.Current}."); + } + } + + private JsonNode ReadFieldValue() + { + // Boolean, Date, Null, Number, String, Uri + if (reader.Current.IsLiteral) + { + return ReadLiteral(); + } + else + { + switch (reader.Current.Kind) + { + case TokenKind.LeftBracket: return ReadArray(); + case TokenKind.LeftBrace : return ReadObject(); + + default: throw new ParserException($"Unexpected token reading field value. Was {reader.Current}."); + } + } + } + + private JsonNode ReadLiteral() + { + var literal = reader.Current; + + reader.Next(); // Read the literal token + + switch (literal.Kind) + { + case TokenKind.Boolean : return JsonBoolean.Parse(literal.Value); + case TokenKind.Null : return XNull.Instance; + case TokenKind.Number : return new JsonNumber(literal.Value); + case TokenKind.String : return new JsonString(literal.Value); + + default: throw new ParserException($"Unexpected token reading literal. Was {literal}."); + } + } + + internal JsonObject ReadObject() + { + reader.Ensure(TokenKind.LeftBrace, "object"); + + reader.Next(); // Read '{' (Object start) + + var jsonObject = new JsonObject(); + + // Read the object's fields until we reach the end of the object ('}') + while (reader.Current.Kind != TokenKind.RightBrace) + { + if (reader.Current.Kind == TokenKind.Comma) + { + reader.Next(); // Read ',' (Seperator) + } + + // Ensure we have a field name + reader.Ensure(TokenKind.String, "Expected field name"); + + var field = ReadField(); + + jsonObject.Add(field.Key, field.Value); + } + + reader.Next(); // Read '}' (Object end) + + return jsonObject; + } + + + // TODO: Use ValueTuple in C#7 + private KeyValuePair ReadField() + { + var fieldName = reader.Current.Value; + + reader.Next(); // Read the field name + + reader.Ensure(TokenKind.Colon, "field"); + + reader.Next(); // Read ':' (Field value indicator) + + return new KeyValuePair(fieldName, ReadFieldValue()); + } + + + internal JsonArray ReadArray() + { + reader.Ensure(TokenKind.LeftBracket, "array"); + + var array = new XNodeArray(); + + reader.Next(); // Read the '[' (Array start) + + // Read the array's items + while (reader.Current.Kind != TokenKind.RightBracket) + { + if (reader.Current.Kind == TokenKind.Comma) + { + reader.Next(); // Read the ',' (Seperator) + } + + if (reader.Current.IsLiteral) + { + array.Add(ReadLiteral()); // Boolean, Date, Number, Null, String, Uri + } + else if (reader.Current.Kind == TokenKind.LeftBracket) + { + array.Add(ReadArray()); // Array + } + else if (reader.Current.Kind == TokenKind.LeftBrace) + { + array.Add(ReadObject()); // Object + } + else + { + throw new ParserException($"Expected comma, literal, or object. Was {reader.Current}."); + } + } + + reader.Next(); // Read the ']' (Array end) + + return array; + } + + #region IDisposable + + public void Dispose() + { + reader.Dispose(); + } + + #endregion + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Parser/JsonToken.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Parser/JsonToken.cs new file mode 100644 index 000000000000..aeab06d6f1f5 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Parser/JsonToken.cs @@ -0,0 +1,66 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + internal enum TokenKind + { + LeftBrace, // { Object start + RightBrace, // } Object end + + LeftBracket, // [ Array start + RightBracket, // ] Array end + + Comma, // , Comma + Colon, // : Value indicator + Dot, // . Access field indicator + Terminator, // \0 Stream terminator + + Boolean = 31, // true or false + Null = 33, // null + Number = 34, // i.e. -1.93, -1, 0, 1, 1.1 + String = 35, // i.e. "text" + + Eof = 50 + } + + internal /* readonly */ struct JsonToken + { + internal static readonly JsonToken BraceOpen = new JsonToken(TokenKind.LeftBrace, "{"); + internal static readonly JsonToken BraceClose = new JsonToken(TokenKind.RightBrace, "}"); + + internal static readonly JsonToken BracketOpen = new JsonToken(TokenKind.LeftBracket, "["); + internal static readonly JsonToken BracketClose = new JsonToken(TokenKind.RightBracket, "]"); + + internal static readonly JsonToken Colon = new JsonToken(TokenKind.Colon, ":"); + internal static readonly JsonToken Comma = new JsonToken(TokenKind.Comma, ","); + internal static readonly JsonToken Terminator = new JsonToken(TokenKind.Terminator, "\0"); + + internal static readonly JsonToken True = new JsonToken(TokenKind.Boolean, "true"); + internal static readonly JsonToken False = new JsonToken(TokenKind.Boolean, "false"); + internal static readonly JsonToken Null = new JsonToken(TokenKind.Null, "null"); + + internal static readonly JsonToken Eof = new JsonToken(TokenKind.Eof, null); + + internal JsonToken(TokenKind kind, string value) + { + Kind = kind; + Value = value; + } + + internal readonly TokenKind Kind; + + internal readonly string Value; + + public override string ToString() => Kind + ": " + Value; + + #region Helpers + + internal bool IsLiteral => (byte)Kind > 30 && (byte)Kind < 40; + + internal bool IsTerminator => Kind == TokenKind.Terminator; + + #endregion + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Parser/JsonTokenizer.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Parser/JsonTokenizer.cs new file mode 100644 index 000000000000..1bf240877bbd --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Parser/JsonTokenizer.cs @@ -0,0 +1,177 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Text; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + using System.IO; + + + public class JsonTokenizer : IDisposable + { + private readonly StringBuilder sb = new StringBuilder(); + + private readonly SourceReader reader; + + internal JsonTokenizer(TextReader reader) + : this(new SourceReader(reader)) { } + + internal JsonTokenizer(SourceReader reader) + { + this.reader = reader; + + reader.Next(); // Start with the first char + } + + internal JsonToken ReadNext() + { + reader.SkipWhitespace(); + + if (reader.IsEof) return JsonToken.Eof; + + switch (reader.Current) + { + case '"': return ReadQuotedString(); + + // Symbols + case '[' : reader.Next(); return JsonToken.BracketOpen; // Array start + case ']' : reader.Next(); return JsonToken.BracketClose; // Array end + case ',' : reader.Next(); return JsonToken.Comma; // Value seperator + case ':' : reader.Next(); return JsonToken.Colon; // Field value indicator + case '{' : reader.Next(); return JsonToken.BraceOpen; // Object start + case '}' : reader.Next(); return JsonToken.BraceClose; // Object end + case '\0' : reader.Next(); return JsonToken.Terminator; // Stream terminiator + + default: return ReadLiteral(); + } + } + + private JsonToken ReadQuotedString() + { + Expect('"', "quoted string indicator"); + + reader.Next(); // Read '"' (Starting quote) + + // Read until we reach an unescaped quote char + while (reader.Current != '"') + { + EnsureNotEof("quoted string"); + + if (reader.Current == '\\') + { + char escapedCharacter = reader.ReadEscapeCode(); + + sb.Append(escapedCharacter); + + continue; + } + + StoreCurrentCharacterAndReadNext(); + } + + reader.Next(); // Read '"' (Ending quote) + + return new JsonToken(TokenKind.String, value: sb.Extract()); + } + + private JsonToken ReadLiteral() + { + if (char.IsDigit(reader.Current) || + reader.Current == '-' || + reader.Current == '+') + { + return ReadNumber(); + } + + return ReadIdentifer(); + } + + private JsonToken ReadNumber() + { + // Read until we hit a non-numeric character + // -6.247737e-06 + // E + + while (char.IsDigit(reader.Current) + || reader.Current == '.' + || reader.Current == 'e' + || reader.Current == 'E' + || reader.Current == '-' + || reader.Current == '+') + { + StoreCurrentCharacterAndReadNext(); + } + + return new JsonToken(TokenKind.Number, value: sb.Extract()); + } + + int count = 0; + + private JsonToken ReadIdentifer() + { + count++; + + if (!char.IsLetter(reader.Current)) + { + throw new ParserException( + message : $"Expected literal (number, boolean, or null). Was '{reader.Current}'.", + location : reader.Location + ); + } + + // Read letters, numbers, and underscores '_' + while (char.IsLetterOrDigit(reader.Current) || reader.Current == '_') + { + StoreCurrentCharacterAndReadNext(); + } + + string text = sb.Extract(); + + switch (text) + { + case "true": return JsonToken.True; + case "false": return JsonToken.False; + case "null": return JsonToken.Null; + + default: return new JsonToken(TokenKind.String, text); + } + } + + private void Expect(char character, string description) + { + if (reader.Current != character) + { + throw new ParserException( + message: $"Expected {description} ('{character}'). Was '{reader.Current}'.", + location: reader.Location + ); + } + } + + private void EnsureNotEof(string tokenType) + { + if (reader.IsEof) + { + throw new ParserException( + message: $"Unexpected EOF while reading {tokenType}.", + location: reader.Location + ); + } + } + + private void StoreCurrentCharacterAndReadNext() + { + sb.Append(reader.Current); + + reader.Next(); + } + + public void Dispose() + { + reader.Dispose(); + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Parser/Location.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Parser/Location.cs new file mode 100644 index 000000000000..0e77dc7a54d5 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Parser/Location.cs @@ -0,0 +1,43 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + internal struct SourceLocation + { + private int line; + private int column; + private int position; + + internal SourceLocation(int line = 0, int column = 0, int position = 0) + { + this.line = line; + this.column = column; + this.position = position; + } + + internal int Line => line; + + internal int Column => column; + + internal int Position => position; + + internal void Advance() + { + this.column++; + this.position++; + } + + internal void MarkNewLine() + { + this.line++; + this.column = 0; + } + + internal SourceLocation Clone() + { + return new SourceLocation(line, column, position); + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Parser/Readers/SourceReader.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Parser/Readers/SourceReader.cs new file mode 100644 index 000000000000..1bb76b71686f --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Parser/Readers/SourceReader.cs @@ -0,0 +1,130 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Globalization; +using System.IO; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + public sealed class SourceReader : IDisposable + { + private readonly TextReader source; + + private char current; + + private readonly SourceLocation location = new SourceLocation(); + + private bool isEof = false; + + internal SourceReader(TextReader textReader) + { + this.source = textReader ?? throw new ArgumentNullException(nameof(textReader)); + } + + /// + /// Advances to the next character + /// + internal void Next() + { + // Advance to the new line when we see a new line '\n'. + // A new line may be prefixed by a carriage return '\r'. + + if (current == '\n') + { + location.MarkNewLine(); + } + + int charCode = source.Read(); // -1 for end + + if (charCode >= 0) + { + current = (char)charCode; + } + else + { + // If we've already marked this as the EOF, throw an exception + if (isEof) + { + throw new EndOfStreamException("Cannot advance past end of stream."); + } + + isEof = true; + + current = '\0'; + } + + location.Advance(); + } + + internal void SkipWhitespace() + { + while (char.IsWhiteSpace(current)) + { + Next(); + } + } + + internal char ReadEscapeCode() + { + Next(); + + char escapedChar = current; + + Next(); // Consume escaped character + + switch (escapedChar) + { + // Special escape codes + case '"': return '"'; // " (Quotation mark) U+0022 + case '/': return '/'; // / (Solidus) U+002F + case '\\': return '\\'; // \ (Reverse solidus) U+005C + + // Control Characters + case '0': return '\0'; // Nul (0) U+0000 + case 'a': return '\a'; // Alert (7) + case 'b': return '\b'; // Backspace (8) U+0008 + case 'f': return '\f'; // Form feed (12) U+000C + case 'n': return '\n'; // Line feed (10) U+000A + case 'r': return '\r'; // Carriage return (13) U+000D + case 't': return '\t'; // Horizontal tab (9) U+0009 + case 'v': return '\v'; // Vertical tab + + // Unicode escape sequence + case 'u': return ReadUnicodeEscapeSequence(); // U+XXXX + + default: throw new Exception($"Unrecognized escape sequence '\\{escapedChar}'"); + } + } + + private readonly char[] hexCode = new char[4]; + + private char ReadUnicodeEscapeSequence() + { + hexCode[0] = current; Next(); + hexCode[1] = current; Next(); + hexCode[2] = current; Next(); + hexCode[3] = current; Next(); + + return Convert.ToChar(int.Parse( + s : new string(hexCode), + style : NumberStyles.HexNumber, + provider: NumberFormatInfo.InvariantInfo + )); + } + + internal char Current => current; + + internal bool IsEof => isEof; + + internal char Peek() => (char)source.Peek(); + + internal SourceLocation Location => location; + + public void Dispose() + { + source.Dispose(); + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Parser/TokenReader.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Parser/TokenReader.cs new file mode 100644 index 000000000000..2c2b68df6f46 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Parser/TokenReader.cs @@ -0,0 +1,39 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + public class TokenReader : IDisposable + { + private readonly JsonTokenizer tokenizer; + private JsonToken current; + + internal TokenReader(JsonTokenizer tokenizer) + { + this.tokenizer = tokenizer ?? throw new ArgumentNullException(nameof(tokenizer)); + } + + internal void Next() + { + current = tokenizer.ReadNext(); + } + + internal JsonToken Current => current; + + internal void Ensure(TokenKind kind, string readerName) + { + if (current.Kind != kind) + { + throw new ParserException($"Expected {kind} while reading {readerName}). Was {current}."); + } + } + + public void Dispose() + { + tokenizer.Dispose(); + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/PipelineMocking.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/PipelineMocking.cs new file mode 100644 index 000000000000..d5d60d23227c --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/PipelineMocking.cs @@ -0,0 +1,262 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime +{ + using System.Threading.Tasks; + using System.Collections.Generic; + using System.Net.Http; + using System.Linq; + using System.Net; + using Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json; + + public enum MockMode + { + Live, + Record, + Playback, + + } + + public class PipelineMock + { + + private System.Collections.Generic.Stack scenario = new System.Collections.Generic.Stack(); + private System.Collections.Generic.Stack context = new System.Collections.Generic.Stack(); + private System.Collections.Generic.Stack description = new System.Collections.Generic.Stack(); + + private readonly string recordingPath; + private int counter = 0; + + public static implicit operator Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SendAsyncStep(PipelineMock instance) => instance.SendAsync; + + public MockMode Mode { get; set; } = MockMode.Live; + public PipelineMock(string recordingPath) + { + this.recordingPath = recordingPath; + } + + public void PushContext(string text) => context.Push(text); + + public void PushDescription(string text) => description.Push(text); + + + public void PushScenario(string it) + { + // reset counter too + counter = 0; + + scenario.Push(it); + } + + public void PopContext() => context.Pop(); + + public void PopDescription() => description.Pop(); + + public void PopScenario() => scenario.Pop(); + + public void SetRecord() => Mode = MockMode.Record; + + public void SetPlayback() => Mode = MockMode.Playback; + + public void SetLive() => Mode = MockMode.Live; + + public string Scenario => (scenario.Count > 0 ? scenario.Peek() : "[NoScenario]"); + public string Description => (description.Count > 0 ? description.Peek() : "[NoDescription]"); + public string Context => (context.Count > 0 ? context.Peek() : "[NoContext]"); + + /// + /// Headers that we substitute out blank values for in the recordings + /// Add additional headers as necessary + /// + public static HashSet Blacklist = new HashSet(System.StringComparer.CurrentCultureIgnoreCase) { + "Authorization", + }; + + public Dictionary ForceResponseHeaders = new Dictionary(); + + internal static XImmutableArray Removed = new XImmutableArray(new string[] { "[Filtered]" }); + + internal static IEnumerable> FilterHeaders(IEnumerable>> headers) => headers.Select(header => new KeyValuePair(header.Key, Blacklist.Contains(header.Key) ? Removed : new XImmutableArray(header.Value.ToArray()))); + + internal static JsonNode SerializeContent(HttpContent content, ref bool isBase64) => content == null ? XNull.Instance : SerializeContent(content.ReadAsByteArrayAsync().Result, ref isBase64); + + internal static JsonNode SerializeContent(byte[] content, ref bool isBase64) + { + if (null == content || content.Length == 0) + { + return XNull.Instance; + } + var first = content[0]; + var last = content[content.Length - 1]; + + // plaintext for JSON/SGML/XML/HTML/STRINGS/ARRAYS + if ((first == '{' && last == '}') || (first == '<' && last == '>') || (first == '[' && last == ']') || (first == '"' && last == '"')) + { + return new JsonString(System.Text.Encoding.UTF8.GetString(content)); + } + + // base64 for everyone else + return new JsonString(System.Convert.ToBase64String(content)); + } + + internal static byte[] DeserializeContent(string content, bool isBase64) + { + if (string.IsNullOrWhiteSpace(content)) + { + return new byte[0]; + } + + if (isBase64) + { + try + { + return System.Convert.FromBase64String(content); + } + catch + { + // hmm. didn't work, return it as a string I guess. + } + } + return System.Text.Encoding.UTF8.GetBytes(content); + } + + public void SaveMessage(string rqKey, HttpRequestMessage request, HttpResponseMessage response) + { + var messages = System.IO.File.Exists(this.recordingPath) ? Load() : new JsonObject() ?? new JsonObject(); + bool isBase64Request = false; + bool isBase64Response = false; + messages[rqKey] = new JsonObject { + { "Request",new JsonObject { + { "Method", request.Method.Method }, + { "RequestUri", request.RequestUri }, + { "Content", SerializeContent( request.Content, ref isBase64Request) }, + { "isContentBase64", isBase64Request }, + { "Headers", new JsonObject(FilterHeaders(request.Headers)) }, + { "ContentHeaders", request.Content == null ? new JsonObject() : new JsonObject(FilterHeaders(request.Content.Headers))} + } }, + {"Response", new JsonObject { + { "StatusCode", (int)response.StatusCode}, + { "Headers", new JsonObject(FilterHeaders(response.Headers))}, + { "ContentHeaders", new JsonObject(FilterHeaders(response.Content.Headers))}, + { "Content", SerializeContent(response.Content, ref isBase64Response) }, + { "isContentBase64", isBase64Response }, + }} + }; + System.IO.File.WriteAllText(this.recordingPath, messages.ToString()); + } + + private JsonObject Load() + { + if (System.IO.File.Exists(this.recordingPath)) + { + try + { + return JsonObject.FromStream(System.IO.File.OpenRead(this.recordingPath)); + } + catch + { + throw new System.Exception($"Invalid recording file: '{recordingPath}'"); + } + } + + throw new System.ArgumentException($"Missing recording file: '{recordingPath}'", nameof(recordingPath)); + } + + public HttpResponseMessage LoadMessage(string rqKey) + { + var responses = Load(); + var message = responses.Property(rqKey); + + if (null == message) + { + throw new System.ArgumentException($"Missing Request '{rqKey}' in recording file", nameof(rqKey)); + } + + var sc = 0; + var reqMessage = message.Property("Request"); + var respMessage = message.Property("Response"); + + // --------------------------- deserialize response ---------------------------------------------------------------- + bool isBase64Response = false; + respMessage.BooleanProperty("isContentBase64", ref isBase64Response); + var response = new HttpResponseMessage + { + StatusCode = (HttpStatusCode)respMessage.NumberProperty("StatusCode", ref sc), + Content = new System.Net.Http.ByteArrayContent(DeserializeContent(respMessage.StringProperty("Content"), isBase64Response)) + }; + + foreach (var each in respMessage.Property("Headers")) + { + response.Headers.TryAddWithoutValidation(each.Key, each.Value.ToArrayOf()); + } + + foreach (var frh in ForceResponseHeaders) + { + response.Headers.Remove(frh.Key); + response.Headers.TryAddWithoutValidation(frh.Key, frh.Value); + } + + foreach (var each in respMessage.Property("ContentHeaders")) + { + response.Content.Headers.TryAddWithoutValidation(each.Key, each.Value.ToArrayOf()); + } + + // --------------------------- deserialize request ---------------------------------------------------------------- + bool isBase64Request = false; + reqMessage.BooleanProperty("isContentBase64", ref isBase64Request); + response.RequestMessage = new HttpRequestMessage + { + Method = new HttpMethod(reqMessage.StringProperty("Method")), + RequestUri = new System.Uri(reqMessage.StringProperty("RequestUri")), + Content = new System.Net.Http.ByteArrayContent(DeserializeContent(reqMessage.StringProperty("Content"), isBase64Request)) + }; + + foreach (var each in reqMessage.Property("Headers")) + { + response.RequestMessage.Headers.TryAddWithoutValidation(each.Key, each.Value.ToArrayOf()); + } + foreach (var each in reqMessage.Property("ContentHeaders")) + { + response.RequestMessage.Content.Headers.TryAddWithoutValidation(each.Key, each.Value.ToArrayOf()); + } + + return response; + } + + public async Task SendAsync(HttpRequestMessage request, IEventListener callback, ISendAsync next) + { + counter++; + var rqkey = $"{Description}+{Context}+{Scenario}+${request.Method.Method}+{request.RequestUri}+{counter}"; + + switch (Mode) + { + case MockMode.Record: + //Add following code since the request.Content will be released after sendAsync + var requestClone = request; + if (requestClone.Content != null) + { + requestClone = await request.CloneWithContent(request.RequestUri, request.Method); + } + // make the call + var response = await next.SendAsync(request, callback); + + // save the message to the recording file + SaveMessage(rqkey, requestClone, response); + + // return the response. + return response; + + case MockMode.Playback: + // load and return the response. + return LoadMessage(rqkey); + + default: + // pass-thru, do nothing + return await next.SendAsync(request, callback); + } + } + } +} diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Properties/Resources.Designer.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Properties/Resources.Designer.cs new file mode 100644 index 000000000000..be37dc7fbfdb --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Properties/Resources.Designer.cs @@ -0,0 +1,5655 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.generated.runtime.Properties +{ + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Resources.ResourceManager ResourceManager + { + get + { + if (object.ReferenceEquals(resourceMan, null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.generated.runtime.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to The remote server returned an error: (401) Unauthorized.. + /// + public static string AccessDeniedExceptionMessage + { + get + { + return ResourceManager.GetString("AccessDeniedExceptionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account id doesn't match one in subscription.. + /// + public static string AccountIdDoesntMatchSubscription + { + get + { + return ResourceManager.GetString("AccountIdDoesntMatchSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account needs to be specified. + /// + public static string AccountNeedsToBeSpecified + { + get + { + return ResourceManager.GetString("AccountNeedsToBeSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account "{0}" has been added.. + /// + public static string AddAccountAdded + { + get + { + return ResourceManager.GetString("AddAccountAdded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to To switch to a different subscription, please use Select-AzureSubscription.. + /// + public static string AddAccountChangeSubscription + { + get + { + return ResourceManager.GetString("AddAccountChangeSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Skipping external tenant {0}, because you are using a guest or a foreign principal object identity. In order to access this tenant, please run Add-AzureAccount without "-Credential".. + /// + public static string AddAccountNonInteractiveGuestOrFpo + { + get + { + return ResourceManager.GetString("AddAccountNonInteractiveGuestOrFpo", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Subscription "{0}" is selected as the default subscription.. + /// + public static string AddAccountShowDefaultSubscription + { + get + { + return ResourceManager.GetString("AddAccountShowDefaultSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to To view all the subscriptions, please use Get-AzureSubscription.. + /// + public static string AddAccountViewSubscriptions + { + get + { + return ResourceManager.GetString("AddAccountViewSubscriptions", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add-On {0} is created successfully.. + /// + public static string AddOnCreatedMessage + { + get + { + return ResourceManager.GetString("AddOnCreatedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add-on name {0} is already used.. + /// + public static string AddOnNameAlreadyUsed + { + get + { + return ResourceManager.GetString("AddOnNameAlreadyUsed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add-On {0} not found.. + /// + public static string AddOnNotFound + { + get + { + return ResourceManager.GetString("AddOnNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add-on {0} is removed successfully.. + /// + public static string AddOnRemovedMessage + { + get + { + return ResourceManager.GetString("AddOnRemovedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add-On {0} is updated successfully.. + /// + public static string AddOnUpdatedMessage + { + get + { + return ResourceManager.GetString("AddOnUpdatedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role has been created at {0}\{1}.. + /// + public static string AddRoleMessageCreate + { + get + { + return ResourceManager.GetString("AddRoleMessageCreate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role has been created at {0}\{1}. For easy access to Microsoft Azure services from your application code, install the Microsoft Azure client library for Node.js by running ‘npm install azure’.. + /// + public static string AddRoleMessageCreateNode + { + get + { + return ResourceManager.GetString("AddRoleMessageCreateNode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role has been created at {0}\{1}. For easy access to Microsoft Azure services from your application code, install the Microsoft Azure client library for PHP by running "pear WindowsAzure/WindowsAzure".. + /// + public static string AddRoleMessageCreatePHP + { + get + { + return ResourceManager.GetString("AddRoleMessageCreatePHP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to set role permissions. Please give the 'Network Service' user 'Read & execute' and 'Modify' permissions to the role folder, or run PowerShell as an Administrator. + /// + public static string AddRoleMessageInsufficientPermissions + { + get + { + return ResourceManager.GetString("AddRoleMessageInsufficientPermissions", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A role name '{0}' already exists. + /// + public static string AddRoleMessageRoleExists + { + get + { + return ResourceManager.GetString("AddRoleMessageRoleExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Profile {0} already has an endpoint with name {1}. + /// + public static string AddTrafficManagerEndpointFailed + { + get + { + return ResourceManager.GetString("AddTrafficManagerEndpointFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Azure PowerShell collects usage data in order to improve your experience. + ///The data is anonymous and does not include commandline argument values. + ///The data is collected by Microsoft. + /// + ///Use the Disable-AzDataCollection cmdlet to turn the feature Off. The cmdlet can be found in the Az.Accounts module. To disable data collection: PS > Disable-AzDataCollection. + ///Use the Enable-AzDataCollection cmdlet to turn the feature On. The cmdlet can be found in the Az.Accounts module. To enable [rest of string was truncated]";. + /// + public static string ARMDataCollectionMessage + { + get + { + return ResourceManager.GetString("ARMDataCollectionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [Common.Authentication]: Authenticating for account {0} with single tenant {1}.. + /// + public static string AuthenticatingForSingleTenant + { + get + { + return ResourceManager.GetString("AuthenticatingForSingleTenant", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Windows Azure Powershell\. + /// + public static string AzureDirectory + { + get + { + return ResourceManager.GetString("AzureDirectory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to https://manage.windowsazure.com. + /// + public static string AzurePortalUrl + { + get + { + return ResourceManager.GetString("AzurePortalUrl", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to AZURE_PORTAL_URL. + /// + public static string AzurePortalUrlEnv + { + get + { + return ResourceManager.GetString("AzurePortalUrlEnv", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Selected profile must not be null.. + /// + public static string AzureProfileMustNotBeNull + { + get + { + return ResourceManager.GetString("AzureProfileMustNotBeNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Azure SDK\{0}\. + /// + public static string AzureSdkDirectory + { + get + { + return ResourceManager.GetString("AzureSdkDirectory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to File '{0}' already exists. Use the -Force parameter to overwrite it.. + /// + public static string AzureVMDscArchiveAlreadyExists + { + get + { + return ResourceManager.GetString("AzureVMDscArchiveAlreadyExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find configuration data file: {0}. + /// + public static string AzureVMDscCannotFindConfigurationDataFile + { + get + { + return ResourceManager.GetString("AzureVMDscCannotFindConfigurationDataFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Create Archive. + /// + public static string AzureVMDscCreateArchiveAction + { + get + { + return ResourceManager.GetString("AzureVMDscCreateArchiveAction", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The configuration data must be a .psd1 file. + /// + public static string AzureVMDscInvalidConfigurationDataFile + { + get + { + return ResourceManager.GetString("AzureVMDscInvalidConfigurationDataFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Parsing configuration script: {0}. + /// + public static string AzureVMDscParsingConfiguration + { + get + { + return ResourceManager.GetString("AzureVMDscParsingConfiguration", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Storage Blob '{0}' already exists. Use the -Force parameter to overwrite it.. + /// + public static string AzureVMDscStorageBlobAlreadyExists + { + get + { + return ResourceManager.GetString("AzureVMDscStorageBlobAlreadyExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Upload '{0}'. + /// + public static string AzureVMDscUploadToBlobStorageAction + { + get + { + return ResourceManager.GetString("AzureVMDscUploadToBlobStorageAction", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Execution failed because a background thread could not prompt the user.. + /// + public static string BaseShouldMethodFailureReason + { + get + { + return ResourceManager.GetString("BaseShouldMethodFailureReason", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Base Uri was empty.. + /// + public static string BaseUriEmpty + { + get + { + return ResourceManager.GetString("BaseUriEmpty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} begin processing without ParameterSet.. + /// + public static string BeginProcessingWithoutParameterSetLog + { + get + { + return ResourceManager.GetString("BeginProcessingWithoutParameterSetLog", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} begin processing with ParameterSet '{1}'.. + /// + public static string BeginProcessingWithParameterSetLog + { + get + { + return ResourceManager.GetString("BeginProcessingWithParameterSetLog", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Blob with the name {0} already exists in the account.. + /// + public static string BlobAlreadyExistsInTheAccount + { + get + { + return ResourceManager.GetString("BlobAlreadyExistsInTheAccount", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to https://{0}.blob.core.windows.net/. + /// + public static string BlobEndpointUri + { + get + { + return ResourceManager.GetString("BlobEndpointUri", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to AZURE_BLOBSTORAGE_TEMPLATE. + /// + public static string BlobEndpointUriEnv + { + get + { + return ResourceManager.GetString("BlobEndpointUriEnv", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The parameter : '{0}' is changing.. + /// + public static string BreakingChangeAttributeParameterChanging + { + get + { + return ResourceManager.GetString("BreakingChangeAttributeParameterChanging", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The parameter : '{0}' is becoming mandatory.. + /// + public static string BreakingChangeAttributeParameterMandatoryNow + { + get + { + return ResourceManager.GetString("BreakingChangeAttributeParameterMandatoryNow", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The parameter : '{0}' is being replaced by parameter : '{1}'.. + /// + public static string BreakingChangeAttributeParameterReplaced + { + get + { + return ResourceManager.GetString("BreakingChangeAttributeParameterReplaced", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The parameter : '{0}' is being replaced by mandatory parameter : '{1}'.. + /// + public static string BreakingChangeAttributeParameterReplacedMandatory + { + get + { + return ResourceManager.GetString("BreakingChangeAttributeParameterReplacedMandatory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The type of the parameter is changing from '{0}' to '{1}'.. + /// + public static string BreakingChangeAttributeParameterTypeChange + { + get + { + return ResourceManager.GetString("BreakingChangeAttributeParameterTypeChange", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Change description : {0} + ///. + /// + public static string BreakingChangesAttributesChangeDescriptionMessage + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesChangeDescriptionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The cmdlet is being deprecated. There will be no replacement for it.. + /// + public static string BreakingChangesAttributesCmdLetDeprecationMessageNoReplacement + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesCmdLetDeprecationMessageNoReplacement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The cmdlet is being deprecated. There will be no replacement for it.. + /// + public static string BreakingChangesAttributesParameterSetDeprecationMessageNoReplacement + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesParameterSetDeprecationMessageNoReplacement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The cmdlet '{0}' is replacing this cmdlet.. + /// + public static string BreakingChangesAttributesCmdLetDeprecationMessageWithReplacement + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesCmdLetDeprecationMessageWithReplacement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The output type is changing from the existing type :'{0}' to the new type :'{1}'. + /// + public static string BreakingChangesAttributesCmdLetOutputChange1 + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesCmdLetOutputChange1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to "The output type '{0}' is changing". + /// + public static string BreakingChangesAttributesCmdLetOutputChange2 + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesCmdLetOutputChange2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to + ///- The following properties are being added to the output type : + ///. + /// + public static string BreakingChangesAttributesCmdLetOutputPropertiesAdded + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesCmdLetOutputPropertiesAdded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to + /// - The following properties in the output type are being deprecated : + ///. + /// + public static string BreakingChangesAttributesCmdLetOutputPropertiesRemoved + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesCmdLetOutputPropertiesRemoved", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The output type '{0}' is being deprecated without a replacement.. + /// + public static string BreakingChangesAttributesCmdLetOutputTypeDeprecated + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesCmdLetOutputTypeDeprecated", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to - {0} + /// + ///. + /// + public static string BreakingChangesAttributesDeclarationMessage + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesDeclarationMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to - Cmdlet : '{0}' + /// - {1} + ///. + /// + public static string BreakingChangesAttributesDeclarationMessageWithCmdletName + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesDeclarationMessageWithCmdletName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to NOTE : Go to {0} for steps to suppress (and other related information on) the breaking change messages.. + /// + public static string BreakingChangesAttributesFooterMessage + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesFooterMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Breaking changes in the cmdlet '{0}' :. + /// + public static string BreakingChangesAttributesHeaderMessage + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesHeaderMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Note : This change will take effect on '{0}' + ///. + /// + public static string BreakingChangesAttributesInEffectByDateMessage + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesInEffectByDateMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Note :The change is expected to take effect from version : '{0}' + /// + ///. + /// + public static string BreakingChangesAttributesInEffectByVersion + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesInEffectByVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Note :The change is expected to take effect from az version : '{0}' + /// + ///. + /// + public static string BreakingChangesAttributesInEffectByAzVersion + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesInEffectByAzVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ```powershell + ///# Old + ///{0} + /// + ///# New + ///{1} + ///``` + /// + ///. + /// + public static string BreakingChangesAttributesUsageChangeMessage + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesUsageChangeMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cmdlet invocation changes : + /// Old Way : {0} + /// New Way : {1}. + /// + public static string BreakingChangesAttributesUsageChangeMessageConsole + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesUsageChangeMessageConsole", resourceCulture); + } + } + + /// + /// The cmdlet is in experimental stage. The function may not be enabled in current subscription. + /// + public static string ExperimentalCmdletMessage + { + get + { + return ResourceManager.GetString("ExperimentalCmdletMessage", resourceCulture); + } + } + + + + /// + /// Looks up a localized string similar to CACHERUNTIMEURL. + /// + public static string CacheRuntimeUrl + { + get + { + return ResourceManager.GetString("CacheRuntimeUrl", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to cache. + /// + public static string CacheRuntimeValue + { + get + { + return ResourceManager.GetString("CacheRuntimeValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to CacheRuntimeVersion. + /// + public static string CacheRuntimeVersionKey + { + get + { + return ResourceManager.GetString("CacheRuntimeVersionKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Installing caching version {0} for Role '{1}' (the caching version locally installed is: {2}). + /// + public static string CacheVersionWarningText + { + get + { + return ResourceManager.GetString("CacheVersionWarningText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot change built-in environment {0}.. + /// + public static string CannotChangeBuiltinEnvironment + { + get + { + return ResourceManager.GetString("CannotChangeBuiltinEnvironment", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find {0} with name {1}.. + /// + public static string CannotFind + { + get + { + return ResourceManager.GetString("CannotFind", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deployment for service {0} with {1} slot doesn't exist. + /// + public static string CannotFindDeployment + { + get + { + return ResourceManager.GetString("CannotFindDeployment", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Can't find valid Microsoft Azure role in current directory {0}. + /// + public static string CannotFindRole + { + get + { + return ResourceManager.GetString("CannotFindRole", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service {0} configuration file (ServiceConfiguration.Cloud.cscfg) is either null or doesn't exist. + /// + public static string CannotFindServiceConfigurationFile + { + get + { + return ResourceManager.GetString("CannotFindServiceConfigurationFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid service path! Cannot locate ServiceDefinition.csdef in current folder or parent folders.. + /// + public static string CannotFindServiceRoot + { + get + { + return ResourceManager.GetString("CannotFindServiceRoot", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The subscription named {0} with id {1} is not currently imported. You must import this subscription before it can be updated.. + /// + public static string CannotUpdateUnknownSubscription + { + get + { + return ResourceManager.GetString("CannotUpdateUnknownSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ManagementCertificate. + /// + public static string CertificateElementName + { + get + { + return ResourceManager.GetString("CertificateElementName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to certificate.pfx. + /// + public static string CertificateFileName + { + get + { + return ResourceManager.GetString("CertificateFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Certificate imported into CurrentUser\My\{0}. + /// + public static string CertificateImportedMessage + { + get + { + return ResourceManager.GetString("CertificateImportedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No certificate was found in the certificate store with thumbprint {0}. + /// + public static string CertificateNotFoundInStore + { + get + { + return ResourceManager.GetString("CertificateNotFoundInStore", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Your account does not have access to the private key for certificate {0}. + /// + public static string CertificatePrivateKeyAccessError + { + get + { + return ResourceManager.GetString("CertificatePrivateKeyAccessError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} {1} deployment for {2} service. + /// + public static string ChangeDeploymentStateWaitMessage + { + get + { + return ResourceManager.GetString("ChangeDeploymentStateWaitMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cloud service {0} is in {1} state.. + /// + public static string ChangeDeploymentStatusCompleteMessage + { + get + { + return ResourceManager.GetString("ChangeDeploymentStatusCompleteMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Changing/Removing public environment '{0}' is not allowed.. + /// + public static string ChangePublicEnvironmentMessage + { + get + { + return ResourceManager.GetString("ChangePublicEnvironmentMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service {0} is set to value {1}. + /// + public static string ChangeSettingsElementMessage + { + get + { + return ResourceManager.GetString("ChangeSettingsElementMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Changing public environment is not supported.. + /// + public static string ChangingDefaultEnvironmentNotSupported + { + get + { + return ResourceManager.GetString("ChangingDefaultEnvironmentNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Choose which publish settings file to use:. + /// + public static string ChoosePublishSettingsFile + { + get + { + return ResourceManager.GetString("ChoosePublishSettingsFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.WindowsAzure.Plugins.Caching.ClientDiagnosticLevel. + /// + public static string ClientDiagnosticLevelName + { + get + { + return ResourceManager.GetString("ClientDiagnosticLevelName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 1. + /// + public static string ClientDiagnosticLevelValue + { + get + { + return ResourceManager.GetString("ClientDiagnosticLevelValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to cloud_package.cspkg. + /// + public static string CloudPackageFileName + { + get + { + return ResourceManager.GetString("CloudPackageFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ServiceConfiguration.Cloud.cscfg. + /// + public static string CloudServiceConfigurationFileName + { + get + { + return ResourceManager.GetString("CloudServiceConfigurationFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add-ons for {0}. + /// + public static string CloudServiceDescription + { + get + { + return ResourceManager.GetString("CloudServiceDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Communication could not be established. This could be due to an invalid subscription ID. Note that subscription IDs are case sensitive.. + /// + public static string CommunicationCouldNotBeEstablished + { + get + { + return ResourceManager.GetString("CommunicationCouldNotBeEstablished", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Complete. + /// + public static string CompleteMessage + { + get + { + return ResourceManager.GetString("CompleteMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to OperationID : '{0}'. + /// + public static string ComputeCloudExceptionOperationIdMessage + { + get + { + return ResourceManager.GetString("ComputeCloudExceptionOperationIdMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to config.json. + /// + public static string ConfigurationFileName + { + get + { + return ResourceManager.GetString("ConfigurationFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to VirtualMachine creation failed.. + /// + public static string CreateFailedErrorMessage + { + get + { + return ResourceManager.GetString("CreateFailedErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Creating the website failed. If this is the first website for this subscription, please create it using the management portal instead.. + /// + public static string CreateWebsiteFailed + { + get + { + return ResourceManager.GetString("CreateWebsiteFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.ApplicationServer.Caching.DataCacheClientsSection, Microsoft.ApplicationServer.Caching.Core. + /// + public static string DataCacheClientsType + { + get + { + return ResourceManager.GetString("DataCacheClientsType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to //blobcontainer[@datacenter='{0}']. + /// + public static string DatacenterBlobQuery + { + get + { + return ResourceManager.GetString("DatacenterBlobQuery", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft Azure PowerShell Data Collection Confirmation. + /// + public static string DataCollectionActivity + { + get + { + return ResourceManager.GetString("DataCollectionActivity", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You choose not to participate in Microsoft Azure PowerShell data collection.. + /// + public static string DataCollectionConfirmNo + { + get + { + return ResourceManager.GetString("DataCollectionConfirmNo", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This confirmation message will be dismissed in '{0}' second(s).... + /// + public static string DataCollectionConfirmTime + { + get + { + return ResourceManager.GetString("DataCollectionConfirmTime", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You choose to participate in Microsoft Azure PowerShell data collection.. + /// + public static string DataCollectionConfirmYes + { + get + { + return ResourceManager.GetString("DataCollectionConfirmYes", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The setting profile has been saved to the following path '{0}'.. + /// + public static string DataCollectionSaveFileInformation + { + get + { + return ResourceManager.GetString("DataCollectionSaveFileInformation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Setting: {0} as the default and current subscription. To view other subscriptions use Get-AzureSubscription. + /// + public static string DefaultAndCurrentSubscription + { + get + { + return ResourceManager.GetString("DefaultAndCurrentSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to none. + /// + public static string DefaultFileVersion + { + get + { + return ResourceManager.GetString("DefaultFileVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There are no hostnames which could be used for validation.. + /// + public static string DefaultHostnamesValidation + { + get + { + return ResourceManager.GetString("DefaultHostnamesValidation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 8080. + /// + public static string DefaultPort + { + get + { + return ResourceManager.GetString("DefaultPort", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 1000. + /// + public static string DefaultRoleCachingInMB + { + get + { + return ResourceManager.GetString("DefaultRoleCachingInMB", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Auto. + /// + public static string DefaultUpgradeMode + { + get + { + return ResourceManager.GetString("DefaultUpgradeMode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 80. + /// + public static string DefaultWebPort + { + get + { + return ResourceManager.GetString("DefaultWebPort", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Delete. + /// + public static string Delete + { + get + { + return ResourceManager.GetString("Delete", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The {0} slot for service {1} is already in {2} state. + /// + public static string DeploymentAlreadyInState + { + get + { + return ResourceManager.GetString("DeploymentAlreadyInState", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The deployment in {0} slot for service {1} is removed. + /// + public static string DeploymentRemovedMessage + { + get + { + return ResourceManager.GetString("DeploymentRemovedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.WindowsAzure.Plugins.Caching.DiagnosticLevel. + /// + public static string DiagnosticLevelName + { + get + { + return ResourceManager.GetString("DiagnosticLevelName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 1. + /// + public static string DiagnosticLevelValue + { + get + { + return ResourceManager.GetString("DiagnosticLevelValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The key to add already exists in the dictionary.. + /// + public static string DictionaryAddAlreadyContainsKey + { + get + { + return ResourceManager.GetString("DictionaryAddAlreadyContainsKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The array index cannot be less than zero.. + /// + public static string DictionaryCopyToArrayIndexLessThanZero + { + get + { + return ResourceManager.GetString("DictionaryCopyToArrayIndexLessThanZero", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The supplied array does not have enough room to contain the copied elements.. + /// + public static string DictionaryCopyToArrayTooShort + { + get + { + return ResourceManager.GetString("DictionaryCopyToArrayTooShort", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided dns {0} doesn't exist. + /// + public static string DnsDoesNotExist + { + get + { + return ResourceManager.GetString("DnsDoesNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft Azure Certificate. + /// + public static string EnableRemoteDesktop_FriendlyCertificateName + { + get + { + return ResourceManager.GetString("EnableRemoteDesktop_FriendlyCertificateName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Endpoint can't be retrieved for storage account. + /// + public static string EndPointNotFoundForBlobStorage + { + get + { + return ResourceManager.GetString("EndPointNotFoundForBlobStorage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} end processing.. + /// + public static string EndProcessingLog + { + get + { + return ResourceManager.GetString("EndProcessingLog", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to To use Active Directory authentication, you must configure the ActiveDirectoryEndpoint, ActiveDirectoryTenantId, and ActiveDirectorServiceEndpointResourceId for environment of '{0}'. You can configure these properties for this environment using the Set-AzureEnvironment cmdlet.. + /// + public static string EnvironmentDoesNotSupportActiveDirectory + { + get + { + return ResourceManager.GetString("EnvironmentDoesNotSupportActiveDirectory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The environment '{0}' already exists.. + /// + public static string EnvironmentExists + { + get + { + return ResourceManager.GetString("EnvironmentExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Environment name doesn't match one in subscription.. + /// + public static string EnvironmentNameDoesntMatchSubscription + { + get + { + return ResourceManager.GetString("EnvironmentNameDoesntMatchSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Environment name needs to be specified.. + /// + public static string EnvironmentNameNeedsToBeSpecified + { + get + { + return ResourceManager.GetString("EnvironmentNameNeedsToBeSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Environment needs to be specified.. + /// + public static string EnvironmentNeedsToBeSpecified + { + get + { + return ResourceManager.GetString("EnvironmentNeedsToBeSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The environment name '{0}' is not found.. + /// + public static string EnvironmentNotFound + { + get + { + return ResourceManager.GetString("EnvironmentNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to environments.xml. + /// + public static string EnvironmentsFileName + { + get + { + return ResourceManager.GetString("EnvironmentsFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error creating VirtualMachine. + /// + public static string ErrorCreatingVirtualMachine + { + get + { + return ResourceManager.GetString("ErrorCreatingVirtualMachine", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to download available runtimes for location '{0}'. + /// + public static string ErrorRetrievingRuntimesForLocation + { + get + { + return ResourceManager.GetString("ErrorRetrievingRuntimesForLocation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error updating VirtualMachine. + /// + public static string ErrorUpdatingVirtualMachine + { + get + { + return ResourceManager.GetString("ErrorUpdatingVirtualMachine", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Job Id {0} failed. Error: {1}, ExceptionDetails: {2}. + /// + public static string FailedJobErrorMessage + { + get + { + return ResourceManager.GetString("FailedJobErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to File path is not valid.. + /// + public static string FilePathIsNotValid + { + get + { + return ResourceManager.GetString("FilePathIsNotValid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The HTTP request was forbidden with client authentication scheme 'Anonymous'.. + /// + public static string FirstPurchaseErrorMessage + { + get + { + return ResourceManager.GetString("FirstPurchaseErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This add-on requires you to purchase the first instance through the Microsoft Azure Portal. Subsequent purchases can be performed through PowerShell.. + /// + public static string FirstPurchaseMessage + { + get + { + return ResourceManager.GetString("FirstPurchaseMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Operation Status:. + /// + public static string GatewayOperationStatus + { + get + { + return ResourceManager.GetString("GatewayOperationStatus", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resources\Scaffolding\General. + /// + public static string GeneralScaffolding + { + get + { + return ResourceManager.GetString("GeneralScaffolding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Getting all available Microsoft Azure Add-Ons, this may take few minutes.... + /// + public static string GetAllAddOnsWaitMessage + { + get + { + return ResourceManager.GetString("GetAllAddOnsWaitMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Name{0}Primary Key{0}Seconday Key. + /// + public static string GetStorageKeysHeader + { + get + { + return ResourceManager.GetString("GetStorageKeysHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Git not found. Please install git and place it in your command line path.. + /// + public static string GitNotFound + { + get + { + return ResourceManager.GetString("GitNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not find publish settings. Please run Import-AzurePublishSettingsFile.. + /// + public static string GlobalSettingsManager_Load_PublishSettingsNotFound + { + get + { + return ResourceManager.GetString("GlobalSettingsManager_Load_PublishSettingsNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find the WadCfg end element in the config.. + /// + public static string IaasDiagnosticsBadConfigNoEndWadCfg + { + get + { + return ResourceManager.GetString("IaasDiagnosticsBadConfigNoEndWadCfg", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WadCfg start element in the config is not matching the end element.. + /// + public static string IaasDiagnosticsBadConfigNoMatchingWadCfg + { + get + { + return ResourceManager.GetString("IaasDiagnosticsBadConfigNoMatchingWadCfg", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find the WadCfg element in the config.. + /// + public static string IaasDiagnosticsBadConfigNoWadCfg + { + get + { + return ResourceManager.GetString("IaasDiagnosticsBadConfigNoWadCfg", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to iisnode.dll. + /// + public static string IISNodeDll + { + get + { + return ResourceManager.GetString("IISNodeDll", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to iisnode. + /// + public static string IISNodeEngineKey + { + get + { + return ResourceManager.GetString("IISNodeEngineKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to iisnode-dev\\release\\x64. + /// + public static string IISNodePath + { + get + { + return ResourceManager.GetString("IISNodePath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to iisnode. + /// + public static string IISNodeRuntimeValue + { + get + { + return ResourceManager.GetString("IISNodeRuntimeValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Installing IISNode version {0} in Azure for WebRole '{1}' (the version locally installed is: {2}). + /// + public static string IISNodeVersionWarningText + { + get + { + return ResourceManager.GetString("IISNodeVersionWarningText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Illegal characters in path.. + /// + public static string IllegalPath + { + get + { + return ResourceManager.GetString("IllegalPath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Internal Server Error. + /// + public static string InternalServerErrorMessage + { + get + { + return ResourceManager.GetString("InternalServerErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot enable memcach protocol on a cache worker role {0}.. + /// + public static string InvalidCacheRoleName + { + get + { + return ResourceManager.GetString("InvalidCacheRoleName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid certificate format. Publish settings may be corrupted. Use Get-AzurePublishSettingsFile to download updated settings. + /// + public static string InvalidCertificate + { + get + { + return ResourceManager.GetString("InvalidCertificate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid certificate format.. + /// + public static string InvalidCertificateSingle + { + get + { + return ResourceManager.GetString("InvalidCertificateSingle", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided configuration path is invalid or doesn't exist. + /// + public static string InvalidConfigPath + { + get + { + return ResourceManager.GetString("InvalidConfigPath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The country name is invalid, please use a valid two character country code, as described in ISO 3166-1 alpha-2.. + /// + public static string InvalidCountryNameMessage + { + get + { + return ResourceManager.GetString("InvalidCountryNameMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No default subscription has been designated. Use Select-AzureSubscription -Default <subscriptionName> to set the default subscription.. + /// + public static string InvalidDefaultSubscription + { + get + { + return ResourceManager.GetString("InvalidDefaultSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deployment with {0} does not exist. + /// + public static string InvalidDeployment + { + get + { + return ResourceManager.GetString("InvalidDeployment", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The deployment slot name {0} is invalid. Slot name must be either "Staging" or "Production".. + /// + public static string InvalidDeploymentSlot + { + get + { + return ResourceManager.GetString("InvalidDeploymentSlot", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to "{0}" is an invalid DNS name for {1}. + /// + public static string InvalidDnsName + { + get + { + return ResourceManager.GetString("InvalidDnsName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid service endpoint.. + /// + public static string InvalidEndpoint + { + get + { + return ResourceManager.GetString("InvalidEndpoint", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided file in {0} must be have {1} extension. + /// + public static string InvalidFileExtension + { + get + { + return ResourceManager.GetString("InvalidFileExtension", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to File {0} has invalid characters. + /// + public static string InvalidFileName + { + get + { + return ResourceManager.GetString("InvalidFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You must create your git publishing credentials using the Microsoft Azure portal. + ///Please follow these steps in the portal: + ///1. On the left side open "Web Sites" + ///2. Click on any website + ///3. Choose "Setup Git Publishing" or "Reset deployment credentials" + ///4. Back in the PowerShell window, rerun this command by typing "New-AzureWebSite {site name} -Git -PublishingUsername {username}. + /// + public static string InvalidGitCredentials + { + get + { + return ResourceManager.GetString("InvalidGitCredentials", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The value {0} provided is not a valid GUID. Please provide a valid GUID.. + /// + public static string InvalidGuid + { + get + { + return ResourceManager.GetString("InvalidGuid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The specified hostname does not exist. Please specify a valid hostname for the site.. + /// + public static string InvalidHostnameValidation + { + get + { + return ResourceManager.GetString("InvalidHostnameValidation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role {0} instances must be greater than or equal 0 and less than or equal 20. + /// + public static string InvalidInstancesCount + { + get + { + return ResourceManager.GetString("InvalidInstancesCount", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There was an error creating your webjob. Please make sure that the script is in the root folder of the zip file.. + /// + public static string InvalidJobFile + { + get + { + return ResourceManager.GetString("InvalidJobFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not download a valid runtime manifest, Please check your internet connection and try again.. + /// + public static string InvalidManifestError + { + get + { + return ResourceManager.GetString("InvalidManifestError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The account {0} was not found. Please specify a valid account name.. + /// + public static string InvalidMediaServicesAccount + { + get + { + return ResourceManager.GetString("InvalidMediaServicesAccount", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided name "{0}" does not match the service bus namespace naming rules.. + /// + public static string InvalidNamespaceName + { + get + { + return ResourceManager.GetString("InvalidNamespaceName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Path must specify a valid path to an Azure profile.. + /// + public static string InvalidNewProfilePath + { + get + { + return ResourceManager.GetString("InvalidNewProfilePath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Value cannot be null. Parameter name: '{0}'. + /// + public static string InvalidNullArgument + { + get + { + return ResourceManager.GetString("InvalidNullArgument", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} is invalid or empty. + /// + public static string InvalidOrEmptyArgumentMessage + { + get + { + return ResourceManager.GetString("InvalidOrEmptyArgumentMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided package path is invalid or doesn't exist. + /// + public static string InvalidPackagePath + { + get + { + return ResourceManager.GetString("InvalidPackagePath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '{0}' is an invalid parameter set name.. + /// + public static string InvalidParameterSetName + { + get + { + return ResourceManager.GetString("InvalidParameterSetName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} doesn't exist in {1} or you've not passed valid value for it. + /// + public static string InvalidPath + { + get + { + return ResourceManager.GetString("InvalidPath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Path {0} has invalid characters. + /// + public static string InvalidPathName + { + get + { + return ResourceManager.GetString("InvalidPathName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Property bag Hashtable must contain one of the following sets of properties: {SubscriptionId, Certificate}, {SubscriptionId, Username, Password}, {SubscriptionId, ServicePrincipal, Password, Tenant}, {SubscriptionId, AccountId, Token}. + /// + public static string InvalidProfileProperties + { + get + { + return ResourceManager.GetString("InvalidProfileProperties", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided publish settings file {0} has invalid content. Please get valid by running cmdlet Get-AzurePublishSettingsFile. + /// + public static string InvalidPublishSettingsSchema + { + get + { + return ResourceManager.GetString("InvalidPublishSettingsSchema", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided role name "{0}" has invalid characters. + /// + public static string InvalidRoleNameMessage + { + get + { + return ResourceManager.GetString("InvalidRoleNameMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A valid name for the service root folder is required. + /// + public static string InvalidRootNameMessage + { + get + { + return ResourceManager.GetString("InvalidRootNameMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} is not a recognized runtime type. + /// + public static string InvalidRuntimeError + { + get + { + return ResourceManager.GetString("InvalidRuntimeError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A valid language is required. + /// + public static string InvalidScaffoldingLanguageArg + { + get + { + return ResourceManager.GetString("InvalidScaffoldingLanguageArg", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No subscription is currently selected. Use Select-Subscription to activate a subscription.. + /// + public static string InvalidSelectedSubscription + { + get + { + return ResourceManager.GetString("InvalidSelectedSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided location "{0}" does not exist in the available locations use Get-AzureSBLocation for listing available locations.. + /// + public static string InvalidServiceBusLocation + { + get + { + return ResourceManager.GetString("InvalidServiceBusLocation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please provide a service name or run this command from inside a service project directory.. + /// + public static string InvalidServiceName + { + get + { + return ResourceManager.GetString("InvalidServiceName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You must provide valid value for {0}. + /// + public static string InvalidServiceSettingElement + { + get + { + return ResourceManager.GetString("InvalidServiceSettingElement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to settings.json is invalid or doesn't exist. + /// + public static string InvalidServiceSettingMessage + { + get + { + return ResourceManager.GetString("InvalidServiceSettingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The subscription named '{0}' cannot be found. Use Set-AzureSubscription to initialize the subscription data.. + /// + public static string InvalidSubscription + { + get + { + return ResourceManager.GetString("InvalidSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided subscription id {0} is not valid. + /// + public static string InvalidSubscriptionId + { + get + { + return ResourceManager.GetString("InvalidSubscriptionId", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Must specify a non-null subscription name.. + /// + public static string InvalidSubscriptionName + { + get + { + return ResourceManager.GetString("InvalidSubscriptionName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A valid subscription name is required. This can be provided using the -Subscription parameter or by setting the subscription via the Set-AzureSubscription cmdlet. + /// + public static string InvalidSubscriptionNameMessage + { + get + { + return ResourceManager.GetString("InvalidSubscriptionNameMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided subscriptions file {0} has invalid content.. + /// + public static string InvalidSubscriptionsDataSchema + { + get + { + return ResourceManager.GetString("InvalidSubscriptionsDataSchema", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role {0} VM size should be ExtraSmall, Small, Medium, Large or ExtraLarge.. + /// + public static string InvalidVMSize + { + get + { + return ResourceManager.GetString("InvalidVMSize", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The web job file must have *.zip extension. + /// + public static string InvalidWebJobFile + { + get + { + return ResourceManager.GetString("InvalidWebJobFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Singleton option works for continuous jobs only.. + /// + public static string InvalidWebJobSingleton + { + get + { + return ResourceManager.GetString("InvalidWebJobSingleton", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The website {0} was not found. Please specify a valid website name.. + /// + public static string InvalidWebsite + { + get + { + return ResourceManager.GetString("InvalidWebsite", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No job for id: {0} was found.. + /// + public static string JobNotFound + { + get + { + return ResourceManager.GetString("JobNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to engines. + /// + public static string JsonEnginesSectionName + { + get + { + return ResourceManager.GetString("JsonEnginesSectionName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Scaffolding for this language is not yet supported. + /// + public static string LanguageScaffoldingIsNotSupported + { + get + { + return ResourceManager.GetString("LanguageScaffoldingIsNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Link already established. + /// + public static string LinkAlreadyEstablished + { + get + { + return ResourceManager.GetString("LinkAlreadyEstablished", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to local_package.csx. + /// + public static string LocalPackageFileName + { + get + { + return ResourceManager.GetString("LocalPackageFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ServiceConfiguration.Local.cscfg. + /// + public static string LocalServiceConfigurationFileName + { + get + { + return ResourceManager.GetString("LocalServiceConfigurationFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Looking for {0} deployment for {1} cloud service.... + /// + public static string LookingForDeploymentMessage + { + get + { + return ResourceManager.GetString("LookingForDeploymentMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Looking for cloud service {0}.... + /// + public static string LookingForServiceMessage + { + get + { + return ResourceManager.GetString("LookingForServiceMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Azure Long-Running Job. + /// + public static string LROJobName + { + get + { + return ResourceManager.GetString("LROJobName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The cmdlet failed in background execution. The returned error was '{0}'. Please execute the cmdlet again. You may need to execute this cmdlet synchronously, by omitting the '-AsJob' parameter.. + /// + public static string LROTaskExceptionMessage + { + get + { + return ResourceManager.GetString("LROTaskExceptionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to managementCertificate.pem. + /// + public static string ManagementCertificateFileName + { + get + { + return ResourceManager.GetString("ManagementCertificateFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ?whr={0}. + /// + public static string ManagementPortalRealmFormat + { + get + { + return ResourceManager.GetString("ManagementPortalRealmFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to //baseuri. + /// + public static string ManifestBaseUriQuery + { + get + { + return ResourceManager.GetString("ManifestBaseUriQuery", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to uri. + /// + public static string ManifestBlobUriKey + { + get + { + return ResourceManager.GetString("ManifestBlobUriKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to http://az413943.vo.msecnd.net/node/runtimemanifest_0.7.5.2.xml. + /// + public static string ManifestUri + { + get + { + return ResourceManager.GetString("ManifestUri", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Property bag Hashtable must contain a 'Certificate' of type 'X509Certificate2'.. + /// + public static string MissingCertificateInProfileProperties + { + get + { + return ResourceManager.GetString("MissingCertificateInProfileProperties", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Property bag Hashtable must contain a 'Password' with an associated 'Username' or 'ServicePrincipal'.. + /// + public static string MissingPasswordInProfileProperties + { + get + { + return ResourceManager.GetString("MissingPasswordInProfileProperties", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Property bag Hashtable must contain a 'SubscriptionId'.. + /// + public static string MissingSubscriptionInProfileProperties + { + get + { + return ResourceManager.GetString("MissingSubscriptionInProfileProperties", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Multiple Add-Ons found holding name {0}. + /// + public static string MultipleAddOnsFoundMessage + { + get + { + return ResourceManager.GetString("MultipleAddOnsFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Multiple possible publishing users. Please go to the Portal and use the listed deployment user, or click 'set/reset deployment credentials' to set up a new user account, then reurn this cmdlet and specify PublishingUsername.. + /// + public static string MultiplePublishingUsernames + { + get + { + return ResourceManager.GetString("MultiplePublishingUsernames", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The first publish settings file "{0}" is used. If you want to use another file specify the file name.. + /// + public static string MultiplePublishSettingsFilesFoundMessage + { + get + { + return ResourceManager.GetString("MultiplePublishSettingsFilesFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.WindowsAzure.Plugins.Caching.NamedCaches. + /// + public static string NamedCacheSettingName + { + get + { + return ResourceManager.GetString("NamedCacheSettingName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {"caches":[{"name":"default","policy":{"eviction":{"type":0},"expiration":{"defaultTTL":10,"isExpirable":true,"type":1},"serverNotification":{"isEnabled":false}},"secondaries":0}]}. + /// + public static string NamedCacheSettingValue + { + get + { + return ResourceManager.GetString("NamedCacheSettingValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A publishing username is required. Please specify one using the argument PublishingUsername.. + /// + public static string NeedPublishingUsernames + { + get + { + return ResourceManager.GetString("NeedPublishingUsernames", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to New Add-On Confirmation. + /// + public static string NewAddOnConformation + { + get + { + return ResourceManager.GetString("NewAddOnConformation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis + ///for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) + ///agree to the {2}'s terms of user and privacy statement at {0} and (c) agree to sharing my + ///contact information with {2}.. + /// + public static string NewMicrosoftAddOnMessage + { + get + { + return ResourceManager.GetString("NewMicrosoftAddOnMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Internal Server Error. This could happen because the namespace name is already used or due to an incorrect location name. Use Get-AzureSBLocation cmdlet to list valid names.. + /// + public static string NewNamespaceErrorMessage + { + get + { + return ResourceManager.GetString("NewNamespaceErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis + ///for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) + ///acknowledge the offering is provided by {2}, not Microsoft, and agree to {2}'s terms of + ///use and privacy statement at {0} and (c) agree to sharing my contact information with {2}.. + /// + public static string NewNonMicrosoftAddOnMessage + { + get + { + return ResourceManager.GetString("NewNonMicrosoftAddOnMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service has been created at {0}. + /// + public static string NewServiceCreatedMessage + { + get + { + return ResourceManager.GetString("NewServiceCreatedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No. + /// + public static string No + { + get + { + return ResourceManager.GetString("No", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is no access token cached for subscription {0}, user id {1}. Use the Add-AzureAccount cmdlet to log in again and get a token for this subscription.. + /// + public static string NoCachedToken + { + get + { + return ResourceManager.GetString("NoCachedToken", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The service does not have any cache worker roles, add one first by running cmdlet Add-AzureCacheWorkerRole.. + /// + public static string NoCacheWorkerRoles + { + get + { + return ResourceManager.GetString("NoCacheWorkerRoles", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No clouds available. + /// + public static string NoCloudsAvailable + { + get + { + return ResourceManager.GetString("NoCloudsAvailable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to "There is no current context, please log in using Connect-AzAccount.". + /// + public static string NoCurrentContextForDataCmdlet + { + get + { + return ResourceManager.GetString("NoCurrentContextForDataCmdlet", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to nodejs. + /// + public static string NodeDirectory + { + get + { + return ResourceManager.GetString("NodeDirectory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to node. + /// + public static string NodeEngineKey + { + get + { + return ResourceManager.GetString("NodeEngineKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to node.exe. + /// + public static string NodeExe + { + get + { + return ResourceManager.GetString("NodeExe", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is no default subscription set, please set a default subscription by running Set-AzureSubscription -Default <subscription name>. + /// + public static string NoDefaultSubscriptionMessage + { + get + { + return ResourceManager.GetString("NoDefaultSubscriptionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft SDKs\Azure\Nodejs\Nov2011. + /// + public static string NodeModulesPath + { + get + { + return ResourceManager.GetString("NodeModulesPath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to nodejs. + /// + public static string NodeProgramFilesFolderName + { + get + { + return ResourceManager.GetString("NodeProgramFilesFolderName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to node. + /// + public static string NodeRuntimeValue + { + get + { + return ResourceManager.GetString("NodeRuntimeValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resources\Scaffolding\Node. + /// + public static string NodeScaffolding + { + get + { + return ResourceManager.GetString("NodeScaffolding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.WindowsAzure.Commands.CloudService.ScaffoldingResources.Node. + /// + public static string NodeScaffoldingResources + { + get + { + return ResourceManager.GetString("NodeScaffoldingResources", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Installing Node version {0} in Azure for Role '{1}' (the Node version locally installed is: {2}). + /// + public static string NodeVersionWarningText + { + get + { + return ResourceManager.GetString("NodeVersionWarningText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No, I do not agree. + /// + public static string NoHint + { + get + { + return ResourceManager.GetString("NoHint", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please connect to internet before executing this cmdlet. + /// + public static string NoInternetConnection + { + get + { + return ResourceManager.GetString("NoInternetConnection", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to <NONE>. + /// + public static string None + { + get + { + return ResourceManager.GetString("None", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No publish settings files with extension *.publishsettings are found in the directory "{0}".. + /// + public static string NoPublishSettingsFilesFoundMessage + { + get + { + return ResourceManager.GetString("NoPublishSettingsFilesFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is no subscription associated with account {0}.. + /// + public static string NoSubscriptionAddedMessage + { + get + { + return ResourceManager.GetString("NoSubscriptionAddedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No subscriptions are associated with the logged in account in Azure Service Management (RDFE). This means that the logged in user is not an administrator or co-administrator for any account.\r\nDid you mean to execute Connect-AzAccount?. + /// + public static string NoSubscriptionFoundForTenant + { + get + { + return ResourceManager.GetString("NoSubscriptionFoundForTenant", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '{0}' must be a cache worker role. Verify that it has proper cache worker role configuration.. + /// + public static string NotCacheWorkerRole + { + get + { + return ResourceManager.GetString("NotCacheWorkerRole", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Certificate can't be null.. + /// + public static string NullCertificateMessage + { + get + { + return ResourceManager.GetString("NullCertificateMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} could not be null or empty. + /// + public static string NullObjectMessage + { + get + { + return ResourceManager.GetString("NullObjectMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to add a null RoleSettings to {0}. + /// + public static string NullRoleSettingsMessage + { + get + { + return ResourceManager.GetString("NullRoleSettingsMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to add new role to null service definition. + /// + public static string NullServiceDefinitionMessage + { + get + { + return ResourceManager.GetString("NullServiceDefinitionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The request offer '{0}' is not found.. + /// + public static string OfferNotFoundMessage + { + get + { + return ResourceManager.GetString("OfferNotFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Operation "{0}" failed on VM with ID: {1}. + /// + public static string OperationFailedErrorMessage + { + get + { + return ResourceManager.GetString("OperationFailedErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The REST operation failed with message '{0}' and error code '{1}'. + /// + public static string OperationFailedMessage + { + get + { + return ResourceManager.GetString("OperationFailedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Job Id {0} did not complete within expected time or it is in Failed/Canceled/Invalid state.. + /// + public static string OperationTimedOutOrError + { + get + { + return ResourceManager.GetString("OperationTimedOutOrError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to package. + /// + public static string Package + { + get + { + return ResourceManager.GetString("Package", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Package is created at service root path {0}.. + /// + public static string PackageCreated + { + get + { + return ResourceManager.GetString("PackageCreated", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {{ + /// "author": "", + /// + /// "name": "{0}", + /// "version": "0.0.0", + /// "dependencies":{{}}, + /// "devDependencies":{{}}, + /// "optionalDependencies": {{}}, + /// "engines": {{ + /// "node": "*", + /// "iisnode": "*" + /// }} + /// + ///}} + ///. + /// + public static string PackageJsonDefaultFile + { + get + { + return ResourceManager.GetString("PackageJsonDefaultFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to package.json. + /// + public static string PackageJsonFileName + { + get + { + return ResourceManager.GetString("PackageJsonFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Path {0} doesn't exist.. + /// + public static string PathDoesNotExist + { + get + { + return ResourceManager.GetString("PathDoesNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Path for {0} doesn't exist in {1}.. + /// + public static string PathDoesNotExistForElement + { + get + { + return ResourceManager.GetString("PathDoesNotExistForElement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A value for the Peer Asn has to be provided.. + /// + public static string PeerAsnRequired + { + get + { + return ResourceManager.GetString("PeerAsnRequired", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 5.4.0. + /// + public static string PHPDefaultRuntimeVersion + { + get + { + return ResourceManager.GetString("PHPDefaultRuntimeVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to php. + /// + public static string PhpRuntimeValue + { + get + { + return ResourceManager.GetString("PhpRuntimeValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resources\Scaffolding\PHP. + /// + public static string PHPScaffolding + { + get + { + return ResourceManager.GetString("PHPScaffolding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.WindowsAzure.Commands.CloudService.ScaffoldingResources.PHP. + /// + public static string PHPScaffoldingResources + { + get + { + return ResourceManager.GetString("PHPScaffoldingResources", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Installing PHP version {0} for Role '{1}' (the PHP version locally installed is: {2}). + /// + public static string PHPVersionWarningText + { + get + { + return ResourceManager.GetString("PHPVersionWarningText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You must create your first web site using the Microsoft Azure portal. + ///Please follow these steps in the portal: + ///1. At the bottom of the page, click on New > Web Site > Quick Create + ///2. Type {0} in the URL field + ///3. Click on "Create Web Site" + ///4. Once the site has been created, click on the site name + ///5. Click on "Set up Git publishing" or "Reset deployment credentials" and setup a publishing username and password. Use those credentials for all new websites you create.. + /// + public static string PortalInstructions + { + get + { + return ResourceManager.GetString("PortalInstructions", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 6. Back in the console window, rerun this command by typing "New-AzureWebsite <site name> -Git". + /// + public static string PortalInstructionsGit + { + get + { + return ResourceManager.GetString("PortalInstructionsGit", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The estimated generally available date is '{0}'.. + /// + public static string PreviewCmdletETAMessage { + get { + return ResourceManager.GetString("PreviewCmdletETAMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This cmdlet is in preview. Its behavior is subject to change based on customer feedback.. + /// + public static string PreviewCmdletMessage + { + get + { + return ResourceManager.GetString("PreviewCmdletMessage", resourceCulture); + } + } + + + /// + /// Looks up a localized string similar to A value for the Primary Peer Subnet has to be provided.. + /// + public static string PrimaryPeerSubnetRequired + { + get + { + return ResourceManager.GetString("PrimaryPeerSubnetRequired", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Promotion code can be used only when updating to a new plan.. + /// + public static string PromotionCodeWithCurrentPlanMessage + { + get + { + return ResourceManager.GetString("PromotionCodeWithCurrentPlanMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service not published at user request.. + /// + public static string PublishAbortedAtUserRequest + { + get + { + return ResourceManager.GetString("PublishAbortedAtUserRequest", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Complete.. + /// + public static string PublishCompleteMessage + { + get + { + return ResourceManager.GetString("PublishCompleteMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Connecting.... + /// + public static string PublishConnectingMessage + { + get + { + return ResourceManager.GetString("PublishConnectingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Created Deployment ID: {0}.. + /// + public static string PublishCreatedDeploymentMessage + { + get + { + return ResourceManager.GetString("PublishCreatedDeploymentMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Created hosted service '{0}'.. + /// + public static string PublishCreatedServiceMessage + { + get + { + return ResourceManager.GetString("PublishCreatedServiceMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Created Website URL: {0}.. + /// + public static string PublishCreatedWebsiteMessage + { + get + { + return ResourceManager.GetString("PublishCreatedWebsiteMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Creating.... + /// + public static string PublishCreatingServiceMessage + { + get + { + return ResourceManager.GetString("PublishCreatingServiceMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Initializing.... + /// + public static string PublishInitializingMessage + { + get + { + return ResourceManager.GetString("PublishInitializingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to busy. + /// + public static string PublishInstanceStatusBusy + { + get + { + return ResourceManager.GetString("PublishInstanceStatusBusy", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to creating the virtual machine. + /// + public static string PublishInstanceStatusCreating + { + get + { + return ResourceManager.GetString("PublishInstanceStatusCreating", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Instance {0} of role {1} is {2}.. + /// + public static string PublishInstanceStatusMessage + { + get + { + return ResourceManager.GetString("PublishInstanceStatusMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ready. + /// + public static string PublishInstanceStatusReady + { + get + { + return ResourceManager.GetString("PublishInstanceStatusReady", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Preparing deployment for {0} with Subscription ID: {1}.... + /// + public static string PublishPreparingDeploymentMessage + { + get + { + return ResourceManager.GetString("PublishPreparingDeploymentMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Publishing {0} to Microsoft Azure. This may take several minutes.... + /// + public static string PublishServiceStartMessage + { + get + { + return ResourceManager.GetString("PublishServiceStartMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to publish settings. + /// + public static string PublishSettings + { + get + { + return ResourceManager.GetString("PublishSettings", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Azure. + /// + public static string PublishSettingsElementName + { + get + { + return ResourceManager.GetString("PublishSettingsElementName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to .PublishSettings. + /// + public static string PublishSettingsFileExtention + { + get + { + return ResourceManager.GetString("PublishSettingsFileExtention", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to publishSettings.xml. + /// + public static string PublishSettingsFileName + { + get + { + return ResourceManager.GetString("PublishSettingsFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to &whr={0}. + /// + public static string PublishSettingsFileRealmFormat + { + get + { + return ResourceManager.GetString("PublishSettingsFileRealmFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Publish settings imported. + /// + public static string PublishSettingsSetSuccessfully + { + get + { + return ResourceManager.GetString("PublishSettingsSetSuccessfully", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to AZURE_PUBLISHINGPROFILE_URL. + /// + public static string PublishSettingsUrlEnv + { + get + { + return ResourceManager.GetString("PublishSettingsUrlEnv", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Starting.... + /// + public static string PublishStartingMessage + { + get + { + return ResourceManager.GetString("PublishStartingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Upgrading.... + /// + public static string PublishUpgradingMessage + { + get + { + return ResourceManager.GetString("PublishUpgradingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Uploading Package to storage service {0}.... + /// + public static string PublishUploadingPackageMessage + { + get + { + return ResourceManager.GetString("PublishUploadingPackageMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Verifying storage account '{0}'.... + /// + public static string PublishVerifyingStorageMessage + { + get + { + return ResourceManager.GetString("PublishVerifyingStorageMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Path '{0}' not found.. + /// + public static string PublishVMDscExtensionAdditionalContentPathNotExist + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionAdditionalContentPathNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Configuration published to {0}. + /// + public static string PublishVMDscExtensionArchiveUploadedMessage + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionArchiveUploadedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Copy '{0}' to '{1}'.. + /// + public static string PublishVMDscExtensionCopyFileVerbose + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionCopyFileVerbose", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Copy the module '{0}' to '{1}'.. + /// + public static string PublishVMDscExtensionCopyModuleVerbose + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionCopyModuleVerbose", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid configuration file: {0}. + ///The file needs to be a PowerShell script (.ps1 or .psm1).. + /// + public static string PublishVMDscExtensionCreateArchiveConfigFileInvalidExtension + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionCreateArchiveConfigFileInvalidExtension", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deleted '{0}'. + /// + public static string PublishVMDscExtensionDeletedFileMessage + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionDeletedFileMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot delete '{0}': {1}. + /// + public static string PublishVMDscExtensionDeleteErrorMessage + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionDeleteErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Path '{0}' not found.. + /// + public static string PublishVMDscExtensionDirectoryNotExist + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionDirectoryNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot get module for DscResource '{0}'. Possible solutions: + ///1) Specify -ModuleName for Import-DscResource in your configuration. + ///2) Unblock module that contains resource. + ///3) Move Import-DscResource inside Node block. + ///. + /// + public static string PublishVMDscExtensionGetDscResourceFailed + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionGetDscResourceFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to List of required modules: [{0}].. + /// + public static string PublishVMDscExtensionRequiredModulesVerbose + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionRequiredModulesVerbose", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Your current PowerShell version {1} is less then required by this cmdlet {0}. Consider download and install latest PowerShell version.. + /// + public static string PublishVMDscExtensionRequiredPsVersion + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionRequiredPsVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Configuration script '{0}' contained parse errors: + ///{1}. + /// + public static string PublishVMDscExtensionStorageParserErrors + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionStorageParserErrors", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Temp folder '{0}' created.. + /// + public static string PublishVMDscExtensionTempFolderVerbose + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionTempFolderVerbose", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid configuration file: {0}. + ///The file needs to be a PowerShell script (.ps1 or .psm1) or a ZIP archive (.zip).. + /// + public static string PublishVMDscExtensionUploadArchiveConfigFileInvalidExtension + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionUploadArchiveConfigFileInvalidExtension", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Configuration file '{0}' not found.. + /// + public static string PublishVMDscExtensionUploadArchiveConfigFileNotExist + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionUploadArchiveConfigFileNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Azure PowerShell collects usage data in order to improve your experience. + ///The data is anonymous and does not include commandline argument values. + ///The data is collected by Microsoft. + /// + ///Use the Disable-AzureDataCollection cmdlet to turn the feature Off. The cmdlet can be found in the Azure module. To disable data collection: PS > Disable-AzureDataCollection. + ///Use the Enable-AzureDataCollection cmdlet to turn the feature On. The cmdlet can be found in the Azure module. To enable data collection: PS > Enab [rest of string was truncated]";. + /// + public static string RDFEDataCollectionMessage + { + get + { + return ResourceManager.GetString("RDFEDataCollectionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Replace current deployment with '{0}' Id ?. + /// + public static string RedeployCommit + { + get + { + return ResourceManager.GetString("RedeployCommit", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to regenerate key?. + /// + public static string RegenerateKeyWarning + { + get + { + return ResourceManager.GetString("RegenerateKeyWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Generate new key.. + /// + public static string RegenerateKeyWhatIfMessage + { + get + { + return ResourceManager.GetString("RegenerateKeyWhatIfMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove account '{0}'?. + /// + public static string RemoveAccountConfirmation + { + get + { + return ResourceManager.GetString("RemoveAccountConfirmation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing account. + /// + public static string RemoveAccountMessage + { + get + { + return ResourceManager.GetString("RemoveAccountMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove Add-On Confirmation. + /// + public static string RemoveAddOnConformation + { + get + { + return ResourceManager.GetString("RemoveAddOnConformation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to If you delete this add-on, your data may be deleted and the operation may not be undone. You may have to purchase it again from the Microsoft Azure Store to use it. The price of the add-on may not be refunded. Are you sure you want to delete this add-on? Enter “Yes” to confirm.. + /// + public static string RemoveAddOnMessage + { + get + { + return ResourceManager.GetString("RemoveAddOnMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove-AzureBGPPeering Operation failed.. + /// + public static string RemoveAzureBGPPeeringFailed + { + get + { + return ResourceManager.GetString("RemoveAzureBGPPeeringFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing Bgp Peering. + /// + public static string RemoveAzureBGPPeeringMessage + { + get + { + return ResourceManager.GetString("RemoveAzureBGPPeeringMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Successfully removed Azure Bgp Peering with Service Key {0}.. + /// + public static string RemoveAzureBGPPeeringSucceeded + { + get + { + return ResourceManager.GetString("RemoveAzureBGPPeeringSucceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the Bgp Peering with service key '{0}'?. + /// + public static string RemoveAzureBGPPeeringWarning + { + get + { + return ResourceManager.GetString("RemoveAzureBGPPeeringWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the Dedicated Circuit with service key '{0}'?. + /// + public static string RemoveAzureDedicatdCircuitWarning + { + get + { + return ResourceManager.GetString("RemoveAzureDedicatdCircuitWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove-AzureDedicatedCircuit Operation failed.. + /// + public static string RemoveAzureDedicatedCircuitFailed + { + get + { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove-AzureDedicatedCircuitLink Operation failed.. + /// + public static string RemoveAzureDedicatedCircuitLinkFailed + { + get + { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitLinkFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing Dedicated Circui Link. + /// + public static string RemoveAzureDedicatedCircuitLinkMessage + { + get + { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitLinkMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Successfully removed Azure Dedicated Circuit Link with Service Key {0} and Vnet Name {1}. + /// + public static string RemoveAzureDedicatedCircuitLinkSucceeded + { + get + { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitLinkSucceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the Dedicated Circuit Link with service key '{0}' and virtual network name '{1}'?. + /// + public static string RemoveAzureDedicatedCircuitLinkWarning + { + get + { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitLinkWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing Dedicated Circuit. + /// + public static string RemoveAzureDedicatedCircuitMessage + { + get + { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Successfully removed Azure Dedicated Circuit with Service Key {0}.. + /// + public static string RemoveAzureDedicatedCircuitSucceeded + { + get + { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitSucceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing cloud service {0}.... + /// + public static string RemoveAzureServiceWaitMessage + { + get + { + return ResourceManager.GetString("RemoveAzureServiceWaitMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The default subscription is being removed. Use Select-AzureSubscription -Default <subscriptionName> to select a new default subscription.. + /// + public static string RemoveDefaultSubscription + { + get + { + return ResourceManager.GetString("RemoveDefaultSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing {0} deployment for {1} service. + /// + public static string RemoveDeploymentWaitMessage + { + get + { + return ResourceManager.GetString("RemoveDeploymentWaitMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing an environment will remove all associated subscriptions and accounts. Are you sure you want to remove an environment '{0}'?. + /// + public static string RemoveEnvironmentConfirmation + { + get + { + return ResourceManager.GetString("RemoveEnvironmentConfirmation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing environment. + /// + public static string RemoveEnvironmentMessage + { + get + { + return ResourceManager.GetString("RemoveEnvironmentMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing job collection. + /// + public static string RemoveJobCollectionMessage + { + get + { + return ResourceManager.GetString("RemoveJobCollectionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the job collection "{0}". + /// + public static string RemoveJobCollectionWarning + { + get + { + return ResourceManager.GetString("RemoveJobCollectionWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing job. + /// + public static string RemoveJobMessage + { + get + { + return ResourceManager.GetString("RemoveJobMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the job "{0}". + /// + public static string RemoveJobWarning + { + get + { + return ResourceManager.GetString("RemoveJobWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the account?. + /// + public static string RemoveMediaAccountWarning + { + get + { + return ResourceManager.GetString("RemoveMediaAccountWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account removed.. + /// + public static string RemoveMediaAccountWhatIfMessage + { + get + { + return ResourceManager.GetString("RemoveMediaAccountWhatIfMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Internal Server Error. This could happen because the namespace does not exist or it does not exist under your subscription.. + /// + public static string RemoveNamespaceErrorMessage + { + get + { + return ResourceManager.GetString("RemoveNamespaceErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing old package {0}.... + /// + public static string RemovePackage + { + get + { + return ResourceManager.GetString("RemovePackage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing the Azure profile will remove all associated environments, subscriptions, and accounts. Are you sure you want to remove the Azure profile?. + /// + public static string RemoveProfileConfirmation + { + get + { + return ResourceManager.GetString("RemoveProfileConfirmation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing the Azure profile. + /// + public static string RemoveProfileMessage + { + get + { + return ResourceManager.GetString("RemoveProfileMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to delete the namespace '{0}'?. + /// + public static string RemoveServiceBusNamespaceConfirmation + { + get + { + return ResourceManager.GetString("RemoveServiceBusNamespaceConfirmation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove cloud service?. + /// + public static string RemoveServiceWarning + { + get + { + return ResourceManager.GetString("RemoveServiceWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove cloud service and all it's deployments. + /// + public static string RemoveServiceWhatIfMessage + { + get + { + return ResourceManager.GetString("RemoveServiceWhatIfMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove subscription '{0}'?. + /// + public static string RemoveSubscriptionConfirmation + { + get + { + return ResourceManager.GetString("RemoveSubscriptionConfirmation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing subscription. + /// + public static string RemoveSubscriptionMessage + { + get + { + return ResourceManager.GetString("RemoveSubscriptionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The endpoint {0} cannot be removed from profile {1} because it's not in the profile.. + /// + public static string RemoveTrafficManagerEndpointMissing + { + get + { + return ResourceManager.GetString("RemoveTrafficManagerEndpointMissing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove-AzureTrafficManagerProfile Operation failed.. + /// + public static string RemoveTrafficManagerProfileFailed + { + get + { + return ResourceManager.GetString("RemoveTrafficManagerProfileFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Successfully removed Traffic Manager profile with name {0}.. + /// + public static string RemoveTrafficManagerProfileSucceeded + { + get + { + return ResourceManager.GetString("RemoveTrafficManagerProfileSucceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the Traffic Manager profile "{0}"?. + /// + public static string RemoveTrafficManagerProfileWarning + { + get + { + return ResourceManager.GetString("RemoveTrafficManagerProfileWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to delete the VM '{0}'?. + /// + public static string RemoveVMConfirmationMessage + { + get + { + return ResourceManager.GetString("RemoveVMConfirmationMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deleting VM.. + /// + public static string RemoveVMMessage + { + get + { + return ResourceManager.GetString("RemoveVMMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing WebJob.... + /// + public static string RemoveWebJobMessage + { + get + { + return ResourceManager.GetString("RemoveWebJobMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove job '{0}'?. + /// + public static string RemoveWebJobWarning + { + get + { + return ResourceManager.GetString("RemoveWebJobWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing website. + /// + public static string RemoveWebsiteMessage + { + get + { + return ResourceManager.GetString("RemoveWebsiteMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the website "{0}". + /// + public static string RemoveWebsiteWarning + { + get + { + return ResourceManager.GetString("RemoveWebsiteWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing public environment is not supported.. + /// + public static string RemovingDefaultEnvironmentsNotSupported + { + get + { + return ResourceManager.GetString("RemovingDefaultEnvironmentsNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deleting namespace. + /// + public static string RemovingNamespaceMessage + { + get + { + return ResourceManager.GetString("RemovingNamespaceMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Repository is not setup. You need to pass a valid site name.. + /// + public static string RepositoryNotSetup + { + get + { + return ResourceManager.GetString("RepositoryNotSetup", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Reserved IP with the Name:'{0}' will no longer be in use after the deployment is deleted, and it is still reserved for later use.. + /// + public static string ReservedIPNameNoLongerInUseButStillBeingReserved + { + get + { + return ResourceManager.GetString("ReservedIPNameNoLongerInUseButStillBeingReserved", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resource with ID : {0} does not exist.. + /// + public static string ResourceNotFound + { + get + { + return ResourceManager.GetString("ResourceNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Restart. + /// + public static string Restart + { + get + { + return ResourceManager.GetString("Restart", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resume. + /// + public static string Resume + { + get + { + return ResourceManager.GetString("Resume", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /role:{0};"{1}/{0}" . + /// + public static string RoleArgTemplate + { + get + { + return ResourceManager.GetString("RoleArgTemplate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to bin. + /// + public static string RoleBinFolderName + { + get + { + return ResourceManager.GetString("RoleBinFolderName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role {0} is {1}. + /// + public static string RoleInstanceWaitMsg + { + get + { + return ResourceManager.GetString("RoleInstanceWaitMsg", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 20. + /// + public static string RoleMaxInstances + { + get + { + return ResourceManager.GetString("RoleMaxInstances", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to role name. + /// + public static string RoleName + { + get + { + return ResourceManager.GetString("RoleName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided role name {0} doesn't exist. + /// + public static string RoleNotFoundMessage + { + get + { + return ResourceManager.GetString("RoleNotFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to RoleSettings.xml. + /// + public static string RoleSettingsTemplateFileName + { + get + { + return ResourceManager.GetString("RoleSettingsTemplateFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role type {0} doesn't exist. + /// + public static string RoleTypeDoesNotExist + { + get + { + return ResourceManager.GetString("RoleTypeDoesNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to public static Dictionary<string, Location> ReverseLocations { get; private set; }. + /// + public static string RuntimeDeploymentLocationError + { + get + { + return ResourceManager.GetString("RuntimeDeploymentLocationError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Preparing runtime deployment for service '{0}'. + /// + public static string RuntimeDeploymentStart + { + get + { + return ResourceManager.GetString("RuntimeDeploymentStart", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WARNING Runtime Mismatch: Are you sure that you want to publish service '{0}' using an Azure runtime version that does not match your local runtime version?. + /// + public static string RuntimeMismatchWarning + { + get + { + return ResourceManager.GetString("RuntimeMismatchWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to RUNTIMEOVERRIDEURL. + /// + public static string RuntimeOverrideKey + { + get + { + return ResourceManager.GetString("RuntimeOverrideKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /runtimemanifest/runtimes/runtime. + /// + public static string RuntimeQuery + { + get + { + return ResourceManager.GetString("RuntimeQuery", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to RUNTIMEID. + /// + public static string RuntimeTypeKey + { + get + { + return ResourceManager.GetString("RuntimeTypeKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to RUNTIMEURL. + /// + public static string RuntimeUrlKey + { + get + { + return ResourceManager.GetString("RuntimeUrlKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to RUNTIMEVERSIONPRIMARYKEY. + /// + public static string RuntimeVersionPrimaryKey + { + get + { + return ResourceManager.GetString("RuntimeVersionPrimaryKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to scaffold.xml. + /// + public static string ScaffoldXml + { + get + { + return ResourceManager.GetString("ScaffoldXml", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid location entered. Pick one of the locations from Get-AzureSchedulerLocation. + /// + public static string SchedulerInvalidLocation + { + get + { + return ResourceManager.GetString("SchedulerInvalidLocation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A value for the Secondary Peer Subnet has to be provided.. + /// + public static string SecondaryPeerSubnetRequired + { + get + { + return ResourceManager.GetString("SecondaryPeerSubnetRequired", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service {0} already exists on disk in location {1}. + /// + public static string ServiceAlreadyExistsOnDisk + { + get + { + return ResourceManager.GetString("ServiceAlreadyExistsOnDisk", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No ServiceBus authorization rule with the given characteristics was found. + /// + public static string ServiceBusAuthorizationRuleNotFound + { + get + { + return ResourceManager.GetString("ServiceBusAuthorizationRuleNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The service bus entity '{0}' is not found.. + /// + public static string ServiceBusEntityTypeNotFound + { + get + { + return ResourceManager.GetString("ServiceBusEntityTypeNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Internal Server Error. This could happen due to an incorrect/missing namespace. + /// + public static string ServiceBusNamespaceMissingMessage + { + get + { + return ResourceManager.GetString("ServiceBusNamespaceMissingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service configuration. + /// + public static string ServiceConfiguration + { + get + { + return ResourceManager.GetString("ServiceConfiguration", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service definition. + /// + public static string ServiceDefinition + { + get + { + return ResourceManager.GetString("ServiceDefinition", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ServiceDefinition.csdef. + /// + public static string ServiceDefinitionFileName + { + get + { + return ResourceManager.GetString("ServiceDefinitionFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0}Deploy. + /// + public static string ServiceDeploymentName + { + get + { + return ResourceManager.GetString("ServiceDeploymentName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The specified cloud service "{0}" does not exist.. + /// + public static string ServiceDoesNotExist + { + get + { + return ResourceManager.GetString("ServiceDoesNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} slot for service {1} is in {2} state, please wait until it finish and update it's status. + /// + public static string ServiceIsInTransitionState + { + get + { + return ResourceManager.GetString("ServiceIsInTransitionState", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to "An exception occurred when calling the ServiceManagement API. HTTP Status Code: {0}. Service Management Error Code: {1}. Message: {2}. Operation Tracking ID: {3}.". + /// + public static string ServiceManagementClientExceptionStringFormat + { + get + { + return ResourceManager.GetString("ServiceManagementClientExceptionStringFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Begin Operation: {0}. + /// + public static string ServiceManagementExecuteClientActionBeginOperation + { + get + { + return ResourceManager.GetString("ServiceManagementExecuteClientActionBeginOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Completed Operation: {0}. + /// + public static string ServiceManagementExecuteClientActionCompletedOperation + { + get + { + return ResourceManager.GetString("ServiceManagementExecuteClientActionCompletedOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Begin Operation: {0}. + /// + public static string ServiceManagementExecuteClientActionInOCSBeginOperation + { + get + { + return ResourceManager.GetString("ServiceManagementExecuteClientActionInOCSBeginOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Completed Operation: {0}. + /// + public static string ServiceManagementExecuteClientActionInOCSCompletedOperation + { + get + { + return ResourceManager.GetString("ServiceManagementExecuteClientActionInOCSCompletedOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service name. + /// + public static string ServiceName + { + get + { + return ResourceManager.GetString("ServiceName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided service name {0} already exists, please pick another name. + /// + public static string ServiceNameExists + { + get + { + return ResourceManager.GetString("ServiceNameExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please provide name for the hosted service. + /// + public static string ServiceNameMissingMessage + { + get + { + return ResourceManager.GetString("ServiceNameMissingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service parent directory. + /// + public static string ServiceParentDirectory + { + get + { + return ResourceManager.GetString("ServiceParentDirectory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service {0} removed successfully. + /// + public static string ServiceRemovedMessage + { + get + { + return ResourceManager.GetString("ServiceRemovedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service directory. + /// + public static string ServiceRoot + { + get + { + return ResourceManager.GetString("ServiceRoot", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service settings. + /// + public static string ServiceSettings + { + get + { + return ResourceManager.GetString("ServiceSettings", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The storage account name '{0}' is invalid. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.. + /// + public static string ServiceSettings_ValidateStorageAccountName_InvalidName + { + get + { + return ResourceManager.GetString("ServiceSettings_ValidateStorageAccountName_InvalidName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The {0} slot for cloud service {1} doesn't exist.. + /// + public static string ServiceSlotDoesNotExist + { + get + { + return ResourceManager.GetString("ServiceSlotDoesNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} slot for service {1} is {2}. + /// + public static string ServiceStatusChanged + { + get + { + return ResourceManager.GetString("ServiceStatusChanged", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Set Add-On Confirmation. + /// + public static string SetAddOnConformation + { + get + { + return ResourceManager.GetString("SetAddOnConformation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Profile {0} does not contain endpoint {1}. Adding it.. + /// + public static string SetInexistentTrafficManagerEndpointMessage + { + get + { + return ResourceManager.GetString("SetInexistentTrafficManagerEndpointMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Note - You will be charged the amount for the new plan, without being refunded for time remaining + ///in the existing plan. + ///By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis + ///for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) + ///agree to the {2}'s terms of user and privacy statement at {0} and (c) agree to sharing my + ///contact information with {2}.. + /// + public static string SetMicrosoftAddOnMessage + { + get + { + return ResourceManager.GetString("SetMicrosoftAddOnMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Note - You will be charged the amount for the new plan, without being refunded for time remaining + ///in the existing plan. + ///By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis + ///for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) + ///acknowledge the offering is provided by {2}, not Microsoft, and agree to {2}'s terms of + ///use and privacy statement at <url> and (c) agree to sharing my contact information with {2}.. + /// + public static string SetNonMicrosoftAddOnMessage + { + get + { + return ResourceManager.GetString("SetNonMicrosoftAddOnMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role {0} instances are set to {1}. + /// + public static string SetRoleInstancesMessage + { + get + { + return ResourceManager.GetString("SetRoleInstancesMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {"Slot":"","Location":"","Subscription":"","StorageAccountName":""}. + /// + public static string SettingsFileEmptyContent + { + get + { + return ResourceManager.GetString("SettingsFileEmptyContent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to deploymentSettings.json. + /// + public static string SettingsFileName + { + get + { + return ResourceManager.GetString("SettingsFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Insufficient parameters passed to create a new endpoint.. + /// + public static string SetTrafficManagerEndpointNeedsParameters + { + get + { + return ResourceManager.GetString("SetTrafficManagerEndpointNeedsParameters", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Ambiguous operation: the profile name specified doesn't match the name of the profile object.. + /// + public static string SetTrafficManagerProfileAmbiguous + { + get + { + return ResourceManager.GetString("SetTrafficManagerProfileAmbiguous", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please execute the cmdlet again and include the 'Force' parameter, if available, to avoid unnecessary prompts.. + /// + public static string ShouldContinueFail + { + get + { + return ResourceManager.GetString("ShouldContinueFail", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Confirm. + /// + public static string ShouldProcessCaption + { + get + { + return ResourceManager.GetString("ShouldProcessCaption", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please execute the cmdlet again and omit the 'Confirm' parameter when using the 'AsJob' parameter.. + /// + public static string ShouldProcessFailConfirm + { + get + { + return ResourceManager.GetString("ShouldProcessFailConfirm", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please increase the user $ConfirmPreference setting, or include turn off confirmation using '-Confirm:$false' when using the 'AsJob' parameter and execute the cmdet again.. + /// + public static string ShouldProcessFailImpact + { + get + { + return ResourceManager.GetString("ShouldProcessFailImpact", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please execute the cmdlet again and omit the 'WhatIf' parameter when using the 'AsJob' parameter.. + /// + public static string ShouldProcessFailWhatIf + { + get + { + return ResourceManager.GetString("ShouldProcessFailWhatIf", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Shutdown. + /// + public static string Shutdown + { + get + { + return ResourceManager.GetString("Shutdown", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /sites:{0};{1};"{2}/{0}" . + /// + public static string SitesArgTemplate + { + get + { + return ResourceManager.GetString("SitesArgTemplate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 1000. + /// + public static string StandardRetryDelayInMs + { + get + { + return ResourceManager.GetString("StandardRetryDelayInMs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Start. + /// + public static string Start + { + get + { + return ResourceManager.GetString("Start", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Started. + /// + public static string StartedEmulator + { + get + { + return ResourceManager.GetString("StartedEmulator", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Starting Emulator.... + /// + public static string StartingEmulator + { + get + { + return ResourceManager.GetString("StartingEmulator", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to start. + /// + public static string StartStorageEmulatorCommandArgument + { + get + { + return ResourceManager.GetString("StartStorageEmulatorCommandArgument", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Stop. + /// + public static string Stop + { + get + { + return ResourceManager.GetString("Stop", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Stopping emulator.... + /// + public static string StopEmulatorMessage + { + get + { + return ResourceManager.GetString("StopEmulatorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Stopped. + /// + public static string StoppedEmulatorMessage + { + get + { + return ResourceManager.GetString("StoppedEmulatorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to stop. + /// + public static string StopStorageEmulatorCommandArgument + { + get + { + return ResourceManager.GetString("StopStorageEmulatorCommandArgument", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account Name:. + /// + public static string StorageAccountName + { + get + { + return ResourceManager.GetString("StorageAccountName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find storage account '{0}' please type the name of an existing storage account.. + /// + public static string StorageAccountNotFound + { + get + { + return ResourceManager.GetString("StorageAccountNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to AzureStorageEmulator.exe. + /// + public static string StorageEmulatorExe + { + get + { + return ResourceManager.GetString("StorageEmulatorExe", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to InstallPath. + /// + public static string StorageEmulatorInstallPathRegistryKeyValue + { + get + { + return ResourceManager.GetString("StorageEmulatorInstallPathRegistryKeyValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SOFTWARE\Microsoft\Windows Azure Storage Emulator. + /// + public static string StorageEmulatorRegistryKey + { + get + { + return ResourceManager.GetString("StorageEmulatorRegistryKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Primary Key:. + /// + public static string StoragePrimaryKey + { + get + { + return ResourceManager.GetString("StoragePrimaryKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Secondary Key:. + /// + public static string StorageSecondaryKey + { + get + { + return ResourceManager.GetString("StorageSecondaryKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The subscription named {0} already exists.. + /// + public static string SubscriptionAlreadyExists + { + get + { + return ResourceManager.GetString("SubscriptionAlreadyExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The SubscriptionDataFile parameter is deprecated. This parameter will be removed in a future release. See https://github.com/Azure/azure-powershell/wiki/Proposed-Design-Stateless-Azure-Profile for a description of the upcoming mechanism for providing alternate sources of subscription information.. + /// + public static string SubscriptionDataFileDeprecated + { + get + { + return ResourceManager.GetString("SubscriptionDataFileDeprecated", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to DefaultSubscriptionData.xml. + /// + public static string SubscriptionDataFileName + { + get + { + return ResourceManager.GetString("SubscriptionDataFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The subscription data file {0} does not exist.. + /// + public static string SubscriptionDataFileNotFound + { + get + { + return ResourceManager.GetString("SubscriptionDataFileNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The subscription id {0} doesn't exist.. + /// + public static string SubscriptionIdNotFoundMessage + { + get + { + return ResourceManager.GetString("SubscriptionIdNotFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Subscription must not be null. + /// + public static string SubscriptionMustNotBeNull + { + get + { + return ResourceManager.GetString("SubscriptionMustNotBeNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Subscription name needs to be specified.. + /// + public static string SubscriptionNameNeedsToBeSpecified + { + get + { + return ResourceManager.GetString("SubscriptionNameNeedsToBeSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The subscription name {0} doesn't exist.. + /// + public static string SubscriptionNameNotFoundMessage + { + get + { + return ResourceManager.GetString("SubscriptionNameNotFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Subscription needs to be specified.. + /// + public static string SubscriptionNeedsToBeSpecified + { + get + { + return ResourceManager.GetString("SubscriptionNeedsToBeSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Suspend. + /// + public static string Suspend + { + get + { + return ResourceManager.GetString("Suspend", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Swapping website production slot .... + /// + public static string SwappingWebsite + { + get + { + return ResourceManager.GetString("SwappingWebsite", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to swap the website '{0}' production slot with slot '{1}'?. + /// + public static string SwapWebsiteSlotWarning + { + get + { + return ResourceManager.GetString("SwapWebsiteSlotWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The Switch-AzureMode cmdlet is deprecated and will be removed in a future release.. + /// + public static string SwitchAzureModeDeprecated + { + get + { + return ResourceManager.GetString("SwitchAzureModeDeprecated", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [AzureLongRunningJob]: Starting cmdlet execution, setting for cmdlet confirmation required: '{0}'. + /// + public static string TraceBeginLROJob + { + get + { + return ResourceManager.GetString("TraceBeginLROJob", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [AzureLongRunningJob]: Blocking job for ShouldMethod '{0}'. + /// + public static string TraceBlockLROThread + { + get + { + return ResourceManager.GetString("TraceBlockLROThread", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [AzureLongRunningJob]: Completing cmdlet execution in RunJob. + /// + public static string TraceEndLROJob + { + get + { + return ResourceManager.GetString("TraceEndLROJob", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [AzureLongRunningJob]: State change from '{0}' to '{1}' because '{2}'. + /// + public static string TraceHandleLROStateChange + { + get + { + return ResourceManager.GetString("TraceHandleLROStateChange", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [AzureLongRunningJob]: Unblocking job due to stoppage or failure. + /// + public static string TraceHandlerCancelJob + { + get + { + return ResourceManager.GetString("TraceHandlerCancelJob", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [AzureLongRunningJob]: Unblocking job that was previously blocked.. + /// + public static string TraceHandlerUnblockJob + { + get + { + return ResourceManager.GetString("TraceHandlerUnblockJob", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [AzureLongRunningJob]: Error in cmdlet execution. + /// + public static string TraceLROJobException + { + get + { + return ResourceManager.GetString("TraceLROJobException", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [AzureLongRunningJob]: Removing state changed event handler, exception '{0}'. + /// + public static string TraceRemoveLROEventHandler + { + get + { + return ResourceManager.GetString("TraceRemoveLROEventHandler", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [AzureLongRunningJob]: ShouldMethod '{0}' unblocked.. + /// + public static string TraceUnblockLROThread + { + get + { + return ResourceManager.GetString("TraceUnblockLROThread", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to decode string from base 64. Please make sure the string is correctly encoded: {0}.. + /// + public static string UnableToDecodeBase64String + { + get + { + return ResourceManager.GetString("UnableToDecodeBase64String", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to update mismatching Json structured: {0} {1}.. + /// + public static string UnableToPatchJson + { + get + { + return ResourceManager.GetString("UnableToPatchJson", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provider {0} is unknown.. + /// + public static string UnknownProviderMessage + { + get + { + return ResourceManager.GetString("UnknownProviderMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Update. + /// + public static string Update + { + get + { + return ResourceManager.GetString("Update", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Updated settings for subscription '{0}'. Current subscription is '{1}'.. + /// + public static string UpdatedSettings + { + get + { + return ResourceManager.GetString("UpdatedSettings", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to User name is not valid.. + /// + public static string UserNameIsNotValid + { + get + { + return ResourceManager.GetString("UserNameIsNotValid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to User name needs to be specified.. + /// + public static string UserNameNeedsToBeSpecified + { + get + { + return ResourceManager.GetString("UserNameNeedsToBeSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A value for the VLan Id has to be provided.. + /// + public static string VlanIdRequired + { + get + { + return ResourceManager.GetString("VlanIdRequired", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please wait.... + /// + public static string WaitMessage + { + get + { + return ResourceManager.GetString("WaitMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The azure storage emulator is not installed, skip launching.... + /// + public static string WarningWhenStorageEmulatorIsMissing + { + get + { + return ResourceManager.GetString("WarningWhenStorageEmulatorIsMissing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Web.cloud.config. + /// + public static string WebCloudConfig + { + get + { + return ResourceManager.GetString("WebCloudConfig", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to web.config. + /// + public static string WebConfigTemplateFileName + { + get + { + return ResourceManager.GetString("WebConfigTemplateFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to MSDeploy. + /// + public static string WebDeployKeywordInWebSitePublishProfile + { + get + { + return ResourceManager.GetString("WebDeployKeywordInWebSitePublishProfile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot build the project successfully. Please see logs in {0}.. + /// + public static string WebProjectBuildFailTemplate + { + get + { + return ResourceManager.GetString("WebProjectBuildFailTemplate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WebRole. + /// + public static string WebRole + { + get + { + return ResourceManager.GetString("WebRole", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to setup_web.cmd > log.txt. + /// + public static string WebRoleStartupTaskCommandLine + { + get + { + return ResourceManager.GetString("WebRoleStartupTaskCommandLine", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WebRole.xml. + /// + public static string WebRoleTemplateFileName + { + get + { + return ResourceManager.GetString("WebRoleTemplateFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WebSite with given name {0} already exists in the specified Subscription and Webspace.. + /// + public static string WebsiteAlreadyExists + { + get + { + return ResourceManager.GetString("WebsiteAlreadyExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WebSite with given name {0} already exists in the specified Subscription and Location.. + /// + public static string WebsiteAlreadyExistsReplacement + { + get + { + return ResourceManager.GetString("WebsiteAlreadyExistsReplacement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Site {0} already has repository created for it.. + /// + public static string WebsiteRepositoryAlreadyExists + { + get + { + return ResourceManager.GetString("WebsiteRepositoryAlreadyExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Workspaces/WebsiteExtension/Website/{0}/dashboard/. + /// + public static string WebsiteSufixUrl + { + get + { + return ResourceManager.GetString("WebsiteSufixUrl", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to https://{0}/msdeploy.axd?site={1}. + /// + public static string WebSiteWebDeployUriTemplate + { + get + { + return ResourceManager.GetString("WebSiteWebDeployUriTemplate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WorkerRole. + /// + public static string WorkerRole + { + get + { + return ResourceManager.GetString("WorkerRole", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to setup_worker.cmd > log.txt. + /// + public static string WorkerRoleStartupTaskCommandLine + { + get + { + return ResourceManager.GetString("WorkerRoleStartupTaskCommandLine", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WorkerRole.xml. + /// + public static string WorkerRoleTemplateFileName + { + get + { + return ResourceManager.GetString("WorkerRoleTemplateFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to (x86). + /// + public static string x86InProgramFiles + { + get + { + return ResourceManager.GetString("x86InProgramFiles", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Yes. + /// + public static string Yes + { + get + { + return ResourceManager.GetString("Yes", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Yes, I agree. + /// + public static string YesHint + { + get + { + return ResourceManager.GetString("YesHint", resourceCulture); + } + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Properties/Resources.resx b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Properties/Resources.resx new file mode 100644 index 000000000000..a08a2e50172b --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Properties/Resources.resx @@ -0,0 +1,1747 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + The remote server returned an error: (401) Unauthorized. + + + Account "{0}" has been added. + + + To switch to a different subscription, please use Select-AzureSubscription. + + + Subscription "{0}" is selected as the default subscription. + + + To view all the subscriptions, please use Get-AzureSubscription. + + + Add-On {0} is created successfully. + + + Add-on name {0} is already used. + + + Add-On {0} not found. + + + Add-on {0} is removed successfully. + + + Add-On {0} is updated successfully. + + + Role has been created at {0}\{1}. + + + Role has been created at {0}\{1}. For easy access to Microsoft Azure services from your application code, install the Microsoft Azure client library for Node.js by running ‘npm install azure’. + + + Role has been created at {0}\{1}. For easy access to Microsoft Azure services from your application code, install the Microsoft Azure client library for PHP by running "pear WindowsAzure/WindowsAzure". + + + Unable to set role permissions. Please give the 'Network Service' user 'Read & execute' and 'Modify' permissions to the role folder, or run PowerShell as an Administrator + + + A role name '{0}' already exists + + + Windows Azure Powershell\ + + + https://manage.windowsazure.com + + + AZURE_PORTAL_URL + + + Azure SDK\{0}\ + + + Base Uri was empty. + WAPackIaaS + + + {0} begin processing without ParameterSet. + + + {0} begin processing with ParameterSet '{1}'. + + + Blob with the name {0} already exists in the account. + + + https://{0}.blob.core.windows.net/ + + + AZURE_BLOBSTORAGE_TEMPLATE + + + CACHERUNTIMEURL + + + cache + + + CacheRuntimeVersion + + + Installing caching version {0} for Role '{1}' (the caching version locally installed is: {2}) + + + Cannot find {0} with name {1}. + + + Deployment for service {0} with {1} slot doesn't exist + + + Can't find valid Microsoft Azure role in current directory {0} + + + service {0} configuration file (ServiceConfiguration.Cloud.cscfg) is either null or doesn't exist + + + Invalid service path! Cannot locate ServiceDefinition.csdef in current folder or parent folders. + + + The subscription named {0} with id {1} is not currently imported. You must import this subscription before it can be updated. + + + ManagementCertificate + + + certificate.pfx + + + Certificate imported into CurrentUser\My\{0} + + + Your account does not have access to the private key for certificate {0} + + + {0} {1} deployment for {2} service + + + Cloud service {0} is in {1} state. + + + Changing/Removing public environment '{0}' is not allowed. + + + Service {0} is set to value {1} + + + Choose which publish settings file to use: + + + Microsoft.WindowsAzure.Plugins.Caching.ClientDiagnosticLevel + + + 1 + + + cloud_package.cspkg + + + ServiceConfiguration.Cloud.cscfg + + + Add-ons for {0} + + + Communication could not be established. This could be due to an invalid subscription ID. Note that subscription IDs are case sensitive. + + + Complete + + + config.json + + + VirtualMachine creation failed. + WAPackIaaS + + + Creating the website failed. If this is the first website for this subscription, please create it using the management portal instead. + + + Microsoft.ApplicationServer.Caching.DataCacheClientsSection, Microsoft.ApplicationServer.Caching.Core + + + //blobcontainer[@datacenter='{0}'] + + + Setting: {0} as the default and current subscription. To view other subscriptions use Get-AzureSubscription + + + none + + + There are no hostnames which could be used for validation. + + + 8080 + + + 1000 + + + Auto + + + 80 + + + Delete + WAPackIaaS + + + The {0} slot for service {1} is already in {2} state + + + The deployment in {0} slot for service {1} is removed + + + Microsoft.WindowsAzure.Plugins.Caching.DiagnosticLevel + + + 1 + + + The key to add already exists in the dictionary. + + + The array index cannot be less than zero. + + + The supplied array does not have enough room to contain the copied elements. + + + The provided dns {0} doesn't exist + + + Microsoft Azure Certificate + + + Endpoint can't be retrieved for storage account + + + {0} end processing. + + + To use Active Directory authentication, you must configure the ActiveDirectoryEndpoint, ActiveDirectoryTenantId, and ActiveDirectorServiceEndpointResourceId for environment of '{0}'. You can configure these properties for this environment using the Set-AzureEnvironment cmdlet. + + + The environment '{0}' already exists. + + + environments.xml + + + Error creating VirtualMachine + WAPackIaaS + + + Unable to download available runtimes for location '{0}' + + + Error updating VirtualMachine + WAPackIaaS + + + Job Id {0} failed. Error: {1}, ExceptionDetails: {2} + WAPackIaaS + + + The HTTP request was forbidden with client authentication scheme 'Anonymous'. + + + This add-on requires you to purchase the first instance through the Microsoft Azure Portal. Subsequent purchases can be performed through PowerShell. + + + Operation Status: + + + Resources\Scaffolding\General + + + Getting all available Microsoft Azure Add-Ons, this may take few minutes... + + + Name{0}Primary Key{0}Seconday Key + + + Git not found. Please install git and place it in your command line path. + + + Could not find publish settings. Please run Import-AzurePublishSettingsFile. + + + iisnode.dll + + + iisnode + + + iisnode-dev\\release\\x64 + + + iisnode + + + Installing IISNode version {0} in Azure for WebRole '{1}' (the version locally installed is: {2}) + + + Internal Server Error + + + Cannot enable memcach protocol on a cache worker role {0}. + + + Invalid certificate format. + + + The provided configuration path is invalid or doesn't exist + + + The country name is invalid, please use a valid two character country code, as described in ISO 3166-1 alpha-2. + + + Deployment with {0} does not exist + + + The deployment slot name {0} is invalid. Slot name must be either "Staging" or "Production". + + + Invalid service endpoint. + + + File {0} has invalid characters + + + You must create your git publishing credentials using the Microsoft Azure portal. +Please follow these steps in the portal: +1. On the left side open "Web Sites" +2. Click on any website +3. Choose "Setup Git Publishing" or "Reset deployment credentials" +4. Back in the PowerShell window, rerun this command by typing "New-AzureWebSite {site name} -Git -PublishingUsername {username} + + + The value {0} provided is not a valid GUID. Please provide a valid GUID. + + + The specified hostname does not exist. Please specify a valid hostname for the site. + + + Role {0} instances must be greater than or equal 0 and less than or equal 20 + + + There was an error creating your webjob. Please make sure that the script is in the root folder of the zip file. + + + Could not download a valid runtime manifest, Please check your internet connection and try again. + + + The account {0} was not found. Please specify a valid account name. + + + The provided name "{0}" does not match the service bus namespace naming rules. + + + Value cannot be null. Parameter name: '{0}' + + + The provided package path is invalid or doesn't exist + + + '{0}' is an invalid parameter set name. + + + {0} doesn't exist in {1} or you've not passed valid value for it + + + Path {0} has invalid characters + + + The provided publish settings file {0} has invalid content. Please get valid by running cmdlet Get-AzurePublishSettingsFile + + + The provided role name "{0}" has invalid characters + + + A valid name for the service root folder is required + + + {0} is not a recognized runtime type + + + A valid language is required + + + No subscription is currently selected. Use Select-Subscription to activate a subscription. + + + The provided location "{0}" does not exist in the available locations use Get-AzureSBLocation for listing available locations. + + + Please provide a service name or run this command from inside a service project directory. + + + You must provide valid value for {0} + + + settings.json is invalid or doesn't exist + + + The subscription named '{0}' cannot be found. Use Set-AzureSubscription to initialize the subscription data. + + + The provided subscription id {0} is not valid + + + A valid subscription name is required. This can be provided using the -Subscription parameter or by setting the subscription via the Set-AzureSubscription cmdlet + + + The provided subscriptions file {0} has invalid content. + + + Role {0} VM size should be ExtraSmall, Small, Medium, Large or ExtraLarge. + + + The web job file must have *.zip extension + + + Singleton option works for continuous jobs only. + + + The website {0} was not found. Please specify a valid website name. + + + No job for id: {0} was found. + WAPackIaaS + + + engines + + + Scaffolding for this language is not yet supported + + + Link already established + + + local_package.csx + + + ServiceConfiguration.Local.cscfg + + + Looking for {0} deployment for {1} cloud service... + + + Looking for cloud service {0}... + + + managementCertificate.pem + + + ?whr={0} + + + //baseuri + + + uri + + + http://az413943.vo.msecnd.net/node/runtimemanifest_0.7.5.2.xml + + + Multiple Add-Ons found holding name {0} + + + Multiple possible publishing users. Please go to the Portal and use the listed deployment user, or click 'set/reset deployment credentials' to set up a new user account, then reurn this cmdlet and specify PublishingUsername. + + + The first publish settings file "{0}" is used. If you want to use another file specify the file name. + + + Microsoft.WindowsAzure.Plugins.Caching.NamedCaches + + + {"caches":[{"name":"default","policy":{"eviction":{"type":0},"expiration":{"defaultTTL":10,"isExpirable":true,"type":1},"serverNotification":{"isEnabled":false}},"secondaries":0}]} + + + A publishing username is required. Please specify one using the argument PublishingUsername. + + + New Add-On Confirmation + + + By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis +for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) +agree to the {2}'s terms of user and privacy statement at {0} and (c) agree to sharing my +contact information with {2}. + + + Internal Server Error. This could happen because the namespace name is already used or due to an incorrect location name. Use Get-AzureSBLocation cmdlet to list valid names. + + + By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis +for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) +acknowledge the offering is provided by {2}, not Microsoft, and agree to {2}'s terms of +use and privacy statement at {0} and (c) agree to sharing my contact information with {2}. + + + Service has been created at {0} + + + No + + + There is no access token cached for subscription {0}, user id {1}. Use the Add-AzureAccount cmdlet to log in again and get a token for this subscription. + + + The service does not have any cache worker roles, add one first by running cmdlet Add-AzureCacheWorkerRole. + + + No clouds available + WAPackIaaS + + + nodejs + + + node + + + node.exe + + + There is no default subscription set, please set a default subscription by running Set-AzureSubscription -Default <subscription name> + + + Microsoft SDKs\Azure\Nodejs\Nov2011 + + + nodejs + + + node + + + Resources\Scaffolding\Node + + + Microsoft.WindowsAzure.Commands.CloudService.ScaffoldingResources.Node + + + Installing Node version {0} in Azure for Role '{1}' (the Node version locally installed is: {2}) + + + No, I do not agree + + + No publish settings files with extension *.publishsettings are found in the directory "{0}". + + + '{0}' must be a cache worker role. Verify that it has proper cache worker role configuration. + + + Certificate can't be null. + + + {0} could not be null or empty + + + Unable to add a null RoleSettings to {0} + + + Unable to add new role to null service definition + + + The request offer '{0}' is not found. + + + Operation "{0}" failed on VM with ID: {1} + WAPackIaaS + + + The REST operation failed with message '{0}' and error code '{1}' + + + Job Id {0} did not complete within expected time or it is in Failed/Canceled/Invalid state. + WAPackIaaS + + + package + + + Package is created at service root path {0}. + + + {{ + "author": "", + + "name": "{0}", + "version": "0.0.0", + "dependencies":{{}}, + "devDependencies":{{}}, + "optionalDependencies": {{}}, + "engines": {{ + "node": "*", + "iisnode": "*" + }} + +}} + + + + package.json + + + A value for the Peer Asn has to be provided. + + + 5.4.0 + + + php + + + Resources\Scaffolding\PHP + + + Microsoft.WindowsAzure.Commands.CloudService.ScaffoldingResources.PHP + + + Installing PHP version {0} for Role '{1}' (the PHP version locally installed is: {2}) + + + You must create your first web site using the Microsoft Azure portal. +Please follow these steps in the portal: +1. At the bottom of the page, click on New > Web Site > Quick Create +2. Type {0} in the URL field +3. Click on "Create Web Site" +4. Once the site has been created, click on the site name +5. Click on "Set up Git publishing" or "Reset deployment credentials" and setup a publishing username and password. Use those credentials for all new websites you create. + + + 6. Back in the console window, rerun this command by typing "New-AzureWebsite <site name> -Git" + + + A value for the Primary Peer Subnet has to be provided. + + + Promotion code can be used only when updating to a new plan. + + + Service not published at user request. + + + Complete. + + + Connecting... + + + Created Deployment ID: {0}. + + + Created hosted service '{0}'. + + + Created Website URL: {0}. + + + Creating... + + + Initializing... + + + busy + + + creating the virtual machine + + + Instance {0} of role {1} is {2}. + + + ready + + + Preparing deployment for {0} with Subscription ID: {1}... + + + Publishing {0} to Microsoft Azure. This may take several minutes... + + + publish settings + + + Azure + + + .PublishSettings + + + publishSettings.xml + + + Publish settings imported + + + AZURE_PUBLISHINGPROFILE_URL + + + Starting... + + + Upgrading... + + + Uploading Package to storage service {0}... + + + Verifying storage account '{0}'... + + + Replace current deployment with '{0}' Id ? + + + Are you sure you want to regenerate key? + + + Generate new key. + + + Are you sure you want to remove account '{0}'? + + + Removing account + + + Remove Add-On Confirmation + + + If you delete this add-on, your data may be deleted and the operation may not be undone. You may have to purchase it again from the Microsoft Azure Store to use it. The price of the add-on may not be refunded. Are you sure you want to delete this add-on? Enter “Yes” to confirm. + + + Remove-AzureBGPPeering Operation failed. + + + Removing Bgp Peering + + + Successfully removed Azure Bgp Peering with Service Key {0}. + + + Are you sure you want to remove the Bgp Peering with service key '{0}'? + + + Are you sure you want to remove the Dedicated Circuit with service key '{0}'? + + + Remove-AzureDedicatedCircuit Operation failed. + + + Remove-AzureDedicatedCircuitLink Operation failed. + + + Removing Dedicated Circui Link + + + Successfully removed Azure Dedicated Circuit Link with Service Key {0} and Vnet Name {1} + + + Are you sure you want to remove the Dedicated Circuit Link with service key '{0}' and virtual network name '{1}'? + + + Removing Dedicated Circuit + + + Successfully removed Azure Dedicated Circuit with Service Key {0}. + + + Removing cloud service {0}... + + + Removing {0} deployment for {1} service + + + Removing job collection + + + Are you sure you want to remove the job collection "{0}" + + + Removing job + + + Are you sure you want to remove the job "{0}" + + + Are you sure you want to remove the account? + + + Account removed. + + + Internal Server Error. This could happen because the namespace does not exist or it does not exist under your subscription. + + + Removing old package {0}... + + + Are you sure you want to delete the namespace '{0}'? + + + Are you sure you want to remove cloud service? + + + Remove cloud service and all it's deployments + + + Are you sure you want to remove subscription '{0}'? + + + Removing subscription + + + Are you sure you want to delete the VM '{0}'? + + + Deleting VM. + + + Removing WebJob... + + + Are you sure you want to remove job '{0}'? + + + Removing website + + + Are you sure you want to remove the website "{0}" + + + Deleting namespace + + + Repository is not setup. You need to pass a valid site name. + + + Reserved IP with the Name:'{0}' will no longer be in use after the deployment is deleted, and it is still reserved for later use. + + + Resource with ID : {0} does not exist. + WAPackIaaS + + + Restart + WAPackIaaS + + + Resume + WAPackIaaS + + + /role:{0};"{1}/{0}" + + + bin + + + Role {0} is {1} + + + 20 + + + role name + + + The provided role name {0} doesn't exist + + + RoleSettings.xml + + + Role type {0} doesn't exist + + + public static Dictionary<string, Location> ReverseLocations { get; private set; } + + + Preparing runtime deployment for service '{0}' + + + WARNING Runtime Mismatch: Are you sure that you want to publish service '{0}' using an Azure runtime version that does not match your local runtime version? + + + RUNTIMEOVERRIDEURL + + + /runtimemanifest/runtimes/runtime + + + RUNTIMEID + + + RUNTIMEURL + + + RUNTIMEVERSIONPRIMARYKEY + + + scaffold.xml + + + Invalid location entered. Pick one of the locations from Get-AzureSchedulerLocation + + + A value for the Secondary Peer Subnet has to be provided. + + + Service {0} already exists on disk in location {1} + + + No ServiceBus authorization rule with the given characteristics was found + + + The service bus entity '{0}' is not found. + + + Internal Server Error. This could happen due to an incorrect/missing namespace + + + service configuration + + + service definition + + + ServiceDefinition.csdef + + + {0}Deploy + + + The specified cloud service "{0}" does not exist. + + + {0} slot for service {1} is in {2} state, please wait until it finish and update it's status + + + Begin Operation: {0} + + + Completed Operation: {0} + + + Begin Operation: {0} + + + Completed Operation: {0} + + + service name + + + Please provide name for the hosted service + + + service parent directory + + + Service {0} removed successfully + + + service directory + + + service settings + + + The storage account name '{0}' is invalid. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + + + The {0} slot for cloud service {1} doesn't exist. + + + {0} slot for service {1} is {2} + + + Set Add-On Confirmation + + + Note - You will be charged the amount for the new plan, without being refunded for time remaining +in the existing plan. +By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis +for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) +agree to the {2}'s terms of user and privacy statement at {0} and (c) agree to sharing my +contact information with {2}. + + + Note - You will be charged the amount for the new plan, without being refunded for time remaining +in the existing plan. +By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis +for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) +acknowledge the offering is provided by {2}, not Microsoft, and agree to {2}'s terms of +use and privacy statement at <url> and (c) agree to sharing my contact information with {2}. + + + Role {0} instances are set to {1} + + + {"Slot":"","Location":"","Subscription":"","StorageAccountName":""} + + + deploymentSettings.json + + + Confirm + + + Shutdown + WAPackIaaS + + + /sites:{0};{1};"{2}/{0}" + + + 1000 + + + Start + WAPackIaaS + + + Started + + + Starting Emulator... + + + start + + + Stop + WAPackIaaS + + + Stopping emulator... + + + Stopped + + + stop + + + Account Name: + + + Cannot find storage account '{0}' please type the name of an existing storage account. + + + AzureStorageEmulator.exe + + + InstallPath + + + SOFTWARE\Microsoft\Windows Azure Storage Emulator + + + Primary Key: + + + Secondary Key: + + + The subscription named {0} already exists. + + + DefaultSubscriptionData.xml + + + The subscription data file {0} does not exist. + + + Subscription must not be null + WAPackIaaS + + + Suspend + WAPackIaaS + + + Swapping website production slot ... + + + Are you sure you want to swap the website '{0}' production slot with slot '{1}'? + + + The provider {0} is unknown. + + + Update + WAPackIaaS + + + Updated settings for subscription '{0}'. Current subscription is '{1}'. + + + A value for the VLan Id has to be provided. + + + Please wait... + + + The azure storage emulator is not installed, skip launching... + + + Web.cloud.config + + + web.config + + + MSDeploy + + + Cannot build the project successfully. Please see logs in {0}. + + + WebRole + + + setup_web.cmd > log.txt + + + WebRole.xml + + + WebSite with given name {0} already exists in the specified Subscription and Webspace. + + + WebSite with given name {0} already exists in the specified Subscription and Location. + + + Site {0} already has repository created for it. + + + Workspaces/WebsiteExtension/Website/{0}/dashboard/ + + + https://{0}/msdeploy.axd?site={1} + + + WorkerRole + + + setup_worker.cmd > log.txt + + + WorkerRole.xml + + + Yes + + + Yes, I agree + + + Remove-AzureTrafficManagerProfile Operation failed. + + + Successfully removed Traffic Manager profile with name {0}. + + + Are you sure you want to remove the Traffic Manager profile "{0}"? + + + Profile {0} already has an endpoint with name {1} + + + Profile {0} does not contain endpoint {1}. Adding it. + + + The endpoint {0} cannot be removed from profile {1} because it's not in the profile. + + + Insufficient parameters passed to create a new endpoint. + + + Ambiguous operation: the profile name specified doesn't match the name of the profile object. + + + <NONE> + + + "An exception occurred when calling the ServiceManagement API. HTTP Status Code: {0}. Service Management Error Code: {1}. Message: {2}. Operation Tracking ID: {3}." + {0} is the HTTP status code. {1} is the Service Management Error Code. {2} is the Service Management Error message. {3} is the operation tracking ID. + + + Unable to decode string from base 64. Please make sure the string is correctly encoded: {0}. + {0} is the string that is not in a valid base 64 format. + + + Skipping external tenant {0}, because you are using a guest or a foreign principal object identity. In order to access this tenant, please run Add-AzureAccount without "-Credential". + + + Removing an environment will remove all associated subscriptions and accounts. Are you sure you want to remove an environment '{0}'? + + + Removing environment + + + There is no subscription associated with account {0}. + + + Account id doesn't match one in subscription. + + + Environment name doesn't match one in subscription. + + + Removing the Azure profile will remove all associated environments, subscriptions, and accounts. Are you sure you want to remove the Azure profile? + + + Removing the Azure profile + + + The SubscriptionDataFile parameter is deprecated. This parameter will be removed in a future release. See https://github.com/Azure/azure-powershell/wiki/Proposed-Design-Stateless-Azure-Profile for a description of the upcoming mechanism for providing alternate sources of subscription information. + + + Account needs to be specified + + + No default subscription has been designated. Use Select-AzureSubscription -Default <subscriptionName> to set the default subscription. + + + Path must specify a valid path to an Azure profile. + + + Property bag Hashtable must contain one of the following sets of properties: {SubscriptionId, Certificate}, {SubscriptionId, Username, Password}, {SubscriptionId, ServicePrincipal, Password, Tenant}, {SubscriptionId, AccountId, Token} + + + Property bag Hashtable must contain a 'Certificate' of type 'X509Certificate2'. + + + Property bag Hashtable must contain a 'Password' with an associated 'Username' or 'ServicePrincipal'. + + + Property bag Hashtable must contain a 'SubscriptionId'. + + + Selected profile must not be null. + + + The Switch-AzureMode cmdlet is deprecated and will be removed in a future release. + + + OperationID : '{0}' + + + Cannot get module for DscResource '{0}'. Possible solutions: +1) Specify -ModuleName for Import-DscResource in your configuration. +2) Unblock module that contains resource. +3) Move Import-DscResource inside Node block. + + 0 = name of DscResource + + + Your current PowerShell version {1} is less then required by this cmdlet {0}. Consider download and install latest PowerShell version. + {0} = minimal required PS version, {1} = current PS version + + + Parsing configuration script: {0} + {0} is the path to a script file + + + Configuration script '{0}' contained parse errors: +{1} + 0 = path to the configuration script, 1 = parser errors + + + List of required modules: [{0}]. + {0} = list of modules + + + Temp folder '{0}' created. + {0} = temp folder path + + + Copy '{0}' to '{1}'. + {0} = source, {1} = destination + + + Copy the module '{0}' to '{1}'. + {0} = source, {1} = destination + + + File '{0}' already exists. Use the -Force parameter to overwrite it. + {0} is the path to a file + + + Configuration file '{0}' not found. + 0 = path to the configuration file + + + Path '{0}' not found. + 0 = path to the additional content file/directory + + + Path '{0}' not found. + 0 = path to the additional content file/directory + + + Invalid configuration file: {0}. +The file needs to be a PowerShell script (.ps1 or .psm1) or a ZIP archive (.zip). + 0 = path to the configuration file + + + Invalid configuration file: {0}. +The file needs to be a PowerShell script (.ps1 or .psm1). + 0 = path to the configuration file + + + Create Archive + + + Upload '{0}' + {0} is the name of an storage blob + + + Storage Blob '{0}' already exists. Use the -Force parameter to overwrite it. + {0} is the name of an storage blob + + + Configuration published to {0} + {0} is an URI + + + Deleted '{0}' + {0} is the path of a file + + + Cannot delete '{0}': {1} + {0} is the path of a file, {1} is an error message + + + Cannot find the WadCfg end element in the config. + + + WadCfg start element in the config is not matching the end element. + + + Cannot find the WadCfg element in the config. + + + Cannot find configuration data file: {0} + + + The configuration data must be a .psd1 file + + + Cannot change built-in environment {0}. + + + Azure PowerShell collects usage data in order to improve your experience. +The data is anonymous and does not include commandline argument values. +The data is collected by Microsoft. + +Use the Disable-AzDataCollection cmdlet to turn the feature Off. The cmdlet can be found in the Az.Accounts module. To disable data collection: PS > Disable-AzDataCollection. +Use the Enable-AzDataCollection cmdlet to turn the feature On. The cmdlet can be found in the Az.Accounts module. To enable data collection: PS > Enable-AzDataCollection. + + + Microsoft Azure PowerShell Data Collection Confirmation + + + You choose not to participate in Microsoft Azure PowerShell data collection. + + + This confirmation message will be dismissed in '{0}' second(s)... + + + You choose to participate in Microsoft Azure PowerShell data collection. + + + The setting profile has been saved to the following path '{0}'. + + + [Common.Authentication]: Authenticating for account {0} with single tenant {1}. + + + Changing public environment is not supported. + + + Environment name needs to be specified. + + + Environment needs to be specified. + + + The environment name '{0}' is not found. + + + File path is not valid. + + + Must specify a non-null subscription name. + + + The default subscription is being removed. Use Select-AzureSubscription -Default <subscriptionName> to select a new default subscription. + + + Removing public environment is not supported. + + + The subscription id {0} doesn't exist. + + + Subscription name needs to be specified. + + + The subscription name {0} doesn't exist. + + + Subscription needs to be specified. + + + User name is not valid. + + + User name needs to be specified. + + + "There is no current context, please log in using Connect-AzAccount." + + + No subscriptions are associated with the logged in account in Azure Service Management (RDFE). This means that the logged in user is not an administrator or co-administrator for any account.\r\nDid you mean to execute Connect-AzAccount? + + + No certificate was found in the certificate store with thumbprint {0} + + + Illegal characters in path. + + + Invalid certificate format. Publish settings may be corrupted. Use Get-AzurePublishSettingsFile to download updated settings + + + "{0}" is an invalid DNS name for {1} + + + The provided file in {0} must be have {1} extension + + + {0} is invalid or empty + + + Please connect to internet before executing this cmdlet + + + Path {0} doesn't exist. + + + Path for {0} doesn't exist in {1}. + + + &whr={0} + + + The provided service name {0} already exists, please pick another name + + + Unable to update mismatching Json structured: {0} {1}. + + + (x86) + + + Azure PowerShell collects usage data in order to improve your experience. +The data is anonymous and does not include commandline argument values. +The data is collected by Microsoft. + +Use the Disable-AzureDataCollection cmdlet to turn the feature Off. The cmdlet can be found in the Azure module. To disable data collection: PS > Disable-AzureDataCollection. +Use the Enable-AzureDataCollection cmdlet to turn the feature On. The cmdlet can be found in the Azure module. To enable data collection: PS > Enable-AzureDataCollection. + + + Execution failed because a background thread could not prompt the user. + + + Azure Long-Running Job + + + The cmdlet failed in background execution. The returned error was '{0}'. Please execute the cmdlet again. You may need to execute this cmdlet synchronously, by omitting the '-AsJob' parameter. + 0(string): exception message in background task + + + Please execute the cmdlet again and include the 'Force' parameter, if available, to avoid unnecessary prompts. + + + Please execute the cmdlet again and omit the 'Confirm' parameter when using the 'AsJob' parameter. + + + Please increase the user $ConfirmPreference setting, or include turn off confirmation using '-Confirm:$false' when using the 'AsJob' parameter and execute the cmdet again. + + + Please execute the cmdlet again and omit the 'WhatIf' parameter when using the 'AsJob' parameter. + + + [AzureLongRunningJob]: Starting cmdlet execution, setting for cmdlet confirmation required: '{0}' + 0(bool): whether cmdlet confirmation is required + + + [AzureLongRunningJob]: Blocking job for ShouldMethod '{0}' + 0(string): method type + + + [AzureLongRunningJob]: Completing cmdlet execution in RunJob + + + [AzureLongRunningJob]: State change from '{0}' to '{1}' because '{2}' + 0(string): last state, 1(string): new state, 2(string): state change reason + + + [AzureLongRunningJob]: Unblocking job due to stoppage or failure + + + [AzureLongRunningJob]: Unblocking job that was previously blocked. + + + [AzureLongRunningJob]: Error in cmdlet execution + + + [AzureLongRunningJob]: Removing state changed event handler, exception '{0}' + 0(string): exception message + + + [AzureLongRunningJob]: ShouldMethod '{0}' unblocked. + 0(string): methodType + + + +- The parameter : '{0}' is changing. + + + +- The parameter : '{0}' is becoming mandatory. + + + +- The parameter : '{0}' is being replaced by parameter : '{1}'. + + + +- The parameter : '{0}' is being replaced by mandatory parameter : '{1}'. + + + +- Change description : {0} + + + The cmdlet is being deprecated. There will be no replacement for it. + + + The cmdlet parameter set is being deprecated. There will be no replacement for it. + + + The cmdlet '{0}' is replacing this cmdlet. + + + +- The output type is changing from the existing type :'{0}' to the new type :'{1}' + + + +- The output type '{0}' is changing + + + +- The following properties are being added to the output type : + + + +- The following properties in the output type are being deprecated : + + + {0} + + + +- Cmdlet : '{0}' + - {1} + + + Upcoming breaking changes in the cmdlet '{0}' : + + + +- This change will take effect on '{0}' + + + +- The change is expected to take effect from version : '{0}' + + + ```powershell +# Old +{0} + +# New +{1} +``` + + + + +Cmdlet invocation changes : + Old Way : {0} + New Way : {1} + + + +The output type '{0}' is being deprecated without a replacement. + + + +The type of the parameter is changing from '{0}' to '{1}'. + + + +Note : Go to {0} for steps to suppress this breaking change warning, and other information on breaking changes in Azure PowerShell. + + + This cmdlet is in preview. Its behavior is subject to change based on customer feedback. + + + The estimated generally available date is '{0}'. + + + - The change is expected to take effect from Az version : '{0}' + + \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Response.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Response.cs new file mode 100644 index 000000000000..5849f6189e28 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Response.cs @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime +{ + using System; + using System.Threading.Tasks; + public class Response : EventData + { + public Response() : base() + { + } + } + + public class Response : Response + { + private Func> _resultDelegate; + private Task _resultValue; + + public Response(T value) : base() => _resultValue = Task.FromResult(value); + public Response(Func value) : base() => _resultDelegate = () => Task.FromResult(value()); + public Response(Func> value) : base() => _resultDelegate = value; + public Task Result => _resultValue ?? (_resultValue = this._resultDelegate()); + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Serialization/JsonSerializer.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Serialization/JsonSerializer.cs new file mode 100644 index 000000000000..e1fb2015e33b --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Serialization/JsonSerializer.cs @@ -0,0 +1,350 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + internal class JsonSerializer + { + private int depth = 0; + + private SerializationOptions options = new SerializationOptions(); + + #region Deserialization + + internal T Deseralize(JsonObject json) + where T : new() + { + var contract = JsonModelCache.Get(typeof(T)); + + return (T)DeserializeObject(contract, json); + } + + internal object DeserializeObject(JsonModel contract, JsonObject json) + { + var instance = Activator.CreateInstance(contract.Type); + + depth++; + + // Ensure we don't recurse forever + if (depth > 5) throw new Exception("Depth greater than 5"); + + foreach (var field in json) + { + var member = contract[field.Key]; + + if (member != null) + { + var value = DeserializeValue(member, field.Value); + + member.SetValue(instance, value); + } + } + + depth--; + + return instance; + } + + private object DeserializeValue(JsonMember member, JsonNode value) + { + if (value.Type == JsonType.Null) return null; + + var type = member.Type; + + if (member.IsStringLike && value.Type != JsonType.String) + { + // Take the long path... + return DeserializeObject(JsonModelCache.Get(type), (JsonObject)value); + } + else if (member.Converter != null) + { + return member.Converter.FromJson(value); + } + else if (type.IsArray) + { + return DeserializeArray(type, (JsonArray)value); + } + else if (member.IsList) + { + return DeserializeList(type, (JsonArray)value); + } + else + { + var contract = JsonModelCache.Get(type); + + return DeserializeObject(contract, (JsonObject)value); + } + } + + private object DeserializeValue(Type type, JsonNode value) + { + if (type == null) throw new ArgumentNullException(nameof(type)); + + if (value.Type == JsonType.Null) return null; + + var typeDetails = TypeDetails.Get(type); + + if (typeDetails.JsonConverter != null) + { + return typeDetails.JsonConverter.FromJson(value); + } + else if (typeDetails.IsEnum) + { + return Enum.Parse(type, value.ToString(), ignoreCase: true); + } + else if (type.IsArray) + { + return DeserializeArray(type, (JsonArray)value); + } + else if (typeDetails.IsList) + { + return DeserializeList(type, (JsonArray)value); + } + else + { + var contract = JsonModelCache.Get(type); + + return DeserializeObject(contract, (JsonObject)value); + } + } + + internal Array DeserializeArray(Type type, JsonArray elements) + { + var elementType = type.GetElementType(); + + var elementTypeDetails = TypeDetails.Get(elementType); + + var array = Array.CreateInstance(elementType, elements.Count); + + int i = 0; + + if (elementTypeDetails.JsonConverter != null) + { + foreach (var value in elements) + { + array.SetValue(elementTypeDetails.JsonConverter.FromJson(value), i); + + i++; + } + } + else + { + foreach (var value in elements) + { + array.SetValue(DeserializeValue(elementType, value), i); + + i++; + } + } + + return array; + } + + internal IList DeserializeList(Type type, JsonArray jsonArray) + { + // TODO: Handle non-generic types + if (!type.IsGenericType) + throw new ArgumentException("Must be a generic type", nameof(type)); + + var elementType = type.GetGenericArguments()[0]; + + IList list; + + if (type.IsInterface) + { + // Create a concrete generic list + list = (IList)Activator.CreateInstance(typeof(List<>).MakeGenericType(elementType)); + } + else + { + list = (IList)Activator.CreateInstance(type); + } + + foreach (var value in jsonArray) + { + list.Add(DeserializeValue(elementType, value)); + } + + return list; + } + + #endregion + + #region Serialization + + internal JsonNode Serialize(object instance) => + Serialize(instance, SerializationOptions.Default); + + internal JsonNode Serialize(object instance, string[] include) => + Serialize(instance, new SerializationOptions { Include = include }); + + internal JsonNode Serialize(object instance, SerializationOptions options) + { + this.options = options; + + if (instance == null) + { + return XNull.Instance; + } + + return ReadValue(instance.GetType(), instance); + } + + #region Readers + + internal JsonArray ReadArray(IEnumerable collection) + { + var array = new XNodeArray(); + + foreach (var item in collection) + { + array.Add(ReadValue(item.GetType(), item)); + } + + return array; + } + + internal IEnumerable> ReadProperties(object instance) + { + var contract = JsonModelCache.Get(instance.GetType()); + + foreach (var member in contract.Members) + { + string name = member.Name; + + if (options.PropertyNameTransformer != null) + { + name = options.PropertyNameTransformer.Invoke(name); + } + + // Skip the field if it's not included + if ((depth == 1 && !options.IsIncluded(name))) + { + continue; + } + + var value = member.GetValue(instance); + + if (!member.EmitDefaultValue && (value == null || (member.IsList && ((IList)value).Count == 0) || value.Equals(member.DefaultValue))) + { + continue; + } + else if (options.IgnoreNullValues && value == null) // Ignore null values + { + continue; + } + + // Transform the value if there is one + if (options.Transformations != null) + { + var transform = options.GetTransformation(name); + + if (transform != null) + { + value = transform.Transformer(value); + } + } + + yield return new KeyValuePair(name, ReadValue(member.TypeDetails, value)); + } + } + + private JsonObject ReadObject(object instance) + { + depth++; + + // TODO: Guard against a self referencing graph + if (depth > options.MaxDepth) + { + depth--; + + return new JsonObject(); + } + + var node = new JsonObject(ReadProperties(instance)); + + depth--; + + return node; + } + + private JsonNode ReadValue(Type type, object value) + { + if (value == null) + { + return XNull.Instance; + } + + var member = TypeDetails.Get(type); + + return ReadValue(member, value); + } + + private JsonNode ReadValue(TypeDetails type, object value) + { + if (value == null) + { + return XNull.Instance; + } + + if (type.JsonConverter != null) + { + return type.JsonConverter.ToJson(value); + } + else if (type.IsArray) + { + switch (Type.GetTypeCode(type.ElementType)) + { + case TypeCode.String: return CreateArray((string[])value); + case TypeCode.UInt16: return CreateArray((ushort[])value); + case TypeCode.UInt32: return CreateArray((uint[])value); + case TypeCode.UInt64: return CreateArray((ulong[])value); + case TypeCode.Int16: return CreateArray((short[])value); + case TypeCode.Int32: return CreateArray((int[])value); + case TypeCode.Int64: return CreateArray((long[])value); + case TypeCode.Single: return CreateArray((float[])value); + case TypeCode.Double: return CreateArray((double[])value); + default: return ReadArray((IEnumerable)value); + } + } + else if (value is IEnumerable) + { + if (type.IsList && type.ElementType != null) + { + switch (Type.GetTypeCode(type.ElementType)) + { + case TypeCode.String: return CreateList(value); + case TypeCode.UInt16: return CreateList(value); + case TypeCode.UInt32: return CreateList(value); + case TypeCode.UInt64: return CreateList(value); + case TypeCode.Int16: return CreateList(value); + case TypeCode.Int32: return CreateList(value); + case TypeCode.Int64: return CreateList(value); + case TypeCode.Single: return CreateList(value); + case TypeCode.Double: return CreateList(value); + } + } + + return ReadArray((IEnumerable)value); + } + else + { + // Complex object + return ReadObject(value); + } + } + + private XList CreateList(object value) => new XList((IList)value); + + private XImmutableArray CreateArray(T[] array) => new XImmutableArray(array); + + #endregion + + #endregion + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Serialization/PropertyTransformation.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Serialization/PropertyTransformation.cs new file mode 100644 index 000000000000..39785661f485 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Serialization/PropertyTransformation.cs @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + internal class PropertyTransformation + { + internal PropertyTransformation(string name, Func transformer) + { + Name = name ?? throw new ArgumentNullException(nameof(name)); + Transformer = transformer ?? throw new ArgumentNullException(nameof(transformer)); + } + + internal string Name { get; } + + internal Func Transformer { get; } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Serialization/SerializationOptions.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Serialization/SerializationOptions.cs new file mode 100644 index 000000000000..971a5ebb1b77 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Serialization/SerializationOptions.cs @@ -0,0 +1,65 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Linq; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + internal class SerializationOptions + { + internal static readonly SerializationOptions Default = new SerializationOptions(); + + internal SerializationOptions() { } + + internal SerializationOptions( + string[] include = null, + bool ingoreNullValues = false) + { + Include = include; + IgnoreNullValues = ingoreNullValues; + } + + internal string[] Include { get; set; } + + internal string[] Exclude { get; set; } + + internal bool IgnoreNullValues { get; set; } + + internal PropertyTransformation[] Transformations { get; set; } + + internal Func PropertyNameTransformer { get; set; } + + internal int MaxDepth { get; set; } = 5; + + internal bool IsIncluded(string name) + { + if (Exclude != null) + { + return !Exclude.Any(exclude => exclude.Equals(name, StringComparison.OrdinalIgnoreCase)); + } + else if (Include != null) + { + return Include.Any(exclude => exclude.Equals(name, StringComparison.OrdinalIgnoreCase)); + } + + return true; + } + + internal PropertyTransformation GetTransformation(string propertyName) + { + if (Transformations == null) return null; + + foreach (var t in Transformations) + { + if (t.Name.Equals(propertyName, StringComparison.OrdinalIgnoreCase)) + { + return t; + } + } + + return null; + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/SerializationMode.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/SerializationMode.cs new file mode 100644 index 000000000000..c7f078b6fac7 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/SerializationMode.cs @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime +{ + [System.Flags] + public enum SerializationMode + { + None = 0, + IncludeHeaders = 1 << 0, + IncludeRead = 1 << 1, + IncludeCreate = 1 << 2, + IncludeUpdate = 1 << 3, + IncludeAll = IncludeHeaders | IncludeRead | IncludeCreate | IncludeUpdate, + IncludeCreateOrUpdate = IncludeCreate | IncludeUpdate + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/TypeConverterExtensions.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/TypeConverterExtensions.cs new file mode 100644 index 000000000000..9a82a68a092e --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/TypeConverterExtensions.cs @@ -0,0 +1,261 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System.IO; +using System.Linq; +using System.Xml; +using System.Xml.Serialization; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.PowerShell +{ + internal static class TypeConverterExtensions + { + internal static T[] SelectToArray(object source, System.Func converter) + { + // null begets null + if (source == null) + { + return null; + } + + // single values and strings are just encapsulated in the array. + if (source is string || !(source is System.Collections.IEnumerable)) + { + try + { + return new T[] { (T)converter(source) }; + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + // silent conversion fail + } +#endif + return new T[0]; // empty result if couldn't convert. + } + + var result = new System.Collections.Generic.List(); + foreach (var each in (System.Collections.IEnumerable)source) + { + try + { + result.Add((T)converter(each)); + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + // silent conversion fail + } +#endif + } + return result.ToArray(); + } + + internal static System.Collections.Generic.List SelectToList(object source, System.Func converter) + { + // null begets null + if (source == null) + { + return null; + } + + // single values and strings are just encapsulated in the array. + if (source is string || !(source is System.Collections.IEnumerable)) + { + try + { + return new T[] { (T)converter(source) }.ToList(); + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + // silent conversion fail + } +#endif + return new T[0].ToList(); // empty result if couldn't convert. + } + + var result = new System.Collections.Generic.List(); + foreach (var each in (System.Collections.IEnumerable)source) + { + try + { + result.Add((T)converter(each)); + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + // silent conversion fail + } +#endif + } + return result; + } + internal static System.Collections.Generic.IEnumerable GetPropertyKeys(this System.Collections.Generic.IDictionary dictionary) + { + if (null != dictionary) + { + foreach (var each in dictionary.Keys) + { + yield return each; + } + } + } + internal static System.Collections.Generic.IEnumerable GetPropertyKeys(this System.Collections.IDictionary dictionary) + { + if (null != dictionary) + { + foreach (var each in dictionary.Keys) + { + yield return each; + } + } + } + internal static System.Collections.Generic.IEnumerable GetPropertyKeys(this System.Management.Automation.PSObject instance) + { + if (null != instance) + { + foreach (var each in instance.Properties) + { + yield return each; + } + } + } + + internal static System.Collections.Generic.IEnumerable> GetFilteredProperties(this System.Collections.Generic.IDictionary instance, global::System.Collections.Generic.HashSet exclusions = null, global::System.Collections.Generic.HashSet inclusions = null) + { + return (null == instance || instance.Count == 0) ? + Enumerable.Empty>() : + instance.Keys + .Where(key => + !(true == exclusions?.Contains(key?.ToString())) + && (false != inclusions?.Contains(key?.ToString()))) + .Select(key => new System.Collections.Generic.KeyValuePair(key, instance[key])); + } + + internal static System.Collections.Generic.IEnumerable> GetFilteredProperties(this System.Collections.IDictionary instance, global::System.Collections.Generic.HashSet exclusions = null, global::System.Collections.Generic.HashSet inclusions = null) + { + return (null == instance || instance.Count == 0) ? + Enumerable.Empty>() : + instance.Keys.OfType() + .Where(key => + !(true == exclusions?.Contains(key?.ToString())) + && (false != inclusions?.Contains(key?.ToString()))) + .Select(key => new System.Collections.Generic.KeyValuePair(key, instance[key])); + } + + internal static System.Collections.Generic.IEnumerable> GetFilteredProperties(this System.Management.Automation.PSObject instance, global::System.Collections.Generic.HashSet exclusions = null, global::System.Collections.Generic.HashSet inclusions = null) + { + // new global::System.Collections.Generic.HashSet(System.StringComparer.InvariantCultureIgnoreCase) + return (null == instance || !instance.Properties.Any()) ? + Enumerable.Empty>() : + instance.Properties + .Where(property => + !(true == exclusions?.Contains(property.Name)) + && (false != inclusions?.Contains(property.Name))) + .Select(property => new System.Collections.Generic.KeyValuePair(property.Name, property.Value)); + } + + + internal static T GetValueForProperty(this System.Collections.Generic.IDictionary dictionary, string propertyName, T defaultValue, System.Func converter) + { + try + { + var key = System.Linq.Enumerable.FirstOrDefault(dictionary.Keys, each => System.String.Equals(each.ToString(), propertyName, System.StringComparison.CurrentCultureIgnoreCase)); + return key == null ? defaultValue : (T)converter(dictionary[key]); + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + } +#endif + return defaultValue; + } + internal static T GetValueForProperty(this System.Collections.IDictionary dictionary, string propertyName, T defaultValue, System.Func converter) + { + try + { + var key = System.Linq.Enumerable.FirstOrDefault(dictionary.Keys.OfType(), each => System.String.Equals(each.ToString(), propertyName, System.StringComparison.CurrentCultureIgnoreCase)); + return key == null ? defaultValue : (T)converter(dictionary[key]); + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + } +#endif + return defaultValue; + } + + internal static T GetValueForProperty(this System.Management.Automation.PSObject psObject, string propertyName, T defaultValue, System.Func converter) + { + try + { + var property = System.Linq.Enumerable.FirstOrDefault(psObject.Properties, each => System.String.Equals(each.Name.ToString(), propertyName, System.StringComparison.CurrentCultureIgnoreCase)); + return property == null ? defaultValue : (T)converter(property.Value); + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + } +#endif + return defaultValue; + } + + internal static bool Contains(this System.Management.Automation.PSObject psObject, string propertyName) + { + bool result = false; + try + { + var property = System.Linq.Enumerable.FirstOrDefault(psObject.Properties, each => System.String.Equals(each.Name.ToString(), propertyName, System.StringComparison.CurrentCultureIgnoreCase)); + result = property == null ? false : true; + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + } +#endif + return result; + } + } +} diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/UndeclaredResponseException.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/UndeclaredResponseException.cs new file mode 100644 index 000000000000..0d1d7220a603 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/UndeclaredResponseException.cs @@ -0,0 +1,112 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime +{ + using System; + using System.Net.Http; + using System.Net.Http.Headers; + using static Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Extensions; + + public class RestException : Exception, IDisposable + { + public System.Net.HttpStatusCode StatusCode { get; set; } + public string Code { get; protected set; } + protected string message; + public HttpRequestMessage RequestMessage { get; protected set; } + public HttpResponseHeaders ResponseHeaders { get; protected set; } + + public string ResponseBody { get; protected set; } + public string ClientRequestId { get; protected set; } + public string RequestId { get; protected set; } + + public override string Message => message; + public string Action { get; protected set; } + + public RestException(System.Net.Http.HttpResponseMessage response) + { + StatusCode = response.StatusCode; + //CloneWithContent will not work here since the content is disposed after sendAsync + //Besides, it seems there is no need for the request content cloned here. + RequestMessage = response.RequestMessage.Clone(); + ResponseBody = response.Content.ReadAsStringAsync().Result; + ResponseHeaders = response.Headers; + + RequestId = response.GetFirstHeader("x-ms-request-id"); + ClientRequestId = response.GetFirstHeader("x-ms-client-request-id"); + + try + { + // try to parse the body as JSON, and see if a code and message are in there. + var json = Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonNode.Parse(ResponseBody) as Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json.JsonObject; + + // error message could be in properties.statusMessage + { message = If(json?.Property("properties"), out var p) + && If(p?.PropertyT("statusMessage"), out var sm) + ? (string)sm : (string)Message; } + + // see if there is an error block in the body + json = json?.Property("error") ?? json; + + { Code = If(json?.PropertyT("code"), out var c) ? (string)c : (string)StatusCode.ToString(); } + { message = If(json?.PropertyT("message"), out var m) ? (string)m : (string)Message; } + { Action = If(json?.PropertyT("action"), out var a) ? (string)a : (string)Action; } + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + // couldn't get the code/message from the body response. + // In this case, we will assume the response is the expected error message + if(!string.IsNullOrEmpty(ResponseBody)) { + message = ResponseBody; + } + } +#endif + if (string.IsNullOrEmpty(message)) + { + if (StatusCode >= System.Net.HttpStatusCode.BadRequest && StatusCode < System.Net.HttpStatusCode.InternalServerError) + { + message = $"The server responded with a Request Error, Status: {StatusCode}"; + } + else if (StatusCode >= System.Net.HttpStatusCode.InternalServerError) + { + message = $"The server responded with a Server Error, Status: {StatusCode}"; + } + else + { + message = $"The server responded with an unrecognized response, Status: {StatusCode}"; + } + } + } + + public void Dispose() + { + ((IDisposable)RequestMessage).Dispose(); + } + } + + public class RestException : RestException + { + public T Error { get; protected set; } + public RestException(System.Net.Http.HttpResponseMessage response, T error) : base(response) + { + Error = error; + } + } + + + public class UndeclaredResponseException : RestException + { + public UndeclaredResponseException(System.Net.Http.HttpResponseMessage response) : base(response) + { + + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Writers/JsonWriter.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Writers/JsonWriter.cs new file mode 100644 index 000000000000..e3958e760858 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/Writers/JsonWriter.cs @@ -0,0 +1,223 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.IO; +using System.Web; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.Json +{ + internal class JsonWriter + { + const string indentation = " "; // 2 spaces + + private readonly bool pretty; + private readonly TextWriter writer; + + protected int currentLevel = 0; + + internal JsonWriter(TextWriter writer, bool pretty = true) + { + this.writer = writer ?? throw new ArgumentNullException(nameof(writer)); + this.pretty = pretty; + } + + internal void WriteNode(JsonNode node) + { + switch (node.Type) + { + case JsonType.Array: WriteArray((IEnumerable)node); break; + case JsonType.Object: WriteObject((JsonObject)node); break; + + // Primitives + case JsonType.Binary: WriteBinary((XBinary)node); break; + case JsonType.Boolean: WriteBoolean((bool)node); break; + case JsonType.Date: WriteDate((JsonDate)node); break; + case JsonType.Null: WriteNull(); break; + case JsonType.Number: WriteNumber((JsonNumber)node); break; + case JsonType.String: WriteString(node); break; + } + } + + internal void WriteArray(IEnumerable array) + { + currentLevel++; + + writer.Write('['); + + bool doIndentation = false; + + if (pretty) + { + foreach (var node in array) + { + if (node.Type == JsonType.Object || node.Type == JsonType.Array) + { + doIndentation = true; + + break; + } + } + } + + bool isFirst = true; + + foreach (JsonNode node in array) + { + if (!isFirst) writer.Write(','); + + if (doIndentation) + { + WriteIndent(); + } + else if (pretty) + { + writer.Write(' '); + } + + WriteNode(node); + + isFirst = false; + } + + currentLevel--; + + if (doIndentation) + { + WriteIndent(); + } + else if (pretty) + { + writer.Write(' '); + } + + writer.Write(']'); + } + + internal void WriteIndent() + { + if (pretty) + { + writer.Write(Environment.NewLine); + + for (int level = 0; level < currentLevel; level++) + { + writer.Write(indentation); + } + } + } + + internal void WriteObject(JsonObject obj) + { + currentLevel++; + + writer.Write('{'); + + bool isFirst = true; + + foreach (var field in obj) + { + if (!isFirst) writer.Write(','); + + WriteIndent(); + + WriteFieldName(field.Key); + + writer.Write(':'); + + if (pretty) + { + writer.Write(' '); + } + + // Write the field value + WriteNode(field.Value); + + isFirst = false; + } + + currentLevel--; + + WriteIndent(); + + writer.Write('}'); + } + + internal void WriteFieldName(string fieldName) + { + writer.Write('"'); + writer.Write(HttpUtility.JavaScriptStringEncode(fieldName)); + writer.Write('"'); + } + + #region Primitives + + internal void WriteBinary(XBinary value) + { + writer.Write('"'); + writer.Write(value.ToString()); + writer.Write('"'); + } + + internal void WriteBoolean(bool value) + { + writer.Write(value ? "true" : "false"); + } + + internal void WriteDate(JsonDate date) + { + if (date.ToDateTime().Year == 1) + { + WriteNull(); + } + else + { + writer.Write('"'); + writer.Write(date.ToIsoString()); + writer.Write('"'); + } + } + + internal void WriteNull() + { + writer.Write("null"); + } + + internal void WriteNumber(JsonNumber number) + { + if (number.Overflows) + { + writer.Write('"'); + writer.Write(number.Value); + writer.Write('"'); + } + else + { + writer.Write(number.Value); + } + } + + internal void WriteString(string text) + { + if (text == null) + { + WriteNull(); + } + else + { + writer.Write('"'); + + writer.Write(HttpUtility.JavaScriptStringEncode(text)); + + writer.Write('"'); + } + } + + #endregion + } +} + + +// TODO: Replace with System.Text.Json when available diff --git a/src/EdgeZones/EdgeZones.Autorest/generated/runtime/delegates.cs b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/delegates.cs new file mode 100644 index 000000000000..d4a0fd92bb90 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/generated/runtime/delegates.cs @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime +{ + using System; + using System.Collections; + using System.Collections.Generic; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + using GetEventData=System.Func; + + public delegate Task SendAsync(HttpRequestMessage request, IEventListener callback); + public delegate Task SendAsyncStep(HttpRequestMessage request, IEventListener callback, ISendAsync next); + public delegate Task SignalEvent(string id, CancellationToken token, GetEventData getEventData); + public delegate Task Event(EventData message); + public delegate void SynchEvent(EventData message); + public delegate Task OnResponse(Response message); + public delegate Task OnResponse(Response message); +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/help/Az.EdgeZones.md b/src/EdgeZones/EdgeZones.Autorest/help/Az.EdgeZones.md new file mode 100644 index 000000000000..5dadd282fe8f --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/help/Az.EdgeZones.md @@ -0,0 +1,22 @@ +--- +Module Name: Az.EdgeZones +Module Guid: 40bf94d1-ec66-4236-9396-2eac6bd6b1fe +Download Help Link: https://learn.microsoft.com/powershell/module/az.edgezones +Help Version: 1.0.0.0 +Locale: en-US +--- + +# Az.EdgeZones Module +## Description +Microsoft Azure PowerShell: EdgeZones cmdlets + +## Az.EdgeZones Cmdlets +### [Get-AzEdgeZonesExtendedZone](Get-AzEdgeZonesExtendedZone.md) +Gets an Azure Extended Zone for a subscription + +### [Register-AzEdgeZonesExtendedZone](Register-AzEdgeZonesExtendedZone.md) +Registers a subscription for an Extended Zone + +### [Unregister-AzEdgeZonesExtendedZone](Unregister-AzEdgeZonesExtendedZone.md) +Unregisters a subscription for an Extended Zone + diff --git a/src/EdgeZones/EdgeZones.Autorest/help/Get-AzEdgeZonesExtendedZone.md b/src/EdgeZones/EdgeZones.Autorest/help/Get-AzEdgeZonesExtendedZone.md new file mode 100644 index 000000000000..b086f22c84b0 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/help/Get-AzEdgeZonesExtendedZone.md @@ -0,0 +1,159 @@ +--- +external help file: +Module Name: Az.EdgeZones +online version: https://learn.microsoft.com/powershell/module/az.edgezones/get-azedgezonesextendedzone +schema: 2.0.0 +--- + +# Get-AzEdgeZonesExtendedZone + +## SYNOPSIS +Gets an Azure Extended Zone for a subscription + +## SYNTAX + +### List (Default) +``` +Get-AzEdgeZonesExtendedZone [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzEdgeZonesExtendedZone -Name [-SubscriptionId ] [-DefaultProfile ] + [] +``` + +### GetViaIdentity +``` +Get-AzEdgeZonesExtendedZone -InputObject [-DefaultProfile ] + [] +``` + +## DESCRIPTION +Gets an Azure Extended Zone for a subscription + +## EXAMPLES + +### Example 1: List all Azure Extended Zones under a subscription +```powershell +Get-AzEdgeZonesExtendedZone +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +losangeles +``` + +This command list all Azure Extended Zones under a subscription + +### Example 2: Get an Azure Extended Zone by name +```powershell +Get-AzEdgeZonesExtendedZone -Name losangeles +``` + +```output +DisplayName : Los Angeles +Geography : usa +GeographyGroup : US +HomeLocation : westus +Id : /subscriptions/2027ff61-4414-4aa3-bd20-170c46f69b19/providers/Microsoft.EdgeZones/extendedZones/losangeles +Latitude : 34.058414 +Longitude : -118.23537 +Name : losangeles +ProvisioningState : Succeeded +RegionCategory : Other +RegionType : Physical +RegionalDisplayName : (US) Los Angeles +RegistrationState : NotRegistered +ResourceGroupName : +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.EdgeZones/extendedZones +``` + +This command gets an Azure Extended Zones by name + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +The name of the ExtendedZone + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: ExtendedZoneName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone + +## NOTES + +## RELATED LINKS + diff --git a/src/EdgeZones/EdgeZones.Autorest/help/README.md b/src/EdgeZones/EdgeZones.Autorest/help/README.md new file mode 100644 index 000000000000..56fb1bce1627 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/help/README.md @@ -0,0 +1,11 @@ +# Docs +This directory contains the documentation of the cmdlets for the `Az.EdgeZones` module. To run documentation generation, use the `generate-help.ps1` script at the root module folder. Files in this folder will *always be overridden on regeneration*. To update documentation examples, please use the `..\examples` folder. + +## Info +- Modifiable: no +- Generated: all +- Committed: yes +- Packaged: yes + +## Details +The process of documentation generation loads `Az.EdgeZones` and analyzes the exported cmdlets from the module. It recognizes the [help comments](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) that are generated into the scripts in the `..\exports` folder. Additionally, when writing custom cmdlets in the `..\custom` folder, you can use the help comments syntax, which decorate the exported scripts at build-time. The documentation examples are taken from the `..\examples` folder. \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/help/Register-AzEdgeZonesExtendedZone.md b/src/EdgeZones/EdgeZones.Autorest/help/Register-AzEdgeZonesExtendedZone.md new file mode 100644 index 000000000000..80be4ad3c368 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/help/Register-AzEdgeZonesExtendedZone.md @@ -0,0 +1,172 @@ +--- +external help file: +Module Name: Az.EdgeZones +online version: https://learn.microsoft.com/powershell/module/az.edgezones/register-azedgezonesextendedzone +schema: 2.0.0 +--- + +# Register-AzEdgeZonesExtendedZone + +## SYNOPSIS +Registers a subscription for an Extended Zone + +## SYNTAX + +### Register (Default) +``` +Register-AzEdgeZonesExtendedZone -Name [-SubscriptionId ] [-DefaultProfile ] + [-Confirm] [-WhatIf] [] +``` + +### RegisterViaIdentity +``` +Register-AzEdgeZonesExtendedZone -InputObject [-DefaultProfile ] [-Confirm] + [-WhatIf] [] +``` + +## DESCRIPTION +Registers a subscription for an Extended Zone + +## EXAMPLES + +### Example 1: Register subscription for an Azure Extended Zone +```powershell +Register-AzEdgeZonesExtendedZone -Name losangeles +``` + +```output +DisplayName : Los Angeles +Geography : usa +GeographyGroup : US +HomeLocation : westus +Id : /subscriptions/2027ff61-4414-4aa3-bd20-170c46f69b19/providers/Microsoft.EdgeZones/extendedZones/losangeles +Latitude : 34.058414 +Longitude : -118.23537 +Name : losangeles +ProvisioningState : Succeeded +RegionCategory : Other +RegionType : Physical +RegionalDisplayName : (US) Los Angeles +RegistrationState : PendingRegister +ResourceGroupName : +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.EdgeZones/extendedZones +``` + +This command register subscription for an Azure Extended Zone + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentity +Parameter Sets: RegisterViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +The name of the ExtendedZone + +```yaml +Type: System.String +Parameter Sets: Register +Aliases: ExtendedZoneName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: Register +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone + +## NOTES + +## RELATED LINKS + diff --git a/src/EdgeZones/EdgeZones.Autorest/help/Unregister-AzEdgeZonesExtendedZone.md b/src/EdgeZones/EdgeZones.Autorest/help/Unregister-AzEdgeZonesExtendedZone.md new file mode 100644 index 000000000000..c5c80ad4de23 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/help/Unregister-AzEdgeZonesExtendedZone.md @@ -0,0 +1,172 @@ +--- +external help file: +Module Name: Az.EdgeZones +online version: https://learn.microsoft.com/powershell/module/az.edgezones/unregister-azedgezonesextendedzone +schema: 2.0.0 +--- + +# Unregister-AzEdgeZonesExtendedZone + +## SYNOPSIS +Unregisters a subscription for an Extended Zone + +## SYNTAX + +### Unregister (Default) +``` +Unregister-AzEdgeZonesExtendedZone -Name [-SubscriptionId ] [-DefaultProfile ] + [-Confirm] [-WhatIf] [] +``` + +### UnregisterViaIdentity +``` +Unregister-AzEdgeZonesExtendedZone -InputObject [-DefaultProfile ] [-Confirm] + [-WhatIf] [] +``` + +## DESCRIPTION +Unregisters a subscription for an Extended Zone + +## EXAMPLES + +### Example 1: Register subscription for an Azure Extended Zone +```powershell +Unregister-AzEdgeZonesExtendedZone -Name losangeles +``` + +```output +DisplayName : Los Angeles +Geography : usa +GeographyGroup : US +HomeLocation : westus +Id : /subscriptions/2027ff61-4414-4aa3-bd20-170c46f69b19/providers/Microsoft.EdgeZones/extendedZones/losangeles +Latitude : 34.058414 +Longitude : -118.23537 +Name : losangeles +ProvisioningState : Succeeded +RegionCategory : Other +RegionType : Physical +RegionalDisplayName : (US) Los Angeles +RegistrationState : PendingUnregister +ResourceGroupName : +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.EdgeZones/extendedZones +``` + +This command unregister subscription for an Azure Extended Zone + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentity +Parameter Sets: UnregisterViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +The name of the ExtendedZone + +```yaml +Type: System.String +Parameter Sets: Unregister +Aliases: ExtendedZoneName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: Unregister +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone + +## NOTES + +## RELATED LINKS + diff --git a/src/EdgeZones/EdgeZones.Autorest/how-to.md b/src/EdgeZones/EdgeZones.Autorest/how-to.md new file mode 100644 index 000000000000..1ed39d6e6342 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/how-to.md @@ -0,0 +1,58 @@ +# How-To +This document describes how to develop for `Az.EdgeZones`. + +## Building `Az.EdgeZones` +To build, run the `build-module.ps1` at the root of the module directory. This will generate the proxy script cmdlets that are the cmdlets being exported by this module. After the build completes, the proxy script cmdlets will be output to the `exports` folder. To read more about the proxy script cmdlets, look at the [README.md](exports/README.md) in the `exports` folder. + +## Creating custom cmdlets +To add cmdlets that were not generated by the REST specification, use the `custom` folder. This folder allows you to add handwritten `.ps1` and `.cs` files. Currently, we support using `.ps1` scripts as new cmdlets or as additional low-level variants (via `ParameterSet`), and `.cs` files as low-level (variants) cmdlets that the exported script cmdlets call. We do not support exporting any `.cs` (dll) cmdlets directly. To read more about custom cmdlets, look at the [README.md](custom/README.md) in the `custom` folder. + +## Generating documentation +To generate documentation, the process is now integrated into the `build-module.ps1` script. If you don't want to run this process as part of `build-module.ps1`, you can provide the `-NoDocs` switch. If you want to run documentation generation after the build process, you may still run the `generate-help.ps1` script. Overall, the process will look at the documentation comments in the generated and custom cmdlets and types, and create `.md` files into the `docs` folder. Additionally, this pulls in any examples from the `examples` folder and adds them to the generated help markdown documents. To read more about examples, look at the [README.md](examples/README.md) in the `examples` folder. To read more about documentation, look at the [README.md](docs/README.md) in the `docs` folder. + +## Testing `Az.EdgeZones` +To test the cmdlets, we use [Pester](https://github.com/pester/Pester). Tests scripts (`.ps1`) should be added to the `test` folder. To execute the Pester tests, run the `test-module.ps1` script. This will run all tests in `playback` mode within the `test` folder. To read more about testing cmdlets, look at the [README.md](examples/README.md) in the `examples` folder. + +## Packing `Az.EdgeZones` +To pack `Az.EdgeZones` for distribution, run the `pack-module.ps1` script. This will take the contents of multiple directories and certain root-folder files to create a `.nupkg`. The structure of the `.nupkg` is created so it can be loaded part of a [PSRepository](https://learn.microsoft.com/powershell/module/powershellget/register-psrepository). Additionally, this package is in a format for distribution to the [PSGallery](https://www.powershellgallery.com/). For signing an Azure module, please contact the [Azure PowerShell](https://github.com/Azure/azure-powershell) team. + +## Module Script Details +There are multiple scripts created for performing different actions for developing `Az.EdgeZones`. +- `build-module.ps1` + - Builds the module DLL (`./bin/Az.EdgeZones.private.dll`), creates the exported cmdlets and documentation, generates custom cmdlet test stubs and exported cmdlet example stubs, and updates `./Az.EdgeZones.psd1` with Azure profile information. + - **Parameters**: [`Switch` parameters] + - `-Run`: After building, creates an isolated PowerShell session and loads `Az.EdgeZones`. + - `-Test`: After building, runs the `Pester` tests defined in the `test` folder. + - `-Docs`: After building, generates the Markdown documents for the modules into the `docs` folder. + - `-Pack`: After building, packages the module into a `.nupkg`. + - `-Code`: After building, opens a VSCode window with the module's directory and runs (see `-Run`) the module. + - `-Release`: Builds the module in `Release` configuration (as opposed to `Debug` configuration). + - `-NoDocs`: Supresses writing the documentation markdown files as part of the cmdlet exporting process. + - `-Debugger`: Used when attaching the debugger in Visual Studio to the PowerShell session, and running the build process without recompiling the DLL. This suppresses running the script as an isolated process. +- `run-module.ps1` + - Creates an isolated PowerShell session and loads `Az.EdgeZones` into the session. + - Same as `-Run` in `build-module.ps1`. + - **Parameters**: [`Switch` parameters] + - `-Code`: Opens a VSCode window with the module's directory. + - Same as `-Code` in `build-module.ps1`. +- `generate-help.ps1` + - Generates the Markdown documents for the modules into the `docs` folder. + - Same as `-Docs` in `build-module.ps1`. +- `test-module.ps1` + - Runs the `Pester` tests defined in the `test` folder. + - Same as `-Test` in `build-module.ps1`. +- `pack-module.ps1` + - Packages the module into a `.nupkg` for distribution. + - Same as `-Pack` in `build-module.ps1`. +- `generate-help.ps1` + - Generates the Markdown documents for the modules into the `docs` folder. + - Same as `-Docs` in `build-module.ps1`. + - This process is now integrated into `build-module.ps1` automatically. To disable, use `-NoDocs` when running `build-module.ps1`. +- `export-surface.ps1` + - Generates Markdown documents for both the cmdlet surface and the model (class) surface of the module. + - These files are placed into the `resources` folder. + - Used for investigating the surface of your module. These are *not* documentation for distribution. +- `check-dependencies.ps1` + - Used in `run-module.ps1` and `test-module.ps1` to verify dependent modules are available to run those tasks. + - It will download local (within the module's directory structure) versions of those modules as needed. + - This script *does not* need to be ran by-hand. \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/internal/Az.EdgeZones.internal.psm1 b/src/EdgeZones/EdgeZones.Autorest/internal/Az.EdgeZones.internal.psm1 new file mode 100644 index 000000000000..eeaaf9a33a52 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/internal/Az.EdgeZones.internal.psm1 @@ -0,0 +1,38 @@ +# region Generated + # Load the private module dll + $null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.EdgeZones.private.dll') + + # Get the private module's instance + $instance = [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Module]::Instance + + # Export nothing to clear implicit exports + Export-ModuleMember + + # Export proxy cmdlet scripts + $exportsPath = $PSScriptRoot + $directories = Get-ChildItem -Directory -Path $exportsPath + $profileDirectory = $null + if($instance.ProfileName) { + if(($directories | ForEach-Object { $_.Name }) -contains $instance.ProfileName) { + $profileDirectory = $directories | Where-Object { $_.Name -eq $instance.ProfileName } + } else { + # Don't export anything if the profile doesn't exist for the module + $exportsPath = $null + Write-Warning "Selected Azure profile '$($instance.ProfileName)' does not exist for module '$($instance.Name)'. No cmdlets were loaded." + } + } elseif(($directories | Measure-Object).Count -gt 0) { + # Load the last folder if no profile is selected + $profileDirectory = $directories | Select-Object -Last 1 + } + + if($profileDirectory) { + Write-Information "Loaded Azure profile '$($profileDirectory.Name)' for module '$($instance.Name)'" + $exportsPath = $profileDirectory.FullName + } + + if($exportsPath) { + Get-ChildItem -Path $exportsPath -Recurse -Include '*.ps1' -File | ForEach-Object { . $_.FullName } + $cmdletNames = Get-ScriptCmdlet -ScriptFolder $exportsPath + Export-ModuleMember -Function $cmdletNames -Alias (Get-ScriptCmdlet -ScriptFolder $exportsPath -AsAlias) + } +# endregion diff --git a/src/EdgeZones/EdgeZones.Autorest/internal/Get-AzEdgeZonesOperation.ps1 b/src/EdgeZones/EdgeZones.Autorest/internal/Get-AzEdgeZonesOperation.ps1 new file mode 100644 index 000000000000..61256187ba83 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/internal/Get-AzEdgeZonesOperation.ps1 @@ -0,0 +1,125 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +List the operations for the provider +.Description +List the operations for the provider +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperation +.Link +https://learn.microsoft.com/powershell/module/az.edgezones/get-azedgezonesoperation +#> +function Get-AzEdgeZonesOperation { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperation])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $mapping = @{ + List = 'Az.EdgeZones.private\Get-AzEdgeZonesOperation_List'; + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} diff --git a/src/EdgeZones/EdgeZones.Autorest/internal/ProxyCmdletDefinitions.ps1 b/src/EdgeZones/EdgeZones.Autorest/internal/ProxyCmdletDefinitions.ps1 new file mode 100644 index 000000000000..61256187ba83 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/internal/ProxyCmdletDefinitions.ps1 @@ -0,0 +1,125 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +List the operations for the provider +.Description +List the operations for the provider +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperation +.Link +https://learn.microsoft.com/powershell/module/az.edgezones/get-azedgezonesoperation +#> +function Get-AzEdgeZonesOperation { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IOperation])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $mapping = @{ + List = 'Az.EdgeZones.private\Get-AzEdgeZonesOperation_List'; + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} diff --git a/src/EdgeZones/EdgeZones.Autorest/internal/README.md b/src/EdgeZones/EdgeZones.Autorest/internal/README.md new file mode 100644 index 000000000000..5ccb2df690f4 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/internal/README.md @@ -0,0 +1,14 @@ +# Internal +This directory contains a module to handle *internal only* cmdlets. Cmdlets that you **hide** in configuration are created here. For more information on hiding, see [cmdlet hiding](https://github.com/Azure/autorest.powershell/blob/main/docs/directives.md#cmdlet-hiding-exportation-suppression). The cmdlets in this directory are generated at **build-time**. Do not put any custom code, files, cmdlets, etc. into this directory. Please use `..\custom` for all custom implementation. + +## Info +- Modifiable: no +- Generated: all +- Committed: no +- Packaged: yes + +## Details +The `Az.EdgeZones.internal.psm1` file is generated to this folder. This module file handles the hidden cmdlets. These cmdlets will not be exported by `Az.EdgeZones`. Instead, this sub-module is imported by the `..\custom\Az.EdgeZones.custom.psm1` module, allowing you to use hidden cmdlets in your custom, exposed cmdlets. To call these cmdlets in your custom scripts, simply use [module-qualified calls](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_command_precedence?view=powershell-6#qualified-names). For example, `Az.EdgeZones.internal\Get-Example` would call an internal cmdlet named `Get-Example`. + +## Purpose +This allows you to include REST specifications for services that you *do not wish to expose from your module*, but simply want to call within custom cmdlets. For example, if you want to make a custom cmdlet that uses `Storage` services, you could include a simplified `Storage` REST specification that has only the operations you need. When you run the generator and build this module, note the generated `Storage` cmdlets. Then, in your readme configuration, use [cmdlet hiding](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md#cmdlet-hiding-exportation-suppression) on the `Storage` cmdlets and they will *only be exposed to the custom cmdlets* you want to write, and not be exported as part of `Az.EdgeZones`. diff --git a/src/EdgeZones/EdgeZones.Autorest/pack-module.ps1 b/src/EdgeZones/EdgeZones.Autorest/pack-module.ps1 new file mode 100644 index 000000000000..2f30ca3fffa0 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/pack-module.ps1 @@ -0,0 +1,17 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- +Write-Host -ForegroundColor Green 'Packing module...' +dotnet pack $PSScriptRoot --no-build /nologo +Write-Host -ForegroundColor Green '-------------Done-------------' \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/run-module.ps1 b/src/EdgeZones/EdgeZones.Autorest/run-module.ps1 new file mode 100644 index 000000000000..de61199e8f6c --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/run-module.ps1 @@ -0,0 +1,62 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- +param([switch]$NotIsolated, [switch]$Code) +$ErrorActionPreference = 'Stop' + +if(-not $NotIsolated) { + Write-Host -ForegroundColor Green 'Creating isolated process...' + $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path + & "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated + return +} + +$isAzure = $true +if($isAzure) { + . (Join-Path $PSScriptRoot 'check-dependencies.ps1') -NotIsolated -Accounts + # Load the latest version of Az.Accounts installed + Import-Module -Name Az.Accounts -RequiredVersion (Get-Module -Name Az.Accounts -ListAvailable | Sort-Object -Property Version -Descending)[0].Version +} + +$localModulesPath = Join-Path $PSScriptRoot 'generated\modules' +if(Test-Path -Path $localModulesPath) { + $env:PSModulePath = "$localModulesPath$([IO.Path]::PathSeparator)$env:PSModulePath" +} + +$modulePsd1 = Get-Item -Path (Join-Path $PSScriptRoot './Az.EdgeZones.psd1') +$modulePath = $modulePsd1.FullName +$moduleName = $modulePsd1.BaseName + +function Prompt { + Write-Host -NoNewline -ForegroundColor Green "PS $(Get-Location)" + Write-Host -NoNewline -ForegroundColor Gray ' [' + Write-Host -NoNewline -ForegroundColor White -BackgroundColor DarkCyan $moduleName + ']> ' +} + +# where we would find the launch.json file +$vscodeDirectory = New-Item -ItemType Directory -Force -Path (Join-Path $PSScriptRoot '.vscode') +$launchJson = Join-Path $vscodeDirectory 'launch.json' + +# if there is a launch.json file, let's just assume -Code, and update the file +if(($Code) -or (test-Path $launchJson) ) { + $launchContent = '{ "version": "0.2.0", "configurations":[{ "name":"Attach to PowerShell", "type":"coreclr", "request":"attach", "processId":"' + ([System.Diagnostics.Process]::GetCurrentProcess().Id) + '", "justMyCode":false }] }' + Set-Content -Path $launchJson -Value $launchContent + if($Code) { + # only launch vscode if they say -code + code $PSScriptRoot + } +} + +Import-Module -Name $modulePath \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/test-module.ps1 b/src/EdgeZones/EdgeZones.Autorest/test-module.ps1 new file mode 100644 index 000000000000..183d11a75312 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/test-module.ps1 @@ -0,0 +1,98 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- +param([switch]$NotIsolated, [switch]$Live, [switch]$Record, [switch]$Playback, [switch]$RegenerateSupportModule, [switch]$UsePreviousConfigForRecord, [string[]]$TestName) +$ErrorActionPreference = 'Stop' + +if(-not $NotIsolated) +{ + Write-Host -ForegroundColor Green 'Creating isolated process...' + if ($PSBoundParameters.ContainsKey("TestName")) { + $PSBoundParameters["TestName"] = $PSBoundParameters["TestName"] -join "," + } + $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path + & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated + return +} + +# This is a workaround, since for string array parameter, pwsh -File will only take the first element +if ($PSBoundParameters.ContainsKey("TestName") -and ($TestName.count -eq 1) -and ($TestName[0].Contains(','))) { + $TestName = $TestName[0].Split(",") +} + +$ProgressPreference = 'SilentlyContinue' +$baseName = $PSScriptRoot.BaseName +$requireResourceModule = (($baseName -ne "Resources") -and ($Record.IsPresent -or $Live.IsPresent)) +. (Join-Path $PSScriptRoot 'check-dependencies.ps1') -NotIsolated -Accounts:$false -Pester -Resources:$requireResourceModule -RegenerateSupportModule:$RegenerateSupportModule +. ("$PSScriptRoot\test\utils.ps1") + +if ($requireResourceModule) +{ + # Load the latest Az.Accounts installed + Import-Module -Name Az.Accounts -RequiredVersion (Get-Module -Name Az.Accounts -ListAvailable | Sort-Object -Property Version -Descending)[0].Version + $resourceModulePSD = Get-Item -Path (Join-Path $HOME '.PSSharedModules\Resources\Az.Resources.TestSupport.psd1') + Import-Module -Name $resourceModulePSD.FullName +} + +$localModulesPath = Join-Path $PSScriptRoot 'generated\modules' +if(Test-Path -Path $localModulesPath) +{ + $env:PSModulePath = "$localModulesPath$([IO.Path]::PathSeparator)$env:PSModulePath" +} + +$modulePsd1 = Get-Item -Path (Join-Path $PSScriptRoot './Az.EdgeZones.psd1') +$modulePath = $modulePsd1.FullName +$moduleName = $modulePsd1.BaseName + +Import-Module -Name Pester +Import-Module -Name $modulePath + +$TestMode = 'playback' +$ExcludeTag = @("LiveOnly") +if($Live) +{ + $TestMode = 'live' + $ExcludeTag = @() +} +if($Record) +{ + $TestMode = 'record' +} +try +{ + if ($TestMode -ne 'playback') + { + setupEnv + } else { + $env:AzPSAutorestTestPlaybackMode = $true + } + $testFolder = Join-Path $PSScriptRoot 'test' + if ($null -ne $TestName) + { + Invoke-Pester -Script @{ Path = $testFolder } -TestName $TestName -ExcludeTag $ExcludeTag -EnableExit -OutputFile (Join-Path $testFolder "$moduleName-TestResults.xml") + } else { + Invoke-Pester -Script @{ Path = $testFolder } -ExcludeTag $ExcludeTag -EnableExit -OutputFile (Join-Path $testFolder "$moduleName-TestResults.xml") + } +} Finally +{ + if ($TestMode -ne 'playback') + { + cleanupEnv + } + else { + $env:AzPSAutorestTestPlaybackMode = '' + } +} + +Write-Host -ForegroundColor Green '-------------Done-------------' diff --git a/src/EdgeZones/EdgeZones.Autorest/test/Get-AzEdgeZonesExtendedZone.Recording.json b/src/EdgeZones/EdgeZones.Autorest/test/Get-AzEdgeZonesExtendedZone.Recording.json new file mode 100644 index 000000000000..b9c417c52ea4 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/test/Get-AzEdgeZonesExtendedZone.Recording.json @@ -0,0 +1,190 @@ +{ + "Get-AzEdgeZonesExtendedZone+[NoContext]+List+$GET+https://management.azure.com/subscriptions/2027ff61-4414-4aa3-bd20-170c46f69b19/providers/Microsoft.EdgeZones/extendedZones?api-version=2024-04-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/2027ff61-4414-4aa3-bd20-170c46f69b19/providers/Microsoft.EdgeZones/extendedZones?api-version=2024-04-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "1669d138-6f94-4ebd-b853-921ce6a2bca0" ], + "CommandName": [ "Get-AzEdgeZonesExtendedZone" ], + "FullCommandName": [ "Get-AzEdgeZonesExtendedZone_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v5.4.0", "PSVersion/v7.4.1", "Az.EdgeZones/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=72f94d4b889d42a38551413966812bd53c7a651c102bf98da2dca68402e21287;Path=/;HttpOnly;Secure;Domain=edgezonerp-canary.trafficmanager.net", "ARRAffinitySameSite=72f94d4b889d42a38551413966812bd53c7a651c102bf98da2dca68402e21287;Path=/;HttpOnly;SameSite=None;Secure;Domain=edgezonerp-canary.trafficmanager.net" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-providerhub-traffic": [ "True" ], + "mise-correlation-id": [ "8e28d905-61ba-4263-9a6d-e41e592203d7" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "28b1857d-ff2f-4245-85f8-bf853e0498cc" ], + "x-ms-correlation-request-id": [ "5e86ed94-93fe-4084-83b5-f95ff1d7eeb3" ], + "x-ms-routing-request-id": [ "WESTUS2:20240325T225122Z:5e86ed94-93fe-4084-83b5-f95ff1d7eeb3" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 8F0CDE41F1A7487DAB3C86A42C69259C Ref B: CO6AA3150217047 Ref C: 2024-03-25T22:51:21Z" ], + "Date": [ "Mon, 25 Mar 2024 22:51:21 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "2441" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"/subscriptions/2027ff61-4414-4aa3-bd20-170c46f69b19/providers/Microsoft.EdgeZones/extendedZones/microsoftrrezm1\",\"name\":\"microsoftrrezm1\",\"type\":\"Microsoft.EdgeZones/extendedZones\",\"properties\":{\"provisioningState\":\"Succeeded\",\"registrationState\":\"NotRegistered\",\"displayName\":\"Los Angeles Test\",\"regionalDisplayName\":\"(US) Los Angeles Test\",\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geography\":\"usa\",\"geographyGroup\":\"US\",\"longitude\":\"-118.235374\",\"latitude\":\"34.058414\",\"homeLocation\":\"westus\"}},{\"id\":\"/subscriptions/2027ff61-4414-4aa3-bd20-170c46f69b19/providers/Microsoft.EdgeZones/extendedZones/losangeles\",\"name\":\"losangeles\",\"type\":\"Microsoft.EdgeZones/extendedZones\",\"properties\":{\"provisioningState\":\"Succeeded\",\"registrationState\":\"Registered\",\"displayName\":\"Los Angeles\",\"regionalDisplayName\":\"(US) Los Angeles\",\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geography\":\"usa\",\"geographyGroup\":\"US\",\"longitude\":\"-118.23537\",\"latitude\":\"34.058414\",\"homeLocation\":\"westus\"}},{\"id\":\"/subscriptions/2027ff61-4414-4aa3-bd20-170c46f69b19/providers/Microsoft.EdgeZones/extendedZones/microsoftb25lab1\",\"name\":\"microsoftb25lab1\",\"type\":\"Microsoft.EdgeZones/extendedZones\",\"properties\":{\"provisioningState\":\"Succeeded\",\"registrationState\":\"Registered\",\"displayName\":\"Microsoft B25 Lab 1\",\"regionalDisplayName\":\"\",\"regionType\":\"\",\"regionCategory\":\"\",\"geography\":\"\",\"geographyGroup\":\"\",\"longitude\":\"\",\"latitude\":\"\",\"homeLocation\":\"\"}},{\"id\":\"/subscriptions/2027ff61-4414-4aa3-bd20-170c46f69b19/providers/Microsoft.EdgeZones/extendedZones/AzureEdgeZoneLosAngelesA\",\"name\":\"AzureEdgeZoneLosAngelesA\",\"type\":\"Microsoft.EdgeZones/extendedZones\",\"properties\":{\"provisioningState\":\"Succeeded\",\"registrationState\":\"Registered\",\"displayName\":\"Los Angeles Test\",\"regionalDisplayName\":\"(US) Los Angeles Test\",\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geography\":\"usa\",\"geographyGroup\":\"US\",\"longitude\":\"-118.235374\",\"latitude\":\"34.058414\",\"homeLocation\":\"westus\"}},{\"id\":\"/subscriptions/2027ff61-4414-4aa3-bd20-170c46f69b19/providers/Microsoft.EdgeZones/extendedZones/microsoftdclabs1\",\"name\":\"microsoftdclabs1\",\"type\":\"Microsoft.EdgeZones/extendedZones\",\"properties\":{\"provisioningState\":\"Succeeded\",\"registrationState\":\"Registered\",\"displayName\":\"Microsoft DC Labs 1\",\"regionalDisplayName\":\"\",\"regionType\":\"\",\"regionCategory\":\"\",\"geography\":\"\",\"geographyGroup\":\"\",\"longitude\":\"\",\"latitude\":\"\",\"homeLocation\":\"\"}}]}", + "isContentBase64": false + } + }, + "Get-AzEdgeZonesExtendedZone+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/2027ff61-4414-4aa3-bd20-170c46f69b19/providers/Microsoft.EdgeZones/extendedZones/losangeles?api-version=2024-04-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/2027ff61-4414-4aa3-bd20-170c46f69b19/providers/Microsoft.EdgeZones/extendedZones/losangeles?api-version=2024-04-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "b0449ba8-9251-4370-a029-9f920afae3e3" ], + "CommandName": [ "Get-AzEdgeZonesExtendedZone" ], + "FullCommandName": [ "Get-AzEdgeZonesExtendedZone_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v5.4.0", "PSVersion/v7.4.1", "Az.EdgeZones/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=753642ccc7fea07fad427255f74d194b1e9d4b31b0a333225ba7b990debc476d;Path=/;HttpOnly;Secure;Domain=edgezonerp-canary.trafficmanager.net", "ARRAffinitySameSite=753642ccc7fea07fad427255f74d194b1e9d4b31b0a333225ba7b990debc476d;Path=/;HttpOnly;SameSite=None;Secure;Domain=edgezonerp-canary.trafficmanager.net" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-providerhub-traffic": [ "True" ], + "mise-correlation-id": [ "fe9db599-1376-41b1-a672-24fc3d4ee8d0" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "73b63f20-8dae-4e37-998b-8c3f1368625d" ], + "x-ms-correlation-request-id": [ "2ee38b14-7181-441c-affe-bce4f3603930" ], + "x-ms-routing-request-id": [ "WESTUS2:20240325T225122Z:2ee38b14-7181-441c-affe-bce4f3603930" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 2A350A6639604F9DA41BC134DF058FDF Ref B: CO6AA3150217047 Ref C: 2024-03-25T22:51:22Z" ], + "Date": [ "Mon, 25 Mar 2024 22:51:22 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "488" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/2027ff61-4414-4aa3-bd20-170c46f69b19/providers/Microsoft.EdgeZones/extendedZones/losangeles\",\"name\":\"losangeles\",\"type\":\"Microsoft.EdgeZones/extendedZones\",\"properties\":{\"provisioningState\":\"Succeeded\",\"registrationState\":\"Registered\",\"displayName\":\"Los Angeles\",\"regionalDisplayName\":\"(US) Los Angeles\",\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geography\":\"usa\",\"geographyGroup\":\"US\",\"longitude\":\"-118.23537\",\"latitude\":\"34.058414\",\"homeLocation\":\"westus\"}}", + "isContentBase64": false + } + }, + "Get-AzEdgeZonesExtendedZone+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/2027ff61-4414-4aa3-bd20-170c46f69b19/providers/Microsoft.EdgeZones/extendedZones/losangeles?api-version=2024-04-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/2027ff61-4414-4aa3-bd20-170c46f69b19/providers/Microsoft.EdgeZones/extendedZones/losangeles?api-version=2024-04-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "91785017-2a6f-4d81-9eb1-18ddc014f2cb" ], + "CommandName": [ "Get-AzEdgeZonesExtendedZone" ], + "FullCommandName": [ "Get-AzEdgeZonesExtendedZone_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v5.4.0", "PSVersion/v7.4.1", "Az.EdgeZones/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=753642ccc7fea07fad427255f74d194b1e9d4b31b0a333225ba7b990debc476d;Path=/;HttpOnly;Secure;Domain=edgezonerp-canary.trafficmanager.net", "ARRAffinitySameSite=753642ccc7fea07fad427255f74d194b1e9d4b31b0a333225ba7b990debc476d;Path=/;HttpOnly;SameSite=None;Secure;Domain=edgezonerp-canary.trafficmanager.net" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-providerhub-traffic": [ "True" ], + "mise-correlation-id": [ "eb4b2e08-9f48-4734-906c-71cbdf00c052" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "da60455b-0873-4034-b8b4-d2b723b8e7a6" ], + "x-ms-correlation-request-id": [ "58d6a9ee-21f2-4386-a0e9-e7a230c00001" ], + "x-ms-routing-request-id": [ "WESTUS2:20240325T225123Z:58d6a9ee-21f2-4386-a0e9-e7a230c00001" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: A76803F8C95C4CE284DCC1846B66ED1E Ref B: CO6AA3150217047 Ref C: 2024-03-25T22:51:22Z" ], + "Date": [ "Mon, 25 Mar 2024 22:51:22 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "488" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/2027ff61-4414-4aa3-bd20-170c46f69b19/providers/Microsoft.EdgeZones/extendedZones/losangeles\",\"name\":\"losangeles\",\"type\":\"Microsoft.EdgeZones/extendedZones\",\"properties\":{\"provisioningState\":\"Succeeded\",\"registrationState\":\"Registered\",\"displayName\":\"Los Angeles\",\"regionalDisplayName\":\"(US) Los Angeles\",\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geography\":\"usa\",\"geographyGroup\":\"US\",\"longitude\":\"-118.23537\",\"latitude\":\"34.058414\",\"homeLocation\":\"westus\"}}", + "isContentBase64": false + } + }, + "Get-AzEdgeZonesExtendedZone+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/2027ff61-4414-4aa3-bd20-170c46f69b19/providers/Microsoft.EdgeZones/extendedZones/losangeles?api-version=2024-04-01-preview+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/2027ff61-4414-4aa3-bd20-170c46f69b19/providers/Microsoft.EdgeZones/extendedZones/losangeles?api-version=2024-04-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "4" ], + "x-ms-client-request-id": [ "1730c4bb-19a8-4065-862e-1fbaa03c8922" ], + "CommandName": [ "Get-AzEdgeZonesExtendedZone" ], + "FullCommandName": [ "Get-AzEdgeZonesExtendedZone_GetViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v5.4.0", "PSVersion/v7.4.1", "Az.EdgeZones/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=9fdb5928605e2d9046b1605688ca7e2a1d6b3a3d4a5346408989a306a60b1eeb;Path=/;HttpOnly;Secure;Domain=edgezonerp-canary.trafficmanager.net", "ARRAffinitySameSite=9fdb5928605e2d9046b1605688ca7e2a1d6b3a3d4a5346408989a306a60b1eeb;Path=/;HttpOnly;SameSite=None;Secure;Domain=edgezonerp-canary.trafficmanager.net" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-providerhub-traffic": [ "True" ], + "mise-correlation-id": [ "b071072c-4454-418d-b10d-f4b103163e78" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "3faf3743-6044-4363-8e02-faf236c6af7d" ], + "x-ms-correlation-request-id": [ "e456386b-1d99-4a09-ba93-0e3550728b9d" ], + "x-ms-routing-request-id": [ "WESTUS2:20240325T225123Z:e456386b-1d99-4a09-ba93-0e3550728b9d" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 4613F7435D5C4502B30CABC5019D4023 Ref B: CO6AA3150217047 Ref C: 2024-03-25T22:51:23Z" ], + "Date": [ "Mon, 25 Mar 2024 22:51:22 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "488" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/2027ff61-4414-4aa3-bd20-170c46f69b19/providers/Microsoft.EdgeZones/extendedZones/losangeles\",\"name\":\"losangeles\",\"type\":\"Microsoft.EdgeZones/extendedZones\",\"properties\":{\"provisioningState\":\"Succeeded\",\"registrationState\":\"Registered\",\"displayName\":\"Los Angeles\",\"regionalDisplayName\":\"(US) Los Angeles\",\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geography\":\"usa\",\"geographyGroup\":\"US\",\"longitude\":\"-118.23537\",\"latitude\":\"34.058414\",\"homeLocation\":\"westus\"}}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/test/Get-AzEdgeZonesExtendedZone.Tests.ps1 b/src/EdgeZones/EdgeZones.Autorest/test/Get-AzEdgeZonesExtendedZone.Tests.ps1 new file mode 100644 index 000000000000..11b292c6eb2f --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/test/Get-AzEdgeZonesExtendedZone.Tests.ps1 @@ -0,0 +1,39 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzEdgeZonesExtendedZone')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzEdgeZonesExtendedZone.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzEdgeZonesExtendedZone' { + It 'List' { + { + $config = Get-AzEdgeZonesExtendedZone + $config.Count | Should -BeGreaterThan 0 + } | Should -Not -Throw + } + + It 'Get' { + { + $config = Get-AzEdgeZonesExtendedZone -Name $env.extendedZoneName1 + $config.Name | Should -Be $env.extendedZoneName1 + } | Should -Not -Throw + } + + It 'GetViaIdentity' { + { + $config = Get-AzEdgeZonesExtendedZone -Name $env.extendedZoneName1 + $config = Get-AzEdgeZonesExtendedZone -InputObject $config + $config.Name | Should -Be $env.extendedZoneName1 + } | Should -Not -Throw + } +} diff --git a/src/EdgeZones/EdgeZones.Autorest/test/README.md b/src/EdgeZones/EdgeZones.Autorest/test/README.md new file mode 100644 index 000000000000..7c752b4c8c43 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/test/README.md @@ -0,0 +1,17 @@ +# Test +This directory contains the [Pester](https://www.powershellgallery.com/packages/Pester) tests to run for the module. We use Pester as it is the unofficial standard for PowerShell unit testing. Test stubs for custom cmdlets (created in `..\custom`) will be generated into this folder when `build-module.ps1` is ran. These test stubs will fail automatically, to indicate that tests should be written for custom cmdlets. + +## Info +- Modifiable: yes +- Generated: partial +- Committed: yes +- Packaged: no + +## Details +We allow three testing modes: *live*, *record*, and *playback*. These can be selected using the `-Live`, `-Record`, and `-Playback` switches respectively on the `test-module.ps1` script. This script will run through any `.Tests.ps1` scripts in the `test` folder. If you choose the *record* mode, it will create a `.Recording.json` file of the REST calls between the client and server. Then, when you choose *playback* mode, it will use the `.Recording.json` file to mock the communication between server and client. The *live* mode runs the same as the *record* mode; however, it doesn't create the `.Recording.json` file. + +## Purpose +Custom cmdlets generally encompass additional functionality not described in the REST specification, or combines functionality generated from the REST spec. To validate this functionality continues to operate as intended, creating tests that can be ran and re-ran against custom cmdlets is part of the framework. + +## Usage +To execute tests, run the `test-module.ps1`. To write tests, [this example](https://github.com/pester/Pester/blob/8b9cf4248315e44f1ac6673be149f7e0d7f10466/Examples/Planets/Get-Planet.Tests.ps1#L1) from the Pester repository is very useful for getting started. \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/test/Register-AzEdgeZonesExtendedZone.Recording.json b/src/EdgeZones/EdgeZones.Autorest/test/Register-AzEdgeZonesExtendedZone.Recording.json new file mode 100644 index 000000000000..408fd982c653 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/test/Register-AzEdgeZonesExtendedZone.Recording.json @@ -0,0 +1,96 @@ +{ + "Register-AzEdgeZonesExtendedZone+[NoContext]+RegisterViaIdentity+$GET+https://management.azure.com/subscriptions/2027ff61-4414-4aa3-bd20-170c46f69b19/providers/Microsoft.EdgeZones/extendedZones/losangeles?api-version=2024-04-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/2027ff61-4414-4aa3-bd20-170c46f69b19/providers/Microsoft.EdgeZones/extendedZones/losangeles?api-version=2024-04-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "5" ], + "x-ms-client-request-id": [ "4ec74803-b23a-413d-ac3b-5300600ae65c" ], + "CommandName": [ "Get-AzEdgeZonesExtendedZone" ], + "FullCommandName": [ "Get-AzEdgeZonesExtendedZone_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v5.4.0", "PSVersion/v7.4.1", "Az.EdgeZones/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=72f94d4b889d42a38551413966812bd53c7a651c102bf98da2dca68402e21287;Path=/;HttpOnly;Secure;Domain=edgezonerp-canary.trafficmanager.net", "ARRAffinitySameSite=72f94d4b889d42a38551413966812bd53c7a651c102bf98da2dca68402e21287;Path=/;HttpOnly;SameSite=None;Secure;Domain=edgezonerp-canary.trafficmanager.net" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-providerhub-traffic": [ "True" ], + "mise-correlation-id": [ "4ea68cd7-ae68-43fb-9cc0-dea4b6ec632a" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "3a5d1823-d55c-49b5-9a32-62b5dc6895a3" ], + "x-ms-correlation-request-id": [ "9fd3e08c-6077-4be2-b1d2-8c51354b7cab" ], + "x-ms-routing-request-id": [ "WESTUS2:20240325T225124Z:9fd3e08c-6077-4be2-b1d2-8c51354b7cab" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: E5AF33A1AE7A43BC98D775B30413F74C Ref B: CO6AA3150217047 Ref C: 2024-03-25T22:51:23Z" ], + "Date": [ "Mon, 25 Mar 2024 22:51:23 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "488" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/2027ff61-4414-4aa3-bd20-170c46f69b19/providers/Microsoft.EdgeZones/extendedZones/losangeles\",\"name\":\"losangeles\",\"type\":\"Microsoft.EdgeZones/extendedZones\",\"properties\":{\"provisioningState\":\"Succeeded\",\"registrationState\":\"Registered\",\"displayName\":\"Los Angeles\",\"regionalDisplayName\":\"(US) Los Angeles\",\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geography\":\"usa\",\"geographyGroup\":\"US\",\"longitude\":\"-118.23537\",\"latitude\":\"34.058414\",\"homeLocation\":\"westus\"}}", + "isContentBase64": false + } + }, + "Register-AzEdgeZonesExtendedZone+[NoContext]+RegisterViaIdentity+$POST+https://management.azure.com/subscriptions/2027ff61-4414-4aa3-bd20-170c46f69b19/providers/Microsoft.EdgeZones/extendedZones/losangeles/register?api-version=2024-04-01-preview+2": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/subscriptions/2027ff61-4414-4aa3-bd20-170c46f69b19/providers/Microsoft.EdgeZones/extendedZones/losangeles/register?api-version=2024-04-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "6" ], + "x-ms-client-request-id": [ "66cb1198-e769-448c-81c5-76b6d15ae291" ], + "CommandName": [ "Register-AzEdgeZonesExtendedZone" ], + "FullCommandName": [ "Register-AzEdgeZonesExtendedZone_RegisterViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v5.4.0", "PSVersion/v7.4.1", "Az.EdgeZones/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=753642ccc7fea07fad427255f74d194b1e9d4b31b0a333225ba7b990debc476d;Path=/;HttpOnly;Secure;Domain=edgezonerp-canary.trafficmanager.net", "ARRAffinitySameSite=753642ccc7fea07fad427255f74d194b1e9d4b31b0a333225ba7b990debc476d;Path=/;HttpOnly;SameSite=None;Secure;Domain=edgezonerp-canary.trafficmanager.net" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-providerhub-traffic": [ "True" ], + "mise-correlation-id": [ "22d41f47-2987-4418-ae78-da264b2d3e77" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "36f91e56-08d5-4122-be37-09d9262459ed" ], + "x-ms-correlation-request-id": [ "1dbdc129-b431-44a2-82e0-f49d8fcc0a3d" ], + "x-ms-routing-request-id": [ "WESTUS2:20240325T225125Z:1dbdc129-b431-44a2-82e0-f49d8fcc0a3d" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: FC0405F9BB174EAC8DB510583CD81EDC Ref B: CO6AA3150217047 Ref C: 2024-03-25T22:51:24Z" ], + "Date": [ "Mon, 25 Mar 2024 22:51:24 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "488" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"provisioningState\":\"Succeeded\",\"registrationState\":\"Registered\",\"displayName\":\"Los Angeles\",\"regionalDisplayName\":\"(US) Los Angeles\",\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geography\":\"usa\",\"geographyGroup\":\"US\",\"longitude\":\"-118.23537\",\"latitude\":\"34.058414\",\"homeLocation\":\"westus\"},\"id\":\"/subscriptions/2027ff61-4414-4aa3-bd20-170c46f69b19/providers/Microsoft.EdgeZones/extendedZones/losangeles\",\"name\":\"losangeles\",\"type\":\"Microsoft.EdgeZones/extendedZones\"}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/test/Register-AzEdgeZonesExtendedZone.Tests.ps1 b/src/EdgeZones/EdgeZones.Autorest/test/Register-AzEdgeZonesExtendedZone.Tests.ps1 new file mode 100644 index 000000000000..c7515562d0ad --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/test/Register-AzEdgeZonesExtendedZone.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Register-AzEdgeZonesExtendedZone')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Register-AzEdgeZonesExtendedZone.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Register-AzEdgeZonesExtendedZone' { + It 'Register' + { + { + $config = Register-AzEdgeZonesExtendedZone -Name $env.extendedZoneName1 + $config.Name | Should -Be $env.extendedZoneName1 + } | Should -Not -Throw + } + + It 'RegisterViaIdentity' { + { + $config = Get-AzEdgeZonesExtendedZone -Name $env.extendedZoneName1 + $config = Register-AzEdgeZonesExtendedZone -InputObject $config + $config.Name | Should -Be $env.extendedZoneName1 + } | Should -Not -Throw + } +} diff --git a/src/EdgeZones/EdgeZones.Autorest/test/Unregister-AzEdgeZonesExtendedZone.Recording.json b/src/EdgeZones/EdgeZones.Autorest/test/Unregister-AzEdgeZonesExtendedZone.Recording.json new file mode 100644 index 000000000000..79749cc48d86 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/test/Unregister-AzEdgeZonesExtendedZone.Recording.json @@ -0,0 +1,143 @@ +{ + "Unregister-AzEdgeZonesExtendedZone+[NoContext]+Unregister+$POST+https://management.azure.com/subscriptions/2027ff61-4414-4aa3-bd20-170c46f69b19/providers/Microsoft.EdgeZones/extendedZones/microsoftrrezm1/unregister?api-version=2024-04-01-preview+1": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/subscriptions/2027ff61-4414-4aa3-bd20-170c46f69b19/providers/Microsoft.EdgeZones/extendedZones/microsoftrrezm1/unregister?api-version=2024-04-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "7" ], + "x-ms-client-request-id": [ "8ca5b58f-2c11-44dd-acc7-d50cdedec385" ], + "CommandName": [ "Unregister-AzEdgeZonesExtendedZone" ], + "FullCommandName": [ "Unregister-AzEdgeZonesExtendedZone_Unregister" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v5.4.0", "PSVersion/v7.4.1", "Az.EdgeZones/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=753642ccc7fea07fad427255f74d194b1e9d4b31b0a333225ba7b990debc476d;Path=/;HttpOnly;Secure;Domain=edgezonerp-canary.trafficmanager.net", "ARRAffinitySameSite=753642ccc7fea07fad427255f74d194b1e9d4b31b0a333225ba7b990debc476d;Path=/;HttpOnly;SameSite=None;Secure;Domain=edgezonerp-canary.trafficmanager.net" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-providerhub-traffic": [ "True" ], + "mise-correlation-id": [ "09a76bdc-07b3-494d-8360-7d5171c47dd7" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "edb3925c-b743-40a1-a767-d14d3d51613b" ], + "x-ms-correlation-request-id": [ "44d2f063-1ab7-4321-bfc3-071f0ba18738" ], + "x-ms-routing-request-id": [ "WESTUS2:20240325T225126Z:44d2f063-1ab7-4321-bfc3-071f0ba18738" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 6A4B5B3CE5774E51A6A9383420E53DDA Ref B: CO6AA3150217047 Ref C: 2024-03-25T22:51:25Z" ], + "Date": [ "Mon, 25 Mar 2024 22:51:26 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "512" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"provisioningState\":\"Succeeded\",\"registrationState\":\"NotRegistered\",\"displayName\":\"Los Angeles Test\",\"regionalDisplayName\":\"(US) Los Angeles Test\",\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geography\":\"usa\",\"geographyGroup\":\"US\",\"longitude\":\"-118.235374\",\"latitude\":\"34.058414\",\"homeLocation\":\"westus\"},\"id\":\"/subscriptions/2027ff61-4414-4aa3-bd20-170c46f69b19/providers/Microsoft.EdgeZones/extendedZones/microsoftrrezm1\",\"name\":\"microsoftrrezm1\",\"type\":\"Microsoft.EdgeZones/extendedZones\"}", + "isContentBase64": false + } + }, + "Unregister-AzEdgeZonesExtendedZone+[NoContext]+UnregisterViaIdentity+$GET+https://management.azure.com/subscriptions/2027ff61-4414-4aa3-bd20-170c46f69b19/providers/Microsoft.EdgeZones/extendedZones/microsoftrrezm1?api-version=2024-04-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/2027ff61-4414-4aa3-bd20-170c46f69b19/providers/Microsoft.EdgeZones/extendedZones/microsoftrrezm1?api-version=2024-04-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "8" ], + "x-ms-client-request-id": [ "4db047a5-fcaf-41f8-b8ff-5394df075321" ], + "CommandName": [ "Get-AzEdgeZonesExtendedZone" ], + "FullCommandName": [ "Get-AzEdgeZonesExtendedZone_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v5.4.0", "PSVersion/v7.4.1", "Az.EdgeZones/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=72f94d4b889d42a38551413966812bd53c7a651c102bf98da2dca68402e21287;Path=/;HttpOnly;Secure;Domain=edgezonerp-canary.trafficmanager.net", "ARRAffinitySameSite=72f94d4b889d42a38551413966812bd53c7a651c102bf98da2dca68402e21287;Path=/;HttpOnly;SameSite=None;Secure;Domain=edgezonerp-canary.trafficmanager.net" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-providerhub-traffic": [ "True" ], + "mise-correlation-id": [ "0ac7c755-8b5d-4e99-9815-148fef34ad59" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "c842a506-754d-453f-9b37-711403d7235f" ], + "x-ms-correlation-request-id": [ "51f2caa4-ee16-4f42-9324-e7e24f5d4146" ], + "x-ms-routing-request-id": [ "WESTUS2:20240325T225127Z:51f2caa4-ee16-4f42-9324-e7e24f5d4146" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: B5E8E1F527F34D2A8AB34213CFBEA2B4 Ref B: CO6AA3150217047 Ref C: 2024-03-25T22:51:26Z" ], + "Date": [ "Mon, 25 Mar 2024 22:51:26 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "512" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/2027ff61-4414-4aa3-bd20-170c46f69b19/providers/Microsoft.EdgeZones/extendedZones/microsoftrrezm1\",\"name\":\"microsoftrrezm1\",\"type\":\"Microsoft.EdgeZones/extendedZones\",\"properties\":{\"provisioningState\":\"Succeeded\",\"registrationState\":\"NotRegistered\",\"displayName\":\"Los Angeles Test\",\"regionalDisplayName\":\"(US) Los Angeles Test\",\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geography\":\"usa\",\"geographyGroup\":\"US\",\"longitude\":\"-118.235374\",\"latitude\":\"34.058414\",\"homeLocation\":\"westus\"}}", + "isContentBase64": false + } + }, + "Unregister-AzEdgeZonesExtendedZone+[NoContext]+UnregisterViaIdentity+$POST+https://management.azure.com/subscriptions/2027ff61-4414-4aa3-bd20-170c46f69b19/providers/Microsoft.EdgeZones/extendedZones/microsoftrrezm1/unregister?api-version=2024-04-01-preview+2": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/subscriptions/2027ff61-4414-4aa3-bd20-170c46f69b19/providers/Microsoft.EdgeZones/extendedZones/microsoftrrezm1/unregister?api-version=2024-04-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "9" ], + "x-ms-client-request-id": [ "f6c582f8-6596-4073-adee-501b6dc4ae18" ], + "CommandName": [ "Unregister-AzEdgeZonesExtendedZone" ], + "FullCommandName": [ "Unregister-AzEdgeZonesExtendedZone_UnregisterViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v5.4.0", "PSVersion/v7.4.1", "Az.EdgeZones/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=72f94d4b889d42a38551413966812bd53c7a651c102bf98da2dca68402e21287;Path=/;HttpOnly;Secure;Domain=edgezonerp-canary.trafficmanager.net", "ARRAffinitySameSite=72f94d4b889d42a38551413966812bd53c7a651c102bf98da2dca68402e21287;Path=/;HttpOnly;SameSite=None;Secure;Domain=edgezonerp-canary.trafficmanager.net" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-providerhub-traffic": [ "True" ], + "mise-correlation-id": [ "e94c46a6-2726-4b34-81c2-0f1762a3a31c" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "31ec2c62-bc43-40af-acd8-eb92405522f2" ], + "x-ms-correlation-request-id": [ "baaa3456-2dcc-46f6-851e-506376d7d701" ], + "x-ms-routing-request-id": [ "WESTUS2:20240325T225128Z:baaa3456-2dcc-46f6-851e-506376d7d701" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: CA819E73708D44D6AF0F58EA886434BF Ref B: CO6AA3150217047 Ref C: 2024-03-25T22:51:27Z" ], + "Date": [ "Mon, 25 Mar 2024 22:51:27 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "512" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"provisioningState\":\"Succeeded\",\"registrationState\":\"NotRegistered\",\"displayName\":\"Los Angeles Test\",\"regionalDisplayName\":\"(US) Los Angeles Test\",\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geography\":\"usa\",\"geographyGroup\":\"US\",\"longitude\":\"-118.235374\",\"latitude\":\"34.058414\",\"homeLocation\":\"westus\"},\"id\":\"/subscriptions/2027ff61-4414-4aa3-bd20-170c46f69b19/providers/Microsoft.EdgeZones/extendedZones/microsoftrrezm1\",\"name\":\"microsoftrrezm1\",\"type\":\"Microsoft.EdgeZones/extendedZones\"}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/test/Unregister-AzEdgeZonesExtendedZone.Tests.ps1 b/src/EdgeZones/EdgeZones.Autorest/test/Unregister-AzEdgeZonesExtendedZone.Tests.ps1 new file mode 100644 index 000000000000..1cd8596e0854 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/test/Unregister-AzEdgeZonesExtendedZone.Tests.ps1 @@ -0,0 +1,32 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Unregister-AzEdgeZonesExtendedZone')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Unregister-AzEdgeZonesExtendedZone.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Unregister-AzEdgeZonesExtendedZone' { + It 'Unregister' { + { + $config = Unregister-AzEdgeZonesExtendedZone -Name $env.extendedZoneName2 + $config.Name | Should -Be $env.extendedZoneName2 + } | Should -Not -Throw + } + + It 'UnregisterViaIdentity' { + { + $config = Get-AzEdgeZonesExtendedZone -Name $env.extendedZoneName2 + $config = Unregister-AzEdgeZonesExtendedZone -InputObject $config + $config.Name | Should -Be $env.extendedZoneName2 + } | Should -Not -Throw + } +} diff --git a/src/EdgeZones/EdgeZones.Autorest/test/env.json b/src/EdgeZones/EdgeZones.Autorest/test/env.json new file mode 100644 index 000000000000..c39a4eab4d50 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/test/env.json @@ -0,0 +1,6 @@ +{ + "extendedZoneName2": "microsoftrrezm1", + "extendedZoneName1": "losangeles", + "SubscriptionId": "2027ff61-4414-4aa3-bd20-170c46f69b19", + "Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47" +} diff --git a/src/EdgeZones/EdgeZones.Autorest/test/loadEnv.ps1 b/src/EdgeZones/EdgeZones.Autorest/test/loadEnv.ps1 new file mode 100644 index 000000000000..6a7c385c6b7d --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/test/loadEnv.ps1 @@ -0,0 +1,29 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- +$envFile = 'env.json' +if ($TestMode -eq 'live') { + $envFile = 'localEnv.json' +} + +if (Test-Path -Path (Join-Path $PSScriptRoot $envFile)) { + $envFilePath = Join-Path $PSScriptRoot $envFile +} else { + $envFilePath = Join-Path $PSScriptRoot '..\$envFile' +} +$env = @{} +if (Test-Path -Path $envFilePath) { + $env = Get-Content (Join-Path $PSScriptRoot $envFile) | ConvertFrom-Json + $PSDefaultParameterValues=@{"*:Tenant"=$env.Tenant} +} \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/test/utils.ps1 b/src/EdgeZones/EdgeZones.Autorest/test/utils.ps1 new file mode 100644 index 000000000000..9f05c789efdd --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/test/utils.ps1 @@ -0,0 +1,59 @@ +function RandomString([bool]$allChars, [int32]$len) { + if ($allChars) { + return -join ((33..126) | Get-Random -Count $len | % {[char]$_}) + } else { + return -join ((48..57) + (97..122) | Get-Random -Count $len | % {[char]$_}) + } +} +function Start-TestSleep { + [CmdletBinding(DefaultParameterSetName = 'SleepBySeconds')] + param( + [parameter(Mandatory = $true, Position = 0, ParameterSetName = 'SleepBySeconds')] + [ValidateRange(0.0, 2147483.0)] + [double] $Seconds, + + [parameter(Mandatory = $true, ParameterSetName = 'SleepByMilliseconds')] + [ValidateRange('NonNegative')] + [Alias('ms')] + [int] $Milliseconds + ) + + if ($TestMode -ne 'playback') { + switch ($PSCmdlet.ParameterSetName) { + 'SleepBySeconds' { + Start-Sleep -Seconds $Seconds + } + 'SleepByMilliseconds' { + Start-Sleep -Milliseconds $Milliseconds + } + } + } +} + +$env = @{} +if ($UsePreviousConfigForRecord) { + $previousEnv = Get-Content (Join-Path $PSScriptRoot 'env.json') | ConvertFrom-Json + $previousEnv.psobject.properties | Foreach-Object { $env[$_.Name] = $_.Value } +} +# Add script method called AddWithCache to $env, when useCache is set true, it will try to get the value from the $env first. +# example: $val = $env.AddWithCache('key', $val, $true) +$env | Add-Member -Type ScriptMethod -Value { param( [string]$key, [object]$val, [bool]$useCache) if ($this.Contains($key) -and $useCache) { return $this[$key] } else { $this[$key] = $val; return $val } } -Name 'AddWithCache' +function setupEnv() { + # Preload subscriptionId and tenant from context, which will be used in test + # as default. You could change them if needed. + $env.SubscriptionId = (Get-AzContext).Subscription.Id + $env.Tenant = (Get-AzContext).Tenant.Id + # For any resources you created for test, you should add it to $env here. + $env.extendedZoneName1 = 'losangeles' + $env.extendedZoneName2 = 'microsoftrrezm1' + + $envFile = 'env.json' + if ($TestMode -eq 'live') { + $envFile = 'localEnv.json' + } + set-content -Path (Join-Path $PSScriptRoot $envFile) -Value (ConvertTo-Json $env) +} +function cleanupEnv() { + # Clean resources you create for testing +} + diff --git a/src/EdgeZones/EdgeZones.Autorest/utils/Get-SubscriptionIdTestSafe.ps1 b/src/EdgeZones/EdgeZones.Autorest/utils/Get-SubscriptionIdTestSafe.ps1 new file mode 100644 index 000000000000..5319862d3372 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/utils/Get-SubscriptionIdTestSafe.ps1 @@ -0,0 +1,7 @@ +param() +if ($env:AzPSAutorestTestPlaybackMode) { + $loadEnvPath = Join-Path $PSScriptRoot '..' 'test' 'loadEnv.ps1' + . ($loadEnvPath) + return $env.SubscriptionId +} +return (Get-AzContext).Subscription.Id \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.Autorest/utils/Unprotect-SecureString.ps1 b/src/EdgeZones/EdgeZones.Autorest/utils/Unprotect-SecureString.ps1 new file mode 100644 index 000000000000..cb05b51a6220 --- /dev/null +++ b/src/EdgeZones/EdgeZones.Autorest/utils/Unprotect-SecureString.ps1 @@ -0,0 +1,16 @@ +#This script converts securestring to plaintext + +param( + [Parameter(Mandatory, ValueFromPipeline)] + [System.Security.SecureString] + ${SecureString} +) + +$ssPtr = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($SecureString) +try { + $plaintext = [System.Runtime.InteropServices.Marshal]::PtrToStringBSTR($ssPtr) +} finally { + [System.Runtime.InteropServices.Marshal]::ZeroFreeBSTR($ssPtr) +} + +return $plaintext \ No newline at end of file diff --git a/src/EdgeZones/EdgeZones.sln b/src/EdgeZones/EdgeZones.sln new file mode 100644 index 000000000000..8137b0b97e8e --- /dev/null +++ b/src/EdgeZones/EdgeZones.sln @@ -0,0 +1,74 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Accounts", "Accounts", "{143F7A23-33FD-41F7-88AC-0725AA317ECC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Accounts", "..\Accounts\Accounts\Accounts.csproj", "{595A32CE-0A72-401F-BF89-B7F3566A2D8A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AssemblyLoading", "..\Accounts\AssemblyLoading\AssemblyLoading.csproj", "{0260A6FB-65F3-4AFA-BE96-079B159FF2FA}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication", "..\Accounts\Authentication\Authentication.csproj", "{CE8F9F7C-F7FF-4E02-9772-0DEA98AD6136}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication.ResourceManager", "..\Accounts\Authentication.ResourceManager\Authentication.ResourceManager.csproj", "{3EAB4252-0600-48DD-B045-B67FC7564350}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AuthenticationAssemblyLoadContext", "..\Accounts\AuthenticationAssemblyLoadContext\AuthenticationAssemblyLoadContext.csproj", "{62BF0101-0054-4035-A18D-E2F56D207574}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authenticators", "..\Accounts\Authenticators\Authenticators.csproj", "{299485B3-8287-4357-8E86-57DF5CF1A5D8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EdgeZones", "EdgeZones\EdgeZones.csproj", "{CCF3DAA6-7F02-4B42-98E3-E4B2DCEC1910}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.EdgeZones", "EdgeZones.Autorest\Az.EdgeZones.csproj", "{CA1CD558-D322-48AC-9A2C-9CF84E83241A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {595A32CE-0A72-401F-BF89-B7F3566A2D8A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {595A32CE-0A72-401F-BF89-B7F3566A2D8A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {595A32CE-0A72-401F-BF89-B7F3566A2D8A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {595A32CE-0A72-401F-BF89-B7F3566A2D8A}.Release|Any CPU.Build.0 = Release|Any CPU + {0260A6FB-65F3-4AFA-BE96-079B159FF2FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0260A6FB-65F3-4AFA-BE96-079B159FF2FA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0260A6FB-65F3-4AFA-BE96-079B159FF2FA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0260A6FB-65F3-4AFA-BE96-079B159FF2FA}.Release|Any CPU.Build.0 = Release|Any CPU + {CE8F9F7C-F7FF-4E02-9772-0DEA98AD6136}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CE8F9F7C-F7FF-4E02-9772-0DEA98AD6136}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CE8F9F7C-F7FF-4E02-9772-0DEA98AD6136}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CE8F9F7C-F7FF-4E02-9772-0DEA98AD6136}.Release|Any CPU.Build.0 = Release|Any CPU + {3EAB4252-0600-48DD-B045-B67FC7564350}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3EAB4252-0600-48DD-B045-B67FC7564350}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3EAB4252-0600-48DD-B045-B67FC7564350}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3EAB4252-0600-48DD-B045-B67FC7564350}.Release|Any CPU.Build.0 = Release|Any CPU + {62BF0101-0054-4035-A18D-E2F56D207574}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {62BF0101-0054-4035-A18D-E2F56D207574}.Debug|Any CPU.Build.0 = Debug|Any CPU + {62BF0101-0054-4035-A18D-E2F56D207574}.Release|Any CPU.ActiveCfg = Release|Any CPU + {62BF0101-0054-4035-A18D-E2F56D207574}.Release|Any CPU.Build.0 = Release|Any CPU + {299485B3-8287-4357-8E86-57DF5CF1A5D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {299485B3-8287-4357-8E86-57DF5CF1A5D8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {299485B3-8287-4357-8E86-57DF5CF1A5D8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {299485B3-8287-4357-8E86-57DF5CF1A5D8}.Release|Any CPU.Build.0 = Release|Any CPU + {CCF3DAA6-7F02-4B42-98E3-E4B2DCEC1910}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CCF3DAA6-7F02-4B42-98E3-E4B2DCEC1910}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CCF3DAA6-7F02-4B42-98E3-E4B2DCEC1910}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CCF3DAA6-7F02-4B42-98E3-E4B2DCEC1910}.Release|Any CPU.Build.0 = Release|Any CPU + {CA1CD558-D322-48AC-9A2C-9CF84E83241A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CA1CD558-D322-48AC-9A2C-9CF84E83241A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CA1CD558-D322-48AC-9A2C-9CF84E83241A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CA1CD558-D322-48AC-9A2C-9CF84E83241A}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {595A32CE-0A72-401F-BF89-B7F3566A2D8A} = {143F7A23-33FD-41F7-88AC-0725AA317ECC} + {0260A6FB-65F3-4AFA-BE96-079B159FF2FA} = {143F7A23-33FD-41F7-88AC-0725AA317ECC} + {CE8F9F7C-F7FF-4E02-9772-0DEA98AD6136} = {143F7A23-33FD-41F7-88AC-0725AA317ECC} + {3EAB4252-0600-48DD-B045-B67FC7564350} = {143F7A23-33FD-41F7-88AC-0725AA317ECC} + {62BF0101-0054-4035-A18D-E2F56D207574} = {143F7A23-33FD-41F7-88AC-0725AA317ECC} + {299485B3-8287-4357-8E86-57DF5CF1A5D8} = {143F7A23-33FD-41F7-88AC-0725AA317ECC} + EndGlobalSection +EndGlobal diff --git a/src/EdgeZones/EdgeZones/Az.EdgeZones.psd1 b/src/EdgeZones/EdgeZones/Az.EdgeZones.psd1 new file mode 100644 index 000000000000..a6ccfce03ba5 --- /dev/null +++ b/src/EdgeZones/EdgeZones/Az.EdgeZones.psd1 @@ -0,0 +1,133 @@ +# +# Module manifest for module 'Az.EdgeZones' +# +# Generated by: Microsoft Corporation +# +# Generated on: 4/2/2024 +# + +@{ + +# Script module or binary module file associated with this manifest. +# RootModule = '' + +# Version number of this module. +ModuleVersion = '0.1.0' + +# Supported PSEditions +CompatiblePSEditions = 'Core', 'Desktop' + +# ID used to uniquely identify this module +GUID = 'accceef6-8113-453a-a31c-4f2ce57893d6' + +# Author of this module +Author = 'Microsoft Corporation' + +# Company or vendor of this module +CompanyName = 'Microsoft Corporation' + +# Copyright statement for this module +Copyright = 'Microsoft Corporation. All rights reserved.' + +# Description of the functionality provided by this module +Description = 'Microsoft Azure PowerShell: {ModuleNamePlaceHolder} cmdlets' + +# Minimum version of the PowerShell engine required by this module +PowerShellVersion = '5.1' + +# Name of the PowerShell host required by this module +# PowerShellHostName = '' + +# Minimum version of the PowerShell host required by this module +# PowerShellHostVersion = '' + +# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. +DotNetFrameworkVersion = '4.7.2' + +# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. +# ClrVersion = '' + +# Processor architecture (None, X86, Amd64) required by this module +# ProcessorArchitecture = '' + +# Modules that must be imported into the global environment prior to importing this module +RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.17.0'; }) + +# Assemblies that must be loaded prior to importing this module +RequiredAssemblies = 'EdgeZones.Autorest/bin/Az.EdgeZones.private.dll' + +# Script files (.ps1) that are run in the caller's environment prior to importing this module. +ScriptsToProcess = @() + +# Type files (.ps1xml) to be loaded when importing this module +TypesToProcess = @() + +# Format files (.ps1xml) to be loaded when importing this module +FormatsToProcess = 'EdgeZones.Autorest/Az.EdgeZones.format.ps1xml' + +# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess +NestedModules = @('EdgeZones.Autorest/Az.EdgeZones.psm1') + +# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. +FunctionsToExport = 'Get-AzEdgeZonesExtendedZone', 'Register-AzEdgeZonesExtendedZone', + 'Unregister-AzEdgeZonesExtendedZone' + +# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. +CmdletsToExport = @() + +# Variables to export from this module +# VariablesToExport = @() + +# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. +AliasesToExport = @() + +# DSC resources to export from this module +# DscResourcesToExport = @() + +# List of all modules packaged with this module +# ModuleList = @() + +# List of all files packaged with this module +# FileList = @() + +# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. +PrivateData = @{ + + PSData = @{ + + # Tags applied to this module. These help with module discovery in online galleries. + Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', '{ModuleNamePlaceHolder}' + + # A URL to the license for this module. + LicenseUri = 'https://aka.ms/azps-license' + + # A URL to the main website for this project. + ProjectUri = 'https://github.com/Azure/azure-powershell' + + # A URL to an icon representing this module. + # IconUri = '' + + # ReleaseNotes of this module + # ReleaseNotes = '' + + # Prerelease string of this module + # Prerelease = '' + + # Flag to indicate whether the module requires explicit user acceptance for install/update/save + # RequireLicenseAcceptance = $false + + # External dependent modules of this module + # ExternalModuleDependencies = @() + + } # End of PSData hashtable + +} # End of PrivateData hashtable + +# HelpInfo URI of this module +# HelpInfoURI = '' + +# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. +# DefaultCommandPrefix = '' + +} + diff --git a/src/EdgeZones/EdgeZones/ChangeLog.md b/src/EdgeZones/EdgeZones/ChangeLog.md new file mode 100644 index 000000000000..468c38ce6bd0 --- /dev/null +++ b/src/EdgeZones/EdgeZones/ChangeLog.md @@ -0,0 +1,24 @@ + +## Upcoming Release + +## Version 0.1.0 +* First preview release for module Az.EdgeZones + diff --git a/src/EdgeZones/EdgeZones/EdgeZones.csproj b/src/EdgeZones/EdgeZones/EdgeZones.csproj new file mode 100644 index 000000000000..bacb202abbc1 --- /dev/null +++ b/src/EdgeZones/EdgeZones/EdgeZones.csproj @@ -0,0 +1,28 @@ + + + + + + + EdgeZones + + + + netstandard2.0 + $(AzAssemblyPrefix)$(PsModuleName) + $(AzAssemblyPrefix)$(PsModuleName) + true + false + $(RepoArtifacts)$(Configuration)\Az.$(PsModuleName)\ + $(OutputPath) + + + + + + + + + + + diff --git a/src/EdgeZones/EdgeZones/Properties/AssemblyInfo.cs b/src/EdgeZones/EdgeZones/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..d7f59e9666a8 --- /dev/null +++ b/src/EdgeZones/EdgeZones/Properties/AssemblyInfo.cs @@ -0,0 +1,28 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Reflection; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("Microsoft Azure Powershell - EdgeZones")] +[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)] +[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)] +[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)] + +[assembly: ComVisible(false)] +[assembly: CLSCompliant(false)] +[assembly: Guid("18ebc64c-4c41-4cb0-a1c0-c65ad1539f8d")] +[assembly: AssemblyVersion("0.1.0")] +[assembly: AssemblyFileVersion("0.1.0")] diff --git a/src/EdgeZones/EdgeZones/help/Az.EdgeZones.md b/src/EdgeZones/EdgeZones/help/Az.EdgeZones.md new file mode 100644 index 000000000000..deb79bb6ad63 --- /dev/null +++ b/src/EdgeZones/EdgeZones/help/Az.EdgeZones.md @@ -0,0 +1,22 @@ +--- +Module Name: Az.EdgeZones +Module Guid: {{ Update Module Guid }} +Download Help Link: {{ Update Download Link }} +Help Version: {{ Update Help Version }} +Locale: {{ Update Locale }} +--- + +# Az.EdgeZones Module +## Description +{{ Fill in the Description }} + +## Az.EdgeZones Cmdlets +### [Get-AzEdgeZonesExtendedZone](Get-AzEdgeZonesExtendedZone.md) +Gets an Azure Extended Zone for a subscription + +### [Register-AzEdgeZonesExtendedZone](Register-AzEdgeZonesExtendedZone.md) +Registers a subscription for an Extended Zone + +### [Unregister-AzEdgeZonesExtendedZone](Unregister-AzEdgeZonesExtendedZone.md) +Unregisters a subscription for an Extended Zone + diff --git a/src/EdgeZones/EdgeZones/help/Get-AzEdgeZonesExtendedZone.md b/src/EdgeZones/EdgeZones/help/Get-AzEdgeZonesExtendedZone.md new file mode 100644 index 000000000000..bd27a2b238d8 --- /dev/null +++ b/src/EdgeZones/EdgeZones/help/Get-AzEdgeZonesExtendedZone.md @@ -0,0 +1,174 @@ +--- +external help file: Az.EdgeZones-help.xml +Module Name: Az.EdgeZones +online version: https://learn.microsoft.com/powershell/module/az.edgezones/get-azedgezonesextendedzone +schema: 2.0.0 +--- + +# Get-AzEdgeZonesExtendedZone + +## SYNOPSIS +Gets an Azure Extended Zone for a subscription + +## SYNTAX + +### List (Default) +``` +Get-AzEdgeZonesExtendedZone [-SubscriptionId ] [-DefaultProfile ] + [-ProgressAction ] [] +``` + +### Get +``` +Get-AzEdgeZonesExtendedZone -Name [-SubscriptionId ] [-DefaultProfile ] + [-ProgressAction ] [] +``` + +### GetViaIdentity +``` +Get-AzEdgeZonesExtendedZone -InputObject [-DefaultProfile ] + [-ProgressAction ] [] +``` + +## DESCRIPTION +Gets an Azure Extended Zone for a subscription + +## EXAMPLES + +### Example 1: List all Azure Extended Zones under a subscription +```powershell +Get-AzEdgeZonesExtendedZone +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +losangeles +``` + +This command list all Azure Extended Zones under a subscription + +### Example 2: Get an Azure Extended Zone by name +```powershell +Get-AzEdgeZonesExtendedZone -Name losangeles +``` + +```output +DisplayName : Los Angeles +Geography : usa +GeographyGroup : US +HomeLocation : westus +Id : /subscriptions/2027ff61-4414-4aa3-bd20-170c46f69b19/providers/Microsoft.EdgeZones/extendedZones/losangeles +Latitude : 34.058414 +Longitude : -118.23537 +Name : losangeles +ProvisioningState : Succeeded +RegionCategory : Other +RegionType : Physical +RegionalDisplayName : (US) Los Angeles +RegistrationState : NotRegistered +ResourceGroupName : +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.EdgeZones/extendedZones +``` + +This command gets an Azure Extended Zones by name + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +The name of the ExtendedZone + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: ExtendedZoneName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: List, Get +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone + +## NOTES + +## RELATED LINKS diff --git a/src/EdgeZones/EdgeZones/help/Register-AzEdgeZonesExtendedZone.md b/src/EdgeZones/EdgeZones/help/Register-AzEdgeZonesExtendedZone.md new file mode 100644 index 000000000000..ecb172d6d88f --- /dev/null +++ b/src/EdgeZones/EdgeZones/help/Register-AzEdgeZonesExtendedZone.md @@ -0,0 +1,186 @@ +--- +external help file: Az.EdgeZones-help.xml +Module Name: Az.EdgeZones +online version: https://learn.microsoft.com/powershell/module/az.edgezones/register-azedgezonesextendedzone +schema: 2.0.0 +--- + +# Register-AzEdgeZonesExtendedZone + +## SYNOPSIS +Registers a subscription for an Extended Zone + +## SYNTAX + +### Register (Default) +``` +Register-AzEdgeZonesExtendedZone -Name [-SubscriptionId ] [-DefaultProfile ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### RegisterViaIdentity +``` +Register-AzEdgeZonesExtendedZone -InputObject [-DefaultProfile ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Registers a subscription for an Extended Zone + +## EXAMPLES + +### Example 1: Register subscription for an Azure Extended Zone +```powershell +Register-AzEdgeZonesExtendedZone -Name losangeles +``` + +```output +DisplayName : Los Angeles +Geography : usa +GeographyGroup : US +HomeLocation : westus +Id : /subscriptions/2027ff61-4414-4aa3-bd20-170c46f69b19/providers/Microsoft.EdgeZones/extendedZones/losangeles +Latitude : 34.058414 +Longitude : -118.23537 +Name : losangeles +ProvisioningState : Succeeded +RegionCategory : Other +RegionType : Physical +RegionalDisplayName : (US) Los Angeles +RegistrationState : PendingRegister +ResourceGroupName : +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.EdgeZones/extendedZones +``` + +This command register subscription for an Azure Extended Zone + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentity +Parameter Sets: RegisterViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +The name of the ExtendedZone + +```yaml +Type: System.String +Parameter Sets: Register +Aliases: ExtendedZoneName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: Register +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone + +## NOTES + +## RELATED LINKS diff --git a/src/EdgeZones/EdgeZones/help/Unregister-AzEdgeZonesExtendedZone.md b/src/EdgeZones/EdgeZones/help/Unregister-AzEdgeZonesExtendedZone.md new file mode 100644 index 000000000000..c473e7bda613 --- /dev/null +++ b/src/EdgeZones/EdgeZones/help/Unregister-AzEdgeZonesExtendedZone.md @@ -0,0 +1,186 @@ +--- +external help file: Az.EdgeZones-help.xml +Module Name: Az.EdgeZones +online version: https://learn.microsoft.com/powershell/module/az.edgezones/unregister-azedgezonesextendedzone +schema: 2.0.0 +--- + +# Unregister-AzEdgeZonesExtendedZone + +## SYNOPSIS +Unregisters a subscription for an Extended Zone + +## SYNTAX + +### Unregister (Default) +``` +Unregister-AzEdgeZonesExtendedZone -Name [-SubscriptionId ] [-DefaultProfile ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### UnregisterViaIdentity +``` +Unregister-AzEdgeZonesExtendedZone -InputObject [-DefaultProfile ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Unregisters a subscription for an Extended Zone + +## EXAMPLES + +### Example 1: Register subscription for an Azure Extended Zone +```powershell +Unregister-AzEdgeZonesExtendedZone -Name losangeles +``` + +```output +DisplayName : Los Angeles +Geography : usa +GeographyGroup : US +HomeLocation : westus +Id : /subscriptions/2027ff61-4414-4aa3-bd20-170c46f69b19/providers/Microsoft.EdgeZones/extendedZones/losangeles +Latitude : 34.058414 +Longitude : -118.23537 +Name : losangeles +ProvisioningState : Succeeded +RegionCategory : Other +RegionType : Physical +RegionalDisplayName : (US) Los Angeles +RegistrationState : PendingUnregister +ResourceGroupName : +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.EdgeZones/extendedZones +``` + +This command unregister subscription for an Azure Extended Zone + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentity +Parameter Sets: UnregisterViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +The name of the ExtendedZone + +```yaml +Type: System.String +Parameter Sets: Unregister +Aliases: ExtendedZoneName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: Unregister +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IEdgeZonesIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.EdgeZones.Models.IExtendedZone + +## NOTES + +## RELATED LINKS diff --git a/tools/CreateMappings_rules.json b/tools/CreateMappings_rules.json index b35600e9d3dd..2e44ea9c4ef0 100644 --- a/tools/CreateMappings_rules.json +++ b/tools/CreateMappings_rules.json @@ -1,875 +1,879 @@ [ - { - "alias": "Container Apps", - "module": "App" - }, - { - "alias": "Dashboard", - "module": "Dashboard", - "group": "Grafana" - }, - { - "alias": "Confidential Ledger", - "module": "ConfidentialLedger" - }, - { - "regex": "ApiManagement", - "alias": "API Management" - }, - { - "module": "MachineLearning", - "group": "ML Studio (Classic)", - "alias": "ML Studio (Classic)" - }, - { - "module": "MachineLearningServices", - "alias": "Machine Learning" - }, - { - "regex": "ImageBuilder", - "alias": "Image Builder" - }, - { - "regex": "VMware", - "alias": "VMware" - }, - { - "module": "GuestConfiguration", - "alias": "Guest Configuration" - }, - { - "regex": "Snapshot", - "group": "Virtual Machines", - "alias": "VM Snapshots" - }, - { - "module": "Orbital", - "alias": "Orbital" - }, - { - "regex": "FluidRelay", - "alias": "Fluid Relay" - }, - { - "regex": "Image", - "group": "Virtual Machines", - "alias": "VM Images" - }, - { - "regex": "Vmss", - "group": "Virtual Machines", - "alias": "VM Scale Sets" - }, - { - "regex": "Vhd", - "group": "Virtual Machines", - "alias": "VM VHDs" - }, - { - "regex": "Disk", - "group": "Virtual Machines", - "alias": "VM Disks" - }, - { - "regex": "ContainerService", - "group": "Virtual Machines", - "alias": "Container Service" - }, - { - "regex": "VM.*Extension", - "group": "Virtual Machines", - "alias": "VM Extensions" - }, - { - "regex": "Compute", - "group": "Virtual Machines", - "alias": "Virtual Machines" - }, - { - "regex": "VM", - "group": "Virtual Machines", - "alias": "Virtual Machines" - }, - { - "regex": "ApplicationGateway", - "group": "Network", - "alias": "Application Gateway" - }, - { - "regex": "ExpressRoute", - "group": "Network", - "alias": "ExpressRoute" - }, - { - "regex": "LoadBalancer", - "group": "Network", - "alias": "Load Balancer" - }, - { - "regex": "VirtualNetwork", - "group": "Network", - "alias": "Virtual Network" - }, - { - "regex": "Vpn", - "group": "Network", - "alias": "VPN" - }, - { - "regex": "Route", - "group": "Network", - "alias": "Route" - }, - { - "group": "DnsResolver", - "alias": "DnsResolver" - }, - { - "regex": "Dns", - "group": "Network", - "alias": "DNS" - }, - { - "regex": "NetworkWatcher", - "group": "Network", - "alias": "Network Watcher" - }, - { - "regex": "Network", - "group": "Network", - "alias": "Networking" - }, - { - "module": "Nginx", - "alias": "Nginx" - }, - { - "regex": "FrontDoor", - "alias": "Front Door" - }, - { - "regex": "AppService", - "group": "App Service", - "alias": "App Service" - }, - { - "regex": "Websites", - "group": "App Service", - "alias": "App Service" - }, - { - "regex": "WebApp", - "group": "App Service", - "alias": "App Service" - }, - { - "regex": "ACS", - "alias": "Azure Stack Storage" - }, - { - "regex": "AzureStackAdmin", - "alias": "Azure Stack Admin" - }, - { - "regex": "AzureStackStorage", - "alias": "Azure Stack Storage" - }, - { - "regex": "DataLakeAnalytics", - "group": "Data Lake", - "alias": "Data Lake Analytics" - }, - { - "regex": "DataLakeStore", - "group": "Data Lake", - "alias": "Data Lake Store" - }, - { - "regex": "DataLake", - "group": "Data Lake", - "alias": "Data Lake" - }, - { - "regex": "Dtl", - "group": "DevTest Labs", - "alias": "DevTest Labs" - }, - { - "regex": "DevTestLabs", - "group": "DevTest Labs", - "alias": "DevTest Labs" - }, - { - "regex": "DataFactory", - "group": "Data Factories", - "alias": "Data Factories" - }, - { - "regex": "DataFactories", - "group": "Data Factories", - "alias": "Data Factories" - }, - { - "regex": "StorageSync", - "alias": "StorageSync" - }, - { - "regex": "Storage", - "alias": "Storage" - }, - { - "regex": "Synapse", - "alias": "Synapse Analytics" - }, - { - "regex": "Relay", - "alias": "Relay" - }, - { - "regex": "ServiceBus", - "alias": "Service Bus" - }, - { - "regex": "ContainerRegistry", - "alias": "Container Registry" - }, - { - "regex": "ServiceFabric", - "alias": "Service Fabric" - }, - { - "regex": "KeyVault", - "alias": "Key Vault" - }, - { - "regex": "IotCentral", - "alias": "IotCentral" - }, - { - "regex": "IotHub", - "alias": "IotHub" - }, - { - "regex": "DeviceProvisioningServices", - "alias": "DPS" - }, - { - "regex": "Batch", - "alias": "Batch" - }, - { - "regex": "AnalysisServices", - "alias": "Analysis Services" - }, - { - "regex": "Automation", - "alias": "Automation" - }, - { - "regex": "RecoveryServices", - "alias": "Recovery Services" - }, - { - "regex": "Backup", - "alias": "Backup" - }, - { - "regex": "Cdn", - "alias": "CDN" - }, - { - "regex": "CognitiveService", - "alias": "Cognitive Services" - }, - { - "regex": "AvailabilitySet", - "alias": "Availability Sets" - }, - { - "regex": "EventHub", - "alias": "Event Hub" - }, - { - "regex": "HDInsight", - "alias": "HDInsight" - }, - { - "regex": "HPCCache", - "alias": "HPCCache" - }, - { - "regex": "LogicApp", - "alias": "Logic Apps" - }, - { - "regex": "NotificationHubs", - "alias": "Notification Hubs" - }, - { - "regex": "OperationalInsights", - "alias": "Operational Insights" - }, - { - "regex": "PolicyInsights", - "alias": "Policy Insights" - }, - { - "regex": "PowerBIEmbedded", - "group": "Power BI", - "alias": "Power BI Embedded Capacity" - }, - { - "regex": "PowerBIWorkspace", - "group": "Power BI", - "alias": "Power BI Workspace Collections" - }, - { - "regex": "RedisCache", - "alias": "Redis Cache" - }, - { - "regex": "Scheduler", - "alias": "Scheduler" - }, - { - "regex": "StreamAnalytics", - "alias": "Stream Analytics" - }, - { - "regex": "TrafficManager", - "alias": "Traffic Manager" - }, - { - "module": "MarketplaceOrdering", - "alias": "Marketplace Ordering" - }, - { - "regex": "Marketplace", - "alias": "Marketplace" - }, - { - "regex": "DataMigration", - "alias": "Data Migration" - }, - { - "regex": "Consumption", - "group": "Billing", - "alias": "Billing" - }, - { - "regex": "Billing", - "group": "Billing", - "alias": "Billing" - }, - { - "regex": "Media", - "alias": "Media Services" - }, - { - "regex": "UsageAggregates", - "alias": "Usage Aggregates" - }, - { - "regex": "EventGrid", - "alias": "Event Grid" - }, - { - "regex": "Container", - "alias": "Container Instances" - }, - { - "regex": "Tags", - "alias": "Tags" - }, - { - "regex": "Accounts", - "alias": "Accounts" - }, - { - "regex": "Reservations", - "alias": "Reservations" - }, - { - "regex": "Subscription", - "alias": "Subscription" - }, - { - "regex": "Policy", - "group": "Resources", - "alias": "Policy" - }, - { - "regex": "ADDomainService", - "alias": "Active Directory Domain Service" - }, - { - "regex": "AD", - "group": "Resources", - "alias": "Active Directory" - }, - { - "regex": "ManagedApplication", - "group": "Resources", - "alias": "Managed Applications" - }, - { - "regex": "Resources", - "group": "Resources", - "alias": "Resources" - }, - { - "regex": "Maps", - "alias": "Maps" - }, - { - "regex": "Aks", - "group": "Aks", - "alias": "Kubernetes Service" - }, - { - "regex": "ManagedServiceIdentity", - "group": "Managed Service Identity", - "alias": "Managed Service Identity" - }, - { - "regex": "ManagementPartner", - "alias": "Management Partner" - }, - { - "regex": "DevSpaces", - "group": "DevSpaces", - "alias": "DevSpaces" - }, - { - "module": "SignalR", - "regex": "SignalR", - "alias": "SignalR" - }, - { - "module": "SignalR", - "regex": "WebPubSub", - "alias": "Web PubSub" - }, - { - "regex": "AzSearch", - "alias": "Search" - }, - { - "regex": "ResourceGraph", - "alias": "ResourceGraph" - }, - { - "regex": "Sentinel", - "alias": "Sentinel" - }, - { - "regex": "Security", - "alias": "Security" - }, - { - "regex": "Kusto", - "alias": "Kusto" - }, - { - "module": "Advisor", - "alias": "Advisor" - }, - { - "regex": "MixedReality", - "group": "Mixed Reality", - "alias": "Mixed Reality" - }, - { - "regex": "SpatialAnchors", - "group": "Mixed Reality", - "alias": "Mixed Reality" - }, - { - "regex": "Blueprint", - "alias": "Blueprint" - }, - { - "regex": "Peering", - "group": "Peering", - "alias": "Peering" - }, - { - "regex": "PeerAsn", - "group": "Peering", - "alias": "Peer Asn" - }, - { - "regex": "NetAppFiles", - "alias": "NetApp Files" - }, - { - "regex": "Attestation", - "alias": "Attestation" - }, - { - "regex": "ManagedServices", - "group": "Managed Services", - "alias": "Managed Services" - }, - { - "regex": "DataShare", - "group": "Data Share", - "alias": "Data Share" - }, - { - "regex": "DataBoxEdge", - "alias": "Data Box Edge" - }, - { - "regex": "DataBox", - "alias": "DataBox" - }, - { - "regex": "AlertsManagement", - "alias": "Alerts Management" - }, - { - "regex": "HealthcareApis", - "alias": "HealthcareApis Service" - }, - { - "regex": "Maintenance", - "alias": "Maintenance" - }, - { - "regex": "CosmosDB", - "alias": "Cosmos DB" - }, - { - "regex": "Support", - "alias": "Support" - }, - { - "regex": "Databricks", - "alias": "Databricks" - }, - { - "regex": "MariaDb", - "alias": "Database for MariaDB" - }, - { - "regex": "TimeSeriesInsights", - "alias": "Time Series Insights" - }, - { - "regex": "MySql", - "alias": "Database for MySQL" - }, - { - "regex": "Portal", - "alias": "Portal" - }, - { - "regex": "PostgreSql", - "alias": "Database for PostgreSQL" - }, - { - "module": "SqlVirtualMachine", - "alias": "Sql VM" - }, - { - "module": "Sql", - "alias": "SQL" - }, - { - "regex": "ImportExport", - "alias": "ImportExport" - }, - { - "regex": "Functions", - "alias": "Functions" - }, - { - "regex": "DesktopVirtualization", - "alias": "DesktopVirtualization" - }, - { - "regex": "AppConfiguration", - "alias": "App Configuration" - }, - { - "regex": "HanaOnAzure", - "alias": "SAP HANA on Azure" - }, - { - "regex": "CustomProviders", - "alias": "Custom Resource Providers" - }, - { - "module": "MonitoringSolutions", - "alias": "Monitoring Solutions" - }, - { - "regex": "ApplicationInsights", - "alias": "Application Insights" - }, - { - "regex": "Monitor", - "alias": "Monitor" - }, - { - "regex": "ConnectedKubernetes", - "alias": "Connected Kubernetes" - }, - { - "regex": "KubernetesConfiguration", - "alias": "Kubernetes Configuration" - }, - { - "regex": "StackHCI", - "alias": "Stack HCI" - }, - { - "regex": "SpringCloud", - "alias": "Spring Cloud" - }, - { - "regex": "ResourceMover", - "alias": "Resource Mover" - }, - { - "regex": "ConnectedMachine", - "alias": "Connected Machine" - }, - { - "regex": "DedicatedHsm", - "alias": "Dedicated HSM" - }, - { - "regex": "Migrate", - "alias": "Migrate" - }, - { - "regex": "DigitalTwins", - "alias": "Digital Twins" - }, - { - "regex": "CloudService", - "alias": "Cloud Services" - }, - { - "regex": "WindowsIotServices", - "alias": "WindowsIotServices" - }, - { - "regex": "CostManagement", - "alias": "Cost Management" - }, - { - "regex": "Communication", - "alias": "Communication Services" - }, - { - "regex": "RedisEnterpriseCache", - "alias": "Redis Enterprise" - }, - { - "regex": "BotService", - "alias": "Bot Services" - }, - { - "regex": "HealthBot", - "alias": "Health Bot" - }, - { - "regex": "Confluent", - "alias": "Confluent" - }, - { - "regex": "DataProtection", - "alias": "Data Protection" - }, - { - "alias": "ProviderHub", - "regex": "ProviderHub" - }, - { - "alias": "Security Insights", - "module": "SecurityInsights" - }, - { - "alias": "Private DNS", - "module": "PrivateDns" - }, - { - "alias": "Quota", - "module": "Quota" - }, - { - "regex": "ContainerInstance", - "alias": "ContainerInstance" - }, - { - "alias": "DiskPool", - "module": "DiskPool" - }, - { - "alias": "Datadog", - "regex": "Datadog" - }, - { - "regex": "ChangeAnalysis", - "alias": "ChangeAnalysis" - }, - { - "alias": "Purview", - "regex": "Purview" - }, - { - "alias": "Elastic", - "regex": "Elastic" - }, - { - "regex": "Logz", - "alias": "Logz" - }, - { - "alias": "DiskPool", - "regex": "DiskPool" - }, - { - "alias": "CustomLocation", - "regex": "CustomLocation" - }, - { - "alias": "EdgeOrder", - "module": "EdgeOrder" - }, - { - "alias": "Lab Services", - "module": "LabServices" - }, - { - "alias": "BareMetal", - "module": "BareMetal" - }, - { - "alias": "ConnectedNetwork", - "module": "ConnectedNetwork" - }, - { - "alias": "ServiceLinker", - "module": "ServiceLinker" - }, - { - "module": "StorageMover", - "alias": "Storage Mover" - }, - { - "alias": "NetworkFunction", - "module": "NetworkFunction" - }, - { - "module": "DynatraceObservability", - "alias": "DynatraceObservability" - }, - { - "module": "DeviceUpdate", - "alias": "DeviceUpdate" - }, - { - "alias": "ElasticSan", - "module": "ElasticSan" - }, - { - "alias": "SSH", - "module": "Ssh" - }, - { - "alias": "Automanage", - "module": "Automanage" - }, - { - "alias": "VoiceServices", - "module": "VoiceServices" - }, - { - "module": "BillingBenefits", - "alias": "BillingBenefits" - }, - { - "module": "LoadTesting", - "alias": "LoadTesting" - }, - { - "alias": "MobileNetwork", - "module": "MobileNetwork" - }, - { - "module": "ArcResourceBridge", - "alias": "ArcResourceBridge" - }, - { - "module": "Workloads", - "alias": "Workloads" - }, - { - "alias": "SelfHelp", - "module": "SelfHelp" - }, - { - "module": "Qumulo", - "alias": "Qumulo" - }, - { - "module": "StorageCache", - "alias": "StorageCache" - }, - { - "module": "NewRelic", - "alias": "NewRelic" - }, - { - "module": "Quantum", - "alias": "Quantum" - }, - { - "module": "GraphServices", - "alias": "GraphServices" - }, - { - "module": "Alb", - "alias": "Alb" - }, - { - "module": "PaloAltoNetworks", - "alias": "PaloAltoNetworks" - }, - { - "module": "DevCenter", - "alias": "DevCenter" - }, - { - "alias": "NetworkCloud", - "module": "NetworkCloud" - }, - { - "alias": "HdInsightOnAks", - "module": "HdInsightOnAks" - }, - { - "module": "NetworkAnalytics", - "alias": "NetworkAnalytics" - }, - { - "module": "Fleet", - "alias": "Fleet" - }, - { - "module": "ManagedNetworkFabric", - "alias": "Managed Network Fabric" - }, - { - "module": "CodeSigning", - "alias": "Code Signing" - }, - { - "module": "FirmwareAnalysis", - "alias": "FirmwareAnalysis" - } + { + "alias": "Container Apps", + "module": "App" + }, + { + "alias": "Dashboard", + "module": "Dashboard", + "group": "Grafana" + }, + { + "alias": "Confidential Ledger", + "module": "ConfidentialLedger" + }, + { + "regex": "ApiManagement", + "alias": "API Management" + }, + { + "module": "MachineLearning", + "group": "ML Studio (Classic)", + "alias": "ML Studio (Classic)" + }, + { + "module": "MachineLearningServices", + "alias": "Machine Learning" + }, + { + "regex": "ImageBuilder", + "alias": "Image Builder" + }, + { + "regex": "VMware", + "alias": "VMware" + }, + { + "module": "GuestConfiguration", + "alias": "Guest Configuration" + }, + { + "regex": "Snapshot", + "group": "Virtual Machines", + "alias": "VM Snapshots" + }, + { + "module": "Orbital", + "alias": "Orbital" + }, + { + "regex": "FluidRelay", + "alias": "Fluid Relay" + }, + { + "regex": "Image", + "group": "Virtual Machines", + "alias": "VM Images" + }, + { + "regex": "Vmss", + "group": "Virtual Machines", + "alias": "VM Scale Sets" + }, + { + "regex": "Vhd", + "group": "Virtual Machines", + "alias": "VM VHDs" + }, + { + "regex": "Disk", + "group": "Virtual Machines", + "alias": "VM Disks" + }, + { + "regex": "ContainerService", + "group": "Virtual Machines", + "alias": "Container Service" + }, + { + "regex": "VM.*Extension", + "group": "Virtual Machines", + "alias": "VM Extensions" + }, + { + "regex": "Compute", + "group": "Virtual Machines", + "alias": "Virtual Machines" + }, + { + "regex": "VM", + "group": "Virtual Machines", + "alias": "Virtual Machines" + }, + { + "regex": "ApplicationGateway", + "group": "Network", + "alias": "Application Gateway" + }, + { + "regex": "ExpressRoute", + "group": "Network", + "alias": "ExpressRoute" + }, + { + "regex": "LoadBalancer", + "group": "Network", + "alias": "Load Balancer" + }, + { + "regex": "VirtualNetwork", + "group": "Network", + "alias": "Virtual Network" + }, + { + "regex": "Vpn", + "group": "Network", + "alias": "VPN" + }, + { + "regex": "Route", + "group": "Network", + "alias": "Route" + }, + { + "group": "DnsResolver", + "alias": "DnsResolver" + }, + { + "regex": "Dns", + "group": "Network", + "alias": "DNS" + }, + { + "regex": "NetworkWatcher", + "group": "Network", + "alias": "Network Watcher" + }, + { + "regex": "Network", + "group": "Network", + "alias": "Networking" + }, + { + "module": "Nginx", + "alias": "Nginx" + }, + { + "regex": "FrontDoor", + "alias": "Front Door" + }, + { + "regex": "AppService", + "group": "App Service", + "alias": "App Service" + }, + { + "regex": "Websites", + "group": "App Service", + "alias": "App Service" + }, + { + "regex": "WebApp", + "group": "App Service", + "alias": "App Service" + }, + { + "regex": "ACS", + "alias": "Azure Stack Storage" + }, + { + "regex": "AzureStackAdmin", + "alias": "Azure Stack Admin" + }, + { + "regex": "AzureStackStorage", + "alias": "Azure Stack Storage" + }, + { + "regex": "DataLakeAnalytics", + "group": "Data Lake", + "alias": "Data Lake Analytics" + }, + { + "regex": "DataLakeStore", + "group": "Data Lake", + "alias": "Data Lake Store" + }, + { + "regex": "DataLake", + "group": "Data Lake", + "alias": "Data Lake" + }, + { + "regex": "Dtl", + "group": "DevTest Labs", + "alias": "DevTest Labs" + }, + { + "regex": "DevTestLabs", + "group": "DevTest Labs", + "alias": "DevTest Labs" + }, + { + "regex": "DataFactory", + "group": "Data Factories", + "alias": "Data Factories" + }, + { + "regex": "DataFactories", + "group": "Data Factories", + "alias": "Data Factories" + }, + { + "regex": "StorageSync", + "alias": "StorageSync" + }, + { + "regex": "Storage", + "alias": "Storage" + }, + { + "regex": "Synapse", + "alias": "Synapse Analytics" + }, + { + "regex": "Relay", + "alias": "Relay" + }, + { + "regex": "ServiceBus", + "alias": "Service Bus" + }, + { + "regex": "ContainerRegistry", + "alias": "Container Registry" + }, + { + "regex": "ServiceFabric", + "alias": "Service Fabric" + }, + { + "regex": "KeyVault", + "alias": "Key Vault" + }, + { + "regex": "IotCentral", + "alias": "IotCentral" + }, + { + "regex": "IotHub", + "alias": "IotHub" + }, + { + "regex": "DeviceProvisioningServices", + "alias": "DPS" + }, + { + "regex": "Batch", + "alias": "Batch" + }, + { + "regex": "AnalysisServices", + "alias": "Analysis Services" + }, + { + "regex": "Automation", + "alias": "Automation" + }, + { + "regex": "RecoveryServices", + "alias": "Recovery Services" + }, + { + "regex": "Backup", + "alias": "Backup" + }, + { + "regex": "Cdn", + "alias": "CDN" + }, + { + "regex": "CognitiveService", + "alias": "Cognitive Services" + }, + { + "regex": "AvailabilitySet", + "alias": "Availability Sets" + }, + { + "regex": "EventHub", + "alias": "Event Hub" + }, + { + "regex": "HDInsight", + "alias": "HDInsight" + }, + { + "regex": "HPCCache", + "alias": "HPCCache" + }, + { + "regex": "LogicApp", + "alias": "Logic Apps" + }, + { + "regex": "NotificationHubs", + "alias": "Notification Hubs" + }, + { + "regex": "OperationalInsights", + "alias": "Operational Insights" + }, + { + "regex": "PolicyInsights", + "alias": "Policy Insights" + }, + { + "regex": "PowerBIEmbedded", + "group": "Power BI", + "alias": "Power BI Embedded Capacity" + }, + { + "regex": "PowerBIWorkspace", + "group": "Power BI", + "alias": "Power BI Workspace Collections" + }, + { + "regex": "RedisCache", + "alias": "Redis Cache" + }, + { + "regex": "Scheduler", + "alias": "Scheduler" + }, + { + "regex": "StreamAnalytics", + "alias": "Stream Analytics" + }, + { + "regex": "TrafficManager", + "alias": "Traffic Manager" + }, + { + "module": "MarketplaceOrdering", + "alias": "Marketplace Ordering" + }, + { + "regex": "Marketplace", + "alias": "Marketplace" + }, + { + "regex": "DataMigration", + "alias": "Data Migration" + }, + { + "regex": "Consumption", + "group": "Billing", + "alias": "Billing" + }, + { + "regex": "Billing", + "group": "Billing", + "alias": "Billing" + }, + { + "regex": "Media", + "alias": "Media Services" + }, + { + "regex": "UsageAggregates", + "alias": "Usage Aggregates" + }, + { + "regex": "EventGrid", + "alias": "Event Grid" + }, + { + "regex": "Container", + "alias": "Container Instances" + }, + { + "regex": "Tags", + "alias": "Tags" + }, + { + "regex": "Accounts", + "alias": "Accounts" + }, + { + "regex": "Reservations", + "alias": "Reservations" + }, + { + "regex": "Subscription", + "alias": "Subscription" + }, + { + "regex": "Policy", + "group": "Resources", + "alias": "Policy" + }, + { + "regex": "ADDomainService", + "alias": "Active Directory Domain Service" + }, + { + "regex": "AD", + "group": "Resources", + "alias": "Active Directory" + }, + { + "regex": "ManagedApplication", + "group": "Resources", + "alias": "Managed Applications" + }, + { + "regex": "Resources", + "group": "Resources", + "alias": "Resources" + }, + { + "regex": "Maps", + "alias": "Maps" + }, + { + "regex": "Aks", + "group": "Aks", + "alias": "Kubernetes Service" + }, + { + "regex": "ManagedServiceIdentity", + "group": "Managed Service Identity", + "alias": "Managed Service Identity" + }, + { + "regex": "ManagementPartner", + "alias": "Management Partner" + }, + { + "regex": "DevSpaces", + "group": "DevSpaces", + "alias": "DevSpaces" + }, + { + "module": "SignalR", + "regex": "SignalR", + "alias": "SignalR" + }, + { + "module": "SignalR", + "regex": "WebPubSub", + "alias": "Web PubSub" + }, + { + "regex": "AzSearch", + "alias": "Search" + }, + { + "regex": "ResourceGraph", + "alias": "ResourceGraph" + }, + { + "regex": "Sentinel", + "alias": "Sentinel" + }, + { + "regex": "Security", + "alias": "Security" + }, + { + "regex": "Kusto", + "alias": "Kusto" + }, + { + "module": "Advisor", + "alias": "Advisor" + }, + { + "regex": "MixedReality", + "group": "Mixed Reality", + "alias": "Mixed Reality" + }, + { + "regex": "SpatialAnchors", + "group": "Mixed Reality", + "alias": "Mixed Reality" + }, + { + "regex": "Blueprint", + "alias": "Blueprint" + }, + { + "regex": "Peering", + "group": "Peering", + "alias": "Peering" + }, + { + "regex": "PeerAsn", + "group": "Peering", + "alias": "Peer Asn" + }, + { + "regex": "NetAppFiles", + "alias": "NetApp Files" + }, + { + "regex": "Attestation", + "alias": "Attestation" + }, + { + "regex": "ManagedServices", + "group": "Managed Services", + "alias": "Managed Services" + }, + { + "regex": "DataShare", + "group": "Data Share", + "alias": "Data Share" + }, + { + "regex": "DataBoxEdge", + "alias": "Data Box Edge" + }, + { + "regex": "DataBox", + "alias": "DataBox" + }, + { + "regex": "AlertsManagement", + "alias": "Alerts Management" + }, + { + "regex": "HealthcareApis", + "alias": "HealthcareApis Service" + }, + { + "regex": "Maintenance", + "alias": "Maintenance" + }, + { + "regex": "CosmosDB", + "alias": "Cosmos DB" + }, + { + "regex": "Support", + "alias": "Support" + }, + { + "regex": "Databricks", + "alias": "Databricks" + }, + { + "regex": "MariaDb", + "alias": "Database for MariaDB" + }, + { + "regex": "TimeSeriesInsights", + "alias": "Time Series Insights" + }, + { + "regex": "MySql", + "alias": "Database for MySQL" + }, + { + "regex": "Portal", + "alias": "Portal" + }, + { + "regex": "PostgreSql", + "alias": "Database for PostgreSQL" + }, + { + "module": "SqlVirtualMachine", + "alias": "Sql VM" + }, + { + "module": "Sql", + "alias": "SQL" + }, + { + "regex": "ImportExport", + "alias": "ImportExport" + }, + { + "regex": "Functions", + "alias": "Functions" + }, + { + "regex": "DesktopVirtualization", + "alias": "DesktopVirtualization" + }, + { + "regex": "AppConfiguration", + "alias": "App Configuration" + }, + { + "regex": "HanaOnAzure", + "alias": "SAP HANA on Azure" + }, + { + "regex": "CustomProviders", + "alias": "Custom Resource Providers" + }, + { + "module": "MonitoringSolutions", + "alias": "Monitoring Solutions" + }, + { + "regex": "ApplicationInsights", + "alias": "Application Insights" + }, + { + "regex": "Monitor", + "alias": "Monitor" + }, + { + "regex": "ConnectedKubernetes", + "alias": "Connected Kubernetes" + }, + { + "regex": "KubernetesConfiguration", + "alias": "Kubernetes Configuration" + }, + { + "regex": "StackHCI", + "alias": "Stack HCI" + }, + { + "regex": "SpringCloud", + "alias": "Spring Cloud" + }, + { + "regex": "ResourceMover", + "alias": "Resource Mover" + }, + { + "regex": "ConnectedMachine", + "alias": "Connected Machine" + }, + { + "regex": "DedicatedHsm", + "alias": "Dedicated HSM" + }, + { + "regex": "Migrate", + "alias": "Migrate" + }, + { + "regex": "DigitalTwins", + "alias": "Digital Twins" + }, + { + "regex": "CloudService", + "alias": "Cloud Services" + }, + { + "regex": "WindowsIotServices", + "alias": "WindowsIotServices" + }, + { + "regex": "CostManagement", + "alias": "Cost Management" + }, + { + "regex": "Communication", + "alias": "Communication Services" + }, + { + "regex": "RedisEnterpriseCache", + "alias": "Redis Enterprise" + }, + { + "regex": "BotService", + "alias": "Bot Services" + }, + { + "regex": "HealthBot", + "alias": "Health Bot" + }, + { + "regex": "Confluent", + "alias": "Confluent" + }, + { + "regex": "DataProtection", + "alias": "Data Protection" + }, + { + "alias": "ProviderHub", + "regex": "ProviderHub" + }, + { + "alias": "Security Insights", + "module": "SecurityInsights" + }, + { + "alias": "Private DNS", + "module": "PrivateDns" + }, + { + "alias": "Quota", + "module": "Quota" + }, + { + "regex": "ContainerInstance", + "alias": "ContainerInstance" + }, + { + "alias": "DiskPool", + "module": "DiskPool" + }, + { + "alias": "Datadog", + "regex": "Datadog" + }, + { + "regex": "ChangeAnalysis", + "alias": "ChangeAnalysis" + }, + { + "alias": "Purview", + "regex": "Purview" + }, + { + "alias": "Elastic", + "regex": "Elastic" + }, + { + "regex": "Logz", + "alias": "Logz" + }, + { + "alias": "DiskPool", + "regex": "DiskPool" + }, + { + "alias": "CustomLocation", + "regex": "CustomLocation" + }, + { + "alias": "EdgeOrder", + "module": "EdgeOrder" + }, + { + "alias": "Lab Services", + "module": "LabServices" + }, + { + "alias": "BareMetal", + "module": "BareMetal" + }, + { + "alias": "ConnectedNetwork", + "module": "ConnectedNetwork" + }, + { + "alias": "ServiceLinker", + "module": "ServiceLinker" + }, + { + "module": "StorageMover", + "alias": "Storage Mover" + }, + { + "alias": "NetworkFunction", + "module": "NetworkFunction" + }, + { + "module": "DynatraceObservability", + "alias": "DynatraceObservability" + }, + { + "module": "DeviceUpdate", + "alias": "DeviceUpdate" + }, + { + "alias": "ElasticSan", + "module": "ElasticSan" + }, + { + "alias": "SSH", + "module": "Ssh" + }, + { + "alias": "Automanage", + "module": "Automanage" + }, + { + "alias": "VoiceServices", + "module": "VoiceServices" + }, + { + "module": "BillingBenefits", + "alias": "BillingBenefits" + }, + { + "module": "LoadTesting", + "alias": "LoadTesting" + }, + { + "alias": "MobileNetwork", + "module": "MobileNetwork" + }, + { + "module": "ArcResourceBridge", + "alias": "ArcResourceBridge" + }, + { + "module": "Workloads", + "alias": "Workloads" + }, + { + "alias": "SelfHelp", + "module": "SelfHelp" + }, + { + "module": "Qumulo", + "alias": "Qumulo" + }, + { + "module": "StorageCache", + "alias": "StorageCache" + }, + { + "module": "NewRelic", + "alias": "NewRelic" + }, + { + "module": "Quantum", + "alias": "Quantum" + }, + { + "module": "GraphServices", + "alias": "GraphServices" + }, + { + "module": "Alb", + "alias": "Alb" + }, + { + "module": "PaloAltoNetworks", + "alias": "PaloAltoNetworks" + }, + { + "module": "DevCenter", + "alias": "DevCenter" + }, + { + "alias": "NetworkCloud", + "module": "NetworkCloud" + }, + { + "alias": "HdInsightOnAks", + "module": "HdInsightOnAks" + }, + { + "module": "NetworkAnalytics", + "alias": "NetworkAnalytics" + }, + { + "module": "Fleet", + "alias": "Fleet" + }, + { + "module": "ManagedNetworkFabric", + "alias": "Managed Network Fabric" + }, + { + "module": "CodeSigning", + "alias": "Code Signing" + }, + { + "module": "FirmwareAnalysis", + "alias": "FirmwareAnalysis" + }, + { + "module": "EdgeZones", + "alias": "EdgeZones" + } ] From 135b519d02a384c5aeddecd24271ca703ebcc8c6 Mon Sep 17 00:00:00 2001 From: Azure PowerShell <65331932+azure-powershell-bot@users.noreply.github.com> Date: Sun, 7 Apr 2024 19:52:02 +0800 Subject: [PATCH 08/12] Migrate NetworkFunction from generation to main (#24582) * Move NetworkFunction to main * Update ChangeLog.md --------- Co-authored-by: NanxiangLiu <33285578+Nickcandy@users.noreply.github.com> --- .../Az.NetworkFunction.psd1 | 159 +----- .../NetworkFunction.Autorest/README.md | 13 +- .../NetworkFunction.Autorest/build-module.ps1 | 9 +- .../New-AzNetworkFunctionCollectorPolicy.ps1 | 189 +++++++ ...pdate-AzNetworkFunctionCollectorPolicy.ps1 | 20 +- .../Get-AzNetworkFunctionCollectorPolicy.ps1 | 12 +- .../Get-AzNetworkFunctionTrafficCollector.ps1 | 12 +- .../New-AzNetworkFunctionCollectorPolicy.ps1 | 21 +- .../New-AzNetworkFunctionTrafficCollector.ps1 | 12 +- .../exports/ProxyCmdletDefinitions.ps1 | 463 +++++++++++------- ...emove-AzNetworkFunctionCollectorPolicy.ps1 | 12 +- ...move-AzNetworkFunctionTrafficCollector.ps1 | 12 +- ...pdate-AzNetworkFunctionCollectorPolicy.ps1 | 12 +- ...te-AzNetworkFunctionCollectorPolicyTag.ps1 | 12 +- ...date-AzNetworkFunctionTrafficCollector.ps1 | 12 +- ...e-AzNetworkFunctionTrafficCollectorTag.ps1 | 12 +- .../generate-help.ps1 | 4 +- .../generate-portal-ux.ps1 | 375 ++++++++++++++ ...GetAzNetworkFunctionCollectorPolicy_Get.cs | 1 + ...kFunctionCollectorPolicy_GetViaIdentity.cs | 1 + ...etAzNetworkFunctionCollectorPolicy_List.cs | 1 + .../GetAzNetworkFunctionOperation_List.cs | 1 + ...etAzNetworkFunctionTrafficCollector_Get.cs | 1 + ...FunctionTrafficCollector_GetViaIdentity.cs | 1 + ...tAzNetworkFunctionTrafficCollector_List.cs | 1 + ...AzNetworkFunctionTrafficCollector_List1.cs | 1 + ...AzNetworkFunctionCollectorPolicy_Create.cs | 1 + ...kFunctionCollectorPolicy_CreateExpanded.cs | 2 + ...nctionCollectorPolicy_CreateViaIdentity.cs | 1 + ...llectorPolicy_CreateViaIdentityExpanded.cs | 1 + ...zNetworkFunctionTrafficCollector_Create.cs | 1 + ...FunctionTrafficCollector_CreateExpanded.cs | 1 + ...ctionTrafficCollector_CreateViaIdentity.cs | 1 + ...fficCollector_CreateViaIdentityExpanded.cs | 1 + ...AzNetworkFunctionCollectorPolicy_Delete.cs | 1 + ...nctionCollectorPolicy_DeleteViaIdentity.cs | 1 + ...zNetworkFunctionTrafficCollector_Delete.cs | 1 + ...ctionTrafficCollector_DeleteViaIdentity.cs | 1 + ...AzNetworkFunctionCollectorPolicy_Update.cs | 1 + ...kFunctionCollectorPolicy_UpdateExpanded.cs | 1 + ...zNetworkFunctionTrafficCollector_Update.cs | 1 + ...FunctionTrafficCollector_UpdateExpanded.cs | 1 + ...etworkFunctionCollectorPolicyTag_Update.cs | 1 + ...nctionCollectorPolicyTag_UpdateExpanded.cs | 1 + ...ionCollectorPolicyTag_UpdateViaIdentity.cs | 1 + ...ctorPolicyTag_UpdateViaIdentityExpanded.cs | 1 + ...tworkFunctionTrafficCollectorTag_Update.cs | 1 + ...ctionTrafficCollectorTag_UpdateExpanded.cs | 1 + ...onTrafficCollectorTag_UpdateViaIdentity.cs | 1 + ...cCollectorTag_UpdateViaIdentityExpanded.cs | 1 + .../BuildTime/Cmdlets/ExportHelpMarkdown.cs | 5 +- .../BuildTime/Cmdlets/ExportProxyCmdlet.cs | 5 +- .../runtime/BuildTime/MarkdownRenderer.cs | 24 +- .../BuildTime/Models/PsProxyOutputs.cs | 32 +- .../runtime/BuildTime/PsAttributes.cs | 7 + .../generated/runtime/MessageAttribute.cs | 100 ++-- .../runtime/MessageAttributeHelper.cs | 33 +- .../runtime/Properties/Resources.Designer.cs | 28 +- .../runtime/Properties/Resources.resx | 10 +- .../help/Az.NetworkFunction.md | 43 ++ .../Get-AzNetworkFunctionCollectorPolicy.md | 182 +++++++ .../Get-AzNetworkFunctionTrafficCollector.md | 200 ++++++++ .../New-AzNetworkFunctionCollectorPolicy.md | 292 +++++++++++ .../New-AzNetworkFunctionTrafficCollector.md | 210 ++++++++ .../NetworkFunction.Autorest/help/README.md | 11 + ...Remove-AzNetworkFunctionCollectorPolicy.md | 224 +++++++++ ...emove-AzNetworkFunctionTrafficCollector.md | 208 ++++++++ ...Update-AzNetworkFunctionCollectorPolicy.md | 292 +++++++++++ ...ate-AzNetworkFunctionCollectorPolicyTag.md | 228 +++++++++ ...pdate-AzNetworkFunctionTrafficCollector.md | 225 +++++++++ ...te-AzNetworkFunctionTrafficCollectorTag.md | 195 ++++++++ .../New-AzNetworkFunctionCollectorPolicy.ps1 | 22 +- .../New-AzNetworkFunctionTrafficCollector.ps1 | 8 +- .../internal/ProxyCmdletDefinitions.ps1 | 62 ++- .../Set-AzNetworkFunctionCollectorPolicy.ps1 | 8 +- .../Set-AzNetworkFunctionTrafficCollector.ps1 | 8 +- ...te-AzNetworkFunctionCollectorPolicyTag.ps1 | 8 +- ...e-AzNetworkFunctionTrafficCollectorTag.ps1 | 8 +- .../NetworkFunction.Autorest/test-module.ps1 | 8 +- ...AzNetworkFunctionCollectorPolicy.Tests.ps1 | 30 +- ...AzNetworkFunctionCollectorPolicy.Tests.ps1 | 14 +- .../NetworkFunction.Autorest/test/env.json | 10 + .../NetworkFunction.Autorest/test/loadEnv.ps1 | 2 +- .../utils/Get-SubscriptionIdTestSafe.ps1 | 7 + .../NetworkFunction/Az.NetworkFunction.psd1 | 4 +- .../NetworkFunction/ChangeLog.md | 2 +- .../Get-AzNetworkFunctionCollectorPolicy.md | 46 +- .../Get-AzNetworkFunctionTrafficCollector.md | 50 +- .../New-AzNetworkFunctionCollectorPolicy.md | 41 +- .../New-AzNetworkFunctionTrafficCollector.md | 26 +- ...Remove-AzNetworkFunctionCollectorPolicy.md | 36 +- ...emove-AzNetworkFunctionTrafficCollector.md | 37 +- ...Update-AzNetworkFunctionCollectorPolicy.md | 38 +- ...ate-AzNetworkFunctionCollectorPolicyTag.md | 36 +- ...pdate-AzNetworkFunctionTrafficCollector.md | 49 +- ...te-AzNetworkFunctionTrafficCollectorTag.md | 38 +- 96 files changed, 3890 insertions(+), 656 deletions(-) create mode 100644 src/NetworkFunction/NetworkFunction.Autorest/custom/New-AzNetworkFunctionCollectorPolicy.ps1 create mode 100644 src/NetworkFunction/NetworkFunction.Autorest/generate-portal-ux.ps1 create mode 100644 src/NetworkFunction/NetworkFunction.Autorest/help/Az.NetworkFunction.md create mode 100644 src/NetworkFunction/NetworkFunction.Autorest/help/Get-AzNetworkFunctionCollectorPolicy.md create mode 100644 src/NetworkFunction/NetworkFunction.Autorest/help/Get-AzNetworkFunctionTrafficCollector.md create mode 100644 src/NetworkFunction/NetworkFunction.Autorest/help/New-AzNetworkFunctionCollectorPolicy.md create mode 100644 src/NetworkFunction/NetworkFunction.Autorest/help/New-AzNetworkFunctionTrafficCollector.md create mode 100644 src/NetworkFunction/NetworkFunction.Autorest/help/README.md create mode 100644 src/NetworkFunction/NetworkFunction.Autorest/help/Remove-AzNetworkFunctionCollectorPolicy.md create mode 100644 src/NetworkFunction/NetworkFunction.Autorest/help/Remove-AzNetworkFunctionTrafficCollector.md create mode 100644 src/NetworkFunction/NetworkFunction.Autorest/help/Update-AzNetworkFunctionCollectorPolicy.md create mode 100644 src/NetworkFunction/NetworkFunction.Autorest/help/Update-AzNetworkFunctionCollectorPolicyTag.md create mode 100644 src/NetworkFunction/NetworkFunction.Autorest/help/Update-AzNetworkFunctionTrafficCollector.md create mode 100644 src/NetworkFunction/NetworkFunction.Autorest/help/Update-AzNetworkFunctionTrafficCollectorTag.md create mode 100644 src/NetworkFunction/NetworkFunction.Autorest/test/env.json create mode 100644 src/NetworkFunction/NetworkFunction.Autorest/utils/Get-SubscriptionIdTestSafe.ps1 diff --git a/src/NetworkFunction/NetworkFunction.Autorest/Az.NetworkFunction.psd1 b/src/NetworkFunction/NetworkFunction.Autorest/Az.NetworkFunction.psd1 index b54d0c853c5a..2c3cb64ae345 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/Az.NetworkFunction.psd1 +++ b/src/NetworkFunction/NetworkFunction.Autorest/Az.NetworkFunction.psd1 @@ -1,141 +1,24 @@ -# -# Module manifest for module 'Az.NetworkFunction' -# -# Generated by: Microsoft Corporation -# -# Generated on: 6/1/2023 -# - @{ - -# Script module or binary module file associated with this manifest. -RootModule = './Az.NetworkFunction.psm1' - -# Version number of this module. -ModuleVersion = '0.1.2' - -# Supported PSEditions -CompatiblePSEditions = 'Core', 'Desktop' - -# ID used to uniquely identify this module -GUID = '1d339b1c-5a86-4fbd-9a2e-d0497c39b397' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = 'Microsoft Corporation. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'Microsoft Azure PowerShell: NetworkFunction cmdlets' - -# Minimum version of the PowerShell engine required by this module -PowerShellVersion = '5.1' - -# Name of the PowerShell host required by this module -# PowerShellHostName = '' - -# Minimum version of the PowerShell host required by this module -# PowerShellHostVersion = '' - -# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. -DotNetFrameworkVersion = '4.7.2' - -# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. -# ClrVersion = '' - -# Processor architecture (None, X86, Amd64) required by this module -# ProcessorArchitecture = '' - -# Modules that must be imported into the global environment prior to importing this module -RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.10.3'; }) - -# Assemblies that must be loaded prior to importing this module -RequiredAssemblies = './bin/Az.NetworkFunction.private.dll' - -# Script files (.ps1) that are run in the caller's environment prior to importing this module. -# ScriptsToProcess = @() - -# Type files (.ps1xml) to be loaded when importing this module -# TypesToProcess = @() - -# Format files (.ps1xml) to be loaded when importing this module -FormatsToProcess = './Az.NetworkFunction.format.ps1xml' - -# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess -# NestedModules = @() - -# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. -FunctionsToExport = 'Get-AzNetworkFunctionCollectorPolicy', - 'Get-AzNetworkFunctionTrafficCollector', - 'New-AzNetworkFunctionCollectorPolicy', - 'New-AzNetworkFunctionTrafficCollector', - 'Remove-AzNetworkFunctionCollectorPolicy', - 'Remove-AzNetworkFunctionTrafficCollector', - 'Update-AzNetworkFunctionCollectorPolicy', - 'Update-AzNetworkFunctionCollectorPolicyTag', - 'Update-AzNetworkFunctionTrafficCollector', - 'Update-AzNetworkFunctionTrafficCollectorTag' - -# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. -CmdletsToExport = @() - -# Variables to export from this module -# VariablesToExport = @() - -# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. -AliasesToExport = '*' - -# DSC resources to export from this module -# DscResourcesToExport = @() - -# List of all modules packaged with this module -# ModuleList = @() - -# List of all files packaged with this module -# FileList = @() - -# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. -PrivateData = @{ - + GUID = '1d339b1c-5a86-4fbd-9a2e-d0497c39b397' + RootModule = './Az.NetworkFunction.psm1' + ModuleVersion = '0.1.0' + CompatiblePSEditions = 'Core', 'Desktop' + Author = 'Microsoft Corporation' + CompanyName = 'Microsoft Corporation' + Copyright = 'Microsoft Corporation. All rights reserved.' + Description = 'Microsoft Azure PowerShell: NetworkFunction cmdlets' + PowerShellVersion = '5.1' + DotNetFrameworkVersion = '4.7.2' + RequiredAssemblies = './bin/Az.NetworkFunction.private.dll' + FormatsToProcess = './Az.NetworkFunction.format.ps1xml' + FunctionsToExport = 'Get-AzNetworkFunctionCollectorPolicy', 'Get-AzNetworkFunctionTrafficCollector', 'New-AzNetworkFunctionCollectorPolicy', 'New-AzNetworkFunctionTrafficCollector', 'Remove-AzNetworkFunctionCollectorPolicy', 'Remove-AzNetworkFunctionTrafficCollector', 'Update-AzNetworkFunctionCollectorPolicy', 'Update-AzNetworkFunctionCollectorPolicyTag', 'Update-AzNetworkFunctionTrafficCollector', 'Update-AzNetworkFunctionTrafficCollectorTag', '*' + AliasesToExport = '*' + PrivateData = @{ PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - Tags = 'Azure','ResourceManager','ARM','PSModule','NetworkFunction' - - # A URL to the license for this module. - LicenseUri = 'https://aka.ms/azps-license' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/Azure/azure-powershell' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - # ReleaseNotes = '' - - # Prerelease string of this module - # Prerelease = '' - - # Flag to indicate whether the module requires explicit user acceptance for install/update/save - # RequireLicenseAcceptance = $false - - # External dependent modules of this module - # ExternalModuleDependencies = @() - - } # End of PSData hashtable - - } # End of PrivateData hashtable - -# HelpInfo URI of this module -# HelpInfoURI = '' - -# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. -# DefaultCommandPrefix = '' - + Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'NetworkFunction' + LicenseUri = 'https://aka.ms/azps-license' + ProjectUri = 'https://github.com/Azure/azure-powershell' + ReleaseNotes = '' + } + } } - diff --git a/src/NetworkFunction/NetworkFunction.Autorest/README.md b/src/NetworkFunction/NetworkFunction.Autorest/README.md index 25756f7b4c0a..edefc5518f72 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/README.md +++ b/src/NetworkFunction/NetworkFunction.Autorest/README.md @@ -3,7 +3,6 @@ This directory contains the PowerShell module for the NetworkFunction service. --- - ## Info - Modifiable: yes - Generated: all @@ -28,9 +27,9 @@ For information on how to develop for `Az.NetworkFunction`, see [how-to.md](how- > see https://aka.ms/autorest ``` yaml -branch: 5ef93469c04983e472e57ca227fc5159d13a172a +commit: 5ef93469c04983e472e57ca227fc5159d13a172a require: - - $(this-folder)/../readme.azure.noprofile.md + - $(this-folder)/../../readme.azure.noprofile.md input-file: - $(repo)/specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-11-01/AzureTrafficCollector.json module-version: 0.1.0 @@ -40,6 +39,10 @@ identity-correction-for-post: true resourcegroup-append: true nested-object-to-string: true +# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option +use-extension: + "@autorest/powershell": "3.x" + directive: - where: subject: ^AzureTrafficCollector(.*) @@ -57,4 +60,8 @@ directive: - where: verb: Set hide: true + - where: + verb: New + subject: ^CollectorPolicy(.*) + hide: true ``` diff --git a/src/NetworkFunction/NetworkFunction.Autorest/build-module.ps1 b/src/NetworkFunction/NetworkFunction.Autorest/build-module.ps1 index e2052252da31..166aa9083955 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/build-module.ps1 +++ b/src/NetworkFunction/NetworkFunction.Autorest/build-module.ps1 @@ -143,7 +143,8 @@ if($NoDocs) { $null = Get-ChildItem -Path $docsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue } $null = New-Item -ItemType Directory -Force -Path $docsFolder - Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid + $addComplexInterfaceInfo = ![System.Convert]::ToBoolean('true') + Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid -AddComplexInterfaceInfo:$addComplexInterfaceInfo } Write-Host -ForegroundColor Green 'Creating format.ps1xml...' @@ -162,4 +163,10 @@ Export-TestStub -ModuleName $moduleName -ExportsFolder $exportsFolder -OutputFol Write-Host -ForegroundColor Green 'Creating example stubs...' Export-ExampleStub -ExportsFolder $exportsFolder -OutputFolder $examplesFolder +if (Test-Path (Join-Path $PSScriptRoot 'generate-portal-ux.ps1')) +{ + Write-Host -ForegroundColor Green 'Creating ux metadata...' + . (Join-Path $PSScriptRoot 'generate-portal-ux.ps1') +} + Write-Host -ForegroundColor Green '-------------Done-------------' diff --git a/src/NetworkFunction/NetworkFunction.Autorest/custom/New-AzNetworkFunctionCollectorPolicy.ps1 b/src/NetworkFunction/NetworkFunction.Autorest/custom/New-AzNetworkFunctionCollectorPolicy.ps1 new file mode 100644 index 000000000000..42a877cd2459 --- /dev/null +++ b/src/NetworkFunction/NetworkFunction.Autorest/custom/New-AzNetworkFunctionCollectorPolicy.ps1 @@ -0,0 +1,189 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Creates or updates a Collector Policy resource +.Description +Creates or updates a Collector Policy resource +.Example +New-AzNetworkFunctionCollectorPolicy -collectorpolicyname cp1 -azuretrafficcollectorname atc -resourcegroupname rg1 -location eastus | Format-List + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.ICollectorPolicy +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +EMISSIONPOLICY : Emission policies. + [EmissionDestination ]: Emission policy destinations. + [DestinationType ]: Emission destination type. + [EmissionType ]: Emission format type. + +INGESTIONPOLICYINGESTIONSOURCE : Ingestion Sources. + [ResourceId ]: Resource ID. + [SourceType ]: Ingestion source type. +.Link +https://learn.microsoft.com/powershell/module/az.networkfunction/new-aznetworkfunctioncollectorpolicy +#> +function New-AzNetworkFunctionCollectorPolicy { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.ICollectorPolicy])] +[CmdletBinding(PositionalBinding=$false, SupportsShouldProcess)] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] + [System.String] + # Azure Traffic Collector name + ${AzureTrafficCollectorName}, + + [Parameter(Mandatory)] + [Alias('CollectorPolicyName')] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] + [System.String] + # Collector Policy Name + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] + [System.String] + # The name of the resource group. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] + [System.String] + # Resource location. + ${Location}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.IEmissionPoliciesPropertiesFormat[]] + # Emission policies. + # To construct, see NOTES section for EMISSIONPOLICY properties and create a hash table. + ${EmissionPolicy}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.IIngestionSourcesPropertiesFormat[]] + # Ingestion Sources. + # To construct, see NOTES section for INGESTIONPOLICYINGESTIONSOURCE properties and create a hash table. + ${IngestionPolicyIngestionSource}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType])] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType] + # The ingestion type. + ${IngestionPolicyIngestionType}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +process { + $rg = $PSBoundParameters.ResourceGroupName + + # Ensure exr circuit bandwidth 1G or more + $cktname = $IngestionPolicyIngestionSource.ResourceId | Where {$IngestionPolicyIngestionSource.ResourceId -match "/*subscriptions/(?.*)/resourceGroups/(?.*)/providers/Microsoft.Network/expressRouteCircuits/(?.*)"} | Foreach {$Matches['circuitname']} + Import-Module Az.Network -Force + $exrCircuit = Get-AzExpressRouteCircuit -Name $cktname -ResourceGroupName $rg + $bandwidthInGbps = $exrCircuit.BandwidthInGbps + $bandwidthInMbps = $exrCircuit.ServiceProviderProperties.BandwidthInMbps + + if ($bandwidthInGbps -and ($bandwidthInGbps -lt 1)) { + throw "CollectorPolicy can not be updated because circuit has bandwidth less than 1G. Circuit size with a bandwidth of 1G or more is supported." + } + + if ($bandwidthInMbps -and ($bandwidthInMbps -lt 1000)) { + throw "CollectorPolicy can not be updated because circuit has bandwidth less than 1G. Circuit size with a bandwidth of 1G or more is supported." + } + + Az.NetworkFunction.internal\New-AzNetworkFunctionCollectorPolicy @PSBoundParameters + } +} \ No newline at end of file diff --git a/src/NetworkFunction/NetworkFunction.Autorest/custom/Update-AzNetworkFunctionCollectorPolicy.ps1 b/src/NetworkFunction/NetworkFunction.Autorest/custom/Update-AzNetworkFunctionCollectorPolicy.ps1 index dff98bc9a05b..09e58824742a 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/custom/Update-AzNetworkFunctionCollectorPolicy.ps1 +++ b/src/NetworkFunction/NetworkFunction.Autorest/custom/Update-AzNetworkFunctionCollectorPolicy.ps1 @@ -173,10 +173,26 @@ process { $null = $PSBoundParameters.Remove('WhatIf') $null = $PSBoundParameters.Remove('Confirm') $null = $PSBoundParameters.Remove('Location') + $rg = $PSBoundParameters.ResourceGroupName - $cp = Get-AzNetworkFunctionCollectorPolicy @PSBoundParameters + # 2. Ensure exr circuit bandwidth 1G or more + $cktname = $IngestionPolicyIngestionSource.ResourceId | Where {$IngestionPolicyIngestionSource.ResourceId -match "/*subscriptions/(?.*)/resourceGroups/(?.*)/providers/Microsoft.Network/expressRouteCircuits/(?.*)"} | Foreach {$Matches['circuitname']} + Import-Module Az.Network -Force + $exrCircuit = Get-AzExpressRouteCircuit -Name $cktname -ResourceGroupName $rg + $bandwidthInGbps = $exrCircuit.BandwidthInGbps + $bandwidthInMbps = $exrCircuit.ServiceProviderProperties.BandwidthInMbps + + if ($bandwidthInGbps -and ($bandwidthInGbps -lt 1)) { + throw "CollectorPolicy can not be updated because circuit has bandwidth less than 1G. Circuit size with a bandwidth of 1G or more is supported." + } - # 2. PUT + if ($bandwidthInMbps -and ($bandwidthInMbps -lt 1000)) { + throw "CollectorPolicy can not be updated because circuit has bandwidth less than 1G. Circuit size with a bandwidth of 1G or more is supported." + } + + $cp = Get-AzNetworkFunctionCollectorPolicy @PSBoundParameters + + # 3. PUT $null = $PSBoundParameters.Remove('AzureTrafficCollectorName') $null = $PSBoundParameters.Remove('ResourceGroupName') $null = $PSBoundParameters.Remove('Name') diff --git a/src/NetworkFunction/NetworkFunction.Autorest/exports/Get-AzNetworkFunctionCollectorPolicy.ps1 b/src/NetworkFunction/NetworkFunction.Autorest/exports/Get-AzNetworkFunctionCollectorPolicy.ps1 index afd8395b9a1b..4ac2b5342f01 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/exports/Get-AzNetworkFunctionCollectorPolicy.ps1 +++ b/src/NetworkFunction/NetworkFunction.Autorest/exports/Get-AzNetworkFunctionCollectorPolicy.ps1 @@ -160,10 +160,20 @@ begin { List = 'Az.NetworkFunction.private\Get-AzNetworkFunctionCollectorPolicy_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) diff --git a/src/NetworkFunction/NetworkFunction.Autorest/exports/Get-AzNetworkFunctionTrafficCollector.ps1 b/src/NetworkFunction/NetworkFunction.Autorest/exports/Get-AzNetworkFunctionTrafficCollector.ps1 index 04fee6d38789..a1dfb2b86d63 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/exports/Get-AzNetworkFunctionTrafficCollector.ps1 +++ b/src/NetworkFunction/NetworkFunction.Autorest/exports/Get-AzNetworkFunctionTrafficCollector.ps1 @@ -159,10 +159,20 @@ begin { List1 = 'Az.NetworkFunction.private\Get-AzNetworkFunctionTrafficCollector_List1'; } if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) diff --git a/src/NetworkFunction/NetworkFunction.Autorest/exports/New-AzNetworkFunctionCollectorPolicy.ps1 b/src/NetworkFunction/NetworkFunction.Autorest/exports/New-AzNetworkFunctionCollectorPolicy.ps1 index 46428a68b38d..c50ef24f4060 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/exports/New-AzNetworkFunctionCollectorPolicy.ps1 +++ b/src/NetworkFunction/NetworkFunction.Autorest/exports/New-AzNetworkFunctionCollectorPolicy.ps1 @@ -42,7 +42,7 @@ https://learn.microsoft.com/powershell/module/az.networkfunction/new-aznetworkfu #> function New-AzNetworkFunctionCollectorPolicy { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.ICollectorPolicy])] -[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +[CmdletBinding(PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] @@ -111,8 +111,7 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Azure')] [System.Management.Automation.PSObject] - # The DefaultProfile parameter is not functional. - # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + # The credentials, account, tenant, and subscription used for communication with Azure. ${DefaultProfile}, [Parameter()] @@ -193,13 +192,23 @@ begin { } $mapping = @{ - CreateExpanded = 'Az.NetworkFunction.private\New-AzNetworkFunctionCollectorPolicy_CreateExpanded'; + __AllParameterSets = 'Az.NetworkFunction.custom\New-AzNetworkFunctionCollectorPolicy'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + if (('__AllParameterSets') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) diff --git a/src/NetworkFunction/NetworkFunction.Autorest/exports/New-AzNetworkFunctionTrafficCollector.ps1 b/src/NetworkFunction/NetworkFunction.Autorest/exports/New-AzNetworkFunctionTrafficCollector.ps1 index d2962e22d6f1..a206b30814f9 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/exports/New-AzNetworkFunctionTrafficCollector.ps1 +++ b/src/NetworkFunction/NetworkFunction.Autorest/exports/New-AzNetworkFunctionTrafficCollector.ps1 @@ -154,10 +154,20 @@ begin { CreateExpanded = 'Az.NetworkFunction.private\New-AzNetworkFunctionTrafficCollector_CreateExpanded'; } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) diff --git a/src/NetworkFunction/NetworkFunction.Autorest/exports/ProxyCmdletDefinitions.ps1 b/src/NetworkFunction/NetworkFunction.Autorest/exports/ProxyCmdletDefinitions.ps1 index fb65bd6ef0de..84b91bf08d13 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/exports/ProxyCmdletDefinitions.ps1 +++ b/src/NetworkFunction/NetworkFunction.Autorest/exports/ProxyCmdletDefinitions.ps1 @@ -160,10 +160,20 @@ begin { List = 'Az.NetworkFunction.private\Get-AzNetworkFunctionCollectorPolicy_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) @@ -353,10 +363,20 @@ begin { List1 = 'Az.NetworkFunction.private\Get-AzNetworkFunctionTrafficCollector_List1'; } if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) @@ -403,45 +423,26 @@ end { <# .Synopsis -Creates or updates a Collector Policy resource +Creates or updates a Azure Traffic Collector resource .Description -Creates or updates a Collector Policy resource +Creates or updates a Azure Traffic Collector resource .Example -New-AzNetworkFunctionCollectorPolicy -collectorpolicyname cp1 -azuretrafficcollectorname atc -resourcegroupname rg1 -location eastus | Format-List +New-AzNetworkFunctionTrafficCollector -name atctestps -resourcegroupname test -location eastus | Format-List .Outputs -Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.ICollectorPolicy -.Notes -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - -EMISSIONPOLICY : Emission policies. - [EmissionDestination ]: Emission policy destinations. - [DestinationType ]: Emission destination type. - [EmissionType ]: Emission format type. - -INGESTIONPOLICYINGESTIONSOURCE : Ingestion Sources. - [ResourceId ]: Resource ID. - [SourceType ]: Ingestion source type. +Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.IAzureTrafficCollector .Link -https://learn.microsoft.com/powershell/module/az.networkfunction/new-aznetworkfunctioncollectorpolicy +https://learn.microsoft.com/powershell/module/az.networkfunction/new-aznetworkfunctiontrafficcollector #> -function New-AzNetworkFunctionCollectorPolicy { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.ICollectorPolicy])] +function New-AzNetworkFunctionTrafficCollector { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.IAzureTrafficCollector])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] + [Alias('AzureTrafficCollectorName')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] [System.String] # Azure Traffic Collector name - ${AzureTrafficCollectorName}, - - [Parameter(Mandatory)] - [Alias('CollectorPolicyName')] - [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] - [System.String] - # Collector Policy Name ${Name}, [Parameter(Mandatory)] @@ -463,29 +464,6 @@ param( # Resource location. ${Location}, - [Parameter()] - [AllowEmptyCollection()] - [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.IEmissionPoliciesPropertiesFormat[]] - # Emission policies. - # To construct, see NOTES section for EMISSIONPOLICY properties and create a hash table. - ${EmissionPolicy}, - - [Parameter()] - [AllowEmptyCollection()] - [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.IIngestionSourcesPropertiesFormat[]] - # Ingestion Sources. - # To construct, see NOTES section for INGESTIONPOLICYINGESTIONSOURCE properties and create a hash table. - ${IngestionPolicyIngestionSource}, - - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType])] - [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType] - # The ingestion type. - ${IngestionPolicyIngestionType}, - [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.ITrackedResourceTags]))] @@ -580,13 +558,23 @@ begin { } $mapping = @{ - CreateExpanded = 'Az.NetworkFunction.private\New-AzNetworkFunctionCollectorPolicy_CreateExpanded'; + CreateExpanded = 'Az.NetworkFunction.private\New-AzNetworkFunctionTrafficCollector_CreateExpanded'; } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) @@ -633,53 +621,66 @@ end { <# .Synopsis -Creates or updates a Azure Traffic Collector resource +Deletes a specified Collector Policy resource. .Description -Creates or updates a Azure Traffic Collector resource +Deletes a specified Collector Policy resource. .Example -New-AzNetworkFunctionTrafficCollector -name atctestps -resourcegroupname test -location eastus | Format-List +Remove-AzNetworkFunctionCollectorPolicy -azuretrafficcollectorname atctestps -collectorpolicyname cp1 -resourcegroupname test +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.IAzureTrafficCollector +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [AzureTrafficCollectorName ]: Azure Traffic Collector name + [CollectorPolicyName ]: Collector Policy Name + [Id ]: Resource identity path + [ResourceGroupName ]: The name of the resource group. + [SubscriptionId ]: Azure Subscription ID. .Link -https://learn.microsoft.com/powershell/module/az.networkfunction/new-aznetworkfunctiontrafficcollector +https://learn.microsoft.com/powershell/module/az.networkfunction/remove-aznetworkfunctioncollectorpolicy #> -function New-AzNetworkFunctionTrafficCollector { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.IAzureTrafficCollector])] -[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Remove-AzNetworkFunctionCollectorPolicy { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(Mandatory)] - [Alias('AzureTrafficCollectorName')] + [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] [System.String] # Azure Traffic Collector name + ${AzureTrafficCollectorName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('CollectorPolicyName')] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] + [System.String] + # Collector Policy Name ${Name}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] [System.String] # The name of the resource group. ${ResourceGroupName}, - [Parameter()] + [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # Azure Subscription ID. ${SubscriptionId}, - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] - [System.String] - # Resource location. - ${Location}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.ITrackedResourceTags]))] - [System.Collections.Hashtable] - # Resource tags. - ${Tag}, + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -722,6 +723,12 @@ param( # Run the command asynchronously ${NoWait}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')] [System.Uri] @@ -768,13 +775,24 @@ begin { } $mapping = @{ - CreateExpanded = 'Az.NetworkFunction.private\New-AzNetworkFunctionTrafficCollector_CreateExpanded'; + Delete = 'Az.NetworkFunction.private\Remove-AzNetworkFunctionCollectorPolicy_Delete'; + DeleteViaIdentity = 'Az.NetworkFunction.private\Remove-AzNetworkFunctionCollectorPolicy_DeleteViaIdentity'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) @@ -821,11 +839,11 @@ end { <# .Synopsis -Deletes a specified Collector Policy resource. +Deletes a specified Azure Traffic Collector resource. .Description -Deletes a specified Collector Policy resource. +Deletes a specified Azure Traffic Collector resource. .Example -Remove-AzNetworkFunctionCollectorPolicy -azuretrafficcollectorname atctestps -collectorpolicyname cp1 -resourcegroupname test +Remove-AzNetworkFunctionTrafficCollector -name atctestps -resourcegroupname SEA-Cust10 .Inputs Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity @@ -843,23 +861,17 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. [SubscriptionId ]: Azure Subscription ID. .Link -https://learn.microsoft.com/powershell/module/az.networkfunction/remove-aznetworkfunctioncollectorpolicy +https://learn.microsoft.com/powershell/module/az.networkfunction/remove-aznetworkfunctiontrafficcollector #> -function Remove-AzNetworkFunctionCollectorPolicy { +function Remove-AzNetworkFunctionTrafficCollector { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('AzureTrafficCollectorName')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] [System.String] # Azure Traffic Collector name - ${AzureTrafficCollectorName}, - - [Parameter(ParameterSetName='Delete', Mandatory)] - [Alias('CollectorPolicyName')] - [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] - [System.String] - # Collector Policy Name ${Name}, [Parameter(ParameterSetName='Delete', Mandatory)] @@ -975,14 +987,24 @@ begin { } $mapping = @{ - Delete = 'Az.NetworkFunction.private\Remove-AzNetworkFunctionCollectorPolicy_Delete'; - DeleteViaIdentity = 'Az.NetworkFunction.private\Remove-AzNetworkFunctionCollectorPolicy_DeleteViaIdentity'; + Delete = 'Az.NetworkFunction.private\Remove-AzNetworkFunctionTrafficCollector_Delete'; + DeleteViaIdentity = 'Az.NetworkFunction.private\Remove-AzNetworkFunctionTrafficCollector_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) @@ -1029,16 +1051,16 @@ end { <# .Synopsis -Deletes a specified Azure Traffic Collector resource. +Updates the specified Collector Policy tags. .Description -Deletes a specified Azure Traffic Collector resource. +Updates the specified Collector Policy tags. .Example -Remove-AzNetworkFunctionTrafficCollector -name atctestps -resourcegroupname SEA-Cust10 +Update-AzNetworkFunctionCollectorPolicyTag -collectorpolicyname cp1 -azuretrafficcollectorname atc -resourcegroupname rg1 | Format-List .Inputs Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity .Outputs -System.Boolean +Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.ICollectorPolicy .Notes COMPLEX PARAMETER PROPERTIES @@ -1051,39 +1073,51 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. [SubscriptionId ]: Azure Subscription ID. .Link -https://learn.microsoft.com/powershell/module/az.networkfunction/remove-aznetworkfunctiontrafficcollector +https://learn.microsoft.com/powershell/module/az.networkfunction/update-aznetworkfunctioncollectorpolicytag #> -function Remove-AzNetworkFunctionTrafficCollector { -[OutputType([System.Boolean])] -[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Update-AzNetworkFunctionCollectorPolicyTag { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.ICollectorPolicy])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Delete', Mandatory)] - [Alias('AzureTrafficCollectorName')] + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] [System.String] # Azure Traffic Collector name - ${Name}, + ${AzureTrafficCollectorName}, - [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] + [System.String] + # Collector Policy Name + ${CollectorPolicyName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] [System.String] # The name of the resource group. ${ResourceGroupName}, - [Parameter(ParameterSetName='Delete')] + [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # Azure Subscription ID. ${SubscriptionId}, - [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity] # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.ITagsObjectTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -1093,12 +1127,6 @@ param( # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command as a job - ${AsJob}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -1119,18 +1147,6 @@ param( # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command asynchronously - ${NoWait}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Returns true when the command succeeds - ${PassThru}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')] [System.Uri] @@ -1177,14 +1193,24 @@ begin { } $mapping = @{ - Delete = 'Az.NetworkFunction.private\Remove-AzNetworkFunctionTrafficCollector_Delete'; - DeleteViaIdentity = 'Az.NetworkFunction.private\Remove-AzNetworkFunctionTrafficCollector_DeleteViaIdentity'; + UpdateExpanded = 'Az.NetworkFunction.private\Update-AzNetworkFunctionCollectorPolicyTag_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.NetworkFunction.private\Update-AzNetworkFunctionCollectorPolicyTag_UpdateViaIdentityExpanded'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) @@ -1231,16 +1257,16 @@ end { <# .Synopsis -Updates the specified Collector Policy tags. +Updates the specified Azure Traffic Collector tags. .Description -Updates the specified Collector Policy tags. +Updates the specified Azure Traffic Collector tags. .Example -Update-AzNetworkFunctionCollectorPolicyTag -collectorpolicyname cp1 -azuretrafficcollectorname atc -resourcegroupname rg1 | Format-List +Update-AzNetworkFunctionTrafficCollectorTag -azuretrafficcollectorname atc -resourcegroupname rg1 | Format-List .Inputs Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.ICollectorPolicy +Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.IAzureTrafficCollector .Notes COMPLEX PARAMETER PROPERTIES @@ -1253,10 +1279,10 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. [SubscriptionId ]: Azure Subscription ID. .Link -https://learn.microsoft.com/powershell/module/az.networkfunction/update-aznetworkfunctioncollectorpolicytag +https://learn.microsoft.com/powershell/module/az.networkfunction/update-aznetworkfunctiontrafficcollectortag #> -function Update-AzNetworkFunctionCollectorPolicyTag { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.ICollectorPolicy])] +function Update-AzNetworkFunctionTrafficCollectorTag { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.IAzureTrafficCollector])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -1265,12 +1291,6 @@ param( # Azure Traffic Collector name ${AzureTrafficCollectorName}, - [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] - [System.String] - # Collector Policy Name - ${CollectorPolicyName}, - [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] [System.String] @@ -1373,14 +1393,24 @@ begin { } $mapping = @{ - UpdateExpanded = 'Az.NetworkFunction.private\Update-AzNetworkFunctionCollectorPolicyTag_UpdateExpanded'; - UpdateViaIdentityExpanded = 'Az.NetworkFunction.private\Update-AzNetworkFunctionCollectorPolicyTag_UpdateViaIdentityExpanded'; + UpdateExpanded = 'Az.NetworkFunction.private\Update-AzNetworkFunctionTrafficCollectorTag_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.NetworkFunction.private\Update-AzNetworkFunctionTrafficCollectorTag_UpdateViaIdentityExpanded'; } if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) @@ -1427,63 +1457,92 @@ end { <# .Synopsis -Updates the specified Azure Traffic Collector tags. +Creates or updates a Collector Policy resource .Description -Updates the specified Azure Traffic Collector tags. +Creates or updates a Collector Policy resource .Example -Update-AzNetworkFunctionTrafficCollectorTag -azuretrafficcollectorname atc -resourcegroupname rg1 | Format-List +New-AzNetworkFunctionCollectorPolicy -collectorpolicyname cp1 -azuretrafficcollectorname atc -resourcegroupname rg1 -location eastus | Format-List -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.IAzureTrafficCollector +Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.ICollectorPolicy .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity Parameter - [AzureTrafficCollectorName ]: Azure Traffic Collector name - [CollectorPolicyName ]: Collector Policy Name - [Id ]: Resource identity path - [ResourceGroupName ]: The name of the resource group. - [SubscriptionId ]: Azure Subscription ID. +EMISSIONPOLICY : Emission policies. + [EmissionDestination ]: Emission policy destinations. + [DestinationType ]: Emission destination type. + [EmissionType ]: Emission format type. + +INGESTIONPOLICYINGESTIONSOURCE : Ingestion Sources. + [ResourceId ]: Resource ID. + [SourceType ]: Ingestion source type. .Link -https://learn.microsoft.com/powershell/module/az.networkfunction/update-aznetworkfunctiontrafficcollectortag +https://learn.microsoft.com/powershell/module/az.networkfunction/new-aznetworkfunctioncollectorpolicy #> -function Update-AzNetworkFunctionTrafficCollectorTag { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.IAzureTrafficCollector])] -[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function New-AzNetworkFunctionCollectorPolicy { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.ICollectorPolicy])] +[CmdletBinding(PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] [System.String] # Azure Traffic Collector name ${AzureTrafficCollectorName}, - [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(Mandatory)] + [Alias('CollectorPolicyName')] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] + [System.String] + # Collector Policy Name + ${Name}, + + [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] [System.String] # The name of the resource group. ${ResourceGroupName}, - [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # Azure Subscription ID. ${SubscriptionId}, - [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity] - # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - ${InputObject}, + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] + [System.String] + # Resource location. + ${Location}, [Parameter()] + [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.ITagsObjectTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.IEmissionPoliciesPropertiesFormat[]] + # Emission policies. + # To construct, see NOTES section for EMISSIONPOLICY properties and create a hash table. + ${EmissionPolicy}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.IIngestionSourcesPropertiesFormat[]] + # Ingestion Sources. + # To construct, see NOTES section for INGESTIONPOLICYINGESTIONSOURCE properties and create a hash table. + ${IngestionPolicyIngestionSource}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType])] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType] + # The ingestion type. + ${IngestionPolicyIngestionType}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, @@ -1493,10 +1552,15 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Azure')] [System.Management.Automation.PSObject] - # The DefaultProfile parameter is not functional. - # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + # The credentials, account, tenant, and subscription used for communication with Azure. ${DefaultProfile}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -1517,6 +1581,12 @@ param( # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')] [System.Uri] @@ -1563,14 +1633,23 @@ begin { } $mapping = @{ - UpdateExpanded = 'Az.NetworkFunction.private\Update-AzNetworkFunctionTrafficCollectorTag_UpdateExpanded'; - UpdateViaIdentityExpanded = 'Az.NetworkFunction.private\Update-AzNetworkFunctionTrafficCollectorTag_UpdateViaIdentityExpanded'; + __AllParameterSets = 'Az.NetworkFunction.custom\New-AzNetworkFunctionCollectorPolicy'; } - if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + if (('__AllParameterSets') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) @@ -1796,10 +1875,20 @@ begin { UpdateExpanded = 'Az.NetworkFunction.custom\Update-AzNetworkFunctionCollectorPolicy'; } if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) @@ -2013,10 +2102,20 @@ begin { UpdateExpanded = 'Az.NetworkFunction.custom\Update-AzNetworkFunctionTrafficCollector'; } if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) diff --git a/src/NetworkFunction/NetworkFunction.Autorest/exports/Remove-AzNetworkFunctionCollectorPolicy.ps1 b/src/NetworkFunction/NetworkFunction.Autorest/exports/Remove-AzNetworkFunctionCollectorPolicy.ps1 index c5e05cc19096..44d27feca9ec 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/exports/Remove-AzNetworkFunctionCollectorPolicy.ps1 +++ b/src/NetworkFunction/NetworkFunction.Autorest/exports/Remove-AzNetworkFunctionCollectorPolicy.ps1 @@ -174,10 +174,20 @@ begin { DeleteViaIdentity = 'Az.NetworkFunction.private\Remove-AzNetworkFunctionCollectorPolicy_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) diff --git a/src/NetworkFunction/NetworkFunction.Autorest/exports/Remove-AzNetworkFunctionTrafficCollector.ps1 b/src/NetworkFunction/NetworkFunction.Autorest/exports/Remove-AzNetworkFunctionTrafficCollector.ps1 index 73bc3da29b24..8ee93ec38c94 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/exports/Remove-AzNetworkFunctionTrafficCollector.ps1 +++ b/src/NetworkFunction/NetworkFunction.Autorest/exports/Remove-AzNetworkFunctionTrafficCollector.ps1 @@ -168,10 +168,20 @@ begin { DeleteViaIdentity = 'Az.NetworkFunction.private\Remove-AzNetworkFunctionTrafficCollector_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) diff --git a/src/NetworkFunction/NetworkFunction.Autorest/exports/Update-AzNetworkFunctionCollectorPolicy.ps1 b/src/NetworkFunction/NetworkFunction.Autorest/exports/Update-AzNetworkFunctionCollectorPolicy.ps1 index f9b6754e53dd..072d37b8a6be 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/exports/Update-AzNetworkFunctionCollectorPolicy.ps1 +++ b/src/NetworkFunction/NetworkFunction.Autorest/exports/Update-AzNetworkFunctionCollectorPolicy.ps1 @@ -195,10 +195,20 @@ begin { UpdateExpanded = 'Az.NetworkFunction.custom\Update-AzNetworkFunctionCollectorPolicy'; } if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) diff --git a/src/NetworkFunction/NetworkFunction.Autorest/exports/Update-AzNetworkFunctionCollectorPolicyTag.ps1 b/src/NetworkFunction/NetworkFunction.Autorest/exports/Update-AzNetworkFunctionCollectorPolicyTag.ps1 index 1a78d2aee3b2..18446db62c39 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/exports/Update-AzNetworkFunctionCollectorPolicyTag.ps1 +++ b/src/NetworkFunction/NetworkFunction.Autorest/exports/Update-AzNetworkFunctionCollectorPolicyTag.ps1 @@ -162,10 +162,20 @@ begin { UpdateViaIdentityExpanded = 'Az.NetworkFunction.private\Update-AzNetworkFunctionCollectorPolicyTag_UpdateViaIdentityExpanded'; } if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) diff --git a/src/NetworkFunction/NetworkFunction.Autorest/exports/Update-AzNetworkFunctionTrafficCollector.ps1 b/src/NetworkFunction/NetworkFunction.Autorest/exports/Update-AzNetworkFunctionTrafficCollector.ps1 index 8a3b2266fca2..d15517da8b99 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/exports/Update-AzNetworkFunctionTrafficCollector.ps1 +++ b/src/NetworkFunction/NetworkFunction.Autorest/exports/Update-AzNetworkFunctionTrafficCollector.ps1 @@ -183,10 +183,20 @@ begin { UpdateExpanded = 'Az.NetworkFunction.custom\Update-AzNetworkFunctionTrafficCollector'; } if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) diff --git a/src/NetworkFunction/NetworkFunction.Autorest/exports/Update-AzNetworkFunctionTrafficCollectorTag.ps1 b/src/NetworkFunction/NetworkFunction.Autorest/exports/Update-AzNetworkFunctionTrafficCollectorTag.ps1 index 1620b2f98dad..dff43d91d062 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/exports/Update-AzNetworkFunctionTrafficCollectorTag.ps1 +++ b/src/NetworkFunction/NetworkFunction.Autorest/exports/Update-AzNetworkFunctionTrafficCollectorTag.ps1 @@ -156,10 +156,20 @@ begin { UpdateViaIdentityExpanded = 'Az.NetworkFunction.private\Update-AzNetworkFunctionTrafficCollectorTag_UpdateViaIdentityExpanded'; } if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) diff --git a/src/NetworkFunction/NetworkFunction.Autorest/generate-help.ps1 b/src/NetworkFunction/NetworkFunction.Autorest/generate-help.ps1 index 76789e645bfa..f44c69bcaab2 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/generate-help.ps1 +++ b/src/NetworkFunction/NetworkFunction.Autorest/generate-help.ps1 @@ -66,8 +66,8 @@ foreach($directory in $directories) $docsPath = Join-Path $docsFolder $directory.Name $null = New-Item -ItemType Directory -Force -Path $docsPath -ErrorAction SilentlyContinue $examplesPath = Join-Path $examplesFolder $directory.Name - - Export-HelpMarkdown -ModuleInfo $moduleInfo -FunctionInfo $cmdletFunctionInfo -HelpInfo $cmdletHelpInfo -DocsFolder $docsPath -ExamplesFolder $examplesPath + $addComplexInterfaceInfo = ![System.Convert]::ToBoolean('true') + Export-HelpMarkdown -ModuleInfo $moduleInfo -FunctionInfo $cmdletFunctionInfo -HelpInfo $cmdletHelpInfo -DocsFolder $docsPath -ExamplesFolder $examplesPath -AddComplexInterfaceInfo:$addComplexInterfaceInfo Write-Host -ForegroundColor Green "Created documentation in '$docsPath'" } diff --git a/src/NetworkFunction/NetworkFunction.Autorest/generate-portal-ux.ps1 b/src/NetworkFunction/NetworkFunction.Autorest/generate-portal-ux.ps1 new file mode 100644 index 000000000000..72b7756afa4a --- /dev/null +++ b/src/NetworkFunction/NetworkFunction.Autorest/generate-portal-ux.ps1 @@ -0,0 +1,375 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# +# This Script will create a folder dedicated to Azure-specific content and includes metadata files essential for enhancing the user experience (UX) within the Azure portal. +# These files are utilized by the Azure portal to effectively present the usage of cmdlets related to specific resources on portal pages. +# ---------------------------------------------------------------------------------- +param([switch]$Isolated) +$ErrorActionPreference = 'Stop' + +$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path +if(-not $Isolated) { + Write-Host -ForegroundColor Green 'Creating isolated process...' + & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated + return +} + +$moduleName = 'Az.NetworkFunction' +$rootModuleName = '' +if ($rootModuleName -eq "") +{ + $rootModuleName = $moduleName +} +$modulePsd1 = Get-Item -Path (Join-Path $PSScriptRoot "./$moduleName.psd1") +$modulePath = $modulePsd1.FullName + +# Load DLL to use build-time cmdlets +Import-Module -Name $modulePath +Import-Module -Name (Join-Path $PSScriptRoot "./bin/$moduleName.private.dll") +$instance = [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Module]::Instance +# Module info is shared per profile +$moduleInfo = Get-Module -Name $moduleName +$parameterSetsInfo = Get-Module -Name "$moduleName.private" + +$buildinFunctions = @("Export-CmdletSurface", "Export-ExampleStub", "Export-FormatPs1xml", "Export-HelpMarkdown", "Export-ModelSurface", "Export-ProxyCmdlet", "Export-Psd1", "Export-TestStub", "Get-CommonParameter", "Get-ModuleGuid", "Get-ScriptCmdlet") + +function Test-FunctionSupported() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [string] + $FunctionName + ) + + If ($buildinfunctions.Contains($FunctionName)) { + return $false + } + + $cmdletName, $parameterSetName = $FunctionName.Split("_") + If ($parameterSetName.Contains("List") -or $parameterSetName.Contains("ViaIdentity")) { + return $false + } + If ($cmdletName.StartsWith("New") -or $cmdletName.StartsWith("Set") -or $cmdletName.StartsWith("Update")) { + return $false + } + + $parameterSetInfo = $parameterSetsInfo.ExportedCmdlets[$FunctionName] + foreach ($parameterInfo in $parameterSetInfo.Parameters.Values) + { + $category = (Get-ParameterAttribute -ParameterInfo $parameterInfo -AttributeName "CategoryAttribute").Categories + $invalideCategory = @('Query', 'Body') + if ($invalideCategory -contains $category) + { + return $false + } + } + + $customFiles = Get-ChildItem -Path custom -Filter "$cmdletName.*" + if ($customFiles.Length -ne 0) + { + return $false + } + + return $true +} + +function Get-MappedCmdletFromFunctionName() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [string] + $FunctionName + ) + + $cmdletName, $parameterSetName = $FunctionName.Split("_") + + return $cmdletName +} + +function Get-ParameterAttribute() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.ParameterMetadata] + $ParameterInfo, + [Parameter()] + [String] + $AttributeName + ) + return $ParameterInfo.Attributes | Where-Object { $_.TypeId.Name -eq $AttributeName } +} + +function Get-CmdletAttribute() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.CommandInfo] + $CmdletInfo, + [Parameter()] + [String] + $AttributeName + ) + + return $CmdletInfo.ImplementingType.GetTypeInfo().GetCustomAttributes([System.object], $true) | Where-Object { $_.TypeId.Name -eq $AttributeName } +} + +function Get-CmdletDescription() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [String] + $CmdletName + ) + $helpInfo = Get-Help $CmdletName -Full + + $description = $helpInfo.Description.Text + if ($null -eq $description) + { + return "" + } + return $description +} + +# Test whether the parameter is from swagger http path +function Test-ParameterFromSwagger() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.ParameterMetadata] + $ParameterInfo + ) + $category = (Get-ParameterAttribute -ParameterInfo $ParameterInfo -AttributeName "CategoryAttribute").Categories + $doNotExport = Get-ParameterAttribute -ParameterInfo $ParameterInfo -AttributeName "DoNotExportAttribute" + if ($null -ne $doNotExport) + { + return $false + } + + $valideCategory = @('Path') + if ($valideCategory -contains $category) + { + return $true + } + return $false +} + +function New-ExampleForParameterSet() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.CommandInfo] + $ParameterSetInfo + ) + $parameters = $ParameterSetInfo.Parameters.Values | Where-Object { Test-ParameterFromSwagger $_ } + $result = @() + foreach ($parameter in $parameters) + { + $category = (Get-ParameterAttribute -parameterInfo $parameter -AttributeName "CategoryAttribute").Categories + $sourceName = (Get-ParameterAttribute -parameterInfo $parameter -AttributeName "InfoAttribute").SerializedName + $name = $parameter.Name + $result += [ordered]@{ + name = "-$Name" + value = "[$category.$sourceName]" + } + } + + return $result +} + +function New-ParameterArrayInParameterSet() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.CommandInfo] + $ParameterSetInfo + ) + $parameters = $ParameterSetInfo.Parameters.Values | Where-Object { Test-ParameterFromSwagger $_ } + $result = @() + foreach ($parameter in $parameters) + { + $isMandatory = (Get-ParameterAttribute -parameterInfo $parameter -AttributeName "ParameterAttribute").Mandatory + $parameterName = $parameter.Name + $parameterType = $parameter.ParameterType.ToString().Split('.')[1] + if ($parameter.SwitchParameter) + { + $parameterSignature = "-$parameterName" + } + else + { + $parameterSignature = "-$parameterName <$parameterType>" + } + if ($parameterName -eq "SubscriptionId") + { + $isMandatory = $false + } + if (-not $isMandatory) + { + $parameterSignature = "[$parameterSignature]" + } + $result += $parameterSignature + } + + return $result +} + +function New-MetadataForParameterSet() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.CommandInfo] + $ParameterSetInfo + ) + $httpAttribute = Get-CmdletAttribute -CmdletInfo $ParameterSetInfo -AttributeName "HttpPathAttribute" + $httpPath = $httpAttribute.Path + $apiVersion = $httpAttribute.ApiVersion + $provider = [System.Text.RegularExpressions.Regex]::New("/providers/([\w+\.]+)/").Match($httpPath).Groups[1].Value + $resourcePath = "/" + $httpPath.Split("$provider/")[1] + $resourceType = [System.Text.RegularExpressions.Regex]::New("/([\w]+)/\{\w+\}").Matches($resourcePath) | ForEach-Object {$_.groups[1].Value} | Join-String -Separator "/" + $cmdletName = Get-MappedCmdletFromFunctionName $ParameterSetInfo.Name + $description = (Get-CmdletAttribute -CmdletInfo $ParameterSetInfo -AttributeName "DescriptionAttribute").Description + [object[]]$example = New-ExampleForParameterSet $ParameterSetInfo + [string[]]$signature = New-ParameterArrayInParameterSet $ParameterSetInfo + + return @{ + Path = $httpPath + Provider = $provider + ResourceType = $resourceType + ApiVersion = $apiVersion + CmdletName = $cmdletName + Description = $description + Example = $example + Signature = @{ + parameters = $signature + } + } +} + +function Merge-WithExistCmdletMetadata() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Collections.Specialized.OrderedDictionary] + $ExistedCmdletInfo, + [Parameter()] + [Hashtable] + $ParameterSetMetadata + ) + $ExistedCmdletInfo.help.parameterSets += $ParameterSetMetadata.Signature + $ExistedCmdletInfo.examples += [ordered]@{ + description = $ParameterSetMetadata.Description + parameters = $ParameterSetMetadata.Example + } + + return $ExistedCmdletInfo +} + +function New-MetadataForCmdlet() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [Hashtable] + $ParameterSetMetadata + ) + $cmdletName = $ParameterSetMetadata.CmdletName + $description = Get-CmdletDescription $cmdletName + $result = [ordered]@{ + name = $cmdletName + description = $description + path = $ParameterSetMetadata.Path + help = [ordered]@{ + learnMore = [ordered]@{ + url = "https://learn.microsoft.com/powershell/module/$rootModuleName/$cmdletName".ToLower() + } + parameterSets = @() + } + examples = @() + } + $result = Merge-WithExistCmdletMetadata -ExistedCmdletInfo $result -ParameterSetMetadata $ParameterSetMetadata + return $result +} + +$parameterSets = $parameterSetsInfo.ExportedCmdlets.Keys | Where-Object { Test-functionSupported($_) } +$resourceTypes = @{} +foreach ($parameterSetName in $parameterSets) +{ + $cmdletInfo = $parameterSetsInfo.ExportedCommands[$parameterSetName] + $parameterSetMetadata = New-MetadataForParameterSet -ParameterSetInfo $cmdletInfo + $cmdletName = $parameterSetMetadata.CmdletName + if (-not ($moduleInfo.ExportedCommands.ContainsKey($cmdletName))) + { + continue + } + if ($resourceTypes.ContainsKey($parameterSetMetadata.ResourceType)) + { + $ExistedCmdletInfo = $resourceTypes[$parameterSetMetadata.ResourceType].commands | Where-Object { $_.name -eq $cmdletName } + if ($ExistedCmdletInfo) + { + $ExistedCmdletInfo = Merge-WithExistCmdletMetadata -ExistedCmdletInfo $ExistedCmdletInfo -ParameterSetMetadata $parameterSetMetadata + } + else + { + $cmdletInfo = New-MetadataForCmdlet -ParameterSetMetadata $parameterSetMetadata + $resourceTypes[$parameterSetMetadata.ResourceType].commands += $cmdletInfo + } + } + else + { + $cmdletInfo = New-MetadataForCmdlet -ParameterSetMetadata $parameterSetMetadata + $resourceTypes[$parameterSetMetadata.ResourceType] = [ordered]@{ + resourceType = $parameterSetMetadata.ResourceType + apiVersion = $parameterSetMetadata.ApiVersion + learnMore = @{ + url = "https://learn.microsoft.com/powershell/module/$rootModuleName".ToLower() + } + commands = @($cmdletInfo) + provider = $parameterSetMetadata.Provider + } + } +} + +$UXFolder = 'UX' +if (Test-Path $UXFolder) +{ + Remove-Item -Path $UXFolder -Recurse +} +$null = New-Item -ItemType Directory -Path $UXFolder + +foreach ($resourceType in $resourceTypes.Keys) +{ + $resourceTypeFileName = $resourceType -replace "/", "-" + if ($resourceTypeFileName -eq "") + { + continue + } + $resourceTypeInfo = $resourceTypes[$resourceType] + $provider = $resourceTypeInfo.provider + $providerFolder = "$UXFolder/$provider" + if (-not (Test-Path $providerFolder)) + { + $null = New-Item -ItemType Directory -Path $providerFolder + } + $resourceTypeInfo.Remove("provider") + $resourceTypeInfo | ConvertTo-Json -Depth 10 | Out-File "$providerFolder/$resourceTypeFileName.json" +} \ No newline at end of file diff --git a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/GetAzNetworkFunctionCollectorPolicy_Get.cs b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/GetAzNetworkFunctionCollectorPolicy_Get.cs index 2df5b9fac09c..ba9bad1c1d4b 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/GetAzNetworkFunctionCollectorPolicy_Get.cs +++ b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/GetAzNetworkFunctionCollectorPolicy_Get.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.ICollectorPolicy))] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Description(@"Gets the collector policy in a specified Traffic Collector")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}/collectorPolicies/{collectorPolicyName}", ApiVersion = "2022-11-01")] public partial class GetAzNetworkFunctionCollectorPolicy_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IEventListener { diff --git a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/GetAzNetworkFunctionCollectorPolicy_GetViaIdentity.cs b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/GetAzNetworkFunctionCollectorPolicy_GetViaIdentity.cs index 611a0f986d10..764fc8d4a61d 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/GetAzNetworkFunctionCollectorPolicy_GetViaIdentity.cs +++ b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/GetAzNetworkFunctionCollectorPolicy_GetViaIdentity.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.ICollectorPolicy))] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Description(@"Gets the collector policy in a specified Traffic Collector")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}/collectorPolicies/{collectorPolicyName}", ApiVersion = "2022-11-01")] public partial class GetAzNetworkFunctionCollectorPolicy_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IEventListener { diff --git a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/GetAzNetworkFunctionCollectorPolicy_List.cs b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/GetAzNetworkFunctionCollectorPolicy_List.cs index 70e5b757b7b8..d11550f37c08 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/GetAzNetworkFunctionCollectorPolicy_List.cs +++ b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/GetAzNetworkFunctionCollectorPolicy_List.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.ICollectorPolicy))] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Description(@"Return list of Collector policies in a Azure Traffic Collector")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}/collectorPolicies", ApiVersion = "2022-11-01")] public partial class GetAzNetworkFunctionCollectorPolicy_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IEventListener { diff --git a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/GetAzNetworkFunctionOperation_List.cs b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/GetAzNetworkFunctionOperation_List.cs index a3b2e82c8557..26f1e4822180 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/GetAzNetworkFunctionOperation_List.cs +++ b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/GetAzNetworkFunctionOperation_List.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.IOperation))] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Description(@"Lists all of the available NetworkFunction Rest API operations.")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.HttpPath(Path = "/providers/Microsoft.NetworkFunction/operations", ApiVersion = "2022-11-01")] public partial class GetAzNetworkFunctionOperation_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IEventListener { diff --git a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/GetAzNetworkFunctionTrafficCollector_Get.cs b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/GetAzNetworkFunctionTrafficCollector_Get.cs index 42c76845370f..fef989ed91bf 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/GetAzNetworkFunctionTrafficCollector_Get.cs +++ b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/GetAzNetworkFunctionTrafficCollector_Get.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.IAzureTrafficCollector))] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Description(@"Gets the specified Azure Traffic Collector in a specified resource group")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}", ApiVersion = "2022-11-01")] public partial class GetAzNetworkFunctionTrafficCollector_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IEventListener { diff --git a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/GetAzNetworkFunctionTrafficCollector_GetViaIdentity.cs b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/GetAzNetworkFunctionTrafficCollector_GetViaIdentity.cs index 6189c942b497..2339ddb24e9d 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/GetAzNetworkFunctionTrafficCollector_GetViaIdentity.cs +++ b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/GetAzNetworkFunctionTrafficCollector_GetViaIdentity.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.IAzureTrafficCollector))] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Description(@"Gets the specified Azure Traffic Collector in a specified resource group")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}", ApiVersion = "2022-11-01")] public partial class GetAzNetworkFunctionTrafficCollector_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IEventListener { diff --git a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/GetAzNetworkFunctionTrafficCollector_List.cs b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/GetAzNetworkFunctionTrafficCollector_List.cs index 47e4042044c5..5c6cac56f876 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/GetAzNetworkFunctionTrafficCollector_List.cs +++ b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/GetAzNetworkFunctionTrafficCollector_List.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.IAzureTrafficCollector))] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Description(@"Return list of Azure Traffic Collectors in a subscription")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.NetworkFunction/azureTrafficCollectors", ApiVersion = "2022-11-01")] public partial class GetAzNetworkFunctionTrafficCollector_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IEventListener { diff --git a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/GetAzNetworkFunctionTrafficCollector_List1.cs b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/GetAzNetworkFunctionTrafficCollector_List1.cs index cd568436e6ed..95df0976abc8 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/GetAzNetworkFunctionTrafficCollector_List1.cs +++ b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/GetAzNetworkFunctionTrafficCollector_List1.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.IAzureTrafficCollector))] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Description(@"Return list of Azure Traffic Collectors in a Resource Group")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors", ApiVersion = "2022-11-01")] public partial class GetAzNetworkFunctionTrafficCollector_List1 : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IEventListener { diff --git a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/NewAzNetworkFunctionCollectorPolicy_Create.cs b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/NewAzNetworkFunctionCollectorPolicy_Create.cs index 4fda01687d10..5e482175ea9e 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/NewAzNetworkFunctionCollectorPolicy_Create.cs +++ b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/NewAzNetworkFunctionCollectorPolicy_Create.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.ICollectorPolicy))] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Description(@"Creates or updates a Collector Policy resource")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}/collectorPolicies/{collectorPolicyName}", ApiVersion = "2022-11-01")] public partial class NewAzNetworkFunctionCollectorPolicy_Create : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IEventListener { diff --git a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/NewAzNetworkFunctionCollectorPolicy_CreateExpanded.cs b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/NewAzNetworkFunctionCollectorPolicy_CreateExpanded.cs index 04fcd8a5236d..4cd4bd4a091e 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/NewAzNetworkFunctionCollectorPolicy_CreateExpanded.cs +++ b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/NewAzNetworkFunctionCollectorPolicy_CreateExpanded.cs @@ -12,10 +12,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Cmdlets /// /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}/collectorPolicies/{collectorPolicyName}" /// + [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzNetworkFunctionCollectorPolicy_CreateExpanded", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.ICollectorPolicy))] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Description(@"Creates or updates a Collector Policy resource")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}/collectorPolicies/{collectorPolicyName}", ApiVersion = "2022-11-01")] public partial class NewAzNetworkFunctionCollectorPolicy_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IEventListener { diff --git a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/NewAzNetworkFunctionCollectorPolicy_CreateViaIdentity.cs b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/NewAzNetworkFunctionCollectorPolicy_CreateViaIdentity.cs index e951cdaec842..6af0d830d7c0 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/NewAzNetworkFunctionCollectorPolicy_CreateViaIdentity.cs +++ b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/NewAzNetworkFunctionCollectorPolicy_CreateViaIdentity.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.ICollectorPolicy))] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Description(@"Creates or updates a Collector Policy resource")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}/collectorPolicies/{collectorPolicyName}", ApiVersion = "2022-11-01")] public partial class NewAzNetworkFunctionCollectorPolicy_CreateViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IEventListener { diff --git a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/NewAzNetworkFunctionCollectorPolicy_CreateViaIdentityExpanded.cs b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/NewAzNetworkFunctionCollectorPolicy_CreateViaIdentityExpanded.cs index d14e97d9f778..908af72569d9 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/NewAzNetworkFunctionCollectorPolicy_CreateViaIdentityExpanded.cs +++ b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/NewAzNetworkFunctionCollectorPolicy_CreateViaIdentityExpanded.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.ICollectorPolicy))] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Description(@"Creates or updates a Collector Policy resource")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}/collectorPolicies/{collectorPolicyName}", ApiVersion = "2022-11-01")] public partial class NewAzNetworkFunctionCollectorPolicy_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IEventListener { diff --git a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/NewAzNetworkFunctionTrafficCollector_Create.cs b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/NewAzNetworkFunctionTrafficCollector_Create.cs index c17217ed94c7..72112bbc5a74 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/NewAzNetworkFunctionTrafficCollector_Create.cs +++ b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/NewAzNetworkFunctionTrafficCollector_Create.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.IAzureTrafficCollector))] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Description(@"Creates or updates a Azure Traffic Collector resource")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}", ApiVersion = "2022-11-01")] public partial class NewAzNetworkFunctionTrafficCollector_Create : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IEventListener { diff --git a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/NewAzNetworkFunctionTrafficCollector_CreateExpanded.cs b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/NewAzNetworkFunctionTrafficCollector_CreateExpanded.cs index a6dff8fff8fc..a354960efc30 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/NewAzNetworkFunctionTrafficCollector_CreateExpanded.cs +++ b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/NewAzNetworkFunctionTrafficCollector_CreateExpanded.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.IAzureTrafficCollector))] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Description(@"Creates or updates a Azure Traffic Collector resource")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}", ApiVersion = "2022-11-01")] public partial class NewAzNetworkFunctionTrafficCollector_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IEventListener { diff --git a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/NewAzNetworkFunctionTrafficCollector_CreateViaIdentity.cs b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/NewAzNetworkFunctionTrafficCollector_CreateViaIdentity.cs index 6cca8e9f3e1e..3a6b9e8283ea 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/NewAzNetworkFunctionTrafficCollector_CreateViaIdentity.cs +++ b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/NewAzNetworkFunctionTrafficCollector_CreateViaIdentity.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.IAzureTrafficCollector))] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Description(@"Creates or updates a Azure Traffic Collector resource")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}", ApiVersion = "2022-11-01")] public partial class NewAzNetworkFunctionTrafficCollector_CreateViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IEventListener { diff --git a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/NewAzNetworkFunctionTrafficCollector_CreateViaIdentityExpanded.cs b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/NewAzNetworkFunctionTrafficCollector_CreateViaIdentityExpanded.cs index 071133cc3810..faa98fa51fec 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/NewAzNetworkFunctionTrafficCollector_CreateViaIdentityExpanded.cs +++ b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/NewAzNetworkFunctionTrafficCollector_CreateViaIdentityExpanded.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.IAzureTrafficCollector))] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Description(@"Creates or updates a Azure Traffic Collector resource")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}", ApiVersion = "2022-11-01")] public partial class NewAzNetworkFunctionTrafficCollector_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IEventListener { diff --git a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/RemoveAzNetworkFunctionCollectorPolicy_Delete.cs b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/RemoveAzNetworkFunctionCollectorPolicy_Delete.cs index 92322f5d38de..9ab09c016052 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/RemoveAzNetworkFunctionCollectorPolicy_Delete.cs +++ b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/RemoveAzNetworkFunctionCollectorPolicy_Delete.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Description(@"Deletes a specified Collector Policy resource.")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}/collectorPolicies/{collectorPolicyName}", ApiVersion = "2022-11-01")] public partial class RemoveAzNetworkFunctionCollectorPolicy_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IEventListener { diff --git a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/RemoveAzNetworkFunctionCollectorPolicy_DeleteViaIdentity.cs b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/RemoveAzNetworkFunctionCollectorPolicy_DeleteViaIdentity.cs index 524464bd2bd8..133137d0dc6f 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/RemoveAzNetworkFunctionCollectorPolicy_DeleteViaIdentity.cs +++ b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/RemoveAzNetworkFunctionCollectorPolicy_DeleteViaIdentity.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Description(@"Deletes a specified Collector Policy resource.")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}/collectorPolicies/{collectorPolicyName}", ApiVersion = "2022-11-01")] public partial class RemoveAzNetworkFunctionCollectorPolicy_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IEventListener { diff --git a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/RemoveAzNetworkFunctionTrafficCollector_Delete.cs b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/RemoveAzNetworkFunctionTrafficCollector_Delete.cs index df9867f42b70..f90446f24bcb 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/RemoveAzNetworkFunctionTrafficCollector_Delete.cs +++ b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/RemoveAzNetworkFunctionTrafficCollector_Delete.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Description(@"Deletes a specified Azure Traffic Collector resource.")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}", ApiVersion = "2022-11-01")] public partial class RemoveAzNetworkFunctionTrafficCollector_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IEventListener { diff --git a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/RemoveAzNetworkFunctionTrafficCollector_DeleteViaIdentity.cs b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/RemoveAzNetworkFunctionTrafficCollector_DeleteViaIdentity.cs index fe3c22be395e..c7412525f925 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/RemoveAzNetworkFunctionTrafficCollector_DeleteViaIdentity.cs +++ b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/RemoveAzNetworkFunctionTrafficCollector_DeleteViaIdentity.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Description(@"Deletes a specified Azure Traffic Collector resource.")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}", ApiVersion = "2022-11-01")] public partial class RemoveAzNetworkFunctionTrafficCollector_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IEventListener { diff --git a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/SetAzNetworkFunctionCollectorPolicy_Update.cs b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/SetAzNetworkFunctionCollectorPolicy_Update.cs index 1b42fb086c6f..e99ed5954466 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/SetAzNetworkFunctionCollectorPolicy_Update.cs +++ b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/SetAzNetworkFunctionCollectorPolicy_Update.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.ICollectorPolicy))] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Description(@"Creates or updates a Collector Policy resource")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}/collectorPolicies/{collectorPolicyName}", ApiVersion = "2022-11-01")] public partial class SetAzNetworkFunctionCollectorPolicy_Update : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IEventListener { diff --git a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/SetAzNetworkFunctionCollectorPolicy_UpdateExpanded.cs b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/SetAzNetworkFunctionCollectorPolicy_UpdateExpanded.cs index e0202f349788..7de5c56f0411 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/SetAzNetworkFunctionCollectorPolicy_UpdateExpanded.cs +++ b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/SetAzNetworkFunctionCollectorPolicy_UpdateExpanded.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.ICollectorPolicy))] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Description(@"Creates or updates a Collector Policy resource")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}/collectorPolicies/{collectorPolicyName}", ApiVersion = "2022-11-01")] public partial class SetAzNetworkFunctionCollectorPolicy_UpdateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IEventListener { diff --git a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/SetAzNetworkFunctionTrafficCollector_Update.cs b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/SetAzNetworkFunctionTrafficCollector_Update.cs index 7fc63c2dfbd7..96e02ae0413b 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/SetAzNetworkFunctionTrafficCollector_Update.cs +++ b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/SetAzNetworkFunctionTrafficCollector_Update.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.IAzureTrafficCollector))] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Description(@"Creates or updates a Azure Traffic Collector resource")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}", ApiVersion = "2022-11-01")] public partial class SetAzNetworkFunctionTrafficCollector_Update : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IEventListener { diff --git a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/SetAzNetworkFunctionTrafficCollector_UpdateExpanded.cs b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/SetAzNetworkFunctionTrafficCollector_UpdateExpanded.cs index 5c01cb381d89..bd6b7f6afc27 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/SetAzNetworkFunctionTrafficCollector_UpdateExpanded.cs +++ b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/SetAzNetworkFunctionTrafficCollector_UpdateExpanded.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.IAzureTrafficCollector))] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Description(@"Creates or updates a Azure Traffic Collector resource")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}", ApiVersion = "2022-11-01")] public partial class SetAzNetworkFunctionTrafficCollector_UpdateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IEventListener { diff --git a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/UpdateAzNetworkFunctionCollectorPolicyTag_Update.cs b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/UpdateAzNetworkFunctionCollectorPolicyTag_Update.cs index d7a12b83aeff..5420b66fe152 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/UpdateAzNetworkFunctionCollectorPolicyTag_Update.cs +++ b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/UpdateAzNetworkFunctionCollectorPolicyTag_Update.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.ICollectorPolicy))] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Description(@"Updates the specified Collector Policy tags.")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}/collectorPolicies/{collectorPolicyName}", ApiVersion = "2022-11-01")] public partial class UpdateAzNetworkFunctionCollectorPolicyTag_Update : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IEventListener { diff --git a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/UpdateAzNetworkFunctionCollectorPolicyTag_UpdateExpanded.cs b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/UpdateAzNetworkFunctionCollectorPolicyTag_UpdateExpanded.cs index 644acd99cae5..ae5bd40bba18 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/UpdateAzNetworkFunctionCollectorPolicyTag_UpdateExpanded.cs +++ b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/UpdateAzNetworkFunctionCollectorPolicyTag_UpdateExpanded.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.ICollectorPolicy))] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Description(@"Updates the specified Collector Policy tags.")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}/collectorPolicies/{collectorPolicyName}", ApiVersion = "2022-11-01")] public partial class UpdateAzNetworkFunctionCollectorPolicyTag_UpdateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IEventListener { diff --git a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/UpdateAzNetworkFunctionCollectorPolicyTag_UpdateViaIdentity.cs b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/UpdateAzNetworkFunctionCollectorPolicyTag_UpdateViaIdentity.cs index cb4dcb9ce877..19c3b0b522ac 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/UpdateAzNetworkFunctionCollectorPolicyTag_UpdateViaIdentity.cs +++ b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/UpdateAzNetworkFunctionCollectorPolicyTag_UpdateViaIdentity.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.ICollectorPolicy))] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Description(@"Updates the specified Collector Policy tags.")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}/collectorPolicies/{collectorPolicyName}", ApiVersion = "2022-11-01")] public partial class UpdateAzNetworkFunctionCollectorPolicyTag_UpdateViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IEventListener { diff --git a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/UpdateAzNetworkFunctionCollectorPolicyTag_UpdateViaIdentityExpanded.cs b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/UpdateAzNetworkFunctionCollectorPolicyTag_UpdateViaIdentityExpanded.cs index 55af8048fcae..c707189186ab 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/UpdateAzNetworkFunctionCollectorPolicyTag_UpdateViaIdentityExpanded.cs +++ b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/UpdateAzNetworkFunctionCollectorPolicyTag_UpdateViaIdentityExpanded.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.ICollectorPolicy))] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Description(@"Updates the specified Collector Policy tags.")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}/collectorPolicies/{collectorPolicyName}", ApiVersion = "2022-11-01")] public partial class UpdateAzNetworkFunctionCollectorPolicyTag_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IEventListener { diff --git a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/UpdateAzNetworkFunctionTrafficCollectorTag_Update.cs b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/UpdateAzNetworkFunctionTrafficCollectorTag_Update.cs index 1ac420a8c288..304f7e496f4b 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/UpdateAzNetworkFunctionTrafficCollectorTag_Update.cs +++ b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/UpdateAzNetworkFunctionTrafficCollectorTag_Update.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.IAzureTrafficCollector))] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Description(@"Updates the specified Azure Traffic Collector tags.")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}", ApiVersion = "2022-11-01")] public partial class UpdateAzNetworkFunctionTrafficCollectorTag_Update : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IEventListener { diff --git a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/UpdateAzNetworkFunctionTrafficCollectorTag_UpdateExpanded.cs b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/UpdateAzNetworkFunctionTrafficCollectorTag_UpdateExpanded.cs index e32ee1afc107..bb645d464a94 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/UpdateAzNetworkFunctionTrafficCollectorTag_UpdateExpanded.cs +++ b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/UpdateAzNetworkFunctionTrafficCollectorTag_UpdateExpanded.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.IAzureTrafficCollector))] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Description(@"Updates the specified Azure Traffic Collector tags.")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}", ApiVersion = "2022-11-01")] public partial class UpdateAzNetworkFunctionTrafficCollectorTag_UpdateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IEventListener { diff --git a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/UpdateAzNetworkFunctionTrafficCollectorTag_UpdateViaIdentity.cs b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/UpdateAzNetworkFunctionTrafficCollectorTag_UpdateViaIdentity.cs index 1012f7094f8f..b685cfc97d84 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/UpdateAzNetworkFunctionTrafficCollectorTag_UpdateViaIdentity.cs +++ b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/UpdateAzNetworkFunctionTrafficCollectorTag_UpdateViaIdentity.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.IAzureTrafficCollector))] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Description(@"Updates the specified Azure Traffic Collector tags.")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}", ApiVersion = "2022-11-01")] public partial class UpdateAzNetworkFunctionTrafficCollectorTag_UpdateViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IEventListener { diff --git a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/UpdateAzNetworkFunctionTrafficCollectorTag_UpdateViaIdentityExpanded.cs b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/UpdateAzNetworkFunctionTrafficCollectorTag_UpdateViaIdentityExpanded.cs index 841d648b5b20..e46d89260cf9 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/UpdateAzNetworkFunctionTrafficCollectorTag_UpdateViaIdentityExpanded.cs +++ b/src/NetworkFunction/NetworkFunction.Autorest/generated/cmdlets/UpdateAzNetworkFunctionTrafficCollectorTag_UpdateViaIdentityExpanded.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.IAzureTrafficCollector))] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Description(@"Updates the specified Azure Traffic Collector tags.")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}", ApiVersion = "2022-11-01")] public partial class UpdateAzNetworkFunctionTrafficCollectorTag_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IEventListener { diff --git a/src/NetworkFunction/NetworkFunction.Autorest/generated/runtime/BuildTime/Cmdlets/ExportHelpMarkdown.cs b/src/NetworkFunction/NetworkFunction.Autorest/generated/runtime/BuildTime/Cmdlets/ExportHelpMarkdown.cs index bb1217c051ee..5e35785c1d74 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/generated/runtime/BuildTime/Cmdlets/ExportHelpMarkdown.cs +++ b/src/NetworkFunction/NetworkFunction.Autorest/generated/runtime/BuildTime/Cmdlets/ExportHelpMarkdown.cs @@ -33,6 +33,9 @@ public class ExportHelpMarkdown : PSCmdlet [ValidateNotNullOrEmpty] public string ExamplesFolder { get; set; } + [Parameter()] + public SwitchParameter AddComplexInterfaceInfo { get; set; } + protected override void ProcessRecord() { try @@ -41,7 +44,7 @@ protected override void ProcessRecord() var variantGroups = FunctionInfo.Select(fi => fi.BaseObject).Cast() .Join(helpInfos, fi => fi.Name, phi => phi.CmdletName, (fi, phi) => fi.ToVariants(phi)) .Select(va => new VariantGroup(ModuleInfo.Name, va.First().CmdletName, va, String.Empty)); - WriteMarkdowns(variantGroups, ModuleInfo.ToModuleInfo(), DocsFolder, ExamplesFolder); + WriteMarkdowns(variantGroups, ModuleInfo.ToModuleInfo(), DocsFolder, ExamplesFolder, AddComplexInterfaceInfo.IsPresent); } catch (Exception ee) { diff --git a/src/NetworkFunction/NetworkFunction.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs b/src/NetworkFunction/NetworkFunction.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs index edc2e06f2bbd..636344797e2d 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs +++ b/src/NetworkFunction/NetworkFunction.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs @@ -52,6 +52,9 @@ public class ExportProxyCmdlet : PSCmdlet [Parameter(Mandatory = true, ParameterSetName = "NoDocs")] public SwitchParameter ExcludeDocs { get; set; } + [Parameter(ParameterSetName = "Docs")] + public SwitchParameter AddComplexInterfaceInfo { get; set; } + protected override void ProcessRecord() { try @@ -163,7 +166,7 @@ protected override void ProcessRecord() var isValidProfile = !String.IsNullOrEmpty(profileName) && profileName != NoProfiles; var docsFolder = isValidProfile ? Path.Combine(DocsFolder, profileName) : DocsFolder; var examplesFolder = isValidProfile ? Path.Combine(ExamplesFolder, profileName) : ExamplesFolder; - WriteMarkdowns(variantGroupsByProfile, moduleInfo, docsFolder, examplesFolder); + WriteMarkdowns(variantGroupsByProfile, moduleInfo, docsFolder, examplesFolder, AddComplexInterfaceInfo.IsPresent); } } } diff --git a/src/NetworkFunction/NetworkFunction.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs b/src/NetworkFunction/NetworkFunction.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs index 3e79131c3d60..dd62596974f4 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs +++ b/src/NetworkFunction/NetworkFunction.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs @@ -14,7 +14,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell { internal static class MarkdownRenderer { - public static void WriteMarkdowns(IEnumerable variantGroups, PsModuleHelpInfo moduleHelpInfo, string docsFolder, string examplesFolder) + public static void WriteMarkdowns(IEnumerable variantGroups, PsModuleHelpInfo moduleHelpInfo, string docsFolder, string examplesFolder, bool AddComplexInterfaceInfo = true) { Directory.CreateDirectory(docsFolder); var markdownInfos = variantGroups.Where(vg => !vg.IsInternal).Select(vg => new MarkdownHelpInfo(vg, examplesFolder)).OrderBy(mhi => mhi.CmdletName).ToArray(); @@ -69,18 +69,26 @@ public static void WriteMarkdowns(IEnumerable variantGroups, PsMod } sb.Append($"## NOTES{Environment.NewLine}{Environment.NewLine}"); - sb.Append($"ALIASES{Environment.NewLine}{Environment.NewLine}"); - foreach (var alias in markdownInfo.Aliases) + if (markdownInfo.Aliases.Any()) { - sb.Append($"{alias}{Environment.NewLine}{Environment.NewLine}"); + sb.Append($"ALIASES{Environment.NewLine}{Environment.NewLine}"); } - if (markdownInfo.ComplexInterfaceInfos.Any()) + foreach (var alias in markdownInfo.Aliases) { - sb.Append($"{ComplexParameterHeader}{Environment.NewLine}"); + sb.Append($"{alias}{Environment.NewLine}{Environment.NewLine}"); } - foreach (var complexInterfaceInfo in markdownInfo.ComplexInterfaceInfos) + + if (AddComplexInterfaceInfo) { - sb.Append($"{complexInterfaceInfo.ToNoteOutput(includeDashes: true, includeBackticks: true)}{Environment.NewLine}{Environment.NewLine}"); + if (markdownInfo.ComplexInterfaceInfos.Any()) + { + sb.Append($"{ComplexParameterHeader}{Environment.NewLine}"); + } + foreach (var complexInterfaceInfo in markdownInfo.ComplexInterfaceInfos) + { + sb.Append($"{complexInterfaceInfo.ToNoteOutput(includeDashes: true, includeBackticks: true)}{Environment.NewLine}{Environment.NewLine}"); + } + } sb.Append($"## RELATED LINKS{Environment.NewLine}{Environment.NewLine}"); diff --git a/src/NetworkFunction/NetworkFunction.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs b/src/NetworkFunction/NetworkFunction.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs index b207fcb3866a..3a4d72513a54 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs +++ b/src/NetworkFunction/NetworkFunction.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs @@ -191,8 +191,15 @@ public BeginOutput(VariantGroup variantGroup) : base(variantGroup) public string GetProcessCustomAttributesAtRuntime() { - return VariantGroup.IsInternal ? "" : $@"{Indent}{Indent}$cmdInfo = Get-Command -Name $mapping[$parameterSet]{Environment.NewLine}{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)"; + return VariantGroup.IsInternal ? "" : IsAzure ? $@"{Indent}{Indent}$cmdInfo = Get-Command -Name $mapping[$parameterSet] +{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) +{Indent}{Indent}if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){{ +{Indent}{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) +{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) +{Indent}{Indent}}}" : $@"{Indent}{Indent}$cmdInfo = Get-Command -Name $mapping[$parameterSet]{Environment.NewLine}{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) +{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)"; } + private string GetTelemetry() { if (!VariantGroup.IsInternal && IsAzure) @@ -262,9 +269,26 @@ private string GetDefaultValuesStatements() var variantListString = defaultInfo.ParameterGroup.VariantNames.ToPsList(); var parameterName = defaultInfo.ParameterGroup.ParameterName; sb.AppendLine(); - sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}')) {{"); - sb.AppendLine($"{Indent}{Indent}{Indent}$PSBoundParameters['{parameterName}'] = {defaultInfo.Script}"); - sb.Append($"{Indent}{Indent}}}"); + //Yabo: this is bad to hard code the subscription id, but autorest load input README.md reversely (entry readme -> required readme), there are no other way to + //override default value set in required readme + if ("SubscriptionId".Equals(parameterName)) + { + sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}')) {{"); + sb.AppendLine($"{Indent}{Indent}{Indent}$testPlayback = $false"); + sb.AppendLine($"{Indent}{Indent}{Indent}$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object {{ if ($_) {{ $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) }} }}"); + sb.AppendLine($"{Indent}{Indent}{Indent}if ($testPlayback) {{"); + sb.AppendLine($"{Indent}{Indent}{Indent}{Indent}$PSBoundParameters['{parameterName}'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')"); + sb.AppendLine($"{Indent}{Indent}{Indent}}} else {{"); + sb.AppendLine($"{Indent}{Indent}{Indent}{Indent}$PSBoundParameters['{parameterName}'] = {defaultInfo.Script}"); + sb.AppendLine($"{Indent}{Indent}{Indent}}}"); + sb.Append($"{Indent}{Indent}}}"); + } + else + { + sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}')) {{"); + sb.AppendLine($"{Indent}{Indent}{Indent}$PSBoundParameters['{parameterName}'] = {defaultInfo.Script}"); + sb.Append($"{Indent}{Indent}}}"); + } } return sb.ToString(); } diff --git a/src/NetworkFunction/NetworkFunction.Autorest/generated/runtime/BuildTime/PsAttributes.cs b/src/NetworkFunction/NetworkFunction.Autorest/generated/runtime/BuildTime/PsAttributes.cs index 3ca7c852fca9..f5eab8368585 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/generated/runtime/BuildTime/PsAttributes.cs +++ b/src/NetworkFunction/NetworkFunction.Autorest/generated/runtime/BuildTime/PsAttributes.cs @@ -48,6 +48,13 @@ public ProfileAttribute(params string[] profiles) } } + [AttributeUsage(AttributeTargets.Class)] + public class HttpPathAttribute : Attribute + { + public string Path { get; set; } + public string ApiVersion { get; set; } + } + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] public class CategoryAttribute : Attribute { diff --git a/src/NetworkFunction/NetworkFunction.Autorest/generated/runtime/MessageAttribute.cs b/src/NetworkFunction/NetworkFunction.Autorest/generated/runtime/MessageAttribute.cs index 3d90c8a4db58..da83173a1f44 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/generated/runtime/MessageAttribute.cs +++ b/src/NetworkFunction/NetworkFunction.Autorest/generated/runtime/MessageAttribute.cs @@ -21,7 +21,7 @@ public class GenericBreakingChangeAttribute : Attribute //The version the change is effective from, non mandatory public string DeprecateByVersion { get; } - public bool DeprecateByVersionSet { get; } = false; + public string DeprecateByAzVersion { get; } //The date on which the change comes in effect public DateTime ChangeInEfectByDate { get; } @@ -32,23 +32,18 @@ public class GenericBreakingChangeAttribute : Attribute //New way fo calling the cmdlet public string NewWay { get; set; } - public GenericBreakingChangeAttribute(string message) - { - _message = message; - } - - public GenericBreakingChangeAttribute(string message, string deprecateByVersion) + public GenericBreakingChangeAttribute(string message, string deprecateByAzVersion, string deprecateByVersion) { _message = message; + this.DeprecateByAzVersion = deprecateByAzVersion; this.DeprecateByVersion = deprecateByVersion; - this.DeprecateByVersionSet = true; } - public GenericBreakingChangeAttribute(string message, string deprecateByVersion, string changeInEfectByDate) + public GenericBreakingChangeAttribute(string message, string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) { _message = message; this.DeprecateByVersion = deprecateByVersion; - this.DeprecateByVersionSet = true; + this.DeprecateByAzVersion = deprecateByAzVersion; if (DateTime.TryParse(changeInEfectByDate, new CultureInfo("en-US"), DateTimeStyles.None, out DateTime result)) { @@ -86,10 +81,8 @@ public void PrintCustomAttributeInfo(Action writeOutput) writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByDateMessage, this.ChangeInEfectByDate.ToString("d"))); } - if (DeprecateByVersionSet) - { - writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByVersion, this.DeprecateByVersion)); - } + writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByAzVersion, this.DeprecateByAzVersion)); + writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByVersion, this.DeprecateByVersion)); if (OldWay != null && NewWay != null) { @@ -114,18 +107,13 @@ public class CmdletBreakingChangeAttribute : GenericBreakingChangeAttribute public string ReplacementCmdletName { get; set; } - public CmdletBreakingChangeAttribute() : - base(string.Empty) + public CmdletBreakingChangeAttribute(string deprecateByAzVersion, string deprecateByVersion) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion) { } - public CmdletBreakingChangeAttribute(string deprecateByVersione) : - base(string.Empty, deprecateByVersione) - { - } - - public CmdletBreakingChangeAttribute(string deprecateByVersion, string changeInEfectByDate) : - base(string.Empty, deprecateByVersion, changeInEfectByDate) + public CmdletBreakingChangeAttribute(string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion, changeInEfectByDate) { } @@ -146,20 +134,15 @@ protected override string GetAttributeSpecificMessage() public class ParameterSetBreakingChangeAttribute : GenericBreakingChangeAttribute { public string[] ChangedParameterSet { set; get; } - public ParameterSetBreakingChangeAttribute(string[] changedParameterSet) : - base(string.Empty) - { - ChangedParameterSet = changedParameterSet; - } - public ParameterSetBreakingChangeAttribute(string[] changedParameterSet, string deprecateByVersione) : - base(string.Empty, deprecateByVersione) + public ParameterSetBreakingChangeAttribute(string[] changedParameterSet, string deprecateByAzVersion, string deprecateByVersion) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion) { ChangedParameterSet = changedParameterSet; } - public ParameterSetBreakingChangeAttribute(string[] changedParameterSet, string deprecateByVersion, string changeInEfectByDate) : - base(string.Empty, deprecateByVersion, changeInEfectByDate) + public ParameterSetBreakingChangeAttribute(string[] changedParameterSet, string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion, changeInEfectByDate) { ChangedParameterSet = changedParameterSet; } @@ -185,6 +168,11 @@ public class PreviewMessageAttribute : Attribute { public string _message; + public DateTime EstimatedGaDate { get; } + + public bool IsEstimatedGaDateSet { get; } = false; + + public PreviewMessageAttribute() { this._message = Resources.PreviewCmdletMessage; @@ -192,12 +180,26 @@ public PreviewMessageAttribute() public PreviewMessageAttribute(string message) { - this._message = message; + this._message = string.IsNullOrEmpty(message) ? Resources.PreviewCmdletMessage : message; } - public void PrintCustomAttributeInfo(System.Management.Automation.PSCmdlet psCmdlet) + public PreviewMessageAttribute(string message, string estimatedDateOfGa) : this(message) { - psCmdlet.WriteWarning(this._message); + if (DateTime.TryParse(estimatedDateOfGa, new CultureInfo("en-US"), DateTimeStyles.None, out DateTime result)) + { + this.EstimatedGaDate = result; + this.IsEstimatedGaDateSet = true; + } + } + + public void PrintCustomAttributeInfo(Action writeOutput) + { + writeOutput(this._message); + + if (IsEstimatedGaDateSet) + { + writeOutput(string.Format(Resources.PreviewCmdletETAMessage, this.EstimatedGaDate.ToShortDateString())); + } } public virtual bool IsApplicableToInvocation(InvocationInfo invocation) @@ -219,20 +221,14 @@ public class ParameterBreakingChangeAttribute : GenericBreakingChangeAttribute public String NewParameterType { get; set; } - public ParameterBreakingChangeAttribute(string nameOfParameterChanging) : - base(string.Empty) + public ParameterBreakingChangeAttribute(string nameOfParameterChanging, string deprecateByAzVersion, string deprecateByVersion) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion) { this.NameOfParameterChanging = nameOfParameterChanging; } - public ParameterBreakingChangeAttribute(string nameOfParameterChanging, string deprecateByVersion) : - base(string.Empty, deprecateByVersion) - { - this.NameOfParameterChanging = nameOfParameterChanging; - } - - public ParameterBreakingChangeAttribute(string nameOfParameterChanging, string deprecateByVersion, string changeInEfectByDate) : - base(string.Empty, deprecateByVersion, changeInEfectByDate) + public ParameterBreakingChangeAttribute(string nameOfParameterChanging, string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion, changeInEfectByDate) { this.NameOfParameterChanging = nameOfParameterChanging; } @@ -298,20 +294,14 @@ public class OutputBreakingChangeAttribute : GenericBreakingChangeAttribute public string[] NewOutputProperties { get; set; } - public OutputBreakingChangeAttribute(string deprecatedCmdletOutputType) : - base(string.Empty) - { - this.DeprecatedCmdLetOutputType = deprecatedCmdletOutputType; - } - - public OutputBreakingChangeAttribute(string deprecatedCmdletOutputType, string deprecateByVersion) : - base(string.Empty, deprecateByVersion) + public OutputBreakingChangeAttribute(string deprecatedCmdletOutputType, string deprecateByAzVersion, string deprecateByVersion) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion) { this.DeprecatedCmdLetOutputType = deprecatedCmdletOutputType; } - public OutputBreakingChangeAttribute(string deprecatedCmdletOutputType, string deprecateByVersion, string changeInEfectByDate) : - base(string.Empty, deprecateByVersion, changeInEfectByDate) + public OutputBreakingChangeAttribute(string deprecatedCmdletOutputType, string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion, changeInEfectByDate) { this.DeprecatedCmdLetOutputType = deprecatedCmdletOutputType; } diff --git a/src/NetworkFunction/NetworkFunction.Autorest/generated/runtime/MessageAttributeHelper.cs b/src/NetworkFunction/NetworkFunction.Autorest/generated/runtime/MessageAttributeHelper.cs index 7d2638a4138f..f2a07683ae6a 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/generated/runtime/MessageAttributeHelper.cs +++ b/src/NetworkFunction/NetworkFunction.Autorest/generated/runtime/MessageAttributeHelper.cs @@ -35,7 +35,7 @@ public class MessageAttributeHelper * the boundParameterNames is a list of parameters bound to the cmdlet at runtime, * We only process the Parameter beaking change attributes attached only params listed in this list (if present) * */ - public static void ProcessCustomAttributesAtRuntime(CommandInfo commandInfo, InvocationInfo invocationInfo, String parameterSet, System.Management.Automation.PSCmdlet psCmdlet) + public static void ProcessCustomAttributesAtRuntime(CommandInfo commandInfo, InvocationInfo invocationInfo, String parameterSet, System.Management.Automation.PSCmdlet psCmdlet, bool showPreviewMessage = true) { bool supressWarningOrError = false; @@ -57,36 +57,49 @@ public static void ProcessCustomAttributesAtRuntime(CommandInfo commandInfo, Inv { psCmdlet.WriteWarning("The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription."); } + + ProcessBreakingChangeAttributesAtRuntime(commandInfo, invocationInfo, parameterSet, psCmdlet); + + } + + private static void ProcessBreakingChangeAttributesAtRuntime(CommandInfo commandInfo, InvocationInfo invocationInfo, String parameterSet, System.Management.Automation.PSCmdlet psCmdlet) + { List attributes = new List(GetAllBreakingChangeAttributesInType(commandInfo, invocationInfo, parameterSet)); StringBuilder sb = new StringBuilder(); - Action appendBreakingChangeInfo = (string s) => sb.Append(s); + Action appendAttributeMessage = (string s) => sb.Append(s); if (attributes != null && attributes.Count > 0) { - appendBreakingChangeInfo(string.Format(Resources.BreakingChangesAttributesHeaderMessage, commandInfo.Name.Split('_')[0])); + appendAttributeMessage(string.Format(Resources.BreakingChangesAttributesHeaderMessage, commandInfo.Name.Split('_')[0])); foreach (GenericBreakingChangeAttribute attribute in attributes) { - attribute.PrintCustomAttributeInfo(appendBreakingChangeInfo); + attribute.PrintCustomAttributeInfo(appendAttributeMessage); } - appendBreakingChangeInfo(string.Format(Resources.BreakingChangesAttributesFooterMessage, BREAKING_CHANGE_ATTRIBUTE_INFORMATION_LINK)); + appendAttributeMessage(string.Format(Resources.BreakingChangesAttributesFooterMessage, BREAKING_CHANGE_ATTRIBUTE_INFORMATION_LINK)); psCmdlet.WriteWarning(sb.ToString()); } + } + + public static void ProcessPreviewMessageAttributesAtRuntime(CommandInfo commandInfo, InvocationInfo invocationInfo, String parameterSet, System.Management.Automation.PSCmdlet psCmdlet) + { List previewAttributes = new List(GetAllPreviewAttributesInType(commandInfo, invocationInfo)); + StringBuilder sb = new StringBuilder(); + Action appendAttributeMessage = (string s) => sb.Append(s); if (previewAttributes != null && previewAttributes.Count > 0) { foreach (PreviewMessageAttribute attribute in previewAttributes) { - attribute.PrintCustomAttributeInfo(psCmdlet); + attribute.PrintCustomAttributeInfo(appendAttributeMessage); } + psCmdlet.WriteWarning(sb.ToString()); } } - /** * This function takes in a CommandInfo (CmdletInfo or FunctionInfo) * And returns all the deprecation attributes attached to it @@ -128,6 +141,12 @@ private static IEnumerable GetAllBreakingChangeA } return invocationInfo == null ? attributeList : attributeList.Where(e => e.GetType() == typeof(ParameterSetBreakingChangeAttribute) ? ((ParameterSetBreakingChangeAttribute)e).IsApplicableToInvocation(invocationInfo, parameterSet) : e.IsApplicableToInvocation(invocationInfo)); } + + public static bool ContainsPreviewAttribute(CommandInfo commandInfo, InvocationInfo invocationInfo) + { + return GetAllPreviewAttributesInType(commandInfo, invocationInfo)?.Count() > 0; + } + private static IEnumerable GetAllPreviewAttributesInType(CommandInfo commandInfo, InvocationInfo invocationInfo) { List attributeList = new List(); diff --git a/src/NetworkFunction/NetworkFunction.Autorest/generated/runtime/Properties/Resources.Designer.cs b/src/NetworkFunction/NetworkFunction.Autorest/generated/runtime/Properties/Resources.Designer.cs index 8aeda47075a5..8e300ddb8e2a 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/generated/runtime/Properties/Resources.Designer.cs +++ b/src/NetworkFunction/NetworkFunction.Autorest/generated/runtime/Properties/Resources.Designer.cs @@ -734,7 +734,7 @@ public static string BreakingChangesAttributesInEffectByDateMessage } /// - /// Looks up a localized string similar to Note :The change is expected to take effect from the version : '{0}' + /// Looks up a localized string similar to Note :The change is expected to take effect from version : '{0}' /// ///. /// @@ -746,6 +746,19 @@ public static string BreakingChangesAttributesInEffectByVersion } } + /// + /// Looks up a localized string similar to Note :The change is expected to take effect from az version : '{0}' + /// + ///. + /// + public static string BreakingChangesAttributesInEffectByAzVersion + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesInEffectByAzVersion", resourceCulture); + } + } + /// /// Looks up a localized string similar to ```powershell ///# Old @@ -3122,7 +3135,16 @@ public static string PortalInstructionsGit } /// - /// Looks up a localized string similar to This cmdlet is in preview. The functionality may not be available in the selected subscription. + /// Looks up a localized string similar to The estimated generally available date is '{0}'.. + /// + public static string PreviewCmdletETAMessage { + get { + return ResourceManager.GetString("PreviewCmdletETAMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This cmdlet is in preview. Its behavior is subject to change based on customer feedback.. /// public static string PreviewCmdletMessage { @@ -5630,4 +5652,4 @@ public static string YesHint } } } -} +} \ No newline at end of file diff --git a/src/NetworkFunction/NetworkFunction.Autorest/generated/runtime/Properties/Resources.resx b/src/NetworkFunction/NetworkFunction.Autorest/generated/runtime/Properties/Resources.resx index 598cd53e958a..a08a2e50172b 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/generated/runtime/Properties/Resources.resx +++ b/src/NetworkFunction/NetworkFunction.Autorest/generated/runtime/Properties/Resources.resx @@ -1705,7 +1705,7 @@ Use the Enable-AzureDataCollection cmdlet to turn the feature On. The cmdlet can -- The change is expected to take effect from the version : '{0}' +- The change is expected to take effect from version : '{0}' ```powershell @@ -1736,6 +1736,12 @@ The type of the parameter is changing from '{0}' to '{1}'. Note : Go to {0} for steps to suppress this breaking change warning, and other information on breaking changes in Azure PowerShell. - This cmdlet is in preview. The functionality may not be available in the selected subscription. + This cmdlet is in preview. Its behavior is subject to change based on customer feedback. + + + The estimated generally available date is '{0}'. + + + - The change is expected to take effect from Az version : '{0}' \ No newline at end of file diff --git a/src/NetworkFunction/NetworkFunction.Autorest/help/Az.NetworkFunction.md b/src/NetworkFunction/NetworkFunction.Autorest/help/Az.NetworkFunction.md new file mode 100644 index 000000000000..0492f31d673a --- /dev/null +++ b/src/NetworkFunction/NetworkFunction.Autorest/help/Az.NetworkFunction.md @@ -0,0 +1,43 @@ +--- +Module Name: Az.NetworkFunction +Module Guid: 1d339b1c-5a86-4fbd-9a2e-d0497c39b397 +Download Help Link: https://learn.microsoft.com/powershell/module/az.networkfunction +Help Version: 1.0.0.0 +Locale: en-US +--- + +# Az.NetworkFunction Module +## Description +Microsoft Azure PowerShell: NetworkFunction cmdlets + +## Az.NetworkFunction Cmdlets +### [Get-AzNetworkFunctionCollectorPolicy](Get-AzNetworkFunctionCollectorPolicy.md) +Gets the collector policy in a specified Traffic Collector + +### [Get-AzNetworkFunctionTrafficCollector](Get-AzNetworkFunctionTrafficCollector.md) +Gets the specified Azure Traffic Collector in a specified resource group + +### [New-AzNetworkFunctionCollectorPolicy](New-AzNetworkFunctionCollectorPolicy.md) +Creates or updates a Collector Policy resource + +### [New-AzNetworkFunctionTrafficCollector](New-AzNetworkFunctionTrafficCollector.md) +Creates or updates a Azure Traffic Collector resource + +### [Remove-AzNetworkFunctionCollectorPolicy](Remove-AzNetworkFunctionCollectorPolicy.md) +Deletes a specified Collector Policy resource. + +### [Remove-AzNetworkFunctionTrafficCollector](Remove-AzNetworkFunctionTrafficCollector.md) +Deletes a specified Azure Traffic Collector resource. + +### [Update-AzNetworkFunctionCollectorPolicy](Update-AzNetworkFunctionCollectorPolicy.md) +Creates or updates a Collector Policy resource + +### [Update-AzNetworkFunctionCollectorPolicyTag](Update-AzNetworkFunctionCollectorPolicyTag.md) +Updates the specified Collector Policy tags. + +### [Update-AzNetworkFunctionTrafficCollector](Update-AzNetworkFunctionTrafficCollector.md) +Creates or updates a Azure Traffic Collector resource + +### [Update-AzNetworkFunctionTrafficCollectorTag](Update-AzNetworkFunctionTrafficCollectorTag.md) +Updates the specified Azure Traffic Collector tags. + diff --git a/src/NetworkFunction/NetworkFunction.Autorest/help/Get-AzNetworkFunctionCollectorPolicy.md b/src/NetworkFunction/NetworkFunction.Autorest/help/Get-AzNetworkFunctionCollectorPolicy.md new file mode 100644 index 000000000000..26787ee4cb76 --- /dev/null +++ b/src/NetworkFunction/NetworkFunction.Autorest/help/Get-AzNetworkFunctionCollectorPolicy.md @@ -0,0 +1,182 @@ +--- +external help file: +Module Name: Az.NetworkFunction +online version: https://learn.microsoft.com/powershell/module/az.networkfunction/get-aznetworkfunctioncollectorpolicy +schema: 2.0.0 +--- + +# Get-AzNetworkFunctionCollectorPolicy + +## SYNOPSIS +Gets the collector policy in a specified Traffic Collector + +## SYNTAX + +### List (Default) +``` +Get-AzNetworkFunctionCollectorPolicy -AzureTrafficCollectorName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzNetworkFunctionCollectorPolicy -AzureTrafficCollectorName -Name + -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzNetworkFunctionCollectorPolicy -InputObject [-DefaultProfile ] + [] +``` + +## DESCRIPTION +Gets the collector policy in a specified Traffic Collector + +## EXAMPLES + +### Example 1: Get list of collector policies by atc name and resource group +```powershell +Get-AzNetworkFunctionCollectorPolicy -AzureTrafficCollectorName test -resourcegroupname test | Format-List +``` + +```output +Name : cp1 +Etag : cf0336a2-7454-4aa4-add9-1de3e2291143 +Id : /subscriptions/subid/resourceGroups/test/providers/Microsoft.NetworkFunction/azureTrafficCollectors/test/collectorPolicies/cp1 +Type : Microsoft.NetworkFunction/azureTrafficCollectors/collectorPolicies +Properties : { + "ingestionPolicy": { + "ingestionType": "IPFIX", + "ingestionSources": [ + { + "resourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRouteCircuits/circuitName", + "sourceType": "Resource" + } + ] + }, + "emissionPolicies": [ + { + "emissionType": "IPFIX", + "emissionDestinations": [ + { + "destinationType": "AzureMonitor" + } + ] + } + ], + "provisioningState": "Succeeded" + } +``` + +This cmdlet gets list of traffic collector policies by atc name and resource group. + +## PARAMETERS + +### -AzureTrafficCollectorName +Azure Traffic Collector name + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Collector Policy Name + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: CollectorPolicyName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Azure Subscription ID. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.ICollectorPolicy + +## NOTES + +## RELATED LINKS + diff --git a/src/NetworkFunction/NetworkFunction.Autorest/help/Get-AzNetworkFunctionTrafficCollector.md b/src/NetworkFunction/NetworkFunction.Autorest/help/Get-AzNetworkFunctionTrafficCollector.md new file mode 100644 index 000000000000..b8dc51c3294d --- /dev/null +++ b/src/NetworkFunction/NetworkFunction.Autorest/help/Get-AzNetworkFunctionTrafficCollector.md @@ -0,0 +1,200 @@ +--- +external help file: +Module Name: Az.NetworkFunction +online version: https://learn.microsoft.com/powershell/module/az.networkfunction/get-aznetworkfunctiontrafficcollector +schema: 2.0.0 +--- + +# Get-AzNetworkFunctionTrafficCollector + +## SYNOPSIS +Gets the specified Azure Traffic Collector in a specified resource group + +## SYNTAX + +### List (Default) +``` +Get-AzNetworkFunctionTrafficCollector [-SubscriptionId ] [-DefaultProfile ] + [] +``` + +### Get +``` +Get-AzNetworkFunctionTrafficCollector -Name -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzNetworkFunctionTrafficCollector -InputObject [-DefaultProfile ] + [] +``` + +### List1 +``` +Get-AzNetworkFunctionTrafficCollector -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Gets the specified Azure Traffic Collector in a specified resource group + +## EXAMPLES + +### Example 1: Get list of traffic collectors in selected subscription +```powershell +Get-AzNetworkFunctionTrafficCollector | Format-List +``` + +```output +CollectorPolicies : {} +Etag : cf0336a2-7454-4aa4-add9-1de3e2291143 +Id : /subscriptions/62364504-2406-418e-971c-05822ff72fad/resourceGroups/atcTest/providers/Microsoft.NetworkFunction/azureTrafficCollectors/pstestjuly18 +Location : eastus +Name : pstestjuly18 +ProvisioningState : Failed +Tags : Microsoft.Azure.PowerShell.Cmdlets.AzureTrafficCollector.Models.ResourceTags +Type : Microsoft.NetworkFunction/AzureTrafficCollectors + +CollectorPolicies : {} +Etag : cedea0e9-e9e4-4b2e-816f-dad184d6b424 +Id : /subscriptions/62364504-2406-418e-971c-05822ff72fad/resourceGroups/atcTest/providers/Microsoft.NetworkFunction/azureTrafficCollectors/newpsatc +Location : eastus +Name : newpsatc +ProvisioningState : Succeeded +Tags : Microsoft.Azure.PowerShell.Cmdlets.AzureTrafficCollector.Models.ResourceTags +Type : Microsoft.NetworkFunction/AzureTrafficCollectors +``` + +This cmdlet gets list of traffic collectors in selected subscription. + +### Example 2: Get list of traffic collectors by resource group +```powershell +Get-AzNetworkFunctionTrafficCollector -ResourceGroupName test | Format-List +``` + +```output +CollectorPolicies : {} +Etag : cedea0e9-e9e4-4b2e-816f-dad184d6b424 +Id : /subscriptions/62364504-2406-418e-971c-05822ff72fad/resourceGroups/test/providers/Microsoft.NetworkFunction/azureTrafficCollectors/newpsatc +Location : eastus +Name : newpsatc +ProvisioningState : Succeeded +Tags : Microsoft.Azure.PowerShell.Cmdlets.AzureTrafficCollector.Models.ResourceTags +Type : Microsoft.NetworkFunction/AzureTrafficCollectors +``` + +This cmdlet gets list of traffic collectors by resource group. + +### Example 3: Get list of traffic collectors by name +```powershell +Get-AzNetworkFunctionTrafficCollector -ResourceGroupName test -name test | Format-List +``` + +```output +CollectorPolicies : {} +Etag : cedea0e9-e9e4-4b2e-816f-dad184d6b424 +Id : /subscriptions/62364504-2406-418e-971c-05822ff72fad/resourceGroups/test/providers/Microsoft.NetworkFunction/azureTrafficCollectors/test +Location : eastus +Name : newpsatc +ProvisioningState : Succeeded +Tags : Microsoft.Azure.PowerShell.Cmdlets.AzureTrafficCollector.Models.ResourceTags +Type : Microsoft.NetworkFunction/AzureTrafficCollectors +``` + +This cmdlet gets list of traffic collectors by name. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Azure Traffic Collector name + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: AzureTrafficCollectorName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. + +```yaml +Type: System.String +Parameter Sets: Get, List1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Azure Subscription ID. + +```yaml +Type: System.String[] +Parameter Sets: Get, List, List1 +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.IAzureTrafficCollector + +## NOTES + +## RELATED LINKS + diff --git a/src/NetworkFunction/NetworkFunction.Autorest/help/New-AzNetworkFunctionCollectorPolicy.md b/src/NetworkFunction/NetworkFunction.Autorest/help/New-AzNetworkFunctionCollectorPolicy.md new file mode 100644 index 000000000000..bd35f89eee26 --- /dev/null +++ b/src/NetworkFunction/NetworkFunction.Autorest/help/New-AzNetworkFunctionCollectorPolicy.md @@ -0,0 +1,292 @@ +--- +external help file: +Module Name: Az.NetworkFunction +online version: https://learn.microsoft.com/powershell/module/az.networkfunction/new-aznetworkfunctioncollectorpolicy +schema: 2.0.0 +--- + +# New-AzNetworkFunctionCollectorPolicy + +## SYNOPSIS +Creates or updates a Collector Policy resource + +## SYNTAX + +``` +New-AzNetworkFunctionCollectorPolicy -AzureTrafficCollectorName -Name + -ResourceGroupName -Location [-SubscriptionId ] + [-EmissionPolicy ] + [-IngestionPolicyIngestionSource ] + [-IngestionPolicyIngestionType ] [-Tag ] [-DefaultProfile ] [-AsJob] + [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Creates or updates a Collector Policy resource + +## EXAMPLES + +### Example 1: Create a new traffic collector policy +```powershell +New-AzNetworkFunctionCollectorPolicy -collectorpolicyname cp1 -azuretrafficcollectorname atc -resourcegroupname rg1 -location eastus | Format-List +``` + +```output +Name : cp1 +Etag : cf0336a2-7454-4aa4-add9-1de3e2291143 +Id : /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.NetworkFunction/azureTrafficCollectors/atc/collectorPolicies/cp1 +Type : Microsoft.NetworkFunction/azureTrafficCollectors/collectorPolicies +Properties : { + "ingestionPolicy": { + "ingestionType": "IPFIX", + "ingestionSources": [ + { + "resourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRouteCircuits/circuitName", + "sourceType": "Resource" + } + ] + }, + "emissionPolicies": [ + { + "emissionType": "IPFIX", + "emissionDestinations": [ + { + "destinationType": "AzureMonitor" + } + ] + } + ], + "provisioningState": "Succeeded" + } +``` + +This cmdlet creates a new traffic collector policy. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AzureTrafficCollectorName +Azure Traffic Collector name + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EmissionPolicy +Emission policies. +To construct, see NOTES section for EMISSIONPOLICY properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.IEmissionPoliciesPropertiesFormat[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IngestionPolicyIngestionSource +Ingestion Sources. +To construct, see NOTES section for INGESTIONPOLICYINGESTIONSOURCE properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.IIngestionSourcesPropertiesFormat[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IngestionPolicyIngestionType +The ingestion type. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Location +Resource location. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Collector Policy Name + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: CollectorPolicyName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Azure Subscription ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Resource tags. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.ICollectorPolicy + +## NOTES + +## RELATED LINKS + diff --git a/src/NetworkFunction/NetworkFunction.Autorest/help/New-AzNetworkFunctionTrafficCollector.md b/src/NetworkFunction/NetworkFunction.Autorest/help/New-AzNetworkFunctionTrafficCollector.md new file mode 100644 index 000000000000..02de1eb6cc98 --- /dev/null +++ b/src/NetworkFunction/NetworkFunction.Autorest/help/New-AzNetworkFunctionTrafficCollector.md @@ -0,0 +1,210 @@ +--- +external help file: +Module Name: Az.NetworkFunction +online version: https://learn.microsoft.com/powershell/module/az.networkfunction/new-aznetworkfunctiontrafficcollector +schema: 2.0.0 +--- + +# New-AzNetworkFunctionTrafficCollector + +## SYNOPSIS +Creates or updates a Azure Traffic Collector resource + +## SYNTAX + +``` +New-AzNetworkFunctionTrafficCollector -Name -ResourceGroupName -Location + [-SubscriptionId ] [-Tag ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-WhatIf] [] +``` + +## DESCRIPTION +Creates or updates a Azure Traffic Collector resource + +## EXAMPLES + +### Example 1: Create a new traffic collector +```powershell +New-AzNetworkFunctionTrafficCollector -name atctestps -resourcegroupname test -location eastus | Format-List +``` + +```output +CollectorPolicies : {} +Etag : cf0336a2-7454-4aa4-add9-1de3e2291143 +Id : /subscriptions/62364504-2406-418e-971c-05822ff72fad/resourceGroups/test/providers/Microsoft.NetworkFunction/azureTrafficCollectors/atctestps +Location : eastus +Name : atctestps +ProvisioningState : Succeeded +Tags : Microsoft.Azure.PowerShell.Cmdlets.AzureTrafficCollector.Models.ResourceTags +Type : Microsoft.NetworkFunction/AzureTrafficCollectors +``` + +This cmdlet creates a new traffic collector. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Location +Resource location. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Azure Traffic Collector name + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: AzureTrafficCollectorName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Azure Subscription ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Resource tags. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.IAzureTrafficCollector + +## NOTES + +## RELATED LINKS + diff --git a/src/NetworkFunction/NetworkFunction.Autorest/help/README.md b/src/NetworkFunction/NetworkFunction.Autorest/help/README.md new file mode 100644 index 000000000000..78ff9239d4bc --- /dev/null +++ b/src/NetworkFunction/NetworkFunction.Autorest/help/README.md @@ -0,0 +1,11 @@ +# Docs +This directory contains the documentation of the cmdlets for the `Az.NetworkFunction` module. To run documentation generation, use the `generate-help.ps1` script at the root module folder. Files in this folder will *always be overridden on regeneration*. To update documentation examples, please use the `..\examples` folder. + +## Info +- Modifiable: no +- Generated: all +- Committed: yes +- Packaged: yes + +## Details +The process of documentation generation loads `Az.NetworkFunction` and analyzes the exported cmdlets from the module. It recognizes the [help comments](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) that are generated into the scripts in the `..\exports` folder. Additionally, when writing custom cmdlets in the `..\custom` folder, you can use the help comments syntax, which decorate the exported scripts at build-time. The documentation examples are taken from the `..\examples` folder. \ No newline at end of file diff --git a/src/NetworkFunction/NetworkFunction.Autorest/help/Remove-AzNetworkFunctionCollectorPolicy.md b/src/NetworkFunction/NetworkFunction.Autorest/help/Remove-AzNetworkFunctionCollectorPolicy.md new file mode 100644 index 000000000000..fc1f5a124c85 --- /dev/null +++ b/src/NetworkFunction/NetworkFunction.Autorest/help/Remove-AzNetworkFunctionCollectorPolicy.md @@ -0,0 +1,224 @@ +--- +external help file: +Module Name: Az.NetworkFunction +online version: https://learn.microsoft.com/powershell/module/az.networkfunction/remove-aznetworkfunctioncollectorpolicy +schema: 2.0.0 +--- + +# Remove-AzNetworkFunctionCollectorPolicy + +## SYNOPSIS +Deletes a specified Collector Policy resource. + +## SYNTAX + +### Delete (Default) +``` +Remove-AzNetworkFunctionCollectorPolicy -AzureTrafficCollectorName -Name + -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentity +``` +Remove-AzNetworkFunctionCollectorPolicy -InputObject [-DefaultProfile ] + [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Deletes a specified Collector Policy resource. + +## EXAMPLES + +### Example 1: Delete a new traffic collector policy +```powershell +Remove-AzNetworkFunctionCollectorPolicy -azuretrafficcollectorname atctestps -collectorpolicyname cp1 -resourcegroupname test +``` + +This cmdlet deletes a traffic collector policy. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AzureTrafficCollectorName +Azure Traffic Collector name + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Collector Policy Name + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: CollectorPolicyName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Azure Subscription ID. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/src/NetworkFunction/NetworkFunction.Autorest/help/Remove-AzNetworkFunctionTrafficCollector.md b/src/NetworkFunction/NetworkFunction.Autorest/help/Remove-AzNetworkFunctionTrafficCollector.md new file mode 100644 index 000000000000..bce40c8d5cef --- /dev/null +++ b/src/NetworkFunction/NetworkFunction.Autorest/help/Remove-AzNetworkFunctionTrafficCollector.md @@ -0,0 +1,208 @@ +--- +external help file: +Module Name: Az.NetworkFunction +online version: https://learn.microsoft.com/powershell/module/az.networkfunction/remove-aznetworkfunctiontrafficcollector +schema: 2.0.0 +--- + +# Remove-AzNetworkFunctionTrafficCollector + +## SYNOPSIS +Deletes a specified Azure Traffic Collector resource. + +## SYNTAX + +### Delete (Default) +``` +Remove-AzNetworkFunctionTrafficCollector -Name -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentity +``` +Remove-AzNetworkFunctionTrafficCollector -InputObject [-DefaultProfile ] + [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Deletes a specified Azure Traffic Collector resource. + +## EXAMPLES + +### Example 1: Delete a new traffic collector +```powershell +Remove-AzNetworkFunctionTrafficCollector -name atctestps -resourcegroupname SEA-Cust10 +``` + +This cmdlet deletes a traffic collector. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Azure Traffic Collector name + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: AzureTrafficCollectorName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Azure Subscription ID. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/src/NetworkFunction/NetworkFunction.Autorest/help/Update-AzNetworkFunctionCollectorPolicy.md b/src/NetworkFunction/NetworkFunction.Autorest/help/Update-AzNetworkFunctionCollectorPolicy.md new file mode 100644 index 000000000000..f8e615284ea0 --- /dev/null +++ b/src/NetworkFunction/NetworkFunction.Autorest/help/Update-AzNetworkFunctionCollectorPolicy.md @@ -0,0 +1,292 @@ +--- +external help file: +Module Name: Az.NetworkFunction +online version: https://learn.microsoft.com/powershell/module/az.networkfunction/update-aznetworkfunctioncollectorpolicy +schema: 2.0.0 +--- + +# Update-AzNetworkFunctionCollectorPolicy + +## SYNOPSIS +Creates or updates a Collector Policy resource + +## SYNTAX + +``` +Update-AzNetworkFunctionCollectorPolicy -AzureTrafficCollectorName -Name + -ResourceGroupName -Location [-SubscriptionId ] + [-EmissionPolicy ] + [-IngestionPolicyIngestionSource ] + [-IngestionPolicyIngestionType ] [-Tag ] [-DefaultProfile ] [-AsJob] + [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Creates or updates a Collector Policy resource + +## EXAMPLES + +### Example 1: Update a traffic collector policy +```powershell +Update-AzNetworkFunctionCollectorPolicy -collectorpolicyname cp1 -azuretrafficcollectorname atc -resourcegroupname rg1 -location eastus | Format-List +``` + +```output +Name : cp1 +Etag : cf0336a2-7454-4aa4-add9-1de3e2291143 +Id : /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.NetworkFunction/azureTrafficCollectors/atc/collectorPolicies/cp1 +Type : Microsoft.NetworkFunction/azureTrafficCollectors/collectorPolicies +Properties : { + "ingestionPolicy": { + "ingestionType": "IPFIX", + "ingestionSources": [ + { + "resourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRouteCircuits/circuitName", + "sourceType": "Resource" + } + ] + }, + "emissionPolicies": [ + { + "emissionType": "IPFIX", + "emissionDestinations": [ + { + "destinationType": "AzureMonitor" + } + ] + } + ], + "provisioningState": "Succeeded" + } +``` + +This cmdlet updates a traffic collector policy. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AzureTrafficCollectorName +Azure Traffic Collector name + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EmissionPolicy +Emission policies. +To construct, see NOTES section for EMISSIONPOLICY properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.IEmissionPoliciesPropertiesFormat[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IngestionPolicyIngestionSource +Ingestion Sources. +To construct, see NOTES section for INGESTIONPOLICYINGESTIONSOURCE properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.IIngestionSourcesPropertiesFormat[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IngestionPolicyIngestionType +The ingestion type. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Location +Resource location. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Collector Policy Name + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: CollectorPolicyName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Azure Subscription ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Resource tags. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.ICollectorPolicy + +## NOTES + +## RELATED LINKS + diff --git a/src/NetworkFunction/NetworkFunction.Autorest/help/Update-AzNetworkFunctionCollectorPolicyTag.md b/src/NetworkFunction/NetworkFunction.Autorest/help/Update-AzNetworkFunctionCollectorPolicyTag.md new file mode 100644 index 000000000000..a49353477677 --- /dev/null +++ b/src/NetworkFunction/NetworkFunction.Autorest/help/Update-AzNetworkFunctionCollectorPolicyTag.md @@ -0,0 +1,228 @@ +--- +external help file: +Module Name: Az.NetworkFunction +online version: https://learn.microsoft.com/powershell/module/az.networkfunction/update-aznetworkfunctioncollectorpolicytag +schema: 2.0.0 +--- + +# Update-AzNetworkFunctionCollectorPolicyTag + +## SYNOPSIS +Updates the specified Collector Policy tags. + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzNetworkFunctionCollectorPolicyTag -AzureTrafficCollectorName -CollectorPolicyName + -ResourceGroupName [-SubscriptionId ] [-Tag ] [-DefaultProfile ] + [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzNetworkFunctionCollectorPolicyTag -InputObject [-Tag ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Updates the specified Collector Policy tags. + +## EXAMPLES + +### Example 1: Updates a traffic collector tag +```powershell +Update-AzNetworkFunctionCollectorPolicyTag -collectorpolicyname cp1 -azuretrafficcollectorname atc -resourcegroupname rg1 | Format-List +``` + +```output +Name : cp1 +Etag : 72090554-7e3b-43f2-80ad-99a9020dcb11 +Id : /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.NetworkFunction/azureTrafficCollectors/atc/collectorPolicies/cp1 +Type : Microsoft.NetworkFunction/azureTrafficCollectors/collectorPolicies +Location : West US +Tags : { + "key1": "value1", + "key2": "value2" + } +Properties : { + "ingestionPolicy": { + "ingestionType": "IPFIX", + "ingestionSources": [ + { + "resourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRouteCircuits/circuitName", + "sourceType": "Resource" + } + ] + }, + "emissionPolicies": [ + { + "emissionType": "IPFIX", + "emissionDestinations": [ + { + "destinationType": "AzureMonitor" + } + ] + } + ], + "provisioningState": "Succeeded" + } +``` + +This cmdlet updates a collector policy tag. + +## PARAMETERS + +### -AzureTrafficCollectorName +Azure Traffic Collector name + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CollectorPolicyName +Collector Policy Name + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Azure Subscription ID. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Resource tags. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.ICollectorPolicy + +## NOTES + +## RELATED LINKS + diff --git a/src/NetworkFunction/NetworkFunction.Autorest/help/Update-AzNetworkFunctionTrafficCollector.md b/src/NetworkFunction/NetworkFunction.Autorest/help/Update-AzNetworkFunctionTrafficCollector.md new file mode 100644 index 000000000000..500b4105aeed --- /dev/null +++ b/src/NetworkFunction/NetworkFunction.Autorest/help/Update-AzNetworkFunctionTrafficCollector.md @@ -0,0 +1,225 @@ +--- +external help file: +Module Name: Az.NetworkFunction +online version: https://learn.microsoft.com/powershell/module/az.networkfunction/update-aznetworkfunctiontrafficcollector +schema: 2.0.0 +--- + +# Update-AzNetworkFunctionTrafficCollector + +## SYNOPSIS +Creates or updates a Azure Traffic Collector resource + +## SYNTAX + +``` +Update-AzNetworkFunctionTrafficCollector -Name -ResourceGroupName -Location + [-SubscriptionId ] [-CollectorPolicy ] [-Tag ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Creates or updates a Azure Traffic Collector resource + +## EXAMPLES + +### Example 1: Updates a traffic collector +```powershell +Update-AzNetworkFunctionTrafficCollector -name atctestps -resourcegroupname test -location eastus | Format-List +``` + +```output +CollectorPolicies : {} +Etag : cf0336a2-7454-4aa4-add9-1de3e2291143 +Id : /subscriptions/62364504-2406-418e-971c-05822ff72fad/resourceGroups/test/providers/Microsoft.NetworkFunction/azureTrafficCollectors/atctestps +Location : eastus +Name : atctestps +ProvisioningState : Succeeded +Tags : Microsoft.Azure.PowerShell.Cmdlets.AzureTrafficCollector.Models.ResourceTags +Type : Microsoft.NetworkFunction/AzureTrafficCollectors +``` + +This cmdlet updates a traffic collector. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CollectorPolicy +Collector Policies for Azure Traffic Collector. +To construct, see NOTES section for COLLECTORPOLICY properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.ICollectorPolicy[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Location +Resource location. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Azure Traffic Collector name + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: AzureTrafficCollectorName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Azure Subscription ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Resource tags. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.IAzureTrafficCollector + +## NOTES + +## RELATED LINKS + diff --git a/src/NetworkFunction/NetworkFunction.Autorest/help/Update-AzNetworkFunctionTrafficCollectorTag.md b/src/NetworkFunction/NetworkFunction.Autorest/help/Update-AzNetworkFunctionTrafficCollectorTag.md new file mode 100644 index 000000000000..f73e22f76fc9 --- /dev/null +++ b/src/NetworkFunction/NetworkFunction.Autorest/help/Update-AzNetworkFunctionTrafficCollectorTag.md @@ -0,0 +1,195 @@ +--- +external help file: +Module Name: Az.NetworkFunction +online version: https://learn.microsoft.com/powershell/module/az.networkfunction/update-aznetworkfunctiontrafficcollectortag +schema: 2.0.0 +--- + +# Update-AzNetworkFunctionTrafficCollectorTag + +## SYNOPSIS +Updates the specified Azure Traffic Collector tags. + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzNetworkFunctionTrafficCollectorTag -AzureTrafficCollectorName -ResourceGroupName + [-SubscriptionId ] [-Tag ] [-DefaultProfile ] [-Confirm] [-WhatIf] + [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzNetworkFunctionTrafficCollectorTag -InputObject [-Tag ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Updates the specified Azure Traffic Collector tags. + +## EXAMPLES + +### Example 1: Updates a traffic collector tag +```powershell +Update-AzNetworkFunctionTrafficCollectorTag -azuretrafficcollectorname atc -resourcegroupname rg1 | Format-List +``` + +```output +Name : atc +Etag : cf0336a2-7454-4aa4-add9-1de3e2291143 +Id : /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.NetworkFunction/azureTrafficCollectors/atc +Type : Microsoft.NetworkFunction/azureTrafficCollectors +Location : West US +Tags : { + "key1": "value1", + "key2": "value2" + } +Properties : { + "collectorPolicies": [], + "provisioningState": "Succeeded" + } +``` + +This cmdlet updates a traffic collector tag. + +## PARAMETERS + +### -AzureTrafficCollectorName +Azure Traffic Collector name + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Azure Subscription ID. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Resource tags. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.IAzureTrafficCollector + +## NOTES + +## RELATED LINKS + diff --git a/src/NetworkFunction/NetworkFunction.Autorest/internal/New-AzNetworkFunctionCollectorPolicy.ps1 b/src/NetworkFunction/NetworkFunction.Autorest/internal/New-AzNetworkFunctionCollectorPolicy.ps1 index f31ce882ef60..13b0f7a21434 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/internal/New-AzNetworkFunctionCollectorPolicy.ps1 +++ b/src/NetworkFunction/NetworkFunction.Autorest/internal/New-AzNetworkFunctionCollectorPolicy.ps1 @@ -71,15 +71,17 @@ https://learn.microsoft.com/powershell/module/az.networkfunction/new-aznetworkfu #> function New-AzNetworkFunctionCollectorPolicy { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.ICollectorPolicy])] -[CmdletBinding(DefaultParameterSetName='CreateViaIdentity', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Create', Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] [System.String] # Azure Traffic Collector name ${AzureTrafficCollectorName}, [Parameter(ParameterSetName='Create', Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Alias('CollectorPolicyName')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] [System.String] @@ -87,12 +89,14 @@ param( ${Name}, [Parameter(ParameterSetName='Create', Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] [System.String] # The name of the resource group. ${ResourceGroupName}, [Parameter(ParameterSetName='Create')] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -115,12 +119,14 @@ param( # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] [System.String] # Resource location. ${Location}, + [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] @@ -129,6 +135,7 @@ param( # To construct, see NOTES section for EMISSIONPOLICY properties and create a hash table. ${EmissionPolicy}, + [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] @@ -137,6 +144,7 @@ param( # To construct, see NOTES section for INGESTIONPOLICYINGESTIONSOURCE properties and create a hash table. ${IngestionPolicyIngestionSource}, + [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType])] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] @@ -144,6 +152,7 @@ param( # The ingestion type. ${IngestionPolicyIngestionType}, + [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.ITrackedResourceTags]))] @@ -222,11 +231,18 @@ begin { $mapping = @{ Create = 'Az.NetworkFunction.private\New-AzNetworkFunctionCollectorPolicy_Create'; + CreateExpanded = 'Az.NetworkFunction.private\New-AzNetworkFunctionCollectorPolicy_CreateExpanded'; CreateViaIdentity = 'Az.NetworkFunction.private\New-AzNetworkFunctionCollectorPolicy_CreateViaIdentity'; CreateViaIdentityExpanded = 'Az.NetworkFunction.private\New-AzNetworkFunctionCollectorPolicy_CreateViaIdentityExpanded'; } - if (('Create') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + if (('Create', 'CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) diff --git a/src/NetworkFunction/NetworkFunction.Autorest/internal/New-AzNetworkFunctionTrafficCollector.ps1 b/src/NetworkFunction/NetworkFunction.Autorest/internal/New-AzNetworkFunctionTrafficCollector.ps1 index 91c844616c9e..236913edda3e 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/internal/New-AzNetworkFunctionTrafficCollector.ps1 +++ b/src/NetworkFunction/NetworkFunction.Autorest/internal/New-AzNetworkFunctionTrafficCollector.ps1 @@ -180,7 +180,13 @@ begin { CreateViaIdentityExpanded = 'Az.NetworkFunction.private\New-AzNetworkFunctionTrafficCollector_CreateViaIdentityExpanded'; } if (('Create') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) diff --git a/src/NetworkFunction/NetworkFunction.Autorest/internal/ProxyCmdletDefinitions.ps1 b/src/NetworkFunction/NetworkFunction.Autorest/internal/ProxyCmdletDefinitions.ps1 index ad13ac9550c0..e745fe408c18 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/internal/ProxyCmdletDefinitions.ps1 +++ b/src/NetworkFunction/NetworkFunction.Autorest/internal/ProxyCmdletDefinitions.ps1 @@ -181,15 +181,17 @@ https://learn.microsoft.com/powershell/module/az.networkfunction/new-aznetworkfu #> function New-AzNetworkFunctionCollectorPolicy { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.ICollectorPolicy])] -[CmdletBinding(DefaultParameterSetName='CreateViaIdentity', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Create', Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] [System.String] # Azure Traffic Collector name ${AzureTrafficCollectorName}, [Parameter(ParameterSetName='Create', Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Alias('CollectorPolicyName')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] [System.String] @@ -197,12 +199,14 @@ param( ${Name}, [Parameter(ParameterSetName='Create', Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] [System.String] # The name of the resource group. ${ResourceGroupName}, [Parameter(ParameterSetName='Create')] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -225,12 +229,14 @@ param( # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] [System.String] # Resource location. ${Location}, + [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] @@ -239,6 +245,7 @@ param( # To construct, see NOTES section for EMISSIONPOLICY properties and create a hash table. ${EmissionPolicy}, + [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] @@ -247,6 +254,7 @@ param( # To construct, see NOTES section for INGESTIONPOLICYINGESTIONSOURCE properties and create a hash table. ${IngestionPolicyIngestionSource}, + [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType])] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] @@ -254,6 +262,7 @@ param( # The ingestion type. ${IngestionPolicyIngestionType}, + [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20221101.ITrackedResourceTags]))] @@ -332,11 +341,18 @@ begin { $mapping = @{ Create = 'Az.NetworkFunction.private\New-AzNetworkFunctionCollectorPolicy_Create'; + CreateExpanded = 'Az.NetworkFunction.private\New-AzNetworkFunctionCollectorPolicy_CreateExpanded'; CreateViaIdentity = 'Az.NetworkFunction.private\New-AzNetworkFunctionCollectorPolicy_CreateViaIdentity'; CreateViaIdentityExpanded = 'Az.NetworkFunction.private\New-AzNetworkFunctionCollectorPolicy_CreateViaIdentityExpanded'; } - if (('Create') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + if (('Create', 'CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) @@ -535,7 +551,13 @@ begin { CreateViaIdentityExpanded = 'Az.NetworkFunction.private\New-AzNetworkFunctionTrafficCollector_CreateViaIdentityExpanded'; } if (('Create') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) @@ -763,7 +785,13 @@ begin { UpdateExpanded = 'Az.NetworkFunction.private\Set-AzNetworkFunctionCollectorPolicy_UpdateExpanded'; } if (('Update', 'UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) @@ -945,7 +973,13 @@ begin { UpdateExpanded = 'Az.NetworkFunction.private\Set-AzNetworkFunctionTrafficCollector_UpdateExpanded'; } if (('Update', 'UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) @@ -1115,7 +1149,13 @@ begin { UpdateViaIdentity = 'Az.NetworkFunction.private\Update-AzNetworkFunctionCollectorPolicyTag_UpdateViaIdentity'; } if (('Update') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) @@ -1279,7 +1319,13 @@ begin { UpdateViaIdentity = 'Az.NetworkFunction.private\Update-AzNetworkFunctionTrafficCollectorTag_UpdateViaIdentity'; } if (('Update') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) diff --git a/src/NetworkFunction/NetworkFunction.Autorest/internal/Set-AzNetworkFunctionCollectorPolicy.ps1 b/src/NetworkFunction/NetworkFunction.Autorest/internal/Set-AzNetworkFunctionCollectorPolicy.ps1 index f9b4f0e3ee36..c87a8e907154 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/internal/Set-AzNetworkFunctionCollectorPolicy.ps1 +++ b/src/NetworkFunction/NetworkFunction.Autorest/internal/Set-AzNetworkFunctionCollectorPolicy.ps1 @@ -209,7 +209,13 @@ begin { UpdateExpanded = 'Az.NetworkFunction.private\Set-AzNetworkFunctionCollectorPolicy_UpdateExpanded'; } if (('Update', 'UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) diff --git a/src/NetworkFunction/NetworkFunction.Autorest/internal/Set-AzNetworkFunctionTrafficCollector.ps1 b/src/NetworkFunction/NetworkFunction.Autorest/internal/Set-AzNetworkFunctionTrafficCollector.ps1 index d452340ef5ad..d215147940c9 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/internal/Set-AzNetworkFunctionTrafficCollector.ps1 +++ b/src/NetworkFunction/NetworkFunction.Autorest/internal/Set-AzNetworkFunctionTrafficCollector.ps1 @@ -163,7 +163,13 @@ begin { UpdateExpanded = 'Az.NetworkFunction.private\Set-AzNetworkFunctionTrafficCollector_UpdateExpanded'; } if (('Update', 'UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) diff --git a/src/NetworkFunction/NetworkFunction.Autorest/internal/Update-AzNetworkFunctionCollectorPolicyTag.ps1 b/src/NetworkFunction/NetworkFunction.Autorest/internal/Update-AzNetworkFunctionCollectorPolicyTag.ps1 index d73758a65b66..a13803a08df4 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/internal/Update-AzNetworkFunctionCollectorPolicyTag.ps1 +++ b/src/NetworkFunction/NetworkFunction.Autorest/internal/Update-AzNetworkFunctionCollectorPolicyTag.ps1 @@ -151,7 +151,13 @@ begin { UpdateViaIdentity = 'Az.NetworkFunction.private\Update-AzNetworkFunctionCollectorPolicyTag_UpdateViaIdentity'; } if (('Update') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) diff --git a/src/NetworkFunction/NetworkFunction.Autorest/internal/Update-AzNetworkFunctionTrafficCollectorTag.ps1 b/src/NetworkFunction/NetworkFunction.Autorest/internal/Update-AzNetworkFunctionTrafficCollectorTag.ps1 index 74e81d24a175..da58fa1c47aa 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/internal/Update-AzNetworkFunctionTrafficCollectorTag.ps1 +++ b/src/NetworkFunction/NetworkFunction.Autorest/internal/Update-AzNetworkFunctionTrafficCollectorTag.ps1 @@ -145,7 +145,13 @@ begin { UpdateViaIdentity = 'Az.NetworkFunction.private\Update-AzNetworkFunctionTrafficCollectorTag_UpdateViaIdentity'; } if (('Update') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) diff --git a/src/NetworkFunction/NetworkFunction.Autorest/test-module.ps1 b/src/NetworkFunction/NetworkFunction.Autorest/test-module.ps1 index 1daedb6a7a98..1a4782db1113 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/test-module.ps1 +++ b/src/NetworkFunction/NetworkFunction.Autorest/test-module.ps1 @@ -74,13 +74,14 @@ try if ($TestMode -ne 'playback') { setupEnv + } else { + $env:AzPSAutorestTestPlaybackMode = $true } $testFolder = Join-Path $PSScriptRoot 'test' if ($null -ne $TestName) { Invoke-Pester -Script @{ Path = $testFolder } -TestName $TestName -ExcludeTag $ExcludeTag -EnableExit -OutputFile (Join-Path $testFolder "$moduleName-TestResults.xml") - } else - { + } else { Invoke-Pester -Script @{ Path = $testFolder } -ExcludeTag $ExcludeTag -EnableExit -OutputFile (Join-Path $testFolder "$moduleName-TestResults.xml") } } Finally @@ -89,6 +90,9 @@ try { cleanupEnv } + else { + $env:AzPSAutorestTestPlaybackMode = '' + } } Write-Host -ForegroundColor Green '-------------Done-------------' \ No newline at end of file diff --git a/src/NetworkFunction/NetworkFunction.Autorest/test/New-AzNetworkFunctionCollectorPolicy.Tests.ps1 b/src/NetworkFunction/NetworkFunction.Autorest/test/New-AzNetworkFunctionCollectorPolicy.Tests.ps1 index 3a2d8caab562..570054154703 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/test/New-AzNetworkFunctionCollectorPolicy.Tests.ps1 +++ b/src/NetworkFunction/NetworkFunction.Autorest/test/New-AzNetworkFunctionCollectorPolicy.Tests.ps1 @@ -15,19 +15,33 @@ if(($null -eq $TestName) -or ($TestName -contains 'New-AzNetworkFunctionCollecto } Describe 'New-AzNetworkFunctionCollectorPolicy' { - It 'CreateExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw + It 'CreateExpanded' { + { + { New-AzNetworkFunctionCollectorPolicy -collectorpolicyname $env.collectorPolicyName -azuretrafficcollectorname $env.azureTrafficCollectorName -resourcegroupname $env.resourceGroup -location $env.location -IngestionPolicyIngestionSource @{ResourceId = $env.ResourceId1G} -IngestionPolicyIngestionType $env.IngestionType } | Should -Not -Throw + } } - It 'Create' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw + It 'CreateExpanded1' { + { + { New-AzNetworkFunctionCollectorPolicy -collectorpolicyname $env.collectorPolicyName -azuretrafficcollectorname $env.azureTrafficCollectorName -resourcegroupname $env.resourceGroup -location $env.location -IngestionPolicyIngestionSource @{ResourceId = $env.ResourceIdLessThan1G} -IngestionPolicyIngestionType $env.IngestionType } | Should -Throw -ExpectedMessage "CollectorPolicy can not be updated because circuit has bandwidth less than 1G. Circuit size with a bandwidth of 1G or more is supported." + } } - It 'CreateViaIdentityExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw + It 'Create' { + { + { New-AzNetworkFunctionCollectorPolicy -collectorpolicyname $env.collectorPolicyName -azuretrafficcollectorname $env.azureTrafficCollectorName -resourcegroupname $env.resourceGroup -location $env.location -IngestionPolicyIngestionSource @{ResourceId = $env.ResourceId1G} -IngestionPolicyIngestionType $env.IngestionType } | Should -Not -Throw + } } - It 'CreateViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw + It 'CreateViaIdentityExpanded' { + { + { New-AzNetworkFunctionCollectorPolicy -collectorpolicyname $env.collectorPolicyName -azuretrafficcollectorname $env.azureTrafficCollectorName -resourcegroupname $env.resourceGroup -location $env.location -IngestionPolicyIngestionSource @{ResourceId = $env.ResourceId1G} -IngestionPolicyIngestionType $env.IngestionType } | Should -Not -Throw + } + } + + It 'CreateViaIdentity' { + { + { New-AzNetworkFunctionCollectorPolicy -collectorpolicyname $env.collectorPolicyName -azuretrafficcollectorname $env.azureTrafficCollectorName -resourcegroupname $env.resourceGroup -location $env.location -IngestionPolicyIngestionSource @{ResourceId = $env.ResourceId1G} -IngestionPolicyIngestionType $env.IngestionType } | Should -Not -Throw + } } } diff --git a/src/NetworkFunction/NetworkFunction.Autorest/test/Update-AzNetworkFunctionCollectorPolicy.Tests.ps1 b/src/NetworkFunction/NetworkFunction.Autorest/test/Update-AzNetworkFunctionCollectorPolicy.Tests.ps1 index ec1a10585699..b3423040fbe1 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/test/Update-AzNetworkFunctionCollectorPolicy.Tests.ps1 +++ b/src/NetworkFunction/NetworkFunction.Autorest/test/Update-AzNetworkFunctionCollectorPolicy.Tests.ps1 @@ -15,7 +15,15 @@ if(($null -eq $TestName) -or ($TestName -contains 'Update-AzNetworkFunctionColle } Describe 'Update-AzNetworkFunctionCollectorPolicy' { - It 'UpdateExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw + It 'UpdateExpanded' { + { + { Update-AzNetworkFunctionCollectorPolicy -collectorpolicyname $env.collectorPolicyName -azuretrafficcollectorname $env.azureTrafficCollectorName -resourcegroupname $env.resourceGroup -location $env.location -IngestionPolicyIngestionSource @{ResourceId = $env.ResourceId1G} -IngestionPolicyIngestionType $env.IngestionType } | Should Not Throw + } } -} + + It 'UpdateExpanded1' { + { + { Update-AzNetworkFunctionCollectorPolicy -collectorpolicyname $env.collectorPolicyName -azuretrafficcollectorname $env.azureTrafficCollectorName -resourcegroupname $env.resourceGroup -location $env.location -IngestionPolicyIngestionSource @{ResourceId = $env.ResourceIdLessThan1G} -IngestionPolicyIngestionType $env.IngestionType } | Should Throw -ExpectedMessage "CollectorPolicy can not be updated because circuit has bandwidth less than 1G. Circuit size with a bandwidth of 1G or more is supported." + } + } +} \ No newline at end of file diff --git a/src/NetworkFunction/NetworkFunction.Autorest/test/env.json b/src/NetworkFunction/NetworkFunction.Autorest/test/env.json new file mode 100644 index 000000000000..2b89573db682 --- /dev/null +++ b/src/NetworkFunction/NetworkFunction.Autorest/test/env.json @@ -0,0 +1,10 @@ +{ + "collectorPolicyName": "cp1", + "azureTrafficCollectorName": "UTPSatc", + "resourceGroup": "DO_NOT_DELETE_ATC_PS_Tests", + "location": "eastus", + "SubscriptionId": "05f401ac-885f-4ba4-b2d6-7c5444596230", + "ResourceId1G": "/subscriptions/05f401ac-885f-4ba4-b2d6-7c5444596230/resourceGroups/DO_NOT_DELETE_ATC_PS_Tests/providers/Microsoft.Network/expressRouteCircuits/DO_NOT_DELETE_ATC_PS_Test_Ckt", + "ResourceIdLessThan1G": "/subscriptions/05f401ac-885f-4ba4-b2d6-7c5444596230/resourceGroups/DO_NOT_DELETE_ATC_PS_Tests/providers/Microsoft.Network/expressRouteCircuits/DO_NOT_DELETE_ATC_PS_Test_Ckt_1", + "IngestionType": "IPFIX" +} \ No newline at end of file diff --git a/src/NetworkFunction/NetworkFunction.Autorest/test/loadEnv.ps1 b/src/NetworkFunction/NetworkFunction.Autorest/test/loadEnv.ps1 index 5f079e89615e..6a7c385c6b7d 100644 --- a/src/NetworkFunction/NetworkFunction.Autorest/test/loadEnv.ps1 +++ b/src/NetworkFunction/NetworkFunction.Autorest/test/loadEnv.ps1 @@ -25,5 +25,5 @@ if (Test-Path -Path (Join-Path $PSScriptRoot $envFile)) { $env = @{} if (Test-Path -Path $envFilePath) { $env = Get-Content (Join-Path $PSScriptRoot $envFile) | ConvertFrom-Json - $PSDefaultParameterValues=@{"*:SubscriptionId"=$env.SubscriptionId; "*:Tenant"=$env.Tenant} + $PSDefaultParameterValues=@{"*:Tenant"=$env.Tenant} } \ No newline at end of file diff --git a/src/NetworkFunction/NetworkFunction.Autorest/utils/Get-SubscriptionIdTestSafe.ps1 b/src/NetworkFunction/NetworkFunction.Autorest/utils/Get-SubscriptionIdTestSafe.ps1 new file mode 100644 index 000000000000..5319862d3372 --- /dev/null +++ b/src/NetworkFunction/NetworkFunction.Autorest/utils/Get-SubscriptionIdTestSafe.ps1 @@ -0,0 +1,7 @@ +param() +if ($env:AzPSAutorestTestPlaybackMode) { + $loadEnvPath = Join-Path $PSScriptRoot '..' 'test' 'loadEnv.ps1' + . ($loadEnvPath) + return $env.SubscriptionId +} +return (Get-AzContext).Subscription.Id \ No newline at end of file diff --git a/src/NetworkFunction/NetworkFunction/Az.NetworkFunction.psd1 b/src/NetworkFunction/NetworkFunction/Az.NetworkFunction.psd1 index 51fbf6f1279b..ac614da13b4d 100644 --- a/src/NetworkFunction/NetworkFunction/Az.NetworkFunction.psd1 +++ b/src/NetworkFunction/NetworkFunction/Az.NetworkFunction.psd1 @@ -3,7 +3,7 @@ # # Generated by: Microsoft Corporation # -# Generated on: 12/5/2023 +# Generated on: 4/7/2024 # @{ @@ -51,7 +51,7 @@ DotNetFrameworkVersion = '4.7.2' # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.10.3'; }) +RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.17.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'NetworkFunction.Autorest/bin/Az.NetworkFunction.private.dll' diff --git a/src/NetworkFunction/NetworkFunction/ChangeLog.md b/src/NetworkFunction/NetworkFunction/ChangeLog.md index 443841569a9d..e40966fe80f8 100644 --- a/src/NetworkFunction/NetworkFunction/ChangeLog.md +++ b/src/NetworkFunction/NetworkFunction/ChangeLog.md @@ -18,7 +18,7 @@ - Additional information about change #1 --> ## Upcoming Release - +* Added validation in New/Update collector policy cmdlets to throw exception if ExpressRoute Circuit bandwidth is less than 1G. ## Version 0.1.2 * Updated api version to 2022-11-01 * Added new cmdlet: `Update-AzNetworkFunctionCollectorPolicyTag` diff --git a/src/NetworkFunction/NetworkFunction/help/Get-AzNetworkFunctionCollectorPolicy.md b/src/NetworkFunction/NetworkFunction/help/Get-AzNetworkFunctionCollectorPolicy.md index 6df1e463f421..910a9d827673 100644 --- a/src/NetworkFunction/NetworkFunction/help/Get-AzNetworkFunctionCollectorPolicy.md +++ b/src/NetworkFunction/NetworkFunction/help/Get-AzNetworkFunctionCollectorPolicy.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.NetworkFunction-help.xml Module Name: Az.NetworkFunction online version: https://learn.microsoft.com/powershell/module/az.networkfunction/get-aznetworkfunctioncollectorpolicy schema: 2.0.0 @@ -15,19 +15,21 @@ Gets the collector policy in a specified Traffic Collector ### List (Default) ``` Get-AzNetworkFunctionCollectorPolicy -AzureTrafficCollectorName -ResourceGroupName - [-SubscriptionId ] [-DefaultProfile ] [] + [-SubscriptionId ] [-DefaultProfile ] [-ProgressAction ] + [] ``` ### Get ``` Get-AzNetworkFunctionCollectorPolicy -AzureTrafficCollectorName -Name - -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [] + -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] + [-ProgressAction ] [] ``` ### GetViaIdentity ``` Get-AzNetworkFunctionCollectorPolicy -InputObject [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -78,7 +80,7 @@ Azure Traffic Collector name ```yaml Type: System.String -Parameter Sets: Get, List +Parameter Sets: List, Get Aliases: Required: True @@ -135,12 +137,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. ```yaml Type: System.String -Parameter Sets: Get, List +Parameter Sets: List, Get Aliases: Required: True @@ -155,7 +172,7 @@ Azure Subscription ID. ```yaml Type: System.String[] -Parameter Sets: Get, List +Parameter Sets: List, Get Aliases: Required: False @@ -178,19 +195,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`INPUTOBJECT `: Identity Parameter - - `[AzureTrafficCollectorName ]`: Azure Traffic Collector name - - `[CollectorPolicyName ]`: Collector Policy Name - - `[Id ]`: Resource identity path - - `[ResourceGroupName ]`: The name of the resource group. - - `[SubscriptionId ]`: Azure Subscription ID. - ## RELATED LINKS - diff --git a/src/NetworkFunction/NetworkFunction/help/Get-AzNetworkFunctionTrafficCollector.md b/src/NetworkFunction/NetworkFunction/help/Get-AzNetworkFunctionTrafficCollector.md index af2c32302d9e..8ba76c8121ec 100644 --- a/src/NetworkFunction/NetworkFunction/help/Get-AzNetworkFunctionTrafficCollector.md +++ b/src/NetworkFunction/NetworkFunction/help/Get-AzNetworkFunctionTrafficCollector.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.NetworkFunction-help.xml Module Name: Az.NetworkFunction online version: https://learn.microsoft.com/powershell/module/az.networkfunction/get-aznetworkfunctiontrafficcollector schema: 2.0.0 @@ -15,25 +15,25 @@ Gets the specified Azure Traffic Collector in a specified resource group ### List (Default) ``` Get-AzNetworkFunctionTrafficCollector [-SubscriptionId ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### Get ``` Get-AzNetworkFunctionTrafficCollector -Name -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` -### GetViaIdentity +### List1 ``` -Get-AzNetworkFunctionTrafficCollector -InputObject [-DefaultProfile ] - [] +Get-AzNetworkFunctionTrafficCollector -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [-ProgressAction ] [] ``` -### List1 +### GetViaIdentity ``` -Get-AzNetworkFunctionTrafficCollector -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [] +Get-AzNetworkFunctionTrafficCollector -InputObject [-DefaultProfile ] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -153,6 +153,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. @@ -173,7 +188,7 @@ Azure Subscription ID. ```yaml Type: System.String[] -Parameter Sets: Get, List, List1 +Parameter Sets: List, Get, List1 Aliases: Required: False @@ -196,19 +211,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`INPUTOBJECT `: Identity Parameter - - `[AzureTrafficCollectorName ]`: Azure Traffic Collector name - - `[CollectorPolicyName ]`: Collector Policy Name - - `[Id ]`: Resource identity path - - `[ResourceGroupName ]`: The name of the resource group. - - `[SubscriptionId ]`: Azure Subscription ID. - ## RELATED LINKS - diff --git a/src/NetworkFunction/NetworkFunction/help/New-AzNetworkFunctionCollectorPolicy.md b/src/NetworkFunction/NetworkFunction/help/New-AzNetworkFunctionCollectorPolicy.md index 8b767a72632d..ce38eba56d05 100644 --- a/src/NetworkFunction/NetworkFunction/help/New-AzNetworkFunctionCollectorPolicy.md +++ b/src/NetworkFunction/NetworkFunction/help/New-AzNetworkFunctionCollectorPolicy.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.NetworkFunction-help.xml Module Name: Az.NetworkFunction online version: https://learn.microsoft.com/powershell/module/az.networkfunction/new-aznetworkfunctioncollectorpolicy schema: 2.0.0 @@ -14,11 +14,11 @@ Creates or updates a Collector Policy resource ``` New-AzNetworkFunctionCollectorPolicy -AzureTrafficCollectorName -Name - -ResourceGroupName -Location [-SubscriptionId ] + -ResourceGroupName [-SubscriptionId ] -Location [-EmissionPolicy ] [-IngestionPolicyIngestionSource ] [-IngestionPolicyIngestionType ] [-Tag ] [-DefaultProfile ] [-AsJob] - [-NoWait] [-Confirm] [-WhatIf] [] + [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -95,8 +95,7 @@ Accept wildcard characters: False ``` ### -DefaultProfile -The DefaultProfile parameter is not functional. -Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. +The credentials, account, tenant, and subscription used for communication with Azure. ```yaml Type: System.Management.Automation.PSObject @@ -202,6 +201,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. @@ -289,21 +303,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`EMISSIONPOLICY `: Emission policies. - - `[EmissionDestination ]`: Emission policy destinations. - - `[DestinationType ]`: Emission destination type. - - `[EmissionType ]`: Emission format type. - -`INGESTIONPOLICYINGESTIONSOURCE `: Ingestion Sources. - - `[ResourceId ]`: Resource ID. - - `[SourceType ]`: Ingestion source type. - ## RELATED LINKS - diff --git a/src/NetworkFunction/NetworkFunction/help/New-AzNetworkFunctionTrafficCollector.md b/src/NetworkFunction/NetworkFunction/help/New-AzNetworkFunctionTrafficCollector.md index 5e0892d7a8e1..4c11dfe226b1 100644 --- a/src/NetworkFunction/NetworkFunction/help/New-AzNetworkFunctionTrafficCollector.md +++ b/src/NetworkFunction/NetworkFunction/help/New-AzNetworkFunctionTrafficCollector.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.NetworkFunction-help.xml Module Name: Az.NetworkFunction online version: https://learn.microsoft.com/powershell/module/az.networkfunction/new-aznetworkfunctiontrafficcollector schema: 2.0.0 @@ -13,9 +13,9 @@ Creates or updates a Azure Traffic Collector resource ## SYNTAX ``` -New-AzNetworkFunctionTrafficCollector -Name -ResourceGroupName -Location - [-SubscriptionId ] [-Tag ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] - [-WhatIf] [] +New-AzNetworkFunctionTrafficCollector -Name -ResourceGroupName [-SubscriptionId ] + -Location [-Tag ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -119,6 +119,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. @@ -206,7 +221,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - ## RELATED LINKS - diff --git a/src/NetworkFunction/NetworkFunction/help/Remove-AzNetworkFunctionCollectorPolicy.md b/src/NetworkFunction/NetworkFunction/help/Remove-AzNetworkFunctionCollectorPolicy.md index 8ce82d5a0ecd..c717726e85ad 100644 --- a/src/NetworkFunction/NetworkFunction/help/Remove-AzNetworkFunctionCollectorPolicy.md +++ b/src/NetworkFunction/NetworkFunction/help/Remove-AzNetworkFunctionCollectorPolicy.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.NetworkFunction-help.xml Module Name: Az.NetworkFunction online version: https://learn.microsoft.com/powershell/module/az.networkfunction/remove-aznetworkfunctioncollectorpolicy schema: 2.0.0 @@ -16,13 +16,13 @@ Deletes a specified Collector Policy resource. ``` Remove-AzNetworkFunctionCollectorPolicy -AzureTrafficCollectorName -Name -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-PassThru] [-Confirm] [-WhatIf] [] + [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### DeleteViaIdentity ``` Remove-AzNetworkFunctionCollectorPolicy -InputObject [-DefaultProfile ] - [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] + [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -146,6 +146,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. @@ -220,19 +235,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`INPUTOBJECT `: Identity Parameter - - `[AzureTrafficCollectorName ]`: Azure Traffic Collector name - - `[CollectorPolicyName ]`: Collector Policy Name - - `[Id ]`: Resource identity path - - `[ResourceGroupName ]`: The name of the resource group. - - `[SubscriptionId ]`: Azure Subscription ID. - ## RELATED LINKS - diff --git a/src/NetworkFunction/NetworkFunction/help/Remove-AzNetworkFunctionTrafficCollector.md b/src/NetworkFunction/NetworkFunction/help/Remove-AzNetworkFunctionTrafficCollector.md index e8932157d88e..de46f857d40a 100644 --- a/src/NetworkFunction/NetworkFunction/help/Remove-AzNetworkFunctionTrafficCollector.md +++ b/src/NetworkFunction/NetworkFunction/help/Remove-AzNetworkFunctionTrafficCollector.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.NetworkFunction-help.xml Module Name: Az.NetworkFunction online version: https://learn.microsoft.com/powershell/module/az.networkfunction/remove-aznetworkfunctiontrafficcollector schema: 2.0.0 @@ -15,13 +15,14 @@ Deletes a specified Azure Traffic Collector resource. ### Delete (Default) ``` Remove-AzNetworkFunctionTrafficCollector -Name -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] + [-Confirm] [] ``` ### DeleteViaIdentity ``` Remove-AzNetworkFunctionTrafficCollector -InputObject [-DefaultProfile ] - [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] + [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -130,6 +131,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. @@ -204,19 +220,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`INPUTOBJECT `: Identity Parameter - - `[AzureTrafficCollectorName ]`: Azure Traffic Collector name - - `[CollectorPolicyName ]`: Collector Policy Name - - `[Id ]`: Resource identity path - - `[ResourceGroupName ]`: The name of the resource group. - - `[SubscriptionId ]`: Azure Subscription ID. - ## RELATED LINKS - diff --git a/src/NetworkFunction/NetworkFunction/help/Update-AzNetworkFunctionCollectorPolicy.md b/src/NetworkFunction/NetworkFunction/help/Update-AzNetworkFunctionCollectorPolicy.md index be52a955bed6..01f0374a9ff1 100644 --- a/src/NetworkFunction/NetworkFunction/help/Update-AzNetworkFunctionCollectorPolicy.md +++ b/src/NetworkFunction/NetworkFunction/help/Update-AzNetworkFunctionCollectorPolicy.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.NetworkFunction-help.xml Module Name: Az.NetworkFunction online version: https://learn.microsoft.com/powershell/module/az.networkfunction/update-aznetworkfunctioncollectorpolicy schema: 2.0.0 @@ -14,11 +14,11 @@ Creates or updates a Collector Policy resource ``` Update-AzNetworkFunctionCollectorPolicy -AzureTrafficCollectorName -Name - -ResourceGroupName -Location [-SubscriptionId ] + -ResourceGroupName [-SubscriptionId ] -Location [-EmissionPolicy ] [-IngestionPolicyIngestionSource ] [-IngestionPolicyIngestionType ] [-Tag ] [-DefaultProfile ] [-AsJob] - [-NoWait] [-Confirm] [-WhatIf] [] + [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -201,6 +201,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. @@ -288,21 +303,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`EMISSIONPOLICY `: Emission policies. - - `[EmissionDestination ]`: Emission policy destinations. - - `[DestinationType ]`: Emission destination type. - - `[EmissionType ]`: Emission format type. - -`INGESTIONPOLICYINGESTIONSOURCE `: Ingestion Sources. - - `[ResourceId ]`: Resource ID. - - `[SourceType ]`: Ingestion source type. - ## RELATED LINKS - diff --git a/src/NetworkFunction/NetworkFunction/help/Update-AzNetworkFunctionCollectorPolicyTag.md b/src/NetworkFunction/NetworkFunction/help/Update-AzNetworkFunctionCollectorPolicyTag.md index ca219897b01e..14a11f2fd856 100644 --- a/src/NetworkFunction/NetworkFunction/help/Update-AzNetworkFunctionCollectorPolicyTag.md +++ b/src/NetworkFunction/NetworkFunction/help/Update-AzNetworkFunctionCollectorPolicyTag.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.NetworkFunction-help.xml Module Name: Az.NetworkFunction online version: https://learn.microsoft.com/powershell/module/az.networkfunction/update-aznetworkfunctioncollectorpolicytag schema: 2.0.0 @@ -16,13 +16,13 @@ Updates the specified Collector Policy tags. ``` Update-AzNetworkFunctionCollectorPolicyTag -AzureTrafficCollectorName -CollectorPolicyName -ResourceGroupName [-SubscriptionId ] [-Tag ] [-DefaultProfile ] - [-Confirm] [-WhatIf] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### UpdateViaIdentityExpanded ``` Update-AzNetworkFunctionCollectorPolicyTag -InputObject [-Tag ] - [-DefaultProfile ] [-Confirm] [-WhatIf] [] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -135,6 +135,21 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. @@ -224,19 +239,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`INPUTOBJECT `: Identity Parameter - - `[AzureTrafficCollectorName ]`: Azure Traffic Collector name - - `[CollectorPolicyName ]`: Collector Policy Name - - `[Id ]`: Resource identity path - - `[ResourceGroupName ]`: The name of the resource group. - - `[SubscriptionId ]`: Azure Subscription ID. - ## RELATED LINKS - diff --git a/src/NetworkFunction/NetworkFunction/help/Update-AzNetworkFunctionTrafficCollector.md b/src/NetworkFunction/NetworkFunction/help/Update-AzNetworkFunctionTrafficCollector.md index 06a07fff5d12..c1dc91db2bce 100644 --- a/src/NetworkFunction/NetworkFunction/help/Update-AzNetworkFunctionTrafficCollector.md +++ b/src/NetworkFunction/NetworkFunction/help/Update-AzNetworkFunctionTrafficCollector.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.NetworkFunction-help.xml Module Name: Az.NetworkFunction online version: https://learn.microsoft.com/powershell/module/az.networkfunction/update-aznetworkfunctiontrafficcollector schema: 2.0.0 @@ -13,9 +13,9 @@ Creates or updates a Azure Traffic Collector resource ## SYNTAX ``` -Update-AzNetworkFunctionTrafficCollector -Name -ResourceGroupName -Location - [-SubscriptionId ] [-CollectorPolicy ] [-Tag ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +Update-AzNetworkFunctionTrafficCollector -Name -ResourceGroupName [-SubscriptionId ] + -Location [-CollectorPolicy ] [-Tag ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -134,6 +134,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. @@ -221,30 +236,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`COLLECTORPOLICY `: Collector Policies for Azure Traffic Collector. - - `Location `: Resource location. - - `[SystemDataCreatedAt ]`: The timestamp of resource creation (UTC). - - `[SystemDataCreatedBy ]`: The identity that created the resource. - - `[SystemDataCreatedByType ]`: The type of identity that created the resource. - - `[SystemDataLastModifiedBy ]`: The identity that last modified the resource. - - `[SystemDataLastModifiedByType ]`: The type of identity that last modified the resource. - - `[Tag ]`: Resource tags. - - `[(Any) ]`: This indicates any property can be added to this object. - - `[EmissionPolicy ]`: Emission policies. - - `[EmissionDestination ]`: Emission policy destinations. - - `[DestinationType ]`: Emission destination type. - - `[EmissionType ]`: Emission format type. - - `[IngestionPolicyIngestionSource ]`: Ingestion Sources. - - `[ResourceId ]`: Resource ID. - - `[SourceType ]`: Ingestion source type. - - `[IngestionPolicyIngestionType ]`: The ingestion type. - ## RELATED LINKS - diff --git a/src/NetworkFunction/NetworkFunction/help/Update-AzNetworkFunctionTrafficCollectorTag.md b/src/NetworkFunction/NetworkFunction/help/Update-AzNetworkFunctionTrafficCollectorTag.md index 2da6b8cfdb5c..fd18c907cffe 100644 --- a/src/NetworkFunction/NetworkFunction/help/Update-AzNetworkFunctionTrafficCollectorTag.md +++ b/src/NetworkFunction/NetworkFunction/help/Update-AzNetworkFunctionTrafficCollectorTag.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.NetworkFunction-help.xml Module Name: Az.NetworkFunction online version: https://learn.microsoft.com/powershell/module/az.networkfunction/update-aznetworkfunctiontrafficcollectortag schema: 2.0.0 @@ -15,14 +15,14 @@ Updates the specified Azure Traffic Collector tags. ### UpdateExpanded (Default) ``` Update-AzNetworkFunctionTrafficCollectorTag -AzureTrafficCollectorName -ResourceGroupName - [-SubscriptionId ] [-Tag ] [-DefaultProfile ] [-Confirm] [-WhatIf] - [] + [-SubscriptionId ] [-Tag ] [-DefaultProfile ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### UpdateViaIdentityExpanded ``` Update-AzNetworkFunctionTrafficCollectorTag -InputObject [-Tag ] - [-DefaultProfile ] [-Confirm] [-WhatIf] [] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -102,6 +102,21 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. @@ -191,19 +206,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`INPUTOBJECT `: Identity Parameter - - `[AzureTrafficCollectorName ]`: Azure Traffic Collector name - - `[CollectorPolicyName ]`: Collector Policy Name - - `[Id ]`: Resource identity path - - `[ResourceGroupName ]`: The name of the resource group. - - `[SubscriptionId ]`: Azure Subscription ID. - ## RELATED LINKS - From e81862c92d0e9e52677f428486b8b63ec1240d87 Mon Sep 17 00:00:00 2001 From: Azure PowerShell <65331932+azure-powershell-bot@users.noreply.github.com> Date: Mon, 8 Apr 2024 10:15:12 +0800 Subject: [PATCH 09/12] Update with the latest test coverage data (#24584) --- tools/TestFx/Coverage/Baseline.csv | 69 ++++++++++++++++-------------- 1 file changed, 38 insertions(+), 31 deletions(-) diff --git a/tools/TestFx/Coverage/Baseline.csv b/tools/TestFx/Coverage/Baseline.csv index 591edcfc56cd..6193a1d06e9c 100644 --- a/tools/TestFx/Coverage/Baseline.csv +++ b/tools/TestFx/Coverage/Baseline.csv @@ -7,33 +7,35 @@ "AlertsManagement","47.06%" "AnalysisServices","69.23%" "ApiManagement","94.93%" -"App","62.50%" +"App","68.69%" "AppConfiguration","50.00%" -"ApplicationInsights","62.16%" +"ApplicationInsights","64.86%" "ArcResourceBridge","87.50%" "Attestation","63.64%" "Automanage","47.06%" -"Automation","39.00%" +"Automation","38.00%" "BareMetal","100.00%" -"Batch","81.94%" +"Batch","79.17%" "Billing","100.00%" "BillingBenefits","100.00%" "Blueprint","23.08%" "BotService","66.67%" -"Cdn","55.48%" +"Cdn","54.84%" "ChangeAnalysis","100.00%" "CloudService","73.33%" +"CodeSigning","0.00%" "CognitiveServices","100.00%" -"Communication","87.50%" +"Communication","31.82%" "Compute","82.73%" "ConfidentialLedger","100.00%" "Confluent","80.00%" "ConnectedKubernetes","60.00%" -"ConnectedMachine","94.44%" +"ConnectedMachine","95.45%" "ConnectedNetwork","77.42%" +"ConnectedVMware","60.53%" "ContainerInstance","87.50%" "ContainerRegistry","80.00%" -"CosmosDB","85.00%" +"CosmosDB","85.63%" "CostManagement","72.73%" "CustomLocation","100.00%" "CustomProviders","57.14%" @@ -46,14 +48,13 @@ "DataLakeAnalytics","58.06%" "DataLakeStore","83.72%" "DataMigration","34.69%" -"DataProtection","57.14%" +"DataProtection","56.00%" "DataShare","94.44%" "DedicatedHsm","100.00%" "DesktopVirtualization","100.00%" -"DevCenter","68.49%" +"DevCenter","62.79%" "DeviceProvisioningServices","44.44%" "DeviceUpdate","70.00%" -"DevSpaces","100.00%" "DevTestLabs","0.00%" "DigitalTwins","80.00%" "DiskPool","87.50%" @@ -61,18 +62,21 @@ "DnsResolver","100.00%" "DynatraceObservability","88.24%" "EdgeOrder","65.00%" +"EdgeZones","100.00%" "Elastic","91.67%" "ElasticSan","100.00%" "EventGrid","67.80%" "EventHub","87.76%" +"FirmwareAnalysis","100.00%" +"Fleet","95.24%" "FluidRelay","75.00%" "FrontDoor","91.18%" "Functions","100.00%" "GraphServices","100.00%" "GuestConfiguration","100.00%" "HanaOnAzure","100.00%" -"HDInsight","31.25%" -"HdInsightOnAks","100.00%" +"HDInsight","52.08%" +"HdInsightOnAks","86.21%" "HealthBot","100.00%" "HealthcareApis","100.00%" "HPCCache","92.31%" @@ -82,30 +86,32 @@ "IotHub","0.00%" "KeyVault","22.09%" "KubernetesConfiguration","100.00%" -"Kusto","89.66%" +"Kusto","89.23%" "LabServices","77.14%" "LoadTesting","100.00%" "LogicApp","98.04%" "Logz","88.46%" "MachineLearning","0.00%" "MachineLearningServices","56.10%" -"Maintenance","81.82%" +"Maintenance","90.91%" +"ManagedNetworkFabric","98.39%" "ManagedServiceIdentity","100.00%" "ManagedServices","0.00%" "ManagementPartner","100.00%" "Maps","100.00%" -"MariaDb","84.21%" -"Marketplace","90.00%" +"MariaDb","100.00%" +"Marketplace","93.94%" "MarketplaceOrdering","100.00%" "Media","0.00%" -"Migrate","80.65%" +"Migrate","75.61%" "MixedReality","94.74%" "MobileNetwork","49.12%" -"Monitor","42.31%" +"Monitor","18.02%" "MonitoringSolutions","100.00%" "MySql","92.86%" -"NetAppFiles","76.81%" -"Network","84.35%" +"NetAppFiles","78.87%" +"Network","84.63%" +"NetworkAnalytics","100.00%" "NetworkCloud","97.94%" "NetworkFunction","0.00%" "NewRelic","88.24%" @@ -118,45 +124,46 @@ "PolicyInsights","100.00%" "Portal","100.00%" "PostgreSql","82.05%" -"PowerBIEmbedded","92.31%" +"PowerBIEmbedded","100.00%" "PrivateDns","100.00%" "ProviderHub","80.00%" "Purview","8.70%" "Quantum","100.00%" "Qumulo","100.00%" -"Quota","71.43%" -"RecoveryServices","65.83%" +"Quota","100.00%" +"RecoveryServices","66.67%" "RedisCache","100.00%" "RedisEnterpriseCache","53.33%" "Relay","100.00%" "Reservations","100.00%" "ResourceGraph","100.00%" "ResourceMover","100.00%" -"Resources","59.49%" +"Resources","57.79%" "Search","82.35%" -"Security","82.35%" +"Security","88.06%" "SecurityInsights","88.71%" -"SelfHelp","50.00%" +"SelfHelp","16.67%" "ServiceBus","93.88%" "ServiceFabric","93.22%" "ServiceLinker","92.31%" "SignalR","90.62%" "SpringCloud","82.86%" -"Sql","61.74%" +"Sql","62.22%" "SqlVirtualMachine","93.75%" "Ssh","50.00%" "StackHCI","40.74%" -"Storage","41.67%" +"StackHCIVM","61.29%" +"Storage","41.76%" "StorageCache","70.00%" "StorageMover","100.00%" "StorageSync","80.00%" "StreamAnalytics","100.00%" -"Subscription","50.00%" +"Subscription","44.44%" "Support","75.00%" "Synapse","48.80%" "TimeSeriesInsights","100.00%" "TrafficManager","90.91%" -"VMware","100.00%" +"VMware","86.96%" "VoiceServices","100.00%" "Websites","87.16%" "WindowsIotServices","100.00%" From c8b06c864fd2366b2ddff9b1478c568244fded50 Mon Sep 17 00:00:00 2001 From: Azure PowerShell <65331932+azure-powershell-bot@users.noreply.github.com> Date: Mon, 8 Apr 2024 14:48:15 +0800 Subject: [PATCH 10/12] Move Sphere to main (#24583) --- src/Sphere/Sphere.Autorest/Az.Sphere.csproj | 10 + .../Sphere.Autorest/Az.Sphere.format.ps1xml | 1803 + src/Sphere/Sphere.Autorest/Az.Sphere.psd1 | 23 + src/Sphere/Sphere.Autorest/Az.Sphere.psm1 | 119 + src/Sphere/Sphere.Autorest/README.md | 112 + .../catalogs-certificates.json | 95 + .../catalogs-images.json | 52 + ...ogs-products-deviceGroups-deployments.json | 62 + ...atalogs-products-deviceGroups-devices.json | 62 + .../catalogs-products-deviceGroups.json | 153 + .../catalogs-products.json | 138 + .../UX/Microsoft.AzureSphere/catalogs.json | 123 + src/Sphere/Sphere.Autorest/build-module.ps1 | 180 + .../Sphere.Autorest/check-dependencies.ps1 | 65 + .../Sphere.Autorest/create-model-cmdlets.ps1 | 262 + .../custom/Az.Sphere.custom.psm1 | 17 + src/Sphere/Sphere.Autorest/custom/README.md | 41 + .../examples/Get-AzSphereCatalog.md | 70 + .../examples/Get-AzSphereCatalogDevice.md | 19 + .../Get-AzSphereCatalogDeviceGroup.md | 14 + .../Get-AzSphereCatalogDeviceInsight.md | 7 + .../examples/Get-AzSphereCertificate.md | 27 + .../Get-AzSphereCertificateCertChain.md | 13 + .../examples/Get-AzSphereCertificateProof.md | 17 + .../examples/Get-AzSphereDeployment.md | 55 + .../examples/Get-AzSphereDevice.md | 46 + .../examples/Get-AzSphereDeviceGroup.md | 56 + .../examples/Get-AzSphereImage.md | 47 + .../examples/Get-AzSphereProduct.md | 36 + .../Invoke-AzSphereCountCatalogDevice.md | 13 + .../Invoke-AzSphereCountDeviceGroupDevice.md | 13 + .../Invoke-AzSphereCountProductDevice.md | 13 + .../examples/New-AzSphereCatalog.md | 26 + .../examples/New-AzSphereDeployment.md | 42 + .../examples/New-AzSphereDevice.md | 29 + .../New-AzSphereDeviceCapabilityImage.md | 13 + .../examples/New-AzSphereDeviceGroup.md | 27 + .../examples/New-AzSphereImage.md | 34 + .../examples/New-AzSphereProduct.md | 22 + .../New-AzSphereProductDefaultDeviceGroup.md | 17 + .../examples/Remove-AzSphereCatalog.md | 8 + .../examples/Remove-AzSphereDeviceGroup.md | 6 + .../examples/Remove-AzSphereProduct.md | 7 + .../examples/Update-AzSphereCatalog.md | 26 + .../examples/Update-AzSphereDevice.md | 56 + .../examples/Update-AzSphereDeviceGroup.md | 27 + .../examples/Update-AzSphereProduct.md | 22 + src/Sphere/Sphere.Autorest/export-surface.ps1 | 41 + .../exports/Get-AzSphereCatalog.ps1 | 223 + .../exports/Get-AzSphereCatalogDevice.ps1 | 212 + .../Get-AzSphereCatalogDeviceGroup.ps1 | 218 + .../Get-AzSphereCatalogDeviceInsight.ps1 | 212 + .../exports/Get-AzSphereCertificate.ps1 | 268 + .../Get-AzSphereCertificateCertChain.ps1 | 240 + .../exports/Get-AzSphereCertificateProof.ps1 | 246 + .../exports/Get-AzSphereDeployment.ps1 | 330 + .../exports/Get-AzSphereDevice.ps1 | 306 + .../exports/Get-AzSphereDeviceGroup.ps1 | 300 + .../exports/Get-AzSphereImage.ps1 | 271 + .../exports/Get-AzSphereProduct.ps1 | 248 + .../Invoke-AzSphereCountCatalogDevice.ps1 | 213 + .../Invoke-AzSphereCountDeviceGroupDevice.ps1 | 268 + .../Invoke-AzSphereCountProductDevice.ps1 | 241 + .../exports/New-AzSphereCatalog.ps1 | 228 + .../exports/New-AzSphereDeployment.ps1 | 259 + .../exports/New-AzSphereDevice.ps1 | 242 + .../New-AzSphereDeviceCapabilityImage.ps1 | 321 + .../exports/New-AzSphereDeviceGroup.ps1 | 263 + .../exports/New-AzSphereImage.ps1 | 245 + .../exports/New-AzSphereProduct.ps1 | 229 + .../New-AzSphereProductDefaultDeviceGroup.ps1 | 241 + .../exports/ProxyCmdletDefinitions.ps1 | 7396 ++ src/Sphere/Sphere.Autorest/exports/README.md | 20 + .../exports/Remove-AzSphereCatalog.ps1 | 232 + .../exports/Remove-AzSphereDeviceGroup.ps1 | 287 + .../exports/Remove-AzSphereProduct.ps1 | 260 + .../exports/Update-AzSphereCatalog.ps1 | 242 + .../exports/Update-AzSphereDevice.ps1 | 348 + .../exports/Update-AzSphereDeviceGroup.ps1 | 354 + .../exports/Update-AzSphereProduct.ps1 | 284 + src/Sphere/Sphere.Autorest/generate-help.ps1 | 74 + .../Sphere.Autorest/generate-portal-ux.ps1 | 374 + .../Sphere.Autorest/generated/Module.cs | 202 + .../generated/api/Models/Any.PowerShell.cs | 156 + .../generated/api/Models/Any.TypeConverter.cs | 146 + .../generated/api/Models/Any.cs | 34 + .../generated/api/Models/Any.json.cs | 104 + .../api/Models/Catalog.PowerShell.cs | 276 + .../api/Models/Catalog.TypeConverter.cs | 146 + .../generated/api/Models/Catalog.cs | 176 + .../generated/api/Models/Catalog.json.cs | 111 + .../Models/CatalogListResult.PowerShell.cs | 172 + .../Models/CatalogListResult.TypeConverter.cs | 147 + .../generated/api/Models/CatalogListResult.cs | 74 + .../api/Models/CatalogListResult.json.cs | 118 + .../Models/CatalogProperties.PowerShell.cs | 172 + .../Models/CatalogProperties.TypeConverter.cs | 147 + .../generated/api/Models/CatalogProperties.cs | 82 + .../api/Models/CatalogProperties.json.cs | 116 + .../api/Models/CatalogUpdate.PowerShell.cs | 164 + .../api/Models/CatalogUpdate.TypeConverter.cs | 147 + .../generated/api/Models/CatalogUpdate.cs | 54 + .../api/Models/CatalogUpdate.json.cs | 106 + .../Models/CatalogUpdateTags.PowerShell.cs | 160 + .../Models/CatalogUpdateTags.TypeConverter.cs | 147 + .../generated/api/Models/CatalogUpdateTags.cs | 35 + .../Models/CatalogUpdateTags.dictionary.cs | 75 + .../api/Models/CatalogUpdateTags.json.cs | 109 + .../api/Models/Certificate.PowerShell.cs | 300 + .../api/Models/Certificate.TypeConverter.cs | 147 + .../generated/api/Models/Certificate.cs | 270 + .../generated/api/Models/Certificate.json.cs | 111 + .../CertificateChainResponse.PowerShell.cs | 164 + .../CertificateChainResponse.TypeConverter.cs | 147 + .../api/Models/CertificateChainResponse.cs | 57 + .../Models/CertificateChainResponse.json.cs | 111 + .../CertificateListResult.PowerShell.cs | 172 + .../CertificateListResult.TypeConverter.cs | 147 + .../api/Models/CertificateListResult.cs | 74 + .../api/Models/CertificateListResult.json.cs | 118 + .../CertificateProperties.PowerShell.cs | 212 + .../CertificateProperties.TypeConverter.cs | 147 + .../api/Models/CertificateProperties.cs | 199 + .../api/Models/CertificateProperties.json.cs | 141 + .../Models/ClaimDevicesRequest.PowerShell.cs | 164 + .../ClaimDevicesRequest.TypeConverter.cs | 147 + .../api/Models/ClaimDevicesRequest.cs | 54 + .../api/Models/ClaimDevicesRequest.json.cs | 116 + .../Models/CountDeviceResponse.PowerShell.cs | 164 + .../CountDeviceResponse.TypeConverter.cs | 147 + .../api/Models/CountDeviceResponse.cs | 57 + .../api/Models/CountDeviceResponse.json.cs | 108 + .../Models/CountDevicesResponse.PowerShell.cs | 164 + .../CountDevicesResponse.TypeConverter.cs | 147 + .../api/Models/CountDevicesResponse.cs | 57 + .../api/Models/CountDevicesResponse.json.cs | 108 + .../CountElementsResponse.PowerShell.cs | 164 + .../CountElementsResponse.TypeConverter.cs | 147 + .../api/Models/CountElementsResponse.cs | 54 + .../api/Models/CountElementsResponse.json.cs | 108 + .../api/Models/Deployment.PowerShell.cs | 276 + .../api/Models/Deployment.TypeConverter.cs | 146 + .../generated/api/Models/Deployment.cs | 202 + .../generated/api/Models/Deployment.json.cs | 111 + .../Models/DeploymentListResult.PowerShell.cs | 172 + .../DeploymentListResult.TypeConverter.cs | 147 + .../api/Models/DeploymentListResult.cs | 74 + .../api/Models/DeploymentListResult.json.cs | 118 + .../Models/DeploymentProperties.PowerShell.cs | 188 + .../DeploymentProperties.TypeConverter.cs | 147 + .../api/Models/DeploymentProperties.cs | 122 + .../api/Models/DeploymentProperties.json.cs | 134 + .../generated/api/Models/Device.PowerShell.cs | 300 + .../api/Models/Device.TypeConverter.cs | 146 + .../generated/api/Models/Device.cs | 265 + .../generated/api/Models/Device.json.cs | 111 + .../api/Models/DeviceGroup.PowerShell.cs | 300 + .../api/Models/DeviceGroup.TypeConverter.cs | 147 + .../generated/api/Models/DeviceGroup.cs | 261 + .../generated/api/Models/DeviceGroup.json.cs | 111 + .../DeviceGroupListResult.PowerShell.cs | 172 + .../DeviceGroupListResult.TypeConverter.cs | 147 + .../api/Models/DeviceGroupListResult.cs | 74 + .../api/Models/DeviceGroupListResult.json.cs | 118 + .../DeviceGroupProperties.PowerShell.cs | 212 + .../DeviceGroupProperties.TypeConverter.cs | 147 + .../api/Models/DeviceGroupProperties.cs | 190 + .../api/Models/DeviceGroupProperties.json.cs | 126 + .../Models/DeviceGroupUpdate.PowerShell.cs | 204 + .../Models/DeviceGroupUpdate.TypeConverter.cs | 147 + .../generated/api/Models/DeviceGroupUpdate.cs | 139 + .../api/Models/DeviceGroupUpdate.json.cs | 108 + .../DeviceGroupUpdateProperties.PowerShell.cs | 196 + ...viceGroupUpdateProperties.TypeConverter.cs | 147 + .../api/Models/DeviceGroupUpdateProperties.cs | 142 + .../DeviceGroupUpdateProperties.json.cs | 116 + .../api/Models/DeviceInsight.PowerShell.cs | 220 + .../api/Models/DeviceInsight.TypeConverter.cs | 147 + .../generated/api/Models/DeviceInsight.cs | 194 + .../api/Models/DeviceInsight.json.cs | 120 + .../api/Models/DeviceListResult.PowerShell.cs | 172 + .../Models/DeviceListResult.TypeConverter.cs | 147 + .../generated/api/Models/DeviceListResult.cs | 74 + .../api/Models/DeviceListResult.json.cs | 118 + .../DevicePatchProperties.PowerShell.cs | 164 + .../DevicePatchProperties.TypeConverter.cs | 147 + .../api/Models/DevicePatchProperties.cs | 54 + .../api/Models/DevicePatchProperties.json.cs | 108 + .../api/Models/DeviceProperties.PowerShell.cs | 212 + .../Models/DeviceProperties.TypeConverter.cs | 147 + .../generated/api/Models/DeviceProperties.cs | 194 + .../api/Models/DeviceProperties.json.cs | 141 + .../api/Models/DeviceUpdate.PowerShell.cs | 172 + .../api/Models/DeviceUpdate.TypeConverter.cs | 147 + .../generated/api/Models/DeviceUpdate.cs | 63 + .../generated/api/Models/DeviceUpdate.json.cs | 106 + .../DeviceUpdateProperties.PowerShell.cs | 164 + .../DeviceUpdateProperties.TypeConverter.cs | 147 + .../api/Models/DeviceUpdateProperties.cs | 54 + .../api/Models/DeviceUpdateProperties.json.cs | 108 + .../Models/ErrorAdditionalInfo.PowerShell.cs | 172 + .../ErrorAdditionalInfo.TypeConverter.cs | 147 + .../api/Models/ErrorAdditionalInfo.cs | 80 + .../api/Models/ErrorAdditionalInfo.json.cs | 116 + .../api/Models/ErrorDetail.PowerShell.cs | 196 + .../api/Models/ErrorDetail.TypeConverter.cs | 147 + .../generated/api/Models/ErrorDetail.cs | 149 + .../generated/api/Models/ErrorDetail.json.cs | 145 + .../api/Models/ErrorResponse.PowerShell.cs | 208 + .../api/Models/ErrorResponse.TypeConverter.cs | 147 + .../generated/api/Models/ErrorResponse.cs | 151 + .../api/Models/ErrorResponse.json.cs | 109 + ...nerateCapabilityImageRequest.PowerShell.cs | 164 + ...ateCapabilityImageRequest.TypeConverter.cs | 148 + .../Models/GenerateCapabilityImageRequest.cs | 56 + .../GenerateCapabilityImageRequest.json.cs | 116 + .../generated/api/Models/Image.PowerShell.cs | 316 + .../api/Models/Image.TypeConverter.cs | 146 + .../generated/api/Models/Image.cs | 309 + .../generated/api/Models/Image.json.cs | 111 + .../api/Models/ImageListResult.PowerShell.cs | 172 + .../Models/ImageListResult.TypeConverter.cs | 147 + .../generated/api/Models/ImageListResult.cs | 74 + .../api/Models/ImageListResult.json.cs | 118 + .../api/Models/ImageProperties.PowerShell.cs | 228 + .../Models/ImageProperties.TypeConverter.cs | 147 + .../generated/api/Models/ImageProperties.cs | 244 + .../api/Models/ImageProperties.json.cs | 151 + .../ListDeviceGroupsRequest.PowerShell.cs | 164 + .../ListDeviceGroupsRequest.TypeConverter.cs | 147 + .../api/Models/ListDeviceGroupsRequest.cs | 54 + .../Models/ListDeviceGroupsRequest.json.cs | 108 + .../api/Models/Operation.PowerShell.cs | 230 + .../api/Models/Operation.TypeConverter.cs | 146 + .../generated/api/Models/Operation.cs | 284 + .../generated/api/Models/Operation.json.cs | 128 + .../api/Models/OperationDisplay.PowerShell.cs | 188 + .../Models/OperationDisplay.TypeConverter.cs | 147 + .../generated/api/Models/OperationDisplay.cs | 153 + .../api/Models/OperationDisplay.json.cs | 126 + .../Models/OperationListResult.PowerShell.cs | 176 + .../OperationListResult.TypeConverter.cs | 147 + .../api/Models/OperationListResult.cs | 85 + .../api/Models/OperationListResult.json.cs | 127 + .../Models/PagedDeviceInsight.PowerShell.cs | 172 + .../PagedDeviceInsight.TypeConverter.cs | 147 + .../api/Models/PagedDeviceInsight.cs | 74 + .../api/Models/PagedDeviceInsight.json.cs | 118 + .../api/Models/Product.PowerShell.cs | 260 + .../api/Models/Product.TypeConverter.cs | 146 + .../generated/api/Models/Product.cs | 165 + .../generated/api/Models/Product.json.cs | 111 + .../Models/ProductListResult.PowerShell.cs | 172 + .../Models/ProductListResult.TypeConverter.cs | 147 + .../generated/api/Models/ProductListResult.cs | 74 + .../api/Models/ProductListResult.json.cs | 118 + .../Models/ProductProperties.PowerShell.cs | 172 + .../Models/ProductProperties.TypeConverter.cs | 147 + .../generated/api/Models/ProductProperties.cs | 79 + .../api/Models/ProductProperties.json.cs | 113 + .../api/Models/ProductUpdate.PowerShell.cs | 172 + .../api/Models/ProductUpdate.TypeConverter.cs | 147 + .../generated/api/Models/ProductUpdate.cs | 63 + .../api/Models/ProductUpdate.json.cs | 106 + .../ProductUpdateProperties.PowerShell.cs | 164 + .../ProductUpdateProperties.TypeConverter.cs | 147 + .../api/Models/ProductUpdateProperties.cs | 54 + .../Models/ProductUpdateProperties.json.cs | 108 + ...roofOfPossessionNonceRequest.PowerShell.cs | 164 + ...fOfPossessionNonceRequest.TypeConverter.cs | 147 + .../Models/ProofOfPossessionNonceRequest.cs | 54 + .../ProofOfPossessionNonceRequest.json.cs | 108 + ...oofOfPossessionNonceResponse.PowerShell.cs | 212 + ...OfPossessionNonceResponse.TypeConverter.cs | 148 + .../Models/ProofOfPossessionNonceResponse.cs | 102 + .../ProofOfPossessionNonceResponse.json.cs | 108 + .../api/Models/ProxyResource.PowerShell.cs | 238 + .../api/Models/ProxyResource.TypeConverter.cs | 147 + .../generated/api/Models/ProxyResource.cs | 112 + .../api/Models/ProxyResource.json.cs | 108 + .../api/Models/Resource.PowerShell.cs | 238 + .../api/Models/Resource.TypeConverter.cs | 146 + .../generated/api/Models/Resource.cs | 239 + .../generated/api/Models/Resource.json.cs | 126 + ...ignedCapabilityImageResponse.PowerShell.cs | 164 + ...edCapabilityImageResponse.TypeConverter.cs | 147 + .../Models/SignedCapabilityImageResponse.cs | 57 + .../SignedCapabilityImageResponse.json.cs | 111 + .../api/Models/SphereIdentity.PowerShell.cs | 234 + .../Models/SphereIdentity.TypeConverter.cs | 157 + .../generated/api/Models/SphereIdentity.cs | 243 + .../api/Models/SphereIdentity.json.cs | 125 + .../api/Models/SystemData.PowerShell.cs | 204 + .../api/Models/SystemData.TypeConverter.cs | 146 + .../generated/api/Models/SystemData.cs | 158 + .../generated/api/Models/SystemData.json.cs | 116 + .../api/Models/TrackedResource.PowerShell.cs | 254 + .../Models/TrackedResource.TypeConverter.cs | 147 + .../generated/api/Models/TrackedResource.cs | 152 + .../api/Models/TrackedResource.json.cs | 117 + .../Models/TrackedResourceTags.PowerShell.cs | 160 + .../TrackedResourceTags.TypeConverter.cs | 147 + .../api/Models/TrackedResourceTags.cs | 35 + .../Models/TrackedResourceTags.dictionary.cs | 75 + .../api/Models/TrackedResourceTags.json.cs | 109 + .../Sphere.Autorest/generated/api/Sphere.cs | 19145 ++++ ...AzSphereCatalogDeviceGroup_ListExpanded.cs | 599 + .../GetAzSphereCatalogDeviceInsight_List.cs | 585 + .../cmdlets/GetAzSphereCatalogDevice_List.cs | 585 + .../cmdlets/GetAzSphereCatalog_Get.cs | 500 + .../GetAzSphereCatalog_GetViaIdentity.cs | 477 + .../cmdlets/GetAzSphereCatalog_List.cs | 498 + .../cmdlets/GetAzSphereCatalog_List1.cs | 512 + ...etAzSphereCertificateCertChain_Retrieve.cs | 518 + ...ertificateCertChain_RetrieveViaIdentity.cs | 484 + ...ateCertChain_RetrieveViaIdentityCatalog.cs | 497 + ...SphereCertificateProof_RetrieveExpanded.cs | 532 + ...roof_RetrieveViaIdentityCatalogExpanded.cs | 512 + ...ficateProof_RetrieveViaIdentityExpanded.cs | 498 + .../cmdlets/GetAzSphereCertificate_Get.cs | 515 + .../GetAzSphereCertificate_GetViaIdentity.cs | 481 + ...SphereCertificate_GetViaIdentityCatalog.cs | 494 + .../cmdlets/GetAzSphereCertificate_List.cs | 582 + .../cmdlets/GetAzSphereDeployment_Get.cs | 547 + .../GetAzSphereDeployment_GetViaIdentity.cs | 492 + ...zSphereDeployment_GetViaIdentityCatalog.cs | 526 + ...ereDeployment_GetViaIdentityDeviceGroup.cs | 506 + ...zSphereDeployment_GetViaIdentityProduct.cs | 516 + .../cmdlets/GetAzSphereDeployment_List.cs | 613 + .../cmdlets/GetAzSphereDeviceGroup_Get.cs | 531 + .../GetAzSphereDeviceGroup_GetViaIdentity.cs | 488 + ...SphereDeviceGroup_GetViaIdentityCatalog.cs | 510 + ...SphereDeviceGroup_GetViaIdentityProduct.cs | 500 + .../cmdlets/GetAzSphereDeviceGroup_List.cs | 599 + .../cmdlets/GetAzSphereDevice_Get.cs | 546 + .../GetAzSphereDevice_GetViaIdentity.cs | 492 + ...GetAzSphereDevice_GetViaIdentityCatalog.cs | 525 + ...zSphereDevice_GetViaIdentityDeviceGroup.cs | 504 + ...GetAzSphereDevice_GetViaIdentityProduct.cs | 515 + .../cmdlets/GetAzSphereDevice_List.cs | 558 + .../generated/cmdlets/GetAzSphereImage_Get.cs | 514 + .../GetAzSphereImage_GetViaIdentity.cs | 481 + .../GetAzSphereImage_GetViaIdentityCatalog.cs | 493 + .../cmdlets/GetAzSphereImage_List.cs | 582 + .../cmdlets/GetAzSphereOperation_List.cs | 477 + .../cmdlets/GetAzSphereProduct_Get.cs | 516 + .../GetAzSphereProduct_GetViaIdentity.cs | 483 + ...etAzSphereProduct_GetViaIdentityCatalog.cs | 495 + .../cmdlets/GetAzSphereProduct_List.cs | 526 + ...eAzSphereCountCatalogDevice_CountDevice.cs | 499 + ...untCatalogDevice_CountDeviceViaIdentity.cs | 480 + ...phereCountDeviceGroupDevice_CountDevice.cs | 530 + ...eviceGroupDevice_CountDeviceViaIdentity.cs | 491 + ...oupDevice_CountDeviceViaIdentityCatalog.cs | 513 + ...oupDevice_CountDeviceViaIdentityProduct.cs | 503 + ...eAzSphereCountProductDevice_CountDevice.cs | 515 + ...untProductDevice_CountDeviceViaIdentity.cs | 486 + ...uctDevice_CountDeviceViaIdentityCatalog.cs | 498 + .../NewAzSphereCatalog_CreateExpanded.cs | 609 + ...ewAzSphereCatalog_CreateViaJsonFilePath.cs | 599 + .../NewAzSphereCatalog_CreateViaJsonString.cs | 597 + .../NewAzSphereDeployment_CreateExpanded.cs | 659 + ...zSphereDeployment_CreateViaJsonFilePath.cs | 649 + ...wAzSphereDeployment_CreateViaJsonString.cs | 647 + ...eDeviceCapabilityImage_GenerateExpanded.cs | 646 + ...mage_GenerateViaIdentityCatalogExpanded.cs | 628 + ..._GenerateViaIdentityDeviceGroupExpanded.cs | 606 + ...mage_GenerateViaIdentityProductExpanded.cs | 617 + ...CapabilityImage_GenerateViaJsonFilePath.cs | 648 + ...ceCapabilityImage_GenerateViaJsonString.cs | 644 + .../NewAzSphereDeviceGroup_CreateExpanded.cs | 678 + ...SphereDeviceGroup_CreateViaJsonFilePath.cs | 632 + ...AzSphereDeviceGroup_CreateViaJsonString.cs | 630 + .../NewAzSphereDevice_CreateExpanded.cs | 646 + ...NewAzSphereDevice_CreateViaJsonFilePath.cs | 648 + .../NewAzSphereDevice_CreateViaJsonString.cs | 646 + .../NewAzSphereImage_CreateExpanded.cs | 637 + .../NewAzSphereImage_CreateViaJsonFilePath.cs | 614 + .../NewAzSphereImage_CreateViaJsonString.cs | 612 + ...phereProductDefaultDeviceGroup_Generate.cs | 543 + ...tDefaultDeviceGroup_GenerateViaIdentity.cs | 514 + ...tDeviceGroup_GenerateViaIdentityCatalog.cs | 526 + .../NewAzSphereProduct_CreateExpanded.cs | 614 + ...ewAzSphereProduct_CreateViaJsonFilePath.cs | 616 + .../NewAzSphereProduct_CreateViaJsonString.cs | 614 + .../cmdlets/RemoveAzSphereCatalog_Delete.cs | 603 + ...RemoveAzSphereCatalog_DeleteViaIdentity.cs | 580 + .../RemoveAzSphereDeviceGroup_Delete.cs | 636 + ...veAzSphereDeviceGroup_DeleteViaIdentity.cs | 591 + ...ereDeviceGroup_DeleteViaIdentityCatalog.cs | 615 + ...ereDeviceGroup_DeleteViaIdentityProduct.cs | 604 + .../cmdlets/RemoveAzSphereProduct_Delete.cs | 620 + ...RemoveAzSphereProduct_DeleteViaIdentity.cs | 586 + ...zSphereProduct_DeleteViaIdentityCatalog.cs | 599 + .../SetAzSphereCatalog_UpdateExpanded.cs | 610 + ...etAzSphereCatalog_UpdateViaJsonFilePath.cs | 600 + .../SetAzSphereCatalog_UpdateViaJsonString.cs | 598 + .../SetAzSphereDeployment_UpdateExpanded.cs | 660 + ...zSphereDeployment_UpdateViaJsonFilePath.cs | 650 + ...tAzSphereDeployment_UpdateViaJsonString.cs | 648 + .../SetAzSphereDeviceGroup_UpdateExpanded.cs | 679 + ...SphereDeviceGroup_UpdateViaJsonFilePath.cs | 633 + ...AzSphereDeviceGroup_UpdateViaJsonString.cs | 631 + .../SetAzSphereDevice_UpdateExpanded.cs | 647 + ...SetAzSphereDevice_UpdateViaJsonFilePath.cs | 649 + .../SetAzSphereDevice_UpdateViaJsonString.cs | 647 + .../SetAzSphereImage_UpdateExpanded.cs | 638 + .../SetAzSphereImage_UpdateViaJsonFilePath.cs | 615 + .../SetAzSphereImage_UpdateViaJsonString.cs | 613 + .../SetAzSphereProduct_UpdateExpanded.cs | 615 + ...etAzSphereProduct_UpdateViaJsonFilePath.cs | 617 + .../SetAzSphereProduct_UpdateViaJsonString.cs | 615 + .../UpdateAzSphereCatalog_UpdateExpanded.cs | 515 + ...SphereCatalog_UpdateViaIdentityExpanded.cs | 495 + ...teAzSphereCatalog_UpdateViaJsonFilePath.cs | 516 + ...dateAzSphereCatalog_UpdateViaJsonString.cs | 514 + ...pdateAzSphereDeviceGroup_UpdateExpanded.cs | 678 + ...eGroup_UpdateViaIdentityCatalogExpanded.cs | 659 + ...reDeviceGroup_UpdateViaIdentityExpanded.cs | 633 + ...eGroup_UpdateViaIdentityProductExpanded.cs | 648 + ...SphereDeviceGroup_UpdateViaJsonFilePath.cs | 632 + ...AzSphereDeviceGroup_UpdateViaJsonString.cs | 630 + .../UpdateAzSphereDevice_UpdateExpanded.cs | 646 + ...Device_UpdateViaIdentityCatalogExpanded.cs | 625 + ...ce_UpdateViaIdentityDeviceGroupExpanded.cs | 604 + ...zSphereDevice_UpdateViaIdentityExpanded.cs | 589 + ...Device_UpdateViaIdentityProductExpanded.cs | 614 + ...ateAzSphereDevice_UpdateViaJsonFilePath.cs | 648 + ...pdateAzSphereDevice_UpdateViaJsonString.cs | 646 + .../UpdateAzSphereProduct_UpdateExpanded.cs | 614 + ...roduct_UpdateViaIdentityCatalogExpanded.cs | 593 + ...SphereProduct_UpdateViaIdentityExpanded.cs | 580 + ...teAzSphereProduct_UpdateViaJsonFilePath.cs | 616 + ...dateAzSphereProduct_UpdateViaJsonString.cs | 614 + .../generated/runtime/AsyncCommandRuntime.cs | 832 + .../generated/runtime/AsyncJob.cs | 270 + .../runtime/AsyncOperationResponse.cs | 176 + .../Attributes/ExternalDocsAttribute.cs | 30 + .../PSArgumentCompleterAttribute.cs | 52 + .../BuildTime/Cmdlets/ExportCmdletSurface.cs | 113 + .../BuildTime/Cmdlets/ExportExampleStub.cs | 74 + .../BuildTime/Cmdlets/ExportFormatPs1xml.cs | 103 + .../BuildTime/Cmdlets/ExportHelpMarkdown.cs | 56 + .../BuildTime/Cmdlets/ExportModelSurface.cs | 117 + .../BuildTime/Cmdlets/ExportProxyCmdlet.cs | 180 + .../runtime/BuildTime/Cmdlets/ExportPsd1.cs | 193 + .../BuildTime/Cmdlets/ExportTestStub.cs | 197 + .../BuildTime/Cmdlets/GetCommonParameter.cs | 52 + .../BuildTime/Cmdlets/GetModuleGuid.cs | 31 + .../BuildTime/Cmdlets/GetScriptCmdlet.cs | 54 + .../runtime/BuildTime/CollectionExtensions.cs | 20 + .../runtime/BuildTime/MarkdownRenderer.cs | 122 + .../runtime/BuildTime/Models/PsFormatTypes.cs | 138 + .../BuildTime/Models/PsHelpMarkdownOutputs.cs | 199 + .../runtime/BuildTime/Models/PsHelpTypes.cs | 202 + .../BuildTime/Models/PsMarkdownTypes.cs | 329 + .../BuildTime/Models/PsProxyOutputs.cs | 662 + .../runtime/BuildTime/Models/PsProxyTypes.cs | 544 + .../runtime/BuildTime/PsAttributes.cs | 131 + .../runtime/BuildTime/PsExtensions.cs | 176 + .../generated/runtime/BuildTime/PsHelpers.cs | 105 + .../runtime/BuildTime/StringExtensions.cs | 24 + .../runtime/BuildTime/XmlExtensions.cs | 28 + .../generated/runtime/CmdInfoHandler.cs | 40 + .../generated/runtime/Context.cs | 33 + .../Conversions/ConversionException.cs | 17 + .../runtime/Conversions/IJsonConverter.cs | 13 + .../Conversions/Instances/BinaryConverter.cs | 24 + .../Conversions/Instances/BooleanConverter.cs | 13 + .../Instances/DateTimeConverter.cs | 18 + .../Instances/DateTimeOffsetConverter.cs | 15 + .../Conversions/Instances/DecimalConverter.cs | 16 + .../Conversions/Instances/DoubleConverter.cs | 13 + .../Conversions/Instances/EnumConverter.cs | 30 + .../Conversions/Instances/GuidConverter.cs | 15 + .../Instances/HashSet'1Converter.cs | 27 + .../Conversions/Instances/Int16Converter.cs | 13 + .../Conversions/Instances/Int32Converter.cs | 13 + .../Conversions/Instances/Int64Converter.cs | 13 + .../Instances/JsonArrayConverter.cs | 13 + .../Instances/JsonObjectConverter.cs | 13 + .../Conversions/Instances/SingleConverter.cs | 13 + .../Conversions/Instances/StringConverter.cs | 13 + .../Instances/TimeSpanConverter.cs | 15 + .../Conversions/Instances/UInt16Converter.cs | 13 + .../Conversions/Instances/UInt32Converter.cs | 13 + .../Conversions/Instances/UInt64Converter.cs | 13 + .../Conversions/Instances/UriConverter.cs | 15 + .../runtime/Conversions/JsonConverter.cs | 21 + .../Conversions/JsonConverterAttribute.cs | 18 + .../Conversions/JsonConverterFactory.cs | 91 + .../Conversions/StringLikeConverter.cs | 45 + .../Customizations/IJsonSerializable.cs | 263 + .../runtime/Customizations/JsonArray.cs | 13 + .../runtime/Customizations/JsonBoolean.cs | 16 + .../runtime/Customizations/JsonNode.cs | 21 + .../runtime/Customizations/JsonNumber.cs | 78 + .../runtime/Customizations/JsonObject.cs | 183 + .../runtime/Customizations/JsonString.cs | 34 + .../runtime/Customizations/XNodeArray.cs | 44 + .../generated/runtime/Debugging.cs | 28 + .../generated/runtime/DictionaryExtensions.cs | 33 + .../generated/runtime/EventData.cs | 78 + .../generated/runtime/EventDataExtensions.cs | 94 + .../generated/runtime/EventListener.cs | 247 + .../generated/runtime/Events.cs | 27 + .../generated/runtime/EventsExtensions.cs | 27 + .../generated/runtime/Extensions.cs | 117 + .../Extensions/StringBuilderExtensions.cs | 23 + .../Helpers/Extensions/TypeExtensions.cs | 61 + .../generated/runtime/Helpers/Seperator.cs | 11 + .../generated/runtime/Helpers/TypeDetails.cs | 116 + .../generated/runtime/Helpers/XHelper.cs | 75 + .../generated/runtime/HttpPipeline.cs | 88 + .../generated/runtime/HttpPipelineMocking.ps1 | 110 + .../generated/runtime/IAssociativeArray.cs | 24 + .../generated/runtime/IHeaderSerializable.cs | 14 + .../generated/runtime/ISendAsync.cs | 413 + .../generated/runtime/InfoAttribute.cs | 38 + .../generated/runtime/InputHandler.cs | 22 + .../generated/runtime/Iso/IsoDate.cs | 214 + .../generated/runtime/JsonType.cs | 18 + .../generated/runtime/MessageAttribute.cs | 350 + .../runtime/MessageAttributeHelper.cs | 184 + .../generated/runtime/Method.cs | 19 + .../generated/runtime/Models/JsonMember.cs | 83 + .../generated/runtime/Models/JsonModel.cs | 89 + .../runtime/Models/JsonModelCache.cs | 19 + .../runtime/Nodes/Collections/JsonArray.cs | 65 + .../Nodes/Collections/XImmutableArray.cs | 62 + .../runtime/Nodes/Collections/XList.cs | 64 + .../runtime/Nodes/Collections/XNodeArray.cs | 73 + .../runtime/Nodes/Collections/XSet.cs | 60 + .../generated/runtime/Nodes/JsonBoolean.cs | 42 + .../generated/runtime/Nodes/JsonDate.cs | 173 + .../generated/runtime/Nodes/JsonNode.cs | 250 + .../generated/runtime/Nodes/JsonNumber.cs | 109 + .../generated/runtime/Nodes/JsonObject.cs | 172 + .../generated/runtime/Nodes/JsonString.cs | 42 + .../generated/runtime/Nodes/XBinary.cs | 40 + .../generated/runtime/Nodes/XNull.cs | 15 + .../Parser/Exceptions/ParseException.cs | 24 + .../generated/runtime/Parser/JsonParser.cs | 180 + .../generated/runtime/Parser/JsonToken.cs | 66 + .../generated/runtime/Parser/JsonTokenizer.cs | 177 + .../generated/runtime/Parser/Location.cs | 43 + .../runtime/Parser/Readers/SourceReader.cs | 130 + .../generated/runtime/Parser/TokenReader.cs | 39 + .../generated/runtime/PipelineMocking.cs | 262 + .../runtime/Properties/Resources.Designer.cs | 5655 ++ .../runtime/Properties/Resources.resx | 1747 + .../generated/runtime/Response.cs | 27 + .../runtime/Serialization/JsonSerializer.cs | 350 + .../Serialization/PropertyTransformation.cs | 21 + .../Serialization/SerializationOptions.cs | 65 + .../generated/runtime/SerializationMode.cs | 18 + .../runtime/TypeConverterExtensions.cs | 261 + .../runtime/UndeclaredResponseException.cs | 112 + .../generated/runtime/Writers/JsonWriter.cs | 223 + .../generated/runtime/delegates.cs | 23 + src/Sphere/Sphere.Autorest/help/Az.Sphere.md | 120 + .../help/Get-AzSphereCatalog.md | 206 + .../help/Get-AzSphereCatalogDevice.md | 212 + .../help/Get-AzSphereCatalogDeviceGroup.md | 222 + .../help/Get-AzSphereCatalogDeviceInsight.md | 200 + .../help/Get-AzSphereCertificate.md | 255 + .../help/Get-AzSphereCertificateCertChain.md | 206 + .../help/Get-AzSphereCertificateProof.md | 226 + .../help/Get-AzSphereDeployment.md | 357 + .../help/Get-AzSphereDevice.md | 286 + .../help/Get-AzSphereDeviceGroup.md | 321 + .../Sphere.Autorest/help/Get-AzSphereImage.md | 275 + .../help/Get-AzSphereProduct.md | 204 + .../help/Invoke-AzSphereCountCatalogDevice.md | 169 + .../Invoke-AzSphereCountDeviceGroupDevice.md | 244 + .../help/Invoke-AzSphereCountProductDevice.md | 207 + .../help/New-AzSphereCatalog.md | 262 + .../help/New-AzSphereDeployment.md | 328 + .../help/New-AzSphereDevice.md | 299 + .../help/New-AzSphereDeviceCapabilityImage.md | 351 + .../help/New-AzSphereDeviceGroup.md | 344 + .../Sphere.Autorest/help/New-AzSphereImage.md | 304 + .../help/New-AzSphereProduct.md | 263 + .../New-AzSphereProductDefaultDeviceGroup.md | 211 + src/Sphere/Sphere.Autorest/help/README.md | 11 + .../help/Remove-AzSphereCatalog.md | 208 + .../help/Remove-AzSphereDeviceGroup.md | 283 + .../help/Remove-AzSphereProduct.md | 247 + .../help/Update-AzSphereCatalog.md | 239 + .../help/Update-AzSphereDevice.md | 414 + .../help/Update-AzSphereDeviceGroup.md | 413 + .../help/Update-AzSphereProduct.md | 306 + src/Sphere/Sphere.Autorest/how-to.md | 58 + .../internal/Az.Sphere.internal.psm1 | 38 + .../internal/Get-AzSphereOperation.ps1 | 125 + .../internal/ProxyCmdletDefinitions.ps1 | 1293 + src/Sphere/Sphere.Autorest/internal/README.md | 14 + .../internal/Set-AzSphereCatalog.ps1 | 194 + .../internal/Set-AzSphereDeployment.ps1 | 224 + .../internal/Set-AzSphereDevice.ps1 | 208 + .../internal/Set-AzSphereDeviceGroup.ps1 | 229 + .../internal/Set-AzSphereImage.ps1 | 208 + .../internal/Set-AzSphereProduct.ps1 | 195 + src/Sphere/Sphere.Autorest/pack-module.ps1 | 17 + src/Sphere/Sphere.Autorest/run-module.ps1 | 62 + src/Sphere/Sphere.Autorest/test-module.ps1 | 98 + .../AzSphereDeviceScenario.Recording.json | 876 + .../test/AzSphereDeviceScenario.Tests.ps1 | 92 + ...zSphereDeviceSecondScenario.Recording.json | 1608 + .../AzSphereDeviceSecondScenario.Tests.ps1 | 136 + ...eImageandDeploymentScenario.Recording.json | 1181 + ...SphereImageandDeploymentScenario.Tests.ps1 | 80 + .../test/AzSphereMainScenario.Recording.json | 1174 + .../test/AzSphereMainScenario.Tests.ps1 | 145 + .../test/Get-AzSphereCatalog.Tests.ps1 | 33 + .../test/Get-AzSphereCatalogDevice.Tests.ps1 | 21 + .../Get-AzSphereCatalogDeviceGroup.Tests.ps1 | 21 + ...Get-AzSphereCatalogDeviceInsight.Tests.ps1 | 21 + .../test/Get-AzSphereCertificate.Tests.ps1 | 33 + ...Get-AzSphereCertificateCertChain.Tests.ps1 | 29 + .../Get-AzSphereCertificateProof.Tests.ps1 | 29 + .../test/Get-AzSphereDeployment.Tests.ps1 | 41 + .../test/Get-AzSphereDevice.Tests.ps1 | 41 + .../test/Get-AzSphereDeviceGroup.Tests.ps1 | 37 + .../test/Get-AzSphereImage.Tests.ps1 | 33 + .../test/Get-AzSphereProduct.Tests.ps1 | 33 + ...e-AzSphereClaimDeviceGroupDevice.Tests.ps1 | 33 + ...nvoke-AzSphereCountCatalogDevice.Tests.ps1 | 25 + ...e-AzSphereCountDeviceGroupDevice.Tests.ps1 | 33 + ...nvoke-AzSphereCountProductDevice.Tests.ps1 | 29 + .../test/New-AzSphereCatalog.Tests.ps1 | 29 + .../test/New-AzSphereDeployment.Tests.ps1 | 29 + .../test/New-AzSphereDevice.Tests.ps1 | 29 + ...ew-AzSphereDeviceCapabilityImage.Tests.ps1 | 41 + .../test/New-AzSphereDeviceGroup.Tests.ps1 | 29 + .../test/New-AzSphereImage.Tests.ps1 | 29 + .../test/New-AzSphereProduct.Tests.ps1 | 29 + ...zSphereProductDefaultDeviceGroup.Tests.ps1 | 29 + src/Sphere/Sphere.Autorest/test/README.md | 17 + .../test/Remove-AzSphereCatalog.Tests.ps1 | 25 + .../test/Remove-AzSphereDeviceGroup.Tests.ps1 | 33 + .../test/Remove-AzSphereProduct.Tests.ps1 | 29 + .../test/Update-AzSphereCatalog.Tests.ps1 | 33 + .../test/Update-AzSphereDevice.Tests.ps1 | 45 + .../test/Update-AzSphereDeviceGroup.Tests.ps1 | 41 + .../test/Update-AzSphereProduct.Tests.ps1 | 37 + src/Sphere/Sphere.Autorest/test/env.json | 74612 ++++++++++++++++ .../imagefile/AzureSphereBlink1.imagepackage | Bin 0 -> 16596 bytes .../imagefile/ErrorReporting.imagepackage | Bin 0 -> 20692 bytes .../imagefile/GPIO_HighLevelApp.imagepackage | Bin 0 -> 20692 bytes .../HelloWorld_HighLevelApp.imagepackage | Bin 0 -> 16596 bytes src/Sphere/Sphere.Autorest/test/loadEnv.ps1 | 29 + src/Sphere/Sphere.Autorest/test/utils.ps1 | 125 + .../utils/Get-SubscriptionIdTestSafe.ps1 | 7 + .../utils/Unprotect-SecureString.ps1 | 16 + src/Sphere/Sphere.sln | 74 + src/Sphere/Sphere/Az.Sphere.psd1 | 147 + src/Sphere/Sphere/ChangeLog.md | 24 + src/Sphere/Sphere/Properties/AssemblyInfo.cs | 28 + src/Sphere/Sphere/Sphere.csproj | 28 + src/Sphere/Sphere/help/Az.Sphere.md | 120 + src/Sphere/Sphere/help/Get-AzSphereCatalog.md | 222 + .../Sphere/help/Get-AzSphereCatalogDevice.md | 226 + .../help/Get-AzSphereCatalogDeviceGroup.md | 236 + .../help/Get-AzSphereCatalogDeviceInsight.md | 214 + .../Sphere/help/Get-AzSphereCertificate.md | 271 + .../help/Get-AzSphereCertificateCertChain.md | 221 + .../help/Get-AzSphereCertificateProof.md | 241 + .../Sphere/help/Get-AzSphereDeployment.md | 375 + src/Sphere/Sphere/help/Get-AzSphereDevice.md | 304 + .../Sphere/help/Get-AzSphereDeviceGroup.md | 337 + src/Sphere/Sphere/help/Get-AzSphereImage.md | 290 + src/Sphere/Sphere/help/Get-AzSphereProduct.md | 220 + .../help/Invoke-AzSphereCountCatalogDevice.md | 183 + .../Invoke-AzSphereCountDeviceGroupDevice.md | 259 + .../help/Invoke-AzSphereCountProductDevice.md | 222 + src/Sphere/Sphere/help/New-AzSphereCatalog.md | 278 + .../Sphere/help/New-AzSphereDeployment.md | 343 + src/Sphere/Sphere/help/New-AzSphereDevice.md | 312 + .../help/New-AzSphereDeviceCapabilityImage.md | 368 + .../Sphere/help/New-AzSphereDeviceGroup.md | 358 + src/Sphere/Sphere/help/New-AzSphereImage.md | 318 + src/Sphere/Sphere/help/New-AzSphereProduct.md | 277 + .../New-AzSphereProductDefaultDeviceGroup.md | 226 + .../Sphere/help/Remove-AzSphereCatalog.md | 223 + .../Sphere/help/Remove-AzSphereDeviceGroup.md | 298 + .../Sphere/help/Remove-AzSphereProduct.md | 261 + .../Sphere/help/Update-AzSphereCatalog.md | 255 + .../Sphere/help/Update-AzSphereDevice.md | 429 + .../Sphere/help/Update-AzSphereDeviceGroup.md | 429 + .../Sphere/help/Update-AzSphereProduct.md | 321 + tools/CreateMappings_rules.json | 4 + 692 files changed, 266047 insertions(+) create mode 100644 src/Sphere/Sphere.Autorest/Az.Sphere.csproj create mode 100644 src/Sphere/Sphere.Autorest/Az.Sphere.format.ps1xml create mode 100644 src/Sphere/Sphere.Autorest/Az.Sphere.psd1 create mode 100644 src/Sphere/Sphere.Autorest/Az.Sphere.psm1 create mode 100644 src/Sphere/Sphere.Autorest/README.md create mode 100644 src/Sphere/Sphere.Autorest/UX/Microsoft.AzureSphere/catalogs-certificates.json create mode 100644 src/Sphere/Sphere.Autorest/UX/Microsoft.AzureSphere/catalogs-images.json create mode 100644 src/Sphere/Sphere.Autorest/UX/Microsoft.AzureSphere/catalogs-products-deviceGroups-deployments.json create mode 100644 src/Sphere/Sphere.Autorest/UX/Microsoft.AzureSphere/catalogs-products-deviceGroups-devices.json create mode 100644 src/Sphere/Sphere.Autorest/UX/Microsoft.AzureSphere/catalogs-products-deviceGroups.json create mode 100644 src/Sphere/Sphere.Autorest/UX/Microsoft.AzureSphere/catalogs-products.json create mode 100644 src/Sphere/Sphere.Autorest/UX/Microsoft.AzureSphere/catalogs.json create mode 100644 src/Sphere/Sphere.Autorest/build-module.ps1 create mode 100644 src/Sphere/Sphere.Autorest/check-dependencies.ps1 create mode 100644 src/Sphere/Sphere.Autorest/create-model-cmdlets.ps1 create mode 100644 src/Sphere/Sphere.Autorest/custom/Az.Sphere.custom.psm1 create mode 100644 src/Sphere/Sphere.Autorest/custom/README.md create mode 100644 src/Sphere/Sphere.Autorest/examples/Get-AzSphereCatalog.md create mode 100644 src/Sphere/Sphere.Autorest/examples/Get-AzSphereCatalogDevice.md create mode 100644 src/Sphere/Sphere.Autorest/examples/Get-AzSphereCatalogDeviceGroup.md create mode 100644 src/Sphere/Sphere.Autorest/examples/Get-AzSphereCatalogDeviceInsight.md create mode 100644 src/Sphere/Sphere.Autorest/examples/Get-AzSphereCertificate.md create mode 100644 src/Sphere/Sphere.Autorest/examples/Get-AzSphereCertificateCertChain.md create mode 100644 src/Sphere/Sphere.Autorest/examples/Get-AzSphereCertificateProof.md create mode 100644 src/Sphere/Sphere.Autorest/examples/Get-AzSphereDeployment.md create mode 100644 src/Sphere/Sphere.Autorest/examples/Get-AzSphereDevice.md create mode 100644 src/Sphere/Sphere.Autorest/examples/Get-AzSphereDeviceGroup.md create mode 100644 src/Sphere/Sphere.Autorest/examples/Get-AzSphereImage.md create mode 100644 src/Sphere/Sphere.Autorest/examples/Get-AzSphereProduct.md create mode 100644 src/Sphere/Sphere.Autorest/examples/Invoke-AzSphereCountCatalogDevice.md create mode 100644 src/Sphere/Sphere.Autorest/examples/Invoke-AzSphereCountDeviceGroupDevice.md create mode 100644 src/Sphere/Sphere.Autorest/examples/Invoke-AzSphereCountProductDevice.md create mode 100644 src/Sphere/Sphere.Autorest/examples/New-AzSphereCatalog.md create mode 100644 src/Sphere/Sphere.Autorest/examples/New-AzSphereDeployment.md create mode 100644 src/Sphere/Sphere.Autorest/examples/New-AzSphereDevice.md create mode 100644 src/Sphere/Sphere.Autorest/examples/New-AzSphereDeviceCapabilityImage.md create mode 100644 src/Sphere/Sphere.Autorest/examples/New-AzSphereDeviceGroup.md create mode 100644 src/Sphere/Sphere.Autorest/examples/New-AzSphereImage.md create mode 100644 src/Sphere/Sphere.Autorest/examples/New-AzSphereProduct.md create mode 100644 src/Sphere/Sphere.Autorest/examples/New-AzSphereProductDefaultDeviceGroup.md create mode 100644 src/Sphere/Sphere.Autorest/examples/Remove-AzSphereCatalog.md create mode 100644 src/Sphere/Sphere.Autorest/examples/Remove-AzSphereDeviceGroup.md create mode 100644 src/Sphere/Sphere.Autorest/examples/Remove-AzSphereProduct.md create mode 100644 src/Sphere/Sphere.Autorest/examples/Update-AzSphereCatalog.md create mode 100644 src/Sphere/Sphere.Autorest/examples/Update-AzSphereDevice.md create mode 100644 src/Sphere/Sphere.Autorest/examples/Update-AzSphereDeviceGroup.md create mode 100644 src/Sphere/Sphere.Autorest/examples/Update-AzSphereProduct.md create mode 100644 src/Sphere/Sphere.Autorest/export-surface.ps1 create mode 100644 src/Sphere/Sphere.Autorest/exports/Get-AzSphereCatalog.ps1 create mode 100644 src/Sphere/Sphere.Autorest/exports/Get-AzSphereCatalogDevice.ps1 create mode 100644 src/Sphere/Sphere.Autorest/exports/Get-AzSphereCatalogDeviceGroup.ps1 create mode 100644 src/Sphere/Sphere.Autorest/exports/Get-AzSphereCatalogDeviceInsight.ps1 create mode 100644 src/Sphere/Sphere.Autorest/exports/Get-AzSphereCertificate.ps1 create mode 100644 src/Sphere/Sphere.Autorest/exports/Get-AzSphereCertificateCertChain.ps1 create mode 100644 src/Sphere/Sphere.Autorest/exports/Get-AzSphereCertificateProof.ps1 create mode 100644 src/Sphere/Sphere.Autorest/exports/Get-AzSphereDeployment.ps1 create mode 100644 src/Sphere/Sphere.Autorest/exports/Get-AzSphereDevice.ps1 create mode 100644 src/Sphere/Sphere.Autorest/exports/Get-AzSphereDeviceGroup.ps1 create mode 100644 src/Sphere/Sphere.Autorest/exports/Get-AzSphereImage.ps1 create mode 100644 src/Sphere/Sphere.Autorest/exports/Get-AzSphereProduct.ps1 create mode 100644 src/Sphere/Sphere.Autorest/exports/Invoke-AzSphereCountCatalogDevice.ps1 create mode 100644 src/Sphere/Sphere.Autorest/exports/Invoke-AzSphereCountDeviceGroupDevice.ps1 create mode 100644 src/Sphere/Sphere.Autorest/exports/Invoke-AzSphereCountProductDevice.ps1 create mode 100644 src/Sphere/Sphere.Autorest/exports/New-AzSphereCatalog.ps1 create mode 100644 src/Sphere/Sphere.Autorest/exports/New-AzSphereDeployment.ps1 create mode 100644 src/Sphere/Sphere.Autorest/exports/New-AzSphereDevice.ps1 create mode 100644 src/Sphere/Sphere.Autorest/exports/New-AzSphereDeviceCapabilityImage.ps1 create mode 100644 src/Sphere/Sphere.Autorest/exports/New-AzSphereDeviceGroup.ps1 create mode 100644 src/Sphere/Sphere.Autorest/exports/New-AzSphereImage.ps1 create mode 100644 src/Sphere/Sphere.Autorest/exports/New-AzSphereProduct.ps1 create mode 100644 src/Sphere/Sphere.Autorest/exports/New-AzSphereProductDefaultDeviceGroup.ps1 create mode 100644 src/Sphere/Sphere.Autorest/exports/ProxyCmdletDefinitions.ps1 create mode 100644 src/Sphere/Sphere.Autorest/exports/README.md create mode 100644 src/Sphere/Sphere.Autorest/exports/Remove-AzSphereCatalog.ps1 create mode 100644 src/Sphere/Sphere.Autorest/exports/Remove-AzSphereDeviceGroup.ps1 create mode 100644 src/Sphere/Sphere.Autorest/exports/Remove-AzSphereProduct.ps1 create mode 100644 src/Sphere/Sphere.Autorest/exports/Update-AzSphereCatalog.ps1 create mode 100644 src/Sphere/Sphere.Autorest/exports/Update-AzSphereDevice.ps1 create mode 100644 src/Sphere/Sphere.Autorest/exports/Update-AzSphereDeviceGroup.ps1 create mode 100644 src/Sphere/Sphere.Autorest/exports/Update-AzSphereProduct.ps1 create mode 100644 src/Sphere/Sphere.Autorest/generate-help.ps1 create mode 100644 src/Sphere/Sphere.Autorest/generate-portal-ux.ps1 create mode 100644 src/Sphere/Sphere.Autorest/generated/Module.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/Any.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/Any.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/Any.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/Any.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/Catalog.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/Catalog.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/Catalog.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/Catalog.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/CatalogListResult.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/CatalogListResult.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/CatalogListResult.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/CatalogListResult.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/CatalogProperties.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/CatalogProperties.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/CatalogProperties.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/CatalogProperties.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/CatalogUpdate.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/CatalogUpdate.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/CatalogUpdate.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/CatalogUpdate.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/CatalogUpdateTags.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/CatalogUpdateTags.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/CatalogUpdateTags.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/CatalogUpdateTags.dictionary.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/CatalogUpdateTags.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/Certificate.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/Certificate.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/Certificate.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/Certificate.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/CertificateChainResponse.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/CertificateChainResponse.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/CertificateChainResponse.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/CertificateChainResponse.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/CertificateListResult.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/CertificateListResult.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/CertificateListResult.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/CertificateListResult.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/CertificateProperties.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/CertificateProperties.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/CertificateProperties.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/CertificateProperties.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ClaimDevicesRequest.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ClaimDevicesRequest.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ClaimDevicesRequest.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ClaimDevicesRequest.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/CountDeviceResponse.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/CountDeviceResponse.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/CountDeviceResponse.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/CountDeviceResponse.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/CountDevicesResponse.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/CountDevicesResponse.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/CountDevicesResponse.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/CountDevicesResponse.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/CountElementsResponse.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/CountElementsResponse.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/CountElementsResponse.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/CountElementsResponse.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/Deployment.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/Deployment.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/Deployment.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/Deployment.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeploymentListResult.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeploymentListResult.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeploymentListResult.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeploymentListResult.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeploymentProperties.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeploymentProperties.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeploymentProperties.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeploymentProperties.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/Device.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/Device.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/Device.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/Device.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroup.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroup.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroup.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroup.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupListResult.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupListResult.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupListResult.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupListResult.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupProperties.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupProperties.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupProperties.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupProperties.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupUpdate.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupUpdate.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupUpdate.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupUpdate.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupUpdateProperties.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupUpdateProperties.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupUpdateProperties.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupUpdateProperties.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeviceInsight.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeviceInsight.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeviceInsight.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeviceInsight.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeviceListResult.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeviceListResult.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeviceListResult.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeviceListResult.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DevicePatchProperties.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DevicePatchProperties.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DevicePatchProperties.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DevicePatchProperties.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeviceProperties.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeviceProperties.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeviceProperties.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeviceProperties.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeviceUpdate.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeviceUpdate.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeviceUpdate.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeviceUpdate.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeviceUpdateProperties.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeviceUpdateProperties.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeviceUpdateProperties.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/DeviceUpdateProperties.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ErrorAdditionalInfo.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ErrorAdditionalInfo.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ErrorAdditionalInfo.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ErrorAdditionalInfo.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ErrorDetail.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ErrorDetail.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ErrorDetail.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ErrorDetail.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ErrorResponse.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ErrorResponse.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ErrorResponse.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ErrorResponse.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/GenerateCapabilityImageRequest.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/GenerateCapabilityImageRequest.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/GenerateCapabilityImageRequest.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/GenerateCapabilityImageRequest.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/Image.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/Image.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/Image.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/Image.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ImageListResult.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ImageListResult.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ImageListResult.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ImageListResult.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ImageProperties.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ImageProperties.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ImageProperties.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ImageProperties.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ListDeviceGroupsRequest.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ListDeviceGroupsRequest.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ListDeviceGroupsRequest.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ListDeviceGroupsRequest.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/Operation.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/Operation.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/Operation.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/Operation.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/OperationDisplay.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/OperationDisplay.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/OperationDisplay.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/OperationDisplay.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/OperationListResult.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/OperationListResult.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/OperationListResult.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/OperationListResult.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/PagedDeviceInsight.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/PagedDeviceInsight.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/PagedDeviceInsight.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/PagedDeviceInsight.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/Product.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/Product.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/Product.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/Product.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ProductListResult.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ProductListResult.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ProductListResult.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ProductListResult.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ProductProperties.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ProductProperties.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ProductProperties.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ProductProperties.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ProductUpdate.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ProductUpdate.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ProductUpdate.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ProductUpdate.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ProductUpdateProperties.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ProductUpdateProperties.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ProductUpdateProperties.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ProductUpdateProperties.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ProofOfPossessionNonceRequest.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ProofOfPossessionNonceRequest.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ProofOfPossessionNonceRequest.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ProofOfPossessionNonceRequest.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ProofOfPossessionNonceResponse.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ProofOfPossessionNonceResponse.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ProofOfPossessionNonceResponse.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ProofOfPossessionNonceResponse.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ProxyResource.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ProxyResource.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ProxyResource.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/ProxyResource.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/Resource.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/Resource.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/Resource.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/Resource.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/SignedCapabilityImageResponse.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/SignedCapabilityImageResponse.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/SignedCapabilityImageResponse.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/SignedCapabilityImageResponse.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/SphereIdentity.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/SphereIdentity.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/SphereIdentity.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/SphereIdentity.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/SystemData.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/SystemData.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/SystemData.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/SystemData.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/TrackedResource.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/TrackedResource.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/TrackedResource.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/TrackedResource.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/TrackedResourceTags.PowerShell.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/TrackedResourceTags.TypeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/TrackedResourceTags.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/TrackedResourceTags.dictionary.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Models/TrackedResourceTags.json.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/api/Sphere.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCatalogDeviceGroup_ListExpanded.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCatalogDeviceInsight_List.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCatalogDevice_List.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCatalog_Get.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCatalog_GetViaIdentity.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCatalog_List.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCatalog_List1.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCertificateCertChain_Retrieve.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCertificateCertChain_RetrieveViaIdentity.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCertificateCertChain_RetrieveViaIdentityCatalog.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCertificateProof_RetrieveExpanded.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCertificateProof_RetrieveViaIdentityCatalogExpanded.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCertificateProof_RetrieveViaIdentityExpanded.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCertificate_Get.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCertificate_GetViaIdentity.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCertificate_GetViaIdentityCatalog.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCertificate_List.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDeployment_Get.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDeployment_GetViaIdentity.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDeployment_GetViaIdentityCatalog.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDeployment_GetViaIdentityDeviceGroup.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDeployment_GetViaIdentityProduct.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDeployment_List.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDeviceGroup_Get.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDeviceGroup_GetViaIdentity.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDeviceGroup_GetViaIdentityCatalog.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDeviceGroup_GetViaIdentityProduct.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDeviceGroup_List.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDevice_Get.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDevice_GetViaIdentity.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDevice_GetViaIdentityCatalog.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDevice_GetViaIdentityDeviceGroup.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDevice_GetViaIdentityProduct.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDevice_List.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereImage_Get.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereImage_GetViaIdentity.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereImage_GetViaIdentityCatalog.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereImage_List.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereOperation_List.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereProduct_Get.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereProduct_GetViaIdentity.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereProduct_GetViaIdentityCatalog.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereProduct_List.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/InvokeAzSphereCountCatalogDevice_CountDevice.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/InvokeAzSphereCountCatalogDevice_CountDeviceViaIdentity.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/InvokeAzSphereCountDeviceGroupDevice_CountDevice.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/InvokeAzSphereCountDeviceGroupDevice_CountDeviceViaIdentity.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/InvokeAzSphereCountDeviceGroupDevice_CountDeviceViaIdentityCatalog.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/InvokeAzSphereCountDeviceGroupDevice_CountDeviceViaIdentityProduct.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/InvokeAzSphereCountProductDevice_CountDevice.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/InvokeAzSphereCountProductDevice_CountDeviceViaIdentity.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/InvokeAzSphereCountProductDevice_CountDeviceViaIdentityCatalog.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereCatalog_CreateExpanded.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereCatalog_CreateViaJsonFilePath.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereCatalog_CreateViaJsonString.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeployment_CreateExpanded.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeployment_CreateViaJsonFilePath.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeployment_CreateViaJsonString.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateExpanded.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaIdentityCatalogExpanded.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaIdentityDeviceGroupExpanded.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaIdentityProductExpanded.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaJsonFilePath.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaJsonString.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeviceGroup_CreateExpanded.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeviceGroup_CreateViaJsonFilePath.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeviceGroup_CreateViaJsonString.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDevice_CreateExpanded.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDevice_CreateViaJsonFilePath.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDevice_CreateViaJsonString.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereImage_CreateExpanded.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereImage_CreateViaJsonFilePath.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereImage_CreateViaJsonString.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereProductDefaultDeviceGroup_Generate.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereProductDefaultDeviceGroup_GenerateViaIdentity.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereProductDefaultDeviceGroup_GenerateViaIdentityCatalog.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereProduct_CreateExpanded.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereProduct_CreateViaJsonFilePath.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereProduct_CreateViaJsonString.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/RemoveAzSphereCatalog_Delete.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/RemoveAzSphereCatalog_DeleteViaIdentity.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/RemoveAzSphereDeviceGroup_Delete.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/RemoveAzSphereDeviceGroup_DeleteViaIdentity.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/RemoveAzSphereDeviceGroup_DeleteViaIdentityCatalog.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/RemoveAzSphereDeviceGroup_DeleteViaIdentityProduct.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/RemoveAzSphereProduct_Delete.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/RemoveAzSphereProduct_DeleteViaIdentity.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/RemoveAzSphereProduct_DeleteViaIdentityCatalog.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereCatalog_UpdateExpanded.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereCatalog_UpdateViaJsonFilePath.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereCatalog_UpdateViaJsonString.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereDeployment_UpdateExpanded.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereDeployment_UpdateViaJsonFilePath.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereDeployment_UpdateViaJsonString.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereDeviceGroup_UpdateExpanded.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereDeviceGroup_UpdateViaJsonFilePath.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereDeviceGroup_UpdateViaJsonString.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereDevice_UpdateExpanded.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereDevice_UpdateViaJsonFilePath.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereDevice_UpdateViaJsonString.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereImage_UpdateExpanded.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereImage_UpdateViaJsonFilePath.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereImage_UpdateViaJsonString.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereProduct_UpdateExpanded.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereProduct_UpdateViaJsonFilePath.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereProduct_UpdateViaJsonString.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereCatalog_UpdateExpanded.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereCatalog_UpdateViaIdentityExpanded.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereCatalog_UpdateViaJsonFilePath.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereCatalog_UpdateViaJsonString.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateExpanded.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaIdentityCatalogExpanded.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaIdentityExpanded.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaIdentityProductExpanded.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaJsonFilePath.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaJsonString.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDevice_UpdateExpanded.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityCatalogExpanded.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityDeviceGroupExpanded.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityExpanded.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityProductExpanded.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDevice_UpdateViaJsonFilePath.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDevice_UpdateViaJsonString.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereProduct_UpdateExpanded.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereProduct_UpdateViaIdentityCatalogExpanded.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereProduct_UpdateViaIdentityExpanded.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereProduct_UpdateViaJsonFilePath.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereProduct_UpdateViaJsonString.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/AsyncCommandRuntime.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/AsyncJob.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/AsyncOperationResponse.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Attributes/ExternalDocsAttribute.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Attributes/PSArgumentCompleterAttribute.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Cmdlets/ExportCmdletSurface.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Cmdlets/ExportExampleStub.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Cmdlets/ExportHelpMarkdown.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Cmdlets/GetCommonParameter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Cmdlets/GetModuleGuid.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Cmdlets/GetScriptCmdlet.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/CollectionExtensions.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Models/PsFormatTypes.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Models/PsHelpMarkdownOutputs.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Models/PsHelpTypes.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/PsAttributes.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/PsExtensions.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/PsHelpers.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/StringExtensions.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/XmlExtensions.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/CmdInfoHandler.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Context.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Conversions/ConversionException.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Conversions/IJsonConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/BinaryConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/BooleanConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/DateTimeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/DateTimeOffsetConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/DecimalConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/DoubleConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/EnumConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/GuidConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/HashSet'1Converter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/Int16Converter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/Int32Converter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/Int64Converter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/JsonArrayConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/JsonObjectConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/SingleConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/StringConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/TimeSpanConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/UInt16Converter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/UInt32Converter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/UInt64Converter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/UriConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Conversions/JsonConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Conversions/JsonConverterAttribute.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Conversions/JsonConverterFactory.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Conversions/StringLikeConverter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Customizations/IJsonSerializable.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Customizations/JsonArray.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Customizations/JsonBoolean.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Customizations/JsonNode.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Customizations/JsonNumber.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Customizations/JsonObject.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Customizations/JsonString.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Customizations/XNodeArray.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Debugging.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/DictionaryExtensions.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/EventData.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/EventDataExtensions.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/EventListener.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Events.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/EventsExtensions.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Extensions.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Helpers/Extensions/StringBuilderExtensions.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Helpers/Extensions/TypeExtensions.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Helpers/Seperator.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Helpers/TypeDetails.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Helpers/XHelper.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/HttpPipeline.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/HttpPipelineMocking.ps1 create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/IAssociativeArray.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/IHeaderSerializable.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/ISendAsync.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/InfoAttribute.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/InputHandler.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Iso/IsoDate.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/JsonType.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/MessageAttribute.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/MessageAttributeHelper.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Method.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Models/JsonMember.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Models/JsonModel.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Models/JsonModelCache.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Nodes/Collections/JsonArray.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Nodes/Collections/XImmutableArray.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Nodes/Collections/XList.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Nodes/Collections/XNodeArray.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Nodes/Collections/XSet.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Nodes/JsonBoolean.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Nodes/JsonDate.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Nodes/JsonNode.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Nodes/JsonNumber.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Nodes/JsonObject.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Nodes/JsonString.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Nodes/XBinary.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Nodes/XNull.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Parser/Exceptions/ParseException.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Parser/JsonParser.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Parser/JsonToken.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Parser/JsonTokenizer.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Parser/Location.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Parser/Readers/SourceReader.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Parser/TokenReader.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/PipelineMocking.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Properties/Resources.Designer.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Properties/Resources.resx create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Response.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Serialization/JsonSerializer.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Serialization/PropertyTransformation.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Serialization/SerializationOptions.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/SerializationMode.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/TypeConverterExtensions.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/UndeclaredResponseException.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/Writers/JsonWriter.cs create mode 100644 src/Sphere/Sphere.Autorest/generated/runtime/delegates.cs create mode 100644 src/Sphere/Sphere.Autorest/help/Az.Sphere.md create mode 100644 src/Sphere/Sphere.Autorest/help/Get-AzSphereCatalog.md create mode 100644 src/Sphere/Sphere.Autorest/help/Get-AzSphereCatalogDevice.md create mode 100644 src/Sphere/Sphere.Autorest/help/Get-AzSphereCatalogDeviceGroup.md create mode 100644 src/Sphere/Sphere.Autorest/help/Get-AzSphereCatalogDeviceInsight.md create mode 100644 src/Sphere/Sphere.Autorest/help/Get-AzSphereCertificate.md create mode 100644 src/Sphere/Sphere.Autorest/help/Get-AzSphereCertificateCertChain.md create mode 100644 src/Sphere/Sphere.Autorest/help/Get-AzSphereCertificateProof.md create mode 100644 src/Sphere/Sphere.Autorest/help/Get-AzSphereDeployment.md create mode 100644 src/Sphere/Sphere.Autorest/help/Get-AzSphereDevice.md create mode 100644 src/Sphere/Sphere.Autorest/help/Get-AzSphereDeviceGroup.md create mode 100644 src/Sphere/Sphere.Autorest/help/Get-AzSphereImage.md create mode 100644 src/Sphere/Sphere.Autorest/help/Get-AzSphereProduct.md create mode 100644 src/Sphere/Sphere.Autorest/help/Invoke-AzSphereCountCatalogDevice.md create mode 100644 src/Sphere/Sphere.Autorest/help/Invoke-AzSphereCountDeviceGroupDevice.md create mode 100644 src/Sphere/Sphere.Autorest/help/Invoke-AzSphereCountProductDevice.md create mode 100644 src/Sphere/Sphere.Autorest/help/New-AzSphereCatalog.md create mode 100644 src/Sphere/Sphere.Autorest/help/New-AzSphereDeployment.md create mode 100644 src/Sphere/Sphere.Autorest/help/New-AzSphereDevice.md create mode 100644 src/Sphere/Sphere.Autorest/help/New-AzSphereDeviceCapabilityImage.md create mode 100644 src/Sphere/Sphere.Autorest/help/New-AzSphereDeviceGroup.md create mode 100644 src/Sphere/Sphere.Autorest/help/New-AzSphereImage.md create mode 100644 src/Sphere/Sphere.Autorest/help/New-AzSphereProduct.md create mode 100644 src/Sphere/Sphere.Autorest/help/New-AzSphereProductDefaultDeviceGroup.md create mode 100644 src/Sphere/Sphere.Autorest/help/README.md create mode 100644 src/Sphere/Sphere.Autorest/help/Remove-AzSphereCatalog.md create mode 100644 src/Sphere/Sphere.Autorest/help/Remove-AzSphereDeviceGroup.md create mode 100644 src/Sphere/Sphere.Autorest/help/Remove-AzSphereProduct.md create mode 100644 src/Sphere/Sphere.Autorest/help/Update-AzSphereCatalog.md create mode 100644 src/Sphere/Sphere.Autorest/help/Update-AzSphereDevice.md create mode 100644 src/Sphere/Sphere.Autorest/help/Update-AzSphereDeviceGroup.md create mode 100644 src/Sphere/Sphere.Autorest/help/Update-AzSphereProduct.md create mode 100644 src/Sphere/Sphere.Autorest/how-to.md create mode 100644 src/Sphere/Sphere.Autorest/internal/Az.Sphere.internal.psm1 create mode 100644 src/Sphere/Sphere.Autorest/internal/Get-AzSphereOperation.ps1 create mode 100644 src/Sphere/Sphere.Autorest/internal/ProxyCmdletDefinitions.ps1 create mode 100644 src/Sphere/Sphere.Autorest/internal/README.md create mode 100644 src/Sphere/Sphere.Autorest/internal/Set-AzSphereCatalog.ps1 create mode 100644 src/Sphere/Sphere.Autorest/internal/Set-AzSphereDeployment.ps1 create mode 100644 src/Sphere/Sphere.Autorest/internal/Set-AzSphereDevice.ps1 create mode 100644 src/Sphere/Sphere.Autorest/internal/Set-AzSphereDeviceGroup.ps1 create mode 100644 src/Sphere/Sphere.Autorest/internal/Set-AzSphereImage.ps1 create mode 100644 src/Sphere/Sphere.Autorest/internal/Set-AzSphereProduct.ps1 create mode 100644 src/Sphere/Sphere.Autorest/pack-module.ps1 create mode 100644 src/Sphere/Sphere.Autorest/run-module.ps1 create mode 100644 src/Sphere/Sphere.Autorest/test-module.ps1 create mode 100644 src/Sphere/Sphere.Autorest/test/AzSphereDeviceScenario.Recording.json create mode 100644 src/Sphere/Sphere.Autorest/test/AzSphereDeviceScenario.Tests.ps1 create mode 100644 src/Sphere/Sphere.Autorest/test/AzSphereDeviceSecondScenario.Recording.json create mode 100644 src/Sphere/Sphere.Autorest/test/AzSphereDeviceSecondScenario.Tests.ps1 create mode 100644 src/Sphere/Sphere.Autorest/test/AzSphereImageandDeploymentScenario.Recording.json create mode 100644 src/Sphere/Sphere.Autorest/test/AzSphereImageandDeploymentScenario.Tests.ps1 create mode 100644 src/Sphere/Sphere.Autorest/test/AzSphereMainScenario.Recording.json create mode 100644 src/Sphere/Sphere.Autorest/test/AzSphereMainScenario.Tests.ps1 create mode 100644 src/Sphere/Sphere.Autorest/test/Get-AzSphereCatalog.Tests.ps1 create mode 100644 src/Sphere/Sphere.Autorest/test/Get-AzSphereCatalogDevice.Tests.ps1 create mode 100644 src/Sphere/Sphere.Autorest/test/Get-AzSphereCatalogDeviceGroup.Tests.ps1 create mode 100644 src/Sphere/Sphere.Autorest/test/Get-AzSphereCatalogDeviceInsight.Tests.ps1 create mode 100644 src/Sphere/Sphere.Autorest/test/Get-AzSphereCertificate.Tests.ps1 create mode 100644 src/Sphere/Sphere.Autorest/test/Get-AzSphereCertificateCertChain.Tests.ps1 create mode 100644 src/Sphere/Sphere.Autorest/test/Get-AzSphereCertificateProof.Tests.ps1 create mode 100644 src/Sphere/Sphere.Autorest/test/Get-AzSphereDeployment.Tests.ps1 create mode 100644 src/Sphere/Sphere.Autorest/test/Get-AzSphereDevice.Tests.ps1 create mode 100644 src/Sphere/Sphere.Autorest/test/Get-AzSphereDeviceGroup.Tests.ps1 create mode 100644 src/Sphere/Sphere.Autorest/test/Get-AzSphereImage.Tests.ps1 create mode 100644 src/Sphere/Sphere.Autorest/test/Get-AzSphereProduct.Tests.ps1 create mode 100644 src/Sphere/Sphere.Autorest/test/Invoke-AzSphereClaimDeviceGroupDevice.Tests.ps1 create mode 100644 src/Sphere/Sphere.Autorest/test/Invoke-AzSphereCountCatalogDevice.Tests.ps1 create mode 100644 src/Sphere/Sphere.Autorest/test/Invoke-AzSphereCountDeviceGroupDevice.Tests.ps1 create mode 100644 src/Sphere/Sphere.Autorest/test/Invoke-AzSphereCountProductDevice.Tests.ps1 create mode 100644 src/Sphere/Sphere.Autorest/test/New-AzSphereCatalog.Tests.ps1 create mode 100644 src/Sphere/Sphere.Autorest/test/New-AzSphereDeployment.Tests.ps1 create mode 100644 src/Sphere/Sphere.Autorest/test/New-AzSphereDevice.Tests.ps1 create mode 100644 src/Sphere/Sphere.Autorest/test/New-AzSphereDeviceCapabilityImage.Tests.ps1 create mode 100644 src/Sphere/Sphere.Autorest/test/New-AzSphereDeviceGroup.Tests.ps1 create mode 100644 src/Sphere/Sphere.Autorest/test/New-AzSphereImage.Tests.ps1 create mode 100644 src/Sphere/Sphere.Autorest/test/New-AzSphereProduct.Tests.ps1 create mode 100644 src/Sphere/Sphere.Autorest/test/New-AzSphereProductDefaultDeviceGroup.Tests.ps1 create mode 100644 src/Sphere/Sphere.Autorest/test/README.md create mode 100644 src/Sphere/Sphere.Autorest/test/Remove-AzSphereCatalog.Tests.ps1 create mode 100644 src/Sphere/Sphere.Autorest/test/Remove-AzSphereDeviceGroup.Tests.ps1 create mode 100644 src/Sphere/Sphere.Autorest/test/Remove-AzSphereProduct.Tests.ps1 create mode 100644 src/Sphere/Sphere.Autorest/test/Update-AzSphereCatalog.Tests.ps1 create mode 100644 src/Sphere/Sphere.Autorest/test/Update-AzSphereDevice.Tests.ps1 create mode 100644 src/Sphere/Sphere.Autorest/test/Update-AzSphereDeviceGroup.Tests.ps1 create mode 100644 src/Sphere/Sphere.Autorest/test/Update-AzSphereProduct.Tests.ps1 create mode 100644 src/Sphere/Sphere.Autorest/test/env.json create mode 100644 src/Sphere/Sphere.Autorest/test/imagefile/AzureSphereBlink1.imagepackage create mode 100644 src/Sphere/Sphere.Autorest/test/imagefile/ErrorReporting.imagepackage create mode 100644 src/Sphere/Sphere.Autorest/test/imagefile/GPIO_HighLevelApp.imagepackage create mode 100644 src/Sphere/Sphere.Autorest/test/imagefile/HelloWorld_HighLevelApp.imagepackage create mode 100644 src/Sphere/Sphere.Autorest/test/loadEnv.ps1 create mode 100644 src/Sphere/Sphere.Autorest/test/utils.ps1 create mode 100644 src/Sphere/Sphere.Autorest/utils/Get-SubscriptionIdTestSafe.ps1 create mode 100644 src/Sphere/Sphere.Autorest/utils/Unprotect-SecureString.ps1 create mode 100644 src/Sphere/Sphere.sln create mode 100644 src/Sphere/Sphere/Az.Sphere.psd1 create mode 100644 src/Sphere/Sphere/ChangeLog.md create mode 100644 src/Sphere/Sphere/Properties/AssemblyInfo.cs create mode 100644 src/Sphere/Sphere/Sphere.csproj create mode 100644 src/Sphere/Sphere/help/Az.Sphere.md create mode 100644 src/Sphere/Sphere/help/Get-AzSphereCatalog.md create mode 100644 src/Sphere/Sphere/help/Get-AzSphereCatalogDevice.md create mode 100644 src/Sphere/Sphere/help/Get-AzSphereCatalogDeviceGroup.md create mode 100644 src/Sphere/Sphere/help/Get-AzSphereCatalogDeviceInsight.md create mode 100644 src/Sphere/Sphere/help/Get-AzSphereCertificate.md create mode 100644 src/Sphere/Sphere/help/Get-AzSphereCertificateCertChain.md create mode 100644 src/Sphere/Sphere/help/Get-AzSphereCertificateProof.md create mode 100644 src/Sphere/Sphere/help/Get-AzSphereDeployment.md create mode 100644 src/Sphere/Sphere/help/Get-AzSphereDevice.md create mode 100644 src/Sphere/Sphere/help/Get-AzSphereDeviceGroup.md create mode 100644 src/Sphere/Sphere/help/Get-AzSphereImage.md create mode 100644 src/Sphere/Sphere/help/Get-AzSphereProduct.md create mode 100644 src/Sphere/Sphere/help/Invoke-AzSphereCountCatalogDevice.md create mode 100644 src/Sphere/Sphere/help/Invoke-AzSphereCountDeviceGroupDevice.md create mode 100644 src/Sphere/Sphere/help/Invoke-AzSphereCountProductDevice.md create mode 100644 src/Sphere/Sphere/help/New-AzSphereCatalog.md create mode 100644 src/Sphere/Sphere/help/New-AzSphereDeployment.md create mode 100644 src/Sphere/Sphere/help/New-AzSphereDevice.md create mode 100644 src/Sphere/Sphere/help/New-AzSphereDeviceCapabilityImage.md create mode 100644 src/Sphere/Sphere/help/New-AzSphereDeviceGroup.md create mode 100644 src/Sphere/Sphere/help/New-AzSphereImage.md create mode 100644 src/Sphere/Sphere/help/New-AzSphereProduct.md create mode 100644 src/Sphere/Sphere/help/New-AzSphereProductDefaultDeviceGroup.md create mode 100644 src/Sphere/Sphere/help/Remove-AzSphereCatalog.md create mode 100644 src/Sphere/Sphere/help/Remove-AzSphereDeviceGroup.md create mode 100644 src/Sphere/Sphere/help/Remove-AzSphereProduct.md create mode 100644 src/Sphere/Sphere/help/Update-AzSphereCatalog.md create mode 100644 src/Sphere/Sphere/help/Update-AzSphereDevice.md create mode 100644 src/Sphere/Sphere/help/Update-AzSphereDeviceGroup.md create mode 100644 src/Sphere/Sphere/help/Update-AzSphereProduct.md diff --git a/src/Sphere/Sphere.Autorest/Az.Sphere.csproj b/src/Sphere/Sphere.Autorest/Az.Sphere.csproj new file mode 100644 index 000000000000..e5a582601a8c --- /dev/null +++ b/src/Sphere/Sphere.Autorest/Az.Sphere.csproj @@ -0,0 +1,10 @@ + + + Sphere + Sphere + Sphere.Autorest + + + + + diff --git a/src/Sphere/Sphere.Autorest/Az.Sphere.format.ps1xml b/src/Sphere/Sphere.Autorest/Az.Sphere.format.ps1xml new file mode 100644 index 000000000000..4a87e14a9eb8 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/Az.Sphere.format.ps1xml @@ -0,0 +1,1803 @@ + + + + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Catalog + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Catalog#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Location + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CatalogListResult + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CatalogListResult#Multiple + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CatalogProperties + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CatalogProperties#Multiple + + + + + + + + + + + + + + + ProvisioningState + + + TenantId + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CatalogUpdateTags + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CatalogUpdateTags#Multiple + + + + + + + + + + + + Item + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Certificate + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Certificate#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CertificateChainResponse + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CertificateChainResponse#Multiple + + + + + + + + + + + + CertificateChain + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CertificateListResult + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CertificateListResult#Multiple + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CertificateProperties + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CertificateProperties#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Certificate + + + ExpiryUtc + + + NotBeforeUtc + + + ProvisioningState + + + Status + + + Subject + + + Thumbprint + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CountDeviceResponse + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CountDeviceResponse#Multiple + + + + + + + + + + + + Value + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CountDevicesResponse + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CountDevicesResponse#Multiple + + + + + + + + + + + + Value + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CountElementsResponse + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CountElementsResponse#Multiple + + + + + + + + + + + + Value + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Deployment + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Deployment#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeploymentListResult + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeploymentListResult#Multiple + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeploymentProperties + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeploymentProperties#Multiple + + + + + + + + + + + + + + + + + + DeploymentDateUtc + + + DeploymentId + + + ProvisioningState + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Device + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Device#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroup + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroup#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroupListResult + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroupListResult#Multiple + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroupProperties + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroupProperties#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AllowCrashDumpsCollection + + + Description + + + HasDeployment + + + OSFeedType + + + ProvisioningState + + + RegionalDataBoundary + + + UpdatePolicy + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroupUpdateProperties + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroupUpdateProperties#Multiple + + + + + + + + + + + + + + + + + + + + + + + + AllowCrashDumpsCollection + + + Description + + + OSFeedType + + + RegionalDataBoundary + + + UpdatePolicy + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceInsight + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceInsight#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Description + + + DeviceId + + + EndTimestampUtc + + + EventCategory + + + EventClass + + + EventCount + + + EventType + + + StartTimestampUtc + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceListResult + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceListResult#Multiple + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DevicePatchProperties + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DevicePatchProperties#Multiple + + + + + + + + + + + + DeviceGroupId + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceProperties + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceProperties#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ChipSku + + + DeviceId + + + LastAvailableOSVersion + + + LastInstalledOSVersion + + + LastOSUpdateUtc + + + LastUpdateRequestUtc + + + ProvisioningState + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceUpdateProperties + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceUpdateProperties#Multiple + + + + + + + + + + + + DeviceGroupId + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorDetail + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorDetail#Multiple + + + + + + + + + + + + + + + + + + Code + + + Message + + + Target + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Image + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Image#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ImageListResult + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ImageListResult#Multiple + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ImageProperties + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ImageProperties#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ComponentId + + + Description + + + Image + + + ImageId + + + ImageName + + + ImageType + + + ProvisioningState + + + RegionalDataBoundary + + + Uri + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ListDeviceGroupsRequest + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ListDeviceGroupsRequest#Multiple + + + + + + + + + + + + DeviceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Operation + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Operation#Multiple + + + + + + + + + + + + + + + + + + + + + ActionType + + + IsDataAction + + + Name + + + Origin + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.OperationDisplay + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.OperationDisplay#Multiple + + + + + + + + + + + + + + + + + + + + + Description + + + Operation + + + Provider + + + Resource + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.OperationListResult + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.OperationListResult#Multiple + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.PagedDeviceInsight + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.PagedDeviceInsight#Multiple + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Product + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Product#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProductListResult + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProductListResult#Multiple + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProductProperties + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProductProperties#Multiple + + + + + + + + + + + + + + + Description + + + ProvisioningState + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProductUpdateProperties + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProductUpdateProperties#Multiple + + + + + + + + + + + + Description + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProofOfPossessionNonceRequest + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProofOfPossessionNonceRequest#Multiple + + + + + + + + + + + + ProofOfPossessionNonce + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProofOfPossessionNonceResponse + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProofOfPossessionNonceResponse#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Certificate + + + ExpiryUtc + + + NotBeforeUtc + + + ProvisioningState + + + Status + + + Subject + + + Thumbprint + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProxyResource + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProxyResource#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Resource + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Resource#Multiple + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.SignedCapabilityImageResponse + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.SignedCapabilityImageResponse#Multiple + + + + + + + + + + + + Image + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.SphereIdentity + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.SphereIdentity#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CatalogName + + + DeploymentName + + + DeviceGroupName + + + DeviceName + + + ImageName + + + ProductName + + + ResourceGroupName + + + SerialNumber + + + SubscriptionId + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.SystemData + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.SystemData#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + CreatedAt + + + CreatedBy + + + CreatedByType + + + LastModifiedAt + + + LastModifiedBy + + + LastModifiedByType + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.TrackedResource + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.TrackedResource#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + Location + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.TrackedResourceTags + + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.TrackedResourceTags#Multiple + + + + + + + + + + + + Item + + + + + + + + \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/Az.Sphere.psd1 b/src/Sphere/Sphere.Autorest/Az.Sphere.psd1 new file mode 100644 index 000000000000..647fdd3c8b59 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/Az.Sphere.psd1 @@ -0,0 +1,23 @@ +@{ + GUID = '4855dcb5-d1a4-45e3-b4b2-49d37925ed0b' + RootModule = './Az.Sphere.psm1' + ModuleVersion = '0.1.0' + CompatiblePSEditions = 'Core', 'Desktop' + Author = 'Microsoft Corporation' + CompanyName = 'Microsoft Corporation' + Copyright = 'Microsoft Corporation. All rights reserved.' + Description = 'Microsoft Azure PowerShell: Sphere cmdlets' + PowerShellVersion = '5.1' + DotNetFrameworkVersion = '4.7.2' + RequiredAssemblies = './bin/Az.Sphere.private.dll' + FormatsToProcess = './Az.Sphere.format.ps1xml' + FunctionsToExport = 'Get-AzSphereCatalog', 'Get-AzSphereCatalogDevice', 'Get-AzSphereCatalogDeviceGroup', 'Get-AzSphereCatalogDeviceInsight', 'Get-AzSphereCertificate', 'Get-AzSphereCertificateCertChain', 'Get-AzSphereCertificateProof', 'Get-AzSphereDeployment', 'Get-AzSphereDevice', 'Get-AzSphereDeviceGroup', 'Get-AzSphereImage', 'Get-AzSphereProduct', 'Invoke-AzSphereCountCatalogDevice', 'Invoke-AzSphereCountDeviceGroupDevice', 'Invoke-AzSphereCountProductDevice', 'New-AzSphereCatalog', 'New-AzSphereDeployment', 'New-AzSphereDevice', 'New-AzSphereDeviceCapabilityImage', 'New-AzSphereDeviceGroup', 'New-AzSphereImage', 'New-AzSphereProduct', 'New-AzSphereProductDefaultDeviceGroup', 'Remove-AzSphereCatalog', 'Remove-AzSphereDeviceGroup', 'Remove-AzSphereProduct', 'Update-AzSphereCatalog', 'Update-AzSphereDevice', 'Update-AzSphereDeviceGroup', 'Update-AzSphereProduct' + PrivateData = @{ + PSData = @{ + Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'Sphere' + LicenseUri = 'https://aka.ms/azps-license' + ProjectUri = 'https://github.com/Azure/azure-powershell' + ReleaseNotes = '' + } + } +} diff --git a/src/Sphere/Sphere.Autorest/Az.Sphere.psm1 b/src/Sphere/Sphere.Autorest/Az.Sphere.psm1 new file mode 100644 index 000000000000..0b97da3c6b70 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/Az.Sphere.psm1 @@ -0,0 +1,119 @@ +# region Generated + # ---------------------------------------------------------------------------------- + # Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. + # ---------------------------------------------------------------------------------- + # Load required Az.Accounts module + $accountsName = 'Az.Accounts' + $accountsModule = Get-Module -Name $accountsName + if(-not $accountsModule) { + $localAccountsPath = Join-Path $PSScriptRoot 'generated\modules' + if(Test-Path -Path $localAccountsPath) { + $localAccounts = Get-ChildItem -Path $localAccountsPath -Recurse -Include 'Az.Accounts.psd1' | Select-Object -Last 1 + if($localAccounts) { + $accountsModule = Import-Module -Name ($localAccounts.FullName) -Scope Global -PassThru + } + } + if(-not $accountsModule) { + $hasAdequateVersion = (Get-Module -Name $accountsName -ListAvailable | Where-Object { $_.Version -ge [System.Version]'2.7.5' } | Measure-Object).Count -gt 0 + if($hasAdequateVersion) { + $accountsModule = Import-Module -Name $accountsName -MinimumVersion 2.7.5 -Scope Global -PassThru + } + } + } + + if(-not $accountsModule) { + Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. For installation instructions, please see: https://learn.microsoft.com/powershell/azure/install-az-ps" -ErrorAction Stop + } elseif (($accountsModule.Version -lt [System.Version]'2.7.5') -and (-not $localAccounts)) { + Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to add the switch '-RegenerateSupportModule' when executing 'test-module.ps1'. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop + } + Write-Information "Loaded Module '$($accountsModule.Name)'" + + # Load the private module dll + $null = Import-Module -Name (Join-Path $PSScriptRoot './bin/Az.Sphere.private.dll') + + # Get the private module's instance + $instance = [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module]::Instance + + # Ask for the shared functionality table + $VTable = Register-AzModule + + # Tweaks the pipeline on module load + $instance.OnModuleLoad = $VTable.OnModuleLoad + + # Following two delegates are added for telemetry + $instance.GetTelemetryId = $VTable.GetTelemetryId + $instance.Telemetry = $VTable.Telemetry + + # Delegate to sanitize the output object + $instance.SanitizeOutput = $VTable.SanitizerHandler + + # Delegate to get the telemetry info + $instance.GetTelemetryInfo = $VTable.GetTelemetryInfo + + # Tweaks the pipeline per call + $instance.OnNewRequest = $VTable.OnNewRequest + + # Gets shared parameter values + $instance.GetParameterValue = $VTable.GetParameterValue + + # Allows shared module to listen to events from this module + $instance.EventListener = $VTable.EventListener + + # Gets shared argument completers + $instance.ArgumentCompleter = $VTable.ArgumentCompleter + + # The name of the currently selected Azure profile + $instance.ProfileName = $VTable.ProfileName + + # Load the custom module + $customModulePath = Join-Path $PSScriptRoot './custom/Az.Sphere.custom.psm1' + if(Test-Path $customModulePath) { + $null = Import-Module -Name $customModulePath + } + + # Export nothing to clear implicit exports + Export-ModuleMember + + # Export proxy cmdlet scripts + $exportsPath = Join-Path $PSScriptRoot './exports' + $directories = Get-ChildItem -Directory -Path $exportsPath + $profileDirectory = $null + if($instance.ProfileName) { + if(($directories | ForEach-Object { $_.Name }) -contains $instance.ProfileName) { + $profileDirectory = $directories | Where-Object { $_.Name -eq $instance.ProfileName } + } else { + # Don't export anything if the profile doesn't exist for the module + $exportsPath = $null + Write-Warning "Selected Azure profile '$($instance.ProfileName)' does not exist for module '$($instance.Name)'. No cmdlets were loaded." + } + } elseif(($directories | Measure-Object).Count -gt 0) { + # Load the last folder if no profile is selected + $profileDirectory = $directories | Select-Object -Last 1 + } + + if($profileDirectory) { + Write-Information "Loaded Azure profile '$($profileDirectory.Name)' for module '$($instance.Name)'" + $exportsPath = $profileDirectory.FullName + } + + if($exportsPath) { + Get-ChildItem -Path $exportsPath -Recurse -Include '*.ps1' -File | ForEach-Object { . $_.FullName } + $cmdletNames = Get-ScriptCmdlet -ScriptFolder $exportsPath + Export-ModuleMember -Function $cmdletNames -Alias (Get-ScriptCmdlet -ScriptFolder $exportsPath -AsAlias) + } + + # Finalize initialization of this module + $instance.Init(); + Write-Information "Loaded Module '$($instance.Name)'" +# endregion diff --git a/src/Sphere/Sphere.Autorest/README.md b/src/Sphere/Sphere.Autorest/README.md new file mode 100644 index 000000000000..e119fa94af07 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/README.md @@ -0,0 +1,112 @@ + +# Az.Sphere +This directory contains the PowerShell module for the Sphere service. + +--- +## Info +- Modifiable: yes +- Generated: all +- Committed: yes +- Packaged: yes + +--- +## Detail +This module was primarily generated via [AutoRest](https://github.com/Azure/autorest) using the [PowerShell](https://github.com/Azure/autorest.powershell) extension. + +## Module Requirements +- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version 2.7.5 or greater + +## Authentication +AutoRest does not generate authentication code for the module. Authentication is handled via Az.Accounts by altering the HTTP payload before it is sent. + +## Development +For information on how to develop for `Az.Sphere`, see [how-to.md](how-to.md). + + +### AutoRest Configuration +> see https://aka.ms/autorest + +```yaml +# pin the swagger version by using the commit id instead of branch name +commit: ebce1c690af6060f0e5a72d875edf752d41d5769 +tag: package-2024-04-01 +require: +# readme.azure.noprofile.md is the common configuration file + - $(this-folder)/../../readme.azure.noprofile.md + - $(repo)/specification/sphere/resource-manager/readme.md +# If the swagger has not been put in the repo, you may uncomment the following line and refer to it locally +# - (this-folder)/relative-path-to-your-local-readme.md + +try-require: + - $(repo)/specification/sphere/resource-manager/readme.powershell.md + +# For new RP, the version is 0.1.0 +module-version: 0.1.0 +# Normally, title is the service name +title: Sphere +subject-prefix: $(service-name) + +directive: + # Following are common directives which are normally required in all the RPs + # 1. Remove the unexpanded parameter set + # 2. For New-* cmdlets, ViaIdentity is not required + - where: + variant: ^(Create|Update)(?!.*?Expanded|ViaJsonString|ViaJsonFilePath) + remove: true + - where: + variant: ^CreateViaIdentity.*$ + remove: true + # Remove unavailable feature + - where: + verb: Remove + subject: ^Device$|Image|Deployment + remove: true + - where: + verb: Update + subject: Image|Deployment + remove: true + - where: + verb: Get + subject: CatalogDeployment + remove: true + # error 'The server responded with an unrecognized response', error message missing in default error response for post path + - where: + verb: Invoke + subject: UploadCatalogImage + remove: true + - where: + verb: Invoke + subject: ClaimDeviceGroupDevice + remove: true + - where: + verb: Invoke + variant: ^Count(.*) + set: + variant: CountDevice$1 + # Remove unexpanded include json parameter set + - where: + variant: ^List(?!.*?Expanded) + subject: CatalogDeviceGroup + remove: true + - where: + variant: ^(Retrieve)(?!.*?Expanded) + subject: CertificateProof + remove: true + - where: + variant: ^Claim(?!.*?Expanded) + subject: ClaimDeviceGroupDevice + hide: true + # New-AzSphereDeviceCapabilityImage remove unexpanded parameter set + - where: + variant: ^(Generate)(?!.*?(Expanded|JsonString|JsonFilePath)) + subject: DeviceCapabilityImage + remove: true + - where: + variant: GenerateViaIdentityExpanded + subject: DeviceCapabilityImage + remove: true + # Remove the set-* cmdlet + - where: + verb: Set + hide: true +``` diff --git a/src/Sphere/Sphere.Autorest/UX/Microsoft.AzureSphere/catalogs-certificates.json b/src/Sphere/Sphere.Autorest/UX/Microsoft.AzureSphere/catalogs-certificates.json new file mode 100644 index 000000000000..c008b89007dc --- /dev/null +++ b/src/Sphere/Sphere.Autorest/UX/Microsoft.AzureSphere/catalogs-certificates.json @@ -0,0 +1,95 @@ +{ + "resourceType": "catalogs/certificates", + "apiVersion": "2024-04-01", + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.sphere" + }, + "commands": [ + { + "name": "Get-AzSphereCertificateCertChain", + "description": "Retrieves cert chain.", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates/{serialNumber}/retrieveCertChain", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.sphere/get-azspherecertificatecertchain" + }, + "parameterSets": [ + { + "parameters": [ + "-CatalogName ", + "-ResourceGroupName ", + "-SerialNumber ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Retrieves cert chain.", + "parameters": [ + { + "name": "-CatalogName", + "value": "[Path.catalogName]" + }, + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-SerialNumber", + "value": "[Path.serialNumber]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + }, + { + "name": "Get-AzSphereCertificate", + "description": "Get a Certificate", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates/{serialNumber}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.sphere/get-azspherecertificate" + }, + "parameterSets": [ + { + "parameters": [ + "-CatalogName ", + "-ResourceGroupName ", + "-SerialNumber ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Get a Certificate", + "parameters": [ + { + "name": "-CatalogName", + "value": "[Path.catalogName]" + }, + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-SerialNumber", + "value": "[Path.serialNumber]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + } + ] +} diff --git a/src/Sphere/Sphere.Autorest/UX/Microsoft.AzureSphere/catalogs-images.json b/src/Sphere/Sphere.Autorest/UX/Microsoft.AzureSphere/catalogs-images.json new file mode 100644 index 000000000000..540e415f7fdb --- /dev/null +++ b/src/Sphere/Sphere.Autorest/UX/Microsoft.AzureSphere/catalogs-images.json @@ -0,0 +1,52 @@ +{ + "resourceType": "catalogs/images", + "apiVersion": "2024-04-01", + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.sphere" + }, + "commands": [ + { + "name": "Get-AzSphereImage", + "description": "Get a Image", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images/{imageName}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.sphere/get-azsphereimage" + }, + "parameterSets": [ + { + "parameters": [ + "-CatalogName ", + "-Name ", + "-ResourceGroupName ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Get a Image", + "parameters": [ + { + "name": "-CatalogName", + "value": "[Path.catalogName]" + }, + { + "name": "-Name", + "value": "[Path.imageName]" + }, + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + } + ] +} diff --git a/src/Sphere/Sphere.Autorest/UX/Microsoft.AzureSphere/catalogs-products-deviceGroups-deployments.json b/src/Sphere/Sphere.Autorest/UX/Microsoft.AzureSphere/catalogs-products-deviceGroups-deployments.json new file mode 100644 index 000000000000..ddde4dc77ba1 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/UX/Microsoft.AzureSphere/catalogs-products-deviceGroups-deployments.json @@ -0,0 +1,62 @@ +{ + "resourceType": "catalogs/products/deviceGroups/deployments", + "apiVersion": "2024-04-01", + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.sphere" + }, + "commands": [ + { + "name": "Get-AzSphereDeployment", + "description": "Get a Deployment.\n'.default' and '.unassigned' are system defined values and cannot be used for product or device group name.", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments/{deploymentName}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.sphere/get-azspheredeployment" + }, + "parameterSets": [ + { + "parameters": [ + "-CatalogName ", + "-DeviceGroupName ", + "-Name ", + "-ProductName ", + "-ResourceGroupName ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Get a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.", + "parameters": [ + { + "name": "-CatalogName", + "value": "[Path.catalogName]" + }, + { + "name": "-DeviceGroupName", + "value": "[Path.deviceGroupName]" + }, + { + "name": "-Name", + "value": "[Path.deploymentName]" + }, + { + "name": "-ProductName", + "value": "[Path.productName]" + }, + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + } + ] +} diff --git a/src/Sphere/Sphere.Autorest/UX/Microsoft.AzureSphere/catalogs-products-deviceGroups-devices.json b/src/Sphere/Sphere.Autorest/UX/Microsoft.AzureSphere/catalogs-products-deviceGroups-devices.json new file mode 100644 index 000000000000..eb0cd3bd69e9 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/UX/Microsoft.AzureSphere/catalogs-products-deviceGroups-devices.json @@ -0,0 +1,62 @@ +{ + "resourceType": "catalogs/products/deviceGroups/devices", + "apiVersion": "2024-04-01", + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.sphere" + }, + "commands": [ + { + "name": "Get-AzSphereDevice", + "description": "Get a Device.\nUse '.unassigned' or '.default' for the device group and product names when a device does not belong to a device group and product.", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.sphere/get-azspheredevice" + }, + "parameterSets": [ + { + "parameters": [ + "-CatalogName ", + "-GroupName ", + "-Name ", + "-ProductName ", + "-ResourceGroupName ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Get a Device. Use '.unassigned' or '.default' for the device group and product names when a device does not belong to a device group and product.", + "parameters": [ + { + "name": "-CatalogName", + "value": "[Path.catalogName]" + }, + { + "name": "-GroupName", + "value": "[Path.deviceGroupName]" + }, + { + "name": "-Name", + "value": "[Path.deviceName]" + }, + { + "name": "-ProductName", + "value": "[Path.productName]" + }, + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + } + ] +} diff --git a/src/Sphere/Sphere.Autorest/UX/Microsoft.AzureSphere/catalogs-products-deviceGroups.json b/src/Sphere/Sphere.Autorest/UX/Microsoft.AzureSphere/catalogs-products-deviceGroups.json new file mode 100644 index 000000000000..0fa0a30eda38 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/UX/Microsoft.AzureSphere/catalogs-products-deviceGroups.json @@ -0,0 +1,153 @@ +{ + "resourceType": "catalogs/products/deviceGroups", + "apiVersion": "2024-04-01", + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.sphere" + }, + "commands": [ + { + "name": "Get-AzSphereDeviceGroup", + "description": "Get a DeviceGroup.\n'.default' and '.unassigned' are system defined values and cannot be used for product or device group name.", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.sphere/get-azspheredevicegroup" + }, + "parameterSets": [ + { + "parameters": [ + "-CatalogName ", + "-Name ", + "-ProductName ", + "-ResourceGroupName ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Get a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.", + "parameters": [ + { + "name": "-CatalogName", + "value": "[Path.catalogName]" + }, + { + "name": "-Name", + "value": "[Path.deviceGroupName]" + }, + { + "name": "-ProductName", + "value": "[Path.productName]" + }, + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + }, + { + "name": "Invoke-AzSphereCountDeviceGroupDevice", + "description": "Counts devices in device group.\n'.default' and '.unassigned' are system defined values and cannot be used for product or device group name.", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/countDevices", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.sphere/invoke-azspherecountdevicegroupdevice" + }, + "parameterSets": [ + { + "parameters": [ + "-CatalogName ", + "-DeviceGroupName ", + "-ProductName ", + "-ResourceGroupName ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Counts devices in device group. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.", + "parameters": [ + { + "name": "-CatalogName", + "value": "[Path.catalogName]" + }, + { + "name": "-DeviceGroupName", + "value": "[Path.deviceGroupName]" + }, + { + "name": "-ProductName", + "value": "[Path.productName]" + }, + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + }, + { + "name": "Remove-AzSphereDeviceGroup", + "description": "Delete a DeviceGroup.\n'.default' and '.unassigned' are system defined values and cannot be used for product or device group name.", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.sphere/remove-azspheredevicegroup" + }, + "parameterSets": [ + { + "parameters": [ + "-CatalogName ", + "-Name ", + "-ProductName ", + "-ResourceGroupName ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Delete a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.", + "parameters": [ + { + "name": "-CatalogName", + "value": "[Path.catalogName]" + }, + { + "name": "-Name", + "value": "[Path.deviceGroupName]" + }, + { + "name": "-ProductName", + "value": "[Path.productName]" + }, + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + } + ] +} diff --git a/src/Sphere/Sphere.Autorest/UX/Microsoft.AzureSphere/catalogs-products.json b/src/Sphere/Sphere.Autorest/UX/Microsoft.AzureSphere/catalogs-products.json new file mode 100644 index 000000000000..2fa74aae2175 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/UX/Microsoft.AzureSphere/catalogs-products.json @@ -0,0 +1,138 @@ +{ + "resourceType": "catalogs/products", + "apiVersion": "2024-04-01", + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.sphere" + }, + "commands": [ + { + "name": "Get-AzSphereProduct", + "description": "Get a Product.\n'.default' and '.unassigned' are system defined values and cannot be used for product name.", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.sphere/get-azsphereproduct" + }, + "parameterSets": [ + { + "parameters": [ + "-CatalogName ", + "-Name ", + "-ResourceGroupName ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Get a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.", + "parameters": [ + { + "name": "-CatalogName", + "value": "[Path.catalogName]" + }, + { + "name": "-Name", + "value": "[Path.productName]" + }, + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + }, + { + "name": "Invoke-AzSphereCountProductDevice", + "description": "Counts devices in product.\n'.default' and '.unassigned' are system defined values and cannot be used for product name.", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/countDevices", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.sphere/invoke-azspherecountproductdevice" + }, + "parameterSets": [ + { + "parameters": [ + "-CatalogName ", + "-ProductName ", + "-ResourceGroupName ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Counts devices in product. '.default' and '.unassigned' are system defined values and cannot be used for product name.", + "parameters": [ + { + "name": "-CatalogName", + "value": "[Path.catalogName]" + }, + { + "name": "-ProductName", + "value": "[Path.productName]" + }, + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + }, + { + "name": "Remove-AzSphereProduct", + "description": "Delete a Product.\n'.default' and '.unassigned' are system defined values and cannot be used for product name'", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.sphere/remove-azsphereproduct" + }, + "parameterSets": [ + { + "parameters": [ + "-CatalogName ", + "-Name ", + "-ResourceGroupName ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Delete a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name'", + "parameters": [ + { + "name": "-CatalogName", + "value": "[Path.catalogName]" + }, + { + "name": "-Name", + "value": "[Path.productName]" + }, + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + } + ] +} diff --git a/src/Sphere/Sphere.Autorest/UX/Microsoft.AzureSphere/catalogs.json b/src/Sphere/Sphere.Autorest/UX/Microsoft.AzureSphere/catalogs.json new file mode 100644 index 000000000000..443729cdc672 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/UX/Microsoft.AzureSphere/catalogs.json @@ -0,0 +1,123 @@ +{ + "resourceType": "catalogs", + "apiVersion": "2024-04-01", + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.sphere" + }, + "commands": [ + { + "name": "Get-AzSphereCatalog", + "description": "Get a Catalog", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.sphere/get-azspherecatalog" + }, + "parameterSets": [ + { + "parameters": [ + "-Name ", + "-ResourceGroupName ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Get a Catalog", + "parameters": [ + { + "name": "-Name", + "value": "[Path.catalogName]" + }, + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + }, + { + "name": "Invoke-AzSphereCountCatalogDevice", + "description": "Counts devices in catalog.", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/countDevices", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.sphere/invoke-azspherecountcatalogdevice" + }, + "parameterSets": [ + { + "parameters": [ + "-CatalogName ", + "-ResourceGroupName ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Counts devices in catalog.", + "parameters": [ + { + "name": "-CatalogName", + "value": "[Path.catalogName]" + }, + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + }, + { + "name": "Remove-AzSphereCatalog", + "description": "Delete a Catalog", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.sphere/remove-azspherecatalog" + }, + "parameterSets": [ + { + "parameters": [ + "-Name ", + "-ResourceGroupName ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Delete a Catalog", + "parameters": [ + { + "name": "-Name", + "value": "[Path.catalogName]" + }, + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + } + ] +} diff --git a/src/Sphere/Sphere.Autorest/build-module.ps1 b/src/Sphere/Sphere.Autorest/build-module.ps1 new file mode 100644 index 000000000000..c418982e0d08 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/build-module.ps1 @@ -0,0 +1,180 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- +param([switch]$NotIsolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs, [switch]$UX) +$ErrorActionPreference = 'Stop' + +if($PSEdition -ne 'Core') { + Write-Error 'This script requires PowerShell Core to execute. [Note] Generated cmdlets will work in both PowerShell Core or Windows PowerShell.' +} + +if(-not $NotIsolated -and -not $Debugger) { + Write-Host -ForegroundColor Green 'Creating isolated process...' + $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path + & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated + + if($LastExitCode -ne 0) { + # Build failed. Don't attempt to run the module. + return + } + + if($Test) { + . (Join-Path $PSScriptRoot 'test-module.ps1') + if($LastExitCode -ne 0) { + # Tests failed. Don't attempt to run the module. + return + } + } + + if($Docs) { + . (Join-Path $PSScriptRoot 'generate-help.ps1') + if($LastExitCode -ne 0) { + # Docs generation failed. Don't attempt to run the module. + return + } + } + + if($UX) { + . (Join-Path $PSScriptRoot 'generate-portal-ux.ps1') + if($LastExitCode -ne 0) { + # UX generation failed. Don't attempt to run the module. + return + } + } + + if($Pack) { + . (Join-Path $PSScriptRoot 'pack-module.ps1') + if($LastExitCode -ne 0) { + # Packing failed. Don't attempt to run the module. + return + } + } + + $runModulePath = Join-Path $PSScriptRoot 'run-module.ps1' + if($Code) { + . $runModulePath -Code + } elseif($Run) { + . $runModulePath + } else { + Write-Host -ForegroundColor Cyan "To run this module in an isolated PowerShell session, run the 'run-module.ps1' script or provide the '-Run' parameter to this script." + } + return +} + +$binFolder = Join-Path $PSScriptRoot 'bin' +$objFolder = Join-Path $PSScriptRoot 'obj' + +if(-not $Debugger) { + Write-Host -ForegroundColor Green 'Cleaning build folders...' + $null = Remove-Item -Recurse -ErrorAction SilentlyContinue -Path $binFolder, $objFolder + + if((Test-Path $binFolder) -or (Test-Path $objFolder)) { + Write-Host -ForegroundColor Cyan 'Did you forget to exit your isolated module session before rebuilding?' + Write-Error 'Unable to clean ''bin'' or ''obj'' folder. A process may have an open handle.' + } + + Write-Host -ForegroundColor Green 'Compiling module...' + $buildConfig = 'Debug' + if($Release) { + $buildConfig = 'Release' + } + dotnet publish $PSScriptRoot --verbosity quiet --configuration $buildConfig /nologo + if($LastExitCode -ne 0) { + Write-Error 'Compilation failed.' + } + + $null = Remove-Item -Recurse -ErrorAction SilentlyContinue -Path (Join-Path $binFolder 'Debug'), (Join-Path $binFolder 'Release') +} + +$dll = Join-Path $PSScriptRoot 'bin\Az.Sphere.private.dll' +if(-not (Test-Path $dll)) { + Write-Error "Unable to find output assembly in '$binFolder'." +} + +# Load DLL to use build-time cmdlets +$null = Import-Module -Name $dll + +$modulePaths = $dll +$customPsm1 = Join-Path $PSScriptRoot 'custom\Az.Sphere.custom.psm1' +if(Test-Path $customPsm1) { + $modulePaths = @($dll, $customPsm1) +} + +$exportsFolder = Join-Path $PSScriptRoot 'exports' +if(Test-Path $exportsFolder) { + $null = Get-ChildItem -Path $exportsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue +} +$null = New-Item -ItemType Directory -Force -Path $exportsFolder + +$internalFolder = Join-Path $PSScriptRoot 'internal' +if(Test-Path $internalFolder) { + $null = Get-ChildItem -Path $internalFolder -Recurse -Exclude '*.psm1', 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue +} +$null = New-Item -ItemType Directory -Force -Path $internalFolder + +$psd1 = Join-Path $PSScriptRoot './Az.Sphere.psd1' +$guid = Get-ModuleGuid -Psd1Path $psd1 +$moduleName = 'Az.Sphere' +$examplesFolder = Join-Path $PSScriptRoot 'examples' +$null = New-Item -ItemType Directory -Force -Path $examplesFolder + +Write-Host -ForegroundColor Green 'Creating cmdlets for specified models...' +$modelCmdlets = @() +$modelCmdletFolder = Join-Path (Join-Path $PSScriptRoot './custom') 'autogen-model-cmdlets' +if (Test-Path $modelCmdletFolder) { + $null = Remove-Item -Force -Recurse -Path $modelCmdletFolder +} +if ($modelCmdlets.Count -gt 0) { + . (Join-Path $PSScriptRoot 'create-model-cmdlets.ps1') + CreateModelCmdlet($modelCmdlets) +} + +if($NoDocs) { + Write-Host -ForegroundColor Green 'Creating exports...' + Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ExcludeDocs -ExamplesFolder $examplesFolder +} else { + Write-Host -ForegroundColor Green 'Creating exports and docs...' + $moduleDescription = 'Microsoft Azure PowerShell: Sphere cmdlets' + $docsFolder = Join-Path $PSScriptRoot 'docs' + if(Test-Path $docsFolder) { + $null = Get-ChildItem -Path $docsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue + } + $null = New-Item -ItemType Directory -Force -Path $docsFolder + $addComplexInterfaceInfo = ![System.Convert]::ToBoolean('true') + Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid -AddComplexInterfaceInfo:$addComplexInterfaceInfo +} + +Write-Host -ForegroundColor Green 'Creating format.ps1xml...' +$formatPs1xml = Join-Path $PSScriptRoot './Az.Sphere.format.ps1xml' +Export-FormatPs1xml -FilePath $formatPs1xml + +Write-Host -ForegroundColor Green 'Creating psd1...' +$customFolder = Join-Path $PSScriptRoot 'custom' +Export-Psd1 -ExportsFolder $exportsFolder -CustomFolder $customFolder -Psd1Path $psd1 -ModuleGuid $guid + +Write-Host -ForegroundColor Green 'Creating test stubs...' +$testFolder = Join-Path $PSScriptRoot 'test' +$null = New-Item -ItemType Directory -Force -Path $testFolder +Export-TestStub -ModuleName $moduleName -ExportsFolder $exportsFolder -OutputFolder $testFolder + +Write-Host -ForegroundColor Green 'Creating example stubs...' +Export-ExampleStub -ExportsFolder $exportsFolder -OutputFolder $examplesFolder + +if (Test-Path (Join-Path $PSScriptRoot 'generate-portal-ux.ps1')) +{ + Write-Host -ForegroundColor Green 'Creating ux metadata...' + . (Join-Path $PSScriptRoot 'generate-portal-ux.ps1') +} + +Write-Host -ForegroundColor Green '-------------Done-------------' diff --git a/src/Sphere/Sphere.Autorest/check-dependencies.ps1 b/src/Sphere/Sphere.Autorest/check-dependencies.ps1 new file mode 100644 index 000000000000..90ca9867ae40 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/check-dependencies.ps1 @@ -0,0 +1,65 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- +param([switch]$NotIsolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources) +$ErrorActionPreference = 'Stop' + +if(-not $NotIsolated) { + Write-Host -ForegroundColor Green 'Creating isolated process...' + $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path + & "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated + return +} + +function DownloadModule ([bool]$predicate, [string]$path, [string]$moduleName, [string]$versionMinimum, [string]$requiredVersion) { + if($predicate) { + $module = Get-Module -ListAvailable -Name $moduleName + if((-not $module) -or ($versionMinimum -and ($module | ForEach-Object { $_.Version } | Where-Object { $_ -ge [System.Version]$versionMinimum } | Measure-Object).Count -eq 0) -or ($requiredVersion -and ($module | ForEach-Object { $_.Version } | Where-Object { $_ -eq [System.Version]$requiredVersion } | Measure-Object).Count -eq 0)) { + $null = New-Item -ItemType Directory -Force -Path $path + Write-Host -ForegroundColor Green "Installing local $moduleName module into '$path'..." + if ($requiredVersion) { + Find-Module -Name $moduleName -RequiredVersion $requiredVersion -Repository PSGallery | Save-Module -Path $path + }elseif($versionMinimum) { + Find-Module -Name $moduleName -MinimumVersion $versionMinimum -Repository PSGallery | Save-Module -Path $path + } else { + Find-Module -Name $moduleName -Repository PSGallery | Save-Module -Path $path + } + } + } +} + +$ProgressPreference = 'SilentlyContinue' +$all = (@($Accounts.IsPresent, $Pester.IsPresent) | Select-Object -Unique | Measure-Object).Count -eq 1 + +$localModulesPath = Join-Path $PSScriptRoot 'generated\modules' +if(Test-Path -Path $localModulesPath) { + $env:PSModulePath = "$localModulesPath$([IO.Path]::PathSeparator)$env:PSModulePath" +} + +DownloadModule -predicate ($all -or $Accounts) -path $localModulesPath -moduleName 'Az.Accounts' -versionMinimum '2.7.5' +DownloadModule -predicate ($all -or $Pester) -path $localModulesPath -moduleName 'Pester' -requiredVersion '4.10.1' + +$tools = Join-Path $PSScriptRoot 'tools' +$resourceDir = Join-Path $tools 'Resources' +$resourceModule = Join-Path $HOME '.PSSharedModules\Resources\Az.Resources.TestSupport.psm1' + +if ($Resources.IsPresent -and ((-not (Test-Path -Path $resourceModule)) -or $RegenerateSupportModule.IsPresent)) { + Write-Host -ForegroundColor Green "Building local Resource module used for test..." + Set-Location $resourceDir + $null = autorest .\README.md --use:@autorest/powershell@3.0.414 --output-folder=$HOME/.PSSharedModules/Resources + $null = Copy-Item custom/* $HOME/.PSSharedModules/Resources/custom/ + Set-Location $HOME/.PSSharedModules/Resources + $null = .\build-module.ps1 + Set-Location $PSScriptRoot +} diff --git a/src/Sphere/Sphere.Autorest/create-model-cmdlets.ps1 b/src/Sphere/Sphere.Autorest/create-model-cmdlets.ps1 new file mode 100644 index 000000000000..c2ff09afdd32 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/create-model-cmdlets.ps1 @@ -0,0 +1,262 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +function CreateModelCmdlet { + + param([Hashtable[]]$Models) + + if ($Models.Count -eq 0) + { + return + } + + $ModelCsPath = Join-Path (Join-Path $PSScriptRoot 'generated\api') 'Models' + $OutputDir = Join-Path $PSScriptRoot 'custom\autogen-model-cmdlets' + $null = New-Item -ItemType Directory -Force -Path $OutputDir + if (''.length -gt 0) { + $ModuleName = '' + } else { + $ModuleName = 'Az.Sphere' + } + $CsFiles = Get-ChildItem -Path $ModelCsPath -Recurse -Filter *.cs + $Content = '' + $null = $CsFiles | ForEach-Object -Process { if ($_.Name.Split('.').count -eq 2 ) + { $Content += get-content $_.fullname -raw + } } + + $Tree = [Microsoft.CodeAnalysis.CSharp.SyntaxFactory]::ParseCompilationUnit($Content) + $Nodes = $Tree.ChildNodes().ChildNodes() + $classConstantMember = @{} + foreach ($Model in $Models) + { + $ModelName = $Model.modelName + $InterfaceNode = $Nodes | Where-Object { ($_.Keyword.value -eq 'interface') -and ($_.Identifier.value -eq "I$ModelName") } + $ClassNode = $Nodes | Where-Object { ($_.Keyword.value -eq 'class') -and ($_.Identifier.value -eq "$ModelName") } + $classConstantMember = @() + foreach ($class in $ClassNode) { + foreach ($member in $class.Members) { + $isConstant = $false + foreach ($attr in $member.AttributeLists) { + $memberName = $attr.Attributes.Name.ToString() + if ($memberName.EndsWith('.Constant')) { + $isConstant = $true + break + } + } + if (($member.Modifiers.ToString() -eq 'public') -and $isConstant) { + $classConstantMember += $member.Identifier.Value + } + } + } + if ($InterfaceNode.count -eq 0) { + continue + } + # through a queue, we iterate all the parent models. + $Queue = @($InterfaceNode) + $visited = @("I$ModelName") + $AllInterfaceNodes = @() + while ($Queue.count -ne 0) + { + $AllInterfaceNodes += $Queue[0] + # Baselist contains the direct parent models. + foreach ($parent in $Queue[0].BaseList.Types) + { + if (($parent.Type.Right.Identifier.Value -ne 'IJsonSerializable') -and (-not $visited.Contains($parent.Type.Right.Identifier.Value))) + { + $Queue = [Array]$Queue + ($Nodes | Where-Object { ($_.Keyword.value -eq 'interface') -and ($_.Identifier.value -eq $parent.Type.Right.Identifier.Value) }) + $visited = [Array]$visited + $parent.Type.Right.Identifier.Value + } + } + $first, $Queue = $Queue + } + + $Namespace = $InterfaceNode.Parent.Name + $ObjectType = $ModelName + $ObjectTypeWithNamespace = "${Namespace}.${ObjectType}" + # remove duplicated module name + if ($ObjectType.StartsWith('Sphere')) { + $ModulePrefix = '' + } else { + $ModulePrefix = 'Sphere' + } + $OutputPath = Join-Path -ChildPath "New-Az${ModulePrefix}${ObjectType}Object.ps1" -Path $OutputDir + + $ParameterDefineScriptList = New-Object System.Collections.Generic.List[string] + $ParameterAssignScriptList = New-Object System.Collections.Generic.List[string] + foreach ($Node in $AllInterfaceNodes) + { + foreach ($Member in $Node.Members) + { + if ($classConstantMember.Contains($Member.Identifier.Value)) { + # skip constant member + continue + } + $Arguments = $Member.AttributeLists.Attributes.ArgumentList.Arguments + $Required = $false + $Description = "" + $Readonly = $False + $mutability = @{Read = $true; Create = $true; Update = $true} + foreach ($Argument in $Arguments) + { + if ($Argument.NameEquals.Name.Identifier.Value -eq "Required") + { + $Required = $Argument.Expression.Token.Value + } + if ($Argument.NameEquals.Name.Identifier.Value -eq "Description") + { + $Description = $Argument.Expression.Token.Value.Trim('.').replace('"', '`"') + } + if ($Argument.NameEquals.Name.Identifier.Value -eq "Readonly") + { + $Readonly = $Argument.Expression.Token.Value + } + if ($Argument.NameEquals.Name.Identifier.Value -eq "Read") + { + $mutability.Read = $Argument.Expression.Token.Value + } + if ($Argument.NameEquals.Name.Identifier.Value -eq "Create") + { + $mutability.Create = $Argument.Expression.Token.Value + } + if ($Argument.NameEquals.Name.Identifier.Value -eq "Update") + { + $mutability.Update = $Argument.Expression.Token.Value + } + } + if ($Readonly) + { + continue + } + $Identifier = $Member.Identifier.Value + $Type = $Member.Type.ToString().replace('?', '').Split("::")[-1] + $Type = $Member.Type.ToString().replace('?', '').Split("::")[-1] + if ($Type.StartsWith("System.Collections.Generic.List")) + { + # if the type is a list, we need to convert it to array + $matched = $Type -match '\<(?.+)\>$' + if ($matched) + { + $Type = $matches.Name + '[]'; + } + } + $ParameterDefinePropertyList = New-Object System.Collections.Generic.List[string] + if ($Required -and $mutability.Create -and $mutability.Update) + { + $ParameterDefinePropertyList.Add("Mandatory") + } + if ($Description -ne "") + { + $ParameterDefinePropertyList.Add("HelpMessage=`"${Description}.`"") + } + $ParameterDefineProperty = [System.String]::Join(", ", $ParameterDefinePropertyList) + # check whether completer is needed + $completer = ''; + if(IsEnumType($Member)){ + $completer += GetCompleter($Member) + } + $ParameterDefineScript = " + [Parameter($ParameterDefineProperty)]${completer} + [${Type}] + `$${Identifier}" + $ParameterDefineScriptList.Add($ParameterDefineScript) + $ParameterAssignScriptList.Add(" + if (`$PSBoundParameters.ContainsKey('${Identifier}')) { + `$Object.${Identifier} = `$${Identifier} + }") + } + } + $ParameterDefineScript = $ParameterDefineScriptList | Join-String -Separator "," + $ParameterAssignScript = $ParameterAssignScriptList | Join-String -Separator "" + + $cmdletName = "New-Az${ModulePrefix}${ObjectType}Object" + if ('' -ne $Model.cmdletName) { + $cmdletName = $Model.cmdletName + } + $OutputPath = Join-Path -ChildPath "${cmdletName}.ps1" -Path $OutputDir + $cmdletNameInLowerCase = $cmdletName.ToLower() + $Script = " +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for ${ObjectType}. +.Description +Create an in-memory object for ${ObjectType}. + +.Outputs +${ObjectTypeWithNamespace} +.Link +https://learn.microsoft.com/powershell/module/${ModuleName}/${cmdletNameInLowerCase} +#> +function ${cmdletName} { + [OutputType('${ObjectTypeWithNamespace}')] + [CmdletBinding(PositionalBinding=`$false)] + Param( +${ParameterDefineScript} + ) + + process { + `$Object = [${ObjectTypeWithNamespace}]::New() +${ParameterAssignScript} + return `$Object + } +} +" + Set-Content -Path $OutputPath -Value $Script + } +} + +function IsEnumType { + param ( + [Microsoft.CodeAnalysis.CSharp.Syntax.PropertyDeclarationSyntax]$property + ) + $isEnum = $false + foreach ($attr in $property.AttributeLists) { + $attributeName = $attr.Attributes.Name.ToString() + if ($attributeName.Contains('ArgumentCompleter')) { + $isEnum = $true + break + } + } + return $isEnum; +} + +function GetCompleter { + param ( + [Microsoft.CodeAnalysis.CSharp.Syntax.PropertyDeclarationSyntax]$property + ) + foreach ($attr in $property.AttributeLists) { + $attributeName = $attr.Attributes.Name.ToString() + if ($attributeName.Contains('ArgumentCompleter')) { + $attributeName = $attributeName.Split("::")[-1] + $possibleValues = [System.String]::Join(", ", $attr.Attributes.ArgumentList.Arguments) + $completer += "`n [${attributeName}(${possibleValues})]" + return $completer + } + } +} diff --git a/src/Sphere/Sphere.Autorest/custom/Az.Sphere.custom.psm1 b/src/Sphere/Sphere.Autorest/custom/Az.Sphere.custom.psm1 new file mode 100644 index 000000000000..e830a7a230b3 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/custom/Az.Sphere.custom.psm1 @@ -0,0 +1,17 @@ +# region Generated + # Load the private module dll + $null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.Sphere.private.dll') + + # Load the internal module + $internalModulePath = Join-Path $PSScriptRoot '..\internal\Az.Sphere.internal.psm1' + if(Test-Path $internalModulePath) { + $null = Import-Module -Name $internalModulePath + } + + # Export nothing to clear implicit exports + Export-ModuleMember + + # Export script cmdlets + Get-ChildItem -Path $PSScriptRoot -Recurse -Include '*.ps1' -File | ForEach-Object { . $_.FullName } + Export-ModuleMember -Function (Get-ScriptCmdlet -ScriptFolder $PSScriptRoot) -Alias (Get-ScriptCmdlet -ScriptFolder $PSScriptRoot -AsAlias) +# endregion diff --git a/src/Sphere/Sphere.Autorest/custom/README.md b/src/Sphere/Sphere.Autorest/custom/README.md new file mode 100644 index 000000000000..dbe666a1e2eb --- /dev/null +++ b/src/Sphere/Sphere.Autorest/custom/README.md @@ -0,0 +1,41 @@ +# Custom +This directory contains custom implementation for non-generated cmdlets for the `Az.Sphere` module. Both scripts (`.ps1`) and C# files (`.cs`) can be implemented here. They will be used during the build process in `build-module.ps1`, and create cmdlets into the `..\exports` folder. The only generated file into this folder is the `Az.Sphere.custom.psm1`. This file should not be modified. + +## Info +- Modifiable: yes +- Generated: partial +- Committed: yes +- Packaged: yes + +## Details +For `Az.Sphere` to use custom cmdlets, it does this two different ways. We **highly recommend** creating script cmdlets, as they are easier to write and allow access to the other exported cmdlets. C# cmdlets *cannot access exported cmdlets*. + +For C# cmdlets, they are compiled with the rest of the generated low-level cmdlets into the `./bin/Az.Sphere.private.dll`. The names of the cmdlets (methods) and files must follow the `[cmdletName]_[variantName]` syntax used for generated cmdlets. The `variantName` is used as the `ParameterSetName`, so use something appropriate that doesn't clash with already created variant or parameter set names. You cannot use the `ParameterSetName` property in the `Parameter` attribute on C# cmdlets. Each cmdlet must be separated into variants using the same pattern as seen in the `generated/cmdlets` folder. + +For script cmdlets, these are loaded via the `Az.Sphere.custom.psm1`. Then, during the build process, this module is loaded and processed in the same manner as the C# cmdlets. The fundamental difference is the script cmdlets use the `ParameterSetName` attribute and C# cmdlets do not. To create a script cmdlet variant of a generated cmdlet, simply decorate all parameters in the script with the new `ParameterSetName` in the `Parameter` attribute. This will appropriately treat each parameter set as a separate variant when processed to be exported during the build. + +## Purpose +This allows the modules to have cmdlets that were not defined in the REST specification. It also allows combining logic using generated cmdlets. This is a level of customization beyond what can be done using the [readme configuration options](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md) that are currently available. These custom cmdlets are then referenced by the cmdlets created at build-time in the `..\exports` folder. + +## Usage +The easiest way currently to start developing custom cmdlets is to copy an existing cmdlet. For C# cmdlets, copy one from the `generated/cmdlets` folder. For script cmdlets, build the project using `build-module.ps1` and copy one of the scripts from the `..\exports` folder. After that, if you want to add new parameter sets, follow the guidelines in the `Details` section above. For implementing a new cmdlets, at minimum, please keep these parameters: +- Break +- DefaultProfile +- HttpPipelineAppend +- HttpPipelinePrepend +- Proxy +- ProxyCredential +- ProxyUseDefaultCredentials + +These provide functionality to our HTTP pipeline and other useful features. In script, you can forward these parameters using `$PSBoundParameters` to the other cmdlets you're calling within `Az.Sphere`. For C#, follow the usage seen in the `ProcessRecordAsync` method. + +### Attributes +For processing the cmdlets, we've created some additional attributes: +- `Microsoft.Azure.PowerShell.Cmdlets.Sphere.DescriptionAttribute` + - Used in C# cmdlets to provide a high-level description of the cmdlet. This is propagated to reference documentation via [help comments](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) in the exported scripts. +- `Microsoft.Azure.PowerShell.Cmdlets.Sphere.DoNotExportAttribute` + - Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.Sphere`. +- `Microsoft.Azure.PowerShell.Cmdlets.Sphere.InternalExportAttribute` + - Used in C# cmdlets to route exported cmdlets to the `..\internal`, which are *not exposed* by `Az.Sphere`. For more information, see [README.md](..\internal/README.md) in the `..\internal` folder. +- `Microsoft.Azure.PowerShell.Cmdlets.Sphere.ProfileAttribute` + - Used in C# and script cmdlets to define which Azure profiles the cmdlet supports. This is only supported for Azure (`--azure`) modules. \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/examples/Get-AzSphereCatalog.md b/src/Sphere/Sphere.Autorest/examples/Get-AzSphereCatalog.md new file mode 100644 index 000000000000..5dab743c512f --- /dev/null +++ b/src/Sphere/Sphere.Autorest/examples/Get-AzSphereCatalog.md @@ -0,0 +1,70 @@ +### Example 1: List all catalogs for a given resource group +```powershell +Get-AzSphereCatalog -ResourceGroupName test-sataneja-10 +``` + +```output +Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +-------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------- +global CAT43 9/24/2022 12:54:16 PM example@microsoft.com User 9/24/2022 12:54:16 PM example@microsoft.com User test-satan… +global CAT007 9/26/2022 8:58:15 PM example@microsoft.com User 9/26/2022 8:58:15 PM example@microsoft.com User test-satan… +global CAT10 10/10/2022 4:23:53 PM example@microsoft.com User 10/10/2022 4:23:53 PM example@microsoft.com User test-satan… +global TCAT01 10/14/2022 12:12:22 AM example@microsoft.com User 10/14/2022 12:12:22 AM example@microsoft.com User test-satan… +global TestCatalog1x3 4/25/2023 10:00:52 PM example@microsoft.com User 4/25/2023 10:00:52 PM example@microsoft.com User test-satan… +global TestCatalog1x3_Catalog 5/11/2023 6:12:50 PM example@microsoft.com User 5/11/2023 6:12:50 PM example@microsoft.com User test-satan… +``` + +This command lists all catalogs for a given resource group. + +### Example 2: Get specific catalog with specified resource group +```powershell +Get-AzSphereCatalog -Name "testcat" -ResourceGroupName "goyedokun" +``` + +```output +Id : /subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/goyedokun/providers/Microsoft.AzureSphere/catalogs/testcat +Location : global +Name : testcat +ProvisioningState : Succeeded +ResourceGroupName : goyedokun +RetryAfter : +SystemDataCreatedAt : 6/27/2023 6:49:50 PM +SystemDataCreatedBy : example@microsoft.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 6/27/2023 6:49:50 PM +SystemDataLastModifiedBy : example@microsoft.com +SystemDataLastModifiedByType : User +Tag : { + } +Type : microsoft.azuresphere/catalogs +``` + +This command get specific catalog with specified resource group. + +### Example 2: List all catalogs for connected subscription +```powershell +Get-AzSphereCatalog +``` + +```output +Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemData + LastModifi + edBy +-------- ---- ------------------- ------------------- ----------------------- ------------------------ ---------- +global MyCatalog3 4/21/2021 9:32:32 PM example@microsoft.com User 8/10/2023 3:21:08 PM example@m… +global MyCatalog2 5/20/2021 4:44:38 PM example@microsoft.com User 5/20/2021 4:44:38 PM example@m… +global MyCatalog1 5/20/2021 4:45:44 PM example@microsoft.com User 5/20/2021 4:45:44 PM example@m… +global CatalogARMSetup_39f85f04 8/18/2021 8:28:11 PM 5223a8bc-448a-411c-bcd4-7d41745ed6ba Application 8/18/2021 8:28:11 PM 5223a8bc-… +global CatalogARMSetup_3b15f308 9/17/2021 6:41:41 PM 5223a8bc-448a-411c-bcd4-7d41745ed6ba Application 9/17/2021 6:41:41 PM 5223a8bc-… +global mrarmcatalog1 9/21/2021 7:27:16 PM example@microsoft.com User 9/21/2021 7:27:16 PM example@m… +global CatalogARMSetup_eb5cca0a 9/21/2021 10:06:28 PM 5223a8bc-448a-411c-bcd4-7d41745ed6ba Application 9/21/2021 10:06:28 PM 5223a8bc-… +global CatalogARMSetup_f8c1fea7 9/21/2021 10:06:31 PM 5223a8bc-448a-411c-bcd4-7d41745ed6ba Application 9/21/2021 10:06:31 PM 5223a8bc-… +global CatalogARMSetup_f2d88f81 9/21/2021 10:06:38 PM 5223a8bc-448a-411c-bcd4-7d41745ed6ba Application 9/21/2021 10:06:38 PM 5223a8bc-… +global CatalogARMSetup_1711d4b8 9/21/2021 10:06:42 PM 5223a8bc-448a-411c-bcd4-7d41745ed6ba Application 9/21/2021 10:06:42 PM 5223a8bc-… +global CatalogARMSetup_04744136 10/1/2021 7:14:04 PM 5223a8bc-448a-411c-bcd4-7d41745ed6ba Application 10/1/2021 7:14:04 PM 5223a8bc-… +global CatalogARMSetup_bff4a3fe 10/5/2021 5:14:48 PM 5223a8bc-448a-411c-bcd4-7d41745ed6ba Application 10/5/2021 5:14:48 PM 5223a8bc-… +global CatalogARMSetup_e05ad6ac 10/5/2021 5:15:05 PM 5223a8bc-448a-411c-bcd4-7d41745ed6ba Application 10/5/2021 5:15:05 PM 5223a8bc-… +global newCatalog 8/15/2023 3:06:31 AM example@microsoft.com User 8/15/2023 3:10:39 AM example@m… +``` + +This command lists all catalogs for current subscription. diff --git a/src/Sphere/Sphere.Autorest/examples/Get-AzSphereCatalogDevice.md b/src/Sphere/Sphere.Autorest/examples/Get-AzSphereCatalogDevice.md new file mode 100644 index 000000000000..c62025e48cb9 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/examples/Get-AzSphereCatalogDevice.md @@ -0,0 +1,19 @@ +### Example 1: List for the specified catalog with resource group +```powershell +Get-AzSphereCatalogDevice -CatalogName test2024 -ResourceGroupName joyer-test +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy System + DataLa + stModi + fiedBy + Type +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ------ +dbb0e0cb8bd961a6129096e1e8a1375ac1fa274f030c08161b37ae3bc5a94f443bdb628cf257bc5bc810d8768c03b6f5ca301a35cd0169f56a49624255964560 +b15332603ba55fb52b00fec8549fdaa46b7fb6ba35694bc8943131ccb4b302846d224580a27880a2996b9fd4f1b2699400b1627059b6a90d67dd29e2984ee147 +5d257fbcf76a5853832122d9b0e2410daa1438e3c1cde005162a837a7535c08973cc819a50cf8eb724ffc88dada06b40bee6010e82a8f84d2fef0fc263061d67 +``` + +This command gets list of device resources for the specified catalog with resource group. + diff --git a/src/Sphere/Sphere.Autorest/examples/Get-AzSphereCatalogDeviceGroup.md b/src/Sphere/Sphere.Autorest/examples/Get-AzSphereCatalogDeviceGroup.md new file mode 100644 index 000000000000..b926f5ce23c1 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/examples/Get-AzSphereCatalogDeviceGroup.md @@ -0,0 +1,14 @@ +### Example 1: List for the specified catalog with resource group +```powershell +Get-AzSphereCatalogDeviceGroup -CatalogName test2024 -ResourceGroupName joyer-test +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +testdevicegroup joyer-test +testdevicegroup2 joyer-test +``` + +This command gets list of device groups for the specified catalog with resource group. + diff --git a/src/Sphere/Sphere.Autorest/examples/Get-AzSphereCatalogDeviceInsight.md b/src/Sphere/Sphere.Autorest/examples/Get-AzSphereCatalogDeviceInsight.md new file mode 100644 index 000000000000..7acd9a38150e --- /dev/null +++ b/src/Sphere/Sphere.Autorest/examples/Get-AzSphereCatalogDeviceInsight.md @@ -0,0 +1,7 @@ +### Example 1: List device insight +```powershell +Get-AzSphereCatalogDeviceInsight -CatalogName test2024 -ResourceGroupName joyer-test +``` + +This command gets a list of device insights for specified catalog. + diff --git a/src/Sphere/Sphere.Autorest/examples/Get-AzSphereCertificate.md b/src/Sphere/Sphere.Autorest/examples/Get-AzSphereCertificate.md new file mode 100644 index 000000000000..ed055d7b2883 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/examples/Get-AzSphereCertificate.md @@ -0,0 +1,27 @@ +### Example 1: List for the specified catalog with resource group +```powershell +Get-AzSphereCertificate -CatalogName test2024 -ResourceGroupName joyer-test +``` + +```output +ExpiryUtc : 4/30/2024 10:51:54 PM +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024/certificates/'serial number' +Name : 'serial number' +NotBeforeUtc : 1/31/2024 10:51:54 PM +PropertiesCertificate : 'certificate information' +ProvisioningState : Succeeded +ResourceGroupName : joyer-test +Status : Active +Subject : CN=Microsoft Azure Sphere INT 7de8a199-bb33-4eda-9600-583103317243, O=Microsoft Corporation, L=Redmond, S=Washington, C=US +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Thumbprint : 92C60521BB46C72D66FA72CF59EF701D9269A236 +Type : Microsoft.AzureSphere/catalogs/certificates +``` + +This command get a list of certificate for the specified catalog with resource group. + diff --git a/src/Sphere/Sphere.Autorest/examples/Get-AzSphereCertificateCertChain.md b/src/Sphere/Sphere.Autorest/examples/Get-AzSphereCertificateCertChain.md new file mode 100644 index 000000000000..932ace3d7391 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/examples/Get-AzSphereCertificateCertChain.md @@ -0,0 +1,13 @@ +### Example 1: Get a certificate cert chain +```powershell +Get-AzSphereCertificateCertChain -CatalogName test2024 -ResourceGroupName joyer-test -SerialNumber 'serial number' +``` + +```output +CertificateChain +---------------- +'information' +``` + +This command gets a certificate cert chain. + diff --git a/src/Sphere/Sphere.Autorest/examples/Get-AzSphereCertificateProof.md b/src/Sphere/Sphere.Autorest/examples/Get-AzSphereCertificateProof.md new file mode 100644 index 000000000000..ea170b188b83 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/examples/Get-AzSphereCertificateProof.md @@ -0,0 +1,17 @@ +### Example 1: Get a proof Of Possession Nonce +```powershell +Get-AzSphereCertificateProof -CatalogName test2024 -ResourceGroupName joyer-test -SerialNumber 'serial number' -ProofOfPossessionNonce proofOfPossessionNonce +``` + +```output +Certificate : 'information' +ExpiryUtc : +NotBeforeUtc : +ProvisioningState : +Status : +Subject : +Thumbprint : +``` + +This command gets a proof Of Possession Nonce for specified catalog and serial number. + diff --git a/src/Sphere/Sphere.Autorest/examples/Get-AzSphereDeployment.md b/src/Sphere/Sphere.Autorest/examples/Get-AzSphereDeployment.md new file mode 100644 index 000000000000..eff7e4e24782 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/examples/Get-AzSphereDeployment.md @@ -0,0 +1,55 @@ +### Example 1: List by resource group +```powershell +Get-AzSphereDeployment -ResourceGroupName joyer-test -DeviceGroupName testdevicegroup -ProductName product2024 -CatalogName test2024 +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +009ada36-7515-4ff0-a54c-33b75bfae976 2/28/2024 2:36:04 AM 2/28/2024 2:36:04 AM joyer-test +2e83ddd9-6297-48df-9c2c-2257e6b3cc71 2/28/2024 2:57:56 AM 2/28/2024 2:57:56 AM joyer-test +``` + +This command lists all deployments for specified device group. + +### Example 2: Get specific deployment for device group +```powershell +Get-AzSphereDeployment -ResourceGroupName joyer-test -DeviceGroupName testdevicegroup -ProductName product2024 -CatalogName test2024 -Name 2e83ddd9-6297-48df-9c2c-2257e6b3cc71 +``` + +```output +DateUtc : 2/28/2024 2:57:56 AM +DeployedImage : {{ + "id": "/subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024/images/a04f0a91-b369-4249-a47d-28c118e2cb3b", + "name": "a04f0a91-b369-4249-a47d-28c118e2cb3b", + "type": "Microsoft.AzureSphere/catalogs/images", + "properties": { + "image": "GPIO_HighLevelApp", + "imageId": "a04f0a91-b369-4249-a47d-28c118e2cb3b", + "regionalDataBoundary": "None", + "uri": "https://as3imgptint003.blob.core.windows.net/7de8a199-bb33-4eda-9600-583103317243/imagesaks/a04f0a91-b369-4249-a47d-28c118e2cb3b?skoid=cc6e + 3fcf-ab4d-4b0d-b3f9-9769604c1e52\u0026sktid=72f988bf-86f1-41af-91ab-2d7cd011db47\u0026skt=2024-02-28T07%3A31%3A00Z\u0026ske=2024-02-28T08%3A36%3A00Z\u0 + 026sks=b\u0026skv=2021-12-02\u0026sv=2021-12-02\u0026spr=https,http\u0026se=2024-02-28T15%3A36%3A00Z\u0026sr=b\u0026sp=r\u0026sig=MbkzxZH1VQUGft%2BfXbE + DhubAVucDykFSEGgvqZVn5yk%3D", + "componentId": "dc7f135c-6074-4d49-aa3a-160e4eed884f", + "imageType": "Applications", + "provisioningState": "Succeeded" + } + }} +DeploymentId : 2e83ddd9-6297-48df-9c2c-2257e6b3cc71 +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024/products/product2024/de + viceGroups/testdevicegroup/deployments/2e83ddd9-6297-48df-9c2c-2257e6b3cc71 +Name : 2e83ddd9-6297-48df-9c2c-2257e6b3cc71 +ProvisioningState : Succeeded +ResourceGroupName : joyer-test +SystemDataCreatedAt : 2/28/2024 2:57:56 AM +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : 2/28/2024 2:57:56 AM +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.AzureSphere/catalogs/products/deviceGroups/deployments +``` + +This command gets specific deployment in specified device group. + diff --git a/src/Sphere/Sphere.Autorest/examples/Get-AzSphereDevice.md b/src/Sphere/Sphere.Autorest/examples/Get-AzSphereDevice.md new file mode 100644 index 000000000000..dea54823e6e3 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/examples/Get-AzSphereDevice.md @@ -0,0 +1,46 @@ +### Example 1: List by resource group +```powershell +Get-AzSphereDevice -CatalogName test2024 -ResourceGroupName "joyer-test" -GroupName testdevicegroup -ProductName product2024 +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy System + DataLa + stModi + fiedBy + Type +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ------ +dbb0e0cb8bd961a6129096e1e8a1375ac1fa274f030c08161b37ae3bc5a94f443bdb628cf257bc5bc810d8768c03b6f5ca301a35cd0169f56a49624255964560 +b15332603ba55fb52b00fec8549fdaa46b7fb6ba35694bc8943131ccb4b302846d224580a27880a2996b9fd4f1b2699400b1627059b6a90d67dd29e2984ee147 +5d257fbcf76a5853832122d9b0e2410daa1438e3c1cde005162a837a7535c08973cc819a50cf8eb724ffc88dada06b40bee6010e82a8f84d2fef0fc263061d67 +``` + +This command gets list of device resources by resource group. + +### Example 2: Get specific resource with specified resource group +```powershell +Get-AzSphereDevice -CatalogName test2024 -ResourceGroupName "joyer-test" -GroupName testdevicegroup -ProductName product2024 -Name dbb0e0cb8bd961a6129096e1e8a1375ac1fa274f030c08161b37ae3bc5a94f443bdb628cf257bc5bc810d8768c03b6f5ca301a35cd0169f56a49624255964560 +``` + +```output +ChipSku : MT3620AN +DeviceId : dbb0e0cb8bd961a6129096e1e8a1375ac1fa274f030c08161b37ae3bc5a94f443bdb628cf257bc5bc810d8768c03b6f5ca301a35cd0169f56a49624255964560 +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024/products/product2024/deviceGroups/testdevicegroup/devices/dbb0e0cb8bd961a6129096e1e8a1375ac1fa274f030c08161b37ae3bc5a94f443bdb628cf257bc5bc810d8768c03b6f5ca301a35cd0169f56a49624255964560 +LastAvailableOSVersion : +LastInstalledOSVersion : +LastOSUpdateUtc : +LastUpdateRequestUtc : +Name : dbb0e0cb8bd961a6129096e1e8a1375ac1fa274f030c08161b37ae3bc5a94f443bdb628cf257bc5bc810d8768c03b6f5ca301a35cd0169f56a49624255964560 +ProvisioningState : Succeeded +ResourceGroupName : joyer-test +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.AzureSphere/catalogs/products/deviceGroups/devices +``` + +This command gets specific device resource with specified resource group. + diff --git a/src/Sphere/Sphere.Autorest/examples/Get-AzSphereDeviceGroup.md b/src/Sphere/Sphere.Autorest/examples/Get-AzSphereDeviceGroup.md new file mode 100644 index 000000000000..3452e14c1feb --- /dev/null +++ b/src/Sphere/Sphere.Autorest/examples/Get-AzSphereDeviceGroup.md @@ -0,0 +1,56 @@ +### Example 1: List device group for specific product with specified catalog and resource group +```powershell +Get-AzSphereDeviceGroup -CatalogName NewCatalog -ProductName MyProd815 -ResourceGroupName ps1-test +``` + +```output +AllowCrashDumpsCollection : Disabled +Description : test device group +HasDeployment : False +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/ps1-test/providers/Microsoft.AzureSphere/catalogs/NewCatalog/products/MyProd815/deviceGroups/Marketing +Name : Marketing +OSFeedType : Retail +ProvisioningState : Succeeded +RegionalDataBoundary : None +ResourceGroupName : ps1-test +RetryAfter : +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.AzureSphere/catalogs/products/deviceGroups +UpdatePolicy : UpdateAll +``` + +This command lists device groups. + +### Example 2: Get specific device group of specified product with specified catalog and resource group +```powershell +Get-AzSphereDeviceGroup -CatalogName NewCatalog -Name Marketing -ProductName MyProd815 -ResourceGroupName ps1-test +``` + +```output +AllowCrashDumpsCollection : Disabled +Description : test device group +HasDeployment : +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/ps1-test/providers/Microsoft.AzureSphere/catalogs/NewCatalog/products/MyProd815/deviceGroups/Marketing +Name : Marketing +OSFeedType : Retail +ProvisioningState : Succeeded +RegionalDataBoundary : None +ResourceGroupName : ps1-test +RetryAfter : +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.AzureSphere/catalogs/products/deviceGroups +UpdatePolicy : UpdateAll +``` + +This command gets specific device group. + diff --git a/src/Sphere/Sphere.Autorest/examples/Get-AzSphereImage.md b/src/Sphere/Sphere.Autorest/examples/Get-AzSphereImage.md new file mode 100644 index 000000000000..1624fa483fb9 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/examples/Get-AzSphereImage.md @@ -0,0 +1,47 @@ +### Example 1: List images for specific catalog with specified resource group +```powershell +Get-AzSphereImage -CatalogName MyCatalog1 -ResourceGroupName ResourceGroup1 +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDa + taLastMo + difiedBy + Type +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ -------- +fa0bdab1-42bc-4871-84d5-fa05c8c0c895 +5f05300e-b0e0-47d5-8255-e4bddb2ddd81 +``` + +This command lists images. + +### Example 2: Get specific image with specified catalog and resource group +```powershell +Get-AzSphereImage -CatalogName anotherCatalog -Name 14a6729e-5819-4737-8713-37b4798533f8 -ResourceGroupName Sphere-test +``` + +```output +ComponentId : 42257ad6-382d-405f-b7cc-e110fbda2d0b +Description : +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/Sphere-test/providers/Microsoft.AzureSphere/catalogs/anotherCatalog/images/14a6729e-5819-4737-8713-37b4798533f8 +ImageId : 14a6729e-5819-4737-8713-37b4798533f8 +ImageName : +ImageType : Applications +Name : 14a6729e-5819-4737-8713-37b4798533f8 +PropertiesImage : AzureSphereBlink1 +ProvisioningState : Succeeded +RegionalDataBoundary : None +ResourceGroupName : Sphere-test +RetryAfter : +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.AzureSphere/catalogs/images +Uri : https://as3imgptint003.blob.core.windows.net/9e508310-247c-4bba-add7-39169e9b7482/imagesaks/14a6729e-5819-4737-8713-37b4798533f8?skoid=41781aa8-e455-49b8-8db3-eb9232b581c2&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2024-01-30T08%3A27%3A57Z&ske=2024-01-30T09%3A32%3A57Z&sks=b&skv=2021-12-02&sv=2021-12-02&spr=https,http&se=2024-01-30T16%3A32%3A57Z&sr=b&sp=r&sig=EiMxkiDu6yHzV%2BB2LSqMp27AnJc3lKice%2Fm2AJ63r%2Bg%3D +``` + +This command get specific image. + diff --git a/src/Sphere/Sphere.Autorest/examples/Get-AzSphereProduct.md b/src/Sphere/Sphere.Autorest/examples/Get-AzSphereProduct.md new file mode 100644 index 000000000000..3a88b982d9bf --- /dev/null +++ b/src/Sphere/Sphere.Autorest/examples/Get-AzSphereProduct.md @@ -0,0 +1,36 @@ +### Example 1: List with specified catalog by resource group +```powershell +Get-AzSphereProduct -ResourceGroupName joyer-test -CatalogName test2024 +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +product2024 joyer-test +product0207 joyer-test +``` + +This command gets list of product with specified catalog by resource group. + +### Example 2: Get product with specified catalog and resource group +```powershell +Get-AzSphereProduct -ResourceGroupName joyer-test -CatalogName test2024 -Name product2024 +``` + +```output +Description : 222 +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024/products/product2024 +Name : product2024 +ProvisioningState : Succeeded +ResourceGroupName : joyer-test +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.AzureSphere/catalogs/products +``` + +This command gets specific product with specified catalog and resource group. + diff --git a/src/Sphere/Sphere.Autorest/examples/Invoke-AzSphereCountCatalogDevice.md b/src/Sphere/Sphere.Autorest/examples/Invoke-AzSphereCountCatalogDevice.md new file mode 100644 index 000000000000..78687d1bd291 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/examples/Invoke-AzSphereCountCatalogDevice.md @@ -0,0 +1,13 @@ +### Example 1: Get device number +```powershell +Invoke-AzSphereCountCatalogDevice -CatalogName test2024 -ResourceGroupName joyer-test +``` + +```output +Value +----- + 3 +``` + +This command returns a number of device in the catalog. + diff --git a/src/Sphere/Sphere.Autorest/examples/Invoke-AzSphereCountDeviceGroupDevice.md b/src/Sphere/Sphere.Autorest/examples/Invoke-AzSphereCountDeviceGroupDevice.md new file mode 100644 index 000000000000..fc67eae55b39 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/examples/Invoke-AzSphereCountDeviceGroupDevice.md @@ -0,0 +1,13 @@ +### Example 1: Get device number +```powershell +Invoke-AzSphereCountDeviceGroupDevice -CatalogName test2024 -ResourceGroupName joyer-test -DeviceGroupName testdevicegroup -ProductName product2024 +``` + +```output +Value +----- + 3 +``` + +This command returns device number for the device group. + diff --git a/src/Sphere/Sphere.Autorest/examples/Invoke-AzSphereCountProductDevice.md b/src/Sphere/Sphere.Autorest/examples/Invoke-AzSphereCountProductDevice.md new file mode 100644 index 000000000000..df76d405ca3a --- /dev/null +++ b/src/Sphere/Sphere.Autorest/examples/Invoke-AzSphereCountProductDevice.md @@ -0,0 +1,13 @@ +### Example 1: Get device number +```powershell +Invoke-AzSphereCountProductDevice -CatalogName test2024 -ResourceGroupName joyer-test -ProductName product2024 +``` + +```output +Value +----- + 3 +``` + +This command returns device number for the product. + diff --git a/src/Sphere/Sphere.Autorest/examples/New-AzSphereCatalog.md b/src/Sphere/Sphere.Autorest/examples/New-AzSphereCatalog.md new file mode 100644 index 000000000000..078f9642aa74 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/examples/New-AzSphereCatalog.md @@ -0,0 +1,26 @@ +### Example 1: ### Example 1: Create a catalog +```powershell +New-AzSphereCatalog -name test2024 -ResourceGroupName joyer-test -Location global +``` + +```output +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024 +Location : global +Name : test2024 +ProvisioningState : Succeeded +ResourceGroupName : joyer-test +RetryAfter : +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Tag : { + } +TenantId : 7de8a199-bb33-4eda-9600-583103317243 +Type : microsoft.azuresphere/catalogs +``` + +This command creates a catalog. + diff --git a/src/Sphere/Sphere.Autorest/examples/New-AzSphereDeployment.md b/src/Sphere/Sphere.Autorest/examples/New-AzSphereDeployment.md new file mode 100644 index 000000000000..a8d085b148fd --- /dev/null +++ b/src/Sphere/Sphere.Autorest/examples/New-AzSphereDeployment.md @@ -0,0 +1,42 @@ +### Example 1: Create a deployment with deployed image +```powershell +$image1 = Get-AzSphereImage -Name '14a6729e-5819-4737-8713-37b4798533f8' -CatalogName test2024 -ResourceGroupName joyer-test +New-AzSphereDeployment -Name .default -CatalogName test2024 -DeviceGroupName testdevicegroup -ProductName product2024 -ResourceGroupName joyer-test -DeployedImage $image1 +``` + +```output +DateUtc : 3/1/2024 8:08:11 AM +DeployedImage : {{ + "id": "/subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024/images/14a6729e-5819-4737 + -8713-37b4798533f8", + "name": "14a6729e-5819-4737-8713-37b4798533f8", + "type": "Microsoft.AzureSphere/catalogs/images", + "properties": { + "image": "AzureSphereBlink1", + "imageId": "14a6729e-5819-4737-8713-37b4798533f8", + "regionalDataBoundary": "None", + "uri": "https://as3imgptint003.blob.core.windows.net/7de8a199-bb33-4eda-9600-583103317243/imagesaks/14a6729e-5819-4737-8713-37b4798533f8?skoid=cc6e3fcf-ab4d-4 + b0d-b3f9-9769604c1e52\u0026sktid=72f988bf-86f1-41af-91ab-2d7cd011db47\u0026skt=2024-03-01T08%3A03%3A45Z\u0026ske=2024-03-01T09%3A08%3A45Z\u0026sks=b\u0026skv=2021 + -12-02\u0026sv=2021-12-02\u0026spr=https,http\u0026se=2024-03-01T16%3A08%3A45Z\u0026sr=b\u0026sp=r\u0026sig=UviBTlciImOjqw968crarXzXyQ29UMEi4js56AEOPgU%3D", + "componentId": "42257ad6-382d-405f-b7cc-e110fbda2d0b", + "imageType": "Applications", + "provisioningState": "Succeeded" + } + }} +DeploymentId : e1e61a75-0629-491c-8f4f-0c054116d71c +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024/products/product2024/deviceGroups/ + testdevicegroup/deployments/e1e61a75-0629-491c-8f4f-0c054116d71c +Name : e1e61a75-0629-491c-8f4f-0c054116d71c +ProvisioningState : Succeeded +ResourceGroupName : joyer-test +SystemDataCreatedAt : 3/1/2024 8:08:11 AM +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : 3/1/2024 8:08:11 AM +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.AzureSphere/catalogs/products/deviceGroups/deployments +``` + +This command create a deployment with deployed images. + diff --git a/src/Sphere/Sphere.Autorest/examples/New-AzSphereDevice.md b/src/Sphere/Sphere.Autorest/examples/New-AzSphereDevice.md new file mode 100644 index 000000000000..6540634e04f8 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/examples/New-AzSphereDevice.md @@ -0,0 +1,29 @@ +### Example 1: Create a device +```powershell +New-AzSphereDevice -CatalogName "anotherNewOne" -GroupName ".default" -Name "45ffd2afe82d77b2b70f1daed2054abc64853a27395c6112d9adaf01047bae5a0caa72219f93db02e1a93f2c159ba2090a783077138e7fa542459621e6091e4c" -ProductName ".default" -ResourceGroupName "goyedokun" +``` + +```output +ChipSku : MT3620AN +DeviceId : fc9085337153e47eca0d42dcae83819f18ae90d916ae3b87d0206fef6acb9ca44f9e21b93c01311e83168393d112841decc5ef6d48c3d1d07be6b0bf8fec6e2b +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/goyedokun/providers/Microsoft.AzureSphere/catalogs/anotherNewOne/products/.default/deviceGroups/.default/devices/FC9085337153E47ECA0D42DCAE83819F18AE90D916AE3B87D0206FEF6ACB9CA44F9E21B93C01311E83168393D112841DECC5EF6D48C3D1D07BE6B0BF8FEC6E2B +LastAvailableOSVersion : +LastInstalledOSVersion : +LastOSUpdateUtc : +LastUpdateRequestUtc : +Name : fc9085337153e47eca0d42dcae83819f18ae90d916ae3b87d0206fef6acb9ca44f9e21b93c01311e83168393d112841decc5ef6d48c3d1d07be6b0bf8fec6e2b +ProvisioningState : Succeeded +ResourceGroupName : goyedokun +RetryAfter : +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.AzureSphere/catalogs/products/deviceGroups/devices + +``` + +This command creates a device. + diff --git a/src/Sphere/Sphere.Autorest/examples/New-AzSphereDeviceCapabilityImage.md b/src/Sphere/Sphere.Autorest/examples/New-AzSphereDeviceCapabilityImage.md new file mode 100644 index 000000000000..98e864c5ba5e --- /dev/null +++ b/src/Sphere/Sphere.Autorest/examples/New-AzSphereDeviceCapabilityImage.md @@ -0,0 +1,13 @@ +### Example 1: Generates the capability image for the device. +```powershell +New-AzSphereDeviceCapabilityImage -ResourceGroupName joyer-test -CatalogName test2024 -DeviceGroupName testdevicegroup2 -ProductName product2024 -DeviceName DBB0E0CB8BD961A6129096E1E8A1375AC1FA274F030C08161B37AE3BC5A94F443BDB628CF257BC5BC810D8768C03B6F5CA301A35CD0169F56A49624255964560 -Capability 'ApplicationDevelopment' | Format-List +``` + +```output +Image : /Vz9XAEAAADMAAAA27Dgy4vZYaYSkJbh6KE3WsH6J08DDAgWGzeuO8WpT0Q722KM8le8W8gQ2HaMA7b1yjAaNc0BafVqSWJCVZZFYAsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANFg0TQMAAABJRCQADQAAANi1KEHCq1VBmjOKHzHtZ+yYQTwYazyNRbRvoHzwyZefU0cYAJZKiVhXTEtr0FMmMLhe+JiQpbh/AQAA + AERCKAAAAAAAAAAAAGZ3X2NvbmZpZwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAfAAAAMyzku8X6GdcOC1Sd9Cfozpmsiny2TzmjyXK7IvOhfA1B8nwdf1GoPa6PPVNMnn15TPIFK/P5/S2TD/mQrNh0Nk= +``` + +This command generates the capability image for specified device. + diff --git a/src/Sphere/Sphere.Autorest/examples/New-AzSphereDeviceGroup.md b/src/Sphere/Sphere.Autorest/examples/New-AzSphereDeviceGroup.md new file mode 100644 index 000000000000..aab2316f0121 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/examples/New-AzSphereDeviceGroup.md @@ -0,0 +1,27 @@ +### Example 1: Create a device group into specified catalog and product +```powershell +New-AzSphereDeviceGroup -CatalogName anotherCatalog -Name testgroup -ProductName test -ResourceGroupName Sphere-test +``` + +```output +AllowCrashDumpsCollection : Disabled +Description : +HasDeployment : +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/Sphere-test/providers/Microsoft.AzureSphere/catalogs/anotherCatalog/products/test/deviceGroups/testgroup +Name : testgroup +OSFeedType : Retail +ProvisioningState : Succeeded +RegionalDataBoundary : None +ResourceGroupName : Sphere-test +RetryAfter : +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.AzureSphere/catalogs/products/deviceGroups +UpdatePolicy : UpdateAll +``` + +This command creates a device group into specified catalog and product. diff --git a/src/Sphere/Sphere.Autorest/examples/New-AzSphereImage.md b/src/Sphere/Sphere.Autorest/examples/New-AzSphereImage.md new file mode 100644 index 000000000000..204e3ee851e5 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/examples/New-AzSphereImage.md @@ -0,0 +1,34 @@ +### Example 1: Create a image for device group +```powershell +$imagefile1 = 'D:\GitHub\azure-powershell\src\Sphere\Sphere.Autorest\test\imagefile\AzureSphereBlink1.imagepackage' +$encf1 = [system.io.file]::ReadAllBytes($imagefile1) +$base64str = [system.convert]::ToBase64String($encf1) +New-AzSphereImage -CatalogName test2024 -ResourceGroupName joyer-test -Name 14a6729e-5819-4737-8713-37b4798533f8 -Image $base64str +``` + +```output +ComponentId : 42257ad6-382d-405f-b7cc-e110fbda2d0b +Description : +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024/images/14a6729e-5819-4737-8713-37b4798533f8 +ImageId : 14a6729e-5819-4737-8713-37b4798533f8 +ImageName : +ImageType : Applications +Name : 14a6729e-5819-4737-8713-37b4798533f8 +PropertiesImage : AzureSphereBlink1 +ProvisioningState : Succeeded +RegionalDataBoundary : None +ResourceGroupName : joyer-test +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.AzureSphere/catalogs/images +Uri : https://as3imgptint003.blob.core.windows.net/7de8a199-bb33-4eda-9600-583103317243/imagesaks/14a6729e-5819-4737-8713-37b4798533f8?skoid=cc6e3fcf-ab4d-4b0d-b3f9-9769 + 604c1e52&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2024-02-23T02%3A31%3A35Z&ske=2024-02-23T03%3A36%3A35Z&sks=b&skv=2021-12-02&sv=2021-12-02&spr=https,http&se= + 2024-02-23T10%3A36%3A35Z&sr=b&sp=r&sig=7ZNckgqdazn9Af8fHUfsEEA2JrZO0SjDZpUgbh0jEZI%3D +``` + +This command creates a image for the device group. + diff --git a/src/Sphere/Sphere.Autorest/examples/New-AzSphereProduct.md b/src/Sphere/Sphere.Autorest/examples/New-AzSphereProduct.md new file mode 100644 index 000000000000..c30a27f434de --- /dev/null +++ b/src/Sphere/Sphere.Autorest/examples/New-AzSphereProduct.md @@ -0,0 +1,22 @@ +### Example 1: Create a product into specified catalog +```powershell +New-AzSphereProduct -CatalogName test2024 -ResourceGroupName joyer-test -Name product2024 +``` + +```output +Description : +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024/products/product2024 +Name : product2024 +ProvisioningState : Succeeded +ResourceGroupName : joyer-test +RetryAfter : +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.AzureSphere/catalogs/products +``` + +This command create a product into specified catalog. diff --git a/src/Sphere/Sphere.Autorest/examples/New-AzSphereProductDefaultDeviceGroup.md b/src/Sphere/Sphere.Autorest/examples/New-AzSphereProductDefaultDeviceGroup.md new file mode 100644 index 000000000000..8485fa8b4252 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/examples/New-AzSphereProductDefaultDeviceGroup.md @@ -0,0 +1,17 @@ +### Example 1: Generate default device groups for the product +```powershell +New-AzSphereProductDefaultDeviceGroup -CatalogName test2024 -ProductName product0207 -ResourceGroupName joyer-test +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +Development joyer-test +Field Test joyer-test +Production joyer-test +Production OS Evaluation joyer-test +Field Test OS Evaluation joyer-test +``` + +This command generates default device groups for the product. + diff --git a/src/Sphere/Sphere.Autorest/examples/Remove-AzSphereCatalog.md b/src/Sphere/Sphere.Autorest/examples/Remove-AzSphereCatalog.md new file mode 100644 index 000000000000..b8ea82261ed3 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/examples/Remove-AzSphereCatalog.md @@ -0,0 +1,8 @@ +### Example 1: Delete a catalog + +```powershell +Remove-AzSphereCatalog -Name test2024 -ResourceGroupName joyer-test +``` + +This command deletes specified catalog. + diff --git a/src/Sphere/Sphere.Autorest/examples/Remove-AzSphereDeviceGroup.md b/src/Sphere/Sphere.Autorest/examples/Remove-AzSphereDeviceGroup.md new file mode 100644 index 000000000000..a4634c940adf --- /dev/null +++ b/src/Sphere/Sphere.Autorest/examples/Remove-AzSphereDeviceGroup.md @@ -0,0 +1,6 @@ +### Example 1: Delete specified device group +```powershell +Remove-AzSphereDeviceGroup -CatalogName NewCatalog -Name Marketing -ProductName MyProd129 -ResourceGroupName Sphere-test +``` + +This command deletes specified device group. \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/examples/Remove-AzSphereProduct.md b/src/Sphere/Sphere.Autorest/examples/Remove-AzSphereProduct.md new file mode 100644 index 000000000000..d6b852855cd2 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/examples/Remove-AzSphereProduct.md @@ -0,0 +1,7 @@ +### Example 1: Delete a product +```powershell +Remove-AzSphereProduct -CatalogName test2024 -ResourceGroupName joyer-test -Name product2024 +``` + +This command deletes specified product. + diff --git a/src/Sphere/Sphere.Autorest/examples/Update-AzSphereCatalog.md b/src/Sphere/Sphere.Autorest/examples/Update-AzSphereCatalog.md new file mode 100644 index 000000000000..93d283222834 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/examples/Update-AzSphereCatalog.md @@ -0,0 +1,26 @@ +### Example 1: Update tag +```powershell +Update-AzSphereCatalog -Name test2024 -ResourceGroupName joyer-test -Tag @{"123"="abc"} +``` + +```output +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024 +Location : global +Name : test2024 +ProvisioningState : Succeeded +ResourceGroupName : joyer-test +SystemDataCreatedAt : 2/1/2024 1:51:44 AM +SystemDataCreatedBy : example@microsoft.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 2/8/2024 1:54:33 AM +SystemDataLastModifiedBy : example@microsoft.com +SystemDataLastModifiedByType : User +Tag : { + "123": "abc" + } +TenantId : +Type : microsoft.azuresphere/catalogs +``` + +This command updates tag for specified catalog. + diff --git a/src/Sphere/Sphere.Autorest/examples/Update-AzSphereDevice.md b/src/Sphere/Sphere.Autorest/examples/Update-AzSphereDevice.md new file mode 100644 index 000000000000..79dfd9ceb30f --- /dev/null +++ b/src/Sphere/Sphere.Autorest/examples/Update-AzSphereDevice.md @@ -0,0 +1,56 @@ +### Example 1: Assign a device to another device group +```powershell +Update-AzSphereDevice -ResourceGroupName joyer-test -CatalogName test2024 -GroupName testdevicegroup -ProductName product2024 -Name DBB0E0CB8BD961A6129096E1E8A1375AC1FA274F030C08161B37AE3BC5A94F443BDB628CF257BC5BC810D8768C03B6F5CA301A35CD0169F56A49624255964560 -DeviceGroupId /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024/products/product2024/deviceGroups/testdevicegroup2 +``` + +```output +ChipSku : +DeviceId : +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/dc3e0b1a-59ae-4b00-bb84-9 + a7ea253f4e8*648856149066E98CE43CF51B8F3FC827768BFF5C8740097AD36EDFC456E7B110 +LastAvailableOSVersion : +LastInstalledOSVersion : +LastOSUpdateUtc : +LastUpdateRequestUtc : +Name : dc3e0b1a-59ae-4b00-bb84-9a7ea253f4e8*648856149066E98CE43CF51B8F3FC827768BFF5C8740097AD36EDFC456E7B110 +ProvisioningState : +ResourceGroupName : +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : +``` + +This command assign a device to another device group. + +### Example 2: unassign a device +```powershell +Update-AzSphereDevice -ResourceGroupName joyer-test -CatalogName test2024 -GroupName testdevicegroup -ProductName product2024 -Name DBB0E0CB8BD961A6129096E1E8A1375AC1FA274F030C08161B37AE3BC5A94F443BDB628CF257BC5BC810D8768C03B6F5CA301A35CD0169F56A49624255964560 -DeviceGroupId /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024/products/.default/deviceGroups/.default +``` + +```output +ChipSku : +DeviceId : +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/89c583a1-2a79-4f5f-ab4b-7e1cc7fb52e7* + 648856149066E98CE43CF51B8F3FC827768BFF5C8740097AD36EDFC456E7B110 +LastAvailableOSVersion : +LastInstalledOSVersion : +LastOSUpdateUtc : +LastUpdateRequestUtc : +Name : 89c583a1-2a79-4f5f-ab4b-7e1cc7fb52e7*648856149066E98CE43CF51B8F3FC827768BFF5C8740097AD36EDFC456E7B110 +ProvisioningState : +ResourceGroupName : +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : +``` + +This command unassign a device to catalog. + diff --git a/src/Sphere/Sphere.Autorest/examples/Update-AzSphereDeviceGroup.md b/src/Sphere/Sphere.Autorest/examples/Update-AzSphereDeviceGroup.md new file mode 100644 index 000000000000..debef0612f3f --- /dev/null +++ b/src/Sphere/Sphere.Autorest/examples/Update-AzSphereDeviceGroup.md @@ -0,0 +1,27 @@ +### Example 1: Update device group +```powershell +Update-AzSphereDeviceGroup -ResourceGroupName joyer-test -CatalogName test2024 -ProductName product2024 -Name testdevicegroup -Description test +``` + +```output +AllowCrashDumpsCollection : +Description : test +HasDeployment : +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024/products/product2024/deviceGroups/testdevicegroup +Name : testdevicegroup +OSFeedType : +ProvisioningState : Succeeded +RegionalDataBoundary : +ResourceGroupName : joyer-test +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.AzureSphere/catalogs/products/deviceGroups +UpdatePolicy : +``` + +This command updates device group. + diff --git a/src/Sphere/Sphere.Autorest/examples/Update-AzSphereProduct.md b/src/Sphere/Sphere.Autorest/examples/Update-AzSphereProduct.md new file mode 100644 index 000000000000..6e2969b53807 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/examples/Update-AzSphereProduct.md @@ -0,0 +1,22 @@ +### Example 1: Update description +```powershell +Update-AzSphereProduct -ResourceGroupName joyer-test -CatalogName test2024 -Name product2024 -Description 2222 +``` + +```output +Description : 2222 +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024/products/product2024 +Name : product2024 +ProvisioningState : Succeeded +ResourceGroupName : joyer-test +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.AzureSphere/catalogs/products +``` + +This command updates product description. + diff --git a/src/Sphere/Sphere.Autorest/export-surface.ps1 b/src/Sphere/Sphere.Autorest/export-surface.ps1 new file mode 100644 index 000000000000..f112dee13630 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/export-surface.ps1 @@ -0,0 +1,41 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- +param([switch]$NotIsolated, [switch]$IncludeGeneralParameters, [switch]$UseExpandedFormat) +$ErrorActionPreference = 'Stop' + +$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path +if(-not $NotIsolated) { + Write-Host -ForegroundColor Green 'Creating isolated process...' + & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated + return +} + +$dll = Join-Path $PSScriptRoot 'bin\Az.Sphere.private.dll' +if(-not (Test-Path $dll)) { + Write-Error "Unable to find output assembly in '$binFolder'." +} +$null = Import-Module -Name $dll + +$moduleName = 'Az.Sphere' +$exportsFolder = Join-Path $PSScriptRoot 'exports' +$resourcesFolder = Join-Path $PSScriptRoot 'resources' + +Export-CmdletSurface -ModuleName $moduleName -CmdletFolder $exportsFolder -OutputFolder $resourcesFolder -IncludeGeneralParameters $IncludeGeneralParameters.IsPresent -UseExpandedFormat $UseExpandedFormat.IsPresent +Write-Host -ForegroundColor Green "CmdletSurface file(s) created in '$resourcesFolder'" + +Export-ModelSurface -OutputFolder $resourcesFolder -UseExpandedFormat $UseExpandedFormat.IsPresent +Write-Host -ForegroundColor Green "ModelSurface file created in '$resourcesFolder'" + +Write-Host -ForegroundColor Green '-------------Done-------------' \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/exports/Get-AzSphereCatalog.ps1 b/src/Sphere/Sphere.Autorest/exports/Get-AzSphereCatalog.ps1 new file mode 100644 index 000000000000..b1c4a6e38e6d --- /dev/null +++ b/src/Sphere/Sphere.Autorest/exports/Get-AzSphereCatalog.ps1 @@ -0,0 +1,223 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get a Catalog +.Description +Get a Catalog +.Example +Get-AzSphereCatalog -ResourceGroupName test-sataneja-10 +.Example +Get-AzSphereCatalog -Name "testcat" -ResourceGroupName "goyedokun" +.Example +Get-AzSphereCatalog + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://learn.microsoft.com/powershell/module/az.sphere/get-azspherecatalog +#> +function Get-AzSphereCatalog { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('CatalogName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Parameter(ParameterSetName='List1')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Sphere.private\Get-AzSphereCatalog_Get'; + GetViaIdentity = 'Az.Sphere.private\Get-AzSphereCatalog_GetViaIdentity'; + List = 'Az.Sphere.private\Get-AzSphereCatalog_List'; + List1 = 'Az.Sphere.private\Get-AzSphereCatalog_List1'; + } + if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Sphere/Sphere.Autorest/exports/Get-AzSphereCatalogDevice.ps1 b/src/Sphere/Sphere.Autorest/exports/Get-AzSphereCatalogDevice.ps1 new file mode 100644 index 000000000000..8783c82ed5cc --- /dev/null +++ b/src/Sphere/Sphere.Autorest/exports/Get-AzSphereCatalogDevice.ps1 @@ -0,0 +1,212 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Lists devices for catalog. +.Description +Lists devices for catalog. +.Example +Get-AzSphereCatalogDevice -CatalogName test2024 -ResourceGroupName joyer-test + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice +.Link +https://learn.microsoft.com/powershell/module/az.sphere/get-azspherecatalogdevice +#> +function Get-AzSphereCatalogDevice { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.String] + # Filter the result list using the given expression + ${Filter}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.Int32] + # The maximum number of result items per page. + ${Maxpagesize}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.Int32] + # The number of result items to skip. + ${Skip}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.Int32] + # The number of result items to return. + ${Top}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.Sphere.private\Get-AzSphereCatalogDevice_List'; + } + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Sphere/Sphere.Autorest/exports/Get-AzSphereCatalogDeviceGroup.ps1 b/src/Sphere/Sphere.Autorest/exports/Get-AzSphereCatalogDeviceGroup.ps1 new file mode 100644 index 000000000000..7e6b6a22fa6b --- /dev/null +++ b/src/Sphere/Sphere.Autorest/exports/Get-AzSphereCatalogDeviceGroup.ps1 @@ -0,0 +1,218 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +List the device groups for the catalog. +.Description +List the device groups for the catalog. +.Example +Get-AzSphereCatalogDeviceGroup -CatalogName test2024 -ResourceGroupName joyer-test + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup +.Link +https://learn.microsoft.com/powershell/module/az.sphere/get-azspherecatalogdevicegroup +#> +function Get-AzSphereCatalogDeviceGroup { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup])] +[CmdletBinding(DefaultParameterSetName='ListExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.String] + # Filter the result list using the given expression + ${Filter}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.Int32] + # The maximum number of result items per page. + ${Maxpagesize}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.Int32] + # The number of result items to skip. + ${Skip}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.Int32] + # The number of result items to return. + ${Top}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Device Group name. + ${DeviceGroupName}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + ListExpanded = 'Az.Sphere.private\Get-AzSphereCatalogDeviceGroup_ListExpanded'; + } + if (('ListExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Sphere/Sphere.Autorest/exports/Get-AzSphereCatalogDeviceInsight.ps1 b/src/Sphere/Sphere.Autorest/exports/Get-AzSphereCatalogDeviceInsight.ps1 new file mode 100644 index 000000000000..f2537c3acfaf --- /dev/null +++ b/src/Sphere/Sphere.Autorest/exports/Get-AzSphereCatalogDeviceInsight.ps1 @@ -0,0 +1,212 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Lists device insights for catalog. +.Description +Lists device insights for catalog. +.Example +Get-AzSphereCatalogDeviceInsight -CatalogName test2024 -ResourceGroupName joyer-test + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsight +.Link +https://learn.microsoft.com/powershell/module/az.sphere/get-azspherecatalogdeviceinsight +#> +function Get-AzSphereCatalogDeviceInsight { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsight])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.String] + # Filter the result list using the given expression + ${Filter}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.Int32] + # The maximum number of result items per page. + ${Maxpagesize}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.Int32] + # The number of result items to skip. + ${Skip}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.Int32] + # The number of result items to return. + ${Top}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.Sphere.private\Get-AzSphereCatalogDeviceInsight_List'; + } + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Sphere/Sphere.Autorest/exports/Get-AzSphereCertificate.ps1 b/src/Sphere/Sphere.Autorest/exports/Get-AzSphereCertificate.ps1 new file mode 100644 index 000000000000..6b4311e430a6 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/exports/Get-AzSphereCertificate.ps1 @@ -0,0 +1,268 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get a Certificate +.Description +Get a Certificate +.Example +Get-AzSphereCertificate -CatalogName test2024 -ResourceGroupName joyer-test + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificate +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CATALOGINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +INPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://learn.microsoft.com/powershell/module/az.sphere/get-azspherecertificate +#> +function Get-AzSphereCertificate { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificate])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityCatalog', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Serial number of the certificate. + # Use '.default' to get current active certificate. + ${SerialNumber}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityCatalog', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${CatalogInputObject}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.String] + # Filter the result list using the given expression + ${Filter}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.Int32] + # The maximum number of result items per page. + ${Maxpagesize}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.Int32] + # The number of result items to skip. + ${Skip}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.Int32] + # The number of result items to return. + ${Top}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Sphere.private\Get-AzSphereCertificate_Get'; + GetViaIdentity = 'Az.Sphere.private\Get-AzSphereCertificate_GetViaIdentity'; + GetViaIdentityCatalog = 'Az.Sphere.private\Get-AzSphereCertificate_GetViaIdentityCatalog'; + List = 'Az.Sphere.private\Get-AzSphereCertificate_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Sphere/Sphere.Autorest/exports/Get-AzSphereCertificateCertChain.ps1 b/src/Sphere/Sphere.Autorest/exports/Get-AzSphereCertificateCertChain.ps1 new file mode 100644 index 000000000000..a875b2d67ae3 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/exports/Get-AzSphereCertificateCertChain.ps1 @@ -0,0 +1,240 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Retrieves cert chain. +.Description +Retrieves cert chain. +.Example +Get-AzSphereCertificateCertChain -CatalogName test2024 -ResourceGroupName joyer-test -SerialNumber 'serial number' + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateChainResponse +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CATALOGINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +INPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://learn.microsoft.com/powershell/module/az.sphere/get-azspherecertificatecertchain +#> +function Get-AzSphereCertificateCertChain { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateChainResponse])] +[CmdletBinding(DefaultParameterSetName='Retrieve', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Retrieve', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(ParameterSetName='Retrieve', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Retrieve', Mandatory)] + [Parameter(ParameterSetName='RetrieveViaIdentityCatalog', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Serial number of the certificate. + # Use '.default' to get current active certificate. + ${SerialNumber}, + + [Parameter(ParameterSetName='Retrieve')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='RetrieveViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='RetrieveViaIdentityCatalog', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${CatalogInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Retrieve = 'Az.Sphere.private\Get-AzSphereCertificateCertChain_Retrieve'; + RetrieveViaIdentity = 'Az.Sphere.private\Get-AzSphereCertificateCertChain_RetrieveViaIdentity'; + RetrieveViaIdentityCatalog = 'Az.Sphere.private\Get-AzSphereCertificateCertChain_RetrieveViaIdentityCatalog'; + } + if (('Retrieve') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Sphere/Sphere.Autorest/exports/Get-AzSphereCertificateProof.ps1 b/src/Sphere/Sphere.Autorest/exports/Get-AzSphereCertificateProof.ps1 new file mode 100644 index 000000000000..67094f0ea3cf --- /dev/null +++ b/src/Sphere/Sphere.Autorest/exports/Get-AzSphereCertificateProof.ps1 @@ -0,0 +1,246 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Gets the proof of possession nonce. +.Description +Gets the proof of possession nonce. +.Example +Get-AzSphereCertificateProof -CatalogName test2024 -ResourceGroupName joyer-test -SerialNumber 'serial number' -ProofOfPossessionNonce proofOfPossessionNonce + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceResponse +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CATALOGINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +INPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://learn.microsoft.com/powershell/module/az.sphere/get-azspherecertificateproof +#> +function Get-AzSphereCertificateProof { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceResponse])] +[CmdletBinding(DefaultParameterSetName='RetrieveExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='RetrieveExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(ParameterSetName='RetrieveExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='RetrieveExpanded', Mandatory)] + [Parameter(ParameterSetName='RetrieveViaIdentityCatalogExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Serial number of the certificate. + # Use '.default' to get current active certificate. + ${SerialNumber}, + + [Parameter(ParameterSetName='RetrieveExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='RetrieveViaIdentityCatalogExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${CatalogInputObject}, + + [Parameter(ParameterSetName='RetrieveViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # The proof of possession nonce + ${ProofOfPossessionNonce}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + RetrieveExpanded = 'Az.Sphere.private\Get-AzSphereCertificateProof_RetrieveExpanded'; + RetrieveViaIdentityCatalogExpanded = 'Az.Sphere.private\Get-AzSphereCertificateProof_RetrieveViaIdentityCatalogExpanded'; + RetrieveViaIdentityExpanded = 'Az.Sphere.private\Get-AzSphereCertificateProof_RetrieveViaIdentityExpanded'; + } + if (('RetrieveExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Sphere/Sphere.Autorest/exports/Get-AzSphereDeployment.ps1 b/src/Sphere/Sphere.Autorest/exports/Get-AzSphereDeployment.ps1 new file mode 100644 index 000000000000..f0db6d4a0404 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/exports/Get-AzSphereDeployment.ps1 @@ -0,0 +1,330 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get a Deployment. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. +.Description +Get a Deployment. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. +.Example +Get-AzSphereDeployment -ResourceGroupName joyer-test -DeviceGroupName testdevicegroup -ProductName product2024 -CatalogName test2024 +.Example +Get-AzSphereDeployment -ResourceGroupName joyer-test -DeviceGroupName testdevicegroup -ProductName product2024 -CatalogName test2024 -Name 2e83ddd9-6297-48df-9c2c-2257e6b3cc71 + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CATALOGINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +DEVICEGROUPINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +INPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +PRODUCTINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://learn.microsoft.com/powershell/module/az.sphere/get-azspheredeployment +#> +function Get-AzSphereDeployment { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityCatalog', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityProduct', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of device group. + ${DeviceGroupName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityCatalog', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityDeviceGroup', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityProduct', Mandatory)] + [Alias('DeploymentName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Deployment name. + # Use .default for deployment creation and to get the current deployment for the associated device group. + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityCatalog', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of product. + ${ProductName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityCatalog', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${CatalogInputObject}, + + [Parameter(ParameterSetName='GetViaIdentityDeviceGroup', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${DeviceGroupInputObject}, + + [Parameter(ParameterSetName='GetViaIdentityProduct', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${ProductInputObject}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.String] + # Filter the result list using the given expression + ${Filter}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.Int32] + # The maximum number of result items per page. + ${Maxpagesize}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.Int32] + # The number of result items to skip. + ${Skip}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.Int32] + # The number of result items to return. + ${Top}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Sphere.private\Get-AzSphereDeployment_Get'; + GetViaIdentity = 'Az.Sphere.private\Get-AzSphereDeployment_GetViaIdentity'; + GetViaIdentityCatalog = 'Az.Sphere.private\Get-AzSphereDeployment_GetViaIdentityCatalog'; + GetViaIdentityDeviceGroup = 'Az.Sphere.private\Get-AzSphereDeployment_GetViaIdentityDeviceGroup'; + GetViaIdentityProduct = 'Az.Sphere.private\Get-AzSphereDeployment_GetViaIdentityProduct'; + List = 'Az.Sphere.private\Get-AzSphereDeployment_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Sphere/Sphere.Autorest/exports/Get-AzSphereDevice.ps1 b/src/Sphere/Sphere.Autorest/exports/Get-AzSphereDevice.ps1 new file mode 100644 index 000000000000..e47cf13e7c5c --- /dev/null +++ b/src/Sphere/Sphere.Autorest/exports/Get-AzSphereDevice.ps1 @@ -0,0 +1,306 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get a Device. +Use '.unassigned' or '.default' for the device group and product names when a device does not belong to a device group and product. +.Description +Get a Device. +Use '.unassigned' or '.default' for the device group and product names when a device does not belong to a device group and product. +.Example +Get-AzSphereDevice -CatalogName test2024 -ResourceGroupName "joyer-test" -GroupName testdevicegroup -ProductName product2024 +.Example +Get-AzSphereDevice -CatalogName test2024 -ResourceGroupName "joyer-test" -GroupName testdevicegroup -ProductName product2024 -Name dbb0e0cb8bd961a6129096e1e8a1375ac1fa274f030c08161b37ae3bc5a94f443bdb628cf257bc5bc810d8768c03b6f5ca301a35cd0169f56a49624255964560 + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CATALOGINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +DEVICEGROUPINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +INPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +PRODUCTINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://learn.microsoft.com/powershell/module/az.sphere/get-azspheredevice +#> +function Get-AzSphereDevice { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityCatalog', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityProduct', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Alias('DeviceGroupName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of device group. + ${GroupName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityCatalog', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityDeviceGroup', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityProduct', Mandatory)] + [Alias('DeviceName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Device name + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityCatalog', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of product. + ${ProductName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityCatalog', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${CatalogInputObject}, + + [Parameter(ParameterSetName='GetViaIdentityDeviceGroup', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${DeviceGroupInputObject}, + + [Parameter(ParameterSetName='GetViaIdentityProduct', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${ProductInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Sphere.private\Get-AzSphereDevice_Get'; + GetViaIdentity = 'Az.Sphere.private\Get-AzSphereDevice_GetViaIdentity'; + GetViaIdentityCatalog = 'Az.Sphere.private\Get-AzSphereDevice_GetViaIdentityCatalog'; + GetViaIdentityDeviceGroup = 'Az.Sphere.private\Get-AzSphereDevice_GetViaIdentityDeviceGroup'; + GetViaIdentityProduct = 'Az.Sphere.private\Get-AzSphereDevice_GetViaIdentityProduct'; + List = 'Az.Sphere.private\Get-AzSphereDevice_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Sphere/Sphere.Autorest/exports/Get-AzSphereDeviceGroup.ps1 b/src/Sphere/Sphere.Autorest/exports/Get-AzSphereDeviceGroup.ps1 new file mode 100644 index 000000000000..f6e6b81dd634 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/exports/Get-AzSphereDeviceGroup.ps1 @@ -0,0 +1,300 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get a DeviceGroup. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. +.Description +Get a DeviceGroup. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. +.Example +Get-AzSphereDeviceGroup -CatalogName NewCatalog -ProductName MyProd815 -ResourceGroupName ps1-test +.Example +Get-AzSphereDeviceGroup -CatalogName NewCatalog -Name Marketing -ProductName MyProd815 -ResourceGroupName ps1-test + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CATALOGINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +INPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +PRODUCTINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://learn.microsoft.com/powershell/module/az.sphere/get-azspheredevicegroup +#> +function Get-AzSphereDeviceGroup { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityCatalog', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityProduct', Mandatory)] + [Alias('DeviceGroupName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of device group. + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityCatalog', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of product. + ${ProductName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityCatalog', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${CatalogInputObject}, + + [Parameter(ParameterSetName='GetViaIdentityProduct', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${ProductInputObject}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.String] + # Filter the result list using the given expression + ${Filter}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.Int32] + # The maximum number of result items per page. + ${Maxpagesize}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.Int32] + # The number of result items to skip. + ${Skip}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.Int32] + # The number of result items to return. + ${Top}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Sphere.private\Get-AzSphereDeviceGroup_Get'; + GetViaIdentity = 'Az.Sphere.private\Get-AzSphereDeviceGroup_GetViaIdentity'; + GetViaIdentityCatalog = 'Az.Sphere.private\Get-AzSphereDeviceGroup_GetViaIdentityCatalog'; + GetViaIdentityProduct = 'Az.Sphere.private\Get-AzSphereDeviceGroup_GetViaIdentityProduct'; + List = 'Az.Sphere.private\Get-AzSphereDeviceGroup_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Sphere/Sphere.Autorest/exports/Get-AzSphereImage.ps1 b/src/Sphere/Sphere.Autorest/exports/Get-AzSphereImage.ps1 new file mode 100644 index 000000000000..3f057a20adb4 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/exports/Get-AzSphereImage.ps1 @@ -0,0 +1,271 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get a Image +.Description +Get a Image +.Example +Get-AzSphereImage -CatalogName MyCatalog1 -ResourceGroupName ResourceGroup1 +.Example +Get-AzSphereImage -CatalogName anotherCatalog -Name 14a6729e-5819-4737-8713-37b4798533f8 -ResourceGroupName Sphere-test + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CATALOGINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +INPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://learn.microsoft.com/powershell/module/az.sphere/get-azsphereimage +#> +function Get-AzSphereImage { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityCatalog', Mandatory)] + [Alias('ImageName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Image name. + # Use an image GUID for GA versions of the API. + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityCatalog', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${CatalogInputObject}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.String] + # Filter the result list using the given expression + ${Filter}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.Int32] + # The maximum number of result items per page. + ${Maxpagesize}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.Int32] + # The number of result items to skip. + ${Skip}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.Int32] + # The number of result items to return. + ${Top}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Sphere.private\Get-AzSphereImage_Get'; + GetViaIdentity = 'Az.Sphere.private\Get-AzSphereImage_GetViaIdentity'; + GetViaIdentityCatalog = 'Az.Sphere.private\Get-AzSphereImage_GetViaIdentityCatalog'; + List = 'Az.Sphere.private\Get-AzSphereImage_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Sphere/Sphere.Autorest/exports/Get-AzSphereProduct.ps1 b/src/Sphere/Sphere.Autorest/exports/Get-AzSphereProduct.ps1 new file mode 100644 index 000000000000..294e53491c31 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/exports/Get-AzSphereProduct.ps1 @@ -0,0 +1,248 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get a Product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. +.Description +Get a Product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. +.Example +Get-AzSphereProduct -ResourceGroupName joyer-test -CatalogName test2024 +.Example +Get-AzSphereProduct -ResourceGroupName joyer-test -CatalogName test2024 -Name product2024 + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CATALOGINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +INPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://learn.microsoft.com/powershell/module/az.sphere/get-azsphereproduct +#> +function Get-AzSphereProduct { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityCatalog', Mandatory)] + [Alias('ProductName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of product. + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityCatalog', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${CatalogInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Sphere.private\Get-AzSphereProduct_Get'; + GetViaIdentity = 'Az.Sphere.private\Get-AzSphereProduct_GetViaIdentity'; + GetViaIdentityCatalog = 'Az.Sphere.private\Get-AzSphereProduct_GetViaIdentityCatalog'; + List = 'Az.Sphere.private\Get-AzSphereProduct_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Sphere/Sphere.Autorest/exports/Invoke-AzSphereCountCatalogDevice.ps1 b/src/Sphere/Sphere.Autorest/exports/Invoke-AzSphereCountCatalogDevice.ps1 new file mode 100644 index 000000000000..1d2b8bc036e6 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/exports/Invoke-AzSphereCountCatalogDevice.ps1 @@ -0,0 +1,213 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Counts devices in catalog. +.Description +Counts devices in catalog. +.Example +Invoke-AzSphereCountCatalogDevice -CatalogName test2024 -ResourceGroupName joyer-test + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://learn.microsoft.com/powershell/module/az.sphere/invoke-azspherecountcatalogdevice +#> +function Invoke-AzSphereCountCatalogDevice { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse])] +[CmdletBinding(DefaultParameterSetName='CountDevice', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='CountDevice', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(ParameterSetName='CountDevice', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='CountDevice')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='CountDeviceViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CountDevice = 'Az.Sphere.private\Invoke-AzSphereCountCatalogDevice_CountDevice'; + CountDeviceViaIdentity = 'Az.Sphere.private\Invoke-AzSphereCountCatalogDevice_CountDeviceViaIdentity'; + } + if (('CountDevice') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Sphere/Sphere.Autorest/exports/Invoke-AzSphereCountDeviceGroupDevice.ps1 b/src/Sphere/Sphere.Autorest/exports/Invoke-AzSphereCountDeviceGroupDevice.ps1 new file mode 100644 index 000000000000..12ca45b716a1 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/exports/Invoke-AzSphereCountDeviceGroupDevice.ps1 @@ -0,0 +1,268 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Counts devices in device group. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. +.Description +Counts devices in device group. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. +.Example +Invoke-AzSphereCountDeviceGroupDevice -CatalogName test2024 -ResourceGroupName joyer-test -DeviceGroupName testdevicegroup -ProductName product2024 + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CATALOGINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +INPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +PRODUCTINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://learn.microsoft.com/powershell/module/az.sphere/invoke-azspherecountdevicegroupdevice +#> +function Invoke-AzSphereCountDeviceGroupDevice { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse])] +[CmdletBinding(DefaultParameterSetName='CountDevice', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='CountDevice', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(ParameterSetName='CountDevice', Mandatory)] + [Parameter(ParameterSetName='CountDeviceViaIdentityCatalog', Mandatory)] + [Parameter(ParameterSetName='CountDeviceViaIdentityProduct', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of device group. + ${DeviceGroupName}, + + [Parameter(ParameterSetName='CountDevice', Mandatory)] + [Parameter(ParameterSetName='CountDeviceViaIdentityCatalog', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of product. + ${ProductName}, + + [Parameter(ParameterSetName='CountDevice', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='CountDevice')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='CountDeviceViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='CountDeviceViaIdentityCatalog', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${CatalogInputObject}, + + [Parameter(ParameterSetName='CountDeviceViaIdentityProduct', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${ProductInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CountDevice = 'Az.Sphere.private\Invoke-AzSphereCountDeviceGroupDevice_CountDevice'; + CountDeviceViaIdentity = 'Az.Sphere.private\Invoke-AzSphereCountDeviceGroupDevice_CountDeviceViaIdentity'; + CountDeviceViaIdentityCatalog = 'Az.Sphere.private\Invoke-AzSphereCountDeviceGroupDevice_CountDeviceViaIdentityCatalog'; + CountDeviceViaIdentityProduct = 'Az.Sphere.private\Invoke-AzSphereCountDeviceGroupDevice_CountDeviceViaIdentityProduct'; + } + if (('CountDevice') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Sphere/Sphere.Autorest/exports/Invoke-AzSphereCountProductDevice.ps1 b/src/Sphere/Sphere.Autorest/exports/Invoke-AzSphereCountProductDevice.ps1 new file mode 100644 index 000000000000..c89ea19c71e4 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/exports/Invoke-AzSphereCountProductDevice.ps1 @@ -0,0 +1,241 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Counts devices in product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. +.Description +Counts devices in product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. +.Example +Invoke-AzSphereCountProductDevice -CatalogName test2024 -ResourceGroupName joyer-test -ProductName product2024 + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CATALOGINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +INPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://learn.microsoft.com/powershell/module/az.sphere/invoke-azspherecountproductdevice +#> +function Invoke-AzSphereCountProductDevice { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse])] +[CmdletBinding(DefaultParameterSetName='CountDevice', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='CountDevice', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(ParameterSetName='CountDevice', Mandatory)] + [Parameter(ParameterSetName='CountDeviceViaIdentityCatalog', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of product. + ${ProductName}, + + [Parameter(ParameterSetName='CountDevice', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='CountDevice')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='CountDeviceViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='CountDeviceViaIdentityCatalog', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${CatalogInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CountDevice = 'Az.Sphere.private\Invoke-AzSphereCountProductDevice_CountDevice'; + CountDeviceViaIdentity = 'Az.Sphere.private\Invoke-AzSphereCountProductDevice_CountDeviceViaIdentity'; + CountDeviceViaIdentityCatalog = 'Az.Sphere.private\Invoke-AzSphereCountProductDevice_CountDeviceViaIdentityCatalog'; + } + if (('CountDevice') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Sphere/Sphere.Autorest/exports/New-AzSphereCatalog.ps1 b/src/Sphere/Sphere.Autorest/exports/New-AzSphereCatalog.ps1 new file mode 100644 index 000000000000..fc85c04dd3f4 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/exports/New-AzSphereCatalog.ps1 @@ -0,0 +1,228 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create a Catalog +.Description +Create a Catalog +.Example +New-AzSphereCatalog -name test2024 -ResourceGroupName joyer-test -Location global + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog +.Link +https://learn.microsoft.com/powershell/module/az.sphere/new-azspherecatalog +#> +function New-AzSphereCatalog { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Alias('CatalogName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # The geo-location where the resource lives + ${Location}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.Sphere.private\New-AzSphereCatalog_CreateExpanded'; + CreateViaJsonFilePath = 'Az.Sphere.private\New-AzSphereCatalog_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.Sphere.private\New-AzSphereCatalog_CreateViaJsonString'; + } + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Sphere/Sphere.Autorest/exports/New-AzSphereDeployment.ps1 b/src/Sphere/Sphere.Autorest/exports/New-AzSphereDeployment.ps1 new file mode 100644 index 000000000000..db527bfcaf44 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/exports/New-AzSphereDeployment.ps1 @@ -0,0 +1,259 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create a Deployment. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. +.Description +Create a Deployment. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. +.Example +$image1 = Get-AzSphereImage -Name '14a6729e-5819-4737-8713-37b4798533f8' -CatalogName test2024 -ResourceGroupName joyer-test +New-AzSphereDeployment -Name .default -CatalogName test2024 -DeviceGroupName testdevicegroup -ProductName product2024 -ResourceGroupName joyer-test -DeployedImage $image1 + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +DEPLOYEDIMAGE : Images deployed + [ImageId ]: Image ID + [PropertiesImage ]: Image as a UTF-8 encoded base 64 string on image create. This field contains the image URI on image reads. + [RegionalDataBoundary ]: Regional data boundary for an image +.Link +https://learn.microsoft.com/powershell/module/az.sphere/new-azspheredeployment +#> +function New-AzSphereDeployment { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of device group. + ${DeviceGroupName}, + + [Parameter(Mandatory)] + [Alias('DeploymentName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Deployment name. + # Use .default for deployment creation and to get the current deployment for the associated device group. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of product. + ${ProductName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='CreateExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage[]] + # Images deployed + ${DeployedImage}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Deployment ID + ${DeploymentId}, + + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.Sphere.private\New-AzSphereDeployment_CreateExpanded'; + CreateViaJsonFilePath = 'Az.Sphere.private\New-AzSphereDeployment_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.Sphere.private\New-AzSphereDeployment_CreateViaJsonString'; + } + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Sphere/Sphere.Autorest/exports/New-AzSphereDevice.ps1 b/src/Sphere/Sphere.Autorest/exports/New-AzSphereDevice.ps1 new file mode 100644 index 000000000000..08adf53daa07 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/exports/New-AzSphereDevice.ps1 @@ -0,0 +1,242 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create a Device. +Use '.unassigned' or '.default' for the device group and product names to claim a device to the catalog only. +.Description +Create a Device. +Use '.unassigned' or '.default' for the device group and product names to claim a device to the catalog only. +.Example +New-AzSphereDevice -CatalogName "anotherNewOne" -GroupName ".default" -Name "45ffd2afe82d77b2b70f1daed2054abc64853a27395c6112d9adaf01047bae5a0caa72219f93db02e1a93f2c159ba2090a783077138e7fa542459621e6091e4c" -ProductName ".default" -ResourceGroupName "goyedokun" + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice +.Link +https://learn.microsoft.com/powershell/module/az.sphere/new-azspheredevice +#> +function New-AzSphereDevice { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(Mandatory)] + [Alias('DeviceGroupName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of device group. + ${GroupName}, + + [Parameter(Mandatory)] + [Alias('DeviceName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Device name + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of product. + ${ProductName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Device ID + ${DeviceId}, + + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.Sphere.private\New-AzSphereDevice_CreateExpanded'; + CreateViaJsonFilePath = 'Az.Sphere.private\New-AzSphereDevice_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.Sphere.private\New-AzSphereDevice_CreateViaJsonString'; + } + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Sphere/Sphere.Autorest/exports/New-AzSphereDeviceCapabilityImage.ps1 b/src/Sphere/Sphere.Autorest/exports/New-AzSphereDeviceCapabilityImage.ps1 new file mode 100644 index 000000000000..40e484193502 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/exports/New-AzSphereDeviceCapabilityImage.ps1 @@ -0,0 +1,321 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Generates the capability image for the device. +Use '.unassigned' or '.default' for the device group and product names to generate the image for a device that does not belong to a specific device group and product. +.Description +Generates the capability image for the device. +Use '.unassigned' or '.default' for the device group and product names to generate the image for a device that does not belong to a specific device group and product. +.Example +New-AzSphereDeviceCapabilityImage -ResourceGroupName joyer-test -CatalogName test2024 -DeviceGroupName testdevicegroup2 -ProductName product2024 -DeviceName DBB0E0CB8BD961A6129096E1E8A1375AC1FA274F030C08161B37AE3BC5A94F443BDB628CF257BC5BC810D8768C03B6F5CA301A35CD0169F56A49624255964560 -Capability 'ApplicationDevelopment' | Format-List + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CATALOGINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +DEVICEGROUPINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +PRODUCTINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://learn.microsoft.com/powershell/module/az.sphere/new-azspheredevicecapabilityimage +#> +function New-AzSphereDeviceCapabilityImage { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse])] +[CmdletBinding(DefaultParameterSetName='GenerateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Device name + ${DeviceName}, + + [Parameter(ParameterSetName='GenerateExpanded', Mandatory)] + [Parameter(ParameterSetName='GenerateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='GenerateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(ParameterSetName='GenerateExpanded', Mandatory)] + [Parameter(ParameterSetName='GenerateViaIdentityCatalogExpanded', Mandatory)] + [Parameter(ParameterSetName='GenerateViaIdentityProductExpanded', Mandatory)] + [Parameter(ParameterSetName='GenerateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='GenerateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of device group. + ${DeviceGroupName}, + + [Parameter(ParameterSetName='GenerateExpanded', Mandatory)] + [Parameter(ParameterSetName='GenerateViaIdentityCatalogExpanded', Mandatory)] + [Parameter(ParameterSetName='GenerateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='GenerateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of product. + ${ProductName}, + + [Parameter(ParameterSetName='GenerateExpanded', Mandatory)] + [Parameter(ParameterSetName='GenerateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='GenerateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='GenerateExpanded')] + [Parameter(ParameterSetName='GenerateViaJsonFilePath')] + [Parameter(ParameterSetName='GenerateViaJsonString')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GenerateViaIdentityCatalogExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${CatalogInputObject}, + + [Parameter(ParameterSetName='GenerateViaIdentityDeviceGroupExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${DeviceGroupInputObject}, + + [Parameter(ParameterSetName='GenerateViaIdentityProductExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${ProductInputObject}, + + [Parameter(ParameterSetName='GenerateExpanded', Mandatory)] + [Parameter(ParameterSetName='GenerateViaIdentityCatalogExpanded', Mandatory)] + [Parameter(ParameterSetName='GenerateViaIdentityDeviceGroupExpanded', Mandatory)] + [Parameter(ParameterSetName='GenerateViaIdentityProductExpanded', Mandatory)] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("ApplicationDevelopment", "FieldServicing")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String[]] + # List of capabilities to create + ${Capability}, + + [Parameter(ParameterSetName='GenerateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Path of Json file supplied to the Generate operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='GenerateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Json string supplied to the Generate operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + GenerateExpanded = 'Az.Sphere.private\New-AzSphereDeviceCapabilityImage_GenerateExpanded'; + GenerateViaIdentityCatalogExpanded = 'Az.Sphere.private\New-AzSphereDeviceCapabilityImage_GenerateViaIdentityCatalogExpanded'; + GenerateViaIdentityDeviceGroupExpanded = 'Az.Sphere.private\New-AzSphereDeviceCapabilityImage_GenerateViaIdentityDeviceGroupExpanded'; + GenerateViaIdentityProductExpanded = 'Az.Sphere.private\New-AzSphereDeviceCapabilityImage_GenerateViaIdentityProductExpanded'; + GenerateViaJsonFilePath = 'Az.Sphere.private\New-AzSphereDeviceCapabilityImage_GenerateViaJsonFilePath'; + GenerateViaJsonString = 'Az.Sphere.private\New-AzSphereDeviceCapabilityImage_GenerateViaJsonString'; + } + if (('GenerateExpanded', 'GenerateViaJsonFilePath', 'GenerateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Sphere/Sphere.Autorest/exports/New-AzSphereDeviceGroup.ps1 b/src/Sphere/Sphere.Autorest/exports/New-AzSphereDeviceGroup.ps1 new file mode 100644 index 000000000000..ca4952d89c7e --- /dev/null +++ b/src/Sphere/Sphere.Autorest/exports/New-AzSphereDeviceGroup.ps1 @@ -0,0 +1,263 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create a DeviceGroup. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. +.Description +Create a DeviceGroup. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. +.Example +New-AzSphereDeviceGroup -CatalogName anotherCatalog -Name testgroup -ProductName test -ResourceGroupName Sphere-test + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup +.Link +https://learn.microsoft.com/powershell/module/az.sphere/new-azspheredevicegroup +#> +function New-AzSphereDeviceGroup { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(Mandatory)] + [Alias('DeviceGroupName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of device group. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of product. + ${ProductName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Enabled", "Disabled")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Flag to define if the user allows for crash dump collection. + ${AllowCrashDumpsCollection}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Description of the device group. + ${Description}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Retail", "RetailEval")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Operating system feed type of the device group. + ${OSFeedType}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("None", "EU")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Regional data boundary for the device group. + ${RegionalDataBoundary}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("UpdateAll", "No3rdPartyAppUpdates")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Update policy of the device group. + ${UpdatePolicy}, + + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.Sphere.private\New-AzSphereDeviceGroup_CreateExpanded'; + CreateViaJsonFilePath = 'Az.Sphere.private\New-AzSphereDeviceGroup_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.Sphere.private\New-AzSphereDeviceGroup_CreateViaJsonString'; + } + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Sphere/Sphere.Autorest/exports/New-AzSphereImage.ps1 b/src/Sphere/Sphere.Autorest/exports/New-AzSphereImage.ps1 new file mode 100644 index 000000000000..e340ba153480 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/exports/New-AzSphereImage.ps1 @@ -0,0 +1,245 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create a Image +.Description +Create a Image +.Example +$imagefile1 = 'D:\GitHub\azure-powershell\src\Sphere\Sphere.Autorest\test\imagefile\AzureSphereBlink1.imagepackage' +$encf1 = [system.io.file]::ReadAllBytes($imagefile1) +$base64str = [system.convert]::ToBase64String($encf1) +New-AzSphereImage -CatalogName test2024 -ResourceGroupName joyer-test -Name 14a6729e-5819-4737-8713-37b4798533f8 -Image $base64str + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage +.Link +https://learn.microsoft.com/powershell/module/az.sphere/new-azsphereimage +#> +function New-AzSphereImage { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(Mandatory)] + [Alias('ImageName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Image name. + # Use an image GUID for GA versions of the API. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Image as a UTF-8 encoded base 64 string on image create. + # This field contains the image URI on image reads. + ${Image}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Image ID + ${ImageId}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("None", "EU")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Regional data boundary for an image + ${RegionalDataBoundary}, + + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.Sphere.private\New-AzSphereImage_CreateExpanded'; + CreateViaJsonFilePath = 'Az.Sphere.private\New-AzSphereImage_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.Sphere.private\New-AzSphereImage_CreateViaJsonString'; + } + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Sphere/Sphere.Autorest/exports/New-AzSphereProduct.ps1 b/src/Sphere/Sphere.Autorest/exports/New-AzSphereProduct.ps1 new file mode 100644 index 000000000000..cb0524c9f5b9 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/exports/New-AzSphereProduct.ps1 @@ -0,0 +1,229 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create a Product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. +.Description +Create a Product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. +.Example +New-AzSphereProduct -CatalogName test2024 -ResourceGroupName joyer-test -Name product2024 + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct +.Link +https://learn.microsoft.com/powershell/module/az.sphere/new-azsphereproduct +#> +function New-AzSphereProduct { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(Mandatory)] + [Alias('ProductName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of product. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Description of the product + ${Description}, + + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.Sphere.private\New-AzSphereProduct_CreateExpanded'; + CreateViaJsonFilePath = 'Az.Sphere.private\New-AzSphereProduct_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.Sphere.private\New-AzSphereProduct_CreateViaJsonString'; + } + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Sphere/Sphere.Autorest/exports/New-AzSphereProductDefaultDeviceGroup.ps1 b/src/Sphere/Sphere.Autorest/exports/New-AzSphereProductDefaultDeviceGroup.ps1 new file mode 100644 index 000000000000..bf4f88bb0088 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/exports/New-AzSphereProductDefaultDeviceGroup.ps1 @@ -0,0 +1,241 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Generates default device groups for the product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. +.Description +Generates default device groups for the product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. +.Example +New-AzSphereProductDefaultDeviceGroup -CatalogName test2024 -ProductName product0207 -ResourceGroupName joyer-test + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CATALOGINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +INPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://learn.microsoft.com/powershell/module/az.sphere/new-azsphereproductdefaultdevicegroup +#> +function New-AzSphereProductDefaultDeviceGroup { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup])] +[CmdletBinding(DefaultParameterSetName='Generate', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Generate', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(ParameterSetName='Generate', Mandatory)] + [Parameter(ParameterSetName='GenerateViaIdentityCatalog', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of product. + ${ProductName}, + + [Parameter(ParameterSetName='Generate', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Generate')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GenerateViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GenerateViaIdentityCatalog', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${CatalogInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Generate = 'Az.Sphere.private\New-AzSphereProductDefaultDeviceGroup_Generate'; + GenerateViaIdentity = 'Az.Sphere.private\New-AzSphereProductDefaultDeviceGroup_GenerateViaIdentity'; + GenerateViaIdentityCatalog = 'Az.Sphere.private\New-AzSphereProductDefaultDeviceGroup_GenerateViaIdentityCatalog'; + } + if (('Generate') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Sphere/Sphere.Autorest/exports/ProxyCmdletDefinitions.ps1 b/src/Sphere/Sphere.Autorest/exports/ProxyCmdletDefinitions.ps1 new file mode 100644 index 000000000000..916a9165925d --- /dev/null +++ b/src/Sphere/Sphere.Autorest/exports/ProxyCmdletDefinitions.ps1 @@ -0,0 +1,7396 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +List the device groups for the catalog. +.Description +List the device groups for the catalog. +.Example +Get-AzSphereCatalogDeviceGroup -CatalogName test2024 -ResourceGroupName joyer-test + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup +.Link +https://learn.microsoft.com/powershell/module/az.sphere/get-azspherecatalogdevicegroup +#> +function Get-AzSphereCatalogDeviceGroup { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup])] +[CmdletBinding(DefaultParameterSetName='ListExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.String] + # Filter the result list using the given expression + ${Filter}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.Int32] + # The maximum number of result items per page. + ${Maxpagesize}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.Int32] + # The number of result items to skip. + ${Skip}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.Int32] + # The number of result items to return. + ${Top}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Device Group name. + ${DeviceGroupName}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + ListExpanded = 'Az.Sphere.private\Get-AzSphereCatalogDeviceGroup_ListExpanded'; + } + if (('ListExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Lists device insights for catalog. +.Description +Lists device insights for catalog. +.Example +Get-AzSphereCatalogDeviceInsight -CatalogName test2024 -ResourceGroupName joyer-test + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsight +.Link +https://learn.microsoft.com/powershell/module/az.sphere/get-azspherecatalogdeviceinsight +#> +function Get-AzSphereCatalogDeviceInsight { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsight])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.String] + # Filter the result list using the given expression + ${Filter}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.Int32] + # The maximum number of result items per page. + ${Maxpagesize}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.Int32] + # The number of result items to skip. + ${Skip}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.Int32] + # The number of result items to return. + ${Top}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.Sphere.private\Get-AzSphereCatalogDeviceInsight_List'; + } + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Lists devices for catalog. +.Description +Lists devices for catalog. +.Example +Get-AzSphereCatalogDevice -CatalogName test2024 -ResourceGroupName joyer-test + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice +.Link +https://learn.microsoft.com/powershell/module/az.sphere/get-azspherecatalogdevice +#> +function Get-AzSphereCatalogDevice { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.String] + # Filter the result list using the given expression + ${Filter}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.Int32] + # The maximum number of result items per page. + ${Maxpagesize}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.Int32] + # The number of result items to skip. + ${Skip}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.Int32] + # The number of result items to return. + ${Top}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.Sphere.private\Get-AzSphereCatalogDevice_List'; + } + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Get a Catalog +.Description +Get a Catalog +.Example +Get-AzSphereCatalog -ResourceGroupName test-sataneja-10 +.Example +Get-AzSphereCatalog -Name "testcat" -ResourceGroupName "goyedokun" +.Example +Get-AzSphereCatalog + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://learn.microsoft.com/powershell/module/az.sphere/get-azspherecatalog +#> +function Get-AzSphereCatalog { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('CatalogName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Parameter(ParameterSetName='List1')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Sphere.private\Get-AzSphereCatalog_Get'; + GetViaIdentity = 'Az.Sphere.private\Get-AzSphereCatalog_GetViaIdentity'; + List = 'Az.Sphere.private\Get-AzSphereCatalog_List'; + List1 = 'Az.Sphere.private\Get-AzSphereCatalog_List1'; + } + if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Retrieves cert chain. +.Description +Retrieves cert chain. +.Example +Get-AzSphereCertificateCertChain -CatalogName test2024 -ResourceGroupName joyer-test -SerialNumber 'serial number' + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateChainResponse +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CATALOGINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +INPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://learn.microsoft.com/powershell/module/az.sphere/get-azspherecertificatecertchain +#> +function Get-AzSphereCertificateCertChain { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateChainResponse])] +[CmdletBinding(DefaultParameterSetName='Retrieve', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Retrieve', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(ParameterSetName='Retrieve', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Retrieve', Mandatory)] + [Parameter(ParameterSetName='RetrieveViaIdentityCatalog', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Serial number of the certificate. + # Use '.default' to get current active certificate. + ${SerialNumber}, + + [Parameter(ParameterSetName='Retrieve')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='RetrieveViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='RetrieveViaIdentityCatalog', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${CatalogInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Retrieve = 'Az.Sphere.private\Get-AzSphereCertificateCertChain_Retrieve'; + RetrieveViaIdentity = 'Az.Sphere.private\Get-AzSphereCertificateCertChain_RetrieveViaIdentity'; + RetrieveViaIdentityCatalog = 'Az.Sphere.private\Get-AzSphereCertificateCertChain_RetrieveViaIdentityCatalog'; + } + if (('Retrieve') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Gets the proof of possession nonce. +.Description +Gets the proof of possession nonce. +.Example +Get-AzSphereCertificateProof -CatalogName test2024 -ResourceGroupName joyer-test -SerialNumber 'serial number' -ProofOfPossessionNonce proofOfPossessionNonce + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceResponse +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CATALOGINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +INPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://learn.microsoft.com/powershell/module/az.sphere/get-azspherecertificateproof +#> +function Get-AzSphereCertificateProof { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceResponse])] +[CmdletBinding(DefaultParameterSetName='RetrieveExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='RetrieveExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(ParameterSetName='RetrieveExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='RetrieveExpanded', Mandatory)] + [Parameter(ParameterSetName='RetrieveViaIdentityCatalogExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Serial number of the certificate. + # Use '.default' to get current active certificate. + ${SerialNumber}, + + [Parameter(ParameterSetName='RetrieveExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='RetrieveViaIdentityCatalogExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${CatalogInputObject}, + + [Parameter(ParameterSetName='RetrieveViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # The proof of possession nonce + ${ProofOfPossessionNonce}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + RetrieveExpanded = 'Az.Sphere.private\Get-AzSphereCertificateProof_RetrieveExpanded'; + RetrieveViaIdentityCatalogExpanded = 'Az.Sphere.private\Get-AzSphereCertificateProof_RetrieveViaIdentityCatalogExpanded'; + RetrieveViaIdentityExpanded = 'Az.Sphere.private\Get-AzSphereCertificateProof_RetrieveViaIdentityExpanded'; + } + if (('RetrieveExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Get a Certificate +.Description +Get a Certificate +.Example +Get-AzSphereCertificate -CatalogName test2024 -ResourceGroupName joyer-test + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificate +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CATALOGINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +INPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://learn.microsoft.com/powershell/module/az.sphere/get-azspherecertificate +#> +function Get-AzSphereCertificate { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificate])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityCatalog', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Serial number of the certificate. + # Use '.default' to get current active certificate. + ${SerialNumber}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityCatalog', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${CatalogInputObject}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.String] + # Filter the result list using the given expression + ${Filter}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.Int32] + # The maximum number of result items per page. + ${Maxpagesize}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.Int32] + # The number of result items to skip. + ${Skip}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.Int32] + # The number of result items to return. + ${Top}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Sphere.private\Get-AzSphereCertificate_Get'; + GetViaIdentity = 'Az.Sphere.private\Get-AzSphereCertificate_GetViaIdentity'; + GetViaIdentityCatalog = 'Az.Sphere.private\Get-AzSphereCertificate_GetViaIdentityCatalog'; + List = 'Az.Sphere.private\Get-AzSphereCertificate_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Get a Deployment. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. +.Description +Get a Deployment. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. +.Example +Get-AzSphereDeployment -ResourceGroupName joyer-test -DeviceGroupName testdevicegroup -ProductName product2024 -CatalogName test2024 +.Example +Get-AzSphereDeployment -ResourceGroupName joyer-test -DeviceGroupName testdevicegroup -ProductName product2024 -CatalogName test2024 -Name 2e83ddd9-6297-48df-9c2c-2257e6b3cc71 + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CATALOGINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +DEVICEGROUPINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +INPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +PRODUCTINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://learn.microsoft.com/powershell/module/az.sphere/get-azspheredeployment +#> +function Get-AzSphereDeployment { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityCatalog', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityProduct', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of device group. + ${DeviceGroupName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityCatalog', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityDeviceGroup', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityProduct', Mandatory)] + [Alias('DeploymentName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Deployment name. + # Use .default for deployment creation and to get the current deployment for the associated device group. + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityCatalog', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of product. + ${ProductName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityCatalog', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${CatalogInputObject}, + + [Parameter(ParameterSetName='GetViaIdentityDeviceGroup', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${DeviceGroupInputObject}, + + [Parameter(ParameterSetName='GetViaIdentityProduct', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${ProductInputObject}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.String] + # Filter the result list using the given expression + ${Filter}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.Int32] + # The maximum number of result items per page. + ${Maxpagesize}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.Int32] + # The number of result items to skip. + ${Skip}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.Int32] + # The number of result items to return. + ${Top}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Sphere.private\Get-AzSphereDeployment_Get'; + GetViaIdentity = 'Az.Sphere.private\Get-AzSphereDeployment_GetViaIdentity'; + GetViaIdentityCatalog = 'Az.Sphere.private\Get-AzSphereDeployment_GetViaIdentityCatalog'; + GetViaIdentityDeviceGroup = 'Az.Sphere.private\Get-AzSphereDeployment_GetViaIdentityDeviceGroup'; + GetViaIdentityProduct = 'Az.Sphere.private\Get-AzSphereDeployment_GetViaIdentityProduct'; + List = 'Az.Sphere.private\Get-AzSphereDeployment_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Get a DeviceGroup. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. +.Description +Get a DeviceGroup. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. +.Example +Get-AzSphereDeviceGroup -CatalogName NewCatalog -ProductName MyProd815 -ResourceGroupName ps1-test +.Example +Get-AzSphereDeviceGroup -CatalogName NewCatalog -Name Marketing -ProductName MyProd815 -ResourceGroupName ps1-test + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CATALOGINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +INPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +PRODUCTINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://learn.microsoft.com/powershell/module/az.sphere/get-azspheredevicegroup +#> +function Get-AzSphereDeviceGroup { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityCatalog', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityProduct', Mandatory)] + [Alias('DeviceGroupName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of device group. + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityCatalog', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of product. + ${ProductName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityCatalog', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${CatalogInputObject}, + + [Parameter(ParameterSetName='GetViaIdentityProduct', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${ProductInputObject}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.String] + # Filter the result list using the given expression + ${Filter}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.Int32] + # The maximum number of result items per page. + ${Maxpagesize}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.Int32] + # The number of result items to skip. + ${Skip}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.Int32] + # The number of result items to return. + ${Top}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Sphere.private\Get-AzSphereDeviceGroup_Get'; + GetViaIdentity = 'Az.Sphere.private\Get-AzSphereDeviceGroup_GetViaIdentity'; + GetViaIdentityCatalog = 'Az.Sphere.private\Get-AzSphereDeviceGroup_GetViaIdentityCatalog'; + GetViaIdentityProduct = 'Az.Sphere.private\Get-AzSphereDeviceGroup_GetViaIdentityProduct'; + List = 'Az.Sphere.private\Get-AzSphereDeviceGroup_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Get a Device. +Use '.unassigned' or '.default' for the device group and product names when a device does not belong to a device group and product. +.Description +Get a Device. +Use '.unassigned' or '.default' for the device group and product names when a device does not belong to a device group and product. +.Example +Get-AzSphereDevice -CatalogName test2024 -ResourceGroupName "joyer-test" -GroupName testdevicegroup -ProductName product2024 +.Example +Get-AzSphereDevice -CatalogName test2024 -ResourceGroupName "joyer-test" -GroupName testdevicegroup -ProductName product2024 -Name dbb0e0cb8bd961a6129096e1e8a1375ac1fa274f030c08161b37ae3bc5a94f443bdb628cf257bc5bc810d8768c03b6f5ca301a35cd0169f56a49624255964560 + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CATALOGINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +DEVICEGROUPINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +INPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +PRODUCTINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://learn.microsoft.com/powershell/module/az.sphere/get-azspheredevice +#> +function Get-AzSphereDevice { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityCatalog', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityProduct', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Alias('DeviceGroupName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of device group. + ${GroupName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityCatalog', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityDeviceGroup', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityProduct', Mandatory)] + [Alias('DeviceName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Device name + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityCatalog', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of product. + ${ProductName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityCatalog', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${CatalogInputObject}, + + [Parameter(ParameterSetName='GetViaIdentityDeviceGroup', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${DeviceGroupInputObject}, + + [Parameter(ParameterSetName='GetViaIdentityProduct', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${ProductInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Sphere.private\Get-AzSphereDevice_Get'; + GetViaIdentity = 'Az.Sphere.private\Get-AzSphereDevice_GetViaIdentity'; + GetViaIdentityCatalog = 'Az.Sphere.private\Get-AzSphereDevice_GetViaIdentityCatalog'; + GetViaIdentityDeviceGroup = 'Az.Sphere.private\Get-AzSphereDevice_GetViaIdentityDeviceGroup'; + GetViaIdentityProduct = 'Az.Sphere.private\Get-AzSphereDevice_GetViaIdentityProduct'; + List = 'Az.Sphere.private\Get-AzSphereDevice_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Get a Image +.Description +Get a Image +.Example +Get-AzSphereImage -CatalogName MyCatalog1 -ResourceGroupName ResourceGroup1 +.Example +Get-AzSphereImage -CatalogName anotherCatalog -Name 14a6729e-5819-4737-8713-37b4798533f8 -ResourceGroupName Sphere-test + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CATALOGINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +INPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://learn.microsoft.com/powershell/module/az.sphere/get-azsphereimage +#> +function Get-AzSphereImage { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityCatalog', Mandatory)] + [Alias('ImageName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Image name. + # Use an image GUID for GA versions of the API. + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityCatalog', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${CatalogInputObject}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.String] + # Filter the result list using the given expression + ${Filter}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.Int32] + # The maximum number of result items per page. + ${Maxpagesize}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.Int32] + # The number of result items to skip. + ${Skip}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Query')] + [System.Int32] + # The number of result items to return. + ${Top}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Sphere.private\Get-AzSphereImage_Get'; + GetViaIdentity = 'Az.Sphere.private\Get-AzSphereImage_GetViaIdentity'; + GetViaIdentityCatalog = 'Az.Sphere.private\Get-AzSphereImage_GetViaIdentityCatalog'; + List = 'Az.Sphere.private\Get-AzSphereImage_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Get a Product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. +.Description +Get a Product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. +.Example +Get-AzSphereProduct -ResourceGroupName joyer-test -CatalogName test2024 +.Example +Get-AzSphereProduct -ResourceGroupName joyer-test -CatalogName test2024 -Name product2024 + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CATALOGINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +INPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://learn.microsoft.com/powershell/module/az.sphere/get-azsphereproduct +#> +function Get-AzSphereProduct { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityCatalog', Mandatory)] + [Alias('ProductName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of product. + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityCatalog', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${CatalogInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Sphere.private\Get-AzSphereProduct_Get'; + GetViaIdentity = 'Az.Sphere.private\Get-AzSphereProduct_GetViaIdentity'; + GetViaIdentityCatalog = 'Az.Sphere.private\Get-AzSphereProduct_GetViaIdentityCatalog'; + List = 'Az.Sphere.private\Get-AzSphereProduct_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Counts devices in catalog. +.Description +Counts devices in catalog. +.Example +Invoke-AzSphereCountCatalogDevice -CatalogName test2024 -ResourceGroupName joyer-test + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://learn.microsoft.com/powershell/module/az.sphere/invoke-azspherecountcatalogdevice +#> +function Invoke-AzSphereCountCatalogDevice { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse])] +[CmdletBinding(DefaultParameterSetName='CountDevice', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='CountDevice', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(ParameterSetName='CountDevice', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='CountDevice')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='CountDeviceViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CountDevice = 'Az.Sphere.private\Invoke-AzSphereCountCatalogDevice_CountDevice'; + CountDeviceViaIdentity = 'Az.Sphere.private\Invoke-AzSphereCountCatalogDevice_CountDeviceViaIdentity'; + } + if (('CountDevice') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Counts devices in device group. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. +.Description +Counts devices in device group. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. +.Example +Invoke-AzSphereCountDeviceGroupDevice -CatalogName test2024 -ResourceGroupName joyer-test -DeviceGroupName testdevicegroup -ProductName product2024 + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CATALOGINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +INPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +PRODUCTINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://learn.microsoft.com/powershell/module/az.sphere/invoke-azspherecountdevicegroupdevice +#> +function Invoke-AzSphereCountDeviceGroupDevice { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse])] +[CmdletBinding(DefaultParameterSetName='CountDevice', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='CountDevice', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(ParameterSetName='CountDevice', Mandatory)] + [Parameter(ParameterSetName='CountDeviceViaIdentityCatalog', Mandatory)] + [Parameter(ParameterSetName='CountDeviceViaIdentityProduct', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of device group. + ${DeviceGroupName}, + + [Parameter(ParameterSetName='CountDevice', Mandatory)] + [Parameter(ParameterSetName='CountDeviceViaIdentityCatalog', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of product. + ${ProductName}, + + [Parameter(ParameterSetName='CountDevice', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='CountDevice')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='CountDeviceViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='CountDeviceViaIdentityCatalog', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${CatalogInputObject}, + + [Parameter(ParameterSetName='CountDeviceViaIdentityProduct', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${ProductInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CountDevice = 'Az.Sphere.private\Invoke-AzSphereCountDeviceGroupDevice_CountDevice'; + CountDeviceViaIdentity = 'Az.Sphere.private\Invoke-AzSphereCountDeviceGroupDevice_CountDeviceViaIdentity'; + CountDeviceViaIdentityCatalog = 'Az.Sphere.private\Invoke-AzSphereCountDeviceGroupDevice_CountDeviceViaIdentityCatalog'; + CountDeviceViaIdentityProduct = 'Az.Sphere.private\Invoke-AzSphereCountDeviceGroupDevice_CountDeviceViaIdentityProduct'; + } + if (('CountDevice') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Counts devices in product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. +.Description +Counts devices in product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. +.Example +Invoke-AzSphereCountProductDevice -CatalogName test2024 -ResourceGroupName joyer-test -ProductName product2024 + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CATALOGINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +INPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://learn.microsoft.com/powershell/module/az.sphere/invoke-azspherecountproductdevice +#> +function Invoke-AzSphereCountProductDevice { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse])] +[CmdletBinding(DefaultParameterSetName='CountDevice', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='CountDevice', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(ParameterSetName='CountDevice', Mandatory)] + [Parameter(ParameterSetName='CountDeviceViaIdentityCatalog', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of product. + ${ProductName}, + + [Parameter(ParameterSetName='CountDevice', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='CountDevice')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='CountDeviceViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='CountDeviceViaIdentityCatalog', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${CatalogInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CountDevice = 'Az.Sphere.private\Invoke-AzSphereCountProductDevice_CountDevice'; + CountDeviceViaIdentity = 'Az.Sphere.private\Invoke-AzSphereCountProductDevice_CountDeviceViaIdentity'; + CountDeviceViaIdentityCatalog = 'Az.Sphere.private\Invoke-AzSphereCountProductDevice_CountDeviceViaIdentityCatalog'; + } + if (('CountDevice') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create a Catalog +.Description +Create a Catalog +.Example +New-AzSphereCatalog -name test2024 -ResourceGroupName joyer-test -Location global + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog +.Link +https://learn.microsoft.com/powershell/module/az.sphere/new-azspherecatalog +#> +function New-AzSphereCatalog { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Alias('CatalogName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # The geo-location where the resource lives + ${Location}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.Sphere.private\New-AzSphereCatalog_CreateExpanded'; + CreateViaJsonFilePath = 'Az.Sphere.private\New-AzSphereCatalog_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.Sphere.private\New-AzSphereCatalog_CreateViaJsonString'; + } + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create a Deployment. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. +.Description +Create a Deployment. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. +.Example +$image1 = Get-AzSphereImage -Name '14a6729e-5819-4737-8713-37b4798533f8' -CatalogName test2024 -ResourceGroupName joyer-test +New-AzSphereDeployment -Name .default -CatalogName test2024 -DeviceGroupName testdevicegroup -ProductName product2024 -ResourceGroupName joyer-test -DeployedImage $image1 + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +DEPLOYEDIMAGE : Images deployed + [ImageId ]: Image ID + [PropertiesImage ]: Image as a UTF-8 encoded base 64 string on image create. This field contains the image URI on image reads. + [RegionalDataBoundary ]: Regional data boundary for an image +.Link +https://learn.microsoft.com/powershell/module/az.sphere/new-azspheredeployment +#> +function New-AzSphereDeployment { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of device group. + ${DeviceGroupName}, + + [Parameter(Mandatory)] + [Alias('DeploymentName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Deployment name. + # Use .default for deployment creation and to get the current deployment for the associated device group. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of product. + ${ProductName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='CreateExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage[]] + # Images deployed + ${DeployedImage}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Deployment ID + ${DeploymentId}, + + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.Sphere.private\New-AzSphereDeployment_CreateExpanded'; + CreateViaJsonFilePath = 'Az.Sphere.private\New-AzSphereDeployment_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.Sphere.private\New-AzSphereDeployment_CreateViaJsonString'; + } + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Generates the capability image for the device. +Use '.unassigned' or '.default' for the device group and product names to generate the image for a device that does not belong to a specific device group and product. +.Description +Generates the capability image for the device. +Use '.unassigned' or '.default' for the device group and product names to generate the image for a device that does not belong to a specific device group and product. +.Example +New-AzSphereDeviceCapabilityImage -ResourceGroupName joyer-test -CatalogName test2024 -DeviceGroupName testdevicegroup2 -ProductName product2024 -DeviceName DBB0E0CB8BD961A6129096E1E8A1375AC1FA274F030C08161B37AE3BC5A94F443BDB628CF257BC5BC810D8768C03B6F5CA301A35CD0169F56A49624255964560 -Capability 'ApplicationDevelopment' | Format-List + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CATALOGINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +DEVICEGROUPINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +PRODUCTINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://learn.microsoft.com/powershell/module/az.sphere/new-azspheredevicecapabilityimage +#> +function New-AzSphereDeviceCapabilityImage { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse])] +[CmdletBinding(DefaultParameterSetName='GenerateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Device name + ${DeviceName}, + + [Parameter(ParameterSetName='GenerateExpanded', Mandatory)] + [Parameter(ParameterSetName='GenerateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='GenerateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(ParameterSetName='GenerateExpanded', Mandatory)] + [Parameter(ParameterSetName='GenerateViaIdentityCatalogExpanded', Mandatory)] + [Parameter(ParameterSetName='GenerateViaIdentityProductExpanded', Mandatory)] + [Parameter(ParameterSetName='GenerateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='GenerateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of device group. + ${DeviceGroupName}, + + [Parameter(ParameterSetName='GenerateExpanded', Mandatory)] + [Parameter(ParameterSetName='GenerateViaIdentityCatalogExpanded', Mandatory)] + [Parameter(ParameterSetName='GenerateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='GenerateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of product. + ${ProductName}, + + [Parameter(ParameterSetName='GenerateExpanded', Mandatory)] + [Parameter(ParameterSetName='GenerateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='GenerateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='GenerateExpanded')] + [Parameter(ParameterSetName='GenerateViaJsonFilePath')] + [Parameter(ParameterSetName='GenerateViaJsonString')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GenerateViaIdentityCatalogExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${CatalogInputObject}, + + [Parameter(ParameterSetName='GenerateViaIdentityDeviceGroupExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${DeviceGroupInputObject}, + + [Parameter(ParameterSetName='GenerateViaIdentityProductExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${ProductInputObject}, + + [Parameter(ParameterSetName='GenerateExpanded', Mandatory)] + [Parameter(ParameterSetName='GenerateViaIdentityCatalogExpanded', Mandatory)] + [Parameter(ParameterSetName='GenerateViaIdentityDeviceGroupExpanded', Mandatory)] + [Parameter(ParameterSetName='GenerateViaIdentityProductExpanded', Mandatory)] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("ApplicationDevelopment", "FieldServicing")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String[]] + # List of capabilities to create + ${Capability}, + + [Parameter(ParameterSetName='GenerateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Path of Json file supplied to the Generate operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='GenerateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Json string supplied to the Generate operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + GenerateExpanded = 'Az.Sphere.private\New-AzSphereDeviceCapabilityImage_GenerateExpanded'; + GenerateViaIdentityCatalogExpanded = 'Az.Sphere.private\New-AzSphereDeviceCapabilityImage_GenerateViaIdentityCatalogExpanded'; + GenerateViaIdentityDeviceGroupExpanded = 'Az.Sphere.private\New-AzSphereDeviceCapabilityImage_GenerateViaIdentityDeviceGroupExpanded'; + GenerateViaIdentityProductExpanded = 'Az.Sphere.private\New-AzSphereDeviceCapabilityImage_GenerateViaIdentityProductExpanded'; + GenerateViaJsonFilePath = 'Az.Sphere.private\New-AzSphereDeviceCapabilityImage_GenerateViaJsonFilePath'; + GenerateViaJsonString = 'Az.Sphere.private\New-AzSphereDeviceCapabilityImage_GenerateViaJsonString'; + } + if (('GenerateExpanded', 'GenerateViaJsonFilePath', 'GenerateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create a DeviceGroup. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. +.Description +Create a DeviceGroup. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. +.Example +New-AzSphereDeviceGroup -CatalogName anotherCatalog -Name testgroup -ProductName test -ResourceGroupName Sphere-test + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup +.Link +https://learn.microsoft.com/powershell/module/az.sphere/new-azspheredevicegroup +#> +function New-AzSphereDeviceGroup { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(Mandatory)] + [Alias('DeviceGroupName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of device group. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of product. + ${ProductName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Enabled", "Disabled")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Flag to define if the user allows for crash dump collection. + ${AllowCrashDumpsCollection}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Description of the device group. + ${Description}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Retail", "RetailEval")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Operating system feed type of the device group. + ${OSFeedType}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("None", "EU")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Regional data boundary for the device group. + ${RegionalDataBoundary}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("UpdateAll", "No3rdPartyAppUpdates")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Update policy of the device group. + ${UpdatePolicy}, + + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.Sphere.private\New-AzSphereDeviceGroup_CreateExpanded'; + CreateViaJsonFilePath = 'Az.Sphere.private\New-AzSphereDeviceGroup_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.Sphere.private\New-AzSphereDeviceGroup_CreateViaJsonString'; + } + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create a Device. +Use '.unassigned' or '.default' for the device group and product names to claim a device to the catalog only. +.Description +Create a Device. +Use '.unassigned' or '.default' for the device group and product names to claim a device to the catalog only. +.Example +New-AzSphereDevice -CatalogName "anotherNewOne" -GroupName ".default" -Name "45ffd2afe82d77b2b70f1daed2054abc64853a27395c6112d9adaf01047bae5a0caa72219f93db02e1a93f2c159ba2090a783077138e7fa542459621e6091e4c" -ProductName ".default" -ResourceGroupName "goyedokun" + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice +.Link +https://learn.microsoft.com/powershell/module/az.sphere/new-azspheredevice +#> +function New-AzSphereDevice { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(Mandatory)] + [Alias('DeviceGroupName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of device group. + ${GroupName}, + + [Parameter(Mandatory)] + [Alias('DeviceName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Device name + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of product. + ${ProductName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Device ID + ${DeviceId}, + + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.Sphere.private\New-AzSphereDevice_CreateExpanded'; + CreateViaJsonFilePath = 'Az.Sphere.private\New-AzSphereDevice_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.Sphere.private\New-AzSphereDevice_CreateViaJsonString'; + } + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create a Image +.Description +Create a Image +.Example +$imagefile1 = 'D:\GitHub\azure-powershell\src\Sphere\Sphere.Autorest\test\imagefile\AzureSphereBlink1.imagepackage' +$encf1 = [system.io.file]::ReadAllBytes($imagefile1) +$base64str = [system.convert]::ToBase64String($encf1) +New-AzSphereImage -CatalogName test2024 -ResourceGroupName joyer-test -Name 14a6729e-5819-4737-8713-37b4798533f8 -Image $base64str + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage +.Link +https://learn.microsoft.com/powershell/module/az.sphere/new-azsphereimage +#> +function New-AzSphereImage { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(Mandatory)] + [Alias('ImageName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Image name. + # Use an image GUID for GA versions of the API. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Image as a UTF-8 encoded base 64 string on image create. + # This field contains the image URI on image reads. + ${Image}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Image ID + ${ImageId}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("None", "EU")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Regional data boundary for an image + ${RegionalDataBoundary}, + + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.Sphere.private\New-AzSphereImage_CreateExpanded'; + CreateViaJsonFilePath = 'Az.Sphere.private\New-AzSphereImage_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.Sphere.private\New-AzSphereImage_CreateViaJsonString'; + } + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Generates default device groups for the product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. +.Description +Generates default device groups for the product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. +.Example +New-AzSphereProductDefaultDeviceGroup -CatalogName test2024 -ProductName product0207 -ResourceGroupName joyer-test + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CATALOGINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +INPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://learn.microsoft.com/powershell/module/az.sphere/new-azsphereproductdefaultdevicegroup +#> +function New-AzSphereProductDefaultDeviceGroup { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup])] +[CmdletBinding(DefaultParameterSetName='Generate', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Generate', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(ParameterSetName='Generate', Mandatory)] + [Parameter(ParameterSetName='GenerateViaIdentityCatalog', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of product. + ${ProductName}, + + [Parameter(ParameterSetName='Generate', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Generate')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GenerateViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GenerateViaIdentityCatalog', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${CatalogInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Generate = 'Az.Sphere.private\New-AzSphereProductDefaultDeviceGroup_Generate'; + GenerateViaIdentity = 'Az.Sphere.private\New-AzSphereProductDefaultDeviceGroup_GenerateViaIdentity'; + GenerateViaIdentityCatalog = 'Az.Sphere.private\New-AzSphereProductDefaultDeviceGroup_GenerateViaIdentityCatalog'; + } + if (('Generate') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create a Product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. +.Description +Create a Product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. +.Example +New-AzSphereProduct -CatalogName test2024 -ResourceGroupName joyer-test -Name product2024 + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct +.Link +https://learn.microsoft.com/powershell/module/az.sphere/new-azsphereproduct +#> +function New-AzSphereProduct { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(Mandatory)] + [Alias('ProductName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of product. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Description of the product + ${Description}, + + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.Sphere.private\New-AzSphereProduct_CreateExpanded'; + CreateViaJsonFilePath = 'Az.Sphere.private\New-AzSphereProduct_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.Sphere.private\New-AzSphereProduct_CreateViaJsonString'; + } + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Delete a Catalog +.Description +Delete a Catalog +.Example +Remove-AzSphereCatalog -Name test2024 -ResourceGroupName joyer-test + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://learn.microsoft.com/powershell/module/az.sphere/remove-azspherecatalog +#> +function Remove-AzSphereCatalog { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('CatalogName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.Sphere.private\Remove-AzSphereCatalog_Delete'; + DeleteViaIdentity = 'Az.Sphere.private\Remove-AzSphereCatalog_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Delete a DeviceGroup. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. +.Description +Delete a DeviceGroup. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. +.Example +Remove-AzSphereDeviceGroup -CatalogName NewCatalog -Name Marketing -ProductName MyProd129 -ResourceGroupName Sphere-test + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CATALOGINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +INPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +PRODUCTINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://learn.microsoft.com/powershell/module/az.sphere/remove-azspheredevicegroup +#> +function Remove-AzSphereDeviceGroup { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityCatalog', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityProduct', Mandatory)] + [Alias('DeviceGroupName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of device group. + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityCatalog', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of product. + ${ProductName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='DeleteViaIdentityCatalog', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${CatalogInputObject}, + + [Parameter(ParameterSetName='DeleteViaIdentityProduct', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${ProductInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.Sphere.private\Remove-AzSphereDeviceGroup_Delete'; + DeleteViaIdentity = 'Az.Sphere.private\Remove-AzSphereDeviceGroup_DeleteViaIdentity'; + DeleteViaIdentityCatalog = 'Az.Sphere.private\Remove-AzSphereDeviceGroup_DeleteViaIdentityCatalog'; + DeleteViaIdentityProduct = 'Az.Sphere.private\Remove-AzSphereDeviceGroup_DeleteViaIdentityProduct'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Delete a Product. +'.default' and '.unassigned' are system defined values and cannot be used for product name' +.Description +Delete a Product. +'.default' and '.unassigned' are system defined values and cannot be used for product name' +.Example +Remove-AzSphereProduct -CatalogName test2024 -ResourceGroupName joyer-test -Name product2024 + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CATALOGINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +INPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://learn.microsoft.com/powershell/module/az.sphere/remove-azsphereproduct +#> +function Remove-AzSphereProduct { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityCatalog', Mandatory)] + [Alias('ProductName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of product. + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='DeleteViaIdentityCatalog', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${CatalogInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.Sphere.private\Remove-AzSphereProduct_Delete'; + DeleteViaIdentity = 'Az.Sphere.private\Remove-AzSphereProduct_DeleteViaIdentity'; + DeleteViaIdentityCatalog = 'Az.Sphere.private\Remove-AzSphereProduct_DeleteViaIdentityCatalog'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Update a Catalog +.Description +Update a Catalog +.Example +Update-AzSphereCatalog -Name test2024 -ResourceGroupName joyer-test -Tag @{"123"="abc"} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://learn.microsoft.com/powershell/module/az.sphere/update-azspherecatalog +#> +function Update-AzSphereCatalog { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Alias('CatalogName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] + [Parameter(ParameterSetName='UpdateViaJsonString')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogUpdateTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.Sphere.private\Update-AzSphereCatalog_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.Sphere.private\Update-AzSphereCatalog_UpdateViaIdentityExpanded'; + UpdateViaJsonFilePath = 'Az.Sphere.private\Update-AzSphereCatalog_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.Sphere.private\Update-AzSphereCatalog_UpdateViaJsonString'; + } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Update a DeviceGroup. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. +.Description +Update a DeviceGroup. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. +.Example +Update-AzSphereDeviceGroup -ResourceGroupName joyer-test -CatalogName test2024 -ProductName product2024 -Name testdevicegroup -Description test + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CATALOGINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +INPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +PRODUCTINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://learn.microsoft.com/powershell/module/az.sphere/update-azspheredevicegroup +#> +function Update-AzSphereDeviceGroup { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityCatalogExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityProductExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Alias('DeviceGroupName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of device group. + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityCatalogExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of product. + ${ProductName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] + [Parameter(ParameterSetName='UpdateViaJsonString')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityCatalogExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${CatalogInputObject}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='UpdateViaIdentityProductExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${ProductInputObject}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityCatalogExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityProductExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Enabled", "Disabled")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Flag to define if the user allows for crash dump collection. + ${AllowCrashDumpsCollection}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityCatalogExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityProductExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Description of the device group. + ${Description}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityCatalogExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityProductExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Retail", "RetailEval")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Operating system feed type of the device group. + ${OSFeedType}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityCatalogExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityProductExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("None", "EU")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Regional data boundary for the device group. + ${RegionalDataBoundary}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityCatalogExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityProductExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("UpdateAll", "No3rdPartyAppUpdates")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Update policy of the device group. + ${UpdatePolicy}, + + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.Sphere.private\Update-AzSphereDeviceGroup_UpdateExpanded'; + UpdateViaIdentityCatalogExpanded = 'Az.Sphere.private\Update-AzSphereDeviceGroup_UpdateViaIdentityCatalogExpanded'; + UpdateViaIdentityExpanded = 'Az.Sphere.private\Update-AzSphereDeviceGroup_UpdateViaIdentityExpanded'; + UpdateViaIdentityProductExpanded = 'Az.Sphere.private\Update-AzSphereDeviceGroup_UpdateViaIdentityProductExpanded'; + UpdateViaJsonFilePath = 'Az.Sphere.private\Update-AzSphereDeviceGroup_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.Sphere.private\Update-AzSphereDeviceGroup_UpdateViaJsonString'; + } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Update a Device. +Use '.unassigned' or '.default' for the device group and product names to move a device to the catalog level. +.Description +Update a Device. +Use '.unassigned' or '.default' for the device group and product names to move a device to the catalog level. +.Example +Update-AzSphereDevice -ResourceGroupName joyer-test -CatalogName test2024 -GroupName testdevicegroup -ProductName product2024 -Name DBB0E0CB8BD961A6129096E1E8A1375AC1FA274F030C08161B37AE3BC5A94F443BDB628CF257BC5BC810D8768C03B6F5CA301A35CD0169F56A49624255964560 -DeviceGroupId /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024/products/product2024/deviceGroups/testdevicegroup2 +.Example +Update-AzSphereDevice -ResourceGroupName joyer-test -CatalogName test2024 -GroupName testdevicegroup -ProductName product2024 -Name DBB0E0CB8BD961A6129096E1E8A1375AC1FA274F030C08161B37AE3BC5A94F443BDB628CF257BC5BC810D8768C03B6F5CA301A35CD0169F56A49624255964560 -DeviceGroupId /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024/products/.default/deviceGroups/.default + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CATALOGINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +DEVICEGROUPINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +INPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +PRODUCTINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://learn.microsoft.com/powershell/module/az.sphere/update-azspheredevice +#> +function Update-AzSphereDevice { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityCatalogExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityProductExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Alias('DeviceGroupName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of device group. + ${GroupName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityCatalogExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityDeviceGroupExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityProductExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Alias('DeviceName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Device name + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityCatalogExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of product. + ${ProductName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] + [Parameter(ParameterSetName='UpdateViaJsonString')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityCatalogExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${CatalogInputObject}, + + [Parameter(ParameterSetName='UpdateViaIdentityDeviceGroupExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${DeviceGroupInputObject}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='UpdateViaIdentityProductExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${ProductInputObject}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityCatalogExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityDeviceGroupExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityProductExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Device group id + ${DeviceGroupId}, + + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.Sphere.private\Update-AzSphereDevice_UpdateExpanded'; + UpdateViaIdentityCatalogExpanded = 'Az.Sphere.private\Update-AzSphereDevice_UpdateViaIdentityCatalogExpanded'; + UpdateViaIdentityDeviceGroupExpanded = 'Az.Sphere.private\Update-AzSphereDevice_UpdateViaIdentityDeviceGroupExpanded'; + UpdateViaIdentityExpanded = 'Az.Sphere.private\Update-AzSphereDevice_UpdateViaIdentityExpanded'; + UpdateViaIdentityProductExpanded = 'Az.Sphere.private\Update-AzSphereDevice_UpdateViaIdentityProductExpanded'; + UpdateViaJsonFilePath = 'Az.Sphere.private\Update-AzSphereDevice_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.Sphere.private\Update-AzSphereDevice_UpdateViaJsonString'; + } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Update a Product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. +.Description +Update a Product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. +.Example +Update-AzSphereProduct -ResourceGroupName joyer-test -CatalogName test2024 -Name product2024 -Description 2222 + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CATALOGINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +INPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://learn.microsoft.com/powershell/module/az.sphere/update-azsphereproduct +#> +function Update-AzSphereProduct { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityCatalogExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Alias('ProductName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of product. + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] + [Parameter(ParameterSetName='UpdateViaJsonString')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityCatalogExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${CatalogInputObject}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityCatalogExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Description of the product + ${Description}, + + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.Sphere.private\Update-AzSphereProduct_UpdateExpanded'; + UpdateViaIdentityCatalogExpanded = 'Az.Sphere.private\Update-AzSphereProduct_UpdateViaIdentityCatalogExpanded'; + UpdateViaIdentityExpanded = 'Az.Sphere.private\Update-AzSphereProduct_UpdateViaIdentityExpanded'; + UpdateViaJsonFilePath = 'Az.Sphere.private\Update-AzSphereProduct_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.Sphere.private\Update-AzSphereProduct_UpdateViaJsonString'; + } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Sphere/Sphere.Autorest/exports/README.md b/src/Sphere/Sphere.Autorest/exports/README.md new file mode 100644 index 000000000000..d06b309a9cc9 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/exports/README.md @@ -0,0 +1,20 @@ +# Exports +This directory contains the cmdlets *exported by* `Az.Sphere`. No other cmdlets in this repository are directly exported. What that means is the `Az.Sphere` module will run [Export-ModuleMember](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/export-modulemember) on the cmldets in this directory. The cmdlets in this directory are generated at **build-time**. Do not put any custom code, files, cmdlets, etc. into this directory. Please use `..\custom` for all custom implementation. + +## Info +- Modifiable: no +- Generated: all +- Committed: no +- Packaged: yes + +## Details +The cmdlets generated here are created every time you run `build-module.ps1`. These cmdlets are a merge of all (excluding `InternalExport`) cmdlets from the private binary (`..\bin\Az.Sphere.private.dll`) and from the `..\custom\Az.Sphere.custom.psm1` module. Cmdlets that are *not merged* from those directories are decorated with the `InternalExport` attribute. This happens when you set the cmdlet to **hide** from configuration. For more information on hiding, see [cmdlet hiding](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md#cmdlet-hiding-exportation-suppression) or the [README.md](..\internal/README.md) in the `..\internal` folder. + +## Purpose +We generate script cmdlets out of the binary cmdlets and custom cmdlets. The format of script cmdlets are simplistic; thus, easier to generate at build time. Generating the cmdlets is required as to allow merging of generated binary, hand-written binary, and hand-written custom cmdlets. For Azure cmdlets, having script cmdlets simplifies the mechanism for exporting Azure profiles. + +## Structure +The cmdlets generated here will flat in the directory (no sub-folders) as long as there are no Azure profiles specified for any cmdlets. Azure profiles (the `Profiles` attribute) is only applied when generating with the `--azure` attribute (or `azure: true` in the configuration). When Azure profiles are applied, the folder structure has a folder per profile. Each profile folder has only those cmdlets that apply to that profile. + +## Usage +When `./Az.Sphere.psm1` is loaded, it dynamically exports cmdlets here based on the folder structure and on the selected profile. If there are no sub-folders, it exports all cmdlets at the root of this folder. If there are sub-folders, it checks to see the selected profile. If no profile is selected, it exports the cmdlets in the last sub-folder (alphabetically). If a profile is selected, it exports the cmdlets in the sub-folder that matches the profile name. If there is no sub-folder that matches the profile name, it exports no cmdlets and writes a warning message. \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/exports/Remove-AzSphereCatalog.ps1 b/src/Sphere/Sphere.Autorest/exports/Remove-AzSphereCatalog.ps1 new file mode 100644 index 000000000000..c301af87baef --- /dev/null +++ b/src/Sphere/Sphere.Autorest/exports/Remove-AzSphereCatalog.ps1 @@ -0,0 +1,232 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Delete a Catalog +.Description +Delete a Catalog +.Example +Remove-AzSphereCatalog -Name test2024 -ResourceGroupName joyer-test + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://learn.microsoft.com/powershell/module/az.sphere/remove-azspherecatalog +#> +function Remove-AzSphereCatalog { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('CatalogName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.Sphere.private\Remove-AzSphereCatalog_Delete'; + DeleteViaIdentity = 'Az.Sphere.private\Remove-AzSphereCatalog_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Sphere/Sphere.Autorest/exports/Remove-AzSphereDeviceGroup.ps1 b/src/Sphere/Sphere.Autorest/exports/Remove-AzSphereDeviceGroup.ps1 new file mode 100644 index 000000000000..caaa32e8548c --- /dev/null +++ b/src/Sphere/Sphere.Autorest/exports/Remove-AzSphereDeviceGroup.ps1 @@ -0,0 +1,287 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Delete a DeviceGroup. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. +.Description +Delete a DeviceGroup. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. +.Example +Remove-AzSphereDeviceGroup -CatalogName NewCatalog -Name Marketing -ProductName MyProd129 -ResourceGroupName Sphere-test + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CATALOGINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +INPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +PRODUCTINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://learn.microsoft.com/powershell/module/az.sphere/remove-azspheredevicegroup +#> +function Remove-AzSphereDeviceGroup { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityCatalog', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityProduct', Mandatory)] + [Alias('DeviceGroupName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of device group. + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityCatalog', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of product. + ${ProductName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='DeleteViaIdentityCatalog', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${CatalogInputObject}, + + [Parameter(ParameterSetName='DeleteViaIdentityProduct', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${ProductInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.Sphere.private\Remove-AzSphereDeviceGroup_Delete'; + DeleteViaIdentity = 'Az.Sphere.private\Remove-AzSphereDeviceGroup_DeleteViaIdentity'; + DeleteViaIdentityCatalog = 'Az.Sphere.private\Remove-AzSphereDeviceGroup_DeleteViaIdentityCatalog'; + DeleteViaIdentityProduct = 'Az.Sphere.private\Remove-AzSphereDeviceGroup_DeleteViaIdentityProduct'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Sphere/Sphere.Autorest/exports/Remove-AzSphereProduct.ps1 b/src/Sphere/Sphere.Autorest/exports/Remove-AzSphereProduct.ps1 new file mode 100644 index 000000000000..6ce7e20c5f8c --- /dev/null +++ b/src/Sphere/Sphere.Autorest/exports/Remove-AzSphereProduct.ps1 @@ -0,0 +1,260 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Delete a Product. +'.default' and '.unassigned' are system defined values and cannot be used for product name' +.Description +Delete a Product. +'.default' and '.unassigned' are system defined values and cannot be used for product name' +.Example +Remove-AzSphereProduct -CatalogName test2024 -ResourceGroupName joyer-test -Name product2024 + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CATALOGINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +INPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://learn.microsoft.com/powershell/module/az.sphere/remove-azsphereproduct +#> +function Remove-AzSphereProduct { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityCatalog', Mandatory)] + [Alias('ProductName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of product. + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='DeleteViaIdentityCatalog', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${CatalogInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.Sphere.private\Remove-AzSphereProduct_Delete'; + DeleteViaIdentity = 'Az.Sphere.private\Remove-AzSphereProduct_DeleteViaIdentity'; + DeleteViaIdentityCatalog = 'Az.Sphere.private\Remove-AzSphereProduct_DeleteViaIdentityCatalog'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Sphere/Sphere.Autorest/exports/Update-AzSphereCatalog.ps1 b/src/Sphere/Sphere.Autorest/exports/Update-AzSphereCatalog.ps1 new file mode 100644 index 000000000000..96d8b27d9b53 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/exports/Update-AzSphereCatalog.ps1 @@ -0,0 +1,242 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Update a Catalog +.Description +Update a Catalog +.Example +Update-AzSphereCatalog -Name test2024 -ResourceGroupName joyer-test -Tag @{"123"="abc"} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://learn.microsoft.com/powershell/module/az.sphere/update-azspherecatalog +#> +function Update-AzSphereCatalog { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Alias('CatalogName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] + [Parameter(ParameterSetName='UpdateViaJsonString')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogUpdateTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.Sphere.private\Update-AzSphereCatalog_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.Sphere.private\Update-AzSphereCatalog_UpdateViaIdentityExpanded'; + UpdateViaJsonFilePath = 'Az.Sphere.private\Update-AzSphereCatalog_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.Sphere.private\Update-AzSphereCatalog_UpdateViaJsonString'; + } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Sphere/Sphere.Autorest/exports/Update-AzSphereDevice.ps1 b/src/Sphere/Sphere.Autorest/exports/Update-AzSphereDevice.ps1 new file mode 100644 index 000000000000..864f46d3c8c9 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/exports/Update-AzSphereDevice.ps1 @@ -0,0 +1,348 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Update a Device. +Use '.unassigned' or '.default' for the device group and product names to move a device to the catalog level. +.Description +Update a Device. +Use '.unassigned' or '.default' for the device group and product names to move a device to the catalog level. +.Example +Update-AzSphereDevice -ResourceGroupName joyer-test -CatalogName test2024 -GroupName testdevicegroup -ProductName product2024 -Name DBB0E0CB8BD961A6129096E1E8A1375AC1FA274F030C08161B37AE3BC5A94F443BDB628CF257BC5BC810D8768C03B6F5CA301A35CD0169F56A49624255964560 -DeviceGroupId /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024/products/product2024/deviceGroups/testdevicegroup2 +.Example +Update-AzSphereDevice -ResourceGroupName joyer-test -CatalogName test2024 -GroupName testdevicegroup -ProductName product2024 -Name DBB0E0CB8BD961A6129096E1E8A1375AC1FA274F030C08161B37AE3BC5A94F443BDB628CF257BC5BC810D8768C03B6F5CA301A35CD0169F56A49624255964560 -DeviceGroupId /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024/products/.default/deviceGroups/.default + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CATALOGINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +DEVICEGROUPINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +INPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +PRODUCTINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://learn.microsoft.com/powershell/module/az.sphere/update-azspheredevice +#> +function Update-AzSphereDevice { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityCatalogExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityProductExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Alias('DeviceGroupName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of device group. + ${GroupName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityCatalogExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityDeviceGroupExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityProductExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Alias('DeviceName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Device name + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityCatalogExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of product. + ${ProductName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] + [Parameter(ParameterSetName='UpdateViaJsonString')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityCatalogExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${CatalogInputObject}, + + [Parameter(ParameterSetName='UpdateViaIdentityDeviceGroupExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${DeviceGroupInputObject}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='UpdateViaIdentityProductExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${ProductInputObject}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityCatalogExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityDeviceGroupExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityProductExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Device group id + ${DeviceGroupId}, + + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.Sphere.private\Update-AzSphereDevice_UpdateExpanded'; + UpdateViaIdentityCatalogExpanded = 'Az.Sphere.private\Update-AzSphereDevice_UpdateViaIdentityCatalogExpanded'; + UpdateViaIdentityDeviceGroupExpanded = 'Az.Sphere.private\Update-AzSphereDevice_UpdateViaIdentityDeviceGroupExpanded'; + UpdateViaIdentityExpanded = 'Az.Sphere.private\Update-AzSphereDevice_UpdateViaIdentityExpanded'; + UpdateViaIdentityProductExpanded = 'Az.Sphere.private\Update-AzSphereDevice_UpdateViaIdentityProductExpanded'; + UpdateViaJsonFilePath = 'Az.Sphere.private\Update-AzSphereDevice_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.Sphere.private\Update-AzSphereDevice_UpdateViaJsonString'; + } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Sphere/Sphere.Autorest/exports/Update-AzSphereDeviceGroup.ps1 b/src/Sphere/Sphere.Autorest/exports/Update-AzSphereDeviceGroup.ps1 new file mode 100644 index 000000000000..04f53a57c7f1 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/exports/Update-AzSphereDeviceGroup.ps1 @@ -0,0 +1,354 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Update a DeviceGroup. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. +.Description +Update a DeviceGroup. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. +.Example +Update-AzSphereDeviceGroup -ResourceGroupName joyer-test -CatalogName test2024 -ProductName product2024 -Name testdevicegroup -Description test + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CATALOGINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +INPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +PRODUCTINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://learn.microsoft.com/powershell/module/az.sphere/update-azspheredevicegroup +#> +function Update-AzSphereDeviceGroup { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityCatalogExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityProductExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Alias('DeviceGroupName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of device group. + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityCatalogExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of product. + ${ProductName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] + [Parameter(ParameterSetName='UpdateViaJsonString')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityCatalogExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${CatalogInputObject}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='UpdateViaIdentityProductExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${ProductInputObject}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityCatalogExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityProductExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Enabled", "Disabled")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Flag to define if the user allows for crash dump collection. + ${AllowCrashDumpsCollection}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityCatalogExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityProductExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Description of the device group. + ${Description}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityCatalogExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityProductExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Retail", "RetailEval")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Operating system feed type of the device group. + ${OSFeedType}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityCatalogExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityProductExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("None", "EU")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Regional data boundary for the device group. + ${RegionalDataBoundary}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityCatalogExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityProductExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("UpdateAll", "No3rdPartyAppUpdates")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Update policy of the device group. + ${UpdatePolicy}, + + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.Sphere.private\Update-AzSphereDeviceGroup_UpdateExpanded'; + UpdateViaIdentityCatalogExpanded = 'Az.Sphere.private\Update-AzSphereDeviceGroup_UpdateViaIdentityCatalogExpanded'; + UpdateViaIdentityExpanded = 'Az.Sphere.private\Update-AzSphereDeviceGroup_UpdateViaIdentityExpanded'; + UpdateViaIdentityProductExpanded = 'Az.Sphere.private\Update-AzSphereDeviceGroup_UpdateViaIdentityProductExpanded'; + UpdateViaJsonFilePath = 'Az.Sphere.private\Update-AzSphereDeviceGroup_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.Sphere.private\Update-AzSphereDeviceGroup_UpdateViaJsonString'; + } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Sphere/Sphere.Autorest/exports/Update-AzSphereProduct.ps1 b/src/Sphere/Sphere.Autorest/exports/Update-AzSphereProduct.ps1 new file mode 100644 index 000000000000..d435f6375671 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/exports/Update-AzSphereProduct.ps1 @@ -0,0 +1,284 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Update a Product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. +.Description +Update a Product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. +.Example +Update-AzSphereProduct -ResourceGroupName joyer-test -CatalogName test2024 -Name product2024 -Description 2222 + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CATALOGINPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. + +INPUTOBJECT : Identity Parameter + [CatalogName ]: Name of catalog + [DeploymentName ]: Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + [DeviceGroupName ]: Name of device group. + [DeviceName ]: Device name + [Id ]: Resource identity path + [ImageName ]: Image name. Use an image GUID for GA versions of the API. + [ProductName ]: Name of product. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SerialNumber ]: Serial number of the certificate. Use '.default' to get current active certificate. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://learn.microsoft.com/powershell/module/az.sphere/update-azsphereproduct +#> +function Update-AzSphereProduct { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityCatalogExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Alias('ProductName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of product. + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] + [Parameter(ParameterSetName='UpdateViaJsonString')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityCatalogExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${CatalogInputObject}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityCatalogExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Description of the product + ${Description}, + + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.Sphere.private\Update-AzSphereProduct_UpdateExpanded'; + UpdateViaIdentityCatalogExpanded = 'Az.Sphere.private\Update-AzSphereProduct_UpdateViaIdentityCatalogExpanded'; + UpdateViaIdentityExpanded = 'Az.Sphere.private\Update-AzSphereProduct_UpdateViaIdentityExpanded'; + UpdateViaJsonFilePath = 'Az.Sphere.private\Update-AzSphereProduct_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.Sphere.private\Update-AzSphereProduct_UpdateViaJsonString'; + } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Sphere/Sphere.Autorest/generate-help.ps1 b/src/Sphere/Sphere.Autorest/generate-help.ps1 new file mode 100644 index 000000000000..c669bb173232 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generate-help.ps1 @@ -0,0 +1,74 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- +param([switch]$NotIsolated) +$ErrorActionPreference = 'Stop' + +$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path +if(-not $NotIsolated) { + Write-Host -ForegroundColor Green 'Creating isolated process...' + & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated + return +} + +$exportsFolder = Join-Path $PSScriptRoot 'exports' +if(-not (Test-Path $exportsFolder)) { + Write-Error "Exports folder '$exportsFolder' was not found." +} + +$directories = Get-ChildItem -Directory -Path $exportsFolder +$hasProfiles = ($directories | Measure-Object).Count -gt 0 +if(-not $hasProfiles) { + $directories = Get-Item -Path $exportsFolder +} + +$docsFolder = Join-Path $PSScriptRoot 'docs' +if(Test-Path $docsFolder) { + $null = Get-ChildItem -Path $docsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue +} +$null = New-Item -ItemType Directory -Force -Path $docsFolder -ErrorAction SilentlyContinue +$examplesFolder = Join-Path $PSScriptRoot 'examples' + +$modulePsd1 = Get-Item -Path (Join-Path $PSScriptRoot './Az.Sphere.psd1') +$modulePath = $modulePsd1.FullName +$moduleName = $modulePsd1.BaseName + +# Load DLL to use build-time cmdlets +Import-Module -Name $modulePath +Import-Module -Name (Join-Path $PSScriptRoot './bin/Az.Sphere.private.dll') +$instance = [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module]::Instance +# Module info is shared per profile +$moduleInfo = Get-Module -Name $moduleName + +foreach($directory in $directories) +{ + if($hasProfiles) { + Select-AzProfile -Name $directory.Name + } + # Reload module per profile + Import-Module -Name $modulePath -Force + + $cmdletNames = Get-ScriptCmdlet -ScriptFolder $directory.FullName + $cmdletHelpInfo = $cmdletNames | ForEach-Object { Get-Help -Name $_ -Full } + $cmdletFunctionInfo = Get-ScriptCmdlet -ScriptFolder $directory.FullName -AsFunctionInfo + + $docsPath = Join-Path $docsFolder $directory.Name + $null = New-Item -ItemType Directory -Force -Path $docsPath -ErrorAction SilentlyContinue + $examplesPath = Join-Path $examplesFolder $directory.Name + $addComplexInterfaceInfo = ![System.Convert]::ToBoolean('true') + Export-HelpMarkdown -ModuleInfo $moduleInfo -FunctionInfo $cmdletFunctionInfo -HelpInfo $cmdletHelpInfo -DocsFolder $docsPath -ExamplesFolder $examplesPath -AddComplexInterfaceInfo:$addComplexInterfaceInfo + Write-Host -ForegroundColor Green "Created documentation in '$docsPath'" +} + +Write-Host -ForegroundColor Green '-------------Done-------------' \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generate-portal-ux.ps1 b/src/Sphere/Sphere.Autorest/generate-portal-ux.ps1 new file mode 100644 index 000000000000..1953ce043ad8 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generate-portal-ux.ps1 @@ -0,0 +1,374 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# +# This Script will create a folder dedicated to Azure-specific content and includes metadata files essential for enhancing the user experience (UX) within the Azure portal. +# These files are utilized by the Azure portal to effectively present the usage of cmdlets related to specific resources on portal pages. +# ---------------------------------------------------------------------------------- +param([switch]$NotIsolated) +$ErrorActionPreference = 'Stop' + +$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path +if(-not $NotIsolated) { + Write-Host -ForegroundColor Green 'Creating isolated process...' + & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated + return +} + +$moduleName = 'Az.Sphere' +$rootModuleName = '' +if ($rootModuleName -eq "") +{ + $rootModuleName = $moduleName +} +$modulePsd1 = Get-Item -Path (Join-Path $PSScriptRoot "./$moduleName.psd1") +$modulePath = $modulePsd1.FullName + +# Load DLL to use build-time cmdlets +Import-Module -Name $modulePath +Import-Module -Name (Join-Path $PSScriptRoot "./bin/$moduleName.private.dll") +$instance = [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module]::Instance +# Module info is shared per profile +$moduleInfo = Get-Module -Name $moduleName +$parameterSetsInfo = Get-Module -Name "$moduleName.private" + +function Test-FunctionSupported() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [string] + $FunctionName + ) + + If (-not $FunctionName.Contains("_")) { + return $false + } + + $cmdletName, $parameterSetName = $FunctionName.Split("_") + If ($parameterSetName.Contains("List") -or $parameterSetName.Contains("ViaIdentity") -or $parameterSetName.Contains("ViaJson")) { + return $false + } + If ($cmdletName.StartsWith("New") -or $cmdletName.StartsWith("Set") -or $cmdletName.StartsWith("Update")) { + return $false + } + + $parameterSetInfo = $parameterSetsInfo.ExportedCmdlets[$FunctionName] + foreach ($parameterInfo in $parameterSetInfo.Parameters.Values) + { + $category = (Get-ParameterAttribute -ParameterInfo $parameterInfo -AttributeName "CategoryAttribute").Categories + $invalideCategory = @('Query', 'Body') + if ($invalideCategory -contains $category) + { + return $false + } + } + + $customFiles = Get-ChildItem -Path custom -Filter "$cmdletName.*" + if ($customFiles.Length -ne 0) + { + Write-Host -ForegroundColor Yellow "There are come custom files for $cmdletName, skip generate UX data for it." + return $false + } + + return $true +} + +function Get-MappedCmdletFromFunctionName() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [string] + $FunctionName + ) + + $cmdletName, $parameterSetName = $FunctionName.Split("_") + + return $cmdletName +} + +function Get-ParameterAttribute() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.ParameterMetadata] + $ParameterInfo, + [Parameter()] + [String] + $AttributeName + ) + return $ParameterInfo.Attributes | Where-Object { $_.TypeId.Name -eq $AttributeName } +} + +function Get-CmdletAttribute() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.CommandInfo] + $CmdletInfo, + [Parameter()] + [String] + $AttributeName + ) + + return $CmdletInfo.ImplementingType.GetTypeInfo().GetCustomAttributes([System.object], $true) | Where-Object { $_.TypeId.Name -eq $AttributeName } +} + +function Get-CmdletDescription() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [String] + $CmdletName + ) + $helpInfo = Get-Help $CmdletName -Full + + $description = $helpInfo.Description.Text + if ($null -eq $description) + { + return "" + } + return $description +} + +# Test whether the parameter is from swagger http path +function Test-ParameterFromSwagger() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.ParameterMetadata] + $ParameterInfo + ) + $category = (Get-ParameterAttribute -ParameterInfo $ParameterInfo -AttributeName "CategoryAttribute").Categories + $doNotExport = Get-ParameterAttribute -ParameterInfo $ParameterInfo -AttributeName "DoNotExportAttribute" + if ($null -ne $doNotExport) + { + return $false + } + + $valideCategory = @('Path') + if ($valideCategory -contains $category) + { + return $true + } + return $false +} + +function New-ExampleForParameterSet() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.CommandInfo] + $ParameterSetInfo + ) + $parameters = $ParameterSetInfo.Parameters.Values | Where-Object { Test-ParameterFromSwagger $_ } + $result = @() + foreach ($parameter in $parameters) + { + $category = (Get-ParameterAttribute -parameterInfo $parameter -AttributeName "CategoryAttribute").Categories + $sourceName = (Get-ParameterAttribute -parameterInfo $parameter -AttributeName "InfoAttribute").SerializedName + $name = $parameter.Name + $result += [ordered]@{ + name = "-$Name" + value = "[$category.$sourceName]" + } + } + + return $result +} + +function New-ParameterArrayInParameterSet() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.CommandInfo] + $ParameterSetInfo + ) + $parameters = $ParameterSetInfo.Parameters.Values | Where-Object { Test-ParameterFromSwagger $_ } + $result = @() + foreach ($parameter in $parameters) + { + $isMandatory = (Get-ParameterAttribute -parameterInfo $parameter -AttributeName "ParameterAttribute").Mandatory + $parameterName = $parameter.Name + $parameterType = $parameter.ParameterType.ToString().Split('.')[1] + if ($parameter.SwitchParameter) + { + $parameterSignature = "-$parameterName" + } + else + { + $parameterSignature = "-$parameterName <$parameterType>" + } + if ($parameterName -eq "SubscriptionId") + { + $isMandatory = $false + } + if (-not $isMandatory) + { + $parameterSignature = "[$parameterSignature]" + } + $result += $parameterSignature + } + + return $result +} + +function New-MetadataForParameterSet() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.CommandInfo] + $ParameterSetInfo + ) + $httpAttribute = Get-CmdletAttribute -CmdletInfo $ParameterSetInfo -AttributeName "HttpPathAttribute" + $httpPath = $httpAttribute.Path + $apiVersion = $httpAttribute.ApiVersion + $provider = [System.Text.RegularExpressions.Regex]::New("/providers/([\w+\.]+)/").Match($httpPath).Groups[1].Value + $resourcePath = "/" + $httpPath.Split("$provider/")[1] + $resourceType = [System.Text.RegularExpressions.Regex]::New("/([\w]+)/\{\w+\}").Matches($resourcePath) | ForEach-Object {$_.groups[1].Value} | Join-String -Separator "/" + $cmdletName = Get-MappedCmdletFromFunctionName $ParameterSetInfo.Name + $description = (Get-CmdletAttribute -CmdletInfo $ParameterSetInfo -AttributeName "DescriptionAttribute").Description + [object[]]$example = New-ExampleForParameterSet $ParameterSetInfo + [string[]]$signature = New-ParameterArrayInParameterSet $ParameterSetInfo + + return @{ + Path = $httpPath + Provider = $provider + ResourceType = $resourceType + ApiVersion = $apiVersion + CmdletName = $cmdletName + Description = $description + Example = $example + Signature = @{ + parameters = $signature + } + } +} + +function Merge-WithExistCmdletMetadata() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Collections.Specialized.OrderedDictionary] + $ExistedCmdletInfo, + [Parameter()] + [Hashtable] + $ParameterSetMetadata + ) + $ExistedCmdletInfo.help.parameterSets += $ParameterSetMetadata.Signature + $ExistedCmdletInfo.examples += [ordered]@{ + description = $ParameterSetMetadata.Description + parameters = $ParameterSetMetadata.Example + } + + return $ExistedCmdletInfo +} + +function New-MetadataForCmdlet() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [Hashtable] + $ParameterSetMetadata + ) + $cmdletName = $ParameterSetMetadata.CmdletName + $description = Get-CmdletDescription $cmdletName + $result = [ordered]@{ + name = $cmdletName + description = $description + path = $ParameterSetMetadata.Path + help = [ordered]@{ + learnMore = [ordered]@{ + url = "https://learn.microsoft.com/powershell/module/$rootModuleName/$cmdletName".ToLower() + } + parameterSets = @() + } + examples = @() + } + $result = Merge-WithExistCmdletMetadata -ExistedCmdletInfo $result -ParameterSetMetadata $ParameterSetMetadata + return $result +} + +$parameterSets = $parameterSetsInfo.ExportedCmdlets.Keys | Where-Object { Test-FunctionSupported($_) } +$resourceTypes = @{} +foreach ($parameterSetName in $parameterSets) +{ + $cmdletInfo = $parameterSetsInfo.ExportedCommands[$parameterSetName] + $parameterSetMetadata = New-MetadataForParameterSet -ParameterSetInfo $cmdletInfo + $cmdletName = $parameterSetMetadata.CmdletName + if (-not ($moduleInfo.ExportedCommands.ContainsKey($cmdletName))) + { + continue + } + if ($resourceTypes.ContainsKey($parameterSetMetadata.ResourceType)) + { + $ExistedCmdletInfo = $resourceTypes[$parameterSetMetadata.ResourceType].commands | Where-Object { $_.name -eq $cmdletName } + if ($ExistedCmdletInfo) + { + $ExistedCmdletInfo = Merge-WithExistCmdletMetadata -ExistedCmdletInfo $ExistedCmdletInfo -ParameterSetMetadata $parameterSetMetadata + } + else + { + $cmdletInfo = New-MetadataForCmdlet -ParameterSetMetadata $parameterSetMetadata + $resourceTypes[$parameterSetMetadata.ResourceType].commands += $cmdletInfo + } + } + else + { + $cmdletInfo = New-MetadataForCmdlet -ParameterSetMetadata $parameterSetMetadata + $resourceTypes[$parameterSetMetadata.ResourceType] = [ordered]@{ + resourceType = $parameterSetMetadata.ResourceType + apiVersion = $parameterSetMetadata.ApiVersion + learnMore = @{ + url = "https://learn.microsoft.com/powershell/module/$rootModuleName".ToLower() + } + commands = @($cmdletInfo) + provider = $parameterSetMetadata.Provider + } + } +} + +$UXFolder = 'UX' +if (Test-Path $UXFolder) +{ + Remove-Item -Path $UXFolder -Recurse +} +$null = New-Item -ItemType Directory -Path $UXFolder + +foreach ($resourceType in $resourceTypes.Keys) +{ + $resourceTypeFileName = $resourceType -replace "/", "-" + if ($resourceTypeFileName -eq "") + { + continue + } + $resourceTypeInfo = $resourceTypes[$resourceType] + $provider = $resourceTypeInfo.provider + $providerFolder = "$UXFolder/$provider" + if (-not (Test-Path $providerFolder)) + { + $null = New-Item -ItemType Directory -Path $providerFolder + } + $resourceTypeInfo.Remove("provider") + $resourceTypeInfo | ConvertTo-Json -Depth 10 | Out-File "$providerFolder/$resourceTypeFileName.json" +} diff --git a/src/Sphere/Sphere.Autorest/generated/Module.cs b/src/Sphere/Sphere.Autorest/generated/Module.cs new file mode 100644 index 000000000000..eea027de2d5d --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/Module.cs @@ -0,0 +1,202 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using SendAsyncStepDelegate = global::System.Func, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>; + using PipelineChangeDelegate = global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>; + using GetParameterDelegate = global::System.Func; + using ModuleLoadPipelineDelegate = global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>, global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>>; + using ArgumentCompleterDelegate = global::System.Func; + using GetTelemetryIdDelegate = global::System.Func; + using TelemetryDelegate = global::System.Action; + using NewRequestPipelineDelegate = global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>, global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>>; + using SignalDelegate = global::System.Func, global::System.Threading.Tasks.Task>; + using EventListenerDelegate = global::System.Func, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Management.Automation.InvocationInfo, string, string, string, global::System.Exception, global::System.Threading.Tasks.Task>; + using NextDelegate = global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>; + using SanitizerDelegate = global::System.Action; + using GetTelemetryInfoDelegate = global::System.Func>; + + /// A class that contains the module-common code and data. + public partial class Module + { + /// The currently selected profile. + public string Profile = global::System.String.Empty; + + public global::System.Net.Http.HttpClientHandler _handler = new global::System.Net.Http.HttpClientHandler(); + + private static bool _init = false; + + private static readonly global::System.Object _initLock = new global::System.Object(); + + private static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module _instance; + + /// the ISendAsync pipeline instance + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline _pipeline; + + /// the ISendAsync pipeline instance (when proxy is enabled) + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline _pipelineWithProxy; + + private static readonly global::System.Object _singletonLock = new global::System.Object(); + + public bool _useProxy = false; + + public global::System.Net.WebProxy _webProxy = new global::System.Net.WebProxy(); + + /// Gets completion data for azure specific fields + public ArgumentCompleterDelegate ArgumentCompleter { get; set; } + + /// The instance of the Client API + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere ClientAPI { get; set; } + + /// A delegate that gets called for each signalled event + public EventListenerDelegate EventListener { get; set; } + + /// The delegate to call to get parameter data from a common module. + public GetParameterDelegate GetParameterValue { get; set; } + + /// The delegate to get the telemetry Id. + public GetTelemetryIdDelegate GetTelemetryId { get; set; } + + /// The delegate to get the telemetry info. + public GetTelemetryInfoDelegate GetTelemetryInfo { get; set; } + + /// the singleton of this module class + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module Instance { get { if (_instance == null) { lock (_singletonLock) { if (_instance == null) { _instance = new Module(); }}} return _instance; } } + + /// The Name of this module + public string Name => @"Az.Sphere"; + + /// The delegate to call when this module is loaded (supporting a commmon module). + public ModuleLoadPipelineDelegate OnModuleLoad { get; set; } + + /// The delegate to call before each new request (supporting a commmon module). + public NewRequestPipelineDelegate OnNewRequest { get; set; } + + /// The name of the currently selected Azure profile + public global::System.String ProfileName { get; set; } + + /// The ResourceID for this module (azure arm). + public string ResourceId => @"Az.Sphere"; + + /// The delegate to call in WriteObject to sanitize the output object. + public SanitizerDelegate SanitizeOutput { get; set; } + + /// The delegate for creating a telemetry. + public TelemetryDelegate Telemetry { get; set; } + + /// The from the cmdlet + /// The HttpPipeline for the request + + partial void AfterCreatePipeline(global::System.Management.Automation.InvocationInfo invocationInfo, ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline pipeline); + + /// The from the cmdlet + /// The HttpPipeline for the request + + partial void BeforeCreatePipeline(global::System.Management.Automation.InvocationInfo invocationInfo, ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline pipeline); + + partial void CustomInit(); + + /// Creates an instance of the HttpPipeline for each call. + /// The from the cmdlet + /// the cmdlet's correlation id. + /// the cmdlet's process record correlation id. + /// the cmdlet's parameterset name. + /// a dict for extensible parameters + /// An instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline for the remote call. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline CreatePipeline(global::System.Management.Automation.InvocationInfo invocationInfo, string correlationId, string processRecordId, string parameterSetName = null, global::System.Collections.Generic.IDictionary extensibleParameters = null) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline pipeline = null; + BeforeCreatePipeline(invocationInfo, ref pipeline); + pipeline = (pipeline ?? (_useProxy ? _pipelineWithProxy : _pipeline)).Clone(); + AfterCreatePipeline(invocationInfo, ref pipeline); + pipeline.Append(new Runtime.CmdInfoHandler(processRecordId, invocationInfo, parameterSetName).SendAsync); + OnNewRequest?.Invoke( invocationInfo, correlationId,processRecordId, (step)=> { pipeline.Prepend(step); } , (step)=> { pipeline.Append(step); } ); + return pipeline; + } + + /// Gets parameters from a common module. + /// The from the cmdlet + /// the cmdlet's correlation id. + /// The name of the parameter to get the value for. + /// + /// The parameter value from the common module. (Note: this should be type converted on the way back) + /// + public object GetParameter(global::System.Management.Automation.InvocationInfo invocationInfo, string correlationId, string parameterName) => GetParameterValue?.Invoke( ResourceId, Name, invocationInfo, correlationId,parameterName ); + + /// Initialization steps performed after the module is loaded. + public void Init() + { + if (_init == false) + { + lock (_initLock) { + if (_init == false) { + OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipeline.Prepend(step); } , (step)=> { _pipeline.Append(step); } ); + OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipelineWithProxy.Prepend(step); } , (step)=> { _pipelineWithProxy.Append(step); } ); + CustomInit(); + _init = true; + } + } + } + } + + /// Creates the module instance. + private Module() + { + // constructor + ClientAPI = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere(); + _handler.Proxy = _webProxy; + _pipeline = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpClientFactory(new global::System.Net.Http.HttpClient())); + _pipelineWithProxy = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpClientFactory(new global::System.Net.Http.HttpClient(_handler))); + } + + /// The HTTP Proxy to use. + /// The HTTP Proxy Credentials + /// True if the proxy should use default credentials + public void SetProxyConfiguration(global::System.Uri proxy, global::System.Management.Automation.PSCredential proxyCredential, bool proxyUseDefaultCredentials) + { + _useProxy = proxy != null; + if (proxy == null) + { + return; + } + // set the proxy configuration + _webProxy.Address = proxy; + _webProxy.BypassProxyOnLocal = false; + if (proxyUseDefaultCredentials) + { + _webProxy.Credentials = null; + _webProxy.UseDefaultCredentials = true; + } + else + { + _webProxy.UseDefaultCredentials = false; + _webProxy.Credentials = proxyCredential ?.GetNetworkCredential(); + } + } + + /// Called to dispatch events to the common module listener + /// The ID of the event + /// The cancellation token for the event + /// A delegate to get the detailed event data + /// The callback for the event dispatcher + /// The from the cmdlet + /// the cmdlet's parameterset name. + /// the cmdlet's correlation id. + /// the cmdlet's process record correlation id. + /// the exception that is being thrown (if available) + /// + /// A that will be complete when handling of the event is completed. + /// + public async global::System.Threading.Tasks.Task Signal(string id, global::System.Threading.CancellationToken token, global::System.Func getEventData, SignalDelegate signal, global::System.Management.Automation.InvocationInfo invocationInfo, string parameterSetName, string correlationId, string processRecordId, global::System.Exception exception) + { + using( NoSynchronizationContext ) + { + await EventListener?.Invoke(id,token,getEventData, signal, invocationInfo, parameterSetName, correlationId,processRecordId,exception); + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/Any.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/Any.PowerShell.cs new file mode 100644 index 000000000000..d00f66f442c7 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/Any.PowerShell.cs @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// Anything + [System.ComponentModel.TypeConverter(typeof(AnyTypeConverter))] + public partial class Any + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Any(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Any(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IAny DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Any(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IAny DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Any(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IAny FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Anything + [System.ComponentModel.TypeConverter(typeof(AnyTypeConverter))] + public partial interface IAny + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/Any.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/Any.TypeConverter.cs new file mode 100644 index 000000000000..e87a3086392a --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/Any.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AnyTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IAny ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IAny).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Any.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Any.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Any.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/Any.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/Any.cs new file mode 100644 index 000000000000..cd8bd720bde7 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/Any.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// Anything + public partial class Any : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IAny, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IAnyInternal + { + + /// Creates an new instance. + public Any() + { + + } + } + /// Anything + public partial interface IAny : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable + { + + } + /// Anything + internal partial interface IAnyInternal + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/Any.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/Any.json.cs new file mode 100644 index 000000000000..fbf39b78bd51 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/Any.json.cs @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// Anything + public partial class Any + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal Any(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IAny. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IAny. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IAny FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new Any(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/Catalog.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/Catalog.PowerShell.cs new file mode 100644 index 000000000000..0e93683f0da4 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/Catalog.PowerShell.cs @@ -0,0 +1,276 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// An Azure Sphere catalog + [System.ComponentModel.TypeConverter(typeof(CatalogTypeConverter))] + public partial class Catalog + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Catalog(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CatalogPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("TenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogInternal)this).TenantId, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Catalog(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CatalogPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("TenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogInternal)this).TenantId, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Catalog(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Catalog(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// An Azure Sphere catalog + [System.ComponentModel.TypeConverter(typeof(CatalogTypeConverter))] + public partial interface ICatalog + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/Catalog.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/Catalog.TypeConverter.cs new file mode 100644 index 000000000000..75609dd5cd23 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/Catalog.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CatalogTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Catalog.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Catalog.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Catalog.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/Catalog.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/Catalog.cs new file mode 100644 index 000000000000..1173a966e7c6 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/Catalog.cs @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// An Azure Sphere catalog + public partial class Catalog : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogInternal, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.TrackedResource(); + + /// + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__trackedResource).Id; } + + /// The geo-location where the resource lives + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceInternal)__trackedResource).Location = value ; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogProperties Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CatalogProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogPropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for TenantId + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogInternal.TenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogPropertiesInternal)Property).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogPropertiesInternal)Property).TenantId = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__trackedResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__trackedResource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__trackedResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__trackedResource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__trackedResource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__trackedResource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CatalogProperties()); set => this._property = value; } + + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogPropertiesInternal)Property).ProvisioningState; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__trackedResource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__trackedResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__trackedResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__trackedResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__trackedResource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__trackedResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__trackedResource).SystemDataCreatedByType = value ?? null; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedByType = value ?? null; } + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } + + /// The Azure Sphere tenant ID associated with the catalog. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string TenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogPropertiesInternal)Property).TenantId; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__trackedResource).Type; } + + /// Creates an new instance. + public Catalog() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__trackedResource), __trackedResource); + await eventListener.AssertObjectIsValid(nameof(__trackedResource), __trackedResource); + } + } + /// An Azure Sphere catalog + public partial interface ICatalog : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResource + { + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The status of the last operation.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")] + string ProvisioningState { get; } + /// The Azure Sphere tenant ID associated with the catalog. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The Azure Sphere tenant ID associated with the catalog.", + SerializedName = @"tenantId", + PossibleTypes = new [] { typeof(string) })] + string TenantId { get; } + + } + /// An Azure Sphere catalog + internal partial interface ICatalogInternal : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceInternal + { + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogProperties Property { get; set; } + /// The status of the last operation. + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")] + string ProvisioningState { get; set; } + /// The Azure Sphere tenant ID associated with the catalog. + string TenantId { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/Catalog.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/Catalog.json.cs new file mode 100644 index 000000000000..c32d99db4b41 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/Catalog.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// An Azure Sphere catalog + public partial class Catalog + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal Catalog(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.TrackedResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CatalogProperties.FromJson(__jsonProperties) : _property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new Catalog(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __trackedResource?.ToJson(container, serializationMode); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogListResult.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogListResult.PowerShell.cs new file mode 100644 index 000000000000..8814e1c333a5 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogListResult.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// The response of a Catalog list operation. + [System.ComponentModel.TypeConverter(typeof(CatalogListResultTypeConverter))] + public partial class CatalogListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CatalogListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CatalogTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CatalogListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CatalogTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CatalogListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CatalogListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The response of a Catalog list operation. + [System.ComponentModel.TypeConverter(typeof(CatalogListResultTypeConverter))] + public partial interface ICatalogListResult + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogListResult.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogListResult.TypeConverter.cs new file mode 100644 index 000000000000..2855f537d08c --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CatalogListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CatalogListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CatalogListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CatalogListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogListResult.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogListResult.cs new file mode 100644 index 000000000000..c23fadb94618 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogListResult.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The response of a Catalog list operation. + public partial class CatalogListResult : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogListResult, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// The Catalog items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public CatalogListResult() + { + + } + } + /// The response of a Catalog list operation. + public partial interface ICatalogListResult : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The Catalog items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Catalog items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog) })] + System.Collections.Generic.List Value { get; set; } + + } + /// The response of a Catalog list operation. + internal partial interface ICatalogListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The Catalog items on this page + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogListResult.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogListResult.json.cs new file mode 100644 index 000000000000..afb78a19099c --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogListResult.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The response of a Catalog list operation. + public partial class CatalogListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal CatalogListResult(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog) (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Catalog.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new CatalogListResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogProperties.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogProperties.PowerShell.cs new file mode 100644 index 000000000000..b0203bccb375 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogProperties.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// Catalog properties + [System.ComponentModel.TypeConverter(typeof(CatalogPropertiesTypeConverter))] + public partial class CatalogProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CatalogProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogPropertiesInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogPropertiesInternal)this).TenantId, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CatalogProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogPropertiesInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogPropertiesInternal)this).TenantId, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CatalogProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CatalogProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Catalog properties + [System.ComponentModel.TypeConverter(typeof(CatalogPropertiesTypeConverter))] + public partial interface ICatalogProperties + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogProperties.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogProperties.TypeConverter.cs new file mode 100644 index 000000000000..9ad521b0740e --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CatalogPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CatalogProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CatalogProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CatalogProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogProperties.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogProperties.cs new file mode 100644 index 000000000000..be105a18966b --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogProperties.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// Catalog properties + public partial class CatalogProperties : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogProperties, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogPropertiesInternal + { + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for TenantId + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogPropertiesInternal.TenantId { get => this._tenantId; set { {_tenantId = value;} } } + + /// Backing field for property. + private string _provisioningState; + + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private string _tenantId; + + /// The Azure Sphere tenant ID associated with the catalog. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string TenantId { get => this._tenantId; } + + /// Creates an new instance. + public CatalogProperties() + { + + } + } + /// Catalog properties + public partial interface ICatalogProperties : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable + { + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The status of the last operation.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")] + string ProvisioningState { get; } + /// The Azure Sphere tenant ID associated with the catalog. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The Azure Sphere tenant ID associated with the catalog.", + SerializedName = @"tenantId", + PossibleTypes = new [] { typeof(string) })] + string TenantId { get; } + + } + /// Catalog properties + internal partial interface ICatalogPropertiesInternal + + { + /// The status of the last operation. + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")] + string ProvisioningState { get; set; } + /// The Azure Sphere tenant ID associated with the catalog. + string TenantId { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogProperties.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogProperties.json.cs new file mode 100644 index 000000000000..8b63826e93ee --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogProperties.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// Catalog properties + public partial class CatalogProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal CatalogProperties(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_tenantId = If( json?.PropertyT("tenantId"), out var __jsonTenantId) ? (string)__jsonTenantId : (string)_tenantId;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new CatalogProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._tenantId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._tenantId.ToString()) : null, "tenantId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogUpdate.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogUpdate.PowerShell.cs new file mode 100644 index 000000000000..e045bf4a3f35 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogUpdate.PowerShell.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// The type used for update operations of the Catalog. + [System.ComponentModel.TypeConverter(typeof(CatalogUpdateTypeConverter))] + public partial class CatalogUpdate + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CatalogUpdate(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CatalogUpdateTagsTypeConverter.ConvertFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CatalogUpdate(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CatalogUpdateTagsTypeConverter.ConvertFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CatalogUpdate(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CatalogUpdate(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The type used for update operations of the Catalog. + [System.ComponentModel.TypeConverter(typeof(CatalogUpdateTypeConverter))] + public partial interface ICatalogUpdate + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogUpdate.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogUpdate.TypeConverter.cs new file mode 100644 index 000000000000..ec3324c0cd7c --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogUpdate.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CatalogUpdateTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogUpdate ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogUpdate).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CatalogUpdate.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CatalogUpdate.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CatalogUpdate.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogUpdate.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogUpdate.cs new file mode 100644 index 000000000000..38671a4d3401 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogUpdate.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The type used for update operations of the Catalog. + public partial class CatalogUpdate : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogUpdate, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogUpdateInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogUpdateTags _tag; + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogUpdateTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CatalogUpdateTags()); set => this._tag = value; } + + /// Creates an new instance. + public CatalogUpdate() + { + + } + } + /// The type used for update operations of the Catalog. + public partial interface ICatalogUpdate : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable + { + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogUpdateTags) })] + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogUpdateTags Tag { get; set; } + + } + /// The type used for update operations of the Catalog. + internal partial interface ICatalogUpdateInternal + + { + /// Resource tags. + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogUpdateTags Tag { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogUpdate.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogUpdate.json.cs new file mode 100644 index 000000000000..197586abff4b --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogUpdate.json.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The type used for update operations of the Catalog. + public partial class CatalogUpdate + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal CatalogUpdate(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CatalogUpdateTags.FromJson(__jsonTags) : _tag;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogUpdate. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogUpdate. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new CatalogUpdate(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogUpdateTags.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogUpdateTags.PowerShell.cs new file mode 100644 index 000000000000..4d5cfaa581d5 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogUpdateTags.PowerShell.cs @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// Resource tags. + [System.ComponentModel.TypeConverter(typeof(CatalogUpdateTagsTypeConverter))] + public partial class CatalogUpdateTags + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CatalogUpdateTags(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CatalogUpdateTags(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogUpdateTags DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CatalogUpdateTags(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogUpdateTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CatalogUpdateTags(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogUpdateTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Resource tags. + [System.ComponentModel.TypeConverter(typeof(CatalogUpdateTagsTypeConverter))] + public partial interface ICatalogUpdateTags + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogUpdateTags.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogUpdateTags.TypeConverter.cs new file mode 100644 index 000000000000..273eae62bd65 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogUpdateTags.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CatalogUpdateTagsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogUpdateTags ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogUpdateTags).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CatalogUpdateTags.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CatalogUpdateTags.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CatalogUpdateTags.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogUpdateTags.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogUpdateTags.cs new file mode 100644 index 000000000000..77e05c12347d --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogUpdateTags.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// Resource tags. + public partial class CatalogUpdateTags : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogUpdateTags, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogUpdateTagsInternal + { + + /// Creates an new instance. + public CatalogUpdateTags() + { + + } + } + /// Resource tags. + public partial interface ICatalogUpdateTags : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IAssociativeArray + { + + } + /// Resource tags. + internal partial interface ICatalogUpdateTagsInternal + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogUpdateTags.dictionary.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogUpdateTags.dictionary.cs new file mode 100644 index 000000000000..b3b5262c0781 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogUpdateTags.dictionary.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + public partial class CatalogUpdateTags : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CatalogUpdateTags source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogUpdateTags.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogUpdateTags.json.cs new file mode 100644 index 000000000000..60fb5301b211 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/CatalogUpdateTags.json.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// Resource tags. + public partial class CatalogUpdateTags + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + /// + internal CatalogUpdateTags(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogUpdateTags. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogUpdateTags. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogUpdateTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new CatalogUpdateTags(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/Certificate.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/Certificate.PowerShell.cs new file mode 100644 index 000000000000..8007d2926479 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/Certificate.PowerShell.cs @@ -0,0 +1,300 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// An certificate resource belonging to a catalog resource. + [System.ComponentModel.TypeConverter(typeof(CertificateTypeConverter))] + public partial class Certificate + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Certificate(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CertificatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("PropertiesCertificate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateInternal)this).PropertiesCertificate = (string) content.GetValueForProperty("PropertiesCertificate",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateInternal)this).PropertiesCertificate, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("Subject")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateInternal)this).Subject = (string) content.GetValueForProperty("Subject",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateInternal)this).Subject, global::System.Convert.ToString); + } + if (content.Contains("Thumbprint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateInternal)this).Thumbprint = (string) content.GetValueForProperty("Thumbprint",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateInternal)this).Thumbprint, global::System.Convert.ToString); + } + if (content.Contains("ExpiryUtc")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateInternal)this).ExpiryUtc = (global::System.DateTime?) content.GetValueForProperty("ExpiryUtc",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateInternal)this).ExpiryUtc, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("NotBeforeUtc")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateInternal)this).NotBeforeUtc = (global::System.DateTime?) content.GetValueForProperty("NotBeforeUtc",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateInternal)this).NotBeforeUtc, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Certificate(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CertificatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("PropertiesCertificate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateInternal)this).PropertiesCertificate = (string) content.GetValueForProperty("PropertiesCertificate",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateInternal)this).PropertiesCertificate, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("Subject")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateInternal)this).Subject = (string) content.GetValueForProperty("Subject",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateInternal)this).Subject, global::System.Convert.ToString); + } + if (content.Contains("Thumbprint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateInternal)this).Thumbprint = (string) content.GetValueForProperty("Thumbprint",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateInternal)this).Thumbprint, global::System.Convert.ToString); + } + if (content.Contains("ExpiryUtc")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateInternal)this).ExpiryUtc = (global::System.DateTime?) content.GetValueForProperty("ExpiryUtc",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateInternal)this).ExpiryUtc, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("NotBeforeUtc")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateInternal)this).NotBeforeUtc = (global::System.DateTime?) content.GetValueForProperty("NotBeforeUtc",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateInternal)this).NotBeforeUtc, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificate DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Certificate(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Certificate(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// An certificate resource belonging to a catalog resource. + [System.ComponentModel.TypeConverter(typeof(CertificateTypeConverter))] + public partial interface ICertificate + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/Certificate.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/Certificate.TypeConverter.cs new file mode 100644 index 000000000000..6eedb9eabf44 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/Certificate.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CertificateTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificate ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificate).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Certificate.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Certificate.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Certificate.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/Certificate.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/Certificate.cs new file mode 100644 index 000000000000..b981204af997 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/Certificate.cs @@ -0,0 +1,270 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// An certificate resource belonging to a catalog resource. + public partial class Certificate : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificate, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateInternal, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProxyResource(); + + /// The certificate expiry date. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public global::System.DateTime? ExpiryUtc { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)Property).ExpiryUtc; } + + /// + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Id; } + + /// Internal Acessors for ExpiryUtc + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateInternal.ExpiryUtc { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)Property).ExpiryUtc; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)Property).ExpiryUtc = value; } + + /// Internal Acessors for NotBeforeUtc + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateInternal.NotBeforeUtc { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)Property).NotBeforeUtc; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)Property).NotBeforeUtc = value; } + + /// Internal Acessors for PropertiesCertificate + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateInternal.PropertiesCertificate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)Property).Certificate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)Property).Certificate = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateProperties Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CertificateProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for Status + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateInternal.Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)Property).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)Property).Status = value; } + + /// Internal Acessors for Subject + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateInternal.Subject { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)Property).Subject; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)Property).Subject = value; } + + /// Internal Acessors for Thumbprint + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateInternal.Thumbprint { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)Property).Thumbprint; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)Property).Thumbprint = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Name; } + + /// The certificate not before date. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public global::System.DateTime? NotBeforeUtc { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)Property).NotBeforeUtc; } + + /// The certificate as a UTF-8 encoded base 64 string. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string PropertiesCertificate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)Property).Certificate; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CertificateProperties()); set => this._property = value; } + + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)Property).ProvisioningState; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// The certificate status. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)Property).Status; } + + /// The certificate subject. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string Subject { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)Property).Subject; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType = value ?? null; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType = value ?? null; } + + /// The certificate thumbprint. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string Thumbprint { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)Property).Thumbprint; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Type; } + + /// Creates an new instance. + public Certificate() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); + } + } + /// An certificate resource belonging to a catalog resource. + public partial interface ICertificate : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProxyResource + { + /// The certificate expiry date. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The certificate expiry date.", + SerializedName = @"expiryUtc", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? ExpiryUtc { get; } + /// The certificate not before date. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The certificate not before date.", + SerializedName = @"notBeforeUtc", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? NotBeforeUtc { get; } + /// The certificate as a UTF-8 encoded base 64 string. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The certificate as a UTF-8 encoded base 64 string.", + SerializedName = @"certificate", + PossibleTypes = new [] { typeof(string) })] + string PropertiesCertificate { get; } + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The status of the last operation.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")] + string ProvisioningState { get; } + /// The certificate status. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The certificate status.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Active", "Inactive", "Expired", "Revoked")] + string Status { get; } + /// The certificate subject. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The certificate subject.", + SerializedName = @"subject", + PossibleTypes = new [] { typeof(string) })] + string Subject { get; } + /// The certificate thumbprint. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The certificate thumbprint.", + SerializedName = @"thumbprint", + PossibleTypes = new [] { typeof(string) })] + string Thumbprint { get; } + + } + /// An certificate resource belonging to a catalog resource. + internal partial interface ICertificateInternal : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProxyResourceInternal + { + /// The certificate expiry date. + global::System.DateTime? ExpiryUtc { get; set; } + /// The certificate not before date. + global::System.DateTime? NotBeforeUtc { get; set; } + /// The certificate as a UTF-8 encoded base 64 string. + string PropertiesCertificate { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateProperties Property { get; set; } + /// The status of the last operation. + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")] + string ProvisioningState { get; set; } + /// The certificate status. + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Active", "Inactive", "Expired", "Revoked")] + string Status { get; set; } + /// The certificate subject. + string Subject { get; set; } + /// The certificate thumbprint. + string Thumbprint { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/Certificate.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/Certificate.json.cs new file mode 100644 index 000000000000..9497a18cc8e4 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/Certificate.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// An certificate resource belonging to a catalog resource. + public partial class Certificate + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal Certificate(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CertificateProperties.FromJson(__jsonProperties) : _property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificate. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificate. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificate FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new Certificate(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __proxyResource?.ToJson(container, serializationMode); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/CertificateChainResponse.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/CertificateChainResponse.PowerShell.cs new file mode 100644 index 000000000000..77ee4b9f3a19 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/CertificateChainResponse.PowerShell.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// The certificate chain response. + [System.ComponentModel.TypeConverter(typeof(CertificateChainResponseTypeConverter))] + public partial class CertificateChainResponse + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CertificateChainResponse(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CertificateChain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateChainResponseInternal)this).CertificateChain = (string) content.GetValueForProperty("CertificateChain",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateChainResponseInternal)this).CertificateChain, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CertificateChainResponse(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CertificateChain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateChainResponseInternal)this).CertificateChain = (string) content.GetValueForProperty("CertificateChain",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateChainResponseInternal)this).CertificateChain, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateChainResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CertificateChainResponse(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateChainResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CertificateChainResponse(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateChainResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The certificate chain response. + [System.ComponentModel.TypeConverter(typeof(CertificateChainResponseTypeConverter))] + public partial interface ICertificateChainResponse + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/CertificateChainResponse.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/CertificateChainResponse.TypeConverter.cs new file mode 100644 index 000000000000..3bc176bf5f10 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/CertificateChainResponse.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CertificateChainResponseTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateChainResponse ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateChainResponse).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CertificateChainResponse.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CertificateChainResponse.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CertificateChainResponse.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/CertificateChainResponse.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/CertificateChainResponse.cs new file mode 100644 index 000000000000..b16d21d25d94 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/CertificateChainResponse.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The certificate chain response. + public partial class CertificateChainResponse : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateChainResponse, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateChainResponseInternal + { + + /// Backing field for property. + private string _certificateChain; + + /// The certificate chain. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string CertificateChain { get => this._certificateChain; } + + /// Internal Acessors for CertificateChain + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateChainResponseInternal.CertificateChain { get => this._certificateChain; set { {_certificateChain = value;} } } + + /// Creates an new instance. + public CertificateChainResponse() + { + + } + } + /// The certificate chain response. + public partial interface ICertificateChainResponse : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable + { + /// The certificate chain. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The certificate chain.", + SerializedName = @"certificateChain", + PossibleTypes = new [] { typeof(string) })] + string CertificateChain { get; } + + } + /// The certificate chain response. + internal partial interface ICertificateChainResponseInternal + + { + /// The certificate chain. + string CertificateChain { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/CertificateChainResponse.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/CertificateChainResponse.json.cs new file mode 100644 index 000000000000..5bf7d62d599e --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/CertificateChainResponse.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The certificate chain response. + public partial class CertificateChainResponse + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal CertificateChainResponse(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_certificateChain = If( json?.PropertyT("certificateChain"), out var __jsonCertificateChain) ? (string)__jsonCertificateChain : (string)_certificateChain;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateChainResponse. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateChainResponse. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateChainResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new CertificateChainResponse(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._certificateChain)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._certificateChain.ToString()) : null, "certificateChain" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/CertificateListResult.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/CertificateListResult.PowerShell.cs new file mode 100644 index 000000000000..b47611b945b7 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/CertificateListResult.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// The response of a Certificate list operation. + [System.ComponentModel.TypeConverter(typeof(CertificateListResultTypeConverter))] + public partial class CertificateListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CertificateListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CertificateTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CertificateListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CertificateTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CertificateListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CertificateListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The response of a Certificate list operation. + [System.ComponentModel.TypeConverter(typeof(CertificateListResultTypeConverter))] + public partial interface ICertificateListResult + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/CertificateListResult.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/CertificateListResult.TypeConverter.cs new file mode 100644 index 000000000000..4e857e6e52c6 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/CertificateListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CertificateListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CertificateListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CertificateListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CertificateListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/CertificateListResult.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/CertificateListResult.cs new file mode 100644 index 000000000000..b94eb1a77888 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/CertificateListResult.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The response of a Certificate list operation. + public partial class CertificateListResult : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateListResult, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// The Certificate items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public CertificateListResult() + { + + } + } + /// The response of a Certificate list operation. + public partial interface ICertificateListResult : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The Certificate items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Certificate items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificate) })] + System.Collections.Generic.List Value { get; set; } + + } + /// The response of a Certificate list operation. + internal partial interface ICertificateListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The Certificate items on this page + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/CertificateListResult.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/CertificateListResult.json.cs new file mode 100644 index 000000000000..c8d5494bce65 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/CertificateListResult.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The response of a Certificate list operation. + public partial class CertificateListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal CertificateListResult(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificate) (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Certificate.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new CertificateListResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/CertificateProperties.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/CertificateProperties.PowerShell.cs new file mode 100644 index 000000000000..aa5344a33443 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/CertificateProperties.PowerShell.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// The properties of certificate + [System.ComponentModel.TypeConverter(typeof(CertificatePropertiesTypeConverter))] + public partial class CertificateProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CertificateProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Certificate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).Certificate = (string) content.GetValueForProperty("Certificate",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).Certificate, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("Subject")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).Subject = (string) content.GetValueForProperty("Subject",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).Subject, global::System.Convert.ToString); + } + if (content.Contains("Thumbprint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).Thumbprint = (string) content.GetValueForProperty("Thumbprint",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).Thumbprint, global::System.Convert.ToString); + } + if (content.Contains("ExpiryUtc")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).ExpiryUtc = (global::System.DateTime?) content.GetValueForProperty("ExpiryUtc",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).ExpiryUtc, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("NotBeforeUtc")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).NotBeforeUtc = (global::System.DateTime?) content.GetValueForProperty("NotBeforeUtc",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).NotBeforeUtc, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CertificateProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Certificate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).Certificate = (string) content.GetValueForProperty("Certificate",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).Certificate, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("Subject")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).Subject = (string) content.GetValueForProperty("Subject",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).Subject, global::System.Convert.ToString); + } + if (content.Contains("Thumbprint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).Thumbprint = (string) content.GetValueForProperty("Thumbprint",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).Thumbprint, global::System.Convert.ToString); + } + if (content.Contains("ExpiryUtc")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).ExpiryUtc = (global::System.DateTime?) content.GetValueForProperty("ExpiryUtc",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).ExpiryUtc, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("NotBeforeUtc")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).NotBeforeUtc = (global::System.DateTime?) content.GetValueForProperty("NotBeforeUtc",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).NotBeforeUtc, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CertificateProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CertificateProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The properties of certificate + [System.ComponentModel.TypeConverter(typeof(CertificatePropertiesTypeConverter))] + public partial interface ICertificateProperties + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/CertificateProperties.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/CertificateProperties.TypeConverter.cs new file mode 100644 index 000000000000..6a45a3ecc446 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/CertificateProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CertificatePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CertificateProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CertificateProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CertificateProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/CertificateProperties.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/CertificateProperties.cs new file mode 100644 index 000000000000..d3c07e58a3a4 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/CertificateProperties.cs @@ -0,0 +1,199 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The properties of certificate + public partial class CertificateProperties : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateProperties, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal + { + + /// Backing field for property. + private string _certificate; + + /// The certificate as a UTF-8 encoded base 64 string. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string Certificate { get => this._certificate; } + + /// Backing field for property. + private global::System.DateTime? _expiryUtc; + + /// The certificate expiry date. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public global::System.DateTime? ExpiryUtc { get => this._expiryUtc; } + + /// Internal Acessors for Certificate + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal.Certificate { get => this._certificate; set { {_certificate = value;} } } + + /// Internal Acessors for ExpiryUtc + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal.ExpiryUtc { get => this._expiryUtc; set { {_expiryUtc = value;} } } + + /// Internal Acessors for NotBeforeUtc + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal.NotBeforeUtc { get => this._notBeforeUtc; set { {_notBeforeUtc = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for Status + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal.Status { get => this._status; set { {_status = value;} } } + + /// Internal Acessors for Subject + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal.Subject { get => this._subject; set { {_subject = value;} } } + + /// Internal Acessors for Thumbprint + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal.Thumbprint { get => this._thumbprint; set { {_thumbprint = value;} } } + + /// Backing field for property. + private global::System.DateTime? _notBeforeUtc; + + /// The certificate not before date. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public global::System.DateTime? NotBeforeUtc { get => this._notBeforeUtc; } + + /// Backing field for property. + private string _provisioningState; + + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private string _status; + + /// The certificate status. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string Status { get => this._status; } + + /// Backing field for property. + private string _subject; + + /// The certificate subject. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string Subject { get => this._subject; } + + /// Backing field for property. + private string _thumbprint; + + /// The certificate thumbprint. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string Thumbprint { get => this._thumbprint; } + + /// Creates an new instance. + public CertificateProperties() + { + + } + } + /// The properties of certificate + public partial interface ICertificateProperties : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable + { + /// The certificate as a UTF-8 encoded base 64 string. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The certificate as a UTF-8 encoded base 64 string.", + SerializedName = @"certificate", + PossibleTypes = new [] { typeof(string) })] + string Certificate { get; } + /// The certificate expiry date. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The certificate expiry date.", + SerializedName = @"expiryUtc", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? ExpiryUtc { get; } + /// The certificate not before date. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The certificate not before date.", + SerializedName = @"notBeforeUtc", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? NotBeforeUtc { get; } + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The status of the last operation.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")] + string ProvisioningState { get; } + /// The certificate status. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The certificate status.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Active", "Inactive", "Expired", "Revoked")] + string Status { get; } + /// The certificate subject. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The certificate subject.", + SerializedName = @"subject", + PossibleTypes = new [] { typeof(string) })] + string Subject { get; } + /// The certificate thumbprint. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The certificate thumbprint.", + SerializedName = @"thumbprint", + PossibleTypes = new [] { typeof(string) })] + string Thumbprint { get; } + + } + /// The properties of certificate + internal partial interface ICertificatePropertiesInternal + + { + /// The certificate as a UTF-8 encoded base 64 string. + string Certificate { get; set; } + /// The certificate expiry date. + global::System.DateTime? ExpiryUtc { get; set; } + /// The certificate not before date. + global::System.DateTime? NotBeforeUtc { get; set; } + /// The status of the last operation. + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")] + string ProvisioningState { get; set; } + /// The certificate status. + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Active", "Inactive", "Expired", "Revoked")] + string Status { get; set; } + /// The certificate subject. + string Subject { get; set; } + /// The certificate thumbprint. + string Thumbprint { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/CertificateProperties.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/CertificateProperties.json.cs new file mode 100644 index 000000000000..1b19a972cb91 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/CertificateProperties.json.cs @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The properties of certificate + public partial class CertificateProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal CertificateProperties(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_certificate = If( json?.PropertyT("certificate"), out var __jsonCertificate) ? (string)__jsonCertificate : (string)_certificate;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)_status;} + {_subject = If( json?.PropertyT("subject"), out var __jsonSubject) ? (string)__jsonSubject : (string)_subject;} + {_thumbprint = If( json?.PropertyT("thumbprint"), out var __jsonThumbprint) ? (string)__jsonThumbprint : (string)_thumbprint;} + {_expiryUtc = If( json?.PropertyT("expiryUtc"), out var __jsonExpiryUtc) ? global::System.DateTime.TryParse((string)__jsonExpiryUtc, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonExpiryUtcValue) ? __jsonExpiryUtcValue : _expiryUtc : _expiryUtc;} + {_notBeforeUtc = If( json?.PropertyT("notBeforeUtc"), out var __jsonNotBeforeUtc) ? global::System.DateTime.TryParse((string)__jsonNotBeforeUtc, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonNotBeforeUtcValue) ? __jsonNotBeforeUtcValue : _notBeforeUtc : _notBeforeUtc;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new CertificateProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._certificate)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._certificate.ToString()) : null, "certificate" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._subject)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._subject.ToString()) : null, "subject" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._thumbprint)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._thumbprint.ToString()) : null, "thumbprint" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._expiryUtc ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._expiryUtc?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "expiryUtc" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._notBeforeUtc ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._notBeforeUtc?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "notBeforeUtc" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ClaimDevicesRequest.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ClaimDevicesRequest.PowerShell.cs new file mode 100644 index 000000000000..6eb825554b64 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ClaimDevicesRequest.PowerShell.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// Request to the action call to bulk claim devices. + [System.ComponentModel.TypeConverter(typeof(ClaimDevicesRequestTypeConverter))] + public partial class ClaimDevicesRequest + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ClaimDevicesRequest(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DeviceIdentifier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IClaimDevicesRequestInternal)this).DeviceIdentifier = (System.Collections.Generic.List) content.GetValueForProperty("DeviceIdentifier",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IClaimDevicesRequestInternal)this).DeviceIdentifier, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ClaimDevicesRequest(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DeviceIdentifier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IClaimDevicesRequestInternal)this).DeviceIdentifier = (System.Collections.Generic.List) content.GetValueForProperty("DeviceIdentifier",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IClaimDevicesRequestInternal)this).DeviceIdentifier, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IClaimDevicesRequest DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ClaimDevicesRequest(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IClaimDevicesRequest DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ClaimDevicesRequest(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IClaimDevicesRequest FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Request to the action call to bulk claim devices. + [System.ComponentModel.TypeConverter(typeof(ClaimDevicesRequestTypeConverter))] + public partial interface IClaimDevicesRequest + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ClaimDevicesRequest.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ClaimDevicesRequest.TypeConverter.cs new file mode 100644 index 000000000000..b9a587b4074a --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ClaimDevicesRequest.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ClaimDevicesRequestTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IClaimDevicesRequest ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IClaimDevicesRequest).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ClaimDevicesRequest.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ClaimDevicesRequest.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ClaimDevicesRequest.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ClaimDevicesRequest.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ClaimDevicesRequest.cs new file mode 100644 index 000000000000..47cdfec8a306 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ClaimDevicesRequest.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// Request to the action call to bulk claim devices. + public partial class ClaimDevicesRequest : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IClaimDevicesRequest, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IClaimDevicesRequestInternal + { + + /// Backing field for property. + private System.Collections.Generic.List _deviceIdentifier; + + /// Device identifiers of the devices to be claimed. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public System.Collections.Generic.List DeviceIdentifier { get => this._deviceIdentifier; set => this._deviceIdentifier = value; } + + /// Creates an new instance. + public ClaimDevicesRequest() + { + + } + } + /// Request to the action call to bulk claim devices. + public partial interface IClaimDevicesRequest : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable + { + /// Device identifiers of the devices to be claimed. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Device identifiers of the devices to be claimed.", + SerializedName = @"deviceIdentifiers", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List DeviceIdentifier { get; set; } + + } + /// Request to the action call to bulk claim devices. + internal partial interface IClaimDevicesRequestInternal + + { + /// Device identifiers of the devices to be claimed. + System.Collections.Generic.List DeviceIdentifier { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ClaimDevicesRequest.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ClaimDevicesRequest.json.cs new file mode 100644 index 000000000000..84ac88f1e29f --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ClaimDevicesRequest.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// Request to the action call to bulk claim devices. + public partial class ClaimDevicesRequest + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal ClaimDevicesRequest(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_deviceIdentifier = If( json?.PropertyT("deviceIdentifiers"), out var __jsonDeviceIdentifiers) ? If( __jsonDeviceIdentifiers as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : _deviceIdentifier;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IClaimDevicesRequest. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IClaimDevicesRequest. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IClaimDevicesRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new ClaimDevicesRequest(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._deviceIdentifier) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.XNodeArray(); + foreach( var __x in this._deviceIdentifier ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("deviceIdentifiers",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/CountDeviceResponse.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/CountDeviceResponse.PowerShell.cs new file mode 100644 index 000000000000..4af498d49516 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/CountDeviceResponse.PowerShell.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// Response to the action call for count devices in a catalog (preview API). + [System.ComponentModel.TypeConverter(typeof(CountDeviceResponseTypeConverter))] + public partial class CountDeviceResponse + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CountDeviceResponse(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountElementsResponseInternal)this).Value = (int) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountElementsResponseInternal)this).Value, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CountDeviceResponse(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountElementsResponseInternal)this).Value = (int) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountElementsResponseInternal)this).Value, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDeviceResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CountDeviceResponse(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDeviceResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CountDeviceResponse(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDeviceResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Response to the action call for count devices in a catalog (preview API). + [System.ComponentModel.TypeConverter(typeof(CountDeviceResponseTypeConverter))] + public partial interface ICountDeviceResponse + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/CountDeviceResponse.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/CountDeviceResponse.TypeConverter.cs new file mode 100644 index 000000000000..334c27e2f2ea --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/CountDeviceResponse.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CountDeviceResponseTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDeviceResponse ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDeviceResponse).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CountDeviceResponse.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CountDeviceResponse.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CountDeviceResponse.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/CountDeviceResponse.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/CountDeviceResponse.cs new file mode 100644 index 000000000000..ef3b373040a5 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/CountDeviceResponse.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// Response to the action call for count devices in a catalog (preview API). + public partial class CountDeviceResponse : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDeviceResponse, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDeviceResponseInternal, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountElementsResponse __countElementsResponse = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CountElementsResponse(); + + /// Number of children resources in parent resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public int Value { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountElementsResponseInternal)__countElementsResponse).Value; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountElementsResponseInternal)__countElementsResponse).Value = value ; } + + /// Creates an new instance. + public CountDeviceResponse() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__countElementsResponse), __countElementsResponse); + await eventListener.AssertObjectIsValid(nameof(__countElementsResponse), __countElementsResponse); + } + } + /// Response to the action call for count devices in a catalog (preview API). + public partial interface ICountDeviceResponse : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountElementsResponse + { + + } + /// Response to the action call for count devices in a catalog (preview API). + internal partial interface ICountDeviceResponseInternal : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountElementsResponseInternal + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/CountDeviceResponse.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/CountDeviceResponse.json.cs new file mode 100644 index 000000000000..e20e92f6cd00 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/CountDeviceResponse.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// Response to the action call for count devices in a catalog (preview API). + public partial class CountDeviceResponse + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal CountDeviceResponse(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __countElementsResponse = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CountElementsResponse(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDeviceResponse. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDeviceResponse. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDeviceResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new CountDeviceResponse(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __countElementsResponse?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/CountDevicesResponse.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/CountDevicesResponse.PowerShell.cs new file mode 100644 index 000000000000..5bb0f770c788 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/CountDevicesResponse.PowerShell.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// Response to the action call for count devices in a catalog. + [System.ComponentModel.TypeConverter(typeof(CountDevicesResponseTypeConverter))] + public partial class CountDevicesResponse + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CountDevicesResponse(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountElementsResponseInternal)this).Value = (int) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountElementsResponseInternal)this).Value, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CountDevicesResponse(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountElementsResponseInternal)this).Value = (int) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountElementsResponseInternal)this).Value, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CountDevicesResponse(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CountDevicesResponse(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Response to the action call for count devices in a catalog. + [System.ComponentModel.TypeConverter(typeof(CountDevicesResponseTypeConverter))] + public partial interface ICountDevicesResponse + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/CountDevicesResponse.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/CountDevicesResponse.TypeConverter.cs new file mode 100644 index 000000000000..aeb562f4538d --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/CountDevicesResponse.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CountDevicesResponseTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CountDevicesResponse.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CountDevicesResponse.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CountDevicesResponse.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/CountDevicesResponse.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/CountDevicesResponse.cs new file mode 100644 index 000000000000..40aaa4f5ee50 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/CountDevicesResponse.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// Response to the action call for count devices in a catalog. + public partial class CountDevicesResponse : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponseInternal, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountElementsResponse __countElementsResponse = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CountElementsResponse(); + + /// Number of children resources in parent resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public int Value { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountElementsResponseInternal)__countElementsResponse).Value; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountElementsResponseInternal)__countElementsResponse).Value = value ; } + + /// Creates an new instance. + public CountDevicesResponse() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__countElementsResponse), __countElementsResponse); + await eventListener.AssertObjectIsValid(nameof(__countElementsResponse), __countElementsResponse); + } + } + /// Response to the action call for count devices in a catalog. + public partial interface ICountDevicesResponse : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountElementsResponse + { + + } + /// Response to the action call for count devices in a catalog. + internal partial interface ICountDevicesResponseInternal : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountElementsResponseInternal + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/CountDevicesResponse.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/CountDevicesResponse.json.cs new file mode 100644 index 000000000000..039ac01d3db8 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/CountDevicesResponse.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// Response to the action call for count devices in a catalog. + public partial class CountDevicesResponse + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal CountDevicesResponse(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __countElementsResponse = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CountElementsResponse(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new CountDevicesResponse(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __countElementsResponse?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/CountElementsResponse.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/CountElementsResponse.PowerShell.cs new file mode 100644 index 000000000000..9e0f7c0a72c6 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/CountElementsResponse.PowerShell.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// Response of the count for elements. + [System.ComponentModel.TypeConverter(typeof(CountElementsResponseTypeConverter))] + public partial class CountElementsResponse + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CountElementsResponse(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountElementsResponseInternal)this).Value = (int) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountElementsResponseInternal)this).Value, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CountElementsResponse(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountElementsResponseInternal)this).Value = (int) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountElementsResponseInternal)this).Value, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountElementsResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CountElementsResponse(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountElementsResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CountElementsResponse(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountElementsResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Response of the count for elements. + [System.ComponentModel.TypeConverter(typeof(CountElementsResponseTypeConverter))] + public partial interface ICountElementsResponse + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/CountElementsResponse.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/CountElementsResponse.TypeConverter.cs new file mode 100644 index 000000000000..e1cd0ffe1bd6 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/CountElementsResponse.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CountElementsResponseTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountElementsResponse ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountElementsResponse).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CountElementsResponse.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CountElementsResponse.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CountElementsResponse.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/CountElementsResponse.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/CountElementsResponse.cs new file mode 100644 index 000000000000..4ad0be03c691 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/CountElementsResponse.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// Response of the count for elements. + public partial class CountElementsResponse : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountElementsResponse, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountElementsResponseInternal + { + + /// Backing field for property. + private int _value; + + /// Number of children resources in parent resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public int Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public CountElementsResponse() + { + + } + } + /// Response of the count for elements. + public partial interface ICountElementsResponse : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable + { + /// Number of children resources in parent resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Number of children resources in parent resource.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(int) })] + int Value { get; set; } + + } + /// Response of the count for elements. + internal partial interface ICountElementsResponseInternal + + { + /// Number of children resources in parent resource. + int Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/CountElementsResponse.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/CountElementsResponse.json.cs new file mode 100644 index 000000000000..eb396946dd5c --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/CountElementsResponse.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// Response of the count for elements. + public partial class CountElementsResponse + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal CountElementsResponse(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? (int)__jsonValue : _value;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountElementsResponse. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountElementsResponse. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountElementsResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new CountElementsResponse(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNumber(this._value), "value" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/Deployment.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/Deployment.PowerShell.cs new file mode 100644 index 000000000000..1007c69bdf78 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/Deployment.PowerShell.cs @@ -0,0 +1,276 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// An deployment resource belonging to a device group resource. + [System.ComponentModel.TypeConverter(typeof(DeploymentTypeConverter))] + public partial class Deployment + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Deployment(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeploymentPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("DeploymentId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentInternal)this).DeploymentId = (string) content.GetValueForProperty("DeploymentId",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentInternal)this).DeploymentId, global::System.Convert.ToString); + } + if (content.Contains("DeployedImage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentInternal)this).DeployedImage = (System.Collections.Generic.List) content.GetValueForProperty("DeployedImage",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentInternal)this).DeployedImage, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ImageTypeConverter.ConvertFrom)); + } + if (content.Contains("DateUtc")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentInternal)this).DateUtc = (global::System.DateTime?) content.GetValueForProperty("DateUtc",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentInternal)this).DateUtc, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Deployment(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeploymentPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("DeploymentId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentInternal)this).DeploymentId = (string) content.GetValueForProperty("DeploymentId",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentInternal)this).DeploymentId, global::System.Convert.ToString); + } + if (content.Contains("DeployedImage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentInternal)this).DeployedImage = (System.Collections.Generic.List) content.GetValueForProperty("DeployedImage",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentInternal)this).DeployedImage, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ImageTypeConverter.ConvertFrom)); + } + if (content.Contains("DateUtc")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentInternal)this).DateUtc = (global::System.DateTime?) content.GetValueForProperty("DateUtc",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentInternal)this).DateUtc, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Deployment(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Deployment(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// An deployment resource belonging to a device group resource. + [System.ComponentModel.TypeConverter(typeof(DeploymentTypeConverter))] + public partial interface IDeployment + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/Deployment.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/Deployment.TypeConverter.cs new file mode 100644 index 000000000000..4505179628b9 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/Deployment.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DeploymentTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Deployment.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Deployment.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Deployment.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/Deployment.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/Deployment.cs new file mode 100644 index 000000000000..4606a379e8ee --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/Deployment.cs @@ -0,0 +1,202 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// An deployment resource belonging to a device group resource. + public partial class Deployment : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentInternal, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProxyResource(); + + /// Deployment date UTC + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public global::System.DateTime? DateUtc { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentPropertiesInternal)Property).DeploymentDateUtc; } + + /// Images deployed + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public System.Collections.Generic.List DeployedImage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentPropertiesInternal)Property).DeployedImage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentPropertiesInternal)Property).DeployedImage = value ?? null /* arrayOf */; } + + /// Deployment ID + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string DeploymentId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentPropertiesInternal)Property).DeploymentId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentPropertiesInternal)Property).DeploymentId = value ?? null; } + + /// + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Id; } + + /// Internal Acessors for DateUtc + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentInternal.DateUtc { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentPropertiesInternal)Property).DeploymentDateUtc; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentPropertiesInternal)Property).DeploymentDateUtc = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentProperties Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeploymentProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentPropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeploymentProperties()); set => this._property = value; } + + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentPropertiesInternal)Property).ProvisioningState; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType = value ?? null; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType = value ?? null; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Type; } + + /// Creates an new instance. + public Deployment() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); + } + } + /// An deployment resource belonging to a device group resource. + public partial interface IDeployment : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProxyResource + { + /// Deployment date UTC + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Deployment date UTC", + SerializedName = @"deploymentDateUtc", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? DateUtc { get; } + /// Images deployed + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"Images deployed", + SerializedName = @"deployedImages", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage) })] + System.Collections.Generic.List DeployedImage { get; set; } + /// Deployment ID + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"Deployment ID", + SerializedName = @"deploymentId", + PossibleTypes = new [] { typeof(string) })] + string DeploymentId { get; set; } + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The status of the last operation.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")] + string ProvisioningState { get; } + + } + /// An deployment resource belonging to a device group resource. + internal partial interface IDeploymentInternal : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProxyResourceInternal + { + /// Deployment date UTC + global::System.DateTime? DateUtc { get; set; } + /// Images deployed + System.Collections.Generic.List DeployedImage { get; set; } + /// Deployment ID + string DeploymentId { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentProperties Property { get; set; } + /// The status of the last operation. + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")] + string ProvisioningState { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/Deployment.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/Deployment.json.cs new file mode 100644 index 000000000000..b6529bde559c --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/Deployment.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// An deployment resource belonging to a device group resource. + public partial class Deployment + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal Deployment(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeploymentProperties.FromJson(__jsonProperties) : _property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new Deployment(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __proxyResource?.ToJson(container, serializationMode); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeploymentListResult.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeploymentListResult.PowerShell.cs new file mode 100644 index 000000000000..3772a3e5aead --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeploymentListResult.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// The response of a Deployment list operation. + [System.ComponentModel.TypeConverter(typeof(DeploymentListResultTypeConverter))] + public partial class DeploymentListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DeploymentListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeploymentTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DeploymentListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeploymentTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DeploymentListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DeploymentListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The response of a Deployment list operation. + [System.ComponentModel.TypeConverter(typeof(DeploymentListResultTypeConverter))] + public partial interface IDeploymentListResult + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeploymentListResult.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeploymentListResult.TypeConverter.cs new file mode 100644 index 000000000000..5beb3f1c1208 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeploymentListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DeploymentListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DeploymentListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DeploymentListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DeploymentListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeploymentListResult.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeploymentListResult.cs new file mode 100644 index 000000000000..4c95c52777e1 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeploymentListResult.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The response of a Deployment list operation. + public partial class DeploymentListResult : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentListResult, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// The Deployment items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public DeploymentListResult() + { + + } + } + /// The response of a Deployment list operation. + public partial interface IDeploymentListResult : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The Deployment items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Deployment items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment) })] + System.Collections.Generic.List Value { get; set; } + + } + /// The response of a Deployment list operation. + internal partial interface IDeploymentListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The Deployment items on this page + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeploymentListResult.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeploymentListResult.json.cs new file mode 100644 index 000000000000..795feebd3a69 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeploymentListResult.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The response of a Deployment list operation. + public partial class DeploymentListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal DeploymentListResult(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment) (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Deployment.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new DeploymentListResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeploymentProperties.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeploymentProperties.PowerShell.cs new file mode 100644 index 000000000000..18f59ab2e247 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeploymentProperties.PowerShell.cs @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// The properties of deployment + [System.ComponentModel.TypeConverter(typeof(DeploymentPropertiesTypeConverter))] + public partial class DeploymentProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DeploymentProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DeploymentId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentPropertiesInternal)this).DeploymentId = (string) content.GetValueForProperty("DeploymentId",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentPropertiesInternal)this).DeploymentId, global::System.Convert.ToString); + } + if (content.Contains("DeployedImage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentPropertiesInternal)this).DeployedImage = (System.Collections.Generic.List) content.GetValueForProperty("DeployedImage",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentPropertiesInternal)this).DeployedImage, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ImageTypeConverter.ConvertFrom)); + } + if (content.Contains("DeploymentDateUtc")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentPropertiesInternal)this).DeploymentDateUtc = (global::System.DateTime?) content.GetValueForProperty("DeploymentDateUtc",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentPropertiesInternal)this).DeploymentDateUtc, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DeploymentProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DeploymentId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentPropertiesInternal)this).DeploymentId = (string) content.GetValueForProperty("DeploymentId",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentPropertiesInternal)this).DeploymentId, global::System.Convert.ToString); + } + if (content.Contains("DeployedImage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentPropertiesInternal)this).DeployedImage = (System.Collections.Generic.List) content.GetValueForProperty("DeployedImage",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentPropertiesInternal)this).DeployedImage, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ImageTypeConverter.ConvertFrom)); + } + if (content.Contains("DeploymentDateUtc")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentPropertiesInternal)this).DeploymentDateUtc = (global::System.DateTime?) content.GetValueForProperty("DeploymentDateUtc",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentPropertiesInternal)this).DeploymentDateUtc, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DeploymentProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DeploymentProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The properties of deployment + [System.ComponentModel.TypeConverter(typeof(DeploymentPropertiesTypeConverter))] + public partial interface IDeploymentProperties + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeploymentProperties.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeploymentProperties.TypeConverter.cs new file mode 100644 index 000000000000..2442b21b5583 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeploymentProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DeploymentPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DeploymentProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DeploymentProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DeploymentProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeploymentProperties.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeploymentProperties.cs new file mode 100644 index 000000000000..5c65a156e02e --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeploymentProperties.cs @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The properties of deployment + public partial class DeploymentProperties : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentProperties, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentPropertiesInternal + { + + /// Backing field for property. + private System.Collections.Generic.List _deployedImage; + + /// Images deployed + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public System.Collections.Generic.List DeployedImage { get => this._deployedImage; set => this._deployedImage = value; } + + /// Backing field for property. + private global::System.DateTime? _deploymentDateUtc; + + /// Deployment date UTC + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public global::System.DateTime? DeploymentDateUtc { get => this._deploymentDateUtc; } + + /// Backing field for property. + private string _deploymentId; + + /// Deployment ID + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string DeploymentId { get => this._deploymentId; set => this._deploymentId = value; } + + /// Internal Acessors for DeploymentDateUtc + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentPropertiesInternal.DeploymentDateUtc { get => this._deploymentDateUtc; set { {_deploymentDateUtc = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Backing field for property. + private string _provisioningState; + + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// Creates an new instance. + public DeploymentProperties() + { + + } + } + /// The properties of deployment + public partial interface IDeploymentProperties : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable + { + /// Images deployed + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"Images deployed", + SerializedName = @"deployedImages", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage) })] + System.Collections.Generic.List DeployedImage { get; set; } + /// Deployment date UTC + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Deployment date UTC", + SerializedName = @"deploymentDateUtc", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? DeploymentDateUtc { get; } + /// Deployment ID + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"Deployment ID", + SerializedName = @"deploymentId", + PossibleTypes = new [] { typeof(string) })] + string DeploymentId { get; set; } + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The status of the last operation.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")] + string ProvisioningState { get; } + + } + /// The properties of deployment + internal partial interface IDeploymentPropertiesInternal + + { + /// Images deployed + System.Collections.Generic.List DeployedImage { get; set; } + /// Deployment date UTC + global::System.DateTime? DeploymentDateUtc { get; set; } + /// Deployment ID + string DeploymentId { get; set; } + /// The status of the last operation. + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")] + string ProvisioningState { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeploymentProperties.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeploymentProperties.json.cs new file mode 100644 index 000000000000..6a545a7f7c9a --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeploymentProperties.json.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The properties of deployment + public partial class DeploymentProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal DeploymentProperties(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_deploymentId = If( json?.PropertyT("deploymentId"), out var __jsonDeploymentId) ? (string)__jsonDeploymentId : (string)_deploymentId;} + {_deployedImage = If( json?.PropertyT("deployedImages"), out var __jsonDeployedImages) ? If( __jsonDeployedImages as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage) (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Image.FromJson(__u) )) ))() : null : _deployedImage;} + {_deploymentDateUtc = If( json?.PropertyT("deploymentDateUtc"), out var __jsonDeploymentDateUtc) ? global::System.DateTime.TryParse((string)__jsonDeploymentDateUtc, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonDeploymentDateUtcValue) ? __jsonDeploymentDateUtcValue : _deploymentDateUtc : _deploymentDateUtc;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new DeploymentProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._deploymentId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._deploymentId.ToString()) : null, "deploymentId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate)) + { + if (null != this._deployedImage) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.XNodeArray(); + foreach( var __x in this._deployedImage ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("deployedImages",__w); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._deploymentDateUtc ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._deploymentDateUtc?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "deploymentDateUtc" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/Device.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/Device.PowerShell.cs new file mode 100644 index 000000000000..cf48bf65cff0 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/Device.PowerShell.cs @@ -0,0 +1,300 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// An device resource belonging to a device group resource. + [System.ComponentModel.TypeConverter(typeof(DeviceTypeConverter))] + public partial class Device + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Device(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Device(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Device(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DevicePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("DeviceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInternal)this).DeviceId = (string) content.GetValueForProperty("DeviceId",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInternal)this).DeviceId, global::System.Convert.ToString); + } + if (content.Contains("ChipSku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInternal)this).ChipSku = (string) content.GetValueForProperty("ChipSku",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInternal)this).ChipSku, global::System.Convert.ToString); + } + if (content.Contains("LastAvailableOSVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInternal)this).LastAvailableOSVersion = (string) content.GetValueForProperty("LastAvailableOSVersion",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInternal)this).LastAvailableOSVersion, global::System.Convert.ToString); + } + if (content.Contains("LastInstalledOSVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInternal)this).LastInstalledOSVersion = (string) content.GetValueForProperty("LastInstalledOSVersion",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInternal)this).LastInstalledOSVersion, global::System.Convert.ToString); + } + if (content.Contains("LastOSUpdateUtc")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInternal)this).LastOSUpdateUtc = (global::System.DateTime?) content.GetValueForProperty("LastOSUpdateUtc",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInternal)this).LastOSUpdateUtc, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LastUpdateRequestUtc")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInternal)this).LastUpdateRequestUtc = (global::System.DateTime?) content.GetValueForProperty("LastUpdateRequestUtc",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInternal)this).LastUpdateRequestUtc, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Device(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DevicePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("DeviceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInternal)this).DeviceId = (string) content.GetValueForProperty("DeviceId",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInternal)this).DeviceId, global::System.Convert.ToString); + } + if (content.Contains("ChipSku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInternal)this).ChipSku = (string) content.GetValueForProperty("ChipSku",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInternal)this).ChipSku, global::System.Convert.ToString); + } + if (content.Contains("LastAvailableOSVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInternal)this).LastAvailableOSVersion = (string) content.GetValueForProperty("LastAvailableOSVersion",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInternal)this).LastAvailableOSVersion, global::System.Convert.ToString); + } + if (content.Contains("LastInstalledOSVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInternal)this).LastInstalledOSVersion = (string) content.GetValueForProperty("LastInstalledOSVersion",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInternal)this).LastInstalledOSVersion, global::System.Convert.ToString); + } + if (content.Contains("LastOSUpdateUtc")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInternal)this).LastOSUpdateUtc = (global::System.DateTime?) content.GetValueForProperty("LastOSUpdateUtc",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInternal)this).LastOSUpdateUtc, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LastUpdateRequestUtc")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInternal)this).LastUpdateRequestUtc = (global::System.DateTime?) content.GetValueForProperty("LastUpdateRequestUtc",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInternal)this).LastUpdateRequestUtc, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// An device resource belonging to a device group resource. + [System.ComponentModel.TypeConverter(typeof(DeviceTypeConverter))] + public partial interface IDevice + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/Device.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/Device.TypeConverter.cs new file mode 100644 index 000000000000..165bfc0affd2 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/Device.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DeviceTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Device.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Device.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Device.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/Device.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/Device.cs new file mode 100644 index 000000000000..c5740328aeed --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/Device.cs @@ -0,0 +1,265 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// An device resource belonging to a device group resource. + public partial class Device : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInternal, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProxyResource(); + + /// SKU of the chip + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string ChipSku { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)Property).ChipSku; } + + /// Device ID + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string DeviceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)Property).DeviceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)Property).DeviceId = value ?? null; } + + /// + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Id; } + + /// OS version available for installation when update requested + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string LastAvailableOSVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)Property).LastAvailableOSVersion; } + + /// OS version running on device when update requested + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string LastInstalledOSVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)Property).LastInstalledOSVersion; } + + /// Time when update requested and new OS version available + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public global::System.DateTime? LastOSUpdateUtc { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)Property).LastOSUpdateUtc; } + + /// Time when update was last requested + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public global::System.DateTime? LastUpdateRequestUtc { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)Property).LastUpdateRequestUtc; } + + /// Internal Acessors for ChipSku + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInternal.ChipSku { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)Property).ChipSku; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)Property).ChipSku = value; } + + /// Internal Acessors for LastAvailableOSVersion + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInternal.LastAvailableOSVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)Property).LastAvailableOSVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)Property).LastAvailableOSVersion = value; } + + /// Internal Acessors for LastInstalledOSVersion + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInternal.LastInstalledOSVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)Property).LastInstalledOSVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)Property).LastInstalledOSVersion = value; } + + /// Internal Acessors for LastOSUpdateUtc + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInternal.LastOSUpdateUtc { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)Property).LastOSUpdateUtc; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)Property).LastOSUpdateUtc = value; } + + /// Internal Acessors for LastUpdateRequestUtc + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInternal.LastUpdateRequestUtc { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)Property).LastUpdateRequestUtc; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)Property).LastUpdateRequestUtc = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceProperties Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceProperties()); set => this._property = value; } + + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)Property).ProvisioningState; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType = value ?? null; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType = value ?? null; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Type; } + + /// Creates an new instance. + public Device() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); + } + } + /// An device resource belonging to a device group resource. + public partial interface IDevice : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProxyResource + { + /// SKU of the chip + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"SKU of the chip", + SerializedName = @"chipSku", + PossibleTypes = new [] { typeof(string) })] + string ChipSku { get; } + /// Device ID + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"Device ID", + SerializedName = @"deviceId", + PossibleTypes = new [] { typeof(string) })] + string DeviceId { get; set; } + /// OS version available for installation when update requested + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"OS version available for installation when update requested", + SerializedName = @"lastAvailableOsVersion", + PossibleTypes = new [] { typeof(string) })] + string LastAvailableOSVersion { get; } + /// OS version running on device when update requested + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"OS version running on device when update requested", + SerializedName = @"lastInstalledOsVersion", + PossibleTypes = new [] { typeof(string) })] + string LastInstalledOSVersion { get; } + /// Time when update requested and new OS version available + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Time when update requested and new OS version available", + SerializedName = @"lastOsUpdateUtc", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastOSUpdateUtc { get; } + /// Time when update was last requested + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Time when update was last requested", + SerializedName = @"lastUpdateRequestUtc", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastUpdateRequestUtc { get; } + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The status of the last operation.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")] + string ProvisioningState { get; } + + } + /// An device resource belonging to a device group resource. + internal partial interface IDeviceInternal : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProxyResourceInternal + { + /// SKU of the chip + string ChipSku { get; set; } + /// Device ID + string DeviceId { get; set; } + /// OS version available for installation when update requested + string LastAvailableOSVersion { get; set; } + /// OS version running on device when update requested + string LastInstalledOSVersion { get; set; } + /// Time when update requested and new OS version available + global::System.DateTime? LastOSUpdateUtc { get; set; } + /// Time when update was last requested + global::System.DateTime? LastUpdateRequestUtc { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceProperties Property { get; set; } + /// The status of the last operation. + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")] + string ProvisioningState { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/Device.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/Device.json.cs new file mode 100644 index 000000000000..8df14302aa88 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/Device.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// An device resource belonging to a device group resource. + public partial class Device + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal Device(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceProperties.FromJson(__jsonProperties) : _property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new Device(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __proxyResource?.ToJson(container, serializationMode); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroup.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroup.PowerShell.cs new file mode 100644 index 000000000000..667c1e6cb187 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroup.PowerShell.cs @@ -0,0 +1,300 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// An device group resource belonging to a product resource. + [System.ComponentModel.TypeConverter(typeof(DeviceGroupTypeConverter))] + public partial class DeviceGroup + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DeviceGroup(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DeviceGroup(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DeviceGroup(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroupPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("UpdatePolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupInternal)this).UpdatePolicy = (string) content.GetValueForProperty("UpdatePolicy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupInternal)this).UpdatePolicy, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("OSFeedType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupInternal)this).OSFeedType = (string) content.GetValueForProperty("OSFeedType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupInternal)this).OSFeedType, global::System.Convert.ToString); + } + if (content.Contains("AllowCrashDumpsCollection")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupInternal)this).AllowCrashDumpsCollection = (string) content.GetValueForProperty("AllowCrashDumpsCollection",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupInternal)this).AllowCrashDumpsCollection, global::System.Convert.ToString); + } + if (content.Contains("RegionalDataBoundary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupInternal)this).RegionalDataBoundary = (string) content.GetValueForProperty("RegionalDataBoundary",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupInternal)this).RegionalDataBoundary, global::System.Convert.ToString); + } + if (content.Contains("HasDeployment")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupInternal)this).HasDeployment = (bool?) content.GetValueForProperty("HasDeployment",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupInternal)this).HasDeployment, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DeviceGroup(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroupPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("UpdatePolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupInternal)this).UpdatePolicy = (string) content.GetValueForProperty("UpdatePolicy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupInternal)this).UpdatePolicy, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("OSFeedType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupInternal)this).OSFeedType = (string) content.GetValueForProperty("OSFeedType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupInternal)this).OSFeedType, global::System.Convert.ToString); + } + if (content.Contains("AllowCrashDumpsCollection")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupInternal)this).AllowCrashDumpsCollection = (string) content.GetValueForProperty("AllowCrashDumpsCollection",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupInternal)this).AllowCrashDumpsCollection, global::System.Convert.ToString); + } + if (content.Contains("RegionalDataBoundary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupInternal)this).RegionalDataBoundary = (string) content.GetValueForProperty("RegionalDataBoundary",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupInternal)this).RegionalDataBoundary, global::System.Convert.ToString); + } + if (content.Contains("HasDeployment")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupInternal)this).HasDeployment = (bool?) content.GetValueForProperty("HasDeployment",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupInternal)this).HasDeployment, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// An device group resource belonging to a product resource. + [System.ComponentModel.TypeConverter(typeof(DeviceGroupTypeConverter))] + public partial interface IDeviceGroup + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroup.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroup.TypeConverter.cs new file mode 100644 index 000000000000..3fb84f751949 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroup.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DeviceGroupTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DeviceGroup.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DeviceGroup.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DeviceGroup.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroup.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroup.cs new file mode 100644 index 000000000000..16c924ac87c5 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroup.cs @@ -0,0 +1,261 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// An device group resource belonging to a product resource. + public partial class DeviceGroup : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupInternal, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProxyResource(); + + /// Flag to define if the user allows for crash dump collection. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string AllowCrashDumpsCollection { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupPropertiesInternal)Property).AllowCrashDumpsCollection; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupPropertiesInternal)Property).AllowCrashDumpsCollection = value ?? null; } + + /// Description of the device group. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupPropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupPropertiesInternal)Property).Description = value ?? null; } + + /// Deployment status for the device group. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public bool? HasDeployment { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupPropertiesInternal)Property).HasDeployment; } + + /// + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Id; } + + /// Internal Acessors for HasDeployment + bool? Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupInternal.HasDeployment { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupPropertiesInternal)Property).HasDeployment; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupPropertiesInternal)Property).HasDeployment = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupProperties Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroupProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupPropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Name; } + + /// Operating system feed type of the device group. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string OSFeedType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupPropertiesInternal)Property).OSFeedType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupPropertiesInternal)Property).OSFeedType = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroupProperties()); set => this._property = value; } + + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupPropertiesInternal)Property).ProvisioningState; } + + /// Regional data boundary for the device group. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string RegionalDataBoundary { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupPropertiesInternal)Property).RegionalDataBoundary; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupPropertiesInternal)Property).RegionalDataBoundary = value ?? null; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType = value ?? null; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType = value ?? null; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Type; } + + /// Update policy of the device group. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string UpdatePolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupPropertiesInternal)Property).UpdatePolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupPropertiesInternal)Property).UpdatePolicy = value ?? null; } + + /// Creates an new instance. + public DeviceGroup() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); + } + } + /// An device group resource belonging to a product resource. + public partial interface IDeviceGroup : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProxyResource + { + /// Flag to define if the user allows for crash dump collection. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"Flag to define if the user allows for crash dump collection.", + SerializedName = @"allowCrashDumpsCollection", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Enabled", "Disabled")] + string AllowCrashDumpsCollection { get; set; } + /// Description of the device group. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"Description of the device group.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// Deployment status for the device group. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Deployment status for the device group.", + SerializedName = @"hasDeployment", + PossibleTypes = new [] { typeof(bool) })] + bool? HasDeployment { get; } + /// Operating system feed type of the device group. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"Operating system feed type of the device group.", + SerializedName = @"osFeedType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Retail", "RetailEval")] + string OSFeedType { get; set; } + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The status of the last operation.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")] + string ProvisioningState { get; } + /// Regional data boundary for the device group. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"Regional data boundary for the device group.", + SerializedName = @"regionalDataBoundary", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("None", "EU")] + string RegionalDataBoundary { get; set; } + /// Update policy of the device group. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"Update policy of the device group.", + SerializedName = @"updatePolicy", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("UpdateAll", "No3rdPartyAppUpdates")] + string UpdatePolicy { get; set; } + + } + /// An device group resource belonging to a product resource. + internal partial interface IDeviceGroupInternal : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProxyResourceInternal + { + /// Flag to define if the user allows for crash dump collection. + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Enabled", "Disabled")] + string AllowCrashDumpsCollection { get; set; } + /// Description of the device group. + string Description { get; set; } + /// Deployment status for the device group. + bool? HasDeployment { get; set; } + /// Operating system feed type of the device group. + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Retail", "RetailEval")] + string OSFeedType { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupProperties Property { get; set; } + /// The status of the last operation. + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")] + string ProvisioningState { get; set; } + /// Regional data boundary for the device group. + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("None", "EU")] + string RegionalDataBoundary { get; set; } + /// Update policy of the device group. + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("UpdateAll", "No3rdPartyAppUpdates")] + string UpdatePolicy { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroup.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroup.json.cs new file mode 100644 index 000000000000..7a17cba14d32 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroup.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// An device group resource belonging to a product resource. + public partial class DeviceGroup + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal DeviceGroup(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroupProperties.FromJson(__jsonProperties) : _property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new DeviceGroup(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __proxyResource?.ToJson(container, serializationMode); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupListResult.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupListResult.PowerShell.cs new file mode 100644 index 000000000000..46f27eb60e7d --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupListResult.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// The response of a DeviceGroup list operation. + [System.ComponentModel.TypeConverter(typeof(DeviceGroupListResultTypeConverter))] + public partial class DeviceGroupListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DeviceGroupListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DeviceGroupListResult(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DeviceGroupListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroupTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DeviceGroupListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroupTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The response of a DeviceGroup list operation. + [System.ComponentModel.TypeConverter(typeof(DeviceGroupListResultTypeConverter))] + public partial interface IDeviceGroupListResult + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupListResult.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupListResult.TypeConverter.cs new file mode 100644 index 000000000000..720eda95a50f --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DeviceGroupListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DeviceGroupListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DeviceGroupListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DeviceGroupListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupListResult.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupListResult.cs new file mode 100644 index 000000000000..7632fe87c45b --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupListResult.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The response of a DeviceGroup list operation. + public partial class DeviceGroupListResult : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupListResult, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// The DeviceGroup items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public DeviceGroupListResult() + { + + } + } + /// The response of a DeviceGroup list operation. + public partial interface IDeviceGroupListResult : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The DeviceGroup items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The DeviceGroup items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup) })] + System.Collections.Generic.List Value { get; set; } + + } + /// The response of a DeviceGroup list operation. + internal partial interface IDeviceGroupListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The DeviceGroup items on this page + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupListResult.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupListResult.json.cs new file mode 100644 index 000000000000..44867105cafc --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupListResult.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The response of a DeviceGroup list operation. + public partial class DeviceGroupListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal DeviceGroupListResult(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup) (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroup.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new DeviceGroupListResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupProperties.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupProperties.PowerShell.cs new file mode 100644 index 000000000000..f837bfd533fd --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupProperties.PowerShell.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// The properties of deviceGroup + [System.ComponentModel.TypeConverter(typeof(DeviceGroupPropertiesTypeConverter))] + public partial class DeviceGroupProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DeviceGroupProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DeviceGroupProperties(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DeviceGroupProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupPropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("OSFeedType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupPropertiesInternal)this).OSFeedType = (string) content.GetValueForProperty("OSFeedType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupPropertiesInternal)this).OSFeedType, global::System.Convert.ToString); + } + if (content.Contains("UpdatePolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupPropertiesInternal)this).UpdatePolicy = (string) content.GetValueForProperty("UpdatePolicy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupPropertiesInternal)this).UpdatePolicy, global::System.Convert.ToString); + } + if (content.Contains("AllowCrashDumpsCollection")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupPropertiesInternal)this).AllowCrashDumpsCollection = (string) content.GetValueForProperty("AllowCrashDumpsCollection",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupPropertiesInternal)this).AllowCrashDumpsCollection, global::System.Convert.ToString); + } + if (content.Contains("RegionalDataBoundary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupPropertiesInternal)this).RegionalDataBoundary = (string) content.GetValueForProperty("RegionalDataBoundary",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupPropertiesInternal)this).RegionalDataBoundary, global::System.Convert.ToString); + } + if (content.Contains("HasDeployment")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupPropertiesInternal)this).HasDeployment = (bool?) content.GetValueForProperty("HasDeployment",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupPropertiesInternal)this).HasDeployment, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DeviceGroupProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupPropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("OSFeedType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupPropertiesInternal)this).OSFeedType = (string) content.GetValueForProperty("OSFeedType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupPropertiesInternal)this).OSFeedType, global::System.Convert.ToString); + } + if (content.Contains("UpdatePolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupPropertiesInternal)this).UpdatePolicy = (string) content.GetValueForProperty("UpdatePolicy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupPropertiesInternal)this).UpdatePolicy, global::System.Convert.ToString); + } + if (content.Contains("AllowCrashDumpsCollection")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupPropertiesInternal)this).AllowCrashDumpsCollection = (string) content.GetValueForProperty("AllowCrashDumpsCollection",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupPropertiesInternal)this).AllowCrashDumpsCollection, global::System.Convert.ToString); + } + if (content.Contains("RegionalDataBoundary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupPropertiesInternal)this).RegionalDataBoundary = (string) content.GetValueForProperty("RegionalDataBoundary",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupPropertiesInternal)this).RegionalDataBoundary, global::System.Convert.ToString); + } + if (content.Contains("HasDeployment")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupPropertiesInternal)this).HasDeployment = (bool?) content.GetValueForProperty("HasDeployment",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupPropertiesInternal)this).HasDeployment, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The properties of deviceGroup + [System.ComponentModel.TypeConverter(typeof(DeviceGroupPropertiesTypeConverter))] + public partial interface IDeviceGroupProperties + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupProperties.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupProperties.TypeConverter.cs new file mode 100644 index 000000000000..38d38eb03cc4 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DeviceGroupPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DeviceGroupProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DeviceGroupProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DeviceGroupProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupProperties.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupProperties.cs new file mode 100644 index 000000000000..e6a0ff8047ee --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupProperties.cs @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The properties of deviceGroup + public partial class DeviceGroupProperties : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupProperties, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupPropertiesInternal + { + + /// Backing field for property. + private string _allowCrashDumpsCollection; + + /// Flag to define if the user allows for crash dump collection. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string AllowCrashDumpsCollection { get => this._allowCrashDumpsCollection; set => this._allowCrashDumpsCollection = value; } + + /// Backing field for property. + private string _description; + + /// Description of the device group. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string Description { get => this._description; set => this._description = value; } + + /// Backing field for property. + private bool? _hasDeployment; + + /// Deployment status for the device group. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public bool? HasDeployment { get => this._hasDeployment; } + + /// Internal Acessors for HasDeployment + bool? Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupPropertiesInternal.HasDeployment { get => this._hasDeployment; set { {_hasDeployment = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Backing field for property. + private string _oSFeedType; + + /// Operating system feed type of the device group. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string OSFeedType { get => this._oSFeedType; set => this._oSFeedType = value; } + + /// Backing field for property. + private string _provisioningState; + + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private string _regionalDataBoundary; + + /// Regional data boundary for the device group. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string RegionalDataBoundary { get => this._regionalDataBoundary; set => this._regionalDataBoundary = value; } + + /// Backing field for property. + private string _updatePolicy; + + /// Update policy of the device group. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string UpdatePolicy { get => this._updatePolicy; set => this._updatePolicy = value; } + + /// Creates an new instance. + public DeviceGroupProperties() + { + + } + } + /// The properties of deviceGroup + public partial interface IDeviceGroupProperties : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable + { + /// Flag to define if the user allows for crash dump collection. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Flag to define if the user allows for crash dump collection.", + SerializedName = @"allowCrashDumpsCollection", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Enabled", "Disabled")] + string AllowCrashDumpsCollection { get; set; } + /// Description of the device group. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Description of the device group.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// Deployment status for the device group. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Deployment status for the device group.", + SerializedName = @"hasDeployment", + PossibleTypes = new [] { typeof(bool) })] + bool? HasDeployment { get; } + /// Operating system feed type of the device group. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Operating system feed type of the device group.", + SerializedName = @"osFeedType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Retail", "RetailEval")] + string OSFeedType { get; set; } + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The status of the last operation.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")] + string ProvisioningState { get; } + /// Regional data boundary for the device group. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Regional data boundary for the device group.", + SerializedName = @"regionalDataBoundary", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("None", "EU")] + string RegionalDataBoundary { get; set; } + /// Update policy of the device group. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Update policy of the device group.", + SerializedName = @"updatePolicy", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("UpdateAll", "No3rdPartyAppUpdates")] + string UpdatePolicy { get; set; } + + } + /// The properties of deviceGroup + internal partial interface IDeviceGroupPropertiesInternal + + { + /// Flag to define if the user allows for crash dump collection. + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Enabled", "Disabled")] + string AllowCrashDumpsCollection { get; set; } + /// Description of the device group. + string Description { get; set; } + /// Deployment status for the device group. + bool? HasDeployment { get; set; } + /// Operating system feed type of the device group. + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Retail", "RetailEval")] + string OSFeedType { get; set; } + /// The status of the last operation. + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")] + string ProvisioningState { get; set; } + /// Regional data boundary for the device group. + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("None", "EU")] + string RegionalDataBoundary { get; set; } + /// Update policy of the device group. + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("UpdateAll", "No3rdPartyAppUpdates")] + string UpdatePolicy { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupProperties.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupProperties.json.cs new file mode 100644 index 000000000000..cb93095712f6 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupProperties.json.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The properties of deviceGroup + public partial class DeviceGroupProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal DeviceGroupProperties(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)_description;} + {_oSFeedType = If( json?.PropertyT("osFeedType"), out var __jsonOSFeedType) ? (string)__jsonOSFeedType : (string)_oSFeedType;} + {_updatePolicy = If( json?.PropertyT("updatePolicy"), out var __jsonUpdatePolicy) ? (string)__jsonUpdatePolicy : (string)_updatePolicy;} + {_allowCrashDumpsCollection = If( json?.PropertyT("allowCrashDumpsCollection"), out var __jsonAllowCrashDumpsCollection) ? (string)__jsonAllowCrashDumpsCollection : (string)_allowCrashDumpsCollection;} + {_regionalDataBoundary = If( json?.PropertyT("regionalDataBoundary"), out var __jsonRegionalDataBoundary) ? (string)__jsonRegionalDataBoundary : (string)_regionalDataBoundary;} + {_hasDeployment = If( json?.PropertyT("hasDeployment"), out var __jsonHasDeployment) ? (bool?)__jsonHasDeployment : _hasDeployment;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new DeviceGroupProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); + AddIf( null != (((object)this._oSFeedType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._oSFeedType.ToString()) : null, "osFeedType" ,container.Add ); + AddIf( null != (((object)this._updatePolicy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._updatePolicy.ToString()) : null, "updatePolicy" ,container.Add ); + AddIf( null != (((object)this._allowCrashDumpsCollection)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._allowCrashDumpsCollection.ToString()) : null, "allowCrashDumpsCollection" ,container.Add ); + AddIf( null != (((object)this._regionalDataBoundary)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._regionalDataBoundary.ToString()) : null, "regionalDataBoundary" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._hasDeployment ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonBoolean((bool)this._hasDeployment) : null, "hasDeployment" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupUpdate.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupUpdate.PowerShell.cs new file mode 100644 index 000000000000..e59a635fba8a --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupUpdate.PowerShell.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// The type used for update operations of the DeviceGroup. + [System.ComponentModel.TypeConverter(typeof(DeviceGroupUpdateTypeConverter))] + public partial class DeviceGroupUpdate + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DeviceGroupUpdate(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DeviceGroupUpdate(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DeviceGroupUpdate(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroupUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("UpdatePolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdateInternal)this).UpdatePolicy = (string) content.GetValueForProperty("UpdatePolicy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdateInternal)this).UpdatePolicy, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdateInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdateInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("OSFeedType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdateInternal)this).OSFeedType = (string) content.GetValueForProperty("OSFeedType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdateInternal)this).OSFeedType, global::System.Convert.ToString); + } + if (content.Contains("AllowCrashDumpsCollection")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdateInternal)this).AllowCrashDumpsCollection = (string) content.GetValueForProperty("AllowCrashDumpsCollection",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdateInternal)this).AllowCrashDumpsCollection, global::System.Convert.ToString); + } + if (content.Contains("RegionalDataBoundary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdateInternal)this).RegionalDataBoundary = (string) content.GetValueForProperty("RegionalDataBoundary",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdateInternal)this).RegionalDataBoundary, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DeviceGroupUpdate(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroupUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("UpdatePolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdateInternal)this).UpdatePolicy = (string) content.GetValueForProperty("UpdatePolicy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdateInternal)this).UpdatePolicy, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdateInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdateInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("OSFeedType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdateInternal)this).OSFeedType = (string) content.GetValueForProperty("OSFeedType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdateInternal)this).OSFeedType, global::System.Convert.ToString); + } + if (content.Contains("AllowCrashDumpsCollection")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdateInternal)this).AllowCrashDumpsCollection = (string) content.GetValueForProperty("AllowCrashDumpsCollection",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdateInternal)this).AllowCrashDumpsCollection, global::System.Convert.ToString); + } + if (content.Contains("RegionalDataBoundary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdateInternal)this).RegionalDataBoundary = (string) content.GetValueForProperty("RegionalDataBoundary",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdateInternal)this).RegionalDataBoundary, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The type used for update operations of the DeviceGroup. + [System.ComponentModel.TypeConverter(typeof(DeviceGroupUpdateTypeConverter))] + public partial interface IDeviceGroupUpdate + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupUpdate.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupUpdate.TypeConverter.cs new file mode 100644 index 000000000000..dbc2468730b2 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupUpdate.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DeviceGroupUpdateTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdate ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdate).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DeviceGroupUpdate.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DeviceGroupUpdate.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DeviceGroupUpdate.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupUpdate.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupUpdate.cs new file mode 100644 index 000000000000..a45374eae68e --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupUpdate.cs @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The type used for update operations of the DeviceGroup. + public partial class DeviceGroupUpdate : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdate, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdateInternal + { + + /// Flag to define if the user allows for crash dump collection. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string AllowCrashDumpsCollection { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdatePropertiesInternal)Property).AllowCrashDumpsCollection; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdatePropertiesInternal)Property).AllowCrashDumpsCollection = value ?? null; } + + /// Description of the device group. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdatePropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdatePropertiesInternal)Property).Description = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdateProperties Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroupUpdateProperties()); set { {_property = value;} } } + + /// Operating system feed type of the device group. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string OSFeedType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdatePropertiesInternal)Property).OSFeedType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdatePropertiesInternal)Property).OSFeedType = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdateProperties _property; + + /// The updatable properties of the DeviceGroup. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroupUpdateProperties()); set => this._property = value; } + + /// Regional data boundary for the device group. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string RegionalDataBoundary { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdatePropertiesInternal)Property).RegionalDataBoundary; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdatePropertiesInternal)Property).RegionalDataBoundary = value ?? null; } + + /// Update policy of the device group. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string UpdatePolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdatePropertiesInternal)Property).UpdatePolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdatePropertiesInternal)Property).UpdatePolicy = value ?? null; } + + /// Creates an new instance. + public DeviceGroupUpdate() + { + + } + } + /// The type used for update operations of the DeviceGroup. + public partial interface IDeviceGroupUpdate : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable + { + /// Flag to define if the user allows for crash dump collection. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Flag to define if the user allows for crash dump collection.", + SerializedName = @"allowCrashDumpsCollection", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Enabled", "Disabled")] + string AllowCrashDumpsCollection { get; set; } + /// Description of the device group. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Description of the device group.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// Operating system feed type of the device group. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Operating system feed type of the device group.", + SerializedName = @"osFeedType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Retail", "RetailEval")] + string OSFeedType { get; set; } + /// Regional data boundary for the device group. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Regional data boundary for the device group.", + SerializedName = @"regionalDataBoundary", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("None", "EU")] + string RegionalDataBoundary { get; set; } + /// Update policy of the device group. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Update policy of the device group.", + SerializedName = @"updatePolicy", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("UpdateAll", "No3rdPartyAppUpdates")] + string UpdatePolicy { get; set; } + + } + /// The type used for update operations of the DeviceGroup. + internal partial interface IDeviceGroupUpdateInternal + + { + /// Flag to define if the user allows for crash dump collection. + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Enabled", "Disabled")] + string AllowCrashDumpsCollection { get; set; } + /// Description of the device group. + string Description { get; set; } + /// Operating system feed type of the device group. + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Retail", "RetailEval")] + string OSFeedType { get; set; } + /// The updatable properties of the DeviceGroup. + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdateProperties Property { get; set; } + /// Regional data boundary for the device group. + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("None", "EU")] + string RegionalDataBoundary { get; set; } + /// Update policy of the device group. + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("UpdateAll", "No3rdPartyAppUpdates")] + string UpdatePolicy { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupUpdate.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupUpdate.json.cs new file mode 100644 index 000000000000..f4185c279120 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupUpdate.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The type used for update operations of the DeviceGroup. + public partial class DeviceGroupUpdate + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal DeviceGroupUpdate(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroupUpdateProperties.FromJson(__jsonProperties) : _property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdate. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdate. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new DeviceGroupUpdate(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupUpdateProperties.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupUpdateProperties.PowerShell.cs new file mode 100644 index 000000000000..76dd8f2c415f --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupUpdateProperties.PowerShell.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// The updatable properties of the DeviceGroup. + [System.ComponentModel.TypeConverter(typeof(DeviceGroupUpdatePropertiesTypeConverter))] + public partial class DeviceGroupUpdateProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DeviceGroupUpdateProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DeviceGroupUpdateProperties(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DeviceGroupUpdateProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("OSFeedType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdatePropertiesInternal)this).OSFeedType = (string) content.GetValueForProperty("OSFeedType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdatePropertiesInternal)this).OSFeedType, global::System.Convert.ToString); + } + if (content.Contains("UpdatePolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdatePropertiesInternal)this).UpdatePolicy = (string) content.GetValueForProperty("UpdatePolicy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdatePropertiesInternal)this).UpdatePolicy, global::System.Convert.ToString); + } + if (content.Contains("AllowCrashDumpsCollection")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdatePropertiesInternal)this).AllowCrashDumpsCollection = (string) content.GetValueForProperty("AllowCrashDumpsCollection",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdatePropertiesInternal)this).AllowCrashDumpsCollection, global::System.Convert.ToString); + } + if (content.Contains("RegionalDataBoundary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdatePropertiesInternal)this).RegionalDataBoundary = (string) content.GetValueForProperty("RegionalDataBoundary",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdatePropertiesInternal)this).RegionalDataBoundary, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DeviceGroupUpdateProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("OSFeedType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdatePropertiesInternal)this).OSFeedType = (string) content.GetValueForProperty("OSFeedType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdatePropertiesInternal)this).OSFeedType, global::System.Convert.ToString); + } + if (content.Contains("UpdatePolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdatePropertiesInternal)this).UpdatePolicy = (string) content.GetValueForProperty("UpdatePolicy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdatePropertiesInternal)this).UpdatePolicy, global::System.Convert.ToString); + } + if (content.Contains("AllowCrashDumpsCollection")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdatePropertiesInternal)this).AllowCrashDumpsCollection = (string) content.GetValueForProperty("AllowCrashDumpsCollection",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdatePropertiesInternal)this).AllowCrashDumpsCollection, global::System.Convert.ToString); + } + if (content.Contains("RegionalDataBoundary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdatePropertiesInternal)this).RegionalDataBoundary = (string) content.GetValueForProperty("RegionalDataBoundary",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdatePropertiesInternal)this).RegionalDataBoundary, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The updatable properties of the DeviceGroup. + [System.ComponentModel.TypeConverter(typeof(DeviceGroupUpdatePropertiesTypeConverter))] + public partial interface IDeviceGroupUpdateProperties + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupUpdateProperties.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupUpdateProperties.TypeConverter.cs new file mode 100644 index 000000000000..20200c2b7ee6 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupUpdateProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DeviceGroupUpdatePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdateProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdateProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DeviceGroupUpdateProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DeviceGroupUpdateProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DeviceGroupUpdateProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupUpdateProperties.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupUpdateProperties.cs new file mode 100644 index 000000000000..235beb213e0b --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupUpdateProperties.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The updatable properties of the DeviceGroup. + public partial class DeviceGroupUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdateProperties, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdatePropertiesInternal + { + + /// Backing field for property. + private string _allowCrashDumpsCollection; + + /// Flag to define if the user allows for crash dump collection. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string AllowCrashDumpsCollection { get => this._allowCrashDumpsCollection; set => this._allowCrashDumpsCollection = value; } + + /// Backing field for property. + private string _description; + + /// Description of the device group. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string Description { get => this._description; set => this._description = value; } + + /// Backing field for property. + private string _oSFeedType; + + /// Operating system feed type of the device group. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string OSFeedType { get => this._oSFeedType; set => this._oSFeedType = value; } + + /// Backing field for property. + private string _regionalDataBoundary; + + /// Regional data boundary for the device group. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string RegionalDataBoundary { get => this._regionalDataBoundary; set => this._regionalDataBoundary = value; } + + /// Backing field for property. + private string _updatePolicy; + + /// Update policy of the device group. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string UpdatePolicy { get => this._updatePolicy; set => this._updatePolicy = value; } + + /// Creates an new instance. + public DeviceGroupUpdateProperties() + { + + } + } + /// The updatable properties of the DeviceGroup. + public partial interface IDeviceGroupUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable + { + /// Flag to define if the user allows for crash dump collection. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Flag to define if the user allows for crash dump collection.", + SerializedName = @"allowCrashDumpsCollection", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Enabled", "Disabled")] + string AllowCrashDumpsCollection { get; set; } + /// Description of the device group. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Description of the device group.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// Operating system feed type of the device group. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Operating system feed type of the device group.", + SerializedName = @"osFeedType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Retail", "RetailEval")] + string OSFeedType { get; set; } + /// Regional data boundary for the device group. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Regional data boundary for the device group.", + SerializedName = @"regionalDataBoundary", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("None", "EU")] + string RegionalDataBoundary { get; set; } + /// Update policy of the device group. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Update policy of the device group.", + SerializedName = @"updatePolicy", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("UpdateAll", "No3rdPartyAppUpdates")] + string UpdatePolicy { get; set; } + + } + /// The updatable properties of the DeviceGroup. + internal partial interface IDeviceGroupUpdatePropertiesInternal + + { + /// Flag to define if the user allows for crash dump collection. + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Enabled", "Disabled")] + string AllowCrashDumpsCollection { get; set; } + /// Description of the device group. + string Description { get; set; } + /// Operating system feed type of the device group. + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Retail", "RetailEval")] + string OSFeedType { get; set; } + /// Regional data boundary for the device group. + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("None", "EU")] + string RegionalDataBoundary { get; set; } + /// Update policy of the device group. + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("UpdateAll", "No3rdPartyAppUpdates")] + string UpdatePolicy { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupUpdateProperties.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupUpdateProperties.json.cs new file mode 100644 index 000000000000..17dc362e14d3 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceGroupUpdateProperties.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The updatable properties of the DeviceGroup. + public partial class DeviceGroupUpdateProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal DeviceGroupUpdateProperties(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)_description;} + {_oSFeedType = If( json?.PropertyT("osFeedType"), out var __jsonOSFeedType) ? (string)__jsonOSFeedType : (string)_oSFeedType;} + {_updatePolicy = If( json?.PropertyT("updatePolicy"), out var __jsonUpdatePolicy) ? (string)__jsonUpdatePolicy : (string)_updatePolicy;} + {_allowCrashDumpsCollection = If( json?.PropertyT("allowCrashDumpsCollection"), out var __jsonAllowCrashDumpsCollection) ? (string)__jsonAllowCrashDumpsCollection : (string)_allowCrashDumpsCollection;} + {_regionalDataBoundary = If( json?.PropertyT("regionalDataBoundary"), out var __jsonRegionalDataBoundary) ? (string)__jsonRegionalDataBoundary : (string)_regionalDataBoundary;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdateProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdateProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new DeviceGroupUpdateProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); + AddIf( null != (((object)this._oSFeedType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._oSFeedType.ToString()) : null, "osFeedType" ,container.Add ); + AddIf( null != (((object)this._updatePolicy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._updatePolicy.ToString()) : null, "updatePolicy" ,container.Add ); + AddIf( null != (((object)this._allowCrashDumpsCollection)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._allowCrashDumpsCollection.ToString()) : null, "allowCrashDumpsCollection" ,container.Add ); + AddIf( null != (((object)this._regionalDataBoundary)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._regionalDataBoundary.ToString()) : null, "regionalDataBoundary" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceInsight.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceInsight.PowerShell.cs new file mode 100644 index 000000000000..7eaa887462f1 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceInsight.PowerShell.cs @@ -0,0 +1,220 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// Device insight report. + [System.ComponentModel.TypeConverter(typeof(DeviceInsightTypeConverter))] + public partial class DeviceInsight + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsight DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DeviceInsight(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsight DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DeviceInsight(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DeviceInsight(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DeviceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsightInternal)this).DeviceId = (string) content.GetValueForProperty("DeviceId",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsightInternal)this).DeviceId, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsightInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsightInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("StartTimestampUtc")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsightInternal)this).StartTimestampUtc = (global::System.DateTime) content.GetValueForProperty("StartTimestampUtc",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsightInternal)this).StartTimestampUtc, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EndTimestampUtc")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsightInternal)this).EndTimestampUtc = (global::System.DateTime) content.GetValueForProperty("EndTimestampUtc",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsightInternal)this).EndTimestampUtc, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EventCategory")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsightInternal)this).EventCategory = (string) content.GetValueForProperty("EventCategory",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsightInternal)this).EventCategory, global::System.Convert.ToString); + } + if (content.Contains("EventClass")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsightInternal)this).EventClass = (string) content.GetValueForProperty("EventClass",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsightInternal)this).EventClass, global::System.Convert.ToString); + } + if (content.Contains("EventType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsightInternal)this).EventType = (string) content.GetValueForProperty("EventType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsightInternal)this).EventType, global::System.Convert.ToString); + } + if (content.Contains("EventCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsightInternal)this).EventCount = (int) content.GetValueForProperty("EventCount",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsightInternal)this).EventCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DeviceInsight(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DeviceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsightInternal)this).DeviceId = (string) content.GetValueForProperty("DeviceId",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsightInternal)this).DeviceId, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsightInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsightInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("StartTimestampUtc")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsightInternal)this).StartTimestampUtc = (global::System.DateTime) content.GetValueForProperty("StartTimestampUtc",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsightInternal)this).StartTimestampUtc, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EndTimestampUtc")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsightInternal)this).EndTimestampUtc = (global::System.DateTime) content.GetValueForProperty("EndTimestampUtc",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsightInternal)this).EndTimestampUtc, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EventCategory")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsightInternal)this).EventCategory = (string) content.GetValueForProperty("EventCategory",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsightInternal)this).EventCategory, global::System.Convert.ToString); + } + if (content.Contains("EventClass")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsightInternal)this).EventClass = (string) content.GetValueForProperty("EventClass",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsightInternal)this).EventClass, global::System.Convert.ToString); + } + if (content.Contains("EventType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsightInternal)this).EventType = (string) content.GetValueForProperty("EventType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsightInternal)this).EventType, global::System.Convert.ToString); + } + if (content.Contains("EventCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsightInternal)this).EventCount = (int) content.GetValueForProperty("EventCount",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsightInternal)this).EventCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsight FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Device insight report. + [System.ComponentModel.TypeConverter(typeof(DeviceInsightTypeConverter))] + public partial interface IDeviceInsight + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceInsight.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceInsight.TypeConverter.cs new file mode 100644 index 000000000000..4c05a82627ef --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceInsight.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DeviceInsightTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsight ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsight).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DeviceInsight.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DeviceInsight.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DeviceInsight.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceInsight.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceInsight.cs new file mode 100644 index 000000000000..d74554654cf7 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceInsight.cs @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// Device insight report. + public partial class DeviceInsight : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsight, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsightInternal + { + + /// Backing field for property. + private string _description; + + /// Event description + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string Description { get => this._description; set => this._description = value; } + + /// Backing field for property. + private string _deviceId; + + /// Device ID + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string DeviceId { get => this._deviceId; set => this._deviceId = value; } + + /// Backing field for property. + private global::System.DateTime _endTimestampUtc; + + /// Event end timestamp + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public global::System.DateTime EndTimestampUtc { get => this._endTimestampUtc; set => this._endTimestampUtc = value; } + + /// Backing field for property. + private string _eventCategory; + + /// Event category + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string EventCategory { get => this._eventCategory; set => this._eventCategory = value; } + + /// Backing field for property. + private string _eventClass; + + /// Event class + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string EventClass { get => this._eventClass; set => this._eventClass = value; } + + /// Backing field for property. + private int _eventCount; + + /// Event count + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public int EventCount { get => this._eventCount; set => this._eventCount = value; } + + /// Backing field for property. + private string _eventType; + + /// Event type + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string EventType { get => this._eventType; set => this._eventType = value; } + + /// Backing field for property. + private global::System.DateTime _startTimestampUtc; + + /// Event start timestamp + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public global::System.DateTime StartTimestampUtc { get => this._startTimestampUtc; set => this._startTimestampUtc = value; } + + /// Creates an new instance. + public DeviceInsight() + { + + } + } + /// Device insight report. + public partial interface IDeviceInsight : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable + { + /// Event description + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Event description", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// Device ID + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Device ID", + SerializedName = @"deviceId", + PossibleTypes = new [] { typeof(string) })] + string DeviceId { get; set; } + /// Event end timestamp + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Event end timestamp", + SerializedName = @"endTimestampUtc", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime EndTimestampUtc { get; set; } + /// Event category + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Event category", + SerializedName = @"eventCategory", + PossibleTypes = new [] { typeof(string) })] + string EventCategory { get; set; } + /// Event class + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Event class", + SerializedName = @"eventClass", + PossibleTypes = new [] { typeof(string) })] + string EventClass { get; set; } + /// Event count + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Event count", + SerializedName = @"eventCount", + PossibleTypes = new [] { typeof(int) })] + int EventCount { get; set; } + /// Event type + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Event type", + SerializedName = @"eventType", + PossibleTypes = new [] { typeof(string) })] + string EventType { get; set; } + /// Event start timestamp + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Event start timestamp", + SerializedName = @"startTimestampUtc", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime StartTimestampUtc { get; set; } + + } + /// Device insight report. + internal partial interface IDeviceInsightInternal + + { + /// Event description + string Description { get; set; } + /// Device ID + string DeviceId { get; set; } + /// Event end timestamp + global::System.DateTime EndTimestampUtc { get; set; } + /// Event category + string EventCategory { get; set; } + /// Event class + string EventClass { get; set; } + /// Event count + int EventCount { get; set; } + /// Event type + string EventType { get; set; } + /// Event start timestamp + global::System.DateTime StartTimestampUtc { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceInsight.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceInsight.json.cs new file mode 100644 index 000000000000..c9918ca8ab97 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceInsight.json.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// Device insight report. + public partial class DeviceInsight + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal DeviceInsight(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_deviceId = If( json?.PropertyT("deviceId"), out var __jsonDeviceId) ? (string)__jsonDeviceId : (string)_deviceId;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)_description;} + {_startTimestampUtc = If( json?.PropertyT("startTimestampUtc"), out var __jsonStartTimestampUtc) ? global::System.DateTime.TryParse((string)__jsonStartTimestampUtc, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStartTimestampUtcValue) ? __jsonStartTimestampUtcValue : _startTimestampUtc : _startTimestampUtc;} + {_endTimestampUtc = If( json?.PropertyT("endTimestampUtc"), out var __jsonEndTimestampUtc) ? global::System.DateTime.TryParse((string)__jsonEndTimestampUtc, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEndTimestampUtcValue) ? __jsonEndTimestampUtcValue : _endTimestampUtc : _endTimestampUtc;} + {_eventCategory = If( json?.PropertyT("eventCategory"), out var __jsonEventCategory) ? (string)__jsonEventCategory : (string)_eventCategory;} + {_eventClass = If( json?.PropertyT("eventClass"), out var __jsonEventClass) ? (string)__jsonEventClass : (string)_eventClass;} + {_eventType = If( json?.PropertyT("eventType"), out var __jsonEventType) ? (string)__jsonEventType : (string)_eventType;} + {_eventCount = If( json?.PropertyT("eventCount"), out var __jsonEventCount) ? (int)__jsonEventCount : _eventCount;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsight. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsight. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsight FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new DeviceInsight(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._deviceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._deviceId.ToString()) : null, "deviceId" ,container.Add ); + AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._startTimestampUtc.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)), "startTimestampUtc" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._endTimestampUtc.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)), "endTimestampUtc" ,container.Add ); + AddIf( null != (((object)this._eventCategory)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._eventCategory.ToString()) : null, "eventCategory" ,container.Add ); + AddIf( null != (((object)this._eventClass)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._eventClass.ToString()) : null, "eventClass" ,container.Add ); + AddIf( null != (((object)this._eventType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._eventType.ToString()) : null, "eventType" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNumber(this._eventCount), "eventCount" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceListResult.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceListResult.PowerShell.cs new file mode 100644 index 000000000000..ec020ff38425 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceListResult.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// The response of a Device list operation. + [System.ComponentModel.TypeConverter(typeof(DeviceListResultTypeConverter))] + public partial class DeviceListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DeviceListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DeviceListResult(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DeviceListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DeviceListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The response of a Device list operation. + [System.ComponentModel.TypeConverter(typeof(DeviceListResultTypeConverter))] + public partial interface IDeviceListResult + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceListResult.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceListResult.TypeConverter.cs new file mode 100644 index 000000000000..0343cff86858 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DeviceListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DeviceListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DeviceListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DeviceListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceListResult.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceListResult.cs new file mode 100644 index 000000000000..7c1d3ae300bf --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceListResult.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The response of a Device list operation. + public partial class DeviceListResult : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceListResult, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// The Device items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public DeviceListResult() + { + + } + } + /// The response of a Device list operation. + public partial interface IDeviceListResult : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The Device items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Device items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice) })] + System.Collections.Generic.List Value { get; set; } + + } + /// The response of a Device list operation. + internal partial interface IDeviceListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The Device items on this page + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceListResult.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceListResult.json.cs new file mode 100644 index 000000000000..7aa3a2f7c6b5 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceListResult.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The response of a Device list operation. + public partial class DeviceListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal DeviceListResult(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice) (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Device.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new DeviceListResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DevicePatchProperties.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DevicePatchProperties.PowerShell.cs new file mode 100644 index 000000000000..6f7527018600 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DevicePatchProperties.PowerShell.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// The properties of device patch + [System.ComponentModel.TypeConverter(typeof(DevicePatchPropertiesTypeConverter))] + public partial class DevicePatchProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePatchProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DevicePatchProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePatchProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DevicePatchProperties(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DevicePatchProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DeviceGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePatchPropertiesInternal)this).DeviceGroupId = (string) content.GetValueForProperty("DeviceGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePatchPropertiesInternal)this).DeviceGroupId, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DevicePatchProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DeviceGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePatchPropertiesInternal)this).DeviceGroupId = (string) content.GetValueForProperty("DeviceGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePatchPropertiesInternal)this).DeviceGroupId, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePatchProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The properties of device patch + [System.ComponentModel.TypeConverter(typeof(DevicePatchPropertiesTypeConverter))] + public partial interface IDevicePatchProperties + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DevicePatchProperties.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DevicePatchProperties.TypeConverter.cs new file mode 100644 index 000000000000..5d36baeb48df --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DevicePatchProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DevicePatchPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePatchProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePatchProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DevicePatchProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DevicePatchProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DevicePatchProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DevicePatchProperties.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DevicePatchProperties.cs new file mode 100644 index 000000000000..4ea8a7c0623f --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DevicePatchProperties.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The properties of device patch + public partial class DevicePatchProperties : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePatchProperties, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePatchPropertiesInternal + { + + /// Backing field for property. + private string _deviceGroupId; + + /// Device group id + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string DeviceGroupId { get => this._deviceGroupId; set => this._deviceGroupId = value; } + + /// Creates an new instance. + public DevicePatchProperties() + { + + } + } + /// The properties of device patch + public partial interface IDevicePatchProperties : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable + { + /// Device group id + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Device group id", + SerializedName = @"deviceGroupId", + PossibleTypes = new [] { typeof(string) })] + string DeviceGroupId { get; set; } + + } + /// The properties of device patch + internal partial interface IDevicePatchPropertiesInternal + + { + /// Device group id + string DeviceGroupId { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DevicePatchProperties.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DevicePatchProperties.json.cs new file mode 100644 index 000000000000..936e2760c703 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DevicePatchProperties.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The properties of device patch + public partial class DevicePatchProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal DevicePatchProperties(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_deviceGroupId = If( json?.PropertyT("deviceGroupId"), out var __jsonDeviceGroupId) ? (string)__jsonDeviceGroupId : (string)_deviceGroupId;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePatchProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePatchProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePatchProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new DevicePatchProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._deviceGroupId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._deviceGroupId.ToString()) : null, "deviceGroupId" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceProperties.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceProperties.PowerShell.cs new file mode 100644 index 000000000000..432f5210f80f --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceProperties.PowerShell.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// The properties of device + [System.ComponentModel.TypeConverter(typeof(DevicePropertiesTypeConverter))] + public partial class DeviceProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DeviceProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DeviceProperties(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DeviceProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DeviceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)this).DeviceId = (string) content.GetValueForProperty("DeviceId",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)this).DeviceId, global::System.Convert.ToString); + } + if (content.Contains("ChipSku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)this).ChipSku = (string) content.GetValueForProperty("ChipSku",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)this).ChipSku, global::System.Convert.ToString); + } + if (content.Contains("LastAvailableOSVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)this).LastAvailableOSVersion = (string) content.GetValueForProperty("LastAvailableOSVersion",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)this).LastAvailableOSVersion, global::System.Convert.ToString); + } + if (content.Contains("LastInstalledOSVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)this).LastInstalledOSVersion = (string) content.GetValueForProperty("LastInstalledOSVersion",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)this).LastInstalledOSVersion, global::System.Convert.ToString); + } + if (content.Contains("LastOSUpdateUtc")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)this).LastOSUpdateUtc = (global::System.DateTime?) content.GetValueForProperty("LastOSUpdateUtc",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)this).LastOSUpdateUtc, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LastUpdateRequestUtc")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)this).LastUpdateRequestUtc = (global::System.DateTime?) content.GetValueForProperty("LastUpdateRequestUtc",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)this).LastUpdateRequestUtc, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DeviceProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DeviceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)this).DeviceId = (string) content.GetValueForProperty("DeviceId",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)this).DeviceId, global::System.Convert.ToString); + } + if (content.Contains("ChipSku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)this).ChipSku = (string) content.GetValueForProperty("ChipSku",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)this).ChipSku, global::System.Convert.ToString); + } + if (content.Contains("LastAvailableOSVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)this).LastAvailableOSVersion = (string) content.GetValueForProperty("LastAvailableOSVersion",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)this).LastAvailableOSVersion, global::System.Convert.ToString); + } + if (content.Contains("LastInstalledOSVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)this).LastInstalledOSVersion = (string) content.GetValueForProperty("LastInstalledOSVersion",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)this).LastInstalledOSVersion, global::System.Convert.ToString); + } + if (content.Contains("LastOSUpdateUtc")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)this).LastOSUpdateUtc = (global::System.DateTime?) content.GetValueForProperty("LastOSUpdateUtc",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)this).LastOSUpdateUtc, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LastUpdateRequestUtc")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)this).LastUpdateRequestUtc = (global::System.DateTime?) content.GetValueForProperty("LastUpdateRequestUtc",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)this).LastUpdateRequestUtc, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The properties of device + [System.ComponentModel.TypeConverter(typeof(DevicePropertiesTypeConverter))] + public partial interface IDeviceProperties + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceProperties.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceProperties.TypeConverter.cs new file mode 100644 index 000000000000..dfe798586387 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DevicePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DeviceProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DeviceProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DeviceProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceProperties.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceProperties.cs new file mode 100644 index 000000000000..74779f004cf8 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceProperties.cs @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The properties of device + public partial class DeviceProperties : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceProperties, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal + { + + /// Backing field for property. + private string _chipSku; + + /// SKU of the chip + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string ChipSku { get => this._chipSku; } + + /// Backing field for property. + private string _deviceId; + + /// Device ID + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string DeviceId { get => this._deviceId; set => this._deviceId = value; } + + /// Backing field for property. + private string _lastAvailableOSVersion; + + /// OS version available for installation when update requested + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string LastAvailableOSVersion { get => this._lastAvailableOSVersion; } + + /// Backing field for property. + private string _lastInstalledOSVersion; + + /// OS version running on device when update requested + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string LastInstalledOSVersion { get => this._lastInstalledOSVersion; } + + /// Backing field for property. + private global::System.DateTime? _lastOSUpdateUtc; + + /// Time when update requested and new OS version available + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public global::System.DateTime? LastOSUpdateUtc { get => this._lastOSUpdateUtc; } + + /// Backing field for property. + private global::System.DateTime? _lastUpdateRequestUtc; + + /// Time when update was last requested + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public global::System.DateTime? LastUpdateRequestUtc { get => this._lastUpdateRequestUtc; } + + /// Internal Acessors for ChipSku + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal.ChipSku { get => this._chipSku; set { {_chipSku = value;} } } + + /// Internal Acessors for LastAvailableOSVersion + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal.LastAvailableOSVersion { get => this._lastAvailableOSVersion; set { {_lastAvailableOSVersion = value;} } } + + /// Internal Acessors for LastInstalledOSVersion + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal.LastInstalledOSVersion { get => this._lastInstalledOSVersion; set { {_lastInstalledOSVersion = value;} } } + + /// Internal Acessors for LastOSUpdateUtc + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal.LastOSUpdateUtc { get => this._lastOSUpdateUtc; set { {_lastOSUpdateUtc = value;} } } + + /// Internal Acessors for LastUpdateRequestUtc + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal.LastUpdateRequestUtc { get => this._lastUpdateRequestUtc; set { {_lastUpdateRequestUtc = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevicePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Backing field for property. + private string _provisioningState; + + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// Creates an new instance. + public DeviceProperties() + { + + } + } + /// The properties of device + public partial interface IDeviceProperties : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable + { + /// SKU of the chip + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"SKU of the chip", + SerializedName = @"chipSku", + PossibleTypes = new [] { typeof(string) })] + string ChipSku { get; } + /// Device ID + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"Device ID", + SerializedName = @"deviceId", + PossibleTypes = new [] { typeof(string) })] + string DeviceId { get; set; } + /// OS version available for installation when update requested + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"OS version available for installation when update requested", + SerializedName = @"lastAvailableOsVersion", + PossibleTypes = new [] { typeof(string) })] + string LastAvailableOSVersion { get; } + /// OS version running on device when update requested + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"OS version running on device when update requested", + SerializedName = @"lastInstalledOsVersion", + PossibleTypes = new [] { typeof(string) })] + string LastInstalledOSVersion { get; } + /// Time when update requested and new OS version available + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Time when update requested and new OS version available", + SerializedName = @"lastOsUpdateUtc", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastOSUpdateUtc { get; } + /// Time when update was last requested + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Time when update was last requested", + SerializedName = @"lastUpdateRequestUtc", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastUpdateRequestUtc { get; } + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The status of the last operation.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")] + string ProvisioningState { get; } + + } + /// The properties of device + internal partial interface IDevicePropertiesInternal + + { + /// SKU of the chip + string ChipSku { get; set; } + /// Device ID + string DeviceId { get; set; } + /// OS version available for installation when update requested + string LastAvailableOSVersion { get; set; } + /// OS version running on device when update requested + string LastInstalledOSVersion { get; set; } + /// Time when update requested and new OS version available + global::System.DateTime? LastOSUpdateUtc { get; set; } + /// Time when update was last requested + global::System.DateTime? LastUpdateRequestUtc { get; set; } + /// The status of the last operation. + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")] + string ProvisioningState { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceProperties.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceProperties.json.cs new file mode 100644 index 000000000000..685bf4993cbf --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceProperties.json.cs @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The properties of device + public partial class DeviceProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal DeviceProperties(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_deviceId = If( json?.PropertyT("deviceId"), out var __jsonDeviceId) ? (string)__jsonDeviceId : (string)_deviceId;} + {_chipSku = If( json?.PropertyT("chipSku"), out var __jsonChipSku) ? (string)__jsonChipSku : (string)_chipSku;} + {_lastAvailableOSVersion = If( json?.PropertyT("lastAvailableOsVersion"), out var __jsonLastAvailableOSVersion) ? (string)__jsonLastAvailableOSVersion : (string)_lastAvailableOSVersion;} + {_lastInstalledOSVersion = If( json?.PropertyT("lastInstalledOsVersion"), out var __jsonLastInstalledOSVersion) ? (string)__jsonLastInstalledOSVersion : (string)_lastInstalledOSVersion;} + {_lastOSUpdateUtc = If( json?.PropertyT("lastOsUpdateUtc"), out var __jsonLastOSUpdateUtc) ? global::System.DateTime.TryParse((string)__jsonLastOSUpdateUtc, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastOSUpdateUtcValue) ? __jsonLastOSUpdateUtcValue : _lastOSUpdateUtc : _lastOSUpdateUtc;} + {_lastUpdateRequestUtc = If( json?.PropertyT("lastUpdateRequestUtc"), out var __jsonLastUpdateRequestUtc) ? global::System.DateTime.TryParse((string)__jsonLastUpdateRequestUtc, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastUpdateRequestUtcValue) ? __jsonLastUpdateRequestUtcValue : _lastUpdateRequestUtc : _lastUpdateRequestUtc;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new DeviceProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._deviceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._deviceId.ToString()) : null, "deviceId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._chipSku)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._chipSku.ToString()) : null, "chipSku" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._lastAvailableOSVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._lastAvailableOSVersion.ToString()) : null, "lastAvailableOsVersion" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._lastInstalledOSVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._lastInstalledOSVersion.ToString()) : null, "lastInstalledOsVersion" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._lastOSUpdateUtc ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._lastOSUpdateUtc?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "lastOsUpdateUtc" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._lastUpdateRequestUtc ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._lastUpdateRequestUtc?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "lastUpdateRequestUtc" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceUpdate.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceUpdate.PowerShell.cs new file mode 100644 index 000000000000..92cb2a478834 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceUpdate.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// The type used for update operations of the Device. + [System.ComponentModel.TypeConverter(typeof(DeviceUpdateTypeConverter))] + public partial class DeviceUpdate + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DeviceUpdate(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DeviceUpdate(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DeviceUpdate(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("DeviceGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdateInternal)this).DeviceGroupId = (string) content.GetValueForProperty("DeviceGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdateInternal)this).DeviceGroupId, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DeviceUpdate(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("DeviceGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdateInternal)this).DeviceGroupId = (string) content.GetValueForProperty("DeviceGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdateInternal)this).DeviceGroupId, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The type used for update operations of the Device. + [System.ComponentModel.TypeConverter(typeof(DeviceUpdateTypeConverter))] + public partial interface IDeviceUpdate + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceUpdate.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceUpdate.TypeConverter.cs new file mode 100644 index 000000000000..4bcd24e63289 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceUpdate.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DeviceUpdateTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdate ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdate).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DeviceUpdate.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DeviceUpdate.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DeviceUpdate.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceUpdate.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceUpdate.cs new file mode 100644 index 000000000000..60ae7c91e1a8 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceUpdate.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The type used for update operations of the Device. + public partial class DeviceUpdate : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdate, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdateInternal + { + + /// Device group id + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string DeviceGroupId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdatePropertiesInternal)Property).DeviceGroupId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdatePropertiesInternal)Property).DeviceGroupId = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdateProperties Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceUpdateProperties()); set { {_property = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdateProperties _property; + + /// The updatable properties of the Device. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceUpdateProperties()); set => this._property = value; } + + /// Creates an new instance. + public DeviceUpdate() + { + + } + } + /// The type used for update operations of the Device. + public partial interface IDeviceUpdate : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable + { + /// Device group id + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Device group id", + SerializedName = @"deviceGroupId", + PossibleTypes = new [] { typeof(string) })] + string DeviceGroupId { get; set; } + + } + /// The type used for update operations of the Device. + internal partial interface IDeviceUpdateInternal + + { + /// Device group id + string DeviceGroupId { get; set; } + /// The updatable properties of the Device. + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdateProperties Property { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceUpdate.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceUpdate.json.cs new file mode 100644 index 000000000000..05ff7ec9f0ac --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceUpdate.json.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The type used for update operations of the Device. + public partial class DeviceUpdate + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal DeviceUpdate(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceUpdateProperties.FromJson(__jsonProperties) : _property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdate. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdate. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new DeviceUpdate(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceUpdateProperties.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceUpdateProperties.PowerShell.cs new file mode 100644 index 000000000000..54d19a607ed9 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceUpdateProperties.PowerShell.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// The updatable properties of the Device. + [System.ComponentModel.TypeConverter(typeof(DeviceUpdatePropertiesTypeConverter))] + public partial class DeviceUpdateProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DeviceUpdateProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DeviceUpdateProperties(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DeviceUpdateProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DeviceGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdatePropertiesInternal)this).DeviceGroupId = (string) content.GetValueForProperty("DeviceGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdatePropertiesInternal)this).DeviceGroupId, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DeviceUpdateProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DeviceGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdatePropertiesInternal)this).DeviceGroupId = (string) content.GetValueForProperty("DeviceGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdatePropertiesInternal)this).DeviceGroupId, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The updatable properties of the Device. + [System.ComponentModel.TypeConverter(typeof(DeviceUpdatePropertiesTypeConverter))] + public partial interface IDeviceUpdateProperties + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceUpdateProperties.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceUpdateProperties.TypeConverter.cs new file mode 100644 index 000000000000..9b8aa39f7079 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceUpdateProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DeviceUpdatePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdateProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdateProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DeviceUpdateProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DeviceUpdateProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DeviceUpdateProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceUpdateProperties.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceUpdateProperties.cs new file mode 100644 index 000000000000..6b993fe54095 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceUpdateProperties.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The updatable properties of the Device. + public partial class DeviceUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdateProperties, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdatePropertiesInternal + { + + /// Backing field for property. + private string _deviceGroupId; + + /// Device group id + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string DeviceGroupId { get => this._deviceGroupId; set => this._deviceGroupId = value; } + + /// Creates an new instance. + public DeviceUpdateProperties() + { + + } + } + /// The updatable properties of the Device. + public partial interface IDeviceUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable + { + /// Device group id + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Device group id", + SerializedName = @"deviceGroupId", + PossibleTypes = new [] { typeof(string) })] + string DeviceGroupId { get; set; } + + } + /// The updatable properties of the Device. + internal partial interface IDeviceUpdatePropertiesInternal + + { + /// Device group id + string DeviceGroupId { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceUpdateProperties.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceUpdateProperties.json.cs new file mode 100644 index 000000000000..df1909f5745d --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/DeviceUpdateProperties.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The updatable properties of the Device. + public partial class DeviceUpdateProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal DeviceUpdateProperties(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_deviceGroupId = If( json?.PropertyT("deviceGroupId"), out var __jsonDeviceGroupId) ? (string)__jsonDeviceGroupId : (string)_deviceGroupId;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdateProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdateProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new DeviceUpdateProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._deviceGroupId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._deviceGroupId.ToString()) : null, "deviceGroupId" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ErrorAdditionalInfo.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ErrorAdditionalInfo.PowerShell.cs new file mode 100644 index 000000000000..7155a4abec8f --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ErrorAdditionalInfo.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// The resource management error additional info. + [System.ComponentModel.TypeConverter(typeof(ErrorAdditionalInfoTypeConverter))] + public partial class ErrorAdditionalInfo + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorAdditionalInfo DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ErrorAdditionalInfo(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorAdditionalInfo DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ErrorAdditionalInfo(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ErrorAdditionalInfo(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Info")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.AnyTypeConverter.ConvertFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ErrorAdditionalInfo(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Info")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.AnyTypeConverter.ConvertFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorAdditionalInfo FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The resource management error additional info. + [System.ComponentModel.TypeConverter(typeof(ErrorAdditionalInfoTypeConverter))] + public partial interface IErrorAdditionalInfo + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ErrorAdditionalInfo.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ErrorAdditionalInfo.TypeConverter.cs new file mode 100644 index 000000000000..885863f8450f --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ErrorAdditionalInfo.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ErrorAdditionalInfoTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorAdditionalInfo ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorAdditionalInfo).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ErrorAdditionalInfo.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ErrorAdditionalInfo.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ErrorAdditionalInfo.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ErrorAdditionalInfo.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ErrorAdditionalInfo.cs new file mode 100644 index 000000000000..fbc4063fea7c --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ErrorAdditionalInfo.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The resource management error additional info. + public partial class ErrorAdditionalInfo : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorAdditionalInfo, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorAdditionalInfoInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IAny _info; + + /// The additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IAny Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Any()); } + + /// Internal Acessors for Info + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IAny Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorAdditionalInfoInternal.Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Any()); set { {_info = value;} } } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorAdditionalInfoInternal.Type { get => this._type; set { {_type = value;} } } + + /// Backing field for property. + private string _type; + + /// The additional info type. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string Type { get => this._type; } + + /// Creates an new instance. + public ErrorAdditionalInfo() + { + + } + } + /// The resource management error additional info. + public partial interface IErrorAdditionalInfo : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable + { + /// The additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The additional info.", + SerializedName = @"info", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IAny) })] + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IAny Info { get; } + /// The additional info type. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The additional info type.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + string Type { get; } + + } + /// The resource management error additional info. + internal partial interface IErrorAdditionalInfoInternal + + { + /// The additional info. + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IAny Info { get; set; } + /// The additional info type. + string Type { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ErrorAdditionalInfo.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ErrorAdditionalInfo.json.cs new file mode 100644 index 000000000000..a24bc0f936fa --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ErrorAdditionalInfo.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The resource management error additional info. + public partial class ErrorAdditionalInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal ErrorAdditionalInfo(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} + {_info = If( json?.PropertyT("info"), out var __jsonInfo) ? Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Any.FromJson(__jsonInfo) : _info;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorAdditionalInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorAdditionalInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorAdditionalInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new ErrorAdditionalInfo(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._info ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) this._info.ToJson(null,serializationMode) : null, "info" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ErrorDetail.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ErrorDetail.PowerShell.cs new file mode 100644 index 000000000000..83ab842a9768 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ErrorDetail.PowerShell.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// The error detail. + [System.ComponentModel.TypeConverter(typeof(ErrorDetailTypeConverter))] + public partial class ErrorDetail + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetail DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ErrorDetail(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetail DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ErrorDetail(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ErrorDetail(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetailInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetailInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetailInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetailInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetailInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ErrorDetail(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetailInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetailInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetailInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetailInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetailInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetail FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The error detail. + [System.ComponentModel.TypeConverter(typeof(ErrorDetailTypeConverter))] + public partial interface IErrorDetail + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ErrorDetail.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ErrorDetail.TypeConverter.cs new file mode 100644 index 000000000000..0c2636fe6376 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ErrorDetail.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ErrorDetailTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetail ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetail).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ErrorDetail.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ErrorDetail.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ErrorDetail.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ErrorDetail.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ErrorDetail.cs new file mode 100644 index 000000000000..8269f7adf493 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ErrorDetail.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The error detail. + public partial class ErrorDetail : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetail, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetailInternal + { + + /// Backing field for property. + private System.Collections.Generic.List _additionalInfo; + + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public System.Collections.Generic.List AdditionalInfo { get => this._additionalInfo; } + + /// Backing field for property. + private string _code; + + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string Code { get => this._code; } + + /// Backing field for property. + private System.Collections.Generic.List _detail; + + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public System.Collections.Generic.List Detail { get => this._detail; } + + /// Backing field for property. + private string _message; + + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string Message { get => this._message; } + + /// Internal Acessors for AdditionalInfo + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetailInternal.AdditionalInfo { get => this._additionalInfo; set { {_additionalInfo = value;} } } + + /// Internal Acessors for Code + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetailInternal.Code { get => this._code; set { {_code = value;} } } + + /// Internal Acessors for Detail + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetailInternal.Detail { get => this._detail; set { {_detail = value;} } } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetailInternal.Message { get => this._message; set { {_message = value;} } } + + /// Internal Acessors for Target + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetailInternal.Target { get => this._target; set { {_target = value;} } } + + /// Backing field for property. + private string _target; + + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string Target { get => this._target; } + + /// Creates an new instance. + public ErrorDetail() + { + + } + } + /// The error detail. + public partial interface IErrorDetail : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable + { + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error additional info.", + SerializedName = @"additionalInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorAdditionalInfo) })] + System.Collections.Generic.List AdditionalInfo { get; } + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error code.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; } + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error details.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetail) })] + System.Collections.Generic.List Detail { get; } + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error message.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; } + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error target.", + SerializedName = @"target", + PossibleTypes = new [] { typeof(string) })] + string Target { get; } + + } + /// The error detail. + internal partial interface IErrorDetailInternal + + { + /// The error additional info. + System.Collections.Generic.List AdditionalInfo { get; set; } + /// The error code. + string Code { get; set; } + /// The error details. + System.Collections.Generic.List Detail { get; set; } + /// The error message. + string Message { get; set; } + /// The error target. + string Target { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ErrorDetail.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ErrorDetail.json.cs new file mode 100644 index 000000000000..e3b163fd1486 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ErrorDetail.json.cs @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The error detail. + public partial class ErrorDetail + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal ErrorDetail(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)_code;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)_message;} + {_target = If( json?.PropertyT("target"), out var __jsonTarget) ? (string)__jsonTarget : (string)_target;} + {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? If( __jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetail) (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorDetail.FromJson(__u) )) ))() : null : _detail;} + {_additionalInfo = If( json?.PropertyT("additionalInfo"), out var __jsonAdditionalInfo) ? If( __jsonAdditionalInfo as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonArray, out var __q) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorAdditionalInfo) (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorAdditionalInfo.FromJson(__p) )) ))() : null : _additionalInfo;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetail. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetail. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetail FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new ErrorDetail(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._target)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._target.ToString()) : null, "target" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + if (null != this._detail) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.XNodeArray(); + foreach( var __x in this._detail ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("details",__w); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + if (null != this._additionalInfo) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.XNodeArray(); + foreach( var __s in this._additionalInfo ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("additionalInfo",__r); + } + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ErrorResponse.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ErrorResponse.PowerShell.cs new file mode 100644 index 000000000000..af6abeb412de --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ErrorResponse.PowerShell.cs @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + /// + [System.ComponentModel.TypeConverter(typeof(ErrorResponseTypeConverter))] + public partial class ErrorResponse + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ErrorResponse(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ErrorResponse(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ErrorResponse(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponseInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponseInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponseInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponseInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponseInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ErrorResponse(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponseInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponseInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponseInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponseInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponseInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + [System.ComponentModel.TypeConverter(typeof(ErrorResponseTypeConverter))] + public partial interface IErrorResponse + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ErrorResponse.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ErrorResponse.TypeConverter.cs new file mode 100644 index 000000000000..41ee6d69b2e3 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ErrorResponse.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ErrorResponseTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ErrorResponse.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ErrorResponse.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ErrorResponse.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ErrorResponse.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ErrorResponse.cs new file mode 100644 index 000000000000..ed9fb2124bfe --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ErrorResponse.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + /// + public partial class ErrorResponse : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponseInternal + { + + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public System.Collections.Generic.List AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetailInternal)Error).AdditionalInfo; } + + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetailInternal)Error).Code; } + + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public System.Collections.Generic.List Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetailInternal)Error).Detail; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetail _error; + + /// The error object. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetail Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorDetail()); set => this._error = value; } + + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetailInternal)Error).Message; } + + /// Internal Acessors for AdditionalInfo + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponseInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetailInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetailInternal)Error).AdditionalInfo = value; } + + /// Internal Acessors for Code + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponseInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetailInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetailInternal)Error).Code = value; } + + /// Internal Acessors for Detail + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponseInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetailInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetailInternal)Error).Detail = value; } + + /// Internal Acessors for Error + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponseInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorDetail()); set { {_error = value;} } } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponseInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetailInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetailInternal)Error).Message = value; } + + /// Internal Acessors for Target + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponseInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetailInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetailInternal)Error).Target = value; } + + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetailInternal)Error).Target; } + + /// Creates an new instance. + public ErrorResponse() + { + + } + } + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + public partial interface IErrorResponse : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable + { + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error additional info.", + SerializedName = @"additionalInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorAdditionalInfo) })] + System.Collections.Generic.List AdditionalInfo { get; } + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error code.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; } + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error details.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetail) })] + System.Collections.Generic.List Detail { get; } + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error message.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; } + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error target.", + SerializedName = @"target", + PossibleTypes = new [] { typeof(string) })] + string Target { get; } + + } + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + internal partial interface IErrorResponseInternal + + { + /// The error additional info. + System.Collections.Generic.List AdditionalInfo { get; set; } + /// The error code. + string Code { get; set; } + /// The error details. + System.Collections.Generic.List Detail { get; set; } + /// The error object. + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorDetail Error { get; set; } + /// The error message. + string Message { get; set; } + /// The error target. + string Target { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ErrorResponse.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ErrorResponse.json.cs new file mode 100644 index 000000000000..9dfe1d184acd --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ErrorResponse.json.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + /// + public partial class ErrorResponse + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal ErrorResponse(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorDetail.FromJson(__jsonError) : _error;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new ErrorResponse(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) this._error.ToJson(null,serializationMode) : null, "error" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/GenerateCapabilityImageRequest.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/GenerateCapabilityImageRequest.PowerShell.cs new file mode 100644 index 000000000000..32937917137b --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/GenerateCapabilityImageRequest.PowerShell.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// Request of the action to create a signed device capability image + [System.ComponentModel.TypeConverter(typeof(GenerateCapabilityImageRequestTypeConverter))] + public partial class GenerateCapabilityImageRequest + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IGenerateCapabilityImageRequest DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new GenerateCapabilityImageRequest(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IGenerateCapabilityImageRequest DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new GenerateCapabilityImageRequest(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IGenerateCapabilityImageRequest FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal GenerateCapabilityImageRequest(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Capability")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IGenerateCapabilityImageRequestInternal)this).Capability = (System.Collections.Generic.List) content.GetValueForProperty("Capability",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IGenerateCapabilityImageRequestInternal)this).Capability, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal GenerateCapabilityImageRequest(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Capability")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IGenerateCapabilityImageRequestInternal)this).Capability = (System.Collections.Generic.List) content.GetValueForProperty("Capability",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IGenerateCapabilityImageRequestInternal)this).Capability, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Request of the action to create a signed device capability image + [System.ComponentModel.TypeConverter(typeof(GenerateCapabilityImageRequestTypeConverter))] + public partial interface IGenerateCapabilityImageRequest + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/GenerateCapabilityImageRequest.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/GenerateCapabilityImageRequest.TypeConverter.cs new file mode 100644 index 000000000000..7201a275b6db --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/GenerateCapabilityImageRequest.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class GenerateCapabilityImageRequestTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IGenerateCapabilityImageRequest ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IGenerateCapabilityImageRequest).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return GenerateCapabilityImageRequest.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return GenerateCapabilityImageRequest.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return GenerateCapabilityImageRequest.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/GenerateCapabilityImageRequest.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/GenerateCapabilityImageRequest.cs new file mode 100644 index 000000000000..10b842f73707 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/GenerateCapabilityImageRequest.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// Request of the action to create a signed device capability image + public partial class GenerateCapabilityImageRequest : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IGenerateCapabilityImageRequest, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IGenerateCapabilityImageRequestInternal + { + + /// Backing field for property. + private System.Collections.Generic.List _capability; + + /// List of capabilities to create + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public System.Collections.Generic.List Capability { get => this._capability; set => this._capability = value; } + + /// Creates an new instance. + public GenerateCapabilityImageRequest() + { + + } + } + /// Request of the action to create a signed device capability image + public partial interface IGenerateCapabilityImageRequest : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable + { + /// List of capabilities to create + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"List of capabilities to create", + SerializedName = @"capabilities", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("ApplicationDevelopment", "FieldServicing")] + System.Collections.Generic.List Capability { get; set; } + + } + /// Request of the action to create a signed device capability image + internal partial interface IGenerateCapabilityImageRequestInternal + + { + /// List of capabilities to create + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("ApplicationDevelopment", "FieldServicing")] + System.Collections.Generic.List Capability { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/GenerateCapabilityImageRequest.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/GenerateCapabilityImageRequest.json.cs new file mode 100644 index 000000000000..fead073f8611 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/GenerateCapabilityImageRequest.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// Request of the action to create a signed device capability image + public partial class GenerateCapabilityImageRequest + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IGenerateCapabilityImageRequest. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IGenerateCapabilityImageRequest. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IGenerateCapabilityImageRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new GenerateCapabilityImageRequest(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal GenerateCapabilityImageRequest(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_capability = If( json?.PropertyT("capabilities"), out var __jsonCapabilities) ? If( __jsonCapabilities as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : _capability;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._capability) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.XNodeArray(); + foreach( var __x in this._capability ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("capabilities",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/Image.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/Image.PowerShell.cs new file mode 100644 index 000000000000..ecb085f35c8e --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/Image.PowerShell.cs @@ -0,0 +1,316 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// An image resource belonging to a catalog resource. + [System.ComponentModel.TypeConverter(typeof(ImageTypeConverter))] + public partial class Image + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Image(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Image(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Image(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ImagePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ImageType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal)this).ImageType = (string) content.GetValueForProperty("ImageType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal)this).ImageType, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("PropertiesImage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal)this).PropertiesImage = (string) content.GetValueForProperty("PropertiesImage",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal)this).PropertiesImage, global::System.Convert.ToString); + } + if (content.Contains("ImageId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal)this).ImageId = (string) content.GetValueForProperty("ImageId",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal)this).ImageId, global::System.Convert.ToString); + } + if (content.Contains("ImageName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal)this).ImageName = (string) content.GetValueForProperty("ImageName",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal)this).ImageName, global::System.Convert.ToString); + } + if (content.Contains("RegionalDataBoundary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal)this).RegionalDataBoundary = (string) content.GetValueForProperty("RegionalDataBoundary",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal)this).RegionalDataBoundary, global::System.Convert.ToString); + } + if (content.Contains("Uri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal)this).Uri, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("ComponentId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal)this).ComponentId = (string) content.GetValueForProperty("ComponentId",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal)this).ComponentId, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Image(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ImagePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ImageType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal)this).ImageType = (string) content.GetValueForProperty("ImageType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal)this).ImageType, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("PropertiesImage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal)this).PropertiesImage = (string) content.GetValueForProperty("PropertiesImage",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal)this).PropertiesImage, global::System.Convert.ToString); + } + if (content.Contains("ImageId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal)this).ImageId = (string) content.GetValueForProperty("ImageId",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal)this).ImageId, global::System.Convert.ToString); + } + if (content.Contains("ImageName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal)this).ImageName = (string) content.GetValueForProperty("ImageName",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal)this).ImageName, global::System.Convert.ToString); + } + if (content.Contains("RegionalDataBoundary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal)this).RegionalDataBoundary = (string) content.GetValueForProperty("RegionalDataBoundary",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal)this).RegionalDataBoundary, global::System.Convert.ToString); + } + if (content.Contains("Uri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal)this).Uri, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("ComponentId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal)this).ComponentId = (string) content.GetValueForProperty("ComponentId",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal)this).ComponentId, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// An image resource belonging to a catalog resource. + [System.ComponentModel.TypeConverter(typeof(ImageTypeConverter))] + public partial interface IImage + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/Image.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/Image.TypeConverter.cs new file mode 100644 index 000000000000..32e1303e05fd --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/Image.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ImageTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Image.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Image.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Image.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/Image.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/Image.cs new file mode 100644 index 000000000000..02c6c20fb412 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/Image.cs @@ -0,0 +1,309 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// An image resource belonging to a catalog resource. + public partial class Image : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProxyResource(); + + /// The image component id. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string ComponentId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)Property).ComponentId; } + + /// The image description. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)Property).Description; } + + /// + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Id; } + + /// Image ID + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string ImageId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)Property).ImageId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)Property).ImageId = value ?? null; } + + /// Image name + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string ImageName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)Property).ImageName; } + + /// The image type. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string ImageType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)Property).ImageType; } + + /// Internal Acessors for ComponentId + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal.ComponentId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)Property).ComponentId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)Property).ComponentId = value; } + + /// Internal Acessors for Description + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal.Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)Property).Description = value; } + + /// Internal Acessors for ImageName + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal.ImageName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)Property).ImageName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)Property).ImageName = value; } + + /// Internal Acessors for ImageType + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal.ImageType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)Property).ImageType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)Property).ImageType = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageProperties Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ImageProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for Uri + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageInternal.Uri { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)Property).Uri; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)Property).Uri = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Name; } + + /// + /// Image as a UTF-8 encoded base 64 string on image create. This field contains the image URI on image reads. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string PropertiesImage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)Property).Image; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)Property).Image = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ImageProperties()); set => this._property = value; } + + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)Property).ProvisioningState; } + + /// Regional data boundary for an image + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string RegionalDataBoundary { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)Property).RegionalDataBoundary; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)Property).RegionalDataBoundary = value ?? null; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType = value ?? null; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType = value ?? null; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Type; } + + /// Location the image + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string Uri { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)Property).Uri; } + + /// Creates an new instance. + public Image() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); + } + } + /// An image resource belonging to a catalog resource. + public partial interface IImage : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProxyResource + { + /// The image component id. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The image component id.", + SerializedName = @"componentId", + PossibleTypes = new [] { typeof(string) })] + string ComponentId { get; } + /// The image description. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The image description.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; } + /// Image ID + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"Image ID", + SerializedName = @"imageId", + PossibleTypes = new [] { typeof(string) })] + string ImageId { get; set; } + /// Image name + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Image name", + SerializedName = @"imageName", + PossibleTypes = new [] { typeof(string) })] + string ImageName { get; } + /// The image type. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The image type.", + SerializedName = @"imageType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("InvalidImageType", "OneBl", "PlutonRuntime", "WifiFirmware", "SecurityMonitor", "NormalWorldLoader", "NormalWorldDtb", "NormalWorldKernel", "RootFs", "Services", "Applications", "FwConfig", "BootManifest", "Nwfs", "TrustedKeystore", "Policy", "CustomerBoardConfig", "UpdateCertStore", "BaseSystemUpdateManifest", "FirmwareUpdateManifest", "CustomerUpdateManifest", "RecoveryManifest", "ManifestSet", "Other")] + string ImageType { get; } + /// + /// Image as a UTF-8 encoded base 64 string on image create. This field contains the image URI on image reads. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"Image as a UTF-8 encoded base 64 string on image create. This field contains the image URI on image reads.", + SerializedName = @"image", + PossibleTypes = new [] { typeof(string) })] + string PropertiesImage { get; set; } + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The status of the last operation.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")] + string ProvisioningState { get; } + /// Regional data boundary for an image + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"Regional data boundary for an image", + SerializedName = @"regionalDataBoundary", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("None", "EU")] + string RegionalDataBoundary { get; set; } + /// Location the image + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Location the image", + SerializedName = @"uri", + PossibleTypes = new [] { typeof(string) })] + string Uri { get; } + + } + /// An image resource belonging to a catalog resource. + internal partial interface IImageInternal : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProxyResourceInternal + { + /// The image component id. + string ComponentId { get; set; } + /// The image description. + string Description { get; set; } + /// Image ID + string ImageId { get; set; } + /// Image name + string ImageName { get; set; } + /// The image type. + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("InvalidImageType", "OneBl", "PlutonRuntime", "WifiFirmware", "SecurityMonitor", "NormalWorldLoader", "NormalWorldDtb", "NormalWorldKernel", "RootFs", "Services", "Applications", "FwConfig", "BootManifest", "Nwfs", "TrustedKeystore", "Policy", "CustomerBoardConfig", "UpdateCertStore", "BaseSystemUpdateManifest", "FirmwareUpdateManifest", "CustomerUpdateManifest", "RecoveryManifest", "ManifestSet", "Other")] + string ImageType { get; set; } + /// + /// Image as a UTF-8 encoded base 64 string on image create. This field contains the image URI on image reads. + /// + string PropertiesImage { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageProperties Property { get; set; } + /// The status of the last operation. + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")] + string ProvisioningState { get; set; } + /// Regional data boundary for an image + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("None", "EU")] + string RegionalDataBoundary { get; set; } + /// Location the image + string Uri { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/Image.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/Image.json.cs new file mode 100644 index 000000000000..a636270cde44 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/Image.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// An image resource belonging to a catalog resource. + public partial class Image + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new Image(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal Image(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ImageProperties.FromJson(__jsonProperties) : _property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __proxyResource?.ToJson(container, serializationMode); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ImageListResult.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ImageListResult.PowerShell.cs new file mode 100644 index 000000000000..f60d7fc26a59 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ImageListResult.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// The response of a Image list operation. + [System.ComponentModel.TypeConverter(typeof(ImageListResultTypeConverter))] + public partial class ImageListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ImageListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ImageListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ImageListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ImageTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ImageListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ImageTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The response of a Image list operation. + [System.ComponentModel.TypeConverter(typeof(ImageListResultTypeConverter))] + public partial interface IImageListResult + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ImageListResult.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ImageListResult.TypeConverter.cs new file mode 100644 index 000000000000..d3d5748e931b --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ImageListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ImageListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ImageListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ImageListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ImageListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ImageListResult.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ImageListResult.cs new file mode 100644 index 000000000000..60316d367bfb --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ImageListResult.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The response of a Image list operation. + public partial class ImageListResult : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageListResult, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// The Image items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public ImageListResult() + { + + } + } + /// The response of a Image list operation. + public partial interface IImageListResult : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The Image items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Image items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage) })] + System.Collections.Generic.List Value { get; set; } + + } + /// The response of a Image list operation. + internal partial interface IImageListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The Image items on this page + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ImageListResult.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ImageListResult.json.cs new file mode 100644 index 000000000000..2f8d625f080c --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ImageListResult.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The response of a Image list operation. + public partial class ImageListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new ImageListResult(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal ImageListResult(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage) (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Image.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ImageProperties.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ImageProperties.PowerShell.cs new file mode 100644 index 000000000000..9cb1057f8717 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ImageProperties.PowerShell.cs @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// The properties of image + [System.ComponentModel.TypeConverter(typeof(ImagePropertiesTypeConverter))] + public partial class ImageProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ImageProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ImageProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ImageProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Image")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)this).Image = (string) content.GetValueForProperty("Image",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)this).Image, global::System.Convert.ToString); + } + if (content.Contains("ImageId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)this).ImageId = (string) content.GetValueForProperty("ImageId",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)this).ImageId, global::System.Convert.ToString); + } + if (content.Contains("ImageName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)this).ImageName = (string) content.GetValueForProperty("ImageName",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)this).ImageName, global::System.Convert.ToString); + } + if (content.Contains("RegionalDataBoundary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)this).RegionalDataBoundary = (string) content.GetValueForProperty("RegionalDataBoundary",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)this).RegionalDataBoundary, global::System.Convert.ToString); + } + if (content.Contains("Uri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)this).Uri, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("ComponentId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)this).ComponentId = (string) content.GetValueForProperty("ComponentId",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)this).ComponentId, global::System.Convert.ToString); + } + if (content.Contains("ImageType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)this).ImageType = (string) content.GetValueForProperty("ImageType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)this).ImageType, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ImageProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Image")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)this).Image = (string) content.GetValueForProperty("Image",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)this).Image, global::System.Convert.ToString); + } + if (content.Contains("ImageId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)this).ImageId = (string) content.GetValueForProperty("ImageId",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)this).ImageId, global::System.Convert.ToString); + } + if (content.Contains("ImageName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)this).ImageName = (string) content.GetValueForProperty("ImageName",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)this).ImageName, global::System.Convert.ToString); + } + if (content.Contains("RegionalDataBoundary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)this).RegionalDataBoundary = (string) content.GetValueForProperty("RegionalDataBoundary",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)this).RegionalDataBoundary, global::System.Convert.ToString); + } + if (content.Contains("Uri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)this).Uri, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("ComponentId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)this).ComponentId = (string) content.GetValueForProperty("ComponentId",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)this).ComponentId, global::System.Convert.ToString); + } + if (content.Contains("ImageType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)this).ImageType = (string) content.GetValueForProperty("ImageType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)this).ImageType, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The properties of image + [System.ComponentModel.TypeConverter(typeof(ImagePropertiesTypeConverter))] + public partial interface IImageProperties + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ImageProperties.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ImageProperties.TypeConverter.cs new file mode 100644 index 000000000000..74a367ed8f41 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ImageProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ImagePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ImageProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ImageProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ImageProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ImageProperties.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ImageProperties.cs new file mode 100644 index 000000000000..1e52aa8ba8b2 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ImageProperties.cs @@ -0,0 +1,244 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The properties of image + public partial class ImageProperties : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageProperties, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal + { + + /// Backing field for property. + private string _componentId; + + /// The image component id. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string ComponentId { get => this._componentId; } + + /// Backing field for property. + private string _description; + + /// The image description. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string Description { get => this._description; } + + /// Backing field for property. + private string _image; + + /// + /// Image as a UTF-8 encoded base 64 string on image create. This field contains the image URI on image reads. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string Image { get => this._image; set => this._image = value; } + + /// Backing field for property. + private string _imageId; + + /// Image ID + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string ImageId { get => this._imageId; set => this._imageId = value; } + + /// Backing field for property. + private string _imageName; + + /// Image name + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string ImageName { get => this._imageName; } + + /// Backing field for property. + private string _imageType; + + /// The image type. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string ImageType { get => this._imageType; } + + /// Internal Acessors for ComponentId + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal.ComponentId { get => this._componentId; set { {_componentId = value;} } } + + /// Internal Acessors for Description + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal.Description { get => this._description; set { {_description = value;} } } + + /// Internal Acessors for ImageName + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal.ImageName { get => this._imageName; set { {_imageName = value;} } } + + /// Internal Acessors for ImageType + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal.ImageType { get => this._imageType; set { {_imageType = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for Uri + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImagePropertiesInternal.Uri { get => this._uri; set { {_uri = value;} } } + + /// Backing field for property. + private string _provisioningState; + + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private string _regionalDataBoundary; + + /// Regional data boundary for an image + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string RegionalDataBoundary { get => this._regionalDataBoundary; set => this._regionalDataBoundary = value; } + + /// Backing field for property. + private string _uri; + + /// Location the image + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string Uri { get => this._uri; } + + /// Creates an new instance. + public ImageProperties() + { + + } + } + /// The properties of image + public partial interface IImageProperties : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable + { + /// The image component id. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The image component id.", + SerializedName = @"componentId", + PossibleTypes = new [] { typeof(string) })] + string ComponentId { get; } + /// The image description. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The image description.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; } + /// + /// Image as a UTF-8 encoded base 64 string on image create. This field contains the image URI on image reads. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"Image as a UTF-8 encoded base 64 string on image create. This field contains the image URI on image reads.", + SerializedName = @"image", + PossibleTypes = new [] { typeof(string) })] + string Image { get; set; } + /// Image ID + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"Image ID", + SerializedName = @"imageId", + PossibleTypes = new [] { typeof(string) })] + string ImageId { get; set; } + /// Image name + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Image name", + SerializedName = @"imageName", + PossibleTypes = new [] { typeof(string) })] + string ImageName { get; } + /// The image type. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The image type.", + SerializedName = @"imageType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("InvalidImageType", "OneBl", "PlutonRuntime", "WifiFirmware", "SecurityMonitor", "NormalWorldLoader", "NormalWorldDtb", "NormalWorldKernel", "RootFs", "Services", "Applications", "FwConfig", "BootManifest", "Nwfs", "TrustedKeystore", "Policy", "CustomerBoardConfig", "UpdateCertStore", "BaseSystemUpdateManifest", "FirmwareUpdateManifest", "CustomerUpdateManifest", "RecoveryManifest", "ManifestSet", "Other")] + string ImageType { get; } + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The status of the last operation.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")] + string ProvisioningState { get; } + /// Regional data boundary for an image + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"Regional data boundary for an image", + SerializedName = @"regionalDataBoundary", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("None", "EU")] + string RegionalDataBoundary { get; set; } + /// Location the image + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Location the image", + SerializedName = @"uri", + PossibleTypes = new [] { typeof(string) })] + string Uri { get; } + + } + /// The properties of image + internal partial interface IImagePropertiesInternal + + { + /// The image component id. + string ComponentId { get; set; } + /// The image description. + string Description { get; set; } + /// + /// Image as a UTF-8 encoded base 64 string on image create. This field contains the image URI on image reads. + /// + string Image { get; set; } + /// Image ID + string ImageId { get; set; } + /// Image name + string ImageName { get; set; } + /// The image type. + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("InvalidImageType", "OneBl", "PlutonRuntime", "WifiFirmware", "SecurityMonitor", "NormalWorldLoader", "NormalWorldDtb", "NormalWorldKernel", "RootFs", "Services", "Applications", "FwConfig", "BootManifest", "Nwfs", "TrustedKeystore", "Policy", "CustomerBoardConfig", "UpdateCertStore", "BaseSystemUpdateManifest", "FirmwareUpdateManifest", "CustomerUpdateManifest", "RecoveryManifest", "ManifestSet", "Other")] + string ImageType { get; set; } + /// The status of the last operation. + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")] + string ProvisioningState { get; set; } + /// Regional data boundary for an image + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("None", "EU")] + string RegionalDataBoundary { get; set; } + /// Location the image + string Uri { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ImageProperties.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ImageProperties.json.cs new file mode 100644 index 000000000000..5eedeefbc04d --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ImageProperties.json.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The properties of image + public partial class ImageProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new ImageProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal ImageProperties(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_image = If( json?.PropertyT("image"), out var __jsonImage) ? (string)__jsonImage : (string)_image;} + {_imageId = If( json?.PropertyT("imageId"), out var __jsonImageId) ? (string)__jsonImageId : (string)_imageId;} + {_imageName = If( json?.PropertyT("imageName"), out var __jsonImageName) ? (string)__jsonImageName : (string)_imageName;} + {_regionalDataBoundary = If( json?.PropertyT("regionalDataBoundary"), out var __jsonRegionalDataBoundary) ? (string)__jsonRegionalDataBoundary : (string)_regionalDataBoundary;} + {_uri = If( json?.PropertyT("uri"), out var __jsonUri) ? (string)__jsonUri : (string)_uri;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)_description;} + {_componentId = If( json?.PropertyT("componentId"), out var __jsonComponentId) ? (string)__jsonComponentId : (string)_componentId;} + {_imageType = If( json?.PropertyT("imageType"), out var __jsonImageType) ? (string)__jsonImageType : (string)_imageType;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._image)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._image.ToString()) : null, "image" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._imageId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._imageId.ToString()) : null, "imageId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._imageName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._imageName.ToString()) : null, "imageName" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._regionalDataBoundary)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._regionalDataBoundary.ToString()) : null, "regionalDataBoundary" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._uri)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._uri.ToString()) : null, "uri" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._componentId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._componentId.ToString()) : null, "componentId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._imageType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._imageType.ToString()) : null, "imageType" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ListDeviceGroupsRequest.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ListDeviceGroupsRequest.PowerShell.cs new file mode 100644 index 000000000000..b3be81ded224 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ListDeviceGroupsRequest.PowerShell.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// Request of the action to list device groups for a catalog. + [System.ComponentModel.TypeConverter(typeof(ListDeviceGroupsRequestTypeConverter))] + public partial class ListDeviceGroupsRequest + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IListDeviceGroupsRequest DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ListDeviceGroupsRequest(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IListDeviceGroupsRequest DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ListDeviceGroupsRequest(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IListDeviceGroupsRequest FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ListDeviceGroupsRequest(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DeviceGroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IListDeviceGroupsRequestInternal)this).DeviceGroupName = (string) content.GetValueForProperty("DeviceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IListDeviceGroupsRequestInternal)this).DeviceGroupName, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ListDeviceGroupsRequest(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DeviceGroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IListDeviceGroupsRequestInternal)this).DeviceGroupName = (string) content.GetValueForProperty("DeviceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IListDeviceGroupsRequestInternal)this).DeviceGroupName, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Request of the action to list device groups for a catalog. + [System.ComponentModel.TypeConverter(typeof(ListDeviceGroupsRequestTypeConverter))] + public partial interface IListDeviceGroupsRequest + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ListDeviceGroupsRequest.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ListDeviceGroupsRequest.TypeConverter.cs new file mode 100644 index 000000000000..d0c50f3e7736 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ListDeviceGroupsRequest.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ListDeviceGroupsRequestTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IListDeviceGroupsRequest ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IListDeviceGroupsRequest).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ListDeviceGroupsRequest.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ListDeviceGroupsRequest.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ListDeviceGroupsRequest.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ListDeviceGroupsRequest.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ListDeviceGroupsRequest.cs new file mode 100644 index 000000000000..7c68dad901e2 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ListDeviceGroupsRequest.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// Request of the action to list device groups for a catalog. + public partial class ListDeviceGroupsRequest : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IListDeviceGroupsRequest, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IListDeviceGroupsRequestInternal + { + + /// Backing field for property. + private string _deviceGroupName; + + /// Device Group name. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string DeviceGroupName { get => this._deviceGroupName; set => this._deviceGroupName = value; } + + /// Creates an new instance. + public ListDeviceGroupsRequest() + { + + } + } + /// Request of the action to list device groups for a catalog. + public partial interface IListDeviceGroupsRequest : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable + { + /// Device Group name. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Device Group name.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + string DeviceGroupName { get; set; } + + } + /// Request of the action to list device groups for a catalog. + internal partial interface IListDeviceGroupsRequestInternal + + { + /// Device Group name. + string DeviceGroupName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ListDeviceGroupsRequest.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ListDeviceGroupsRequest.json.cs new file mode 100644 index 000000000000..40dd274a8696 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ListDeviceGroupsRequest.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// Request of the action to list device groups for a catalog. + public partial class ListDeviceGroupsRequest + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IListDeviceGroupsRequest. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IListDeviceGroupsRequest. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IListDeviceGroupsRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new ListDeviceGroupsRequest(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal ListDeviceGroupsRequest(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_deviceGroupName = If( json?.PropertyT("deviceGroupName"), out var __jsonDeviceGroupName) ? (string)__jsonDeviceGroupName : (string)_deviceGroupName;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._deviceGroupName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._deviceGroupName.ToString()) : null, "deviceGroupName" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/Operation.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/Operation.PowerShell.cs new file mode 100644 index 000000000000..e9528001bce9 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/Operation.PowerShell.cs @@ -0,0 +1,230 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// Details of a REST API operation, returned from the Resource Provider Operations API + /// + [System.ComponentModel.TypeConverter(typeof(OperationTypeConverter))] + public partial class Operation + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Operation(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Operation(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Operation(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Display")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.OperationDisplayTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("IsDataAction")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Origin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationInternal)this).Origin = (string) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationInternal)this).Origin, global::System.Convert.ToString); + } + if (content.Contains("ActionType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationInternal)this).ActionType = (string) content.GetValueForProperty("ActionType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationInternal)this).ActionType, global::System.Convert.ToString); + } + if (content.Contains("DisplayProvider")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString); + } + if (content.Contains("DisplayResource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationInternal)this).DisplayResource, global::System.Convert.ToString); + } + if (content.Contains("DisplayOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString); + } + if (content.Contains("DisplayDescription")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationInternal)this).DisplayDescription, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Operation(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Display")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.OperationDisplayTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("IsDataAction")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Origin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationInternal)this).Origin = (string) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationInternal)this).Origin, global::System.Convert.ToString); + } + if (content.Contains("ActionType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationInternal)this).ActionType = (string) content.GetValueForProperty("ActionType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationInternal)this).ActionType, global::System.Convert.ToString); + } + if (content.Contains("DisplayProvider")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString); + } + if (content.Contains("DisplayResource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationInternal)this).DisplayResource, global::System.Convert.ToString); + } + if (content.Contains("DisplayOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString); + } + if (content.Contains("DisplayDescription")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationInternal)this).DisplayDescription, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Details of a REST API operation, returned from the Resource Provider Operations API + [System.ComponentModel.TypeConverter(typeof(OperationTypeConverter))] + public partial interface IOperation + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/Operation.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/Operation.TypeConverter.cs new file mode 100644 index 000000000000..720ba466cfef --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/Operation.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OperationTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperation ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperation).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Operation.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Operation.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Operation.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/Operation.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/Operation.cs new file mode 100644 index 000000000000..370e856ab278 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/Operation.cs @@ -0,0 +1,284 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// + /// Details of a REST API operation, returned from the Resource Provider Operations API + /// + public partial class Operation : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperation, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationInternal + { + + /// Backing field for property. + private string _actionType; + + /// + /// Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string ActionType { get => this._actionType; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplay _display; + + /// Localized display information for this particular operation. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplay Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.OperationDisplay()); set => this._display = value; } + + /// + /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplayInternal)Display).Description; } + + /// + /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", + /// "Restart Virtual Machine". + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplayInternal)Display).Operation; } + + /// + /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplayInternal)Display).Provider; } + + /// + /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplayInternal)Display).Resource; } + + /// Backing field for property. + private bool? _isDataAction; + + /// + /// Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane + /// operations. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public bool? IsDataAction { get => this._isDataAction; } + + /// Internal Acessors for ActionType + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationInternal.ActionType { get => this._actionType; set { {_actionType = value;} } } + + /// Internal Acessors for Display + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplay Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationInternal.Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.OperationDisplay()); set { {_display = value;} } } + + /// Internal Acessors for DisplayDescription + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationInternal.DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplayInternal)Display).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplayInternal)Display).Description = value; } + + /// Internal Acessors for DisplayOperation + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationInternal.DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplayInternal)Display).Operation = value; } + + /// Internal Acessors for DisplayProvider + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationInternal.DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplayInternal)Display).Provider = value; } + + /// Internal Acessors for DisplayResource + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationInternal.DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplayInternal)Display).Resource = value; } + + /// Internal Acessors for IsDataAction + bool? Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationInternal.IsDataAction { get => this._isDataAction; set { {_isDataAction = value;} } } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationInternal.Name { get => this._name; set { {_name = value;} } } + + /// Internal Acessors for Origin + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationInternal.Origin { get => this._origin; set { {_origin = value;} } } + + /// Backing field for property. + private string _name; + + /// + /// The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", + /// "Microsoft.Compute/virtualMachines/capture/action" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string Name { get => this._name; } + + /// Backing field for property. + private string _origin; + + /// + /// The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is + /// "user,system" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string Origin { get => this._origin; } + + /// Creates an new instance. + public Operation() + { + + } + } + /// Details of a REST API operation, returned from the Resource Provider Operations API + public partial interface IOperation : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable + { + /// + /// Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Enum. Indicates the action type. ""Internal"" refers to actions that are for internal only APIs.", + SerializedName = @"actionType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Internal")] + string ActionType { get; } + /// + /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The short, localized friendly description of the operation; suitable for tool tips and detailed views.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string DisplayDescription { get; } + /// + /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", + /// "Restart Virtual Machine". + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The concise, localized friendly name for the operation; suitable for dropdowns. E.g. ""Create or Update Virtual Machine"", ""Restart Virtual Machine"".", + SerializedName = @"operation", + PossibleTypes = new [] { typeof(string) })] + string DisplayOperation { get; } + /// + /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The localized friendly form of the resource provider name, e.g. ""Microsoft Monitoring Insights"" or ""Microsoft Compute"".", + SerializedName = @"provider", + PossibleTypes = new [] { typeof(string) })] + string DisplayProvider { get; } + /// + /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The localized friendly name of the resource type related to this operation. E.g. ""Virtual Machines"" or ""Job Schedule Collections"".", + SerializedName = @"resource", + PossibleTypes = new [] { typeof(string) })] + string DisplayResource { get; } + /// + /// Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane + /// operations. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Whether the operation applies to data-plane. This is ""true"" for data-plane operations and ""false"" for ARM/control-plane operations.", + SerializedName = @"isDataAction", + PossibleTypes = new [] { typeof(bool) })] + bool? IsDataAction { get; } + /// + /// The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", + /// "Microsoft.Compute/virtualMachines/capture/action" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The name of the operation, as per Resource-Based Access Control (RBAC). Examples: ""Microsoft.Compute/virtualMachines/write"", ""Microsoft.Compute/virtualMachines/capture/action""", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; } + /// + /// The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is + /// "user,system" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is ""user,system""", + SerializedName = @"origin", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("user", "system", "user,system")] + string Origin { get; } + + } + /// Details of a REST API operation, returned from the Resource Provider Operations API + internal partial interface IOperationInternal + + { + /// + /// Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Internal")] + string ActionType { get; set; } + /// Localized display information for this particular operation. + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplay Display { get; set; } + /// + /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. + /// + string DisplayDescription { get; set; } + /// + /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", + /// "Restart Virtual Machine". + /// + string DisplayOperation { get; set; } + /// + /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". + /// + string DisplayProvider { get; set; } + /// + /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + /// + string DisplayResource { get; set; } + /// + /// Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane + /// operations. + /// + bool? IsDataAction { get; set; } + /// + /// The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", + /// "Microsoft.Compute/virtualMachines/capture/action" + /// + string Name { get; set; } + /// + /// The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is + /// "user,system" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("user", "system", "user,system")] + string Origin { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/Operation.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/Operation.json.cs new file mode 100644 index 000000000000..bd570586b803 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/Operation.json.cs @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// + /// Details of a REST API operation, returned from the Resource Provider Operations API + /// + public partial class Operation + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperation. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperation. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new Operation(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal Operation(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_display = If( json?.PropertyT("display"), out var __jsonDisplay) ? Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.OperationDisplay.FromJson(__jsonDisplay) : _display;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_isDataAction = If( json?.PropertyT("isDataAction"), out var __jsonIsDataAction) ? (bool?)__jsonIsDataAction : _isDataAction;} + {_origin = If( json?.PropertyT("origin"), out var __jsonOrigin) ? (string)__jsonOrigin : (string)_origin;} + {_actionType = If( json?.PropertyT("actionType"), out var __jsonActionType) ? (string)__jsonActionType : (string)_actionType;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._display ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) this._display.ToJson(null,serializationMode) : null, "display" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._isDataAction ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonBoolean((bool)this._isDataAction) : null, "isDataAction" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._origin)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._origin.ToString()) : null, "origin" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._actionType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._actionType.ToString()) : null, "actionType" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/OperationDisplay.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/OperationDisplay.PowerShell.cs new file mode 100644 index 000000000000..a5d7916ba306 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/OperationDisplay.PowerShell.cs @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// Localized display information for this particular operation. + [System.ComponentModel.TypeConverter(typeof(OperationDisplayTypeConverter))] + public partial class OperationDisplay + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplay DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OperationDisplay(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplay DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OperationDisplay(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplay FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OperationDisplay(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Provider")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString); + } + if (content.Contains("Resource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString); + } + if (content.Contains("Operation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplayInternal)this).Description, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OperationDisplay(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Provider")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString); + } + if (content.Contains("Resource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString); + } + if (content.Contains("Operation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplayInternal)this).Description, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Localized display information for this particular operation. + [System.ComponentModel.TypeConverter(typeof(OperationDisplayTypeConverter))] + public partial interface IOperationDisplay + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/OperationDisplay.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/OperationDisplay.TypeConverter.cs new file mode 100644 index 000000000000..d9cb883474d8 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/OperationDisplay.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OperationDisplayTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplay ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplay).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OperationDisplay.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OperationDisplay.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OperationDisplay.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/OperationDisplay.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/OperationDisplay.cs new file mode 100644 index 000000000000..425b45093eb7 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/OperationDisplay.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// Localized display information for this particular operation. + public partial class OperationDisplay : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplay, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplayInternal + { + + /// Backing field for property. + private string _description; + + /// + /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string Description { get => this._description; } + + /// Internal Acessors for Description + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplayInternal.Description { get => this._description; set { {_description = value;} } } + + /// Internal Acessors for Operation + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplayInternal.Operation { get => this._operation; set { {_operation = value;} } } + + /// Internal Acessors for Provider + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplayInternal.Provider { get => this._provider; set { {_provider = value;} } } + + /// Internal Acessors for Resource + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplayInternal.Resource { get => this._resource; set { {_resource = value;} } } + + /// Backing field for property. + private string _operation; + + /// + /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", + /// "Restart Virtual Machine". + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string Operation { get => this._operation; } + + /// Backing field for property. + private string _provider; + + /// + /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string Provider { get => this._provider; } + + /// Backing field for property. + private string _resource; + + /// + /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string Resource { get => this._resource; } + + /// Creates an new instance. + public OperationDisplay() + { + + } + } + /// Localized display information for this particular operation. + public partial interface IOperationDisplay : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable + { + /// + /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The short, localized friendly description of the operation; suitable for tool tips and detailed views.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; } + /// + /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", + /// "Restart Virtual Machine". + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The concise, localized friendly name for the operation; suitable for dropdowns. E.g. ""Create or Update Virtual Machine"", ""Restart Virtual Machine"".", + SerializedName = @"operation", + PossibleTypes = new [] { typeof(string) })] + string Operation { get; } + /// + /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The localized friendly form of the resource provider name, e.g. ""Microsoft Monitoring Insights"" or ""Microsoft Compute"".", + SerializedName = @"provider", + PossibleTypes = new [] { typeof(string) })] + string Provider { get; } + /// + /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The localized friendly name of the resource type related to this operation. E.g. ""Virtual Machines"" or ""Job Schedule Collections"".", + SerializedName = @"resource", + PossibleTypes = new [] { typeof(string) })] + string Resource { get; } + + } + /// Localized display information for this particular operation. + internal partial interface IOperationDisplayInternal + + { + /// + /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. + /// + string Description { get; set; } + /// + /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", + /// "Restart Virtual Machine". + /// + string Operation { get; set; } + /// + /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". + /// + string Provider { get; set; } + /// + /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + /// + string Resource { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/OperationDisplay.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/OperationDisplay.json.cs new file mode 100644 index 000000000000..47907fcbd5a8 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/OperationDisplay.json.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// Localized display information for this particular operation. + public partial class OperationDisplay + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplay. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplay. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationDisplay FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new OperationDisplay(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal OperationDisplay(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_provider = If( json?.PropertyT("provider"), out var __jsonProvider) ? (string)__jsonProvider : (string)_provider;} + {_resource = If( json?.PropertyT("resource"), out var __jsonResource) ? (string)__jsonResource : (string)_resource;} + {_operation = If( json?.PropertyT("operation"), out var __jsonOperation) ? (string)__jsonOperation : (string)_operation;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)_description;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._provider)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._provider.ToString()) : null, "provider" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._resource)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._resource.ToString()) : null, "resource" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._operation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._operation.ToString()) : null, "operation" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/OperationListResult.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/OperationListResult.PowerShell.cs new file mode 100644 index 000000000000..0f9c04f3e56e --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/OperationListResult.PowerShell.cs @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of + /// results. + /// + [System.ComponentModel.TypeConverter(typeof(OperationListResultTypeConverter))] + public partial class OperationListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OperationListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OperationListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OperationListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.OperationTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OperationListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.OperationTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of + /// results. + [System.ComponentModel.TypeConverter(typeof(OperationListResultTypeConverter))] + public partial interface IOperationListResult + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/OperationListResult.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/OperationListResult.TypeConverter.cs new file mode 100644 index 000000000000..a7a5ee732f31 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/OperationListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OperationListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OperationListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OperationListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OperationListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/OperationListResult.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/OperationListResult.cs new file mode 100644 index 000000000000..2258201a6d9f --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/OperationListResult.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// + /// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of + /// results. + /// + public partial class OperationListResult : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationListResult, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationListResultInternal + { + + /// Internal Acessors for NextLink + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + + /// Internal Acessors for Value + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationListResultInternal.Value { get => this._value; set { {_value = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// URL to get the next set of operation list results (if there are any). + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// List of operations supported by the resource provider + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; } + + /// Creates an new instance. + public OperationListResult() + { + + } + } + /// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of + /// results. + public partial interface IOperationListResult : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable + { + /// URL to get the next set of operation list results (if there are any). + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"URL to get the next set of operation list results (if there are any).", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; } + /// List of operations supported by the resource provider + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"List of operations supported by the resource provider", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperation) })] + System.Collections.Generic.List Value { get; } + + } + /// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of + /// results. + internal partial interface IOperationListResultInternal + + { + /// URL to get the next set of operation list results (if there are any). + string NextLink { get; set; } + /// List of operations supported by the resource provider + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/OperationListResult.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/OperationListResult.json.cs new file mode 100644 index 000000000000..28c89dc69deb --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/OperationListResult.json.cs @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// + /// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of + /// results. + /// + public partial class OperationListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new OperationListResult(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal OperationListResult(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperation) (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Operation.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/PagedDeviceInsight.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/PagedDeviceInsight.PowerShell.cs new file mode 100644 index 000000000000..882870878609 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/PagedDeviceInsight.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// Paged collection of DeviceInsight items + [System.ComponentModel.TypeConverter(typeof(PagedDeviceInsightTypeConverter))] + public partial class PagedDeviceInsight + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IPagedDeviceInsight DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new PagedDeviceInsight(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IPagedDeviceInsight DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new PagedDeviceInsight(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IPagedDeviceInsight FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal PagedDeviceInsight(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IPagedDeviceInsightInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IPagedDeviceInsightInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceInsightTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IPagedDeviceInsightInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IPagedDeviceInsightInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal PagedDeviceInsight(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IPagedDeviceInsightInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IPagedDeviceInsightInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceInsightTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IPagedDeviceInsightInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IPagedDeviceInsightInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Paged collection of DeviceInsight items + [System.ComponentModel.TypeConverter(typeof(PagedDeviceInsightTypeConverter))] + public partial interface IPagedDeviceInsight + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/PagedDeviceInsight.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/PagedDeviceInsight.TypeConverter.cs new file mode 100644 index 000000000000..1cc6ee58c304 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/PagedDeviceInsight.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class PagedDeviceInsightTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IPagedDeviceInsight ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IPagedDeviceInsight).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return PagedDeviceInsight.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return PagedDeviceInsight.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return PagedDeviceInsight.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/PagedDeviceInsight.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/PagedDeviceInsight.cs new file mode 100644 index 000000000000..9d6a5cf9dfbc --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/PagedDeviceInsight.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// Paged collection of DeviceInsight items + public partial class PagedDeviceInsight : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IPagedDeviceInsight, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IPagedDeviceInsightInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// The DeviceInsight items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public PagedDeviceInsight() + { + + } + } + /// Paged collection of DeviceInsight items + public partial interface IPagedDeviceInsight : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The DeviceInsight items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The DeviceInsight items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsight) })] + System.Collections.Generic.List Value { get; set; } + + } + /// Paged collection of DeviceInsight items + internal partial interface IPagedDeviceInsightInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The DeviceInsight items on this page + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/PagedDeviceInsight.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/PagedDeviceInsight.json.cs new file mode 100644 index 000000000000..28337cba9f19 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/PagedDeviceInsight.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// Paged collection of DeviceInsight items + public partial class PagedDeviceInsight + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IPagedDeviceInsight. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IPagedDeviceInsight. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IPagedDeviceInsight FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new PagedDeviceInsight(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal PagedDeviceInsight(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsight) (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceInsight.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/Product.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/Product.PowerShell.cs new file mode 100644 index 000000000000..fd2e7bc0fbe0 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/Product.PowerShell.cs @@ -0,0 +1,260 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// An product resource belonging to a catalog resource. + [System.ComponentModel.TypeConverter(typeof(ProductTypeConverter))] + public partial class Product + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Product(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Product(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Product(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProductPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductInternal)this).Description, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Product(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProductPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductInternal)this).Description, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// An product resource belonging to a catalog resource. + [System.ComponentModel.TypeConverter(typeof(ProductTypeConverter))] + public partial interface IProduct + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/Product.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/Product.TypeConverter.cs new file mode 100644 index 000000000000..ebe649fb771d --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/Product.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ProductTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Product.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Product.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Product.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/Product.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/Product.cs new file mode 100644 index 000000000000..b2951624a856 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/Product.cs @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// An product resource belonging to a catalog resource. + public partial class Product : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductInternal, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProxyResource(); + + /// Description of the product + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductPropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductPropertiesInternal)Property).Description = value ?? null; } + + /// + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Id; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductProperties Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProductProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductPropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProductProperties()); set => this._property = value; } + + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductPropertiesInternal)Property).ProvisioningState; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType = value ?? null; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType = value ?? null; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__proxyResource).Type; } + + /// Creates an new instance. + public Product() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); + } + } + /// An product resource belonging to a catalog resource. + public partial interface IProduct : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProxyResource + { + /// Description of the product + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"Description of the product", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The status of the last operation.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")] + string ProvisioningState { get; } + + } + /// An product resource belonging to a catalog resource. + internal partial interface IProductInternal : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProxyResourceInternal + { + /// Description of the product + string Description { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductProperties Property { get; set; } + /// The status of the last operation. + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")] + string ProvisioningState { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/Product.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/Product.json.cs new file mode 100644 index 000000000000..99f4634ebf50 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/Product.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// An product resource belonging to a catalog resource. + public partial class Product + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new Product(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal Product(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProductProperties.FromJson(__jsonProperties) : _property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __proxyResource?.ToJson(container, serializationMode); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ProductListResult.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ProductListResult.PowerShell.cs new file mode 100644 index 000000000000..bfd75269bf74 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ProductListResult.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// The response of a Product list operation. + [System.ComponentModel.TypeConverter(typeof(ProductListResultTypeConverter))] + public partial class ProductListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ProductListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ProductListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ProductListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProductTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ProductListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProductTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The response of a Product list operation. + [System.ComponentModel.TypeConverter(typeof(ProductListResultTypeConverter))] + public partial interface IProductListResult + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ProductListResult.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ProductListResult.TypeConverter.cs new file mode 100644 index 000000000000..fb41601b2eb9 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ProductListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ProductListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ProductListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ProductListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ProductListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ProductListResult.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ProductListResult.cs new file mode 100644 index 000000000000..c7289a6ce890 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ProductListResult.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The response of a Product list operation. + public partial class ProductListResult : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductListResult, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// The Product items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public ProductListResult() + { + + } + } + /// The response of a Product list operation. + public partial interface IProductListResult : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The Product items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Product items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct) })] + System.Collections.Generic.List Value { get; set; } + + } + /// The response of a Product list operation. + internal partial interface IProductListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The Product items on this page + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ProductListResult.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ProductListResult.json.cs new file mode 100644 index 000000000000..f8400559951f --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ProductListResult.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The response of a Product list operation. + public partial class ProductListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new ProductListResult(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal ProductListResult(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct) (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Product.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ProductProperties.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ProductProperties.PowerShell.cs new file mode 100644 index 000000000000..70e7b98e4ba8 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ProductProperties.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// The properties of product + [System.ComponentModel.TypeConverter(typeof(ProductPropertiesTypeConverter))] + public partial class ProductProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ProductProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ProductProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ProductProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductPropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ProductProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductPropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The properties of product + [System.ComponentModel.TypeConverter(typeof(ProductPropertiesTypeConverter))] + public partial interface IProductProperties + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ProductProperties.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ProductProperties.TypeConverter.cs new file mode 100644 index 000000000000..24fa442f30ed --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ProductProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ProductPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ProductProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ProductProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ProductProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ProductProperties.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ProductProperties.cs new file mode 100644 index 000000000000..d91644208875 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ProductProperties.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The properties of product + public partial class ProductProperties : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductProperties, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductPropertiesInternal + { + + /// Backing field for property. + private string _description; + + /// Description of the product + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string Description { get => this._description; set => this._description = value; } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Backing field for property. + private string _provisioningState; + + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// Creates an new instance. + public ProductProperties() + { + + } + } + /// The properties of product + public partial interface IProductProperties : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable + { + /// Description of the product + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Description of the product", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The status of the last operation.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")] + string ProvisioningState { get; } + + } + /// The properties of product + internal partial interface IProductPropertiesInternal + + { + /// Description of the product + string Description { get; set; } + /// The status of the last operation. + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")] + string ProvisioningState { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ProductProperties.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ProductProperties.json.cs new file mode 100644 index 000000000000..dda7c567c2e1 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ProductProperties.json.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The properties of product + public partial class ProductProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new ProductProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal ProductProperties(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)_description;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ProductUpdate.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ProductUpdate.PowerShell.cs new file mode 100644 index 000000000000..ed04eb6533e6 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ProductUpdate.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// The type used for update operations of the Product. + [System.ComponentModel.TypeConverter(typeof(ProductUpdateTypeConverter))] + public partial class ProductUpdate + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ProductUpdate(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ProductUpdate(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ProductUpdate(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProductUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdateInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdateInternal)this).Description, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ProductUpdate(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProductUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdateInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdateInternal)this).Description, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The type used for update operations of the Product. + [System.ComponentModel.TypeConverter(typeof(ProductUpdateTypeConverter))] + public partial interface IProductUpdate + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ProductUpdate.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ProductUpdate.TypeConverter.cs new file mode 100644 index 000000000000..01c7ca604b89 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ProductUpdate.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ProductUpdateTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdate ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdate).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ProductUpdate.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ProductUpdate.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ProductUpdate.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ProductUpdate.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ProductUpdate.cs new file mode 100644 index 000000000000..551edfbd098d --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ProductUpdate.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The type used for update operations of the Product. + public partial class ProductUpdate : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdate, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdateInternal + { + + /// Description of the product + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdatePropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdatePropertiesInternal)Property).Description = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdateProperties Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProductUpdateProperties()); set { {_property = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdateProperties _property; + + /// The updatable properties of the Product. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProductUpdateProperties()); set => this._property = value; } + + /// Creates an new instance. + public ProductUpdate() + { + + } + } + /// The type used for update operations of the Product. + public partial interface IProductUpdate : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable + { + /// Description of the product + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Description of the product", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + + } + /// The type used for update operations of the Product. + internal partial interface IProductUpdateInternal + + { + /// Description of the product + string Description { get; set; } + /// The updatable properties of the Product. + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdateProperties Property { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ProductUpdate.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ProductUpdate.json.cs new file mode 100644 index 000000000000..bc9433de255a --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ProductUpdate.json.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The type used for update operations of the Product. + public partial class ProductUpdate + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdate. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdate. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new ProductUpdate(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal ProductUpdate(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProductUpdateProperties.FromJson(__jsonProperties) : _property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ProductUpdateProperties.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ProductUpdateProperties.PowerShell.cs new file mode 100644 index 000000000000..0e1feb22f84d --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ProductUpdateProperties.PowerShell.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// The updatable properties of the Product. + [System.ComponentModel.TypeConverter(typeof(ProductUpdatePropertiesTypeConverter))] + public partial class ProductUpdateProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ProductUpdateProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ProductUpdateProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ProductUpdateProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ProductUpdateProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The updatable properties of the Product. + [System.ComponentModel.TypeConverter(typeof(ProductUpdatePropertiesTypeConverter))] + public partial interface IProductUpdateProperties + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ProductUpdateProperties.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ProductUpdateProperties.TypeConverter.cs new file mode 100644 index 000000000000..b7399cc5599f --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ProductUpdateProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ProductUpdatePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdateProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdateProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ProductUpdateProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ProductUpdateProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ProductUpdateProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ProductUpdateProperties.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ProductUpdateProperties.cs new file mode 100644 index 000000000000..3e4657791c64 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ProductUpdateProperties.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The updatable properties of the Product. + public partial class ProductUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdateProperties, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdatePropertiesInternal + { + + /// Backing field for property. + private string _description; + + /// Description of the product + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string Description { get => this._description; set => this._description = value; } + + /// Creates an new instance. + public ProductUpdateProperties() + { + + } + } + /// The updatable properties of the Product. + public partial interface IProductUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable + { + /// Description of the product + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Description of the product", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + + } + /// The updatable properties of the Product. + internal partial interface IProductUpdatePropertiesInternal + + { + /// Description of the product + string Description { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ProductUpdateProperties.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ProductUpdateProperties.json.cs new file mode 100644 index 000000000000..b4966eef50ca --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ProductUpdateProperties.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// The updatable properties of the Product. + public partial class ProductUpdateProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdateProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdateProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new ProductUpdateProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal ProductUpdateProperties(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)_description;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ProofOfPossessionNonceRequest.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ProofOfPossessionNonceRequest.PowerShell.cs new file mode 100644 index 000000000000..018d6f17c5f6 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ProofOfPossessionNonceRequest.PowerShell.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// Request for the proof of possession nonce + [System.ComponentModel.TypeConverter(typeof(ProofOfPossessionNonceRequestTypeConverter))] + public partial class ProofOfPossessionNonceRequest + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceRequest DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ProofOfPossessionNonceRequest(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceRequest DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ProofOfPossessionNonceRequest(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceRequest FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ProofOfPossessionNonceRequest(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ProofOfPossessionNonce")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceRequestInternal)this).ProofOfPossessionNonce = (string) content.GetValueForProperty("ProofOfPossessionNonce",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceRequestInternal)this).ProofOfPossessionNonce, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ProofOfPossessionNonceRequest(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ProofOfPossessionNonce")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceRequestInternal)this).ProofOfPossessionNonce = (string) content.GetValueForProperty("ProofOfPossessionNonce",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceRequestInternal)this).ProofOfPossessionNonce, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Request for the proof of possession nonce + [System.ComponentModel.TypeConverter(typeof(ProofOfPossessionNonceRequestTypeConverter))] + public partial interface IProofOfPossessionNonceRequest + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ProofOfPossessionNonceRequest.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ProofOfPossessionNonceRequest.TypeConverter.cs new file mode 100644 index 000000000000..c7671fc3fee4 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ProofOfPossessionNonceRequest.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ProofOfPossessionNonceRequestTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceRequest ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceRequest).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ProofOfPossessionNonceRequest.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ProofOfPossessionNonceRequest.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ProofOfPossessionNonceRequest.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ProofOfPossessionNonceRequest.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ProofOfPossessionNonceRequest.cs new file mode 100644 index 000000000000..44d115cb87c3 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ProofOfPossessionNonceRequest.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// Request for the proof of possession nonce + public partial class ProofOfPossessionNonceRequest : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceRequest, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceRequestInternal + { + + /// Backing field for property. + private string _proofOfPossessionNonce; + + /// The proof of possession nonce + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string ProofOfPossessionNonce { get => this._proofOfPossessionNonce; set => this._proofOfPossessionNonce = value; } + + /// Creates an new instance. + public ProofOfPossessionNonceRequest() + { + + } + } + /// Request for the proof of possession nonce + public partial interface IProofOfPossessionNonceRequest : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable + { + /// The proof of possession nonce + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The proof of possession nonce", + SerializedName = @"proofOfPossessionNonce", + PossibleTypes = new [] { typeof(string) })] + string ProofOfPossessionNonce { get; set; } + + } + /// Request for the proof of possession nonce + internal partial interface IProofOfPossessionNonceRequestInternal + + { + /// The proof of possession nonce + string ProofOfPossessionNonce { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ProofOfPossessionNonceRequest.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ProofOfPossessionNonceRequest.json.cs new file mode 100644 index 000000000000..89b12ea61b72 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ProofOfPossessionNonceRequest.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// Request for the proof of possession nonce + public partial class ProofOfPossessionNonceRequest + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceRequest. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceRequest. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new ProofOfPossessionNonceRequest(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal ProofOfPossessionNonceRequest(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_proofOfPossessionNonce = If( json?.PropertyT("proofOfPossessionNonce"), out var __jsonProofOfPossessionNonce) ? (string)__jsonProofOfPossessionNonce : (string)_proofOfPossessionNonce;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._proofOfPossessionNonce)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._proofOfPossessionNonce.ToString()) : null, "proofOfPossessionNonce" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ProofOfPossessionNonceResponse.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ProofOfPossessionNonceResponse.PowerShell.cs new file mode 100644 index 000000000000..7d167bcdd4da --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ProofOfPossessionNonceResponse.PowerShell.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// Result of the action to generate a proof of possession nonce + [System.ComponentModel.TypeConverter(typeof(ProofOfPossessionNonceResponseTypeConverter))] + public partial class ProofOfPossessionNonceResponse + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ProofOfPossessionNonceResponse(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ProofOfPossessionNonceResponse(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ProofOfPossessionNonceResponse(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Certificate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).Certificate = (string) content.GetValueForProperty("Certificate",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).Certificate, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("Subject")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).Subject = (string) content.GetValueForProperty("Subject",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).Subject, global::System.Convert.ToString); + } + if (content.Contains("Thumbprint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).Thumbprint = (string) content.GetValueForProperty("Thumbprint",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).Thumbprint, global::System.Convert.ToString); + } + if (content.Contains("ExpiryUtc")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).ExpiryUtc = (global::System.DateTime?) content.GetValueForProperty("ExpiryUtc",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).ExpiryUtc, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("NotBeforeUtc")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).NotBeforeUtc = (global::System.DateTime?) content.GetValueForProperty("NotBeforeUtc",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).NotBeforeUtc, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ProofOfPossessionNonceResponse(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Certificate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).Certificate = (string) content.GetValueForProperty("Certificate",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).Certificate, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("Subject")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).Subject = (string) content.GetValueForProperty("Subject",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).Subject, global::System.Convert.ToString); + } + if (content.Contains("Thumbprint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).Thumbprint = (string) content.GetValueForProperty("Thumbprint",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).Thumbprint, global::System.Convert.ToString); + } + if (content.Contains("ExpiryUtc")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).ExpiryUtc = (global::System.DateTime?) content.GetValueForProperty("ExpiryUtc",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).ExpiryUtc, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("NotBeforeUtc")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).NotBeforeUtc = (global::System.DateTime?) content.GetValueForProperty("NotBeforeUtc",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).NotBeforeUtc, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Result of the action to generate a proof of possession nonce + [System.ComponentModel.TypeConverter(typeof(ProofOfPossessionNonceResponseTypeConverter))] + public partial interface IProofOfPossessionNonceResponse + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ProofOfPossessionNonceResponse.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ProofOfPossessionNonceResponse.TypeConverter.cs new file mode 100644 index 000000000000..d34f4377ff1e --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ProofOfPossessionNonceResponse.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ProofOfPossessionNonceResponseTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceResponse ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceResponse).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ProofOfPossessionNonceResponse.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ProofOfPossessionNonceResponse.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ProofOfPossessionNonceResponse.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ProofOfPossessionNonceResponse.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ProofOfPossessionNonceResponse.cs new file mode 100644 index 000000000000..dbd85d39988d --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ProofOfPossessionNonceResponse.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// Result of the action to generate a proof of possession nonce + public partial class ProofOfPossessionNonceResponse : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceResponse, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceResponseInternal, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateProperties __certificateProperties = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CertificateProperties(); + + /// The certificate as a UTF-8 encoded base 64 string. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string Certificate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)__certificateProperties).Certificate; } + + /// The certificate expiry date. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public global::System.DateTime? ExpiryUtc { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)__certificateProperties).ExpiryUtc; } + + /// Internal Acessors for Certificate + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal.Certificate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)__certificateProperties).Certificate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)__certificateProperties).Certificate = value; } + + /// Internal Acessors for ExpiryUtc + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal.ExpiryUtc { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)__certificateProperties).ExpiryUtc; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)__certificateProperties).ExpiryUtc = value; } + + /// Internal Acessors for NotBeforeUtc + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal.NotBeforeUtc { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)__certificateProperties).NotBeforeUtc; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)__certificateProperties).NotBeforeUtc = value; } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)__certificateProperties).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)__certificateProperties).ProvisioningState = value; } + + /// Internal Acessors for Status + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal.Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)__certificateProperties).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)__certificateProperties).Status = value; } + + /// Internal Acessors for Subject + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal.Subject { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)__certificateProperties).Subject; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)__certificateProperties).Subject = value; } + + /// Internal Acessors for Thumbprint + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal.Thumbprint { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)__certificateProperties).Thumbprint; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)__certificateProperties).Thumbprint = value; } + + /// The certificate not before date. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public global::System.DateTime? NotBeforeUtc { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)__certificateProperties).NotBeforeUtc; } + + /// The status of the last operation. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)__certificateProperties).ProvisioningState; } + + /// The certificate status. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)__certificateProperties).Status; } + + /// The certificate subject. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string Subject { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)__certificateProperties).Subject; } + + /// The certificate thumbprint. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string Thumbprint { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal)__certificateProperties).Thumbprint; } + + /// Creates an new instance. + public ProofOfPossessionNonceResponse() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__certificateProperties), __certificateProperties); + await eventListener.AssertObjectIsValid(nameof(__certificateProperties), __certificateProperties); + } + } + /// Result of the action to generate a proof of possession nonce + public partial interface IProofOfPossessionNonceResponse : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateProperties + { + + } + /// Result of the action to generate a proof of possession nonce + internal partial interface IProofOfPossessionNonceResponseInternal : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificatePropertiesInternal + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ProofOfPossessionNonceResponse.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ProofOfPossessionNonceResponse.json.cs new file mode 100644 index 000000000000..836130e27569 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ProofOfPossessionNonceResponse.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// Result of the action to generate a proof of possession nonce + public partial class ProofOfPossessionNonceResponse + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceResponse. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceResponse. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new ProofOfPossessionNonceResponse(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal ProofOfPossessionNonceResponse(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __certificateProperties = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CertificateProperties(json); + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __certificateProperties?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ProxyResource.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ProxyResource.PowerShell.cs new file mode 100644 index 000000000000..69749c05c9fd --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ProxyResource.PowerShell.cs @@ -0,0 +1,238 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + /// + [System.ComponentModel.TypeConverter(typeof(ProxyResourceTypeConverter))] + public partial class ProxyResource + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProxyResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ProxyResource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProxyResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ProxyResource(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProxyResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ProxyResource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ProxyResource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + [System.ComponentModel.TypeConverter(typeof(ProxyResourceTypeConverter))] + public partial interface IProxyResource + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ProxyResource.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ProxyResource.TypeConverter.cs new file mode 100644 index 000000000000..e4f922e15dfa --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ProxyResource.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ProxyResourceTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProxyResource ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProxyResource).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ProxyResource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ProxyResource.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ProxyResource.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ProxyResource.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ProxyResource.cs new file mode 100644 index 000000000000..fcd6a27f3cd4 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ProxyResource.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + /// + public partial class ProxyResource : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProxyResource, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProxyResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Resource(); + + /// + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).Id; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).Name; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).SystemDataCreatedByType = value ?? null; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? null; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public ProxyResource() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + public partial interface IProxyResource : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResource + { + + } + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + internal partial interface IProxyResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/ProxyResource.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/ProxyResource.json.cs new file mode 100644 index 000000000000..88dcb6bfbbf8 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/ProxyResource.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + /// + public partial class ProxyResource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProxyResource. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProxyResource. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProxyResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new ProxyResource(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal ProxyResource(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Resource(json); + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/Resource.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/Resource.PowerShell.cs new file mode 100644 index 000000000000..14ce4456be4a --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/Resource.PowerShell.cs @@ -0,0 +1,238 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// Common fields that are returned in the response for all Azure Resource Manager resources + /// + [System.ComponentModel.TypeConverter(typeof(ResourceTypeConverter))] + public partial class Resource + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Resource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Resource(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Resource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Resource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Common fields that are returned in the response for all Azure Resource Manager resources + [System.ComponentModel.TypeConverter(typeof(ResourceTypeConverter))] + public partial interface IResource + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/Resource.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/Resource.TypeConverter.cs new file mode 100644 index 000000000000..c7193b1d2091 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/Resource.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ResourceTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResource ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResource).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Resource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Resource.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Resource.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/Resource.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/Resource.cs new file mode 100644 index 000000000000..3010da14030e --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/Resource.cs @@ -0,0 +1,239 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// + /// Common fields that are returned in the response for all Azure Resource Manager resources + /// + public partial class Resource : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResource, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal + { + + /// Backing field for property. + private string _id; + + /// + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string Id { get => this._id; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal.Id { get => this._id; set { {_id = value;} } } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal.Name { get => this._name; set { {_name = value;} } } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.SystemData()); set { {_systemData = value;} } } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal.Type { get => this._type; set { {_type = value;} } } + + /// Backing field for property. + private string _name; + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string Name { get => this._name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData _systemData; + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.SystemData()); } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemDataInternal)SystemData).CreatedByType = value ?? null; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inlined)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemDataInternal)SystemData).LastModifiedByType = value ?? null; } + + /// Backing field for property. + private string _type; + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string Type { get => this._type; } + + /// Creates an new instance. + public Resource() + { + + } + } + /// Common fields that are returned in the response for all Azure Resource Manager resources + public partial interface IResource : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable + { + /// + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; } + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The name of the resource", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; } + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The timestamp of resource creation (UTC).", + SerializedName = @"createdAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataCreatedAt { get; } + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The identity that created the resource.", + SerializedName = @"createdBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataCreatedBy { get; } + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The type of identity that created the resource.", + SerializedName = @"createdByType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; } + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The timestamp of resource last modification (UTC)", + SerializedName = @"lastModifiedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataLastModifiedAt { get; } + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The identity that last modified the resource.", + SerializedName = @"lastModifiedBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataLastModifiedBy { get; } + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The type of identity that last modified the resource.", + SerializedName = @"lastModifiedByType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; } + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The type of the resource. E.g. ""Microsoft.Compute/virtualMachines"" or ""Microsoft.Storage/storageAccounts""", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + string Type { get; } + + } + /// Common fields that are returned in the response for all Azure Resource Manager resources + internal partial interface IResourceInternal + + { + /// + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + string Id { get; set; } + /// The name of the resource + string Name { get; set; } + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData SystemData { get; set; } + /// The timestamp of resource creation (UTC). + global::System.DateTime? SystemDataCreatedAt { get; set; } + /// The identity that created the resource. + string SystemDataCreatedBy { get; set; } + /// The type of identity that created the resource. + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + global::System.DateTime? SystemDataLastModifiedAt { get; set; } + /// The identity that last modified the resource. + string SystemDataLastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; set; } + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + string Type { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/Resource.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/Resource.json.cs new file mode 100644 index 000000000000..9b804112d4ff --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/Resource.json.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// + /// Common fields that are returned in the response for all Azure Resource Manager resources + /// + public partial class Resource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResource. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResource. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new Resource(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal Resource(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.SystemData.FromJson(__jsonSystemData) : _systemData;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/SignedCapabilityImageResponse.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/SignedCapabilityImageResponse.PowerShell.cs new file mode 100644 index 000000000000..5ff54ba0c99f --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/SignedCapabilityImageResponse.PowerShell.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// Signed device capability image response + [System.ComponentModel.TypeConverter(typeof(SignedCapabilityImageResponseTypeConverter))] + public partial class SignedCapabilityImageResponse + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SignedCapabilityImageResponse(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SignedCapabilityImageResponse(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SignedCapabilityImageResponse(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Image")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponseInternal)this).Image = (string) content.GetValueForProperty("Image",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponseInternal)this).Image, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SignedCapabilityImageResponse(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Image")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponseInternal)this).Image = (string) content.GetValueForProperty("Image",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponseInternal)this).Image, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Signed device capability image response + [System.ComponentModel.TypeConverter(typeof(SignedCapabilityImageResponseTypeConverter))] + public partial interface ISignedCapabilityImageResponse + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/SignedCapabilityImageResponse.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/SignedCapabilityImageResponse.TypeConverter.cs new file mode 100644 index 000000000000..eaf1e000bb57 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/SignedCapabilityImageResponse.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SignedCapabilityImageResponseTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SignedCapabilityImageResponse.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SignedCapabilityImageResponse.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SignedCapabilityImageResponse.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/SignedCapabilityImageResponse.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/SignedCapabilityImageResponse.cs new file mode 100644 index 000000000000..8d50019edd7b --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/SignedCapabilityImageResponse.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// Signed device capability image response + public partial class SignedCapabilityImageResponse : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponseInternal + { + + /// Backing field for property. + private string _image; + + /// The signed device capability image as a UTF-8 encoded base 64 string. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string Image { get => this._image; } + + /// Internal Acessors for Image + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponseInternal.Image { get => this._image; set { {_image = value;} } } + + /// Creates an new instance. + public SignedCapabilityImageResponse() + { + + } + } + /// Signed device capability image response + public partial interface ISignedCapabilityImageResponse : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable + { + /// The signed device capability image as a UTF-8 encoded base 64 string. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The signed device capability image as a UTF-8 encoded base 64 string.", + SerializedName = @"image", + PossibleTypes = new [] { typeof(string) })] + string Image { get; } + + } + /// Signed device capability image response + internal partial interface ISignedCapabilityImageResponseInternal + + { + /// The signed device capability image as a UTF-8 encoded base 64 string. + string Image { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/SignedCapabilityImageResponse.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/SignedCapabilityImageResponse.json.cs new file mode 100644 index 000000000000..1d1d8b8e8651 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/SignedCapabilityImageResponse.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// Signed device capability image response + public partial class SignedCapabilityImageResponse + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new SignedCapabilityImageResponse(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal SignedCapabilityImageResponse(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_image = If( json?.PropertyT("image"), out var __jsonImage) ? (string)__jsonImage : (string)_image;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._image)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._image.ToString()) : null, "image" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/SphereIdentity.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/SphereIdentity.PowerShell.cs new file mode 100644 index 000000000000..f0c98dbc15c6 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/SphereIdentity.PowerShell.cs @@ -0,0 +1,234 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(SphereIdentityTypeConverter))] + public partial class SphereIdentity + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SphereIdentity(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SphereIdentity(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SphereIdentity(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SubscriptionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentityInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentityInternal)this).SubscriptionId, global::System.Convert.ToString); + } + if (content.Contains("ResourceGroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentityInternal)this).ResourceGroupName = (string) content.GetValueForProperty("ResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentityInternal)this).ResourceGroupName, global::System.Convert.ToString); + } + if (content.Contains("CatalogName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentityInternal)this).CatalogName = (string) content.GetValueForProperty("CatalogName",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentityInternal)this).CatalogName, global::System.Convert.ToString); + } + if (content.Contains("SerialNumber")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentityInternal)this).SerialNumber = (string) content.GetValueForProperty("SerialNumber",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentityInternal)this).SerialNumber, global::System.Convert.ToString); + } + if (content.Contains("ImageName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentityInternal)this).ImageName = (string) content.GetValueForProperty("ImageName",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentityInternal)this).ImageName, global::System.Convert.ToString); + } + if (content.Contains("ProductName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentityInternal)this).ProductName = (string) content.GetValueForProperty("ProductName",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentityInternal)this).ProductName, global::System.Convert.ToString); + } + if (content.Contains("DeviceGroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentityInternal)this).DeviceGroupName = (string) content.GetValueForProperty("DeviceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentityInternal)this).DeviceGroupName, global::System.Convert.ToString); + } + if (content.Contains("DeploymentName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentityInternal)this).DeploymentName = (string) content.GetValueForProperty("DeploymentName",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentityInternal)this).DeploymentName, global::System.Convert.ToString); + } + if (content.Contains("DeviceName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentityInternal)this).DeviceName = (string) content.GetValueForProperty("DeviceName",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentityInternal)this).DeviceName, global::System.Convert.ToString); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentityInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentityInternal)this).Id, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SphereIdentity(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SubscriptionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentityInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentityInternal)this).SubscriptionId, global::System.Convert.ToString); + } + if (content.Contains("ResourceGroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentityInternal)this).ResourceGroupName = (string) content.GetValueForProperty("ResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentityInternal)this).ResourceGroupName, global::System.Convert.ToString); + } + if (content.Contains("CatalogName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentityInternal)this).CatalogName = (string) content.GetValueForProperty("CatalogName",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentityInternal)this).CatalogName, global::System.Convert.ToString); + } + if (content.Contains("SerialNumber")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentityInternal)this).SerialNumber = (string) content.GetValueForProperty("SerialNumber",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentityInternal)this).SerialNumber, global::System.Convert.ToString); + } + if (content.Contains("ImageName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentityInternal)this).ImageName = (string) content.GetValueForProperty("ImageName",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentityInternal)this).ImageName, global::System.Convert.ToString); + } + if (content.Contains("ProductName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentityInternal)this).ProductName = (string) content.GetValueForProperty("ProductName",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentityInternal)this).ProductName, global::System.Convert.ToString); + } + if (content.Contains("DeviceGroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentityInternal)this).DeviceGroupName = (string) content.GetValueForProperty("DeviceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentityInternal)this).DeviceGroupName, global::System.Convert.ToString); + } + if (content.Contains("DeploymentName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentityInternal)this).DeploymentName = (string) content.GetValueForProperty("DeploymentName",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentityInternal)this).DeploymentName, global::System.Convert.ToString); + } + if (content.Contains("DeviceName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentityInternal)this).DeviceName = (string) content.GetValueForProperty("DeviceName",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentityInternal)this).DeviceName, global::System.Convert.ToString); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentityInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentityInternal)this).Id, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + [System.ComponentModel.TypeConverter(typeof(SphereIdentityTypeConverter))] + public partial interface ISphereIdentity + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/SphereIdentity.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/SphereIdentity.TypeConverter.cs new file mode 100644 index 000000000000..772b561ca041 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/SphereIdentity.TypeConverter.cs @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SphereIdentityTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + // we allow string conversion too. + if (type == typeof(global::System.String)) + { + return true; + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + // support direct string to id type conversion. + if (type == typeof(global::System.String)) + { + return new SphereIdentity { Id = sourceValue }; + } + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SphereIdentity.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SphereIdentity.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SphereIdentity.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/SphereIdentity.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/SphereIdentity.cs new file mode 100644 index 000000000000..e1995084ad4d --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/SphereIdentity.cs @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + public partial class SphereIdentity : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentityInternal + { + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// Backing field for property. + private string _deploymentName; + + /// + /// Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string DeploymentName { get => this._deploymentName; set => this._deploymentName = value; } + + /// Backing field for property. + private string _deviceGroupName; + + /// Name of device group. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string DeviceGroupName { get => this._deviceGroupName; set => this._deviceGroupName = value; } + + /// Backing field for property. + private string _deviceName; + + /// Device name + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string DeviceName { get => this._deviceName; set => this._deviceName = value; } + + /// Backing field for property. + private string _id; + + /// Resource identity path + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string Id { get => this._id; set => this._id = value; } + + /// Backing field for property. + private string _imageName; + + /// Image name. Use an image GUID for GA versions of the API. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string ImageName { get => this._imageName; set => this._imageName = value; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _serialNumber; + + /// + /// Serial number of the certificate. Use '.default' to get current active certificate. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string SerialNumber { get => this._serialNumber; set => this._serialNumber = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Creates an new instance. + public SphereIdentity() + { + + } + } + public partial interface ISphereIdentity : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable + { + /// Name of catalog + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + string CatalogName { get; set; } + /// + /// Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group.", + SerializedName = @"deploymentName", + PossibleTypes = new [] { typeof(string) })] + string DeploymentName { get; set; } + /// Name of device group. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + string DeviceGroupName { get; set; } + /// Device name + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Device name", + SerializedName = @"deviceName", + PossibleTypes = new [] { typeof(string) })] + string DeviceName { get; set; } + /// Resource identity path + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Resource identity path", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; set; } + /// Image name. Use an image GUID for GA versions of the API. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Image name. Use an image GUID for GA versions of the API.", + SerializedName = @"imageName", + PossibleTypes = new [] { typeof(string) })] + string ImageName { get; set; } + /// Name of product. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + string ProductName { get; set; } + /// The name of the resource group. The name is case insensitive. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + string ResourceGroupName { get; set; } + /// + /// Serial number of the certificate. Use '.default' to get current active certificate. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Serial number of the certificate. Use '.default' to get current active certificate.", + SerializedName = @"serialNumber", + PossibleTypes = new [] { typeof(string) })] + string SerialNumber { get; set; } + /// The ID of the target subscription. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + string SubscriptionId { get; set; } + + } + internal partial interface ISphereIdentityInternal + + { + /// Name of catalog + string CatalogName { get; set; } + /// + /// Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + /// + string DeploymentName { get; set; } + /// Name of device group. + string DeviceGroupName { get; set; } + /// Device name + string DeviceName { get; set; } + /// Resource identity path + string Id { get; set; } + /// Image name. Use an image GUID for GA versions of the API. + string ImageName { get; set; } + /// Name of product. + string ProductName { get; set; } + /// The name of the resource group. The name is case insensitive. + string ResourceGroupName { get; set; } + /// + /// Serial number of the certificate. Use '.default' to get current active certificate. + /// + string SerialNumber { get; set; } + /// The ID of the target subscription. + string SubscriptionId { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/SphereIdentity.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/SphereIdentity.json.cs new file mode 100644 index 000000000000..df6069e8374d --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/SphereIdentity.json.cs @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + public partial class SphereIdentity + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new SphereIdentity(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal SphereIdentity(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_subscriptionId = If( json?.PropertyT("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)_subscriptionId;} + {_resourceGroupName = If( json?.PropertyT("resourceGroupName"), out var __jsonResourceGroupName) ? (string)__jsonResourceGroupName : (string)_resourceGroupName;} + {_catalogName = If( json?.PropertyT("catalogName"), out var __jsonCatalogName) ? (string)__jsonCatalogName : (string)_catalogName;} + {_serialNumber = If( json?.PropertyT("serialNumber"), out var __jsonSerialNumber) ? (string)__jsonSerialNumber : (string)_serialNumber;} + {_imageName = If( json?.PropertyT("imageName"), out var __jsonImageName) ? (string)__jsonImageName : (string)_imageName;} + {_productName = If( json?.PropertyT("productName"), out var __jsonProductName) ? (string)__jsonProductName : (string)_productName;} + {_deviceGroupName = If( json?.PropertyT("deviceGroupName"), out var __jsonDeviceGroupName) ? (string)__jsonDeviceGroupName : (string)_deviceGroupName;} + {_deploymentName = If( json?.PropertyT("deploymentName"), out var __jsonDeploymentName) ? (string)__jsonDeploymentName : (string)_deploymentName;} + {_deviceName = If( json?.PropertyT("deviceName"), out var __jsonDeviceName) ? (string)__jsonDeviceName : (string)_deviceName;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._subscriptionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._subscriptionId.ToString()) : null, "subscriptionId" ,container.Add ); + AddIf( null != (((object)this._resourceGroupName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._resourceGroupName.ToString()) : null, "resourceGroupName" ,container.Add ); + AddIf( null != (((object)this._catalogName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._catalogName.ToString()) : null, "catalogName" ,container.Add ); + AddIf( null != (((object)this._serialNumber)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._serialNumber.ToString()) : null, "serialNumber" ,container.Add ); + AddIf( null != (((object)this._imageName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._imageName.ToString()) : null, "imageName" ,container.Add ); + AddIf( null != (((object)this._productName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._productName.ToString()) : null, "productName" ,container.Add ); + AddIf( null != (((object)this._deviceGroupName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._deviceGroupName.ToString()) : null, "deviceGroupName" ,container.Add ); + AddIf( null != (((object)this._deploymentName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._deploymentName.ToString()) : null, "deploymentName" ,container.Add ); + AddIf( null != (((object)this._deviceName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._deviceName.ToString()) : null, "deviceName" ,container.Add ); + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/SystemData.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/SystemData.PowerShell.cs new file mode 100644 index 000000000000..16c34f053874 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/SystemData.PowerShell.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// Metadata pertaining to creation and last modification of the resource. + [System.ComponentModel.TypeConverter(typeof(SystemDataTypeConverter))] + public partial class SystemData + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SystemData(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SystemData(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SystemData(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); + } + if (content.Contains("CreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemDataInternal)this).CreatedByType = (string) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemDataInternal)this).CreatedByType, global::System.Convert.ToString); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("LastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemDataInternal)this).LastModifiedByType = (string) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemDataInternal)this).LastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("LastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemDataInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SystemData(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); + } + if (content.Contains("CreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemDataInternal)this).CreatedByType = (string) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemDataInternal)this).CreatedByType, global::System.Convert.ToString); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("LastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemDataInternal)this).LastModifiedByType = (string) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemDataInternal)this).LastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("LastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemDataInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Metadata pertaining to creation and last modification of the resource. + [System.ComponentModel.TypeConverter(typeof(SystemDataTypeConverter))] + public partial interface ISystemData + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/SystemData.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/SystemData.TypeConverter.cs new file mode 100644 index 000000000000..e0c4ec1a42c6 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/SystemData.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SystemDataTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SystemData.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SystemData.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SystemData.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/SystemData.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/SystemData.cs new file mode 100644 index 000000000000..092a83f55ca0 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/SystemData.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// Metadata pertaining to creation and last modification of the resource. + public partial class SystemData : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemDataInternal + { + + /// Backing field for property. + private global::System.DateTime? _createdAt; + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public global::System.DateTime? CreatedAt { get => this._createdAt; set => this._createdAt = value; } + + /// Backing field for property. + private string _createdBy; + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string CreatedBy { get => this._createdBy; set => this._createdBy = value; } + + /// Backing field for property. + private string _createdByType; + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string CreatedByType { get => this._createdByType; set => this._createdByType = value; } + + /// Backing field for property. + private global::System.DateTime? _lastModifiedAt; + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public global::System.DateTime? LastModifiedAt { get => this._lastModifiedAt; set => this._lastModifiedAt = value; } + + /// Backing field for property. + private string _lastModifiedBy; + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string LastModifiedBy { get => this._lastModifiedBy; set => this._lastModifiedBy = value; } + + /// Backing field for property. + private string _lastModifiedByType; + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string LastModifiedByType { get => this._lastModifiedByType; set => this._lastModifiedByType = value; } + + /// Creates an new instance. + public SystemData() + { + + } + } + /// Metadata pertaining to creation and last modification of the resource. + public partial interface ISystemData : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable + { + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The timestamp of resource creation (UTC).", + SerializedName = @"createdAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? CreatedAt { get; set; } + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The identity that created the resource.", + SerializedName = @"createdBy", + PossibleTypes = new [] { typeof(string) })] + string CreatedBy { get; set; } + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The type of identity that created the resource.", + SerializedName = @"createdByType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string CreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The timestamp of resource last modification (UTC)", + SerializedName = @"lastModifiedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastModifiedAt { get; set; } + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The identity that last modified the resource.", + SerializedName = @"lastModifiedBy", + PossibleTypes = new [] { typeof(string) })] + string LastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The type of identity that last modified the resource.", + SerializedName = @"lastModifiedByType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string LastModifiedByType { get; set; } + + } + /// Metadata pertaining to creation and last modification of the resource. + internal partial interface ISystemDataInternal + + { + /// The timestamp of resource creation (UTC). + global::System.DateTime? CreatedAt { get; set; } + /// The identity that created the resource. + string CreatedBy { get; set; } + /// The type of identity that created the resource. + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string CreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + global::System.DateTime? LastModifiedAt { get; set; } + /// The identity that last modified the resource. + string LastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string LastModifiedByType { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/SystemData.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/SystemData.json.cs new file mode 100644 index 000000000000..22b241085683 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/SystemData.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// Metadata pertaining to creation and last modification of the resource. + public partial class SystemData + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new SystemData(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal SystemData(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_createdBy = If( json?.PropertyT("createdBy"), out var __jsonCreatedBy) ? (string)__jsonCreatedBy : (string)_createdBy;} + {_createdByType = If( json?.PropertyT("createdByType"), out var __jsonCreatedByType) ? (string)__jsonCreatedByType : (string)_createdByType;} + {_createdAt = If( json?.PropertyT("createdAt"), out var __jsonCreatedAt) ? global::System.DateTime.TryParse((string)__jsonCreatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedAtValue) ? __jsonCreatedAtValue : _createdAt : _createdAt;} + {_lastModifiedBy = If( json?.PropertyT("lastModifiedBy"), out var __jsonLastModifiedBy) ? (string)__jsonLastModifiedBy : (string)_lastModifiedBy;} + {_lastModifiedByType = If( json?.PropertyT("lastModifiedByType"), out var __jsonLastModifiedByType) ? (string)__jsonLastModifiedByType : (string)_lastModifiedByType;} + {_lastModifiedAt = If( json?.PropertyT("lastModifiedAt"), out var __jsonLastModifiedAt) ? global::System.DateTime.TryParse((string)__jsonLastModifiedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastModifiedAtValue) ? __jsonLastModifiedAtValue : _lastModifiedAt : _lastModifiedAt;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._createdBy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._createdBy.ToString()) : null, "createdBy" ,container.Add ); + AddIf( null != (((object)this._createdByType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._createdByType.ToString()) : null, "createdByType" ,container.Add ); + AddIf( null != this._createdAt ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._createdAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "createdAt" ,container.Add ); + AddIf( null != (((object)this._lastModifiedBy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._lastModifiedBy.ToString()) : null, "lastModifiedBy" ,container.Add ); + AddIf( null != (((object)this._lastModifiedByType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._lastModifiedByType.ToString()) : null, "lastModifiedByType" ,container.Add ); + AddIf( null != this._lastModifiedAt ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._lastModifiedAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "lastModifiedAt" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/TrackedResource.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/TrackedResource.PowerShell.cs new file mode 100644 index 000000000000..22500328d6af --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/TrackedResource.PowerShell.cs @@ -0,0 +1,254 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' + /// + [System.ComponentModel.TypeConverter(typeof(TrackedResourceTypeConverter))] + public partial class TrackedResource + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new TrackedResource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new TrackedResource(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal TrackedResource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal TrackedResource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + } + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' + [System.ComponentModel.TypeConverter(typeof(TrackedResourceTypeConverter))] + public partial interface ITrackedResource + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/TrackedResource.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/TrackedResource.TypeConverter.cs new file mode 100644 index 000000000000..e3d50bc9990f --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/TrackedResource.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class TrackedResourceTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResource ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResource).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return TrackedResource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return TrackedResource.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return TrackedResource.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/TrackedResource.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/TrackedResource.cs new file mode 100644 index 000000000000..ae8b4088357d --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/TrackedResource.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' + /// + public partial class TrackedResource : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResource, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Resource(); + + /// + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).Id; } + + /// Backing field for property. + private string _location; + + /// The geo-location where the resource lives + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).Name; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).SystemDataCreatedByType = value ?? null; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceTags _tag; + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.TrackedResourceTags()); set => this._tag = value; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Origin(Microsoft.Azure.PowerShell.Cmdlets.Sphere.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public TrackedResource() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' + public partial interface ITrackedResource : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResource + { + /// The geo-location where the resource lives + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The geo-location where the resource lives", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceTags) })] + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceTags Tag { get; set; } + + } + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' + internal partial interface ITrackedResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IResourceInternal + { + /// The geo-location where the resource lives + string Location { get; set; } + /// Resource tags. + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceTags Tag { get; set; } + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/TrackedResource.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/TrackedResource.json.cs new file mode 100644 index 000000000000..bc092893e99d --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/TrackedResource.json.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' + /// + public partial class TrackedResource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new TrackedResource(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonString(this._location.ToString()) : null, "location" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + internal TrackedResource(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Resource(json); + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.TrackedResourceTags.FromJson(__jsonTags) : _tag;} + {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)_location;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/TrackedResourceTags.PowerShell.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/TrackedResourceTags.PowerShell.cs new file mode 100644 index 000000000000..b0d562a1b731 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/TrackedResourceTags.PowerShell.cs @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// Resource tags. + [System.ComponentModel.TypeConverter(typeof(TrackedResourceTagsTypeConverter))] + public partial class TrackedResourceTags + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceTags DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new TrackedResourceTags(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new TrackedResourceTags(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal TrackedResourceTags(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal TrackedResourceTags(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializePSObject(content); + } + } + /// Resource tags. + [System.ComponentModel.TypeConverter(typeof(TrackedResourceTagsTypeConverter))] + public partial interface ITrackedResourceTags + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/TrackedResourceTags.TypeConverter.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/TrackedResourceTags.TypeConverter.cs new file mode 100644 index 000000000000..6f2f1e59ecdb --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/TrackedResourceTags.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class TrackedResourceTagsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceTags ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceTags).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return TrackedResourceTags.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return TrackedResourceTags.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return TrackedResourceTags.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/TrackedResourceTags.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/TrackedResourceTags.cs new file mode 100644 index 000000000000..9678364194a9 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/TrackedResourceTags.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// Resource tags. + public partial class TrackedResourceTags : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceTags, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceTagsInternal + { + + /// Creates an new instance. + public TrackedResourceTags() + { + + } + } + /// Resource tags. + public partial interface ITrackedResourceTags : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IAssociativeArray + { + + } + /// Resource tags. + internal partial interface ITrackedResourceTagsInternal + + { + + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/TrackedResourceTags.dictionary.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/TrackedResourceTags.dictionary.cs new file mode 100644 index 000000000000..4db5abcf08f4 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/TrackedResourceTags.dictionary.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + public partial class TrackedResourceTags : + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.TrackedResourceTags source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Models/TrackedResourceTags.json.cs b/src/Sphere/Sphere.Autorest/generated/api/Models/TrackedResourceTags.json.cs new file mode 100644 index 000000000000..9f5b347d9944 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Models/TrackedResourceTags.json.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// Resource tags. + public partial class TrackedResourceTags + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceTags. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceTags. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new TrackedResourceTags(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject instance to deserialize from. + /// + internal TrackedResourceTags(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/api/Sphere.cs b/src/Sphere/Sphere.Autorest/generated/api/Sphere.cs new file mode 100644 index 000000000000..99a0bcbd0dc1 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/api/Sphere.cs @@ -0,0 +1,19145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// + /// Low-level API implementation for the Sphere service. + /// Azure Sphere resource management API. + /// + public partial class Sphere + { + + /// Counts devices in catalog. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsCountDevices(string subscriptionId, string resourceGroupName, string catalogName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/countDevices" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CatalogsCountDevices_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Counts devices in catalog. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsCountDevicesViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/countDevices" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CatalogsCountDevices_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Counts devices in catalog. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsCountDevicesViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/countDevices" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CatalogsCountDevicesWithResult_Call (request, eventListener,sender); + } + } + + /// Counts devices in catalog. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsCountDevicesWithResult(string subscriptionId, string resourceGroupName, string catalogName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/countDevices" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CatalogsCountDevicesWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CatalogsCountDevicesWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CountDevicesResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CatalogsCountDevices_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CountDevicesResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CatalogsCountDevices_Validate(string subscriptionId, string resourceGroupName, string catalogName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertRegEx(nameof(catalogName), catalogName, @"^[A-Za-z0-9_-]{1,50}$"); + } + } + + /// Create a Catalog + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Resource create parameters. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsCreateOrUpdate(string subscriptionId, string resourceGroupName, string catalogName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CatalogsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Create a Catalog + /// + /// Resource create parameters. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CatalogsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Create a Catalog + /// + /// Resource create parameters. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will + /// be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog body, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CatalogsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Create a Catalog + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Json string supplied to the CatalogsCreateOrUpdate operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string catalogName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CatalogsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Create a Catalog + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Json string supplied to the CatalogsCreateOrUpdate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will + /// be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string catalogName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CatalogsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Create a Catalog + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Resource create parameters. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will + /// be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string catalogName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog body, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CatalogsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will + /// be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CatalogsCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Catalog.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CatalogsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Catalog.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Resource create parameters. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CatalogsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string catalogName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog body, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertRegEx(nameof(catalogName), catalogName, @"^[A-Za-z0-9_-]{1,50}$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Delete a Catalog + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsDelete(string subscriptionId, string resourceGroupName, string catalogName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CatalogsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Delete a Catalog + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CatalogsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CatalogsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CatalogsDelete_Validate(string subscriptionId, string resourceGroupName, string catalogName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertRegEx(nameof(catalogName), catalogName, @"^[A-Za-z0-9_-]{1,50}$"); + } + } + + /// Get a Catalog + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsGet(string subscriptionId, string resourceGroupName, string catalogName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CatalogsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get a Catalog + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CatalogsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get a Catalog + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will + /// be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CatalogsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Get a Catalog + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will + /// be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsGetWithResult(string subscriptionId, string resourceGroupName, string catalogName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CatalogsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will + /// be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CatalogsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Catalog.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CatalogsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Catalog.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation events + /// back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CatalogsGet_Validate(string subscriptionId, string resourceGroupName, string catalogName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertRegEx(nameof(catalogName), catalogName, @"^[A-Za-z0-9_-]{1,50}$"); + } + } + + /// List Catalog resources by resource group + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsListByResourceGroup(string subscriptionId, string resourceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CatalogsListByResourceGroup_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List Catalog resources by resource group + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsListByResourceGroupViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CatalogsListByResourceGroup_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List Catalog resources by resource group + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsListByResourceGroupViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CatalogsListByResourceGroupWithResult_Call (request, eventListener,sender); + } + } + + /// List Catalog resources by resource group + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsListByResourceGroupWithResult(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CatalogsListByResourceGroupWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CatalogsListByResourceGroupWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CatalogListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CatalogsListByResourceGroup_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CatalogListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CatalogsListByResourceGroup_Validate(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + } + } + + /// List Catalog resources by subscription ID + /// The ID of the target subscription. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsListBySubscription(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.AzureSphere/catalogs" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CatalogsListBySubscription_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List Catalog resources by subscription ID + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsListBySubscriptionViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.AzureSphere/catalogs'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Microsoft.AzureSphere/catalogs" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CatalogsListBySubscription_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List Catalog resources by subscription ID + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsListBySubscriptionViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.AzureSphere/catalogs'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Microsoft.AzureSphere/catalogs" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CatalogsListBySubscriptionWithResult_Call (request, eventListener,sender); + } + } + + /// List Catalog resources by subscription ID + /// The ID of the target subscription. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsListBySubscriptionWithResult(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.AzureSphere/catalogs" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CatalogsListBySubscriptionWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CatalogsListBySubscriptionWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CatalogListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CatalogsListBySubscription_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CatalogListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The ID of the target subscription. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CatalogsListBySubscription_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + } + } + + /// Lists deployments for catalog. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Filter the result list using the given expression + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsListDeployments(string subscriptionId, string resourceGroupName, string catalogName, string Filter, int? Top, int? Skip, int? Maxpagesize, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/listDeployments" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CatalogsListDeployments_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Lists deployments for catalog. + /// + /// Filter the result list using the given expression + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsListDeploymentsViaIdentity(global::System.String viaIdentity, string Filter, int? Top, int? Skip, int? Maxpagesize, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/listDeployments" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CatalogsListDeployments_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Lists deployments for catalog. + /// + /// Filter the result list using the given expression + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsListDeploymentsViaIdentityWithResult(global::System.String viaIdentity, string Filter, int? Top, int? Skip, int? Maxpagesize, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/listDeployments" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CatalogsListDeploymentsWithResult_Call (request, eventListener,sender); + } + } + + /// Lists deployments for catalog. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Filter the result list using the given expression + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsListDeploymentsWithResult(string subscriptionId, string resourceGroupName, string catalogName, string Filter, int? Top, int? Skip, int? Maxpagesize, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/listDeployments" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CatalogsListDeploymentsWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CatalogsListDeploymentsWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeploymentListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CatalogsListDeployments_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeploymentListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Filter the result list using the given expression + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CatalogsListDeployments_Validate(string subscriptionId, string resourceGroupName, string catalogName, string Filter, int? Top, int? Skip, int? Maxpagesize, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertRegEx(nameof(catalogName), catalogName, @"^[A-Za-z0-9_-]{1,50}$"); + await eventListener.AssertNotNull(nameof(Filter),Filter); + } + } + + /// List the device groups for the catalog. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Filter the result list using the given expression + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// List device groups for catalog. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsListDeviceGroups(string subscriptionId, string resourceGroupName, string catalogName, string Filter, int? Top, int? Skip, int? Maxpagesize, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IListDeviceGroupsRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/listDeviceGroups" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CatalogsListDeviceGroups_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List the device groups for the catalog. + /// + /// Filter the result list using the given expression + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// List device groups for catalog. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsListDeviceGroupsViaIdentity(global::System.String viaIdentity, string Filter, int? Top, int? Skip, int? Maxpagesize, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IListDeviceGroupsRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/listDeviceGroups" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CatalogsListDeviceGroups_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List the device groups for the catalog. + /// + /// Filter the result list using the given expression + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// List device groups for catalog. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsListDeviceGroupsViaIdentityWithResult(global::System.String viaIdentity, string Filter, int? Top, int? Skip, int? Maxpagesize, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IListDeviceGroupsRequest body, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/listDeviceGroups" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CatalogsListDeviceGroupsWithResult_Call (request, eventListener,sender); + } + } + + /// List the device groups for the catalog. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Filter the result list using the given expression + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// Json string supplied to the CatalogsListDeviceGroups operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsListDeviceGroupsViaJsonString(string subscriptionId, string resourceGroupName, string catalogName, string Filter, int? Top, int? Skip, int? Maxpagesize, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/listDeviceGroups" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CatalogsListDeviceGroups_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List the device groups for the catalog. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Filter the result list using the given expression + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// Json string supplied to the CatalogsListDeviceGroups operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsListDeviceGroupsViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string catalogName, string Filter, int? Top, int? Skip, int? Maxpagesize, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/listDeviceGroups" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CatalogsListDeviceGroupsWithResult_Call (request, eventListener,sender); + } + } + + /// List the device groups for the catalog. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Filter the result list using the given expression + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// List device groups for catalog. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsListDeviceGroupsWithResult(string subscriptionId, string resourceGroupName, string catalogName, string Filter, int? Top, int? Skip, int? Maxpagesize, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IListDeviceGroupsRequest body, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/listDeviceGroups" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CatalogsListDeviceGroupsWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CatalogsListDeviceGroupsWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroupListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CatalogsListDeviceGroups_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroupListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Filter the result list using the given expression + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// List device groups for catalog. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CatalogsListDeviceGroups_Validate(string subscriptionId, string resourceGroupName, string catalogName, string Filter, int? Top, int? Skip, int? Maxpagesize, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IListDeviceGroupsRequest body, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertRegEx(nameof(catalogName), catalogName, @"^[A-Za-z0-9_-]{1,50}$"); + await eventListener.AssertNotNull(nameof(Filter),Filter); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Lists device insights for catalog. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Filter the result list using the given expression + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsListDeviceInsights(string subscriptionId, string resourceGroupName, string catalogName, string Filter, int? Top, int? Skip, int? Maxpagesize, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/listDeviceInsights" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CatalogsListDeviceInsights_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Lists device insights for catalog. + /// + /// Filter the result list using the given expression + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsListDeviceInsightsViaIdentity(global::System.String viaIdentity, string Filter, int? Top, int? Skip, int? Maxpagesize, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/listDeviceInsights" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CatalogsListDeviceInsights_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Lists device insights for catalog. + /// + /// Filter the result list using the given expression + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsListDeviceInsightsViaIdentityWithResult(global::System.String viaIdentity, string Filter, int? Top, int? Skip, int? Maxpagesize, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/listDeviceInsights" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CatalogsListDeviceInsightsWithResult_Call (request, eventListener,sender); + } + } + + /// Lists device insights for catalog. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Filter the result list using the given expression + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsListDeviceInsightsWithResult(string subscriptionId, string resourceGroupName, string catalogName, string Filter, int? Top, int? Skip, int? Maxpagesize, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/listDeviceInsights" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CatalogsListDeviceInsightsWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CatalogsListDeviceInsightsWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.PagedDeviceInsight.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CatalogsListDeviceInsights_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.PagedDeviceInsight.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Filter the result list using the given expression + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CatalogsListDeviceInsights_Validate(string subscriptionId, string resourceGroupName, string catalogName, string Filter, int? Top, int? Skip, int? Maxpagesize, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertRegEx(nameof(catalogName), catalogName, @"^[A-Za-z0-9_-]{1,50}$"); + await eventListener.AssertNotNull(nameof(Filter),Filter); + } + } + + /// Lists devices for catalog. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Filter the result list using the given expression + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsListDevices(string subscriptionId, string resourceGroupName, string catalogName, string Filter, int? Top, int? Skip, int? Maxpagesize, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/listDevices" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CatalogsListDevices_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Lists devices for catalog. + /// + /// Filter the result list using the given expression + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsListDevicesViaIdentity(global::System.String viaIdentity, string Filter, int? Top, int? Skip, int? Maxpagesize, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/listDevices" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CatalogsListDevices_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Lists devices for catalog. + /// + /// Filter the result list using the given expression + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsListDevicesViaIdentityWithResult(global::System.String viaIdentity, string Filter, int? Top, int? Skip, int? Maxpagesize, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/listDevices" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CatalogsListDevicesWithResult_Call (request, eventListener,sender); + } + } + + /// Lists devices for catalog. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Filter the result list using the given expression + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsListDevicesWithResult(string subscriptionId, string resourceGroupName, string catalogName, string Filter, int? Top, int? Skip, int? Maxpagesize, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/listDevices" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CatalogsListDevicesWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CatalogsListDevicesWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CatalogsListDevices_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Filter the result list using the given expression + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CatalogsListDevices_Validate(string subscriptionId, string resourceGroupName, string catalogName, string Filter, int? Top, int? Skip, int? Maxpagesize, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertRegEx(nameof(catalogName), catalogName, @"^[A-Za-z0-9_-]{1,50}$"); + await eventListener.AssertNotNull(nameof(Filter),Filter); + } + } + + /// Update a Catalog + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// The resource properties to be updated. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsUpdate(string subscriptionId, string resourceGroupName, string catalogName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CatalogsUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update a Catalog + /// + /// The resource properties to be updated. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CatalogsUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update a Catalog + /// + /// The resource properties to be updated. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will + /// be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CatalogsUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Update a Catalog + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Json string supplied to the CatalogsUpdate operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsUpdateViaJsonString(string subscriptionId, string resourceGroupName, string catalogName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CatalogsUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update a Catalog + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Json string supplied to the CatalogsUpdate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will + /// be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string catalogName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CatalogsUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Update a Catalog + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// The resource properties to be updated. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will + /// be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsUpdateWithResult(string subscriptionId, string resourceGroupName, string catalogName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CatalogsUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will + /// be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CatalogsUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Catalog.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CatalogsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Catalog.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// The resource properties to be updated. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CatalogsUpdate_Validate(string subscriptionId, string resourceGroupName, string catalogName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertRegEx(nameof(catalogName), catalogName, @"^[A-Za-z0-9_-]{1,50}$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Creates an image. Use this action when the image ID is unknown. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Image upload request body. + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsUploadImage(string subscriptionId, string resourceGroupName, string catalogName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage body, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/uploadImage" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CatalogsUploadImage_Call (request, onDefault,eventListener,sender); + } + } + + /// Creates an image. Use this action when the image ID is unknown. + /// + /// Image upload request body. + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsUploadImageViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage body, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/uploadImage" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CatalogsUploadImage_Call (request, onDefault,eventListener,sender); + } + } + + /// Creates an image. Use this action when the image ID is unknown. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Json string supplied to the CatalogsUploadImage operation + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CatalogsUploadImageViaJsonString(string subscriptionId, string resourceGroupName, string catalogName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/uploadImage" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CatalogsUploadImage_Call (request, onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CatalogsUploadImage_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Image upload request body. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CatalogsUploadImage_Validate(string subscriptionId, string resourceGroupName, string catalogName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage body, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertRegEx(nameof(catalogName), catalogName, @"^[A-Za-z0-9_-]{1,50}$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Get a Certificate + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Serial number of the certificate. Use '.default' to get current active certificate. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CertificatesGet(string subscriptionId, string resourceGroupName, string catalogName, string serialNumber, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/certificates/" + + global::System.Uri.EscapeDataString(serialNumber) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CertificatesGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get a Certificate + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CertificatesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/certificates/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates/{serialNumber}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var serialNumber = _match.Groups["serialNumber"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/certificates/" + + serialNumber + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CertificatesGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get a Certificate + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that + /// will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CertificatesGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/certificates/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates/{serialNumber}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var serialNumber = _match.Groups["serialNumber"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/certificates/" + + serialNumber + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CertificatesGetWithResult_Call (request, eventListener,sender); + } + } + + /// Get a Certificate + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Serial number of the certificate. Use '.default' to get current active certificate. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that + /// will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CertificatesGetWithResult(string subscriptionId, string resourceGroupName, string catalogName, string serialNumber, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/certificates/" + + global::System.Uri.EscapeDataString(serialNumber) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CertificatesGetWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that + /// will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CertificatesGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Certificate.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CertificatesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Certificate.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Serial number of the certificate. Use '.default' to get current active certificate. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CertificatesGet_Validate(string subscriptionId, string resourceGroupName, string catalogName, string serialNumber, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertRegEx(nameof(catalogName), catalogName, @"^[A-Za-z0-9_-]{1,50}$"); + await eventListener.AssertNotNull(nameof(serialNumber),serialNumber); + } + } + + /// List Certificate resources by Catalog + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// The number of result items to skip. + /// The maximum number of result items per page. + /// Filter the result list using the given expression + /// The number of result items to return. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CertificatesListByCatalog(string subscriptionId, string resourceGroupName, string catalogName, int? Skip, int? Maxpagesize, string Filter, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/certificates" + + "?" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + + "&" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CertificatesListByCatalog_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List Certificate resources by Catalog + /// + /// The number of result items to skip. + /// The maximum number of result items per page. + /// Filter the result list using the given expression + /// The number of result items to return. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CertificatesListByCatalogViaIdentity(global::System.String viaIdentity, int? Skip, int? Maxpagesize, string Filter, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/certificates$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/certificates" + + "?" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + + "&" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CertificatesListByCatalog_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List Certificate resources by Catalog + /// + /// The number of result items to skip. + /// The maximum number of result items per page. + /// Filter the result list using the given expression + /// The number of result items to return. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CertificatesListByCatalogViaIdentityWithResult(global::System.String viaIdentity, int? Skip, int? Maxpagesize, string Filter, int? Top, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/certificates$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/certificates" + + "?" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + + "&" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CertificatesListByCatalogWithResult_Call (request, eventListener,sender); + } + } + + /// List Certificate resources by Catalog + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// The number of result items to skip. + /// The maximum number of result items per page. + /// Filter the result list using the given expression + /// The number of result items to return. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CertificatesListByCatalogWithResult(string subscriptionId, string resourceGroupName, string catalogName, int? Skip, int? Maxpagesize, string Filter, int? Top, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/certificates" + + "?" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + + "&" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CertificatesListByCatalogWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CertificatesListByCatalogWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CertificateListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CertificatesListByCatalog_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CertificateListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// The number of result items to skip. + /// The maximum number of result items per page. + /// Filter the result list using the given expression + /// The number of result items to return. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CertificatesListByCatalog_Validate(string subscriptionId, string resourceGroupName, string catalogName, int? Skip, int? Maxpagesize, string Filter, int? Top, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertRegEx(nameof(catalogName), catalogName, @"^[A-Za-z0-9_-]{1,50}$"); + await eventListener.AssertNotNull(nameof(Filter),Filter); + } + } + + /// Retrieves cert chain. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Serial number of the certificate. Use '.default' to get current active certificate. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CertificatesRetrieveCertChain(string subscriptionId, string resourceGroupName, string catalogName, string serialNumber, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/certificates/" + + global::System.Uri.EscapeDataString(serialNumber) + + "/retrieveCertChain" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CertificatesRetrieveCertChain_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Retrieves cert chain. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CertificatesRetrieveCertChainViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/certificates/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates/{serialNumber}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var serialNumber = _match.Groups["serialNumber"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/certificates/" + + serialNumber + + "/retrieveCertChain" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CertificatesRetrieveCertChain_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Retrieves cert chain. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CertificatesRetrieveCertChainViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/certificates/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates/{serialNumber}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var serialNumber = _match.Groups["serialNumber"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/certificates/" + + serialNumber + + "/retrieveCertChain" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CertificatesRetrieveCertChainWithResult_Call (request, eventListener,sender); + } + } + + /// Retrieves cert chain. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Serial number of the certificate. Use '.default' to get current active certificate. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CertificatesRetrieveCertChainWithResult(string subscriptionId, string resourceGroupName, string catalogName, string serialNumber, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/certificates/" + + global::System.Uri.EscapeDataString(serialNumber) + + "/retrieveCertChain" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CertificatesRetrieveCertChainWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CertificatesRetrieveCertChainWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CertificateChainResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CertificatesRetrieveCertChain_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CertificateChainResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Serial number of the certificate. Use '.default' to get current active certificate. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CertificatesRetrieveCertChain_Validate(string subscriptionId, string resourceGroupName, string catalogName, string serialNumber, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertRegEx(nameof(catalogName), catalogName, @"^[A-Za-z0-9_-]{1,50}$"); + await eventListener.AssertNotNull(nameof(serialNumber),serialNumber); + } + } + + /// Gets the proof of possession nonce. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Serial number of the certificate. Use '.default' to get current active certificate. + /// Proof of possession nonce request body + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CertificatesRetrieveProofOfPossessionNonce(string subscriptionId, string resourceGroupName, string catalogName, string serialNumber, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/certificates/" + + global::System.Uri.EscapeDataString(serialNumber) + + "/retrieveProofOfPossessionNonce" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CertificatesRetrieveProofOfPossessionNonce_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets the proof of possession nonce. + /// + /// Proof of possession nonce request body + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CertificatesRetrieveProofOfPossessionNonceViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/certificates/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates/{serialNumber}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var serialNumber = _match.Groups["serialNumber"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/certificates/" + + serialNumber + + "/retrieveProofOfPossessionNonce" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CertificatesRetrieveProofOfPossessionNonce_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets the proof of possession nonce. + /// + /// Proof of possession nonce request body + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CertificatesRetrieveProofOfPossessionNonceViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceRequest body, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/certificates/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates/{serialNumber}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var serialNumber = _match.Groups["serialNumber"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/certificates/" + + serialNumber + + "/retrieveProofOfPossessionNonce" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CertificatesRetrieveProofOfPossessionNonceWithResult_Call (request, eventListener,sender); + } + } + + /// Gets the proof of possession nonce. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Serial number of the certificate. Use '.default' to get current active certificate. + /// Json string supplied to the CertificatesRetrieveProofOfPossessionNonce operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CertificatesRetrieveProofOfPossessionNonceViaJsonString(string subscriptionId, string resourceGroupName, string catalogName, string serialNumber, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/certificates/" + + global::System.Uri.EscapeDataString(serialNumber) + + "/retrieveProofOfPossessionNonce" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CertificatesRetrieveProofOfPossessionNonce_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets the proof of possession nonce. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Serial number of the certificate. Use '.default' to get current active certificate. + /// Json string supplied to the CertificatesRetrieveProofOfPossessionNonce operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CertificatesRetrieveProofOfPossessionNonceViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string catalogName, string serialNumber, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/certificates/" + + global::System.Uri.EscapeDataString(serialNumber) + + "/retrieveProofOfPossessionNonce" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CertificatesRetrieveProofOfPossessionNonceWithResult_Call (request, eventListener,sender); + } + } + + /// Gets the proof of possession nonce. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Serial number of the certificate. Use '.default' to get current active certificate. + /// Proof of possession nonce request body + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CertificatesRetrieveProofOfPossessionNonceWithResult(string subscriptionId, string resourceGroupName, string catalogName, string serialNumber, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceRequest body, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/certificates/" + + global::System.Uri.EscapeDataString(serialNumber) + + "/retrieveProofOfPossessionNonce" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CertificatesRetrieveProofOfPossessionNonceWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CertificatesRetrieveProofOfPossessionNonceWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProofOfPossessionNonceResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CertificatesRetrieveProofOfPossessionNonce_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProofOfPossessionNonceResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, + /// but you will get validation events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Serial number of the certificate. Use '.default' to get current active certificate. + /// Proof of possession nonce request body + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CertificatesRetrieveProofOfPossessionNonce_Validate(string subscriptionId, string resourceGroupName, string catalogName, string serialNumber, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceRequest body, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertRegEx(nameof(catalogName), catalogName, @"^[A-Za-z0-9_-]{1,50}$"); + await eventListener.AssertNotNull(nameof(serialNumber),serialNumber); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group + /// name. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// Deployment name. Use .default for deployment creation and to get the current deployment for + /// the associated device group. + /// Resource create parameters. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DeploymentsCreateOrUpdate(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, string deploymentName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "/deviceGroups/" + + global::System.Uri.EscapeDataString(deviceGroupName) + + "/deployments/" + + global::System.Uri.EscapeDataString(deploymentName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DeploymentsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group + /// name. + /// + /// + /// Resource create parameters. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DeploymentsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/products/(?[^/]+)/deviceGroups/(?[^/]+)/deployments/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments/{deploymentName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var productName = _match.Groups["productName"].Value; + var deviceGroupName = _match.Groups["deviceGroupName"].Value; + var deploymentName = _match.Groups["deploymentName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/products/" + + productName + + "/deviceGroups/" + + deviceGroupName + + "/deployments/" + + deploymentName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DeploymentsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group + /// name. + /// + /// + /// Resource create parameters. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that + /// will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DeploymentsCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment body, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/products/(?[^/]+)/deviceGroups/(?[^/]+)/deployments/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments/{deploymentName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var productName = _match.Groups["productName"].Value; + var deviceGroupName = _match.Groups["deviceGroupName"].Value; + var deploymentName = _match.Groups["deploymentName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/products/" + + productName + + "/deviceGroups/" + + deviceGroupName + + "/deployments/" + + deploymentName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DeploymentsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group + /// name. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// Deployment name. Use .default for deployment creation and to get the current deployment for + /// the associated device group. + /// Json string supplied to the DeploymentsCreateOrUpdate operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DeploymentsCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, string deploymentName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "/deviceGroups/" + + global::System.Uri.EscapeDataString(deviceGroupName) + + "/deployments/" + + global::System.Uri.EscapeDataString(deploymentName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DeploymentsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group + /// name. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// Deployment name. Use .default for deployment creation and to get the current deployment for + /// the associated device group. + /// Json string supplied to the DeploymentsCreateOrUpdate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that + /// will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DeploymentsCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, string deploymentName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "/deviceGroups/" + + global::System.Uri.EscapeDataString(deviceGroupName) + + "/deployments/" + + global::System.Uri.EscapeDataString(deploymentName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DeploymentsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group + /// name. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// Deployment name. Use .default for deployment creation and to get the current deployment for + /// the associated device group. + /// Resource create parameters. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that + /// will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DeploymentsCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, string deploymentName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment body, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "/deviceGroups/" + + global::System.Uri.EscapeDataString(deviceGroupName) + + "/deployments/" + + global::System.Uri.EscapeDataString(deploymentName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DeploymentsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that + /// will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DeploymentsCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Deployment.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DeploymentsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Deployment.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// Deployment name. Use .default for deployment creation and to get the current deployment for + /// the associated device group. + /// Resource create parameters. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DeploymentsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, string deploymentName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment body, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertRegEx(nameof(catalogName), catalogName, @"^[A-Za-z0-9_-]{1,50}$"); + await eventListener.AssertNotNull(nameof(productName),productName); + await eventListener.AssertRegEx(nameof(productName), productName, @"^[\w][\w\s]{1,48}[\w]$|^\.default$|^\.unassigned$"); + await eventListener.AssertNotNull(nameof(deviceGroupName),deviceGroupName); + await eventListener.AssertRegEx(nameof(deviceGroupName), deviceGroupName, @"^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\s]{1,48}[A-Za-z0-9]$|^\.default$|^\.unassigned$"); + await eventListener.AssertNotNull(nameof(deploymentName),deploymentName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// Delete a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group + /// name. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// Deployment name. Use .default for deployment creation and to get the current deployment for + /// the associated device group. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DeploymentsDelete(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, string deploymentName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "/deviceGroups/" + + global::System.Uri.EscapeDataString(deviceGroupName) + + "/deployments/" + + global::System.Uri.EscapeDataString(deploymentName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DeploymentsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// + /// Delete a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group + /// name. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DeploymentsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/products/(?[^/]+)/deviceGroups/(?[^/]+)/deployments/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments/{deploymentName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var productName = _match.Groups["productName"].Value; + var deviceGroupName = _match.Groups["deviceGroupName"].Value; + var deploymentName = _match.Groups["deploymentName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/products/" + + productName + + "/deviceGroups/" + + deviceGroupName + + "/deployments/" + + deploymentName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DeploymentsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DeploymentsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// Deployment name. Use .default for deployment creation and to get the current deployment for + /// the associated device group. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DeploymentsDelete_Validate(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, string deploymentName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertRegEx(nameof(catalogName), catalogName, @"^[A-Za-z0-9_-]{1,50}$"); + await eventListener.AssertNotNull(nameof(productName),productName); + await eventListener.AssertRegEx(nameof(productName), productName, @"^[\w][\w\s]{1,48}[\w]$|^\.default$|^\.unassigned$"); + await eventListener.AssertNotNull(nameof(deviceGroupName),deviceGroupName); + await eventListener.AssertRegEx(nameof(deviceGroupName), deviceGroupName, @"^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\s]{1,48}[A-Za-z0-9]$|^\.default$|^\.unassigned$"); + await eventListener.AssertNotNull(nameof(deploymentName),deploymentName); + } + } + + /// + /// Get a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group + /// name. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// Deployment name. Use .default for deployment creation and to get the current deployment for + /// the associated device group. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DeploymentsGet(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, string deploymentName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "/deviceGroups/" + + global::System.Uri.EscapeDataString(deviceGroupName) + + "/deployments/" + + global::System.Uri.EscapeDataString(deploymentName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DeploymentsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Get a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group + /// name. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DeploymentsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/products/(?[^/]+)/deviceGroups/(?[^/]+)/deployments/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments/{deploymentName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var productName = _match.Groups["productName"].Value; + var deviceGroupName = _match.Groups["deviceGroupName"].Value; + var deploymentName = _match.Groups["deploymentName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/products/" + + productName + + "/deviceGroups/" + + deviceGroupName + + "/deployments/" + + deploymentName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DeploymentsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Get a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group + /// name. + /// + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that + /// will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DeploymentsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/products/(?[^/]+)/deviceGroups/(?[^/]+)/deployments/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments/{deploymentName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var productName = _match.Groups["productName"].Value; + var deviceGroupName = _match.Groups["deviceGroupName"].Value; + var deploymentName = _match.Groups["deploymentName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/products/" + + productName + + "/deviceGroups/" + + deviceGroupName + + "/deployments/" + + deploymentName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DeploymentsGetWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Get a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group + /// name. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// Deployment name. Use .default for deployment creation and to get the current deployment for + /// the associated device group. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that + /// will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DeploymentsGetWithResult(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, string deploymentName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "/deviceGroups/" + + global::System.Uri.EscapeDataString(deviceGroupName) + + "/deployments/" + + global::System.Uri.EscapeDataString(deploymentName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DeploymentsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that + /// will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DeploymentsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Deployment.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DeploymentsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Deployment.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// Deployment name. Use .default for deployment creation and to get the current deployment for + /// the associated device group. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DeploymentsGet_Validate(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, string deploymentName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertRegEx(nameof(catalogName), catalogName, @"^[A-Za-z0-9_-]{1,50}$"); + await eventListener.AssertNotNull(nameof(productName),productName); + await eventListener.AssertRegEx(nameof(productName), productName, @"^[\w][\w\s]{1,48}[\w]$|^\.default$|^\.unassigned$"); + await eventListener.AssertNotNull(nameof(deviceGroupName),deviceGroupName); + await eventListener.AssertRegEx(nameof(deviceGroupName), deviceGroupName, @"^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\s]{1,48}[A-Za-z0-9]$|^\.default$|^\.unassigned$"); + await eventListener.AssertNotNull(nameof(deploymentName),deploymentName); + } + } + + /// + /// List Deployment resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for + /// product or device group name. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// The maximum number of result items per page. + /// Filter the result list using the given expression + /// The number of result items to return. + /// The number of result items to skip. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DeploymentsListByDeviceGroup(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, int? Maxpagesize, string Filter, int? Top, int? Skip, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "/deviceGroups/" + + global::System.Uri.EscapeDataString(deviceGroupName) + + "/deployments" + + "?" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + + "&" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DeploymentsListByDeviceGroup_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// List Deployment resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for + /// product or device group name. + /// + /// + /// The maximum number of result items per page. + /// Filter the result list using the given expression + /// The number of result items to return. + /// The number of result items to skip. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DeploymentsListByDeviceGroupViaIdentity(global::System.String viaIdentity, int? Maxpagesize, string Filter, int? Top, int? Skip, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/products/(?[^/]+)/deviceGroups/(?[^/]+)/deployments$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var productName = _match.Groups["productName"].Value; + var deviceGroupName = _match.Groups["deviceGroupName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/products/" + + productName + + "/deviceGroups/" + + deviceGroupName + + "/deployments" + + "?" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + + "&" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DeploymentsListByDeviceGroup_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// List Deployment resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for + /// product or device group name. + /// + /// + /// The maximum number of result items per page. + /// Filter the result list using the given expression + /// The number of result items to return. + /// The number of result items to skip. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DeploymentsListByDeviceGroupViaIdentityWithResult(global::System.String viaIdentity, int? Maxpagesize, string Filter, int? Top, int? Skip, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/products/(?[^/]+)/deviceGroups/(?[^/]+)/deployments$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var productName = _match.Groups["productName"].Value; + var deviceGroupName = _match.Groups["deviceGroupName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/products/" + + productName + + "/deviceGroups/" + + deviceGroupName + + "/deployments" + + "?" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + + "&" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DeploymentsListByDeviceGroupWithResult_Call (request, eventListener,sender); + } + } + + /// + /// List Deployment resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for + /// product or device group name. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// The maximum number of result items per page. + /// Filter the result list using the given expression + /// The number of result items to return. + /// The number of result items to skip. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DeploymentsListByDeviceGroupWithResult(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, int? Maxpagesize, string Filter, int? Top, int? Skip, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "/deviceGroups/" + + global::System.Uri.EscapeDataString(deviceGroupName) + + "/deployments" + + "?" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + + "&" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DeploymentsListByDeviceGroupWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DeploymentsListByDeviceGroupWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeploymentListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DeploymentsListByDeviceGroup_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeploymentListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// The maximum number of result items per page. + /// Filter the result list using the given expression + /// The number of result items to return. + /// The number of result items to skip. + /// Name of device group. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DeploymentsListByDeviceGroup_Validate(string subscriptionId, string resourceGroupName, string catalogName, string productName, int? Maxpagesize, string Filter, int? Top, int? Skip, string deviceGroupName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertRegEx(nameof(catalogName), catalogName, @"^[A-Za-z0-9_-]{1,50}$"); + await eventListener.AssertNotNull(nameof(productName),productName); + await eventListener.AssertRegEx(nameof(productName), productName, @"^[\w][\w\s]{1,48}[\w]$|^\.default$|^\.unassigned$"); + await eventListener.AssertNotNull(nameof(Filter),Filter); + await eventListener.AssertNotNull(nameof(deviceGroupName),deviceGroupName); + await eventListener.AssertRegEx(nameof(deviceGroupName), deviceGroupName, @"^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\s]{1,48}[A-Za-z0-9]$|^\.default$|^\.unassigned$"); + } + } + + /// + /// Bulk claims the devices. Use '.unassigned' or '.default' for the device group and product names when bulk claiming devices + /// to a catalog only. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// Bulk claim devices request body. + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DeviceGroupsClaimDevices(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IClaimDevicesRequest body, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "/deviceGroups/" + + global::System.Uri.EscapeDataString(deviceGroupName) + + "/claimDevices" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DeviceGroupsClaimDevices_Call (request, onDefault,eventListener,sender); + } + } + + /// + /// Bulk claims the devices. Use '.unassigned' or '.default' for the device group and product names when bulk claiming devices + /// to a catalog only. + /// + /// + /// Bulk claim devices request body. + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DeviceGroupsClaimDevicesViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IClaimDevicesRequest body, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/products/(?[^/]+)/deviceGroups/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var productName = _match.Groups["productName"].Value; + var deviceGroupName = _match.Groups["deviceGroupName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/products/" + + productName + + "/deviceGroups/" + + deviceGroupName + + "/claimDevices" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DeviceGroupsClaimDevices_Call (request, onDefault,eventListener,sender); + } + } + + /// + /// Bulk claims the devices. Use '.unassigned' or '.default' for the device group and product names when bulk claiming devices + /// to a catalog only. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// Json string supplied to the DeviceGroupsClaimDevices operation + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DeviceGroupsClaimDevicesViaJsonString(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "/deviceGroups/" + + global::System.Uri.EscapeDataString(deviceGroupName) + + "/claimDevices" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DeviceGroupsClaimDevices_Call (request, onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DeviceGroupsClaimDevices_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// Bulk claim devices request body. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DeviceGroupsClaimDevices_Validate(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IClaimDevicesRequest body, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertRegEx(nameof(catalogName), catalogName, @"^[A-Za-z0-9_-]{1,50}$"); + await eventListener.AssertNotNull(nameof(productName),productName); + await eventListener.AssertRegEx(nameof(productName), productName, @"^[\w][\w\s]{1,48}[\w]$|^\.default$|^\.unassigned$"); + await eventListener.AssertNotNull(nameof(deviceGroupName),deviceGroupName); + await eventListener.AssertRegEx(nameof(deviceGroupName), deviceGroupName, @"^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\s]{1,48}[A-Za-z0-9]$|^\.default$|^\.unassigned$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// Counts devices in device group. '.default' and '.unassigned' are system defined values and cannot be used for product + /// or device group name. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DeviceGroupsCountDevices(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "/deviceGroups/" + + global::System.Uri.EscapeDataString(deviceGroupName) + + "/countDevices" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DeviceGroupsCountDevices_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Counts devices in device group. '.default' and '.unassigned' are system defined values and cannot be used for product + /// or device group name. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DeviceGroupsCountDevicesViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/products/(?[^/]+)/deviceGroups/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var productName = _match.Groups["productName"].Value; + var deviceGroupName = _match.Groups["deviceGroupName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/products/" + + productName + + "/deviceGroups/" + + deviceGroupName + + "/countDevices" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DeviceGroupsCountDevices_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Counts devices in device group. '.default' and '.unassigned' are system defined values and cannot be used for product + /// or device group name. + /// + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DeviceGroupsCountDevicesViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/products/(?[^/]+)/deviceGroups/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var productName = _match.Groups["productName"].Value; + var deviceGroupName = _match.Groups["deviceGroupName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/products/" + + productName + + "/deviceGroups/" + + deviceGroupName + + "/countDevices" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DeviceGroupsCountDevicesWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Counts devices in device group. '.default' and '.unassigned' are system defined values and cannot be used for product + /// or device group name. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DeviceGroupsCountDevicesWithResult(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "/deviceGroups/" + + global::System.Uri.EscapeDataString(deviceGroupName) + + "/countDevices" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DeviceGroupsCountDevicesWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DeviceGroupsCountDevicesWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CountDevicesResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DeviceGroupsCountDevices_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CountDevicesResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DeviceGroupsCountDevices_Validate(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertRegEx(nameof(catalogName), catalogName, @"^[A-Za-z0-9_-]{1,50}$"); + await eventListener.AssertNotNull(nameof(productName),productName); + await eventListener.AssertRegEx(nameof(productName), productName, @"^[\w][\w\s]{1,48}[\w]$|^\.default$|^\.unassigned$"); + await eventListener.AssertNotNull(nameof(deviceGroupName),deviceGroupName); + await eventListener.AssertRegEx(nameof(deviceGroupName), deviceGroupName, @"^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\s]{1,48}[A-Za-z0-9]$|^\.default$|^\.unassigned$"); + } + } + + /// + /// Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device + /// group name. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// Resource create parameters. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DeviceGroupsCreateOrUpdate(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "/deviceGroups/" + + global::System.Uri.EscapeDataString(deviceGroupName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DeviceGroupsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device + /// group name. + /// + /// + /// Resource create parameters. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DeviceGroupsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/products/(?[^/]+)/deviceGroups/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var productName = _match.Groups["productName"].Value; + var deviceGroupName = _match.Groups["deviceGroupName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/products/" + + productName + + "/deviceGroups/" + + deviceGroupName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DeviceGroupsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device + /// group name. + /// + /// + /// Resource create parameters. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that + /// will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DeviceGroupsCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup body, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/products/(?[^/]+)/deviceGroups/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var productName = _match.Groups["productName"].Value; + var deviceGroupName = _match.Groups["deviceGroupName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/products/" + + productName + + "/deviceGroups/" + + deviceGroupName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DeviceGroupsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device + /// group name. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// Json string supplied to the DeviceGroupsCreateOrUpdate operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DeviceGroupsCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "/deviceGroups/" + + global::System.Uri.EscapeDataString(deviceGroupName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DeviceGroupsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device + /// group name. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// Json string supplied to the DeviceGroupsCreateOrUpdate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that + /// will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DeviceGroupsCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "/deviceGroups/" + + global::System.Uri.EscapeDataString(deviceGroupName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DeviceGroupsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device + /// group name. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// Resource create parameters. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that + /// will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DeviceGroupsCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup body, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "/deviceGroups/" + + global::System.Uri.EscapeDataString(deviceGroupName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DeviceGroupsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that + /// will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DeviceGroupsCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroup.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DeviceGroupsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroup.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// Resource create parameters. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DeviceGroupsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup body, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertRegEx(nameof(catalogName), catalogName, @"^[A-Za-z0-9_-]{1,50}$"); + await eventListener.AssertNotNull(nameof(productName),productName); + await eventListener.AssertRegEx(nameof(productName), productName, @"^[\w][\w\s]{1,48}[\w]$|^\.default$|^\.unassigned$"); + await eventListener.AssertNotNull(nameof(deviceGroupName),deviceGroupName); + await eventListener.AssertRegEx(nameof(deviceGroupName), deviceGroupName, @"^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\s]{1,48}[A-Za-z0-9]$|^\.default$|^\.unassigned$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// Delete a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device + /// group name. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DeviceGroupsDelete(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "/deviceGroups/" + + global::System.Uri.EscapeDataString(deviceGroupName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DeviceGroupsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// + /// Delete a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device + /// group name. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DeviceGroupsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/products/(?[^/]+)/deviceGroups/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var productName = _match.Groups["productName"].Value; + var deviceGroupName = _match.Groups["deviceGroupName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/products/" + + productName + + "/deviceGroups/" + + deviceGroupName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DeviceGroupsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DeviceGroupsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DeviceGroupsDelete_Validate(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertRegEx(nameof(catalogName), catalogName, @"^[A-Za-z0-9_-]{1,50}$"); + await eventListener.AssertNotNull(nameof(productName),productName); + await eventListener.AssertRegEx(nameof(productName), productName, @"^[\w][\w\s]{1,48}[\w]$|^\.default$|^\.unassigned$"); + await eventListener.AssertNotNull(nameof(deviceGroupName),deviceGroupName); + await eventListener.AssertRegEx(nameof(deviceGroupName), deviceGroupName, @"^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\s]{1,48}[A-Za-z0-9]$|^\.default$|^\.unassigned$"); + } + } + + /// + /// Get a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group + /// name. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DeviceGroupsGet(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "/deviceGroups/" + + global::System.Uri.EscapeDataString(deviceGroupName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DeviceGroupsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Get a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group + /// name. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DeviceGroupsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/products/(?[^/]+)/deviceGroups/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var productName = _match.Groups["productName"].Value; + var deviceGroupName = _match.Groups["deviceGroupName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/products/" + + productName + + "/deviceGroups/" + + deviceGroupName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DeviceGroupsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Get a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group + /// name. + /// + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that + /// will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DeviceGroupsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/products/(?[^/]+)/deviceGroups/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var productName = _match.Groups["productName"].Value; + var deviceGroupName = _match.Groups["deviceGroupName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/products/" + + productName + + "/deviceGroups/" + + deviceGroupName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DeviceGroupsGetWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Get a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group + /// name. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that + /// will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DeviceGroupsGetWithResult(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "/deviceGroups/" + + global::System.Uri.EscapeDataString(deviceGroupName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DeviceGroupsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that + /// will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DeviceGroupsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroup.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DeviceGroupsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroup.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DeviceGroupsGet_Validate(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertRegEx(nameof(catalogName), catalogName, @"^[A-Za-z0-9_-]{1,50}$"); + await eventListener.AssertNotNull(nameof(productName),productName); + await eventListener.AssertRegEx(nameof(productName), productName, @"^[\w][\w\s]{1,48}[\w]$|^\.default$|^\.unassigned$"); + await eventListener.AssertNotNull(nameof(deviceGroupName),deviceGroupName); + await eventListener.AssertRegEx(nameof(deviceGroupName), deviceGroupName, @"^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\s]{1,48}[A-Za-z0-9]$|^\.default$|^\.unassigned$"); + } + } + + /// + /// List DeviceGroup resources by Product. '.default' and '.unassigned' are system defined values and cannot be used for product + /// name. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// Filter the result list using the given expression + /// The number of result items to return. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DeviceGroupsListByProduct(string subscriptionId, string resourceGroupName, string catalogName, string productName, int? Skip, int? Maxpagesize, string Filter, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "/deviceGroups" + + "?" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + + "&" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DeviceGroupsListByProduct_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// List DeviceGroup resources by Product. '.default' and '.unassigned' are system defined values and cannot be used for product + /// name. + /// + /// + /// The number of result items to skip. + /// The maximum number of result items per page. + /// Filter the result list using the given expression + /// The number of result items to return. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DeviceGroupsListByProductViaIdentity(global::System.String viaIdentity, int? Skip, int? Maxpagesize, string Filter, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/products/(?[^/]+)/deviceGroups$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var productName = _match.Groups["productName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/products/" + + productName + + "/deviceGroups" + + "?" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + + "&" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DeviceGroupsListByProduct_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// List DeviceGroup resources by Product. '.default' and '.unassigned' are system defined values and cannot be used for product + /// name. + /// + /// + /// The number of result items to skip. + /// The maximum number of result items per page. + /// Filter the result list using the given expression + /// The number of result items to return. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DeviceGroupsListByProductViaIdentityWithResult(global::System.String viaIdentity, int? Skip, int? Maxpagesize, string Filter, int? Top, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/products/(?[^/]+)/deviceGroups$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var productName = _match.Groups["productName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/products/" + + productName + + "/deviceGroups" + + "?" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + + "&" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DeviceGroupsListByProductWithResult_Call (request, eventListener,sender); + } + } + + /// + /// List DeviceGroup resources by Product. '.default' and '.unassigned' are system defined values and cannot be used for product + /// name. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// Filter the result list using the given expression + /// The number of result items to return. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DeviceGroupsListByProductWithResult(string subscriptionId, string resourceGroupName, string catalogName, string productName, int? Skip, int? Maxpagesize, string Filter, int? Top, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "/deviceGroups" + + "?" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + + "&" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DeviceGroupsListByProductWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DeviceGroupsListByProductWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroupListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DeviceGroupsListByProduct_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroupListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// The number of result items to skip. + /// The maximum number of result items per page. + /// Filter the result list using the given expression + /// The number of result items to return. + /// Name of product. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DeviceGroupsListByProduct_Validate(string subscriptionId, string resourceGroupName, string catalogName, int? Skip, int? Maxpagesize, string Filter, int? Top, string productName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertRegEx(nameof(catalogName), catalogName, @"^[A-Za-z0-9_-]{1,50}$"); + await eventListener.AssertNotNull(nameof(Filter),Filter); + await eventListener.AssertNotNull(nameof(productName),productName); + await eventListener.AssertRegEx(nameof(productName), productName, @"^[\w][\w\s]{1,48}[\w]$|^\.default$|^\.unassigned$"); + } + } + + /// + /// Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device + /// group name. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// The resource properties to be updated. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DeviceGroupsUpdate(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "/deviceGroups/" + + global::System.Uri.EscapeDataString(deviceGroupName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DeviceGroupsUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device + /// group name. + /// + /// + /// The resource properties to be updated. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DeviceGroupsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/products/(?[^/]+)/deviceGroups/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var productName = _match.Groups["productName"].Value; + var deviceGroupName = _match.Groups["deviceGroupName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/products/" + + productName + + "/deviceGroups/" + + deviceGroupName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DeviceGroupsUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device + /// group name. + /// + /// + /// The resource properties to be updated. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that + /// will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DeviceGroupsUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/products/(?[^/]+)/deviceGroups/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var productName = _match.Groups["productName"].Value; + var deviceGroupName = _match.Groups["deviceGroupName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/products/" + + productName + + "/deviceGroups/" + + deviceGroupName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DeviceGroupsUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device + /// group name. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// Json string supplied to the DeviceGroupsUpdate operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DeviceGroupsUpdateViaJsonString(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "/deviceGroups/" + + global::System.Uri.EscapeDataString(deviceGroupName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DeviceGroupsUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device + /// group name. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// Json string supplied to the DeviceGroupsUpdate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that + /// will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DeviceGroupsUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "/deviceGroups/" + + global::System.Uri.EscapeDataString(deviceGroupName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DeviceGroupsUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device + /// group name. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// The resource properties to be updated. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that + /// will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DeviceGroupsUpdateWithResult(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "/deviceGroups/" + + global::System.Uri.EscapeDataString(deviceGroupName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DeviceGroupsUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that + /// will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DeviceGroupsUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroup.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DeviceGroupsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroup.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// The resource properties to be updated. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DeviceGroupsUpdate_Validate(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertRegEx(nameof(catalogName), catalogName, @"^[A-Za-z0-9_-]{1,50}$"); + await eventListener.AssertNotNull(nameof(productName),productName); + await eventListener.AssertRegEx(nameof(productName), productName, @"^[\w][\w\s]{1,48}[\w]$|^\.default$|^\.unassigned$"); + await eventListener.AssertNotNull(nameof(deviceGroupName),deviceGroupName); + await eventListener.AssertRegEx(nameof(deviceGroupName), deviceGroupName, @"^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\s]{1,48}[A-Za-z0-9]$|^\.default$|^\.unassigned$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// Create a Device. Use '.unassigned' or '.default' for the device group and product names to claim a device to the catalog + /// only. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// Device name + /// Resource create parameters. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DevicesCreateOrUpdate(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, string deviceName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "/deviceGroups/" + + global::System.Uri.EscapeDataString(deviceGroupName) + + "/devices/" + + global::System.Uri.EscapeDataString(deviceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevicesCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Create a Device. Use '.unassigned' or '.default' for the device group and product names to claim a device to the catalog + /// only. + /// + /// + /// Resource create parameters. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DevicesCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/products/(?[^/]+)/deviceGroups/(?[^/]+)/devices/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var productName = _match.Groups["productName"].Value; + var deviceGroupName = _match.Groups["deviceGroupName"].Value; + var deviceName = _match.Groups["deviceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/products/" + + productName + + "/deviceGroups/" + + deviceGroupName + + "/devices/" + + deviceName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevicesCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Create a Device. Use '.unassigned' or '.default' for the device group and product names to claim a device to the catalog + /// only. + /// + /// + /// Resource create parameters. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will + /// be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DevicesCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice body, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/products/(?[^/]+)/deviceGroups/(?[^/]+)/devices/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var productName = _match.Groups["productName"].Value; + var deviceGroupName = _match.Groups["deviceGroupName"].Value; + var deviceName = _match.Groups["deviceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/products/" + + productName + + "/deviceGroups/" + + deviceGroupName + + "/devices/" + + deviceName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DevicesCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Create a Device. Use '.unassigned' or '.default' for the device group and product names to claim a device to the catalog + /// only. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// Device name + /// Json string supplied to the DevicesCreateOrUpdate operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DevicesCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, string deviceName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "/deviceGroups/" + + global::System.Uri.EscapeDataString(deviceGroupName) + + "/devices/" + + global::System.Uri.EscapeDataString(deviceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevicesCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Create a Device. Use '.unassigned' or '.default' for the device group and product names to claim a device to the catalog + /// only. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// Device name + /// Json string supplied to the DevicesCreateOrUpdate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will + /// be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DevicesCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, string deviceName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "/deviceGroups/" + + global::System.Uri.EscapeDataString(deviceGroupName) + + "/devices/" + + global::System.Uri.EscapeDataString(deviceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DevicesCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Create a Device. Use '.unassigned' or '.default' for the device group and product names to claim a device to the catalog + /// only. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// Device name + /// Resource create parameters. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will + /// be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DevicesCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, string deviceName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice body, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "/deviceGroups/" + + global::System.Uri.EscapeDataString(deviceGroupName) + + "/devices/" + + global::System.Uri.EscapeDataString(deviceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DevicesCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will + /// be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DevicesCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Device.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DevicesCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Device.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// Device name + /// Resource create parameters. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DevicesCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, string deviceName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice body, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertRegEx(nameof(catalogName), catalogName, @"^[A-Za-z0-9_-]{1,50}$"); + await eventListener.AssertNotNull(nameof(productName),productName); + await eventListener.AssertRegEx(nameof(productName), productName, @"^[\w][\w\s]{1,48}[\w]$|^\.default$|^\.unassigned$"); + await eventListener.AssertNotNull(nameof(deviceGroupName),deviceGroupName); + await eventListener.AssertRegEx(nameof(deviceGroupName), deviceGroupName, @"^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\s]{1,48}[A-Za-z0-9]$|^\.default$|^\.unassigned$"); + await eventListener.AssertNotNull(nameof(deviceName),deviceName); + await eventListener.AssertRegEx(nameof(deviceName), deviceName, @"^[a-zA-Z0-9-]{128}$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Delete a Device + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// Device name + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DevicesDelete(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, string deviceName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "/deviceGroups/" + + global::System.Uri.EscapeDataString(deviceGroupName) + + "/devices/" + + global::System.Uri.EscapeDataString(deviceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevicesDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Delete a Device + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DevicesDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/products/(?[^/]+)/deviceGroups/(?[^/]+)/devices/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var productName = _match.Groups["productName"].Value; + var deviceGroupName = _match.Groups["deviceGroupName"].Value; + var deviceName = _match.Groups["deviceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/products/" + + productName + + "/deviceGroups/" + + deviceGroupName + + "/devices/" + + deviceName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevicesDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DevicesDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// Device name + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DevicesDelete_Validate(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, string deviceName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertRegEx(nameof(catalogName), catalogName, @"^[A-Za-z0-9_-]{1,50}$"); + await eventListener.AssertNotNull(nameof(productName),productName); + await eventListener.AssertRegEx(nameof(productName), productName, @"^[\w][\w\s]{1,48}[\w]$|^\.default$|^\.unassigned$"); + await eventListener.AssertNotNull(nameof(deviceGroupName),deviceGroupName); + await eventListener.AssertRegEx(nameof(deviceGroupName), deviceGroupName, @"^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\s]{1,48}[A-Za-z0-9]$|^\.default$|^\.unassigned$"); + await eventListener.AssertNotNull(nameof(deviceName),deviceName); + await eventListener.AssertRegEx(nameof(deviceName), deviceName, @"^[a-zA-Z0-9-]{128}$"); + } + } + + /// + /// Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product names + /// to generate the image for a device that does not belong to a specific device group and product. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// Device name + /// Generate capability image request body. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DevicesGenerateCapabilityImage(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, string deviceName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IGenerateCapabilityImageRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "/deviceGroups/" + + global::System.Uri.EscapeDataString(deviceGroupName) + + "/devices/" + + global::System.Uri.EscapeDataString(deviceName) + + "/generateCapabilityImage" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevicesGenerateCapabilityImage_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product names + /// to generate the image for a device that does not belong to a specific device group and product. + /// + /// + /// Generate capability image request body. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DevicesGenerateCapabilityImageViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IGenerateCapabilityImageRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/products/(?[^/]+)/deviceGroups/(?[^/]+)/devices/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var productName = _match.Groups["productName"].Value; + var deviceGroupName = _match.Groups["deviceGroupName"].Value; + var deviceName = _match.Groups["deviceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/products/" + + productName + + "/deviceGroups/" + + deviceGroupName + + "/devices/" + + deviceName + + "/generateCapabilityImage" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevicesGenerateCapabilityImage_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product names + /// to generate the image for a device that does not belong to a specific device group and product. + /// + /// + /// Generate capability image request body. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DevicesGenerateCapabilityImageViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IGenerateCapabilityImageRequest body, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/products/(?[^/]+)/deviceGroups/(?[^/]+)/devices/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var productName = _match.Groups["productName"].Value; + var deviceGroupName = _match.Groups["deviceGroupName"].Value; + var deviceName = _match.Groups["deviceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/products/" + + productName + + "/deviceGroups/" + + deviceGroupName + + "/devices/" + + deviceName + + "/generateCapabilityImage" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DevicesGenerateCapabilityImageWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product names + /// to generate the image for a device that does not belong to a specific device group and product. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// Device name + /// Json string supplied to the DevicesGenerateCapabilityImage operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DevicesGenerateCapabilityImageViaJsonString(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, string deviceName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "/deviceGroups/" + + global::System.Uri.EscapeDataString(deviceGroupName) + + "/devices/" + + global::System.Uri.EscapeDataString(deviceName) + + "/generateCapabilityImage" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevicesGenerateCapabilityImage_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product names + /// to generate the image for a device that does not belong to a specific device group and product. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// Device name + /// Json string supplied to the DevicesGenerateCapabilityImage operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DevicesGenerateCapabilityImageViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, string deviceName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "/deviceGroups/" + + global::System.Uri.EscapeDataString(deviceGroupName) + + "/devices/" + + global::System.Uri.EscapeDataString(deviceName) + + "/generateCapabilityImage" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DevicesGenerateCapabilityImageWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product names + /// to generate the image for a device that does not belong to a specific device group and product. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// Device name + /// Generate capability image request body. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DevicesGenerateCapabilityImageWithResult(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, string deviceName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IGenerateCapabilityImageRequest body, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "/deviceGroups/" + + global::System.Uri.EscapeDataString(deviceGroupName) + + "/devices/" + + global::System.Uri.EscapeDataString(deviceName) + + "/generateCapabilityImage" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DevicesGenerateCapabilityImageWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DevicesGenerateCapabilityImageWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.SignedCapabilityImageResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DevicesGenerateCapabilityImage_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.SignedCapabilityImageResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// Device name + /// Generate capability image request body. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DevicesGenerateCapabilityImage_Validate(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, string deviceName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IGenerateCapabilityImageRequest body, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertRegEx(nameof(catalogName), catalogName, @"^[A-Za-z0-9_-]{1,50}$"); + await eventListener.AssertNotNull(nameof(productName),productName); + await eventListener.AssertRegEx(nameof(productName), productName, @"^[\w][\w\s]{1,48}[\w]$|^\.default$|^\.unassigned$"); + await eventListener.AssertNotNull(nameof(deviceGroupName),deviceGroupName); + await eventListener.AssertRegEx(nameof(deviceGroupName), deviceGroupName, @"^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\s]{1,48}[A-Za-z0-9]$|^\.default$|^\.unassigned$"); + await eventListener.AssertNotNull(nameof(deviceName),deviceName); + await eventListener.AssertRegEx(nameof(deviceName), deviceName, @"^[a-zA-Z0-9-]{128}$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// Get a Device. Use '.unassigned' or '.default' for the device group and product names when a device does not belong to + /// a device group and product. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// Device name + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DevicesGet(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, string deviceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "/deviceGroups/" + + global::System.Uri.EscapeDataString(deviceGroupName) + + "/devices/" + + global::System.Uri.EscapeDataString(deviceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevicesGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Get a Device. Use '.unassigned' or '.default' for the device group and product names when a device does not belong to + /// a device group and product. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DevicesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/products/(?[^/]+)/deviceGroups/(?[^/]+)/devices/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var productName = _match.Groups["productName"].Value; + var deviceGroupName = _match.Groups["deviceGroupName"].Value; + var deviceName = _match.Groups["deviceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/products/" + + productName + + "/deviceGroups/" + + deviceGroupName + + "/devices/" + + deviceName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevicesGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Get a Device. Use '.unassigned' or '.default' for the device group and product names when a device does not belong to + /// a device group and product. + /// + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will + /// be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DevicesGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/products/(?[^/]+)/deviceGroups/(?[^/]+)/devices/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var productName = _match.Groups["productName"].Value; + var deviceGroupName = _match.Groups["deviceGroupName"].Value; + var deviceName = _match.Groups["deviceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/products/" + + productName + + "/deviceGroups/" + + deviceGroupName + + "/devices/" + + deviceName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DevicesGetWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Get a Device. Use '.unassigned' or '.default' for the device group and product names when a device does not belong to + /// a device group and product. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// Device name + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will + /// be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DevicesGetWithResult(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, string deviceName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "/deviceGroups/" + + global::System.Uri.EscapeDataString(deviceGroupName) + + "/devices/" + + global::System.Uri.EscapeDataString(deviceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DevicesGetWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will + /// be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DevicesGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Device.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DevicesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Device.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation events + /// back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// Device name + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DevicesGet_Validate(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, string deviceName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertRegEx(nameof(catalogName), catalogName, @"^[A-Za-z0-9_-]{1,50}$"); + await eventListener.AssertNotNull(nameof(productName),productName); + await eventListener.AssertRegEx(nameof(productName), productName, @"^[\w][\w\s]{1,48}[\w]$|^\.default$|^\.unassigned$"); + await eventListener.AssertNotNull(nameof(deviceGroupName),deviceGroupName); + await eventListener.AssertRegEx(nameof(deviceGroupName), deviceGroupName, @"^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\s]{1,48}[A-Za-z0-9]$|^\.default$|^\.unassigned$"); + await eventListener.AssertNotNull(nameof(deviceName),deviceName); + await eventListener.AssertRegEx(nameof(deviceName), deviceName, @"^[a-zA-Z0-9-]{128}$"); + } + } + + /// + /// List Device resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product + /// or device group name. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DevicesListByDeviceGroup(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "/deviceGroups/" + + global::System.Uri.EscapeDataString(deviceGroupName) + + "/devices" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevicesListByDeviceGroup_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// List Device resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product + /// or device group name. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DevicesListByDeviceGroupViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/products/(?[^/]+)/deviceGroups/(?[^/]+)/devices$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var productName = _match.Groups["productName"].Value; + var deviceGroupName = _match.Groups["deviceGroupName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/products/" + + productName + + "/deviceGroups/" + + deviceGroupName + + "/devices" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevicesListByDeviceGroup_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// List Device resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product + /// or device group name. + /// + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DevicesListByDeviceGroupViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/products/(?[^/]+)/deviceGroups/(?[^/]+)/devices$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var productName = _match.Groups["productName"].Value; + var deviceGroupName = _match.Groups["deviceGroupName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/products/" + + productName + + "/deviceGroups/" + + deviceGroupName + + "/devices" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DevicesListByDeviceGroupWithResult_Call (request, eventListener,sender); + } + } + + /// + /// List Device resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product + /// or device group name. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DevicesListByDeviceGroupWithResult(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "/deviceGroups/" + + global::System.Uri.EscapeDataString(deviceGroupName) + + "/devices" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DevicesListByDeviceGroupWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DevicesListByDeviceGroupWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DevicesListByDeviceGroup_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DevicesListByDeviceGroup_Validate(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertRegEx(nameof(catalogName), catalogName, @"^[A-Za-z0-9_-]{1,50}$"); + await eventListener.AssertNotNull(nameof(productName),productName); + await eventListener.AssertRegEx(nameof(productName), productName, @"^[\w][\w\s]{1,48}[\w]$|^\.default$|^\.unassigned$"); + await eventListener.AssertNotNull(nameof(deviceGroupName),deviceGroupName); + await eventListener.AssertRegEx(nameof(deviceGroupName), deviceGroupName, @"^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\s]{1,48}[A-Za-z0-9]$|^\.default$|^\.unassigned$"); + } + } + + /// + /// Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the catalog + /// level. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// Device name + /// The resource properties to be updated. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DevicesUpdate(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, string deviceName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "/deviceGroups/" + + global::System.Uri.EscapeDataString(deviceGroupName) + + "/devices/" + + global::System.Uri.EscapeDataString(deviceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevicesUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the catalog + /// level. + /// + /// + /// The resource properties to be updated. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DevicesUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/products/(?[^/]+)/deviceGroups/(?[^/]+)/devices/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var productName = _match.Groups["productName"].Value; + var deviceGroupName = _match.Groups["deviceGroupName"].Value; + var deviceName = _match.Groups["deviceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/products/" + + productName + + "/deviceGroups/" + + deviceGroupName + + "/devices/" + + deviceName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevicesUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the catalog + /// level. + /// + /// + /// The resource properties to be updated. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will + /// be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DevicesUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/products/(?[^/]+)/deviceGroups/(?[^/]+)/devices/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var productName = _match.Groups["productName"].Value; + var deviceGroupName = _match.Groups["deviceGroupName"].Value; + var deviceName = _match.Groups["deviceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/products/" + + productName + + "/deviceGroups/" + + deviceGroupName + + "/devices/" + + deviceName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DevicesUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the catalog + /// level. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// Device name + /// Json string supplied to the DevicesUpdate operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DevicesUpdateViaJsonString(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, string deviceName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "/deviceGroups/" + + global::System.Uri.EscapeDataString(deviceGroupName) + + "/devices/" + + global::System.Uri.EscapeDataString(deviceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevicesUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the catalog + /// level. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// Device name + /// Json string supplied to the DevicesUpdate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will + /// be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DevicesUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, string deviceName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "/deviceGroups/" + + global::System.Uri.EscapeDataString(deviceGroupName) + + "/devices/" + + global::System.Uri.EscapeDataString(deviceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DevicesUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the catalog + /// level. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// Device name + /// The resource properties to be updated. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will + /// be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DevicesUpdateWithResult(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, string deviceName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "/deviceGroups/" + + global::System.Uri.EscapeDataString(deviceGroupName) + + "/devices/" + + global::System.Uri.EscapeDataString(deviceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DevicesUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will + /// be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DevicesUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Device.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DevicesUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Device.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Name of device group. + /// Device name + /// The resource properties to be updated. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DevicesUpdate_Validate(string subscriptionId, string resourceGroupName, string catalogName, string productName, string deviceGroupName, string deviceName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertRegEx(nameof(catalogName), catalogName, @"^[A-Za-z0-9_-]{1,50}$"); + await eventListener.AssertNotNull(nameof(productName),productName); + await eventListener.AssertRegEx(nameof(productName), productName, @"^[\w][\w\s]{1,48}[\w]$|^\.default$|^\.unassigned$"); + await eventListener.AssertNotNull(nameof(deviceGroupName),deviceGroupName); + await eventListener.AssertRegEx(nameof(deviceGroupName), deviceGroupName, @"^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\s]{1,48}[A-Za-z0-9]$|^\.default$|^\.unassigned$"); + await eventListener.AssertNotNull(nameof(deviceName),deviceName); + await eventListener.AssertRegEx(nameof(deviceName), deviceName, @"^[a-zA-Z0-9-]{128}$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Create a Image + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Image name. Use an image GUID for GA versions of the API. + /// Resource create parameters. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ImagesCreateOrUpdate(string subscriptionId, string resourceGroupName, string catalogName, string imageName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/images/" + + global::System.Uri.EscapeDataString(imageName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ImagesCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Create a Image + /// + /// Resource create parameters. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ImagesCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/images/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images/{imageName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var imageName = _match.Groups["imageName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/images/" + + imageName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ImagesCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Create a Image + /// + /// Resource create parameters. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will + /// be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ImagesCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage body, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/images/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images/{imageName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var imageName = _match.Groups["imageName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/images/" + + imageName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ImagesCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Create a Image + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Image name. Use an image GUID for GA versions of the API. + /// Json string supplied to the ImagesCreateOrUpdate operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ImagesCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string catalogName, string imageName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/images/" + + global::System.Uri.EscapeDataString(imageName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ImagesCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Create a Image + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Image name. Use an image GUID for GA versions of the API. + /// Json string supplied to the ImagesCreateOrUpdate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will + /// be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ImagesCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string catalogName, string imageName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/images/" + + global::System.Uri.EscapeDataString(imageName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ImagesCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Create a Image + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Image name. Use an image GUID for GA versions of the API. + /// Resource create parameters. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will + /// be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ImagesCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string catalogName, string imageName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage body, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/images/" + + global::System.Uri.EscapeDataString(imageName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ImagesCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will + /// be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ImagesCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Image.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ImagesCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Image.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Image name. Use an image GUID for GA versions of the API. + /// Resource create parameters. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ImagesCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string catalogName, string imageName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage body, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertRegEx(nameof(catalogName), catalogName, @"^[A-Za-z0-9_-]{1,50}$"); + await eventListener.AssertNotNull(nameof(imageName),imageName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Delete a Image + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Image name. Use an image GUID for GA versions of the API. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ImagesDelete(string subscriptionId, string resourceGroupName, string catalogName, string imageName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/images/" + + global::System.Uri.EscapeDataString(imageName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ImagesDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Delete a Image + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ImagesDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/images/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images/{imageName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var imageName = _match.Groups["imageName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/images/" + + imageName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ImagesDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ImagesDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Image name. Use an image GUID for GA versions of the API. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ImagesDelete_Validate(string subscriptionId, string resourceGroupName, string catalogName, string imageName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertRegEx(nameof(catalogName), catalogName, @"^[A-Za-z0-9_-]{1,50}$"); + await eventListener.AssertNotNull(nameof(imageName),imageName); + } + } + + /// Get a Image + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Image name. Use an image GUID for GA versions of the API. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ImagesGet(string subscriptionId, string resourceGroupName, string catalogName, string imageName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/images/" + + global::System.Uri.EscapeDataString(imageName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ImagesGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get a Image + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ImagesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/images/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images/{imageName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var imageName = _match.Groups["imageName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/images/" + + imageName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ImagesGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get a Image + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will + /// be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ImagesGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/images/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images/{imageName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var imageName = _match.Groups["imageName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/images/" + + imageName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ImagesGetWithResult_Call (request, eventListener,sender); + } + } + + /// Get a Image + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Image name. Use an image GUID for GA versions of the API. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will + /// be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ImagesGetWithResult(string subscriptionId, string resourceGroupName, string catalogName, string imageName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/images/" + + global::System.Uri.EscapeDataString(imageName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ImagesGetWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will + /// be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ImagesGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Image.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ImagesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Image.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation events + /// back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Image name. Use an image GUID for GA versions of the API. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ImagesGet_Validate(string subscriptionId, string resourceGroupName, string catalogName, string imageName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertRegEx(nameof(catalogName), catalogName, @"^[A-Za-z0-9_-]{1,50}$"); + await eventListener.AssertNotNull(nameof(imageName),imageName); + } + } + + /// List Image resources by Catalog + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// The number of result items to skip. + /// The maximum number of result items per page. + /// Filter the result list using the given expression + /// The number of result items to return. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ImagesListByCatalog(string subscriptionId, string resourceGroupName, string catalogName, int? Skip, int? Maxpagesize, string Filter, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/images" + + "?" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + + "&" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ImagesListByCatalog_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List Image resources by Catalog + /// + /// The number of result items to skip. + /// The maximum number of result items per page. + /// Filter the result list using the given expression + /// The number of result items to return. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ImagesListByCatalogViaIdentity(global::System.String viaIdentity, int? Skip, int? Maxpagesize, string Filter, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/images$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/images" + + "?" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + + "&" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ImagesListByCatalog_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List Image resources by Catalog + /// + /// The number of result items to skip. + /// The maximum number of result items per page. + /// Filter the result list using the given expression + /// The number of result items to return. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ImagesListByCatalogViaIdentityWithResult(global::System.String viaIdentity, int? Skip, int? Maxpagesize, string Filter, int? Top, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/images$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/images" + + "?" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + + "&" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ImagesListByCatalogWithResult_Call (request, eventListener,sender); + } + } + + /// List Image resources by Catalog + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// The number of result items to skip. + /// The maximum number of result items per page. + /// Filter the result list using the given expression + /// The number of result items to return. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ImagesListByCatalogWithResult(string subscriptionId, string resourceGroupName, string catalogName, int? Skip, int? Maxpagesize, string Filter, int? Top, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/images" + + "?" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + + "&" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ImagesListByCatalogWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ImagesListByCatalogWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ImageListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ImagesListByCatalog_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ImageListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// The number of result items to skip. + /// The maximum number of result items per page. + /// Filter the result list using the given expression + /// The number of result items to return. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ImagesListByCatalog_Validate(string subscriptionId, string resourceGroupName, string catalogName, int? Skip, int? Maxpagesize, string Filter, int? Top, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertRegEx(nameof(catalogName), catalogName, @"^[A-Za-z0-9_-]{1,50}$"); + await eventListener.AssertNotNull(nameof(Filter),Filter); + } + } + + /// List the operations for the provider + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OperationsList(global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.AzureSphere/operations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OperationsList_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List the operations for the provider + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OperationsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.AzureSphere/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.AzureSphere/operations'"); + } + + // replace URI parameters with values from identity + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.AzureSphere/operations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OperationsList_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List the operations for the provider + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OperationsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.AzureSphere/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.AzureSphere/operations'"); + } + + // replace URI parameters with values from identity + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.AzureSphere/operations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.OperationsListWithResult_Call (request, eventListener,sender); + } + } + + /// List the operations for the provider + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OperationsListWithResult(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.AzureSphere/operations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.OperationsListWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OperationsListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.OperationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OperationsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.OperationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OperationsList_Validate(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + + } + } + + /// + /// Counts devices in product. '.default' and '.unassigned' are system defined values and cannot be used for product name. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProductsCountDevices(string subscriptionId, string resourceGroupName, string catalogName, string productName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "/countDevices" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProductsCountDevices_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Counts devices in product. '.default' and '.unassigned' are system defined values and cannot be used for product name. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProductsCountDevicesViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/products/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var productName = _match.Groups["productName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/products/" + + productName + + "/countDevices" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProductsCountDevices_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Counts devices in product. '.default' and '.unassigned' are system defined values and cannot be used for product name. + /// + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProductsCountDevicesViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/products/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var productName = _match.Groups["productName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/products/" + + productName + + "/countDevices" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ProductsCountDevicesWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Counts devices in product. '.default' and '.unassigned' are system defined values and cannot be used for product name. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProductsCountDevicesWithResult(string subscriptionId, string resourceGroupName, string catalogName, string productName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "/countDevices" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ProductsCountDevicesWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProductsCountDevicesWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CountDevicesResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProductsCountDevices_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CountDevicesResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProductsCountDevices_Validate(string subscriptionId, string resourceGroupName, string catalogName, string productName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertRegEx(nameof(catalogName), catalogName, @"^[A-Za-z0-9_-]{1,50}$"); + await eventListener.AssertNotNull(nameof(productName),productName); + await eventListener.AssertRegEx(nameof(productName), productName, @"^[\w][\w\s]{1,48}[\w]$|^\.default$|^\.unassigned$"); + } + } + + /// + /// Create a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Resource create parameters. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProductsCreateOrUpdate(string subscriptionId, string resourceGroupName, string catalogName, string productName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProductsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Create a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. + /// + /// + /// Resource create parameters. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProductsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/products/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var productName = _match.Groups["productName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/products/" + + productName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProductsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Create a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. + /// + /// + /// Resource create parameters. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will + /// be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProductsCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct body, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/products/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var productName = _match.Groups["productName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/products/" + + productName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ProductsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Create a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Json string supplied to the ProductsCreateOrUpdate operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProductsCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string catalogName, string productName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProductsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Create a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Json string supplied to the ProductsCreateOrUpdate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will + /// be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProductsCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string catalogName, string productName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ProductsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Create a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Resource create parameters. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will + /// be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProductsCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string catalogName, string productName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct body, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ProductsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will + /// be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProductsCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Product.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProductsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Product.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Resource create parameters. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProductsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string catalogName, string productName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct body, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertRegEx(nameof(catalogName), catalogName, @"^[A-Za-z0-9_-]{1,50}$"); + await eventListener.AssertNotNull(nameof(productName),productName); + await eventListener.AssertRegEx(nameof(productName), productName, @"^[\w][\w\s]{1,48}[\w]$|^\.default$|^\.unassigned$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// Delete a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name' + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProductsDelete(string subscriptionId, string resourceGroupName, string catalogName, string productName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProductsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// + /// Delete a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name' + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProductsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/products/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var productName = _match.Groups["productName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/products/" + + productName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProductsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProductsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProductsDelete_Validate(string subscriptionId, string resourceGroupName, string catalogName, string productName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertRegEx(nameof(catalogName), catalogName, @"^[A-Za-z0-9_-]{1,50}$"); + await eventListener.AssertNotNull(nameof(productName),productName); + await eventListener.AssertRegEx(nameof(productName), productName, @"^[\w][\w\s]{1,48}[\w]$|^\.default$|^\.unassigned$"); + } + } + + /// + /// Generates default device groups for the product. '.default' and '.unassigned' are system defined values and cannot be + /// used for product name. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProductsGenerateDefaultDeviceGroups(string subscriptionId, string resourceGroupName, string catalogName, string productName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "/generateDefaultDeviceGroups" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProductsGenerateDefaultDeviceGroups_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Generates default device groups for the product. '.default' and '.unassigned' are system defined values and cannot be + /// used for product name. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProductsGenerateDefaultDeviceGroupsViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/products/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var productName = _match.Groups["productName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/products/" + + productName + + "/generateDefaultDeviceGroups" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProductsGenerateDefaultDeviceGroups_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Generates default device groups for the product. '.default' and '.unassigned' are system defined values and cannot be + /// used for product name. + /// + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProductsGenerateDefaultDeviceGroupsViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/products/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var productName = _match.Groups["productName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/products/" + + productName + + "/generateDefaultDeviceGroups" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ProductsGenerateDefaultDeviceGroupsWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Generates default device groups for the product. '.default' and '.unassigned' are system defined values and cannot be + /// used for product name. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProductsGenerateDefaultDeviceGroupsWithResult(string subscriptionId, string resourceGroupName, string catalogName, string productName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "/generateDefaultDeviceGroups" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ProductsGenerateDefaultDeviceGroupsWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProductsGenerateDefaultDeviceGroupsWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroupListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProductsGenerateDefaultDeviceGroups_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroupListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProductsGenerateDefaultDeviceGroups_Validate(string subscriptionId, string resourceGroupName, string catalogName, string productName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertRegEx(nameof(catalogName), catalogName, @"^[A-Za-z0-9_-]{1,50}$"); + await eventListener.AssertNotNull(nameof(productName),productName); + await eventListener.AssertRegEx(nameof(productName), productName, @"^[\w][\w\s]{1,48}[\w]$|^\.default$|^\.unassigned$"); + } + } + + /// + /// Get a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProductsGet(string subscriptionId, string resourceGroupName, string catalogName, string productName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProductsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Get a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProductsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/products/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var productName = _match.Groups["productName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/products/" + + productName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProductsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Get a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. + /// + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will + /// be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProductsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/products/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var productName = _match.Groups["productName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/products/" + + productName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ProductsGetWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Get a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will + /// be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProductsGetWithResult(string subscriptionId, string resourceGroupName, string catalogName, string productName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ProductsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will + /// be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProductsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Product.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProductsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Product.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation events + /// back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProductsGet_Validate(string subscriptionId, string resourceGroupName, string catalogName, string productName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertRegEx(nameof(catalogName), catalogName, @"^[A-Za-z0-9_-]{1,50}$"); + await eventListener.AssertNotNull(nameof(productName),productName); + await eventListener.AssertRegEx(nameof(productName), productName, @"^[\w][\w\s]{1,48}[\w]$|^\.default$|^\.unassigned$"); + } + } + + /// List Product resources by Catalog + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProductsListByCatalog(string subscriptionId, string resourceGroupName, string catalogName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProductsListByCatalog_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List Product resources by Catalog + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProductsListByCatalogViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/products$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/products" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProductsListByCatalog_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List Product resources by Catalog + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProductsListByCatalogViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/products$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/products" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ProductsListByCatalogWithResult_Call (request, eventListener,sender); + } + } + + /// List Product resources by Catalog + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProductsListByCatalogWithResult(string subscriptionId, string resourceGroupName, string catalogName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ProductsListByCatalogWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProductsListByCatalogWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProductListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProductsListByCatalog_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProductListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProductsListByCatalog_Validate(string subscriptionId, string resourceGroupName, string catalogName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertRegEx(nameof(catalogName), catalogName, @"^[A-Za-z0-9_-]{1,50}$"); + } + } + + /// + /// Update a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// The resource properties to be updated. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProductsUpdate(string subscriptionId, string resourceGroupName, string catalogName, string productName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProductsUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Update a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. + /// + /// + /// The resource properties to be updated. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProductsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/products/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var productName = _match.Groups["productName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/products/" + + productName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProductsUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Update a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. + /// + /// + /// The resource properties to be updated. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will + /// be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProductsUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureSphere/catalogs/(?[^/]+)/products/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var productName = _match.Groups["productName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureSphere/catalogs/" + + catalogName + + "/products/" + + productName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ProductsUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Update a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Json string supplied to the ProductsUpdate operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProductsUpdateViaJsonString(string subscriptionId, string resourceGroupName, string catalogName, string productName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProductsUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Update a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// Json string supplied to the ProductsUpdate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will + /// be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProductsUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string catalogName, string productName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ProductsUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Update a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// The resource properties to be updated. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will + /// be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProductsUpdateWithResult(string subscriptionId, string resourceGroupName, string catalogName, string productName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-04-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureSphere/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/products/" + + global::System.Uri.EscapeDataString(productName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ProductsUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will + /// be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProductsUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Product.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProductsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Product.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of catalog + /// Name of product. + /// The resource properties to be updated. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProductsUpdate_Validate(string subscriptionId, string resourceGroupName, string catalogName, string productName, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertRegEx(nameof(catalogName), catalogName, @"^[A-Za-z0-9_-]{1,50}$"); + await eventListener.AssertNotNull(nameof(productName),productName); + await eventListener.AssertRegEx(nameof(productName), productName, @"^[\w][\w\s]{1,48}[\w]$|^\.default$|^\.unassigned$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCatalogDeviceGroup_ListExpanded.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCatalogDeviceGroup_ListExpanded.cs new file mode 100644 index 000000000000..0e197e8f54fd --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCatalogDeviceGroup_ListExpanded.cs @@ -0,0 +1,599 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// List the device groups for the catalog. + /// + /// [OpenAPI] ListDeviceGroups=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/listDeviceGroups" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSphereCatalogDeviceGroup_ListExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"List the device groups for the catalog.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/listDeviceGroups", ApiVersion = "2024-04-01")] + public partial class GetAzSphereCatalogDeviceGroup_ListExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Request of the action to list device groups for a catalog. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IListDeviceGroupsRequest _listDeviceGroupsRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ListDeviceGroupsRequest(); + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Device Group name. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Device Group name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Device Group name.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + public string DeviceGroupName { get => _listDeviceGroupsRequestBody.DeviceGroupName ?? null; set => _listDeviceGroupsRequestBody.DeviceGroupName = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// Backing field for property. + private string _filter; + + /// Filter the result list using the given expression + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Filter the result list using the given expression")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Filter the result list using the given expression", + SerializedName = @"$filter", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Query)] + public string Filter { get => this._filter; set => this._filter = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private int _maxpagesize; + + /// The maximum number of result items per page. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The maximum number of result items per page.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum number of result items per page.", + SerializedName = @"$maxpagesize", + PossibleTypes = new [] { typeof(int) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Query)] + public int Maxpagesize { get => this._maxpagesize; set => this._maxpagesize = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private int _skip; + + /// The number of result items to skip. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of result items to skip.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of result items to skip.", + SerializedName = @"$skip", + PossibleTypes = new [] { typeof(int) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Query)] + public int Skip { get => this._skip; set => this._skip = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Backing field for property. + private int _top; + + /// The number of result items to return. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of result items to return.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of result items to return.", + SerializedName = @"$top", + PossibleTypes = new [] { typeof(int) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Query)] + public int Top { get => this._top; set => this._top = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzSphereCatalogDeviceGroup_ListExpanded() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CatalogsListDeviceGroups' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CatalogsListDeviceGroups(SubscriptionId, ResourceGroupName, CatalogName, this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null, this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?), this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?), this.InvocationInformation.BoundParameters.ContainsKey("Maxpagesize") ? Maxpagesize : default(int?), _listDeviceGroupsRequestBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,Filter=this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null,Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?),Skip=this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?),Maxpagesize=this.InvocationInformation.BoundParameters.ContainsKey("Maxpagesize") ? Maxpagesize : default(int?)}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupListResult + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CatalogsListDeviceGroups_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCatalogDeviceInsight_List.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCatalogDeviceInsight_List.cs new file mode 100644 index 000000000000..f55e8012a60d --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCatalogDeviceInsight_List.cs @@ -0,0 +1,585 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// Lists device insights for catalog. + /// + /// [OpenAPI] ListDeviceInsights=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/listDeviceInsights" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSphereCatalogDeviceInsight_List", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsight))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Lists device insights for catalog.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/listDeviceInsights", ApiVersion = "2024-04-01")] + public partial class GetAzSphereCatalogDeviceInsight_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// Backing field for property. + private string _filter; + + /// Filter the result list using the given expression + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Filter the result list using the given expression")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Filter the result list using the given expression", + SerializedName = @"$filter", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Query)] + public string Filter { get => this._filter; set => this._filter = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private int _maxpagesize; + + /// The maximum number of result items per page. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The maximum number of result items per page.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum number of result items per page.", + SerializedName = @"$maxpagesize", + PossibleTypes = new [] { typeof(int) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Query)] + public int Maxpagesize { get => this._maxpagesize; set => this._maxpagesize = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private int _skip; + + /// The number of result items to skip. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of result items to skip.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of result items to skip.", + SerializedName = @"$skip", + PossibleTypes = new [] { typeof(int) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Query)] + public int Skip { get => this._skip; set => this._skip = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Backing field for property. + private int _top; + + /// The number of result items to return. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of result items to return.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of result items to return.", + SerializedName = @"$top", + PossibleTypes = new [] { typeof(int) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Query)] + public int Top { get => this._top; set => this._top = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IPagedDeviceInsight + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzSphereCatalogDeviceInsight_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CatalogsListDeviceInsights' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CatalogsListDeviceInsights(SubscriptionId, ResourceGroupName, CatalogName, this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null, this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?), this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?), this.InvocationInformation.BoundParameters.ContainsKey("Maxpagesize") ? Maxpagesize : default(int?), onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,Filter=this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null,Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?),Skip=this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?),Maxpagesize=this.InvocationInformation.BoundParameters.ContainsKey("Maxpagesize") ? Maxpagesize : default(int?)}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IPagedDeviceInsight + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IPagedDeviceInsight + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CatalogsListDeviceInsights_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCatalogDevice_List.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCatalogDevice_List.cs new file mode 100644 index 000000000000..909cc8fef0b0 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCatalogDevice_List.cs @@ -0,0 +1,585 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// Lists devices for catalog. + /// + /// [OpenAPI] ListDevices=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/listDevices" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSphereCatalogDevice_List", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Lists devices for catalog.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/listDevices", ApiVersion = "2024-04-01")] + public partial class GetAzSphereCatalogDevice_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// Backing field for property. + private string _filter; + + /// Filter the result list using the given expression + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Filter the result list using the given expression")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Filter the result list using the given expression", + SerializedName = @"$filter", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Query)] + public string Filter { get => this._filter; set => this._filter = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private int _maxpagesize; + + /// The maximum number of result items per page. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The maximum number of result items per page.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum number of result items per page.", + SerializedName = @"$maxpagesize", + PossibleTypes = new [] { typeof(int) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Query)] + public int Maxpagesize { get => this._maxpagesize; set => this._maxpagesize = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private int _skip; + + /// The number of result items to skip. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of result items to skip.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of result items to skip.", + SerializedName = @"$skip", + PossibleTypes = new [] { typeof(int) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Query)] + public int Skip { get => this._skip; set => this._skip = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Backing field for property. + private int _top; + + /// The number of result items to return. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of result items to return.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of result items to return.", + SerializedName = @"$top", + PossibleTypes = new [] { typeof(int) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Query)] + public int Top { get => this._top; set => this._top = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzSphereCatalogDevice_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CatalogsListDevices' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CatalogsListDevices(SubscriptionId, ResourceGroupName, CatalogName, this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null, this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?), this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?), this.InvocationInformation.BoundParameters.ContainsKey("Maxpagesize") ? Maxpagesize : default(int?), onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,Filter=this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null,Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?),Skip=this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?),Maxpagesize=this.InvocationInformation.BoundParameters.ContainsKey("Maxpagesize") ? Maxpagesize : default(int?)}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceListResult + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CatalogsListDevices_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCatalog_Get.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCatalog_Get.cs new file mode 100644 index 000000000000..5795683eefc1 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCatalog_Get.cs @@ -0,0 +1,500 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// Get a Catalog + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSphereCatalog_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Get a Catalog")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}", ApiVersion = "2024-04-01")] + public partial class GetAzSphereCatalog_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("CatalogName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzSphereCatalog_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CatalogsGet(SubscriptionId, ResourceGroupName, Name, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCatalog_GetViaIdentity.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCatalog_GetViaIdentity.cs new file mode 100644 index 000000000000..fcc7f6eda1cc --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCatalog_GetViaIdentity.cs @@ -0,0 +1,477 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// Get a Catalog + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSphereCatalog_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Get a Catalog")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}", ApiVersion = "2024-04-01")] + public partial class GetAzSphereCatalog_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzSphereCatalog_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.CatalogsGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.CatalogsGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.CatalogName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCatalog_List.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCatalog_List.cs new file mode 100644 index 000000000000..53f58208749b --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCatalog_List.cs @@ -0,0 +1,498 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// List Catalog resources by subscription ID + /// + /// [OpenAPI] ListBySubscription=>GET:"/subscriptions/{subscriptionId}/providers/Microsoft.AzureSphere/catalogs" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSphereCatalog_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"List Catalog resources by subscription ID")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.AzureSphere/catalogs", ApiVersion = "2024-04-01")] + public partial class GetAzSphereCatalog_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzSphereCatalog_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CatalogsListBySubscription(SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogListResult + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CatalogsListBySubscription_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCatalog_List1.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCatalog_List1.cs new file mode 100644 index 000000000000..8ca2e58c1f20 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCatalog_List1.cs @@ -0,0 +1,512 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// List Catalog resources by resource group + /// + /// [OpenAPI] ListByResourceGroup=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSphereCatalog_List1")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"List Catalog resources by resource group")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs", ApiVersion = "2024-04-01")] + public partial class GetAzSphereCatalog_List1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzSphereCatalog_List1() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CatalogsListByResourceGroup(SubscriptionId, ResourceGroupName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogListResult + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CatalogsListByResourceGroup_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCertificateCertChain_Retrieve.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCertificateCertChain_Retrieve.cs new file mode 100644 index 000000000000..0b224914b968 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCertificateCertChain_Retrieve.cs @@ -0,0 +1,518 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// Retrieves cert chain. + /// + /// [OpenAPI] RetrieveCertChain=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates/{serialNumber}/retrieveCertChain" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSphereCertificateCertChain_Retrieve", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateChainResponse))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Retrieves cert chain.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates/{serialNumber}/retrieveCertChain", ApiVersion = "2024-04-01")] + public partial class GetAzSphereCertificateCertChain_Retrieve : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _serialNumber; + + /// + /// Serial number of the certificate. Use '.default' to get current active certificate. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Serial number of the certificate. Use '.default' to get current active certificate.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Serial number of the certificate. Use '.default' to get current active certificate.", + SerializedName = @"serialNumber", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SerialNumber { get => this._serialNumber; set => this._serialNumber = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateChainResponse + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzSphereCertificateCertChain_Retrieve() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CertificatesRetrieveCertChain' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CertificatesRetrieveCertChain(SubscriptionId, ResourceGroupName, CatalogName, SerialNumber, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,SerialNumber=SerialNumber}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateChainResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateChainResponse + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCertificateCertChain_RetrieveViaIdentity.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCertificateCertChain_RetrieveViaIdentity.cs new file mode 100644 index 000000000000..2d0f1c913e77 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCertificateCertChain_RetrieveViaIdentity.cs @@ -0,0 +1,484 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// Retrieves cert chain. + /// + /// [OpenAPI] RetrieveCertChain=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates/{serialNumber}/retrieveCertChain" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSphereCertificateCertChain_RetrieveViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateChainResponse))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Retrieves cert chain.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates/{serialNumber}/retrieveCertChain", ApiVersion = "2024-04-01")] + public partial class GetAzSphereCertificateCertChain_RetrieveViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateChainResponse + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzSphereCertificateCertChain_RetrieveViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CertificatesRetrieveCertChain' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.CertificatesRetrieveCertChainViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SerialNumber) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SerialNumber"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.CertificatesRetrieveCertChain(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.CatalogName ?? null, InputObject.SerialNumber ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateChainResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateChainResponse + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCertificateCertChain_RetrieveViaIdentityCatalog.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCertificateCertChain_RetrieveViaIdentityCatalog.cs new file mode 100644 index 000000000000..ee5423fbd7ad --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCertificateCertChain_RetrieveViaIdentityCatalog.cs @@ -0,0 +1,497 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// Retrieves cert chain. + /// + /// [OpenAPI] RetrieveCertChain=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates/{serialNumber}/retrieveCertChain" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSphereCertificateCertChain_RetrieveViaIdentityCatalog", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateChainResponse))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Retrieves cert chain.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates/{serialNumber}/retrieveCertChain", ApiVersion = "2024-04-01")] + public partial class GetAzSphereCertificateCertChain_RetrieveViaIdentityCatalog : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _catalogInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity CatalogInputObject { get => this._catalogInputObject; set => this._catalogInputObject = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _serialNumber; + + /// + /// Serial number of the certificate. Use '.default' to get current active certificate. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Serial number of the certificate. Use '.default' to get current active certificate.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Serial number of the certificate. Use '.default' to get current active certificate.", + SerializedName = @"serialNumber", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SerialNumber { get => this._serialNumber; set => this._serialNumber = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateChainResponse + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzSphereCertificateCertChain_RetrieveViaIdentityCatalog() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CertificatesRetrieveCertChain' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (CatalogInputObject?.Id != null) + { + this.CatalogInputObject.Id += $"/certificates/{(global::System.Uri.EscapeDataString(this.SerialNumber.ToString()))}"; + await this.Client.CertificatesRetrieveCertChainViaIdentity(CatalogInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == CatalogInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + if (null == CatalogInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + if (null == CatalogInputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + await this.Client.CertificatesRetrieveCertChain(CatalogInputObject.SubscriptionId ?? null, CatalogInputObject.ResourceGroupName ?? null, CatalogInputObject.CatalogName ?? null, SerialNumber, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SerialNumber=SerialNumber}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateChainResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateChainResponse + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCertificateProof_RetrieveExpanded.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCertificateProof_RetrieveExpanded.cs new file mode 100644 index 000000000000..16eb80173c65 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCertificateProof_RetrieveExpanded.cs @@ -0,0 +1,532 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// Gets the proof of possession nonce. + /// + /// [OpenAPI] RetrieveProofOfPossessionNonce=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates/{serialNumber}/retrieveProofOfPossessionNonce" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSphereCertificateProof_RetrieveExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceResponse))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Gets the proof of possession nonce.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates/{serialNumber}/retrieveProofOfPossessionNonce", ApiVersion = "2024-04-01")] + public partial class GetAzSphereCertificateProof_RetrieveExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// Request for the proof of possession nonce + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceRequest _proofOfPossessionNonceRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProofOfPossessionNonceRequest(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The proof of possession nonce + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The proof of possession nonce")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The proof of possession nonce", + SerializedName = @"proofOfPossessionNonce", + PossibleTypes = new [] { typeof(string) })] + public string ProofOfPossessionNonce { get => _proofOfPossessionNonceRequestBody.ProofOfPossessionNonce ?? null; set => _proofOfPossessionNonceRequestBody.ProofOfPossessionNonce = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _serialNumber; + + /// + /// Serial number of the certificate. Use '.default' to get current active certificate. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Serial number of the certificate. Use '.default' to get current active certificate.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Serial number of the certificate. Use '.default' to get current active certificate.", + SerializedName = @"serialNumber", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SerialNumber { get => this._serialNumber; set => this._serialNumber = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceResponse + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzSphereCertificateProof_RetrieveExpanded() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CertificatesRetrieveProofOfPossessionNonce' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CertificatesRetrieveProofOfPossessionNonce(SubscriptionId, ResourceGroupName, CatalogName, SerialNumber, _proofOfPossessionNonceRequestBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,SerialNumber=SerialNumber}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceResponse + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCertificateProof_RetrieveViaIdentityCatalogExpanded.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCertificateProof_RetrieveViaIdentityCatalogExpanded.cs new file mode 100644 index 000000000000..f0ea1d3ae423 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCertificateProof_RetrieveViaIdentityCatalogExpanded.cs @@ -0,0 +1,512 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// Gets the proof of possession nonce. + /// + /// [OpenAPI] RetrieveProofOfPossessionNonce=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates/{serialNumber}/retrieveProofOfPossessionNonce" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSphereCertificateProof_RetrieveViaIdentityCatalogExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceResponse))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Gets the proof of possession nonce.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates/{serialNumber}/retrieveProofOfPossessionNonce", ApiVersion = "2024-04-01")] + public partial class GetAzSphereCertificateProof_RetrieveViaIdentityCatalogExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// Request for the proof of possession nonce + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceRequest _proofOfPossessionNonceRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProofOfPossessionNonceRequest(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _catalogInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity CatalogInputObject { get => this._catalogInputObject; set => this._catalogInputObject = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The proof of possession nonce + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The proof of possession nonce")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The proof of possession nonce", + SerializedName = @"proofOfPossessionNonce", + PossibleTypes = new [] { typeof(string) })] + public string ProofOfPossessionNonce { get => _proofOfPossessionNonceRequestBody.ProofOfPossessionNonce ?? null; set => _proofOfPossessionNonceRequestBody.ProofOfPossessionNonce = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _serialNumber; + + /// + /// Serial number of the certificate. Use '.default' to get current active certificate. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Serial number of the certificate. Use '.default' to get current active certificate.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Serial number of the certificate. Use '.default' to get current active certificate.", + SerializedName = @"serialNumber", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SerialNumber { get => this._serialNumber; set => this._serialNumber = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceResponse + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public GetAzSphereCertificateProof_RetrieveViaIdentityCatalogExpanded() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CertificatesRetrieveProofOfPossessionNonce' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (CatalogInputObject?.Id != null) + { + this.CatalogInputObject.Id += $"/certificates/{(global::System.Uri.EscapeDataString(this.SerialNumber.ToString()))}"; + await this.Client.CertificatesRetrieveProofOfPossessionNonceViaIdentity(CatalogInputObject.Id, _proofOfPossessionNonceRequestBody, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == CatalogInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + if (null == CatalogInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + if (null == CatalogInputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + await this.Client.CertificatesRetrieveProofOfPossessionNonce(CatalogInputObject.SubscriptionId ?? null, CatalogInputObject.ResourceGroupName ?? null, CatalogInputObject.CatalogName ?? null, SerialNumber, _proofOfPossessionNonceRequestBody, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SerialNumber=SerialNumber}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceResponse + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCertificateProof_RetrieveViaIdentityExpanded.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCertificateProof_RetrieveViaIdentityExpanded.cs new file mode 100644 index 000000000000..87bb86853f4b --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCertificateProof_RetrieveViaIdentityExpanded.cs @@ -0,0 +1,498 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// Gets the proof of possession nonce. + /// + /// [OpenAPI] RetrieveProofOfPossessionNonce=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates/{serialNumber}/retrieveProofOfPossessionNonce" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSphereCertificateProof_RetrieveViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceResponse))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Gets the proof of possession nonce.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates/{serialNumber}/retrieveProofOfPossessionNonce", ApiVersion = "2024-04-01")] + public partial class GetAzSphereCertificateProof_RetrieveViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// Request for the proof of possession nonce + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceRequest _proofOfPossessionNonceRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProofOfPossessionNonceRequest(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The proof of possession nonce + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The proof of possession nonce")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The proof of possession nonce", + SerializedName = @"proofOfPossessionNonce", + PossibleTypes = new [] { typeof(string) })] + public string ProofOfPossessionNonce { get => _proofOfPossessionNonceRequestBody.ProofOfPossessionNonce ?? null; set => _proofOfPossessionNonceRequestBody.ProofOfPossessionNonce = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceResponse + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzSphereCertificateProof_RetrieveViaIdentityExpanded() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CertificatesRetrieveProofOfPossessionNonce' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.CertificatesRetrieveProofOfPossessionNonceViaIdentity(InputObject.Id, _proofOfPossessionNonceRequestBody, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SerialNumber) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SerialNumber"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.CertificatesRetrieveProofOfPossessionNonce(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.CatalogName ?? null, InputObject.SerialNumber ?? null, _proofOfPossessionNonceRequestBody, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceResponse + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCertificate_Get.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCertificate_Get.cs new file mode 100644 index 000000000000..b385ffcf0f6a --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCertificate_Get.cs @@ -0,0 +1,515 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// Get a Certificate + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates/{serialNumber}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSphereCertificate_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificate))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Get a Certificate")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates/{serialNumber}", ApiVersion = "2024-04-01")] + public partial class GetAzSphereCertificate_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _serialNumber; + + /// + /// Serial number of the certificate. Use '.default' to get current active certificate. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Serial number of the certificate. Use '.default' to get current active certificate.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Serial number of the certificate. Use '.default' to get current active certificate.", + SerializedName = @"serialNumber", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SerialNumber { get => this._serialNumber; set => this._serialNumber = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificate + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzSphereCertificate_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CertificatesGet(SubscriptionId, ResourceGroupName, CatalogName, SerialNumber, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,SerialNumber=SerialNumber}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificate + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificate + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCertificate_GetViaIdentity.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCertificate_GetViaIdentity.cs new file mode 100644 index 000000000000..1d73fc12c9ea --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCertificate_GetViaIdentity.cs @@ -0,0 +1,481 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// Get a Certificate + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates/{serialNumber}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSphereCertificate_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificate))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Get a Certificate")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates/{serialNumber}", ApiVersion = "2024-04-01")] + public partial class GetAzSphereCertificate_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificate + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzSphereCertificate_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.CertificatesGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SerialNumber) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SerialNumber"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.CertificatesGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.CatalogName ?? null, InputObject.SerialNumber ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificate + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificate + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCertificate_GetViaIdentityCatalog.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCertificate_GetViaIdentityCatalog.cs new file mode 100644 index 000000000000..36a9411f1cf4 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCertificate_GetViaIdentityCatalog.cs @@ -0,0 +1,494 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// Get a Certificate + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates/{serialNumber}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSphereCertificate_GetViaIdentityCatalog")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificate))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Get a Certificate")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates/{serialNumber}", ApiVersion = "2024-04-01")] + public partial class GetAzSphereCertificate_GetViaIdentityCatalog : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _catalogInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity CatalogInputObject { get => this._catalogInputObject; set => this._catalogInputObject = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _serialNumber; + + /// + /// Serial number of the certificate. Use '.default' to get current active certificate. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Serial number of the certificate. Use '.default' to get current active certificate.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Serial number of the certificate. Use '.default' to get current active certificate.", + SerializedName = @"serialNumber", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SerialNumber { get => this._serialNumber; set => this._serialNumber = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificate + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzSphereCertificate_GetViaIdentityCatalog() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (CatalogInputObject?.Id != null) + { + this.CatalogInputObject.Id += $"/certificates/{(global::System.Uri.EscapeDataString(this.SerialNumber.ToString()))}"; + await this.Client.CertificatesGetViaIdentity(CatalogInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == CatalogInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + if (null == CatalogInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + if (null == CatalogInputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + await this.Client.CertificatesGet(CatalogInputObject.SubscriptionId ?? null, CatalogInputObject.ResourceGroupName ?? null, CatalogInputObject.CatalogName ?? null, SerialNumber, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SerialNumber=SerialNumber}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificate + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificate + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCertificate_List.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCertificate_List.cs new file mode 100644 index 000000000000..b8d8e934ef20 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereCertificate_List.cs @@ -0,0 +1,582 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// List Certificate resources by Catalog + /// + /// [OpenAPI] ListByCatalog=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSphereCertificate_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificate))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"List Certificate resources by Catalog")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates", ApiVersion = "2024-04-01")] + public partial class GetAzSphereCertificate_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// Backing field for property. + private string _filter; + + /// Filter the result list using the given expression + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Filter the result list using the given expression")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Filter the result list using the given expression", + SerializedName = @"$filter", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Query)] + public string Filter { get => this._filter; set => this._filter = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private int _maxpagesize; + + /// The maximum number of result items per page. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The maximum number of result items per page.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum number of result items per page.", + SerializedName = @"$maxpagesize", + PossibleTypes = new [] { typeof(int) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Query)] + public int Maxpagesize { get => this._maxpagesize; set => this._maxpagesize = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private int _skip; + + /// The number of result items to skip. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of result items to skip.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of result items to skip.", + SerializedName = @"$skip", + PossibleTypes = new [] { typeof(int) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Query)] + public int Skip { get => this._skip; set => this._skip = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Backing field for property. + private int _top; + + /// The number of result items to return. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of result items to return.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of result items to return.", + SerializedName = @"$top", + PossibleTypes = new [] { typeof(int) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Query)] + public int Top { get => this._top; set => this._top = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzSphereCertificate_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CertificatesListByCatalog(SubscriptionId, ResourceGroupName, CatalogName, this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?), this.InvocationInformation.BoundParameters.ContainsKey("Maxpagesize") ? Maxpagesize : default(int?), this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null, this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?), onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,Skip=this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?),Maxpagesize=this.InvocationInformation.BoundParameters.ContainsKey("Maxpagesize") ? Maxpagesize : default(int?),Filter=this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null,Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?)}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateListResult + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CertificatesListByCatalog_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDeployment_Get.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDeployment_Get.cs new file mode 100644 index 000000000000..925d86bd78d2 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDeployment_Get.cs @@ -0,0 +1,547 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Get a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group + /// name. + /// + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments/{deploymentName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSphereDeployment_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Get a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments/{deploymentName}", ApiVersion = "2024-04-01")] + public partial class GetAzSphereDeployment_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _deviceGroupName; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string DeviceGroupName { get => this._deviceGroupName; set => this._deviceGroupName = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// + /// Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group.", + SerializedName = @"deploymentName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeploymentName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzSphereDeployment_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DeploymentsGet(SubscriptionId, ResourceGroupName, CatalogName, ProductName, DeviceGroupName, Name, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,ProductName=ProductName,DeviceGroupName=DeviceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDeployment_GetViaIdentity.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDeployment_GetViaIdentity.cs new file mode 100644 index 000000000000..a2cd2db8bcbd --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDeployment_GetViaIdentity.cs @@ -0,0 +1,492 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Get a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group + /// name. + /// + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments/{deploymentName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSphereDeployment_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Get a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments/{deploymentName}", ApiVersion = "2024-04-01")] + public partial class GetAzSphereDeployment_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzSphereDeployment_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.DeploymentsGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProductName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProductName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.DeviceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.DeviceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.DeploymentName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.DeploymentName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.DeploymentsGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.CatalogName ?? null, InputObject.ProductName ?? null, InputObject.DeviceGroupName ?? null, InputObject.DeploymentName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDeployment_GetViaIdentityCatalog.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDeployment_GetViaIdentityCatalog.cs new file mode 100644 index 000000000000..24176cfe1d64 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDeployment_GetViaIdentityCatalog.cs @@ -0,0 +1,526 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Get a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group + /// name. + /// + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments/{deploymentName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSphereDeployment_GetViaIdentityCatalog")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Get a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments/{deploymentName}", ApiVersion = "2024-04-01")] + public partial class GetAzSphereDeployment_GetViaIdentityCatalog : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _catalogInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity CatalogInputObject { get => this._catalogInputObject; set => this._catalogInputObject = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _deviceGroupName; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string DeviceGroupName { get => this._deviceGroupName; set => this._deviceGroupName = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// + /// Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group.", + SerializedName = @"deploymentName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeploymentName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzSphereDeployment_GetViaIdentityCatalog() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (CatalogInputObject?.Id != null) + { + this.CatalogInputObject.Id += $"/products/{(global::System.Uri.EscapeDataString(this.ProductName.ToString()))}/deviceGroups/{(global::System.Uri.EscapeDataString(this.DeviceGroupName.ToString()))}/deployments/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.DeploymentsGetViaIdentity(CatalogInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == CatalogInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + if (null == CatalogInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + if (null == CatalogInputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + await this.Client.DeploymentsGet(CatalogInputObject.SubscriptionId ?? null, CatalogInputObject.ResourceGroupName ?? null, CatalogInputObject.CatalogName ?? null, ProductName, DeviceGroupName, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ProductName=ProductName,DeviceGroupName=DeviceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDeployment_GetViaIdentityDeviceGroup.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDeployment_GetViaIdentityDeviceGroup.cs new file mode 100644 index 000000000000..17d469f1e8d4 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDeployment_GetViaIdentityDeviceGroup.cs @@ -0,0 +1,506 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Get a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group + /// name. + /// + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments/{deploymentName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSphereDeployment_GetViaIdentityDeviceGroup")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Get a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments/{deploymentName}", ApiVersion = "2024-04-01")] + public partial class GetAzSphereDeployment_GetViaIdentityDeviceGroup : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _deviceGroupInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity DeviceGroupInputObject { get => this._deviceGroupInputObject; set => this._deviceGroupInputObject = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// + /// Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group.", + SerializedName = @"deploymentName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeploymentName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzSphereDeployment_GetViaIdentityDeviceGroup() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (DeviceGroupInputObject?.Id != null) + { + this.DeviceGroupInputObject.Id += $"/deployments/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.DeploymentsGetViaIdentity(DeviceGroupInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == DeviceGroupInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("DeviceGroupInputObject has null value for DeviceGroupInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, DeviceGroupInputObject) ); + } + if (null == DeviceGroupInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("DeviceGroupInputObject has null value for DeviceGroupInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, DeviceGroupInputObject) ); + } + if (null == DeviceGroupInputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("DeviceGroupInputObject has null value for DeviceGroupInputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, DeviceGroupInputObject) ); + } + if (null == DeviceGroupInputObject.ProductName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("DeviceGroupInputObject has null value for DeviceGroupInputObject.ProductName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, DeviceGroupInputObject) ); + } + if (null == DeviceGroupInputObject.DeviceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("DeviceGroupInputObject has null value for DeviceGroupInputObject.DeviceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, DeviceGroupInputObject) ); + } + await this.Client.DeploymentsGet(DeviceGroupInputObject.SubscriptionId ?? null, DeviceGroupInputObject.ResourceGroupName ?? null, DeviceGroupInputObject.CatalogName ?? null, DeviceGroupInputObject.ProductName ?? null, DeviceGroupInputObject.DeviceGroupName ?? null, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDeployment_GetViaIdentityProduct.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDeployment_GetViaIdentityProduct.cs new file mode 100644 index 000000000000..16bdf237e555 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDeployment_GetViaIdentityProduct.cs @@ -0,0 +1,516 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Get a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group + /// name. + /// + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments/{deploymentName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSphereDeployment_GetViaIdentityProduct")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Get a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments/{deploymentName}", ApiVersion = "2024-04-01")] + public partial class GetAzSphereDeployment_GetViaIdentityProduct : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _deviceGroupName; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string DeviceGroupName { get => this._deviceGroupName; set => this._deviceGroupName = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// + /// Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group.", + SerializedName = @"deploymentName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeploymentName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _productInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity ProductInputObject { get => this._productInputObject; set => this._productInputObject = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzSphereDeployment_GetViaIdentityProduct() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (ProductInputObject?.Id != null) + { + this.ProductInputObject.Id += $"/deviceGroups/{(global::System.Uri.EscapeDataString(this.DeviceGroupName.ToString()))}/deployments/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.DeploymentsGetViaIdentity(ProductInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == ProductInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProductInputObject has null value for ProductInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProductInputObject) ); + } + if (null == ProductInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProductInputObject has null value for ProductInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProductInputObject) ); + } + if (null == ProductInputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProductInputObject has null value for ProductInputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProductInputObject) ); + } + if (null == ProductInputObject.ProductName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProductInputObject has null value for ProductInputObject.ProductName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProductInputObject) ); + } + await this.Client.DeploymentsGet(ProductInputObject.SubscriptionId ?? null, ProductInputObject.ResourceGroupName ?? null, ProductInputObject.CatalogName ?? null, ProductInputObject.ProductName ?? null, DeviceGroupName, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { DeviceGroupName=DeviceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDeployment_List.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDeployment_List.cs new file mode 100644 index 000000000000..df7a17c04490 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDeployment_List.cs @@ -0,0 +1,613 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// List Deployment resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for + /// product or device group name. + /// + /// + /// [OpenAPI] ListByDeviceGroup=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSphereDeployment_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"List Deployment resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments", ApiVersion = "2024-04-01")] + public partial class GetAzSphereDeployment_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _deviceGroupName; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string DeviceGroupName { get => this._deviceGroupName; set => this._deviceGroupName = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// Backing field for property. + private string _filter; + + /// Filter the result list using the given expression + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Filter the result list using the given expression")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Filter the result list using the given expression", + SerializedName = @"$filter", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Query)] + public string Filter { get => this._filter; set => this._filter = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private int _maxpagesize; + + /// The maximum number of result items per page. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The maximum number of result items per page.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum number of result items per page.", + SerializedName = @"$maxpagesize", + PossibleTypes = new [] { typeof(int) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Query)] + public int Maxpagesize { get => this._maxpagesize; set => this._maxpagesize = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private int _skip; + + /// The number of result items to skip. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of result items to skip.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of result items to skip.", + SerializedName = @"$skip", + PossibleTypes = new [] { typeof(int) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Query)] + public int Skip { get => this._skip; set => this._skip = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Backing field for property. + private int _top; + + /// The number of result items to return. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of result items to return.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of result items to return.", + SerializedName = @"$top", + PossibleTypes = new [] { typeof(int) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Query)] + public int Top { get => this._top; set => this._top = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzSphereDeployment_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DeploymentsListByDeviceGroup(SubscriptionId, ResourceGroupName, CatalogName, ProductName, DeviceGroupName, this.InvocationInformation.BoundParameters.ContainsKey("Maxpagesize") ? Maxpagesize : default(int?), this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null, this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?), this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?), onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,ProductName=ProductName,Maxpagesize=this.InvocationInformation.BoundParameters.ContainsKey("Maxpagesize") ? Maxpagesize : default(int?),Filter=this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null,Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?),Skip=this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?),DeviceGroupName=DeviceGroupName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeploymentListResult + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DeploymentsListByDeviceGroup_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDeviceGroup_Get.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDeviceGroup_Get.cs new file mode 100644 index 000000000000..cca616b2cd6c --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDeviceGroup_Get.cs @@ -0,0 +1,531 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Get a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group + /// name. + /// + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSphereDeviceGroup_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Get a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}", ApiVersion = "2024-04-01")] + public partial class GetAzSphereDeviceGroup_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzSphereDeviceGroup_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DeviceGroupsGet(SubscriptionId, ResourceGroupName, CatalogName, ProductName, Name, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,ProductName=ProductName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDeviceGroup_GetViaIdentity.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDeviceGroup_GetViaIdentity.cs new file mode 100644 index 000000000000..477440243dd9 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDeviceGroup_GetViaIdentity.cs @@ -0,0 +1,488 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Get a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group + /// name. + /// + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSphereDeviceGroup_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Get a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}", ApiVersion = "2024-04-01")] + public partial class GetAzSphereDeviceGroup_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzSphereDeviceGroup_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.DeviceGroupsGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProductName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProductName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.DeviceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.DeviceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.DeviceGroupsGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.CatalogName ?? null, InputObject.ProductName ?? null, InputObject.DeviceGroupName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDeviceGroup_GetViaIdentityCatalog.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDeviceGroup_GetViaIdentityCatalog.cs new file mode 100644 index 000000000000..cca424ccbeff --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDeviceGroup_GetViaIdentityCatalog.cs @@ -0,0 +1,510 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Get a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group + /// name. + /// + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSphereDeviceGroup_GetViaIdentityCatalog")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Get a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}", ApiVersion = "2024-04-01")] + public partial class GetAzSphereDeviceGroup_GetViaIdentityCatalog : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _catalogInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity CatalogInputObject { get => this._catalogInputObject; set => this._catalogInputObject = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzSphereDeviceGroup_GetViaIdentityCatalog() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (CatalogInputObject?.Id != null) + { + this.CatalogInputObject.Id += $"/products/{(global::System.Uri.EscapeDataString(this.ProductName.ToString()))}/deviceGroups/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.DeviceGroupsGetViaIdentity(CatalogInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == CatalogInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + if (null == CatalogInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + if (null == CatalogInputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + await this.Client.DeviceGroupsGet(CatalogInputObject.SubscriptionId ?? null, CatalogInputObject.ResourceGroupName ?? null, CatalogInputObject.CatalogName ?? null, ProductName, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ProductName=ProductName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDeviceGroup_GetViaIdentityProduct.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDeviceGroup_GetViaIdentityProduct.cs new file mode 100644 index 000000000000..cdaa0f5cfa5e --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDeviceGroup_GetViaIdentityProduct.cs @@ -0,0 +1,500 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Get a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group + /// name. + /// + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSphereDeviceGroup_GetViaIdentityProduct")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Get a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}", ApiVersion = "2024-04-01")] + public partial class GetAzSphereDeviceGroup_GetViaIdentityProduct : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _productInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity ProductInputObject { get => this._productInputObject; set => this._productInputObject = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzSphereDeviceGroup_GetViaIdentityProduct() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (ProductInputObject?.Id != null) + { + this.ProductInputObject.Id += $"/deviceGroups/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.DeviceGroupsGetViaIdentity(ProductInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == ProductInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProductInputObject has null value for ProductInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProductInputObject) ); + } + if (null == ProductInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProductInputObject has null value for ProductInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProductInputObject) ); + } + if (null == ProductInputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProductInputObject has null value for ProductInputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProductInputObject) ); + } + if (null == ProductInputObject.ProductName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProductInputObject has null value for ProductInputObject.ProductName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProductInputObject) ); + } + await this.Client.DeviceGroupsGet(ProductInputObject.SubscriptionId ?? null, ProductInputObject.ResourceGroupName ?? null, ProductInputObject.CatalogName ?? null, ProductInputObject.ProductName ?? null, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDeviceGroup_List.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDeviceGroup_List.cs new file mode 100644 index 000000000000..a18aa7821553 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDeviceGroup_List.cs @@ -0,0 +1,599 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// List DeviceGroup resources by Product. '.default' and '.unassigned' are system defined values and cannot be used for product + /// name. + /// + /// + /// [OpenAPI] ListByProduct=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSphereDeviceGroup_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"List DeviceGroup resources by Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups", ApiVersion = "2024-04-01")] + public partial class GetAzSphereDeviceGroup_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// Backing field for property. + private string _filter; + + /// Filter the result list using the given expression + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Filter the result list using the given expression")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Filter the result list using the given expression", + SerializedName = @"$filter", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Query)] + public string Filter { get => this._filter; set => this._filter = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private int _maxpagesize; + + /// The maximum number of result items per page. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The maximum number of result items per page.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum number of result items per page.", + SerializedName = @"$maxpagesize", + PossibleTypes = new [] { typeof(int) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Query)] + public int Maxpagesize { get => this._maxpagesize; set => this._maxpagesize = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private int _skip; + + /// The number of result items to skip. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of result items to skip.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of result items to skip.", + SerializedName = @"$skip", + PossibleTypes = new [] { typeof(int) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Query)] + public int Skip { get => this._skip; set => this._skip = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Backing field for property. + private int _top; + + /// The number of result items to return. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of result items to return.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of result items to return.", + SerializedName = @"$top", + PossibleTypes = new [] { typeof(int) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Query)] + public int Top { get => this._top; set => this._top = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzSphereDeviceGroup_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DeviceGroupsListByProduct(SubscriptionId, ResourceGroupName, CatalogName, ProductName, this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?), this.InvocationInformation.BoundParameters.ContainsKey("Maxpagesize") ? Maxpagesize : default(int?), this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null, this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?), onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,Skip=this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?),Maxpagesize=this.InvocationInformation.BoundParameters.ContainsKey("Maxpagesize") ? Maxpagesize : default(int?),Filter=this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null,Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?),ProductName=ProductName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupListResult + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DeviceGroupsListByProduct_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDevice_Get.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDevice_Get.cs new file mode 100644 index 000000000000..0a2fa9d1485d --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDevice_Get.cs @@ -0,0 +1,546 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Get a Device. Use '.unassigned' or '.default' for the device group and product names when a device does not belong to + /// a device group and product. + /// + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSphereDevice_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Get a Device. Use '.unassigned' or '.default' for the device group and product names when a device does not belong to a device group and product.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}", ApiVersion = "2024-04-01")] + public partial class GetAzSphereDevice_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// Backing field for property. + private string _groupName; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string GroupName { get => this._groupName; set => this._groupName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Device name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Device name")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Device name", + SerializedName = @"deviceName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzSphereDevice_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevicesGet(SubscriptionId, ResourceGroupName, CatalogName, ProductName, GroupName, Name, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,ProductName=ProductName,GroupName=GroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDevice_GetViaIdentity.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDevice_GetViaIdentity.cs new file mode 100644 index 000000000000..e7f4efbd2965 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDevice_GetViaIdentity.cs @@ -0,0 +1,492 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Get a Device. Use '.unassigned' or '.default' for the device group and product names when a device does not belong to + /// a device group and product. + /// + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSphereDevice_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Get a Device. Use '.unassigned' or '.default' for the device group and product names when a device does not belong to a device group and product.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}", ApiVersion = "2024-04-01")] + public partial class GetAzSphereDevice_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzSphereDevice_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.DevicesGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProductName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProductName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.DeviceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.DeviceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.DeviceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.DeviceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.DevicesGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.CatalogName ?? null, InputObject.ProductName ?? null, InputObject.DeviceGroupName ?? null, InputObject.DeviceName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDevice_GetViaIdentityCatalog.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDevice_GetViaIdentityCatalog.cs new file mode 100644 index 000000000000..c489dc1f30d1 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDevice_GetViaIdentityCatalog.cs @@ -0,0 +1,525 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Get a Device. Use '.unassigned' or '.default' for the device group and product names when a device does not belong to + /// a device group and product. + /// + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSphereDevice_GetViaIdentityCatalog")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Get a Device. Use '.unassigned' or '.default' for the device group and product names when a device does not belong to a device group and product.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}", ApiVersion = "2024-04-01")] + public partial class GetAzSphereDevice_GetViaIdentityCatalog : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _catalogInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity CatalogInputObject { get => this._catalogInputObject; set => this._catalogInputObject = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// Backing field for property. + private string _groupName; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string GroupName { get => this._groupName; set => this._groupName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Device name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Device name")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Device name", + SerializedName = @"deviceName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzSphereDevice_GetViaIdentityCatalog() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (CatalogInputObject?.Id != null) + { + this.CatalogInputObject.Id += $"/products/{(global::System.Uri.EscapeDataString(this.ProductName.ToString()))}/deviceGroups/{(global::System.Uri.EscapeDataString(this.GroupName.ToString()))}/devices/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.DevicesGetViaIdentity(CatalogInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == CatalogInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + if (null == CatalogInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + if (null == CatalogInputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + await this.Client.DevicesGet(CatalogInputObject.SubscriptionId ?? null, CatalogInputObject.ResourceGroupName ?? null, CatalogInputObject.CatalogName ?? null, ProductName, GroupName, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ProductName=ProductName,GroupName=GroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDevice_GetViaIdentityDeviceGroup.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDevice_GetViaIdentityDeviceGroup.cs new file mode 100644 index 000000000000..27960f52748e --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDevice_GetViaIdentityDeviceGroup.cs @@ -0,0 +1,504 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Get a Device. Use '.unassigned' or '.default' for the device group and product names when a device does not belong to + /// a device group and product. + /// + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSphereDevice_GetViaIdentityDeviceGroup")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Get a Device. Use '.unassigned' or '.default' for the device group and product names when a device does not belong to a device group and product.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}", ApiVersion = "2024-04-01")] + public partial class GetAzSphereDevice_GetViaIdentityDeviceGroup : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _deviceGroupInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity DeviceGroupInputObject { get => this._deviceGroupInputObject; set => this._deviceGroupInputObject = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Device name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Device name")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Device name", + SerializedName = @"deviceName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzSphereDevice_GetViaIdentityDeviceGroup() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (DeviceGroupInputObject?.Id != null) + { + this.DeviceGroupInputObject.Id += $"/devices/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.DevicesGetViaIdentity(DeviceGroupInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == DeviceGroupInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("DeviceGroupInputObject has null value for DeviceGroupInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, DeviceGroupInputObject) ); + } + if (null == DeviceGroupInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("DeviceGroupInputObject has null value for DeviceGroupInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, DeviceGroupInputObject) ); + } + if (null == DeviceGroupInputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("DeviceGroupInputObject has null value for DeviceGroupInputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, DeviceGroupInputObject) ); + } + if (null == DeviceGroupInputObject.ProductName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("DeviceGroupInputObject has null value for DeviceGroupInputObject.ProductName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, DeviceGroupInputObject) ); + } + if (null == DeviceGroupInputObject.DeviceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("DeviceGroupInputObject has null value for DeviceGroupInputObject.DeviceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, DeviceGroupInputObject) ); + } + await this.Client.DevicesGet(DeviceGroupInputObject.SubscriptionId ?? null, DeviceGroupInputObject.ResourceGroupName ?? null, DeviceGroupInputObject.CatalogName ?? null, DeviceGroupInputObject.ProductName ?? null, DeviceGroupInputObject.DeviceGroupName ?? null, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDevice_GetViaIdentityProduct.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDevice_GetViaIdentityProduct.cs new file mode 100644 index 000000000000..04935226399b --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDevice_GetViaIdentityProduct.cs @@ -0,0 +1,515 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Get a Device. Use '.unassigned' or '.default' for the device group and product names when a device does not belong to + /// a device group and product. + /// + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSphereDevice_GetViaIdentityProduct")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Get a Device. Use '.unassigned' or '.default' for the device group and product names when a device does not belong to a device group and product.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}", ApiVersion = "2024-04-01")] + public partial class GetAzSphereDevice_GetViaIdentityProduct : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// Backing field for property. + private string _groupName; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string GroupName { get => this._groupName; set => this._groupName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Device name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Device name")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Device name", + SerializedName = @"deviceName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _productInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity ProductInputObject { get => this._productInputObject; set => this._productInputObject = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzSphereDevice_GetViaIdentityProduct() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (ProductInputObject?.Id != null) + { + this.ProductInputObject.Id += $"/deviceGroups/{(global::System.Uri.EscapeDataString(this.GroupName.ToString()))}/devices/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.DevicesGetViaIdentity(ProductInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == ProductInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProductInputObject has null value for ProductInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProductInputObject) ); + } + if (null == ProductInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProductInputObject has null value for ProductInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProductInputObject) ); + } + if (null == ProductInputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProductInputObject has null value for ProductInputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProductInputObject) ); + } + if (null == ProductInputObject.ProductName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProductInputObject has null value for ProductInputObject.ProductName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProductInputObject) ); + } + await this.Client.DevicesGet(ProductInputObject.SubscriptionId ?? null, ProductInputObject.ResourceGroupName ?? null, ProductInputObject.CatalogName ?? null, ProductInputObject.ProductName ?? null, GroupName, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { GroupName=GroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDevice_List.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDevice_List.cs new file mode 100644 index 000000000000..b734fbbd03a5 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereDevice_List.cs @@ -0,0 +1,558 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// List Device resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product + /// or device group name. + /// + /// + /// [OpenAPI] ListByDeviceGroup=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSphereDevice_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"List Device resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices", ApiVersion = "2024-04-01")] + public partial class GetAzSphereDevice_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// Backing field for property. + private string _groupName; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string GroupName { get => this._groupName; set => this._groupName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzSphereDevice_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevicesListByDeviceGroup(SubscriptionId, ResourceGroupName, CatalogName, ProductName, GroupName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,ProductName=ProductName,GroupName=GroupName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceListResult + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevicesListByDeviceGroup_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereImage_Get.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereImage_Get.cs new file mode 100644 index 000000000000..30fa23dcef2d --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereImage_Get.cs @@ -0,0 +1,514 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// Get a Image + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images/{imageName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSphereImage_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Get a Image")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images/{imageName}", ApiVersion = "2024-04-01")] + public partial class GetAzSphereImage_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Image name. Use an image GUID for GA versions of the API. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Image name. Use an image GUID for GA versions of the API.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Image name. Use an image GUID for GA versions of the API.", + SerializedName = @"imageName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ImageName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzSphereImage_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ImagesGet(SubscriptionId, ResourceGroupName, CatalogName, Name, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereImage_GetViaIdentity.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereImage_GetViaIdentity.cs new file mode 100644 index 000000000000..5e1a5e396134 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereImage_GetViaIdentity.cs @@ -0,0 +1,481 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// Get a Image + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images/{imageName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSphereImage_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Get a Image")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images/{imageName}", ApiVersion = "2024-04-01")] + public partial class GetAzSphereImage_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzSphereImage_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.ImagesGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ImageName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ImageName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.ImagesGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.CatalogName ?? null, InputObject.ImageName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereImage_GetViaIdentityCatalog.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereImage_GetViaIdentityCatalog.cs new file mode 100644 index 000000000000..173e60900a2c --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereImage_GetViaIdentityCatalog.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// Get a Image + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images/{imageName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSphereImage_GetViaIdentityCatalog")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Get a Image")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images/{imageName}", ApiVersion = "2024-04-01")] + public partial class GetAzSphereImage_GetViaIdentityCatalog : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _catalogInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity CatalogInputObject { get => this._catalogInputObject; set => this._catalogInputObject = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Image name. Use an image GUID for GA versions of the API. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Image name. Use an image GUID for GA versions of the API.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Image name. Use an image GUID for GA versions of the API.", + SerializedName = @"imageName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ImageName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzSphereImage_GetViaIdentityCatalog() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (CatalogInputObject?.Id != null) + { + this.CatalogInputObject.Id += $"/images/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.ImagesGetViaIdentity(CatalogInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == CatalogInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + if (null == CatalogInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + if (null == CatalogInputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + await this.Client.ImagesGet(CatalogInputObject.SubscriptionId ?? null, CatalogInputObject.ResourceGroupName ?? null, CatalogInputObject.CatalogName ?? null, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereImage_List.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereImage_List.cs new file mode 100644 index 000000000000..a143e98ee885 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereImage_List.cs @@ -0,0 +1,582 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// List Image resources by Catalog + /// + /// [OpenAPI] ListByCatalog=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSphereImage_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"List Image resources by Catalog")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images", ApiVersion = "2024-04-01")] + public partial class GetAzSphereImage_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// Backing field for property. + private string _filter; + + /// Filter the result list using the given expression + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Filter the result list using the given expression")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Filter the result list using the given expression", + SerializedName = @"$filter", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Query)] + public string Filter { get => this._filter; set => this._filter = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private int _maxpagesize; + + /// The maximum number of result items per page. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The maximum number of result items per page.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum number of result items per page.", + SerializedName = @"$maxpagesize", + PossibleTypes = new [] { typeof(int) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Query)] + public int Maxpagesize { get => this._maxpagesize; set => this._maxpagesize = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private int _skip; + + /// The number of result items to skip. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of result items to skip.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of result items to skip.", + SerializedName = @"$skip", + PossibleTypes = new [] { typeof(int) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Query)] + public int Skip { get => this._skip; set => this._skip = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Backing field for property. + private int _top; + + /// The number of result items to return. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of result items to return.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of result items to return.", + SerializedName = @"$top", + PossibleTypes = new [] { typeof(int) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Query)] + public int Top { get => this._top; set => this._top = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzSphereImage_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ImagesListByCatalog(SubscriptionId, ResourceGroupName, CatalogName, this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?), this.InvocationInformation.BoundParameters.ContainsKey("Maxpagesize") ? Maxpagesize : default(int?), this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null, this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?), onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,Skip=this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?),Maxpagesize=this.InvocationInformation.BoundParameters.ContainsKey("Maxpagesize") ? Maxpagesize : default(int?),Filter=this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null,Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?)}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImageListResult + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ImagesListByCatalog_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereOperation_List.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereOperation_List.cs new file mode 100644 index 000000000000..f9a62081a4ea --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereOperation_List.cs @@ -0,0 +1,477 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// List the operations for the provider + /// + /// [OpenAPI] List=>GET:"/providers/Microsoft.AzureSphere/operations" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSphereOperation_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperation))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"List the operations for the provider")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/providers/Microsoft.AzureSphere/operations", ApiVersion = "2024-04-01")] + public partial class GetAzSphereOperation_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzSphereOperation_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.OperationsList(onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperationListResult + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.OperationsList_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereProduct_Get.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereProduct_Get.cs new file mode 100644 index 000000000000..d7582c74023c --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereProduct_Get.cs @@ -0,0 +1,516 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Get a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. + /// + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSphereProduct_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Get a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}", ApiVersion = "2024-04-01")] + public partial class GetAzSphereProduct_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ProductName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzSphereProduct_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProductsGet(SubscriptionId, ResourceGroupName, CatalogName, Name, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereProduct_GetViaIdentity.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereProduct_GetViaIdentity.cs new file mode 100644 index 000000000000..3b3b3e47cf8d --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereProduct_GetViaIdentity.cs @@ -0,0 +1,483 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Get a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. + /// + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSphereProduct_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Get a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}", ApiVersion = "2024-04-01")] + public partial class GetAzSphereProduct_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzSphereProduct_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.ProductsGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProductName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProductName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.ProductsGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.CatalogName ?? null, InputObject.ProductName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereProduct_GetViaIdentityCatalog.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereProduct_GetViaIdentityCatalog.cs new file mode 100644 index 000000000000..f4378b924f27 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereProduct_GetViaIdentityCatalog.cs @@ -0,0 +1,495 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Get a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. + /// + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSphereProduct_GetViaIdentityCatalog")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Get a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}", ApiVersion = "2024-04-01")] + public partial class GetAzSphereProduct_GetViaIdentityCatalog : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _catalogInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity CatalogInputObject { get => this._catalogInputObject; set => this._catalogInputObject = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ProductName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzSphereProduct_GetViaIdentityCatalog() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (CatalogInputObject?.Id != null) + { + this.CatalogInputObject.Id += $"/products/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.ProductsGetViaIdentity(CatalogInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == CatalogInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + if (null == CatalogInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + if (null == CatalogInputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + await this.Client.ProductsGet(CatalogInputObject.SubscriptionId ?? null, CatalogInputObject.ResourceGroupName ?? null, CatalogInputObject.CatalogName ?? null, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereProduct_List.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereProduct_List.cs new file mode 100644 index 000000000000..a27c4cdb76ce --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/GetAzSphereProduct_List.cs @@ -0,0 +1,526 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// List Product resources by Catalog + /// + /// [OpenAPI] ListByCatalog=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSphereProduct_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"List Product resources by Catalog")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products", ApiVersion = "2024-04-01")] + public partial class GetAzSphereProduct_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzSphereProduct_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProductsListByCatalog(SubscriptionId, ResourceGroupName, CatalogName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductListResult + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProductsListByCatalog_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/InvokeAzSphereCountCatalogDevice_CountDevice.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/InvokeAzSphereCountCatalogDevice_CountDevice.cs new file mode 100644 index 000000000000..95baaedb7453 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/InvokeAzSphereCountCatalogDevice_CountDevice.cs @@ -0,0 +1,499 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// Counts devices in catalog. + /// + /// [OpenAPI] CountDevices=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/countDevices" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSphereCountCatalogDevice_CountDevice", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Counts devices in catalog.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/countDevices", ApiVersion = "2024-04-01")] + public partial class InvokeAzSphereCountCatalogDevice_CountDevice : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public InvokeAzSphereCountCatalogDevice_CountDevice() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CatalogsCountDevices' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CatalogsCountDevices(SubscriptionId, ResourceGroupName, CatalogName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/InvokeAzSphereCountCatalogDevice_CountDeviceViaIdentity.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/InvokeAzSphereCountCatalogDevice_CountDeviceViaIdentity.cs new file mode 100644 index 000000000000..c4b7b4d16723 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/InvokeAzSphereCountCatalogDevice_CountDeviceViaIdentity.cs @@ -0,0 +1,480 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// Counts devices in catalog. + /// + /// [OpenAPI] CountDevices=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/countDevices" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSphereCountCatalogDevice_CountDeviceViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Counts devices in catalog.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/countDevices", ApiVersion = "2024-04-01")] + public partial class InvokeAzSphereCountCatalogDevice_CountDeviceViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public InvokeAzSphereCountCatalogDevice_CountDeviceViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CatalogsCountDevices' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.CatalogsCountDevicesViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.CatalogsCountDevices(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.CatalogName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/InvokeAzSphereCountDeviceGroupDevice_CountDevice.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/InvokeAzSphereCountDeviceGroupDevice_CountDevice.cs new file mode 100644 index 000000000000..6e073b2e8c34 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/InvokeAzSphereCountDeviceGroupDevice_CountDevice.cs @@ -0,0 +1,530 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Counts devices in device group. '.default' and '.unassigned' are system defined values and cannot be used for product + /// or device group name. + /// + /// + /// [OpenAPI] CountDevices=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/countDevices" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSphereCountDeviceGroupDevice_CountDevice", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Counts devices in device group. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/countDevices", ApiVersion = "2024-04-01")] + public partial class InvokeAzSphereCountDeviceGroupDevice_CountDevice : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _deviceGroupName; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string DeviceGroupName { get => this._deviceGroupName; set => this._deviceGroupName = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public InvokeAzSphereCountDeviceGroupDevice_CountDevice() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DeviceGroupsCountDevices' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DeviceGroupsCountDevices(SubscriptionId, ResourceGroupName, CatalogName, ProductName, DeviceGroupName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,ProductName=ProductName,DeviceGroupName=DeviceGroupName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/InvokeAzSphereCountDeviceGroupDevice_CountDeviceViaIdentity.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/InvokeAzSphereCountDeviceGroupDevice_CountDeviceViaIdentity.cs new file mode 100644 index 000000000000..dc8c75c66ba6 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/InvokeAzSphereCountDeviceGroupDevice_CountDeviceViaIdentity.cs @@ -0,0 +1,491 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Counts devices in device group. '.default' and '.unassigned' are system defined values and cannot be used for product + /// or device group name. + /// + /// + /// [OpenAPI] CountDevices=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/countDevices" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSphereCountDeviceGroupDevice_CountDeviceViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Counts devices in device group. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/countDevices", ApiVersion = "2024-04-01")] + public partial class InvokeAzSphereCountDeviceGroupDevice_CountDeviceViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public InvokeAzSphereCountDeviceGroupDevice_CountDeviceViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DeviceGroupsCountDevices' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.DeviceGroupsCountDevicesViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProductName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProductName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.DeviceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.DeviceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.DeviceGroupsCountDevices(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.CatalogName ?? null, InputObject.ProductName ?? null, InputObject.DeviceGroupName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/InvokeAzSphereCountDeviceGroupDevice_CountDeviceViaIdentityCatalog.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/InvokeAzSphereCountDeviceGroupDevice_CountDeviceViaIdentityCatalog.cs new file mode 100644 index 000000000000..e1c456ea5937 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/InvokeAzSphereCountDeviceGroupDevice_CountDeviceViaIdentityCatalog.cs @@ -0,0 +1,513 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Counts devices in device group. '.default' and '.unassigned' are system defined values and cannot be used for product + /// or device group name. + /// + /// + /// [OpenAPI] CountDevices=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/countDevices" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSphereCountDeviceGroupDevice_CountDeviceViaIdentityCatalog", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Counts devices in device group. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/countDevices", ApiVersion = "2024-04-01")] + public partial class InvokeAzSphereCountDeviceGroupDevice_CountDeviceViaIdentityCatalog : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _catalogInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity CatalogInputObject { get => this._catalogInputObject; set => this._catalogInputObject = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _deviceGroupName; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string DeviceGroupName { get => this._deviceGroupName; set => this._deviceGroupName = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public InvokeAzSphereCountDeviceGroupDevice_CountDeviceViaIdentityCatalog() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DeviceGroupsCountDevices' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (CatalogInputObject?.Id != null) + { + this.CatalogInputObject.Id += $"/products/{(global::System.Uri.EscapeDataString(this.ProductName.ToString()))}/deviceGroups/{(global::System.Uri.EscapeDataString(this.DeviceGroupName.ToString()))}"; + await this.Client.DeviceGroupsCountDevicesViaIdentity(CatalogInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == CatalogInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + if (null == CatalogInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + if (null == CatalogInputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + await this.Client.DeviceGroupsCountDevices(CatalogInputObject.SubscriptionId ?? null, CatalogInputObject.ResourceGroupName ?? null, CatalogInputObject.CatalogName ?? null, ProductName, DeviceGroupName, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ProductName=ProductName,DeviceGroupName=DeviceGroupName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/InvokeAzSphereCountDeviceGroupDevice_CountDeviceViaIdentityProduct.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/InvokeAzSphereCountDeviceGroupDevice_CountDeviceViaIdentityProduct.cs new file mode 100644 index 000000000000..470ebc0cfaeb --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/InvokeAzSphereCountDeviceGroupDevice_CountDeviceViaIdentityProduct.cs @@ -0,0 +1,503 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Counts devices in device group. '.default' and '.unassigned' are system defined values and cannot be used for product + /// or device group name. + /// + /// + /// [OpenAPI] CountDevices=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/countDevices" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSphereCountDeviceGroupDevice_CountDeviceViaIdentityProduct", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Counts devices in device group. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/countDevices", ApiVersion = "2024-04-01")] + public partial class InvokeAzSphereCountDeviceGroupDevice_CountDeviceViaIdentityProduct : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _deviceGroupName; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string DeviceGroupName { get => this._deviceGroupName; set => this._deviceGroupName = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _productInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity ProductInputObject { get => this._productInputObject; set => this._productInputObject = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public InvokeAzSphereCountDeviceGroupDevice_CountDeviceViaIdentityProduct() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DeviceGroupsCountDevices' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (ProductInputObject?.Id != null) + { + this.ProductInputObject.Id += $"/deviceGroups/{(global::System.Uri.EscapeDataString(this.DeviceGroupName.ToString()))}"; + await this.Client.DeviceGroupsCountDevicesViaIdentity(ProductInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == ProductInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProductInputObject has null value for ProductInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProductInputObject) ); + } + if (null == ProductInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProductInputObject has null value for ProductInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProductInputObject) ); + } + if (null == ProductInputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProductInputObject has null value for ProductInputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProductInputObject) ); + } + if (null == ProductInputObject.ProductName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProductInputObject has null value for ProductInputObject.ProductName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProductInputObject) ); + } + await this.Client.DeviceGroupsCountDevices(ProductInputObject.SubscriptionId ?? null, ProductInputObject.ResourceGroupName ?? null, ProductInputObject.CatalogName ?? null, ProductInputObject.ProductName ?? null, DeviceGroupName, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { DeviceGroupName=DeviceGroupName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/InvokeAzSphereCountProductDevice_CountDevice.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/InvokeAzSphereCountProductDevice_CountDevice.cs new file mode 100644 index 000000000000..10cb577364ad --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/InvokeAzSphereCountProductDevice_CountDevice.cs @@ -0,0 +1,515 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Counts devices in product. '.default' and '.unassigned' are system defined values and cannot be used for product name. + /// + /// + /// [OpenAPI] CountDevices=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/countDevices" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSphereCountProductDevice_CountDevice", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Counts devices in product. '.default' and '.unassigned' are system defined values and cannot be used for product name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/countDevices", ApiVersion = "2024-04-01")] + public partial class InvokeAzSphereCountProductDevice_CountDevice : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public InvokeAzSphereCountProductDevice_CountDevice() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProductsCountDevices' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProductsCountDevices(SubscriptionId, ResourceGroupName, CatalogName, ProductName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,ProductName=ProductName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/InvokeAzSphereCountProductDevice_CountDeviceViaIdentity.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/InvokeAzSphereCountProductDevice_CountDeviceViaIdentity.cs new file mode 100644 index 000000000000..5f9ce2fbcc7e --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/InvokeAzSphereCountProductDevice_CountDeviceViaIdentity.cs @@ -0,0 +1,486 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Counts devices in product. '.default' and '.unassigned' are system defined values and cannot be used for product name. + /// + /// + /// [OpenAPI] CountDevices=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/countDevices" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSphereCountProductDevice_CountDeviceViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Counts devices in product. '.default' and '.unassigned' are system defined values and cannot be used for product name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/countDevices", ApiVersion = "2024-04-01")] + public partial class InvokeAzSphereCountProductDevice_CountDeviceViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public InvokeAzSphereCountProductDevice_CountDeviceViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProductsCountDevices' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.ProductsCountDevicesViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProductName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProductName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.ProductsCountDevices(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.CatalogName ?? null, InputObject.ProductName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/InvokeAzSphereCountProductDevice_CountDeviceViaIdentityCatalog.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/InvokeAzSphereCountProductDevice_CountDeviceViaIdentityCatalog.cs new file mode 100644 index 000000000000..e94b22b74196 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/InvokeAzSphereCountProductDevice_CountDeviceViaIdentityCatalog.cs @@ -0,0 +1,498 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Counts devices in product. '.default' and '.unassigned' are system defined values and cannot be used for product name. + /// + /// + /// [OpenAPI] CountDevices=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/countDevices" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSphereCountProductDevice_CountDeviceViaIdentityCatalog", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Counts devices in product. '.default' and '.unassigned' are system defined values and cannot be used for product name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/countDevices", ApiVersion = "2024-04-01")] + public partial class InvokeAzSphereCountProductDevice_CountDeviceViaIdentityCatalog : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _catalogInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity CatalogInputObject { get => this._catalogInputObject; set => this._catalogInputObject = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public InvokeAzSphereCountProductDevice_CountDeviceViaIdentityCatalog() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProductsCountDevices' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (CatalogInputObject?.Id != null) + { + this.CatalogInputObject.Id += $"/products/{(global::System.Uri.EscapeDataString(this.ProductName.ToString()))}"; + await this.Client.ProductsCountDevicesViaIdentity(CatalogInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == CatalogInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + if (null == CatalogInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + if (null == CatalogInputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + await this.Client.ProductsCountDevices(CatalogInputObject.SubscriptionId ?? null, CatalogInputObject.ResourceGroupName ?? null, CatalogInputObject.CatalogName ?? null, ProductName, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ProductName=ProductName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereCatalog_CreateExpanded.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereCatalog_CreateExpanded.cs new file mode 100644 index 000000000000..261037638911 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereCatalog_CreateExpanded.cs @@ -0,0 +1,609 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// Create a Catalog + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzSphereCatalog_CreateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Create a Catalog")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}", ApiVersion = "2024-04-01")] + public partial class NewAzSphereCatalog_CreateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// An Azure Sphere catalog + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Catalog(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// The geo-location where the resource lives + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The geo-location where the resource lives")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The geo-location where the resource lives", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + public string Location { get => _resourceBody.Location ?? null; set => _resourceBody.Location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("CatalogName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Resource tags. + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceTags Tag { get => _resourceBody.Tag ?? null /* object */; set => _resourceBody.Tag = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzSphereCatalog_CreateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereCatalog_CreateExpanded Clone() + { + var clone = new NewAzSphereCatalog_CreateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._resourceBody = this._resourceBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzSphereCatalog_CreateExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CatalogsCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CatalogsCreateOrUpdate(SubscriptionId, ResourceGroupName, Name, _resourceBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereCatalog_CreateViaJsonFilePath.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereCatalog_CreateViaJsonFilePath.cs new file mode 100644 index 000000000000..99c5c4da0ceb --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereCatalog_CreateViaJsonFilePath.cs @@ -0,0 +1,599 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// Create a Catalog + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzSphereCatalog_CreateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Create a Catalog")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}", ApiVersion = "2024-04-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.NotSuggestDefaultParameterSet] + public partial class NewAzSphereCatalog_CreateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + public global::System.String _jsonString; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Create operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Create operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Create operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("CatalogName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzSphereCatalog_CreateViaJsonFilePath + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereCatalog_CreateViaJsonFilePath Clone() + { + var clone = new NewAzSphereCatalog_CreateViaJsonFilePath(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + clone.JsonFilePath = this.JsonFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzSphereCatalog_CreateViaJsonFilePath() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CatalogsCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CatalogsCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereCatalog_CreateViaJsonString.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereCatalog_CreateViaJsonString.cs new file mode 100644 index 000000000000..6d064a75c9e0 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereCatalog_CreateViaJsonString.cs @@ -0,0 +1,597 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// Create a Catalog + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzSphereCatalog_CreateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Create a Catalog")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}", ApiVersion = "2024-04-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.NotSuggestDefaultParameterSet] + public partial class NewAzSphereCatalog_CreateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Create operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Create operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Create operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("CatalogName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzSphereCatalog_CreateViaJsonString + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereCatalog_CreateViaJsonString Clone() + { + var clone = new NewAzSphereCatalog_CreateViaJsonString(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + clone.JsonString = this.JsonString; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzSphereCatalog_CreateViaJsonString() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CatalogsCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CatalogsCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeployment_CreateExpanded.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeployment_CreateExpanded.cs new file mode 100644 index 000000000000..aaee4276082e --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeployment_CreateExpanded.cs @@ -0,0 +1,659 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group + /// name. + /// + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments/{deploymentName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzSphereDeployment_CreateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments/{deploymentName}", ApiVersion = "2024-04-01")] + public partial class NewAzSphereDeployment_CreateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// An deployment resource belonging to a device group resource. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Deployment(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Images deployed + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Images deployed")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Images deployed", + SerializedName = @"deployedImages", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage) })] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage[] DeployedImage { get => _resourceBody.DeployedImage?.ToArray() ?? null /* fixedArrayOf */; set => _resourceBody.DeployedImage = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// Deployment ID + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Deployment ID")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Deployment ID", + SerializedName = @"deploymentId", + PossibleTypes = new [] { typeof(string) })] + public string DeploymentId { get => _resourceBody.DeploymentId ?? null; set => _resourceBody.DeploymentId = value; } + + /// Backing field for property. + private string _deviceGroupName; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string DeviceGroupName { get => this._deviceGroupName; set => this._deviceGroupName = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// + /// Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group.", + SerializedName = @"deploymentName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeploymentName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzSphereDeployment_CreateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereDeployment_CreateExpanded Clone() + { + var clone = new NewAzSphereDeployment_CreateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._resourceBody = this._resourceBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.CatalogName = this.CatalogName; + clone.ProductName = this.ProductName; + clone.DeviceGroupName = this.DeviceGroupName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzSphereDeployment_CreateExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DeploymentsCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DeploymentsCreateOrUpdate(SubscriptionId, ResourceGroupName, CatalogName, ProductName, DeviceGroupName, Name, _resourceBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,ProductName=ProductName,DeviceGroupName=DeviceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeployment_CreateViaJsonFilePath.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeployment_CreateViaJsonFilePath.cs new file mode 100644 index 000000000000..c7114e8cdc46 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeployment_CreateViaJsonFilePath.cs @@ -0,0 +1,649 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group + /// name. + /// + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments/{deploymentName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzSphereDeployment_CreateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments/{deploymentName}", ApiVersion = "2024-04-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.NotSuggestDefaultParameterSet] + public partial class NewAzSphereDeployment_CreateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + public global::System.String _jsonString; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _deviceGroupName; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string DeviceGroupName { get => this._deviceGroupName; set => this._deviceGroupName = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Create operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Create operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Create operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// + /// Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group.", + SerializedName = @"deploymentName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeploymentName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzSphereDeployment_CreateViaJsonFilePath + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereDeployment_CreateViaJsonFilePath Clone() + { + var clone = new NewAzSphereDeployment_CreateViaJsonFilePath(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.CatalogName = this.CatalogName; + clone.ProductName = this.ProductName; + clone.DeviceGroupName = this.DeviceGroupName; + clone.Name = this.Name; + clone.JsonFilePath = this.JsonFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzSphereDeployment_CreateViaJsonFilePath() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DeploymentsCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DeploymentsCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, CatalogName, ProductName, DeviceGroupName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,ProductName=ProductName,DeviceGroupName=DeviceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeployment_CreateViaJsonString.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeployment_CreateViaJsonString.cs new file mode 100644 index 000000000000..0ffb67cdfbb3 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeployment_CreateViaJsonString.cs @@ -0,0 +1,647 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group + /// name. + /// + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments/{deploymentName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzSphereDeployment_CreateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments/{deploymentName}", ApiVersion = "2024-04-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.NotSuggestDefaultParameterSet] + public partial class NewAzSphereDeployment_CreateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _deviceGroupName; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string DeviceGroupName { get => this._deviceGroupName; set => this._deviceGroupName = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Create operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Create operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Create operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// + /// Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group.", + SerializedName = @"deploymentName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeploymentName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzSphereDeployment_CreateViaJsonString + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereDeployment_CreateViaJsonString Clone() + { + var clone = new NewAzSphereDeployment_CreateViaJsonString(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.CatalogName = this.CatalogName; + clone.ProductName = this.ProductName; + clone.DeviceGroupName = this.DeviceGroupName; + clone.Name = this.Name; + clone.JsonString = this.JsonString; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzSphereDeployment_CreateViaJsonString() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DeploymentsCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DeploymentsCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, CatalogName, ProductName, DeviceGroupName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,ProductName=ProductName,DeviceGroupName=DeviceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateExpanded.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateExpanded.cs new file mode 100644 index 000000000000..9f1a2325b5db --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateExpanded.cs @@ -0,0 +1,646 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product names + /// to generate the image for a device that does not belong to a specific device group and product. + /// + /// + /// [OpenAPI] GenerateCapabilityImage=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}/generateCapabilityImage" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzSphereDeviceCapabilityImage_GenerateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product names to generate the image for a device that does not belong to a specific device group and product.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}/generateCapabilityImage", ApiVersion = "2024-04-01")] + public partial class NewAzSphereDeviceCapabilityImage_GenerateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// Request of the action to create a signed device capability image + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IGenerateCapabilityImageRequest _generateDeviceCapabilityRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.GenerateCapabilityImageRequest(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// List of capabilities to create + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "List of capabilities to create")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"List of capabilities to create", + SerializedName = @"capabilities", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("ApplicationDevelopment", "FieldServicing")] + public string[] Capability { get => _generateDeviceCapabilityRequestBody.Capability?.ToArray() ?? null /* fixedArrayOf */; set => _generateDeviceCapabilityRequestBody.Capability = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _deviceGroupName; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string DeviceGroupName { get => this._deviceGroupName; set => this._deviceGroupName = value; } + + /// Backing field for property. + private string _deviceName; + + /// Device name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Device name")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Device name", + SerializedName = @"deviceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string DeviceName { get => this._deviceName; set => this._deviceName = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzSphereDeviceCapabilityImage_GenerateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereDeviceCapabilityImage_GenerateExpanded Clone() + { + var clone = new NewAzSphereDeviceCapabilityImage_GenerateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._generateDeviceCapabilityRequestBody = this._generateDeviceCapabilityRequestBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.CatalogName = this.CatalogName; + clone.ProductName = this.ProductName; + clone.DeviceGroupName = this.DeviceGroupName; + clone.DeviceName = this.DeviceName; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzSphereDeviceCapabilityImage_GenerateExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevicesGenerateCapabilityImage' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevicesGenerateCapabilityImage(SubscriptionId, ResourceGroupName, CatalogName, ProductName, DeviceGroupName, DeviceName, _generateDeviceCapabilityRequestBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,ProductName=ProductName,DeviceGroupName=DeviceGroupName,DeviceName=DeviceName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaIdentityCatalogExpanded.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaIdentityCatalogExpanded.cs new file mode 100644 index 000000000000..4710ce3ff3ad --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaIdentityCatalogExpanded.cs @@ -0,0 +1,628 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product names + /// to generate the image for a device that does not belong to a specific device group and product. + /// + /// + /// [OpenAPI] GenerateCapabilityImage=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}/generateCapabilityImage" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzSphereDeviceCapabilityImage_GenerateViaIdentityCatalogExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product names to generate the image for a device that does not belong to a specific device group and product.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}/generateCapabilityImage", ApiVersion = "2024-04-01")] + public partial class NewAzSphereDeviceCapabilityImage_GenerateViaIdentityCatalogExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// Request of the action to create a signed device capability image + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IGenerateCapabilityImageRequest _generateDeviceCapabilityRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.GenerateCapabilityImageRequest(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// List of capabilities to create + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "List of capabilities to create")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"List of capabilities to create", + SerializedName = @"capabilities", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("ApplicationDevelopment", "FieldServicing")] + public string[] Capability { get => _generateDeviceCapabilityRequestBody.Capability?.ToArray() ?? null /* fixedArrayOf */; set => _generateDeviceCapabilityRequestBody.Capability = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _catalogInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity CatalogInputObject { get => this._catalogInputObject; set => this._catalogInputObject = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _deviceGroupName; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string DeviceGroupName { get => this._deviceGroupName; set => this._deviceGroupName = value; } + + /// Backing field for property. + private string _deviceName; + + /// Device name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Device name")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Device name", + SerializedName = @"deviceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string DeviceName { get => this._deviceName; set => this._deviceName = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of NewAzSphereDeviceCapabilityImage_GenerateViaIdentityCatalogExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereDeviceCapabilityImage_GenerateViaIdentityCatalogExpanded Clone() + { + var clone = new NewAzSphereDeviceCapabilityImage_GenerateViaIdentityCatalogExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._generateDeviceCapabilityRequestBody = this._generateDeviceCapabilityRequestBody; + clone.ProductName = this.ProductName; + clone.DeviceGroupName = this.DeviceGroupName; + clone.DeviceName = this.DeviceName; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public NewAzSphereDeviceCapabilityImage_GenerateViaIdentityCatalogExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevicesGenerateCapabilityImage' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (CatalogInputObject?.Id != null) + { + this.CatalogInputObject.Id += $"/products/{(global::System.Uri.EscapeDataString(this.ProductName.ToString()))}/deviceGroups/{(global::System.Uri.EscapeDataString(this.DeviceGroupName.ToString()))}/devices/{(global::System.Uri.EscapeDataString(this.DeviceName.ToString()))}"; + await this.Client.DevicesGenerateCapabilityImageViaIdentity(CatalogInputObject.Id, _generateDeviceCapabilityRequestBody, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == CatalogInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + if (null == CatalogInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + if (null == CatalogInputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + await this.Client.DevicesGenerateCapabilityImage(CatalogInputObject.SubscriptionId ?? null, CatalogInputObject.ResourceGroupName ?? null, CatalogInputObject.CatalogName ?? null, ProductName, DeviceGroupName, DeviceName, _generateDeviceCapabilityRequestBody, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ProductName=ProductName,DeviceGroupName=DeviceGroupName,DeviceName=DeviceName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaIdentityDeviceGroupExpanded.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaIdentityDeviceGroupExpanded.cs new file mode 100644 index 000000000000..21cbb9a25b24 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaIdentityDeviceGroupExpanded.cs @@ -0,0 +1,606 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product names + /// to generate the image for a device that does not belong to a specific device group and product. + /// + /// + /// [OpenAPI] GenerateCapabilityImage=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}/generateCapabilityImage" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzSphereDeviceCapabilityImage_GenerateViaIdentityDeviceGroupExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product names to generate the image for a device that does not belong to a specific device group and product.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}/generateCapabilityImage", ApiVersion = "2024-04-01")] + public partial class NewAzSphereDeviceCapabilityImage_GenerateViaIdentityDeviceGroupExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// Request of the action to create a signed device capability image + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IGenerateCapabilityImageRequest _generateDeviceCapabilityRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.GenerateCapabilityImageRequest(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// List of capabilities to create + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "List of capabilities to create")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"List of capabilities to create", + SerializedName = @"capabilities", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("ApplicationDevelopment", "FieldServicing")] + public string[] Capability { get => _generateDeviceCapabilityRequestBody.Capability?.ToArray() ?? null /* fixedArrayOf */; set => _generateDeviceCapabilityRequestBody.Capability = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _deviceGroupInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity DeviceGroupInputObject { get => this._deviceGroupInputObject; set => this._deviceGroupInputObject = value; } + + /// Backing field for property. + private string _deviceName; + + /// Device name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Device name")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Device name", + SerializedName = @"deviceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string DeviceName { get => this._deviceName; set => this._deviceName = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of NewAzSphereDeviceCapabilityImage_GenerateViaIdentityDeviceGroupExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereDeviceCapabilityImage_GenerateViaIdentityDeviceGroupExpanded Clone() + { + var clone = new NewAzSphereDeviceCapabilityImage_GenerateViaIdentityDeviceGroupExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._generateDeviceCapabilityRequestBody = this._generateDeviceCapabilityRequestBody; + clone.DeviceName = this.DeviceName; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzSphereDeviceCapabilityImage_GenerateViaIdentityDeviceGroupExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevicesGenerateCapabilityImage' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (DeviceGroupInputObject?.Id != null) + { + this.DeviceGroupInputObject.Id += $"/devices/{(global::System.Uri.EscapeDataString(this.DeviceName.ToString()))}"; + await this.Client.DevicesGenerateCapabilityImageViaIdentity(DeviceGroupInputObject.Id, _generateDeviceCapabilityRequestBody, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == DeviceGroupInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("DeviceGroupInputObject has null value for DeviceGroupInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, DeviceGroupInputObject) ); + } + if (null == DeviceGroupInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("DeviceGroupInputObject has null value for DeviceGroupInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, DeviceGroupInputObject) ); + } + if (null == DeviceGroupInputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("DeviceGroupInputObject has null value for DeviceGroupInputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, DeviceGroupInputObject) ); + } + if (null == DeviceGroupInputObject.ProductName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("DeviceGroupInputObject has null value for DeviceGroupInputObject.ProductName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, DeviceGroupInputObject) ); + } + if (null == DeviceGroupInputObject.DeviceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("DeviceGroupInputObject has null value for DeviceGroupInputObject.DeviceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, DeviceGroupInputObject) ); + } + await this.Client.DevicesGenerateCapabilityImage(DeviceGroupInputObject.SubscriptionId ?? null, DeviceGroupInputObject.ResourceGroupName ?? null, DeviceGroupInputObject.CatalogName ?? null, DeviceGroupInputObject.ProductName ?? null, DeviceGroupInputObject.DeviceGroupName ?? null, DeviceName, _generateDeviceCapabilityRequestBody, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { DeviceName=DeviceName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaIdentityProductExpanded.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaIdentityProductExpanded.cs new file mode 100644 index 000000000000..1eea3045e46f --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaIdentityProductExpanded.cs @@ -0,0 +1,617 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product names + /// to generate the image for a device that does not belong to a specific device group and product. + /// + /// + /// [OpenAPI] GenerateCapabilityImage=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}/generateCapabilityImage" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzSphereDeviceCapabilityImage_GenerateViaIdentityProductExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product names to generate the image for a device that does not belong to a specific device group and product.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}/generateCapabilityImage", ApiVersion = "2024-04-01")] + public partial class NewAzSphereDeviceCapabilityImage_GenerateViaIdentityProductExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// Request of the action to create a signed device capability image + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IGenerateCapabilityImageRequest _generateDeviceCapabilityRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.GenerateCapabilityImageRequest(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// List of capabilities to create + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "List of capabilities to create")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"List of capabilities to create", + SerializedName = @"capabilities", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("ApplicationDevelopment", "FieldServicing")] + public string[] Capability { get => _generateDeviceCapabilityRequestBody.Capability?.ToArray() ?? null /* fixedArrayOf */; set => _generateDeviceCapabilityRequestBody.Capability = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _deviceGroupName; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string DeviceGroupName { get => this._deviceGroupName; set => this._deviceGroupName = value; } + + /// Backing field for property. + private string _deviceName; + + /// Device name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Device name")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Device name", + SerializedName = @"deviceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string DeviceName { get => this._deviceName; set => this._deviceName = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _productInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity ProductInputObject { get => this._productInputObject; set => this._productInputObject = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of NewAzSphereDeviceCapabilityImage_GenerateViaIdentityProductExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereDeviceCapabilityImage_GenerateViaIdentityProductExpanded Clone() + { + var clone = new NewAzSphereDeviceCapabilityImage_GenerateViaIdentityProductExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._generateDeviceCapabilityRequestBody = this._generateDeviceCapabilityRequestBody; + clone.DeviceGroupName = this.DeviceGroupName; + clone.DeviceName = this.DeviceName; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public NewAzSphereDeviceCapabilityImage_GenerateViaIdentityProductExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevicesGenerateCapabilityImage' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (ProductInputObject?.Id != null) + { + this.ProductInputObject.Id += $"/deviceGroups/{(global::System.Uri.EscapeDataString(this.DeviceGroupName.ToString()))}/devices/{(global::System.Uri.EscapeDataString(this.DeviceName.ToString()))}"; + await this.Client.DevicesGenerateCapabilityImageViaIdentity(ProductInputObject.Id, _generateDeviceCapabilityRequestBody, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == ProductInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProductInputObject has null value for ProductInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProductInputObject) ); + } + if (null == ProductInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProductInputObject has null value for ProductInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProductInputObject) ); + } + if (null == ProductInputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProductInputObject has null value for ProductInputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProductInputObject) ); + } + if (null == ProductInputObject.ProductName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProductInputObject has null value for ProductInputObject.ProductName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProductInputObject) ); + } + await this.Client.DevicesGenerateCapabilityImage(ProductInputObject.SubscriptionId ?? null, ProductInputObject.ResourceGroupName ?? null, ProductInputObject.CatalogName ?? null, ProductInputObject.ProductName ?? null, DeviceGroupName, DeviceName, _generateDeviceCapabilityRequestBody, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { DeviceGroupName=DeviceGroupName,DeviceName=DeviceName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaJsonFilePath.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaJsonFilePath.cs new file mode 100644 index 000000000000..693763dbd465 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaJsonFilePath.cs @@ -0,0 +1,648 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product names + /// to generate the image for a device that does not belong to a specific device group and product. + /// + /// + /// [OpenAPI] GenerateCapabilityImage=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}/generateCapabilityImage" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzSphereDeviceCapabilityImage_GenerateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product names to generate the image for a device that does not belong to a specific device group and product.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}/generateCapabilityImage", ApiVersion = "2024-04-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.NotSuggestDefaultParameterSet] + public partial class NewAzSphereDeviceCapabilityImage_GenerateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + public global::System.String _jsonString; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _deviceGroupName; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string DeviceGroupName { get => this._deviceGroupName; set => this._deviceGroupName = value; } + + /// Backing field for property. + private string _deviceName; + + /// Device name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Device name")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Device name", + SerializedName = @"deviceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string DeviceName { get => this._deviceName; set => this._deviceName = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Generate operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Generate operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Generate operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of NewAzSphereDeviceCapabilityImage_GenerateViaJsonFilePath + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereDeviceCapabilityImage_GenerateViaJsonFilePath Clone() + { + var clone = new NewAzSphereDeviceCapabilityImage_GenerateViaJsonFilePath(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.CatalogName = this.CatalogName; + clone.ProductName = this.ProductName; + clone.DeviceGroupName = this.DeviceGroupName; + clone.DeviceName = this.DeviceName; + clone.JsonFilePath = this.JsonFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzSphereDeviceCapabilityImage_GenerateViaJsonFilePath() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevicesGenerateCapabilityImage' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevicesGenerateCapabilityImageViaJsonString(SubscriptionId, ResourceGroupName, CatalogName, ProductName, DeviceGroupName, DeviceName, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,ProductName=ProductName,DeviceGroupName=DeviceGroupName,DeviceName=DeviceName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaJsonString.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaJsonString.cs new file mode 100644 index 000000000000..335ae0ec7b91 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaJsonString.cs @@ -0,0 +1,644 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product names + /// to generate the image for a device that does not belong to a specific device group and product. + /// + /// + /// [OpenAPI] GenerateCapabilityImage=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}/generateCapabilityImage" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzSphereDeviceCapabilityImage_GenerateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product names to generate the image for a device that does not belong to a specific device group and product.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}/generateCapabilityImage", ApiVersion = "2024-04-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.NotSuggestDefaultParameterSet] + public partial class NewAzSphereDeviceCapabilityImage_GenerateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _deviceGroupName; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string DeviceGroupName { get => this._deviceGroupName; set => this._deviceGroupName = value; } + + /// Backing field for property. + private string _deviceName; + + /// Device name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Device name")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Device name", + SerializedName = @"deviceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string DeviceName { get => this._deviceName; set => this._deviceName = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Generate operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Generate operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Generate operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzSphereDeviceCapabilityImage_GenerateViaJsonString + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereDeviceCapabilityImage_GenerateViaJsonString Clone() + { + var clone = new NewAzSphereDeviceCapabilityImage_GenerateViaJsonString(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.CatalogName = this.CatalogName; + clone.ProductName = this.ProductName; + clone.DeviceGroupName = this.DeviceGroupName; + clone.DeviceName = this.DeviceName; + clone.JsonString = this.JsonString; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzSphereDeviceCapabilityImage_GenerateViaJsonString() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevicesGenerateCapabilityImage' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevicesGenerateCapabilityImageViaJsonString(SubscriptionId, ResourceGroupName, CatalogName, ProductName, DeviceGroupName, DeviceName, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,ProductName=ProductName,DeviceGroupName=DeviceGroupName,DeviceName=DeviceName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeviceGroup_CreateExpanded.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeviceGroup_CreateExpanded.cs new file mode 100644 index 000000000000..8b421721de05 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeviceGroup_CreateExpanded.cs @@ -0,0 +1,678 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device + /// group name. + /// + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzSphereDeviceGroup_CreateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}", ApiVersion = "2024-04-01")] + public partial class NewAzSphereDeviceGroup_CreateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// An device group resource belonging to a product resource. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroup(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Flag to define if the user allows for crash dump collection. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Flag to define if the user allows for crash dump collection.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Flag to define if the user allows for crash dump collection.", + SerializedName = @"allowCrashDumpsCollection", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Enabled", "Disabled")] + public string AllowCrashDumpsCollection { get => _resourceBody.AllowCrashDumpsCollection ?? null; set => _resourceBody.AllowCrashDumpsCollection = value; } + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Description of the device group. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Description of the device group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Description of the device group.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + public string Description { get => _resourceBody.Description ?? null; set => _resourceBody.Description = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// Operating system feed type of the device group. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Operating system feed type of the device group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Operating system feed type of the device group.", + SerializedName = @"osFeedType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Retail", "RetailEval")] + public string OSFeedType { get => _resourceBody.OSFeedType ?? null; set => _resourceBody.OSFeedType = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Regional data boundary for the device group. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Regional data boundary for the device group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Regional data boundary for the device group.", + SerializedName = @"regionalDataBoundary", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("None", "EU")] + public string RegionalDataBoundary { get => _resourceBody.RegionalDataBoundary ?? null; set => _resourceBody.RegionalDataBoundary = value; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Update policy of the device group. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Update policy of the device group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Update policy of the device group.", + SerializedName = @"updatePolicy", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("UpdateAll", "No3rdPartyAppUpdates")] + public string UpdatePolicy { get => _resourceBody.UpdatePolicy ?? null; set => _resourceBody.UpdatePolicy = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzSphereDeviceGroup_CreateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereDeviceGroup_CreateExpanded Clone() + { + var clone = new NewAzSphereDeviceGroup_CreateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._resourceBody = this._resourceBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.CatalogName = this.CatalogName; + clone.ProductName = this.ProductName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzSphereDeviceGroup_CreateExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DeviceGroupsCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DeviceGroupsCreateOrUpdate(SubscriptionId, ResourceGroupName, CatalogName, ProductName, Name, _resourceBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,ProductName=ProductName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeviceGroup_CreateViaJsonFilePath.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeviceGroup_CreateViaJsonFilePath.cs new file mode 100644 index 000000000000..7a383b453e27 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeviceGroup_CreateViaJsonFilePath.cs @@ -0,0 +1,632 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device + /// group name. + /// + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzSphereDeviceGroup_CreateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}", ApiVersion = "2024-04-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.NotSuggestDefaultParameterSet] + public partial class NewAzSphereDeviceGroup_CreateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + public global::System.String _jsonString; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Create operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Create operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Create operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzSphereDeviceGroup_CreateViaJsonFilePath + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereDeviceGroup_CreateViaJsonFilePath Clone() + { + var clone = new NewAzSphereDeviceGroup_CreateViaJsonFilePath(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.CatalogName = this.CatalogName; + clone.ProductName = this.ProductName; + clone.Name = this.Name; + clone.JsonFilePath = this.JsonFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzSphereDeviceGroup_CreateViaJsonFilePath() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DeviceGroupsCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DeviceGroupsCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, CatalogName, ProductName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,ProductName=ProductName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeviceGroup_CreateViaJsonString.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeviceGroup_CreateViaJsonString.cs new file mode 100644 index 000000000000..3091d71c1d61 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDeviceGroup_CreateViaJsonString.cs @@ -0,0 +1,630 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device + /// group name. + /// + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzSphereDeviceGroup_CreateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}", ApiVersion = "2024-04-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.NotSuggestDefaultParameterSet] + public partial class NewAzSphereDeviceGroup_CreateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Create operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Create operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Create operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzSphereDeviceGroup_CreateViaJsonString + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereDeviceGroup_CreateViaJsonString Clone() + { + var clone = new NewAzSphereDeviceGroup_CreateViaJsonString(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.CatalogName = this.CatalogName; + clone.ProductName = this.ProductName; + clone.Name = this.Name; + clone.JsonString = this.JsonString; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzSphereDeviceGroup_CreateViaJsonString() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DeviceGroupsCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DeviceGroupsCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, CatalogName, ProductName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,ProductName=ProductName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDevice_CreateExpanded.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDevice_CreateExpanded.cs new file mode 100644 index 000000000000..9fddbf567d52 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDevice_CreateExpanded.cs @@ -0,0 +1,646 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Create a Device. Use '.unassigned' or '.default' for the device group and product names to claim a device to the catalog + /// only. + /// + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzSphereDevice_CreateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Create a Device. Use '.unassigned' or '.default' for the device group and product names to claim a device to the catalog only.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}", ApiVersion = "2024-04-01")] + public partial class NewAzSphereDevice_CreateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// An device resource belonging to a device group resource. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Device(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Device ID + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Device ID")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Device ID", + SerializedName = @"deviceId", + PossibleTypes = new [] { typeof(string) })] + public string DeviceId { get => _resourceBody.DeviceId ?? null; set => _resourceBody.DeviceId = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// Backing field for property. + private string _groupName; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string GroupName { get => this._groupName; set => this._groupName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Device name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Device name")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Device name", + SerializedName = @"deviceName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzSphereDevice_CreateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereDevice_CreateExpanded Clone() + { + var clone = new NewAzSphereDevice_CreateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._resourceBody = this._resourceBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.CatalogName = this.CatalogName; + clone.ProductName = this.ProductName; + clone.GroupName = this.GroupName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzSphereDevice_CreateExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevicesCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevicesCreateOrUpdate(SubscriptionId, ResourceGroupName, CatalogName, ProductName, GroupName, Name, _resourceBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,ProductName=ProductName,GroupName=GroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDevice_CreateViaJsonFilePath.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDevice_CreateViaJsonFilePath.cs new file mode 100644 index 000000000000..bb9d633d5921 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDevice_CreateViaJsonFilePath.cs @@ -0,0 +1,648 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Create a Device. Use '.unassigned' or '.default' for the device group and product names to claim a device to the catalog + /// only. + /// + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzSphereDevice_CreateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Create a Device. Use '.unassigned' or '.default' for the device group and product names to claim a device to the catalog only.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}", ApiVersion = "2024-04-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.NotSuggestDefaultParameterSet] + public partial class NewAzSphereDevice_CreateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + public global::System.String _jsonString; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// Backing field for property. + private string _groupName; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string GroupName { get => this._groupName; set => this._groupName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Create operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Create operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Create operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Device name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Device name")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Device name", + SerializedName = @"deviceName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzSphereDevice_CreateViaJsonFilePath + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereDevice_CreateViaJsonFilePath Clone() + { + var clone = new NewAzSphereDevice_CreateViaJsonFilePath(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.CatalogName = this.CatalogName; + clone.ProductName = this.ProductName; + clone.GroupName = this.GroupName; + clone.Name = this.Name; + clone.JsonFilePath = this.JsonFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzSphereDevice_CreateViaJsonFilePath() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevicesCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevicesCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, CatalogName, ProductName, GroupName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,ProductName=ProductName,GroupName=GroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDevice_CreateViaJsonString.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDevice_CreateViaJsonString.cs new file mode 100644 index 000000000000..32116067ffad --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereDevice_CreateViaJsonString.cs @@ -0,0 +1,646 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Create a Device. Use '.unassigned' or '.default' for the device group and product names to claim a device to the catalog + /// only. + /// + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzSphereDevice_CreateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Create a Device. Use '.unassigned' or '.default' for the device group and product names to claim a device to the catalog only.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}", ApiVersion = "2024-04-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.NotSuggestDefaultParameterSet] + public partial class NewAzSphereDevice_CreateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// Backing field for property. + private string _groupName; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string GroupName { get => this._groupName; set => this._groupName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Create operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Create operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Create operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Device name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Device name")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Device name", + SerializedName = @"deviceName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzSphereDevice_CreateViaJsonString + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereDevice_CreateViaJsonString Clone() + { + var clone = new NewAzSphereDevice_CreateViaJsonString(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.CatalogName = this.CatalogName; + clone.ProductName = this.ProductName; + clone.GroupName = this.GroupName; + clone.Name = this.Name; + clone.JsonString = this.JsonString; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzSphereDevice_CreateViaJsonString() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevicesCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevicesCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, CatalogName, ProductName, GroupName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,ProductName=ProductName,GroupName=GroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereImage_CreateExpanded.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereImage_CreateExpanded.cs new file mode 100644 index 000000000000..095124e2d77e --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereImage_CreateExpanded.cs @@ -0,0 +1,637 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// Create a Image + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images/{imageName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzSphereImage_CreateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Create a Image")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images/{imageName}", ApiVersion = "2024-04-01")] + public partial class NewAzSphereImage_CreateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// An image resource belonging to a catalog resource. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Image(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// + /// Image as a UTF-8 encoded base 64 string on image create. This field contains the image URI on image reads. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Image as a UTF-8 encoded base 64 string on image create. This field contains the image URI on image reads.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Image as a UTF-8 encoded base 64 string on image create. This field contains the image URI on image reads.", + SerializedName = @"image", + PossibleTypes = new [] { typeof(string) })] + public string Image { get => _resourceBody.PropertiesImage ?? null; set => _resourceBody.PropertiesImage = value; } + + /// Image ID + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Image ID")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Image ID", + SerializedName = @"imageId", + PossibleTypes = new [] { typeof(string) })] + public string ImageId { get => _resourceBody.ImageId ?? null; set => _resourceBody.ImageId = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Image name. Use an image GUID for GA versions of the API. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Image name. Use an image GUID for GA versions of the API.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Image name. Use an image GUID for GA versions of the API.", + SerializedName = @"imageName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ImageName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Regional data boundary for an image + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Regional data boundary for an image")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Regional data boundary for an image", + SerializedName = @"regionalDataBoundary", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("None", "EU")] + public string RegionalDataBoundary { get => _resourceBody.RegionalDataBoundary ?? null; set => _resourceBody.RegionalDataBoundary = value; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzSphereImage_CreateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereImage_CreateExpanded Clone() + { + var clone = new NewAzSphereImage_CreateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._resourceBody = this._resourceBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.CatalogName = this.CatalogName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzSphereImage_CreateExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ImagesCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ImagesCreateOrUpdate(SubscriptionId, ResourceGroupName, CatalogName, Name, _resourceBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereImage_CreateViaJsonFilePath.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereImage_CreateViaJsonFilePath.cs new file mode 100644 index 000000000000..5c85769e12bc --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereImage_CreateViaJsonFilePath.cs @@ -0,0 +1,614 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// Create a Image + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images/{imageName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzSphereImage_CreateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Create a Image")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images/{imageName}", ApiVersion = "2024-04-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.NotSuggestDefaultParameterSet] + public partial class NewAzSphereImage_CreateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + public global::System.String _jsonString; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Create operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Create operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Create operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Image name. Use an image GUID for GA versions of the API. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Image name. Use an image GUID for GA versions of the API.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Image name. Use an image GUID for GA versions of the API.", + SerializedName = @"imageName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ImageName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzSphereImage_CreateViaJsonFilePath + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereImage_CreateViaJsonFilePath Clone() + { + var clone = new NewAzSphereImage_CreateViaJsonFilePath(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.CatalogName = this.CatalogName; + clone.Name = this.Name; + clone.JsonFilePath = this.JsonFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzSphereImage_CreateViaJsonFilePath() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ImagesCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ImagesCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, CatalogName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereImage_CreateViaJsonString.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereImage_CreateViaJsonString.cs new file mode 100644 index 000000000000..6ecebfbc140f --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereImage_CreateViaJsonString.cs @@ -0,0 +1,612 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// Create a Image + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images/{imageName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzSphereImage_CreateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Create a Image")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images/{imageName}", ApiVersion = "2024-04-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.NotSuggestDefaultParameterSet] + public partial class NewAzSphereImage_CreateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Create operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Create operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Create operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Image name. Use an image GUID for GA versions of the API. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Image name. Use an image GUID for GA versions of the API.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Image name. Use an image GUID for GA versions of the API.", + SerializedName = @"imageName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ImageName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzSphereImage_CreateViaJsonString + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereImage_CreateViaJsonString Clone() + { + var clone = new NewAzSphereImage_CreateViaJsonString(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.CatalogName = this.CatalogName; + clone.Name = this.Name; + clone.JsonString = this.JsonString; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzSphereImage_CreateViaJsonString() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ImagesCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ImagesCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, CatalogName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereProductDefaultDeviceGroup_Generate.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereProductDefaultDeviceGroup_Generate.cs new file mode 100644 index 000000000000..385f6e038699 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereProductDefaultDeviceGroup_Generate.cs @@ -0,0 +1,543 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Generates default device groups for the product. '.default' and '.unassigned' are system defined values and cannot be + /// used for product name. + /// + /// + /// [OpenAPI] GenerateDefaultDeviceGroups=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/generateDefaultDeviceGroups" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzSphereProductDefaultDeviceGroup_Generate", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Generates default device groups for the product. '.default' and '.unassigned' are system defined values and cannot be used for product name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/generateDefaultDeviceGroups", ApiVersion = "2024-04-01")] + public partial class NewAzSphereProductDefaultDeviceGroup_Generate : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzSphereProductDefaultDeviceGroup_Generate() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProductsGenerateDefaultDeviceGroups' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProductsGenerateDefaultDeviceGroups(SubscriptionId, ResourceGroupName, CatalogName, ProductName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,ProductName=ProductName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupListResult + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProductsGenerateDefaultDeviceGroups_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereProductDefaultDeviceGroup_GenerateViaIdentity.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereProductDefaultDeviceGroup_GenerateViaIdentity.cs new file mode 100644 index 000000000000..f2b77ee2d1fc --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereProductDefaultDeviceGroup_GenerateViaIdentity.cs @@ -0,0 +1,514 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Generates default device groups for the product. '.default' and '.unassigned' are system defined values and cannot be + /// used for product name. + /// + /// + /// [OpenAPI] GenerateDefaultDeviceGroups=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/generateDefaultDeviceGroups" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzSphereProductDefaultDeviceGroup_GenerateViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Generates default device groups for the product. '.default' and '.unassigned' are system defined values and cannot be used for product name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/generateDefaultDeviceGroups", ApiVersion = "2024-04-01")] + public partial class NewAzSphereProductDefaultDeviceGroup_GenerateViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzSphereProductDefaultDeviceGroup_GenerateViaIdentity() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProductsGenerateDefaultDeviceGroups' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.ProductsGenerateDefaultDeviceGroupsViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProductName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProductName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.ProductsGenerateDefaultDeviceGroups(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.CatalogName ?? null, InputObject.ProductName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupListResult + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProductsGenerateDefaultDeviceGroups_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereProductDefaultDeviceGroup_GenerateViaIdentityCatalog.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereProductDefaultDeviceGroup_GenerateViaIdentityCatalog.cs new file mode 100644 index 000000000000..b1e59e23c589 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereProductDefaultDeviceGroup_GenerateViaIdentityCatalog.cs @@ -0,0 +1,526 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Generates default device groups for the product. '.default' and '.unassigned' are system defined values and cannot be + /// used for product name. + /// + /// + /// [OpenAPI] GenerateDefaultDeviceGroups=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/generateDefaultDeviceGroups" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzSphereProductDefaultDeviceGroup_GenerateViaIdentityCatalog", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Generates default device groups for the product. '.default' and '.unassigned' are system defined values and cannot be used for product name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/generateDefaultDeviceGroups", ApiVersion = "2024-04-01")] + public partial class NewAzSphereProductDefaultDeviceGroup_GenerateViaIdentityCatalog : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _catalogInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity CatalogInputObject { get => this._catalogInputObject; set => this._catalogInputObject = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public NewAzSphereProductDefaultDeviceGroup_GenerateViaIdentityCatalog() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProductsGenerateDefaultDeviceGroups' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (CatalogInputObject?.Id != null) + { + this.CatalogInputObject.Id += $"/products/{(global::System.Uri.EscapeDataString(this.ProductName.ToString()))}"; + await this.Client.ProductsGenerateDefaultDeviceGroupsViaIdentity(CatalogInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == CatalogInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + if (null == CatalogInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + if (null == CatalogInputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + await this.Client.ProductsGenerateDefaultDeviceGroups(CatalogInputObject.SubscriptionId ?? null, CatalogInputObject.ResourceGroupName ?? null, CatalogInputObject.CatalogName ?? null, ProductName, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ProductName=ProductName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupListResult + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProductsGenerateDefaultDeviceGroups_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereProduct_CreateExpanded.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereProduct_CreateExpanded.cs new file mode 100644 index 000000000000..d12182b6054a --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereProduct_CreateExpanded.cs @@ -0,0 +1,614 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Create a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. + /// + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzSphereProduct_CreateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Create a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}", ApiVersion = "2024-04-01")] + public partial class NewAzSphereProduct_CreateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// An product resource belonging to a catalog resource. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Product(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Description of the product + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Description of the product")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Description of the product", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + public string Description { get => _resourceBody.Description ?? null; set => _resourceBody.Description = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ProductName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzSphereProduct_CreateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereProduct_CreateExpanded Clone() + { + var clone = new NewAzSphereProduct_CreateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._resourceBody = this._resourceBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.CatalogName = this.CatalogName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzSphereProduct_CreateExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProductsCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProductsCreateOrUpdate(SubscriptionId, ResourceGroupName, CatalogName, Name, _resourceBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereProduct_CreateViaJsonFilePath.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereProduct_CreateViaJsonFilePath.cs new file mode 100644 index 000000000000..50f3f5365115 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereProduct_CreateViaJsonFilePath.cs @@ -0,0 +1,616 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Create a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. + /// + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzSphereProduct_CreateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Create a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}", ApiVersion = "2024-04-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.NotSuggestDefaultParameterSet] + public partial class NewAzSphereProduct_CreateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + public global::System.String _jsonString; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Create operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Create operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Create operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ProductName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzSphereProduct_CreateViaJsonFilePath + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereProduct_CreateViaJsonFilePath Clone() + { + var clone = new NewAzSphereProduct_CreateViaJsonFilePath(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.CatalogName = this.CatalogName; + clone.Name = this.Name; + clone.JsonFilePath = this.JsonFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzSphereProduct_CreateViaJsonFilePath() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProductsCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProductsCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, CatalogName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereProduct_CreateViaJsonString.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereProduct_CreateViaJsonString.cs new file mode 100644 index 000000000000..ecc0f1dd045f --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/NewAzSphereProduct_CreateViaJsonString.cs @@ -0,0 +1,614 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Create a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. + /// + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzSphereProduct_CreateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Create a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}", ApiVersion = "2024-04-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.NotSuggestDefaultParameterSet] + public partial class NewAzSphereProduct_CreateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Create operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Create operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Create operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ProductName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzSphereProduct_CreateViaJsonString + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereProduct_CreateViaJsonString Clone() + { + var clone = new NewAzSphereProduct_CreateViaJsonString(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.CatalogName = this.CatalogName; + clone.Name = this.Name; + clone.JsonString = this.JsonString; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzSphereProduct_CreateViaJsonString() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProductsCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProductsCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, CatalogName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/RemoveAzSphereCatalog_Delete.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/RemoveAzSphereCatalog_Delete.cs new file mode 100644 index 000000000000..8c48de009a24 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/RemoveAzSphereCatalog_Delete.cs @@ -0,0 +1,603 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// Delete a Catalog + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzSphereCatalog_Delete", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Delete a Catalog")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}", ApiVersion = "2024-04-01")] + public partial class RemoveAzSphereCatalog_Delete : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("CatalogName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzSphereCatalog_Delete + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.RemoveAzSphereCatalog_Delete Clone() + { + var clone = new RemoveAzSphereCatalog_Delete(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CatalogsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CatalogsDelete(SubscriptionId, ResourceGroupName, Name, onOk, onNoContent, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzSphereCatalog_Delete() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/RemoveAzSphereCatalog_DeleteViaIdentity.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/RemoveAzSphereCatalog_DeleteViaIdentity.cs new file mode 100644 index 000000000000..b2cc6b1a2a29 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/RemoveAzSphereCatalog_DeleteViaIdentity.cs @@ -0,0 +1,580 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// Delete a Catalog + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzSphereCatalog_DeleteViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Delete a Catalog")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}", ApiVersion = "2024-04-01")] + public partial class RemoveAzSphereCatalog_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzSphereCatalog_DeleteViaIdentity + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.RemoveAzSphereCatalog_DeleteViaIdentity Clone() + { + var clone = new RemoveAzSphereCatalog_DeleteViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CatalogsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.CatalogsDeleteViaIdentity(InputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.CatalogsDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.CatalogName ?? null, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzSphereCatalog_DeleteViaIdentity() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/RemoveAzSphereDeviceGroup_Delete.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/RemoveAzSphereDeviceGroup_Delete.cs new file mode 100644 index 000000000000..6d3720e054f8 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/RemoveAzSphereDeviceGroup_Delete.cs @@ -0,0 +1,636 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Delete a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device + /// group name. + /// + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzSphereDeviceGroup_Delete", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Delete a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}", ApiVersion = "2024-04-01")] + public partial class RemoveAzSphereDeviceGroup_Delete : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzSphereDeviceGroup_Delete + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.RemoveAzSphereDeviceGroup_Delete Clone() + { + var clone = new RemoveAzSphereDeviceGroup_Delete(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.CatalogName = this.CatalogName; + clone.ProductName = this.ProductName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DeviceGroupsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DeviceGroupsDelete(SubscriptionId, ResourceGroupName, CatalogName, ProductName, Name, onOk, onNoContent, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,ProductName=ProductName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzSphereDeviceGroup_Delete() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/RemoveAzSphereDeviceGroup_DeleteViaIdentity.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/RemoveAzSphereDeviceGroup_DeleteViaIdentity.cs new file mode 100644 index 000000000000..07f3b088c0da --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/RemoveAzSphereDeviceGroup_DeleteViaIdentity.cs @@ -0,0 +1,591 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Delete a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device + /// group name. + /// + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzSphereDeviceGroup_DeleteViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Delete a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}", ApiVersion = "2024-04-01")] + public partial class RemoveAzSphereDeviceGroup_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzSphereDeviceGroup_DeleteViaIdentity + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.RemoveAzSphereDeviceGroup_DeleteViaIdentity Clone() + { + var clone = new RemoveAzSphereDeviceGroup_DeleteViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DeviceGroupsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.DeviceGroupsDeleteViaIdentity(InputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProductName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProductName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.DeviceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.DeviceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.DeviceGroupsDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.CatalogName ?? null, InputObject.ProductName ?? null, InputObject.DeviceGroupName ?? null, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzSphereDeviceGroup_DeleteViaIdentity() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/RemoveAzSphereDeviceGroup_DeleteViaIdentityCatalog.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/RemoveAzSphereDeviceGroup_DeleteViaIdentityCatalog.cs new file mode 100644 index 000000000000..2c81c036d5b6 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/RemoveAzSphereDeviceGroup_DeleteViaIdentityCatalog.cs @@ -0,0 +1,615 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Delete a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device + /// group name. + /// + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzSphereDeviceGroup_DeleteViaIdentityCatalog", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Delete a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}", ApiVersion = "2024-04-01")] + public partial class RemoveAzSphereDeviceGroup_DeleteViaIdentityCatalog : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _catalogInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity CatalogInputObject { get => this._catalogInputObject; set => this._catalogInputObject = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzSphereDeviceGroup_DeleteViaIdentityCatalog + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.RemoveAzSphereDeviceGroup_DeleteViaIdentityCatalog Clone() + { + var clone = new RemoveAzSphereDeviceGroup_DeleteViaIdentityCatalog(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.ProductName = this.ProductName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DeviceGroupsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (CatalogInputObject?.Id != null) + { + this.CatalogInputObject.Id += $"/products/{(global::System.Uri.EscapeDataString(this.ProductName.ToString()))}/deviceGroups/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.DeviceGroupsDeleteViaIdentity(CatalogInputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == CatalogInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + if (null == CatalogInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + if (null == CatalogInputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + await this.Client.DeviceGroupsDelete(CatalogInputObject.SubscriptionId ?? null, CatalogInputObject.ResourceGroupName ?? null, CatalogInputObject.CatalogName ?? null, ProductName, Name, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ProductName=ProductName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzSphereDeviceGroup_DeleteViaIdentityCatalog() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/RemoveAzSphereDeviceGroup_DeleteViaIdentityProduct.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/RemoveAzSphereDeviceGroup_DeleteViaIdentityProduct.cs new file mode 100644 index 000000000000..ca1c52ca3324 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/RemoveAzSphereDeviceGroup_DeleteViaIdentityProduct.cs @@ -0,0 +1,604 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Delete a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device + /// group name. + /// + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzSphereDeviceGroup_DeleteViaIdentityProduct", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Delete a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}", ApiVersion = "2024-04-01")] + public partial class RemoveAzSphereDeviceGroup_DeleteViaIdentityProduct : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _productInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity ProductInputObject { get => this._productInputObject; set => this._productInputObject = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzSphereDeviceGroup_DeleteViaIdentityProduct + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.RemoveAzSphereDeviceGroup_DeleteViaIdentityProduct Clone() + { + var clone = new RemoveAzSphereDeviceGroup_DeleteViaIdentityProduct(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DeviceGroupsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (ProductInputObject?.Id != null) + { + this.ProductInputObject.Id += $"/deviceGroups/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.DeviceGroupsDeleteViaIdentity(ProductInputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == ProductInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProductInputObject has null value for ProductInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProductInputObject) ); + } + if (null == ProductInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProductInputObject has null value for ProductInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProductInputObject) ); + } + if (null == ProductInputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProductInputObject has null value for ProductInputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProductInputObject) ); + } + if (null == ProductInputObject.ProductName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProductInputObject has null value for ProductInputObject.ProductName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProductInputObject) ); + } + await this.Client.DeviceGroupsDelete(ProductInputObject.SubscriptionId ?? null, ProductInputObject.ResourceGroupName ?? null, ProductInputObject.CatalogName ?? null, ProductInputObject.ProductName ?? null, Name, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzSphereDeviceGroup_DeleteViaIdentityProduct() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/RemoveAzSphereProduct_Delete.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/RemoveAzSphereProduct_Delete.cs new file mode 100644 index 000000000000..f812031c0008 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/RemoveAzSphereProduct_Delete.cs @@ -0,0 +1,620 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Delete a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name' + /// + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzSphereProduct_Delete", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Delete a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}", ApiVersion = "2024-04-01")] + public partial class RemoveAzSphereProduct_Delete : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ProductName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzSphereProduct_Delete + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.RemoveAzSphereProduct_Delete Clone() + { + var clone = new RemoveAzSphereProduct_Delete(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.CatalogName = this.CatalogName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProductsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProductsDelete(SubscriptionId, ResourceGroupName, CatalogName, Name, onOk, onNoContent, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzSphereProduct_Delete() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/RemoveAzSphereProduct_DeleteViaIdentity.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/RemoveAzSphereProduct_DeleteViaIdentity.cs new file mode 100644 index 000000000000..89a507986d8d --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/RemoveAzSphereProduct_DeleteViaIdentity.cs @@ -0,0 +1,586 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Delete a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name' + /// + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzSphereProduct_DeleteViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Delete a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}", ApiVersion = "2024-04-01")] + public partial class RemoveAzSphereProduct_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzSphereProduct_DeleteViaIdentity + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.RemoveAzSphereProduct_DeleteViaIdentity Clone() + { + var clone = new RemoveAzSphereProduct_DeleteViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProductsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.ProductsDeleteViaIdentity(InputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProductName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProductName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.ProductsDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.CatalogName ?? null, InputObject.ProductName ?? null, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzSphereProduct_DeleteViaIdentity() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/RemoveAzSphereProduct_DeleteViaIdentityCatalog.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/RemoveAzSphereProduct_DeleteViaIdentityCatalog.cs new file mode 100644 index 000000000000..462106aa42b2 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/RemoveAzSphereProduct_DeleteViaIdentityCatalog.cs @@ -0,0 +1,599 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Delete a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name' + /// + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzSphereProduct_DeleteViaIdentityCatalog", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Delete a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}", ApiVersion = "2024-04-01")] + public partial class RemoveAzSphereProduct_DeleteViaIdentityCatalog : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _catalogInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity CatalogInputObject { get => this._catalogInputObject; set => this._catalogInputObject = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ProductName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzSphereProduct_DeleteViaIdentityCatalog + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.RemoveAzSphereProduct_DeleteViaIdentityCatalog Clone() + { + var clone = new RemoveAzSphereProduct_DeleteViaIdentityCatalog(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProductsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (CatalogInputObject?.Id != null) + { + this.CatalogInputObject.Id += $"/products/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.ProductsDeleteViaIdentity(CatalogInputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == CatalogInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + if (null == CatalogInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + if (null == CatalogInputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + await this.Client.ProductsDelete(CatalogInputObject.SubscriptionId ?? null, CatalogInputObject.ResourceGroupName ?? null, CatalogInputObject.CatalogName ?? null, Name, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzSphereProduct_DeleteViaIdentityCatalog() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereCatalog_UpdateExpanded.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereCatalog_UpdateExpanded.cs new file mode 100644 index 000000000000..33863d387de8 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereCatalog_UpdateExpanded.cs @@ -0,0 +1,610 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// Create a Catalog + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Set, @"AzSphereCatalog_UpdateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Create a Catalog")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}", ApiVersion = "2024-04-01")] + public partial class SetAzSphereCatalog_UpdateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// An Azure Sphere catalog + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Catalog(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// The geo-location where the resource lives + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The geo-location where the resource lives")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The geo-location where the resource lives", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + public string Location { get => _resourceBody.Location ?? null; set => _resourceBody.Location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("CatalogName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Resource tags. + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceTags Tag { get => _resourceBody.Tag ?? null /* object */; set => _resourceBody.Tag = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of SetAzSphereCatalog_UpdateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereCatalog_UpdateExpanded Clone() + { + var clone = new SetAzSphereCatalog_UpdateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._resourceBody = this._resourceBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CatalogsCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CatalogsCreateOrUpdate(SubscriptionId, ResourceGroupName, Name, _resourceBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public SetAzSphereCatalog_UpdateExpanded() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereCatalog_UpdateViaJsonFilePath.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereCatalog_UpdateViaJsonFilePath.cs new file mode 100644 index 000000000000..c001e0896fb4 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereCatalog_UpdateViaJsonFilePath.cs @@ -0,0 +1,600 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// Create a Catalog + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Set, @"AzSphereCatalog_UpdateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Create a Catalog")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}", ApiVersion = "2024-04-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.NotSuggestDefaultParameterSet] + public partial class SetAzSphereCatalog_UpdateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + public global::System.String _jsonString; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Update operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Update operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Update operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("CatalogName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of SetAzSphereCatalog_UpdateViaJsonFilePath + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereCatalog_UpdateViaJsonFilePath Clone() + { + var clone = new SetAzSphereCatalog_UpdateViaJsonFilePath(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + clone.JsonFilePath = this.JsonFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CatalogsCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CatalogsCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public SetAzSphereCatalog_UpdateViaJsonFilePath() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereCatalog_UpdateViaJsonString.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereCatalog_UpdateViaJsonString.cs new file mode 100644 index 000000000000..67f9718993f7 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereCatalog_UpdateViaJsonString.cs @@ -0,0 +1,598 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// Create a Catalog + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Set, @"AzSphereCatalog_UpdateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Create a Catalog")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}", ApiVersion = "2024-04-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.NotSuggestDefaultParameterSet] + public partial class SetAzSphereCatalog_UpdateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Update operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Update operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Update operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("CatalogName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of SetAzSphereCatalog_UpdateViaJsonString + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereCatalog_UpdateViaJsonString Clone() + { + var clone = new SetAzSphereCatalog_UpdateViaJsonString(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + clone.JsonString = this.JsonString; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CatalogsCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CatalogsCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public SetAzSphereCatalog_UpdateViaJsonString() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereDeployment_UpdateExpanded.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereDeployment_UpdateExpanded.cs new file mode 100644 index 000000000000..24c8a177dbd2 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereDeployment_UpdateExpanded.cs @@ -0,0 +1,660 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group + /// name. + /// + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments/{deploymentName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Set, @"AzSphereDeployment_UpdateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments/{deploymentName}", ApiVersion = "2024-04-01")] + public partial class SetAzSphereDeployment_UpdateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// An deployment resource belonging to a device group resource. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Deployment(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Images deployed + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Images deployed")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Images deployed", + SerializedName = @"deployedImages", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage) })] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage[] DeployedImage { get => _resourceBody.DeployedImage?.ToArray() ?? null /* fixedArrayOf */; set => _resourceBody.DeployedImage = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// Deployment ID + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Deployment ID")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Deployment ID", + SerializedName = @"deploymentId", + PossibleTypes = new [] { typeof(string) })] + public string DeploymentId { get => _resourceBody.DeploymentId ?? null; set => _resourceBody.DeploymentId = value; } + + /// Backing field for property. + private string _deviceGroupName; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string DeviceGroupName { get => this._deviceGroupName; set => this._deviceGroupName = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// + /// Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group.", + SerializedName = @"deploymentName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeploymentName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of SetAzSphereDeployment_UpdateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereDeployment_UpdateExpanded Clone() + { + var clone = new SetAzSphereDeployment_UpdateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._resourceBody = this._resourceBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.CatalogName = this.CatalogName; + clone.ProductName = this.ProductName; + clone.DeviceGroupName = this.DeviceGroupName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DeploymentsCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DeploymentsCreateOrUpdate(SubscriptionId, ResourceGroupName, CatalogName, ProductName, DeviceGroupName, Name, _resourceBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,ProductName=ProductName,DeviceGroupName=DeviceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public SetAzSphereDeployment_UpdateExpanded() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereDeployment_UpdateViaJsonFilePath.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereDeployment_UpdateViaJsonFilePath.cs new file mode 100644 index 000000000000..ae832b85d139 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereDeployment_UpdateViaJsonFilePath.cs @@ -0,0 +1,650 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group + /// name. + /// + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments/{deploymentName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Set, @"AzSphereDeployment_UpdateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments/{deploymentName}", ApiVersion = "2024-04-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.NotSuggestDefaultParameterSet] + public partial class SetAzSphereDeployment_UpdateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + public global::System.String _jsonString; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _deviceGroupName; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string DeviceGroupName { get => this._deviceGroupName; set => this._deviceGroupName = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Update operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Update operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Update operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// + /// Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group.", + SerializedName = @"deploymentName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeploymentName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of SetAzSphereDeployment_UpdateViaJsonFilePath + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereDeployment_UpdateViaJsonFilePath Clone() + { + var clone = new SetAzSphereDeployment_UpdateViaJsonFilePath(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.CatalogName = this.CatalogName; + clone.ProductName = this.ProductName; + clone.DeviceGroupName = this.DeviceGroupName; + clone.Name = this.Name; + clone.JsonFilePath = this.JsonFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DeploymentsCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DeploymentsCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, CatalogName, ProductName, DeviceGroupName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,ProductName=ProductName,DeviceGroupName=DeviceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public SetAzSphereDeployment_UpdateViaJsonFilePath() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereDeployment_UpdateViaJsonString.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereDeployment_UpdateViaJsonString.cs new file mode 100644 index 000000000000..2ec3b31fb144 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereDeployment_UpdateViaJsonString.cs @@ -0,0 +1,648 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group + /// name. + /// + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments/{deploymentName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Set, @"AzSphereDeployment_UpdateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments/{deploymentName}", ApiVersion = "2024-04-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.NotSuggestDefaultParameterSet] + public partial class SetAzSphereDeployment_UpdateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _deviceGroupName; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string DeviceGroupName { get => this._deviceGroupName; set => this._deviceGroupName = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Update operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Update operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Update operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// + /// Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group.", + SerializedName = @"deploymentName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeploymentName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of SetAzSphereDeployment_UpdateViaJsonString + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereDeployment_UpdateViaJsonString Clone() + { + var clone = new SetAzSphereDeployment_UpdateViaJsonString(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.CatalogName = this.CatalogName; + clone.ProductName = this.ProductName; + clone.DeviceGroupName = this.DeviceGroupName; + clone.Name = this.Name; + clone.JsonString = this.JsonString; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DeploymentsCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DeploymentsCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, CatalogName, ProductName, DeviceGroupName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,ProductName=ProductName,DeviceGroupName=DeviceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public SetAzSphereDeployment_UpdateViaJsonString() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereDeviceGroup_UpdateExpanded.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereDeviceGroup_UpdateExpanded.cs new file mode 100644 index 000000000000..440b8dafc943 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereDeviceGroup_UpdateExpanded.cs @@ -0,0 +1,679 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device + /// group name. + /// + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Set, @"AzSphereDeviceGroup_UpdateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}", ApiVersion = "2024-04-01")] + public partial class SetAzSphereDeviceGroup_UpdateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// An device group resource belonging to a product resource. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroup(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Flag to define if the user allows for crash dump collection. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Flag to define if the user allows for crash dump collection.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Flag to define if the user allows for crash dump collection.", + SerializedName = @"allowCrashDumpsCollection", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Enabled", "Disabled")] + public string AllowCrashDumpsCollection { get => _resourceBody.AllowCrashDumpsCollection ?? null; set => _resourceBody.AllowCrashDumpsCollection = value; } + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Description of the device group. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Description of the device group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Description of the device group.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + public string Description { get => _resourceBody.Description ?? null; set => _resourceBody.Description = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// Operating system feed type of the device group. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Operating system feed type of the device group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Operating system feed type of the device group.", + SerializedName = @"osFeedType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Retail", "RetailEval")] + public string OSFeedType { get => _resourceBody.OSFeedType ?? null; set => _resourceBody.OSFeedType = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Regional data boundary for the device group. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Regional data boundary for the device group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Regional data boundary for the device group.", + SerializedName = @"regionalDataBoundary", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("None", "EU")] + public string RegionalDataBoundary { get => _resourceBody.RegionalDataBoundary ?? null; set => _resourceBody.RegionalDataBoundary = value; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Update policy of the device group. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Update policy of the device group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Update policy of the device group.", + SerializedName = @"updatePolicy", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("UpdateAll", "No3rdPartyAppUpdates")] + public string UpdatePolicy { get => _resourceBody.UpdatePolicy ?? null; set => _resourceBody.UpdatePolicy = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of SetAzSphereDeviceGroup_UpdateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereDeviceGroup_UpdateExpanded Clone() + { + var clone = new SetAzSphereDeviceGroup_UpdateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._resourceBody = this._resourceBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.CatalogName = this.CatalogName; + clone.ProductName = this.ProductName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DeviceGroupsCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DeviceGroupsCreateOrUpdate(SubscriptionId, ResourceGroupName, CatalogName, ProductName, Name, _resourceBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,ProductName=ProductName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public SetAzSphereDeviceGroup_UpdateExpanded() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereDeviceGroup_UpdateViaJsonFilePath.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereDeviceGroup_UpdateViaJsonFilePath.cs new file mode 100644 index 000000000000..2580d4d58940 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereDeviceGroup_UpdateViaJsonFilePath.cs @@ -0,0 +1,633 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device + /// group name. + /// + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Set, @"AzSphereDeviceGroup_UpdateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}", ApiVersion = "2024-04-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.NotSuggestDefaultParameterSet] + public partial class SetAzSphereDeviceGroup_UpdateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + public global::System.String _jsonString; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Update operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Update operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Update operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of SetAzSphereDeviceGroup_UpdateViaJsonFilePath + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereDeviceGroup_UpdateViaJsonFilePath Clone() + { + var clone = new SetAzSphereDeviceGroup_UpdateViaJsonFilePath(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.CatalogName = this.CatalogName; + clone.ProductName = this.ProductName; + clone.Name = this.Name; + clone.JsonFilePath = this.JsonFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DeviceGroupsCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DeviceGroupsCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, CatalogName, ProductName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,ProductName=ProductName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public SetAzSphereDeviceGroup_UpdateViaJsonFilePath() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereDeviceGroup_UpdateViaJsonString.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereDeviceGroup_UpdateViaJsonString.cs new file mode 100644 index 000000000000..0ab343e7c860 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereDeviceGroup_UpdateViaJsonString.cs @@ -0,0 +1,631 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device + /// group name. + /// + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Set, @"AzSphereDeviceGroup_UpdateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}", ApiVersion = "2024-04-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.NotSuggestDefaultParameterSet] + public partial class SetAzSphereDeviceGroup_UpdateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Update operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Update operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Update operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of SetAzSphereDeviceGroup_UpdateViaJsonString + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereDeviceGroup_UpdateViaJsonString Clone() + { + var clone = new SetAzSphereDeviceGroup_UpdateViaJsonString(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.CatalogName = this.CatalogName; + clone.ProductName = this.ProductName; + clone.Name = this.Name; + clone.JsonString = this.JsonString; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DeviceGroupsCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DeviceGroupsCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, CatalogName, ProductName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,ProductName=ProductName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public SetAzSphereDeviceGroup_UpdateViaJsonString() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereDevice_UpdateExpanded.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereDevice_UpdateExpanded.cs new file mode 100644 index 000000000000..baac71a2992c --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereDevice_UpdateExpanded.cs @@ -0,0 +1,647 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Create a Device. Use '.unassigned' or '.default' for the device group and product names to claim a device to the catalog + /// only. + /// + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Set, @"AzSphereDevice_UpdateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Create a Device. Use '.unassigned' or '.default' for the device group and product names to claim a device to the catalog only.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}", ApiVersion = "2024-04-01")] + public partial class SetAzSphereDevice_UpdateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// An device resource belonging to a device group resource. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Device(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Device ID + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Device ID")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Device ID", + SerializedName = @"deviceId", + PossibleTypes = new [] { typeof(string) })] + public string DeviceId { get => _resourceBody.DeviceId ?? null; set => _resourceBody.DeviceId = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// Backing field for property. + private string _groupName; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string GroupName { get => this._groupName; set => this._groupName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Device name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Device name")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Device name", + SerializedName = @"deviceName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of SetAzSphereDevice_UpdateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereDevice_UpdateExpanded Clone() + { + var clone = new SetAzSphereDevice_UpdateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._resourceBody = this._resourceBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.CatalogName = this.CatalogName; + clone.ProductName = this.ProductName; + clone.GroupName = this.GroupName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevicesCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevicesCreateOrUpdate(SubscriptionId, ResourceGroupName, CatalogName, ProductName, GroupName, Name, _resourceBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,ProductName=ProductName,GroupName=GroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public SetAzSphereDevice_UpdateExpanded() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereDevice_UpdateViaJsonFilePath.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereDevice_UpdateViaJsonFilePath.cs new file mode 100644 index 000000000000..60a681682769 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereDevice_UpdateViaJsonFilePath.cs @@ -0,0 +1,649 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Create a Device. Use '.unassigned' or '.default' for the device group and product names to claim a device to the catalog + /// only. + /// + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Set, @"AzSphereDevice_UpdateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Create a Device. Use '.unassigned' or '.default' for the device group and product names to claim a device to the catalog only.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}", ApiVersion = "2024-04-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.NotSuggestDefaultParameterSet] + public partial class SetAzSphereDevice_UpdateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + public global::System.String _jsonString; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// Backing field for property. + private string _groupName; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string GroupName { get => this._groupName; set => this._groupName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Update operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Update operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Update operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Device name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Device name")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Device name", + SerializedName = @"deviceName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of SetAzSphereDevice_UpdateViaJsonFilePath + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereDevice_UpdateViaJsonFilePath Clone() + { + var clone = new SetAzSphereDevice_UpdateViaJsonFilePath(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.CatalogName = this.CatalogName; + clone.ProductName = this.ProductName; + clone.GroupName = this.GroupName; + clone.Name = this.Name; + clone.JsonFilePath = this.JsonFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevicesCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevicesCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, CatalogName, ProductName, GroupName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,ProductName=ProductName,GroupName=GroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public SetAzSphereDevice_UpdateViaJsonFilePath() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereDevice_UpdateViaJsonString.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereDevice_UpdateViaJsonString.cs new file mode 100644 index 000000000000..48a25878b358 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereDevice_UpdateViaJsonString.cs @@ -0,0 +1,647 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Create a Device. Use '.unassigned' or '.default' for the device group and product names to claim a device to the catalog + /// only. + /// + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Set, @"AzSphereDevice_UpdateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Create a Device. Use '.unassigned' or '.default' for the device group and product names to claim a device to the catalog only.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}", ApiVersion = "2024-04-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.NotSuggestDefaultParameterSet] + public partial class SetAzSphereDevice_UpdateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// Backing field for property. + private string _groupName; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string GroupName { get => this._groupName; set => this._groupName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Update operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Update operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Update operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Device name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Device name")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Device name", + SerializedName = @"deviceName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of SetAzSphereDevice_UpdateViaJsonString + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereDevice_UpdateViaJsonString Clone() + { + var clone = new SetAzSphereDevice_UpdateViaJsonString(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.CatalogName = this.CatalogName; + clone.ProductName = this.ProductName; + clone.GroupName = this.GroupName; + clone.Name = this.Name; + clone.JsonString = this.JsonString; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevicesCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevicesCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, CatalogName, ProductName, GroupName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,ProductName=ProductName,GroupName=GroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public SetAzSphereDevice_UpdateViaJsonString() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereImage_UpdateExpanded.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereImage_UpdateExpanded.cs new file mode 100644 index 000000000000..1da5b20550c7 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereImage_UpdateExpanded.cs @@ -0,0 +1,638 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// Create a Image + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images/{imageName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Set, @"AzSphereImage_UpdateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Create a Image")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images/{imageName}", ApiVersion = "2024-04-01")] + public partial class SetAzSphereImage_UpdateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// An image resource belonging to a catalog resource. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Image(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// + /// Image as a UTF-8 encoded base 64 string on image create. This field contains the image URI on image reads. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Image as a UTF-8 encoded base 64 string on image create. This field contains the image URI on image reads.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Image as a UTF-8 encoded base 64 string on image create. This field contains the image URI on image reads.", + SerializedName = @"image", + PossibleTypes = new [] { typeof(string) })] + public string Image { get => _resourceBody.PropertiesImage ?? null; set => _resourceBody.PropertiesImage = value; } + + /// Image ID + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Image ID")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Image ID", + SerializedName = @"imageId", + PossibleTypes = new [] { typeof(string) })] + public string ImageId { get => _resourceBody.ImageId ?? null; set => _resourceBody.ImageId = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Image name. Use an image GUID for GA versions of the API. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Image name. Use an image GUID for GA versions of the API.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Image name. Use an image GUID for GA versions of the API.", + SerializedName = @"imageName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ImageName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Regional data boundary for an image + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Regional data boundary for an image")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Regional data boundary for an image", + SerializedName = @"regionalDataBoundary", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("None", "EU")] + public string RegionalDataBoundary { get => _resourceBody.RegionalDataBoundary ?? null; set => _resourceBody.RegionalDataBoundary = value; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of SetAzSphereImage_UpdateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereImage_UpdateExpanded Clone() + { + var clone = new SetAzSphereImage_UpdateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._resourceBody = this._resourceBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.CatalogName = this.CatalogName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ImagesCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ImagesCreateOrUpdate(SubscriptionId, ResourceGroupName, CatalogName, Name, _resourceBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public SetAzSphereImage_UpdateExpanded() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereImage_UpdateViaJsonFilePath.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereImage_UpdateViaJsonFilePath.cs new file mode 100644 index 000000000000..46a6ddaa1899 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereImage_UpdateViaJsonFilePath.cs @@ -0,0 +1,615 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// Create a Image + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images/{imageName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Set, @"AzSphereImage_UpdateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Create a Image")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images/{imageName}", ApiVersion = "2024-04-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.NotSuggestDefaultParameterSet] + public partial class SetAzSphereImage_UpdateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + public global::System.String _jsonString; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Update operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Update operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Update operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Image name. Use an image GUID for GA versions of the API. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Image name. Use an image GUID for GA versions of the API.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Image name. Use an image GUID for GA versions of the API.", + SerializedName = @"imageName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ImageName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of SetAzSphereImage_UpdateViaJsonFilePath + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereImage_UpdateViaJsonFilePath Clone() + { + var clone = new SetAzSphereImage_UpdateViaJsonFilePath(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.CatalogName = this.CatalogName; + clone.Name = this.Name; + clone.JsonFilePath = this.JsonFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ImagesCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ImagesCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, CatalogName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public SetAzSphereImage_UpdateViaJsonFilePath() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereImage_UpdateViaJsonString.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereImage_UpdateViaJsonString.cs new file mode 100644 index 000000000000..ca6d1d66e95e --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereImage_UpdateViaJsonString.cs @@ -0,0 +1,613 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// Create a Image + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images/{imageName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Set, @"AzSphereImage_UpdateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Create a Image")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images/{imageName}", ApiVersion = "2024-04-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.NotSuggestDefaultParameterSet] + public partial class SetAzSphereImage_UpdateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Update operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Update operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Update operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Image name. Use an image GUID for GA versions of the API. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Image name. Use an image GUID for GA versions of the API.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Image name. Use an image GUID for GA versions of the API.", + SerializedName = @"imageName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ImageName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of SetAzSphereImage_UpdateViaJsonString + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereImage_UpdateViaJsonString Clone() + { + var clone = new SetAzSphereImage_UpdateViaJsonString(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.CatalogName = this.CatalogName; + clone.Name = this.Name; + clone.JsonString = this.JsonString; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ImagesCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ImagesCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, CatalogName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public SetAzSphereImage_UpdateViaJsonString() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereProduct_UpdateExpanded.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereProduct_UpdateExpanded.cs new file mode 100644 index 000000000000..0f47025bc289 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereProduct_UpdateExpanded.cs @@ -0,0 +1,615 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Create a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. + /// + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Set, @"AzSphereProduct_UpdateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Create a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}", ApiVersion = "2024-04-01")] + public partial class SetAzSphereProduct_UpdateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// An product resource belonging to a catalog resource. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Product(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Description of the product + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Description of the product")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Description of the product", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + public string Description { get => _resourceBody.Description ?? null; set => _resourceBody.Description = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ProductName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of SetAzSphereProduct_UpdateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereProduct_UpdateExpanded Clone() + { + var clone = new SetAzSphereProduct_UpdateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._resourceBody = this._resourceBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.CatalogName = this.CatalogName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProductsCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProductsCreateOrUpdate(SubscriptionId, ResourceGroupName, CatalogName, Name, _resourceBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeCreate); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public SetAzSphereProduct_UpdateExpanded() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereProduct_UpdateViaJsonFilePath.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereProduct_UpdateViaJsonFilePath.cs new file mode 100644 index 000000000000..c0ef0988e2e0 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereProduct_UpdateViaJsonFilePath.cs @@ -0,0 +1,617 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Create a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. + /// + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Set, @"AzSphereProduct_UpdateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Create a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}", ApiVersion = "2024-04-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.NotSuggestDefaultParameterSet] + public partial class SetAzSphereProduct_UpdateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + public global::System.String _jsonString; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Update operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Update operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Update operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ProductName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of SetAzSphereProduct_UpdateViaJsonFilePath + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereProduct_UpdateViaJsonFilePath Clone() + { + var clone = new SetAzSphereProduct_UpdateViaJsonFilePath(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.CatalogName = this.CatalogName; + clone.Name = this.Name; + clone.JsonFilePath = this.JsonFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProductsCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProductsCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, CatalogName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public SetAzSphereProduct_UpdateViaJsonFilePath() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereProduct_UpdateViaJsonString.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereProduct_UpdateViaJsonString.cs new file mode 100644 index 000000000000..eff875c43007 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/SetAzSphereProduct_UpdateViaJsonString.cs @@ -0,0 +1,615 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Create a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. + /// + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Set, @"AzSphereProduct_UpdateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Create a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}", ApiVersion = "2024-04-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.NotSuggestDefaultParameterSet] + public partial class SetAzSphereProduct_UpdateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Update operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Update operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Update operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ProductName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of SetAzSphereProduct_UpdateViaJsonString + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereProduct_UpdateViaJsonString Clone() + { + var clone = new SetAzSphereProduct_UpdateViaJsonString(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.CatalogName = this.CatalogName; + clone.Name = this.Name; + clone.JsonString = this.JsonString; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProductsCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProductsCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, CatalogName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public SetAzSphereProduct_UpdateViaJsonString() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereCatalog_UpdateExpanded.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereCatalog_UpdateExpanded.cs new file mode 100644 index 000000000000..76643cb21a99 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereCatalog_UpdateExpanded.cs @@ -0,0 +1,515 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// Update a Catalog + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzSphereCatalog_UpdateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Update a Catalog")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}", ApiVersion = "2024-04-01")] + public partial class UpdateAzSphereCatalog_UpdateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// The type used for update operations of the Catalog. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CatalogUpdate(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("CatalogName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Resource tags. + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogUpdateTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogUpdateTags Tag { get => _propertiesBody.Tag ?? null /* object */; set => _propertiesBody.Tag = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CatalogsUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CatalogsUpdate(SubscriptionId, ResourceGroupName, Name, _propertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzSphereCatalog_UpdateExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereCatalog_UpdateViaIdentityExpanded.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereCatalog_UpdateViaIdentityExpanded.cs new file mode 100644 index 000000000000..1bc84116c045 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereCatalog_UpdateViaIdentityExpanded.cs @@ -0,0 +1,495 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// Update a Catalog + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzSphereCatalog_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Update a Catalog")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}", ApiVersion = "2024-04-01")] + public partial class UpdateAzSphereCatalog_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// The type used for update operations of the Catalog. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.CatalogUpdate(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Resource tags. + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogUpdateTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalogUpdateTags Tag { get => _propertiesBody.Tag ?? null /* object */; set => _propertiesBody.Tag = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CatalogsUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.CatalogsUpdateViaIdentity(InputObject.Id, _propertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.CatalogsUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.CatalogName ?? null, _propertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzSphereCatalog_UpdateViaIdentityExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereCatalog_UpdateViaJsonFilePath.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereCatalog_UpdateViaJsonFilePath.cs new file mode 100644 index 000000000000..54af2bfb0de7 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereCatalog_UpdateViaJsonFilePath.cs @@ -0,0 +1,516 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// Update a Catalog + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzSphereCatalog_UpdateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Update a Catalog")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}", ApiVersion = "2024-04-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.NotSuggestDefaultParameterSet] + public partial class UpdateAzSphereCatalog_UpdateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + public global::System.String _jsonString; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Update operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Update operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Update operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("CatalogName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CatalogsUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CatalogsUpdateViaJsonString(SubscriptionId, ResourceGroupName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzSphereCatalog_UpdateViaJsonFilePath() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereCatalog_UpdateViaJsonString.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereCatalog_UpdateViaJsonString.cs new file mode 100644 index 000000000000..10f7f5387103 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereCatalog_UpdateViaJsonString.cs @@ -0,0 +1,514 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// Update a Catalog + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzSphereCatalog_UpdateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Update a Catalog")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}", ApiVersion = "2024-04-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.NotSuggestDefaultParameterSet] + public partial class UpdateAzSphereCatalog_UpdateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Update operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Update operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Update operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("CatalogName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CatalogsUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CatalogsUpdateViaJsonString(SubscriptionId, ResourceGroupName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzSphereCatalog_UpdateViaJsonString() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateExpanded.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateExpanded.cs new file mode 100644 index 000000000000..99fc1ac687c3 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateExpanded.cs @@ -0,0 +1,678 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device + /// group name. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzSphereDeviceGroup_UpdateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}", ApiVersion = "2024-04-01")] + public partial class UpdateAzSphereDeviceGroup_UpdateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// The type used for update operations of the DeviceGroup. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroupUpdate(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Flag to define if the user allows for crash dump collection. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Flag to define if the user allows for crash dump collection.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Flag to define if the user allows for crash dump collection.", + SerializedName = @"allowCrashDumpsCollection", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Enabled", "Disabled")] + public string AllowCrashDumpsCollection { get => _propertiesBody.AllowCrashDumpsCollection ?? null; set => _propertiesBody.AllowCrashDumpsCollection = value; } + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Description of the device group. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Description of the device group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Description of the device group.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + public string Description { get => _propertiesBody.Description ?? null; set => _propertiesBody.Description = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// Operating system feed type of the device group. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Operating system feed type of the device group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Operating system feed type of the device group.", + SerializedName = @"osFeedType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Retail", "RetailEval")] + public string OSFeedType { get => _propertiesBody.OSFeedType ?? null; set => _propertiesBody.OSFeedType = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Regional data boundary for the device group. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Regional data boundary for the device group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Regional data boundary for the device group.", + SerializedName = @"regionalDataBoundary", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("None", "EU")] + public string RegionalDataBoundary { get => _propertiesBody.RegionalDataBoundary ?? null; set => _propertiesBody.RegionalDataBoundary = value; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Update policy of the device group. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Update policy of the device group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Update policy of the device group.", + SerializedName = @"updatePolicy", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("UpdateAll", "No3rdPartyAppUpdates")] + public string UpdatePolicy { get => _propertiesBody.UpdatePolicy ?? null; set => _propertiesBody.UpdatePolicy = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzSphereDeviceGroup_UpdateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereDeviceGroup_UpdateExpanded Clone() + { + var clone = new UpdateAzSphereDeviceGroup_UpdateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._propertiesBody = this._propertiesBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.CatalogName = this.CatalogName; + clone.ProductName = this.ProductName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DeviceGroupsUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DeviceGroupsUpdate(SubscriptionId, ResourceGroupName, CatalogName, ProductName, Name, _propertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,ProductName=ProductName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzSphereDeviceGroup_UpdateExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaIdentityCatalogExpanded.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaIdentityCatalogExpanded.cs new file mode 100644 index 000000000000..1d52650cd87b --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaIdentityCatalogExpanded.cs @@ -0,0 +1,659 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device + /// group name. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzSphereDeviceGroup_UpdateViaIdentityCatalogExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}", ApiVersion = "2024-04-01")] + public partial class UpdateAzSphereDeviceGroup_UpdateViaIdentityCatalogExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// The type used for update operations of the DeviceGroup. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroupUpdate(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Flag to define if the user allows for crash dump collection. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Flag to define if the user allows for crash dump collection.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Flag to define if the user allows for crash dump collection.", + SerializedName = @"allowCrashDumpsCollection", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Enabled", "Disabled")] + public string AllowCrashDumpsCollection { get => _propertiesBody.AllowCrashDumpsCollection ?? null; set => _propertiesBody.AllowCrashDumpsCollection = value; } + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _catalogInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity CatalogInputObject { get => this._catalogInputObject; set => this._catalogInputObject = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Description of the device group. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Description of the device group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Description of the device group.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + public string Description { get => _propertiesBody.Description ?? null; set => _propertiesBody.Description = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// Operating system feed type of the device group. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Operating system feed type of the device group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Operating system feed type of the device group.", + SerializedName = @"osFeedType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Retail", "RetailEval")] + public string OSFeedType { get => _propertiesBody.OSFeedType ?? null; set => _propertiesBody.OSFeedType = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Regional data boundary for the device group. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Regional data boundary for the device group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Regional data boundary for the device group.", + SerializedName = @"regionalDataBoundary", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("None", "EU")] + public string RegionalDataBoundary { get => _propertiesBody.RegionalDataBoundary ?? null; set => _propertiesBody.RegionalDataBoundary = value; } + + /// Update policy of the device group. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Update policy of the device group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Update policy of the device group.", + SerializedName = @"updatePolicy", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("UpdateAll", "No3rdPartyAppUpdates")] + public string UpdatePolicy { get => _propertiesBody.UpdatePolicy ?? null; set => _propertiesBody.UpdatePolicy = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of UpdateAzSphereDeviceGroup_UpdateViaIdentityCatalogExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereDeviceGroup_UpdateViaIdentityCatalogExpanded Clone() + { + var clone = new UpdateAzSphereDeviceGroup_UpdateViaIdentityCatalogExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._propertiesBody = this._propertiesBody; + clone.ProductName = this.ProductName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DeviceGroupsUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (CatalogInputObject?.Id != null) + { + this.CatalogInputObject.Id += $"/products/{(global::System.Uri.EscapeDataString(this.ProductName.ToString()))}/deviceGroups/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.DeviceGroupsUpdateViaIdentity(CatalogInputObject.Id, _propertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == CatalogInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + if (null == CatalogInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + if (null == CatalogInputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + await this.Client.DeviceGroupsUpdate(CatalogInputObject.SubscriptionId ?? null, CatalogInputObject.ResourceGroupName ?? null, CatalogInputObject.CatalogName ?? null, ProductName, Name, _propertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ProductName=ProductName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzSphereDeviceGroup_UpdateViaIdentityCatalogExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaIdentityExpanded.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaIdentityExpanded.cs new file mode 100644 index 000000000000..3bfbebb01d8c --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaIdentityExpanded.cs @@ -0,0 +1,633 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device + /// group name. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzSphereDeviceGroup_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}", ApiVersion = "2024-04-01")] + public partial class UpdateAzSphereDeviceGroup_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// The type used for update operations of the DeviceGroup. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroupUpdate(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Flag to define if the user allows for crash dump collection. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Flag to define if the user allows for crash dump collection.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Flag to define if the user allows for crash dump collection.", + SerializedName = @"allowCrashDumpsCollection", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Enabled", "Disabled")] + public string AllowCrashDumpsCollection { get => _propertiesBody.AllowCrashDumpsCollection ?? null; set => _propertiesBody.AllowCrashDumpsCollection = value; } + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Description of the device group. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Description of the device group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Description of the device group.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + public string Description { get => _propertiesBody.Description ?? null; set => _propertiesBody.Description = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// Operating system feed type of the device group. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Operating system feed type of the device group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Operating system feed type of the device group.", + SerializedName = @"osFeedType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Retail", "RetailEval")] + public string OSFeedType { get => _propertiesBody.OSFeedType ?? null; set => _propertiesBody.OSFeedType = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Regional data boundary for the device group. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Regional data boundary for the device group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Regional data boundary for the device group.", + SerializedName = @"regionalDataBoundary", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("None", "EU")] + public string RegionalDataBoundary { get => _propertiesBody.RegionalDataBoundary ?? null; set => _propertiesBody.RegionalDataBoundary = value; } + + /// Update policy of the device group. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Update policy of the device group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Update policy of the device group.", + SerializedName = @"updatePolicy", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("UpdateAll", "No3rdPartyAppUpdates")] + public string UpdatePolicy { get => _propertiesBody.UpdatePolicy ?? null; set => _propertiesBody.UpdatePolicy = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzSphereDeviceGroup_UpdateViaIdentityExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereDeviceGroup_UpdateViaIdentityExpanded Clone() + { + var clone = new UpdateAzSphereDeviceGroup_UpdateViaIdentityExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._propertiesBody = this._propertiesBody; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DeviceGroupsUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.DeviceGroupsUpdateViaIdentity(InputObject.Id, _propertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProductName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProductName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.DeviceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.DeviceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.DeviceGroupsUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.CatalogName ?? null, InputObject.ProductName ?? null, InputObject.DeviceGroupName ?? null, _propertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzSphereDeviceGroup_UpdateViaIdentityExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaIdentityProductExpanded.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaIdentityProductExpanded.cs new file mode 100644 index 000000000000..d7d3a80b04b2 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaIdentityProductExpanded.cs @@ -0,0 +1,648 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device + /// group name. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzSphereDeviceGroup_UpdateViaIdentityProductExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}", ApiVersion = "2024-04-01")] + public partial class UpdateAzSphereDeviceGroup_UpdateViaIdentityProductExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// The type used for update operations of the DeviceGroup. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroupUpdate(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Flag to define if the user allows for crash dump collection. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Flag to define if the user allows for crash dump collection.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Flag to define if the user allows for crash dump collection.", + SerializedName = @"allowCrashDumpsCollection", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Enabled", "Disabled")] + public string AllowCrashDumpsCollection { get => _propertiesBody.AllowCrashDumpsCollection ?? null; set => _propertiesBody.AllowCrashDumpsCollection = value; } + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Description of the device group. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Description of the device group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Description of the device group.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + public string Description { get => _propertiesBody.Description ?? null; set => _propertiesBody.Description = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// Operating system feed type of the device group. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Operating system feed type of the device group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Operating system feed type of the device group.", + SerializedName = @"osFeedType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Retail", "RetailEval")] + public string OSFeedType { get => _propertiesBody.OSFeedType ?? null; set => _propertiesBody.OSFeedType = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _productInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity ProductInputObject { get => this._productInputObject; set => this._productInputObject = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Regional data boundary for the device group. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Regional data boundary for the device group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Regional data boundary for the device group.", + SerializedName = @"regionalDataBoundary", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("None", "EU")] + public string RegionalDataBoundary { get => _propertiesBody.RegionalDataBoundary ?? null; set => _propertiesBody.RegionalDataBoundary = value; } + + /// Update policy of the device group. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Update policy of the device group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Update policy of the device group.", + SerializedName = @"updatePolicy", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("UpdateAll", "No3rdPartyAppUpdates")] + public string UpdatePolicy { get => _propertiesBody.UpdatePolicy ?? null; set => _propertiesBody.UpdatePolicy = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of UpdateAzSphereDeviceGroup_UpdateViaIdentityProductExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereDeviceGroup_UpdateViaIdentityProductExpanded Clone() + { + var clone = new UpdateAzSphereDeviceGroup_UpdateViaIdentityProductExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._propertiesBody = this._propertiesBody; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DeviceGroupsUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (ProductInputObject?.Id != null) + { + this.ProductInputObject.Id += $"/deviceGroups/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.DeviceGroupsUpdateViaIdentity(ProductInputObject.Id, _propertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == ProductInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProductInputObject has null value for ProductInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProductInputObject) ); + } + if (null == ProductInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProductInputObject has null value for ProductInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProductInputObject) ); + } + if (null == ProductInputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProductInputObject has null value for ProductInputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProductInputObject) ); + } + if (null == ProductInputObject.ProductName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProductInputObject has null value for ProductInputObject.ProductName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProductInputObject) ); + } + await this.Client.DeviceGroupsUpdate(ProductInputObject.SubscriptionId ?? null, ProductInputObject.ResourceGroupName ?? null, ProductInputObject.CatalogName ?? null, ProductInputObject.ProductName ?? null, Name, _propertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzSphereDeviceGroup_UpdateViaIdentityProductExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaJsonFilePath.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaJsonFilePath.cs new file mode 100644 index 000000000000..1a4b9a2682a9 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaJsonFilePath.cs @@ -0,0 +1,632 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device + /// group name. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzSphereDeviceGroup_UpdateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}", ApiVersion = "2024-04-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.NotSuggestDefaultParameterSet] + public partial class UpdateAzSphereDeviceGroup_UpdateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + public global::System.String _jsonString; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Update operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Update operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Update operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzSphereDeviceGroup_UpdateViaJsonFilePath + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereDeviceGroup_UpdateViaJsonFilePath Clone() + { + var clone = new UpdateAzSphereDeviceGroup_UpdateViaJsonFilePath(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.CatalogName = this.CatalogName; + clone.ProductName = this.ProductName; + clone.Name = this.Name; + clone.JsonFilePath = this.JsonFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DeviceGroupsUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DeviceGroupsUpdateViaJsonString(SubscriptionId, ResourceGroupName, CatalogName, ProductName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,ProductName=ProductName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzSphereDeviceGroup_UpdateViaJsonFilePath() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaJsonString.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaJsonString.cs new file mode 100644 index 000000000000..7b7956232407 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaJsonString.cs @@ -0,0 +1,630 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device + /// group name. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzSphereDeviceGroup_UpdateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}", ApiVersion = "2024-04-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.NotSuggestDefaultParameterSet] + public partial class UpdateAzSphereDeviceGroup_UpdateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Update operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Update operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Update operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzSphereDeviceGroup_UpdateViaJsonString + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereDeviceGroup_UpdateViaJsonString Clone() + { + var clone = new UpdateAzSphereDeviceGroup_UpdateViaJsonString(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.CatalogName = this.CatalogName; + clone.ProductName = this.ProductName; + clone.Name = this.Name; + clone.JsonString = this.JsonString; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DeviceGroupsUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DeviceGroupsUpdateViaJsonString(SubscriptionId, ResourceGroupName, CatalogName, ProductName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,ProductName=ProductName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzSphereDeviceGroup_UpdateViaJsonString() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDevice_UpdateExpanded.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDevice_UpdateExpanded.cs new file mode 100644 index 000000000000..648d16522ea9 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDevice_UpdateExpanded.cs @@ -0,0 +1,646 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the catalog + /// level. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzSphereDevice_UpdateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the catalog level.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}", ApiVersion = "2024-04-01")] + public partial class UpdateAzSphereDevice_UpdateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// The type used for update operations of the Device. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceUpdate(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Device group id + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Device group id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Device group id", + SerializedName = @"deviceGroupId", + PossibleTypes = new [] { typeof(string) })] + public string DeviceGroupId { get => _propertiesBody.DeviceGroupId ?? null; set => _propertiesBody.DeviceGroupId = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// Backing field for property. + private string _groupName; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string GroupName { get => this._groupName; set => this._groupName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Device name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Device name")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Device name", + SerializedName = @"deviceName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzSphereDevice_UpdateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereDevice_UpdateExpanded Clone() + { + var clone = new UpdateAzSphereDevice_UpdateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._propertiesBody = this._propertiesBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.CatalogName = this.CatalogName; + clone.ProductName = this.ProductName; + clone.GroupName = this.GroupName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevicesUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevicesUpdate(SubscriptionId, ResourceGroupName, CatalogName, ProductName, GroupName, Name, _propertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,ProductName=ProductName,GroupName=GroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzSphereDevice_UpdateExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityCatalogExpanded.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityCatalogExpanded.cs new file mode 100644 index 000000000000..85e63b3c3873 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityCatalogExpanded.cs @@ -0,0 +1,625 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the catalog + /// level. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzSphereDevice_UpdateViaIdentityCatalogExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the catalog level.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}", ApiVersion = "2024-04-01")] + public partial class UpdateAzSphereDevice_UpdateViaIdentityCatalogExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// The type used for update operations of the Device. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceUpdate(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _catalogInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity CatalogInputObject { get => this._catalogInputObject; set => this._catalogInputObject = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Device group id + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Device group id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Device group id", + SerializedName = @"deviceGroupId", + PossibleTypes = new [] { typeof(string) })] + public string DeviceGroupId { get => _propertiesBody.DeviceGroupId ?? null; set => _propertiesBody.DeviceGroupId = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// Backing field for property. + private string _groupName; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string GroupName { get => this._groupName; set => this._groupName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Device name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Device name")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Device name", + SerializedName = @"deviceName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzSphereDevice_UpdateViaIdentityCatalogExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereDevice_UpdateViaIdentityCatalogExpanded Clone() + { + var clone = new UpdateAzSphereDevice_UpdateViaIdentityCatalogExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._propertiesBody = this._propertiesBody; + clone.ProductName = this.ProductName; + clone.GroupName = this.GroupName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevicesUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (CatalogInputObject?.Id != null) + { + this.CatalogInputObject.Id += $"/products/{(global::System.Uri.EscapeDataString(this.ProductName.ToString()))}/deviceGroups/{(global::System.Uri.EscapeDataString(this.GroupName.ToString()))}/devices/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.DevicesUpdateViaIdentity(CatalogInputObject.Id, _propertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == CatalogInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + if (null == CatalogInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + if (null == CatalogInputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + await this.Client.DevicesUpdate(CatalogInputObject.SubscriptionId ?? null, CatalogInputObject.ResourceGroupName ?? null, CatalogInputObject.CatalogName ?? null, ProductName, GroupName, Name, _propertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ProductName=ProductName,GroupName=GroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzSphereDevice_UpdateViaIdentityCatalogExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityDeviceGroupExpanded.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityDeviceGroupExpanded.cs new file mode 100644 index 000000000000..5de7e1edd5d2 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityDeviceGroupExpanded.cs @@ -0,0 +1,604 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the catalog + /// level. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzSphereDevice_UpdateViaIdentityDeviceGroupExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the catalog level.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}", ApiVersion = "2024-04-01")] + public partial class UpdateAzSphereDevice_UpdateViaIdentityDeviceGroupExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// The type used for update operations of the Device. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceUpdate(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Device group id + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Device group id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Device group id", + SerializedName = @"deviceGroupId", + PossibleTypes = new [] { typeof(string) })] + public string DeviceGroupId { get => _propertiesBody.DeviceGroupId ?? null; set => _propertiesBody.DeviceGroupId = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _deviceGroupInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity DeviceGroupInputObject { get => this._deviceGroupInputObject; set => this._deviceGroupInputObject = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Device name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Device name")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Device name", + SerializedName = @"deviceName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of UpdateAzSphereDevice_UpdateViaIdentityDeviceGroupExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereDevice_UpdateViaIdentityDeviceGroupExpanded Clone() + { + var clone = new UpdateAzSphereDevice_UpdateViaIdentityDeviceGroupExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._propertiesBody = this._propertiesBody; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevicesUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (DeviceGroupInputObject?.Id != null) + { + this.DeviceGroupInputObject.Id += $"/devices/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.DevicesUpdateViaIdentity(DeviceGroupInputObject.Id, _propertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == DeviceGroupInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("DeviceGroupInputObject has null value for DeviceGroupInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, DeviceGroupInputObject) ); + } + if (null == DeviceGroupInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("DeviceGroupInputObject has null value for DeviceGroupInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, DeviceGroupInputObject) ); + } + if (null == DeviceGroupInputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("DeviceGroupInputObject has null value for DeviceGroupInputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, DeviceGroupInputObject) ); + } + if (null == DeviceGroupInputObject.ProductName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("DeviceGroupInputObject has null value for DeviceGroupInputObject.ProductName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, DeviceGroupInputObject) ); + } + if (null == DeviceGroupInputObject.DeviceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("DeviceGroupInputObject has null value for DeviceGroupInputObject.DeviceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, DeviceGroupInputObject) ); + } + await this.Client.DevicesUpdate(DeviceGroupInputObject.SubscriptionId ?? null, DeviceGroupInputObject.ResourceGroupName ?? null, DeviceGroupInputObject.CatalogName ?? null, DeviceGroupInputObject.ProductName ?? null, DeviceGroupInputObject.DeviceGroupName ?? null, Name, _propertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzSphereDevice_UpdateViaIdentityDeviceGroupExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityExpanded.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityExpanded.cs new file mode 100644 index 000000000000..5c51f12cfaeb --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityExpanded.cs @@ -0,0 +1,589 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the catalog + /// level. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzSphereDevice_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the catalog level.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}", ApiVersion = "2024-04-01")] + public partial class UpdateAzSphereDevice_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// The type used for update operations of the Device. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceUpdate(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Device group id + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Device group id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Device group id", + SerializedName = @"deviceGroupId", + PossibleTypes = new [] { typeof(string) })] + public string DeviceGroupId { get => _propertiesBody.DeviceGroupId ?? null; set => _propertiesBody.DeviceGroupId = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzSphereDevice_UpdateViaIdentityExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereDevice_UpdateViaIdentityExpanded Clone() + { + var clone = new UpdateAzSphereDevice_UpdateViaIdentityExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._propertiesBody = this._propertiesBody; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevicesUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.DevicesUpdateViaIdentity(InputObject.Id, _propertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProductName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProductName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.DeviceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.DeviceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.DeviceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.DeviceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.DevicesUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.CatalogName ?? null, InputObject.ProductName ?? null, InputObject.DeviceGroupName ?? null, InputObject.DeviceName ?? null, _propertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzSphereDevice_UpdateViaIdentityExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityProductExpanded.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityProductExpanded.cs new file mode 100644 index 000000000000..3ddcfafd08ea --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityProductExpanded.cs @@ -0,0 +1,614 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the catalog + /// level. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzSphereDevice_UpdateViaIdentityProductExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the catalog level.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}", ApiVersion = "2024-04-01")] + public partial class UpdateAzSphereDevice_UpdateViaIdentityProductExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// The type used for update operations of the Device. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceUpdate(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Device group id + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Device group id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Device group id", + SerializedName = @"deviceGroupId", + PossibleTypes = new [] { typeof(string) })] + public string DeviceGroupId { get => _propertiesBody.DeviceGroupId ?? null; set => _propertiesBody.DeviceGroupId = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// Backing field for property. + private string _groupName; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string GroupName { get => this._groupName; set => this._groupName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Device name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Device name")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Device name", + SerializedName = @"deviceName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _productInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity ProductInputObject { get => this._productInputObject; set => this._productInputObject = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzSphereDevice_UpdateViaIdentityProductExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereDevice_UpdateViaIdentityProductExpanded Clone() + { + var clone = new UpdateAzSphereDevice_UpdateViaIdentityProductExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._propertiesBody = this._propertiesBody; + clone.GroupName = this.GroupName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevicesUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (ProductInputObject?.Id != null) + { + this.ProductInputObject.Id += $"/deviceGroups/{(global::System.Uri.EscapeDataString(this.GroupName.ToString()))}/devices/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.DevicesUpdateViaIdentity(ProductInputObject.Id, _propertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == ProductInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProductInputObject has null value for ProductInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProductInputObject) ); + } + if (null == ProductInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProductInputObject has null value for ProductInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProductInputObject) ); + } + if (null == ProductInputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProductInputObject has null value for ProductInputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProductInputObject) ); + } + if (null == ProductInputObject.ProductName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProductInputObject has null value for ProductInputObject.ProductName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProductInputObject) ); + } + await this.Client.DevicesUpdate(ProductInputObject.SubscriptionId ?? null, ProductInputObject.ResourceGroupName ?? null, ProductInputObject.CatalogName ?? null, ProductInputObject.ProductName ?? null, GroupName, Name, _propertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { GroupName=GroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzSphereDevice_UpdateViaIdentityProductExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDevice_UpdateViaJsonFilePath.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDevice_UpdateViaJsonFilePath.cs new file mode 100644 index 000000000000..7dd8d45eba7d --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDevice_UpdateViaJsonFilePath.cs @@ -0,0 +1,648 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the catalog + /// level. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzSphereDevice_UpdateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the catalog level.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}", ApiVersion = "2024-04-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.NotSuggestDefaultParameterSet] + public partial class UpdateAzSphereDevice_UpdateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + public global::System.String _jsonString; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// Backing field for property. + private string _groupName; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string GroupName { get => this._groupName; set => this._groupName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Update operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Update operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Update operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Device name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Device name")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Device name", + SerializedName = @"deviceName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzSphereDevice_UpdateViaJsonFilePath + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereDevice_UpdateViaJsonFilePath Clone() + { + var clone = new UpdateAzSphereDevice_UpdateViaJsonFilePath(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.CatalogName = this.CatalogName; + clone.ProductName = this.ProductName; + clone.GroupName = this.GroupName; + clone.Name = this.Name; + clone.JsonFilePath = this.JsonFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevicesUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevicesUpdateViaJsonString(SubscriptionId, ResourceGroupName, CatalogName, ProductName, GroupName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,ProductName=ProductName,GroupName=GroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzSphereDevice_UpdateViaJsonFilePath() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDevice_UpdateViaJsonString.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDevice_UpdateViaJsonString.cs new file mode 100644 index 000000000000..d785363551f4 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereDevice_UpdateViaJsonString.cs @@ -0,0 +1,646 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the catalog + /// level. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzSphereDevice_UpdateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the catalog level.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}", ApiVersion = "2024-04-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.NotSuggestDefaultParameterSet] + public partial class UpdateAzSphereDevice_UpdateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// Backing field for property. + private string _groupName; + + /// Name of device group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of device group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of device group.", + SerializedName = @"deviceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string GroupName { get => this._groupName; set => this._groupName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Update operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Update operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Update operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Device name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Device name")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Device name", + SerializedName = @"deviceName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DeviceName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _productName; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ProductName { get => this._productName; set => this._productName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzSphereDevice_UpdateViaJsonString + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereDevice_UpdateViaJsonString Clone() + { + var clone = new UpdateAzSphereDevice_UpdateViaJsonString(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.CatalogName = this.CatalogName; + clone.ProductName = this.ProductName; + clone.GroupName = this.GroupName; + clone.Name = this.Name; + clone.JsonString = this.JsonString; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevicesUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevicesUpdateViaJsonString(SubscriptionId, ResourceGroupName, CatalogName, ProductName, GroupName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,ProductName=ProductName,GroupName=GroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzSphereDevice_UpdateViaJsonString() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereProduct_UpdateExpanded.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereProduct_UpdateExpanded.cs new file mode 100644 index 000000000000..5b9d288ba634 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereProduct_UpdateExpanded.cs @@ -0,0 +1,614 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Update a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzSphereProduct_UpdateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Update a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}", ApiVersion = "2024-04-01")] + public partial class UpdateAzSphereProduct_UpdateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// The type used for update operations of the Product. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProductUpdate(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Description of the product + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Description of the product")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Description of the product", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + public string Description { get => _propertiesBody.Description ?? null; set => _propertiesBody.Description = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ProductName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzSphereProduct_UpdateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereProduct_UpdateExpanded Clone() + { + var clone = new UpdateAzSphereProduct_UpdateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._propertiesBody = this._propertiesBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.CatalogName = this.CatalogName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProductsUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProductsUpdate(SubscriptionId, ResourceGroupName, CatalogName, Name, _propertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzSphereProduct_UpdateExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereProduct_UpdateViaIdentityCatalogExpanded.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereProduct_UpdateViaIdentityCatalogExpanded.cs new file mode 100644 index 000000000000..b49cfdd09992 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereProduct_UpdateViaIdentityCatalogExpanded.cs @@ -0,0 +1,593 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Update a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzSphereProduct_UpdateViaIdentityCatalogExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Update a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}", ApiVersion = "2024-04-01")] + public partial class UpdateAzSphereProduct_UpdateViaIdentityCatalogExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// The type used for update operations of the Product. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProductUpdate(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _catalogInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity CatalogInputObject { get => this._catalogInputObject; set => this._catalogInputObject = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Description of the product + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Description of the product")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Description of the product", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + public string Description { get => _propertiesBody.Description ?? null; set => _propertiesBody.Description = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ProductName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzSphereProduct_UpdateViaIdentityCatalogExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereProduct_UpdateViaIdentityCatalogExpanded Clone() + { + var clone = new UpdateAzSphereProduct_UpdateViaIdentityCatalogExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._propertiesBody = this._propertiesBody; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProductsUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (CatalogInputObject?.Id != null) + { + this.CatalogInputObject.Id += $"/products/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.ProductsUpdateViaIdentity(CatalogInputObject.Id, _propertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == CatalogInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + if (null == CatalogInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + if (null == CatalogInputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CatalogInputObject has null value for CatalogInputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CatalogInputObject) ); + } + await this.Client.ProductsUpdate(CatalogInputObject.SubscriptionId ?? null, CatalogInputObject.ResourceGroupName ?? null, CatalogInputObject.CatalogName ?? null, Name, _propertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzSphereProduct_UpdateViaIdentityCatalogExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereProduct_UpdateViaIdentityExpanded.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereProduct_UpdateViaIdentityExpanded.cs new file mode 100644 index 000000000000..267557918224 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereProduct_UpdateViaIdentityExpanded.cs @@ -0,0 +1,580 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Update a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzSphereProduct_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Update a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}", ApiVersion = "2024-04-01")] + public partial class UpdateAzSphereProduct_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// The type used for update operations of the Product. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProductUpdate(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Description of the product + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Description of the product")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Description of the product", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + public string Description { get => _propertiesBody.Description ?? null; set => _propertiesBody.Description = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzSphereProduct_UpdateViaIdentityExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereProduct_UpdateViaIdentityExpanded Clone() + { + var clone = new UpdateAzSphereProduct_UpdateViaIdentityExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._propertiesBody = this._propertiesBody; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProductsUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.ProductsUpdateViaIdentity(InputObject.Id, _propertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProductName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProductName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.ProductsUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.CatalogName ?? null, InputObject.ProductName ?? null, _propertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SerializationMode.IncludeUpdate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzSphereProduct_UpdateViaIdentityExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereProduct_UpdateViaJsonFilePath.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereProduct_UpdateViaJsonFilePath.cs new file mode 100644 index 000000000000..006f20036002 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereProduct_UpdateViaJsonFilePath.cs @@ -0,0 +1,616 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Update a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzSphereProduct_UpdateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Update a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}", ApiVersion = "2024-04-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.NotSuggestDefaultParameterSet] + public partial class UpdateAzSphereProduct_UpdateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + public global::System.String _jsonString; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Update operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Update operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Update operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ProductName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzSphereProduct_UpdateViaJsonFilePath + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereProduct_UpdateViaJsonFilePath Clone() + { + var clone = new UpdateAzSphereProduct_UpdateViaJsonFilePath(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.CatalogName = this.CatalogName; + clone.Name = this.Name; + clone.JsonFilePath = this.JsonFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProductsUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProductsUpdateViaJsonString(SubscriptionId, ResourceGroupName, CatalogName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzSphereProduct_UpdateViaJsonFilePath() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereProduct_UpdateViaJsonString.cs b/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereProduct_UpdateViaJsonString.cs new file mode 100644 index 000000000000..8567c97c97db --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/cmdlets/UpdateAzSphereProduct_UpdateViaJsonString.cs @@ -0,0 +1,614 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets; + using System; + + /// + /// Update a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzSphereProduct_UpdateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Description(@"Update a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}", ApiVersion = "2024-04-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.NotSuggestDefaultParameterSet] + public partial class UpdateAzSphereProduct_UpdateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// Backing field for property. + private string _catalogName; + + /// Name of catalog + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of catalog")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of catalog", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Update operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Update operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Update operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of product. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of product.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of product.", + SerializedName = @"productName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ProductName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzSphereProduct_UpdateViaJsonString + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereProduct_UpdateViaJsonString Clone() + { + var clone = new UpdateAzSphereProduct_UpdateViaJsonString(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.CatalogName = this.CatalogName; + clone.Name = this.Name; + clone.JsonString = this.JsonString; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProductsUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProductsUpdateViaJsonString(SubscriptionId, ResourceGroupName, CatalogName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CatalogName=CatalogName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzSphereProduct_UpdateViaJsonString() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/AsyncCommandRuntime.cs b/src/Sphere/Sphere.Autorest/generated/runtime/AsyncCommandRuntime.cs new file mode 100644 index 000000000000..b260772f23e9 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/AsyncCommandRuntime.cs @@ -0,0 +1,832 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell +{ + using System.Management.Automation; + using System.Management.Automation.Host; + using System.Threading; + using System.Linq; + + internal interface IAsyncCommandRuntimeExtensions + { + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep Wrap(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep func); + System.Collections.Generic.IEnumerable Wrap(System.Collections.Generic.IEnumerable funcs); + + T ExecuteSync(System.Func step); + } + + public class AsyncCommandRuntime : System.Management.Automation.ICommandRuntime2, IAsyncCommandRuntimeExtensions, System.IDisposable + { + private ICommandRuntime2 originalCommandRuntime; + private System.Threading.Thread originalThread; + public bool AllowInteractive { get; set; } = false; + + public CancellationToken cancellationToken; + SemaphoreSlim semaphore = new SemaphoreSlim(1, 1); + ManualResetEventSlim readyToRun = new ManualResetEventSlim(false); + ManualResetEventSlim completed = new ManualResetEventSlim(false); + + System.Action runOnMainThread; + + private System.Management.Automation.PSCmdlet cmdlet; + + internal AsyncCommandRuntime(System.Management.Automation.PSCmdlet cmdlet, CancellationToken cancellationToken) + { + this.originalCommandRuntime = cmdlet.CommandRuntime as ICommandRuntime2; + this.originalThread = System.Threading.Thread.CurrentThread; + this.cancellationToken = cancellationToken; + this.cmdlet = cmdlet; + if (cmdlet.PagingParameters != null) + { + WriteDebug("Client side pagination is enabled for this cmdlet"); + } + cmdlet.CommandRuntime = this; + } + + public PSHost Host => this.originalCommandRuntime.Host; + + public PSTransactionContext CurrentPSTransaction => this.originalCommandRuntime.CurrentPSTransaction; + + private void CheckForInteractive() + { + // This is an interactive call -- if we are not on the original thread, this will only work if this was done at ACR creation time; + if (!AllowInteractive) + { + throw new System.Exception("AsyncCommandRuntime is not configured for interactive calls"); + } + } + private void WaitOurTurn() + { + // wait for our turn to play + semaphore?.Wait(cancellationToken); + + // ensure that completed is not set + completed.Reset(); + } + + private void WaitForCompletion() + { + // wait for the result (or cancellation!) + WaitHandle.WaitAny(new[] { cancellationToken.WaitHandle, completed?.WaitHandle }); + + // let go of the semaphore + semaphore?.Release(); + + } + + public bool ShouldContinue(string query, string caption, bool hasSecurityImpact, ref bool yesToAll, ref bool noToAll) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + return originalCommandRuntime.ShouldContinue(query, caption, hasSecurityImpact, ref yesToAll, ref noToAll); + } + + CheckForInteractive(); + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + bool yta = yesToAll; + bool nta = noToAll; + bool result = false; + + // set the function to run + runOnMainThread = () => result = originalCommandRuntime.ShouldContinue(query, caption, hasSecurityImpact, ref yta, ref nta); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // set the output variables + yesToAll = yta; + noToAll = nta; + return result; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public bool ShouldContinue(string query, string caption) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + return originalCommandRuntime.ShouldContinue(query, caption); + } + + CheckForInteractive(); + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + bool result = false; + + // set the function to run + runOnMainThread = () => result = originalCommandRuntime.ShouldContinue(query, caption); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // set the output variables + return result; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public bool ShouldContinue(string query, string caption, ref bool yesToAll, ref bool noToAll) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + return originalCommandRuntime.ShouldContinue(query, caption, ref yesToAll, ref noToAll); + } + + CheckForInteractive(); + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + bool yta = yesToAll; + bool nta = noToAll; + bool result = false; + + // set the function to run + runOnMainThread = () => result = originalCommandRuntime.ShouldContinue(query, caption, ref yta, ref nta); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // set the output variables + yesToAll = yta; + noToAll = nta; + return result; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public bool ShouldProcess(string target) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + return originalCommandRuntime.ShouldProcess(target); + } + + CheckForInteractive(); + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + bool result = false; + + // set the function to run + runOnMainThread = () => result = originalCommandRuntime.ShouldProcess(target); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // set the output variables + return result; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public bool ShouldProcess(string target, string action) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + return originalCommandRuntime.ShouldProcess(target, action); + } + + CheckForInteractive(); + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + bool result = false; + + // set the function to run + runOnMainThread = () => result = originalCommandRuntime.ShouldProcess(target, action); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // set the output variables + return result; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public bool ShouldProcess(string verboseDescription, string verboseWarning, string caption) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + return originalCommandRuntime.ShouldProcess(verboseDescription, verboseWarning, caption); + } + + CheckForInteractive(); + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + bool result = false; + + // set the function to run + runOnMainThread = () => result = originalCommandRuntime.ShouldProcess(verboseDescription, verboseWarning, caption); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // set the output variables + return result; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public bool ShouldProcess(string verboseDescription, string verboseWarning, string caption, out ShouldProcessReason shouldProcessReason) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + return originalCommandRuntime.ShouldProcess(verboseDescription, verboseWarning, caption, out shouldProcessReason); + } + + CheckForInteractive(); + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + bool result = false; + ShouldProcessReason reason = ShouldProcessReason.None; + + // set the function to run + runOnMainThread = () => result = originalCommandRuntime.ShouldProcess(verboseDescription, verboseWarning, caption, out reason); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // set the output variables + shouldProcessReason = reason; + return result; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void ThrowTerminatingError(ErrorRecord errorRecord) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.ThrowTerminatingError(errorRecord); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.ThrowTerminatingError(errorRecord); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public bool TransactionAvailable() + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + return originalCommandRuntime.TransactionAvailable(); + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + bool result = false; + + // set the function to run + runOnMainThread = () => result = originalCommandRuntime.TransactionAvailable(); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // set the output variables + return result; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteCommandDetail(string text) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteCommandDetail(text); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteCommandDetail(text); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteDebug(string text) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteDebug(text); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteDebug(text); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteError(ErrorRecord errorRecord) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteError(errorRecord); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteError(errorRecord); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteInformation(InformationRecord informationRecord) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteInformation(informationRecord); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteInformation(informationRecord); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteObject(object sendToPipeline) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteObject(sendToPipeline); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteObject(sendToPipeline); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteObject(object sendToPipeline, bool enumerateCollection) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteObject(sendToPipeline, enumerateCollection); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteObject(sendToPipeline, enumerateCollection); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteProgress(ProgressRecord progressRecord) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteProgress(progressRecord); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteProgress(progressRecord); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteProgress(long sourceId, ProgressRecord progressRecord) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteProgress(sourceId, progressRecord); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteProgress(sourceId, progressRecord); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteVerbose(string text) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteVerbose(text); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteVerbose(text); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteWarning(string text) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteWarning(text); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteWarning(text); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void Wait(System.Threading.Tasks.Task ProcessRecordAsyncTask, System.Threading.CancellationToken cancellationToken) + { + do + { + WaitHandle.WaitAny(new[] { readyToRun.WaitHandle, ((System.IAsyncResult)ProcessRecordAsyncTask).AsyncWaitHandle }); + if (readyToRun.IsSet) + { + // reset the request for the next time + readyToRun.Reset(); + + // run the delegate on this thread + runOnMainThread(); + + // tell the originator everything is complete + completed.Set(); + } + } + while (!ProcessRecordAsyncTask.IsCompleted); + if (ProcessRecordAsyncTask.IsFaulted) + { + // don't unwrap a Aggregate Exception -- we'll lose the stack trace of the actual exception. + // if( ProcessRecordAsyncTask.Exception is System.AggregateException aggregate ) { + // throw aggregate.InnerException; + // } + throw ProcessRecordAsyncTask.Exception; + } + } + public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep Wrap(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep func) => func.Target.GetType().Name != "Closure" ? func : (p1, p2, p3) => ExecuteSync>(() => func(p1, p2, p3)); + public System.Collections.Generic.IEnumerable Wrap(System.Collections.Generic.IEnumerable funcs) => funcs?.Select(Wrap); + + public T ExecuteSync(System.Func step) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + return step(); + } + + T result = default(T); + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + // set the function to run + runOnMainThread = () => { result = step(); }; + // tell the main thread to go ahead + readyToRun.Set(); + // wait for the result (or cancellation!) + WaitForCompletion(); + // return + return result; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void Dispose() + { + if (cmdlet != null) + { + cmdlet.CommandRuntime = this.originalCommandRuntime; + cmdlet = null; + } + + semaphore?.Dispose(); + semaphore = null; + readyToRun?.Dispose(); + readyToRun = null; + completed?.Dispose(); + completed = null; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/AsyncJob.cs b/src/Sphere/Sphere.Autorest/generated/runtime/AsyncJob.cs new file mode 100644 index 000000000000..2139fa5d8d04 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/AsyncJob.cs @@ -0,0 +1,270 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell +{ + using System.Management.Automation; + using System.Management.Automation.Host; + using System.Threading; + + using System.Threading.Tasks; + + public class LongRunningJobCancelledException : System.Exception + { + public LongRunningJobCancelledException(string message) : base(message) + { + + } + } + + public class AsyncJob : Job, System.Management.Automation.ICommandRuntime2 + { + const int MaxRecords = 1000; + + private string _statusMessage = string.Empty; + + public override string StatusMessage => _statusMessage; + + public override bool HasMoreData => Output.Count > 0 || Progress.Count > 0 || Error.Count > 0 || Warning.Count > 0 || Verbose.Count > 0 || Debug.Count > 0; + + public override string Location => "localhost"; + + public PSHost Host => originalCommandRuntime.Host; + + public PSTransactionContext CurrentPSTransaction => originalCommandRuntime.CurrentPSTransaction; + + public override void StopJob() + { + Cancel(); + } + + private readonly PSCmdlet cmdlet; + private readonly ICommandRuntime2 originalCommandRuntime; + private readonly System.Threading.Thread originalThread; + + private void CheckForInteractive() + { + // This is an interactive call -- We should never allow interactivity in AsnycJob cmdlets. + throw new System.Exception("Cmdlets in AsyncJob; interactive calls are not permitted."); + } + private bool IsJobDone => CancellationToken.IsCancellationRequested || this.JobStateInfo.State == JobState.Failed || this.JobStateInfo.State == JobState.Stopped || this.JobStateInfo.State == JobState.Stopping || this.JobStateInfo.State == JobState.Completed; + + private readonly System.Action Cancel; + private readonly CancellationToken CancellationToken; + + internal AsyncJob(PSCmdlet cmdlet, string line, string name, CancellationToken cancellationToken, System.Action cancelMethod) : base(line, name) + { + SetJobState(JobState.NotStarted); + // know how to cancel/check for cancelation + this.CancellationToken = cancellationToken; + this.Cancel = cancelMethod; + + // we might need these. + this.originalCommandRuntime = cmdlet.CommandRuntime as ICommandRuntime2; + this.originalThread = System.Threading.Thread.CurrentThread; + + // the instance of the cmdlet we're going to run + this.cmdlet = cmdlet; + + // set the command runtime to the AsyncJob + cmdlet.CommandRuntime = this; + } + + /// + /// Monitors the task (which should be ProcessRecordAsync) to control + /// the lifetime of the job itself + /// + /// + public void Monitor(Task task) + { + SetJobState(JobState.Running); + task.ContinueWith(antecedent => + { + if (antecedent.IsCanceled) + { + // if the task was canceled, we're just going to call it completed. + SetJobState(JobState.Completed); + } + else if (antecedent.IsFaulted) + { + foreach (var innerException in antecedent.Exception.Flatten().InnerExceptions) + { + WriteError(new System.Management.Automation.ErrorRecord(innerException, string.Empty, System.Management.Automation.ErrorCategory.NotSpecified, null)); + } + + // a fault indicates an actual failure + SetJobState(JobState.Failed); + } + else + { + // otherwiser it's a completed state. + SetJobState(JobState.Completed); + } + }, CancellationToken); + } + + private void CheckForCancellation() + { + if (IsJobDone) + { + throw new LongRunningJobCancelledException("Long running job is canceled or stopping, continuation of the cmdlet is not permitted."); + } + } + + public void WriteInformation(InformationRecord informationRecord) + { + CheckForCancellation(); + + this.Information.Add(informationRecord); + } + + public bool ShouldContinue(string query, string caption, bool hasSecurityImpact, ref bool yesToAll, ref bool noToAll) + { + CheckForInteractive(); + return false; + } + + public void WriteDebug(string text) + { + _statusMessage = text; + CheckForCancellation(); + + if (Debug.IsOpen && Debug.Count < MaxRecords) + { + Debug.Add(new DebugRecord(text)); + } + } + + public void WriteError(ErrorRecord errorRecord) + { + if (Error.IsOpen) + { + Error.Add(errorRecord); + } + } + + public void WriteObject(object sendToPipeline) + { + CheckForCancellation(); + + if (Output.IsOpen) + { + Output.Add(new PSObject(sendToPipeline)); + } + } + + public void WriteObject(object sendToPipeline, bool enumerateCollection) + { + CheckForCancellation(); + + if (enumerateCollection && sendToPipeline is System.Collections.IEnumerable enumerable) + { + foreach (var item in enumerable) + { + WriteObject(item); + } + } + else + { + WriteObject(sendToPipeline); + } + } + + public void WriteProgress(ProgressRecord progressRecord) + { + CheckForCancellation(); + + if (Progress.IsOpen && Progress.Count < MaxRecords) + { + Progress.Add(progressRecord); + } + } + + public void WriteProgress(long sourceId, ProgressRecord progressRecord) + { + CheckForCancellation(); + + if (Progress.IsOpen && Progress.Count < MaxRecords) + { + Progress.Add(progressRecord); + } + } + + public void WriteVerbose(string text) + { + CheckForCancellation(); + + if (Verbose.IsOpen && Verbose.Count < MaxRecords) + { + Verbose.Add(new VerboseRecord(text)); + } + } + + public void WriteWarning(string text) + { + CheckForCancellation(); + + if (Warning.IsOpen && Warning.Count < MaxRecords) + { + Warning.Add(new WarningRecord(text)); + } + } + + public void WriteCommandDetail(string text) + { + WriteVerbose(text); + } + + public bool ShouldProcess(string target) + { + CheckForInteractive(); + return false; + } + + public bool ShouldProcess(string target, string action) + { + CheckForInteractive(); + return false; + } + + public bool ShouldProcess(string verboseDescription, string verboseWarning, string caption) + { + CheckForInteractive(); + return false; + } + + public bool ShouldProcess(string verboseDescription, string verboseWarning, string caption, out ShouldProcessReason shouldProcessReason) + { + CheckForInteractive(); + shouldProcessReason = ShouldProcessReason.None; + return false; + } + + public bool ShouldContinue(string query, string caption) + { + CheckForInteractive(); + return false; + } + + public bool ShouldContinue(string query, string caption, ref bool yesToAll, ref bool noToAll) + { + CheckForInteractive(); + return false; + } + + public bool TransactionAvailable() + { + // interactivity required? + return false; + } + + public void ThrowTerminatingError(ErrorRecord errorRecord) + { + if (Error.IsOpen) + { + Error.Add(errorRecord); + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/AsyncOperationResponse.cs b/src/Sphere/Sphere.Autorest/generated/runtime/AsyncOperationResponse.cs new file mode 100644 index 000000000000..2753498dcf9b --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/AsyncOperationResponse.cs @@ -0,0 +1,176 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + [System.ComponentModel.TypeConverter(typeof(AsyncOperationResponseTypeConverter))] + public class AsyncOperationResponse + { + private string _target; + public string Target { get => _target; set => _target = value; } + public AsyncOperationResponse() + { + } + internal AsyncOperationResponse(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json) + { + // pull target + { Target = If(json?.PropertyT("target"), out var _v) ? (string)_v : (string)Target; } + } + public string ToJsonString() + { + return $"{{ \"target\" : \"{this.Target}\" }}"; + } + + public static AsyncOperationResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject json ? new AsyncOperationResponse(json) : null; + } + + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static AsyncOperationResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(jsonText)); + + } + + public partial class AsyncOperationResponseTypeConverter : System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to a type + /// parameter. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static object ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(AsyncOperationResponse).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AsyncOperationResponse.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString()); ; + } + catch + { + // Unable to use JSON pattern + } + + if (typeof(System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return new AsyncOperationResponse { Target = (sourceValue as System.Management.Automation.PSObject).GetValueForProperty("target", "", global::System.Convert.ToString) }; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return new AsyncOperationResponse { Target = (sourceValue as global::System.Collections.IDictionary).GetValueForProperty("target", "", global::System.Convert.ToString) }; + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Attributes/ExternalDocsAttribute.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Attributes/ExternalDocsAttribute.cs new file mode 100644 index 000000000000..9048681a19a4 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Attributes/ExternalDocsAttribute.cs @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere +{ + using System; + using System.Collections.Generic; + using System.Text; + + [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = true)] + public class ExternalDocsAttribute : Attribute + { + + public string Description { get; } + + public string Url { get; } + + public ExternalDocsAttribute(string url) + { + Url = url; + } + + public ExternalDocsAttribute(string url, string description) + { + Url = url; + Description = description; + } + } +} diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Attributes/PSArgumentCompleterAttribute.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Attributes/PSArgumentCompleterAttribute.cs new file mode 100644 index 000000000000..343f9635672f --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Attributes/PSArgumentCompleterAttribute.cs @@ -0,0 +1,52 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere +{ + public class PSArgumentCompleterAttribute : ArgumentCompleterAttribute + { + internal string[] ResourceTypes; + + public PSArgumentCompleterAttribute(params string[] argumentList) : base(CreateScriptBlock(argumentList)) + { + ResourceTypes = argumentList; + } + + public static ScriptBlock CreateScriptBlock(string[] resourceTypes) + { + List outputResourceTypes = new List(); + foreach (string resourceType in resourceTypes) + { + if (resourceType.Contains(" ")) + { + outputResourceTypes.Add("\'\'" + resourceType + "\'\'"); + } + else + { + outputResourceTypes.Add(resourceType); + } + } + string scriptResourceTypeList = "'" + String.Join("' , '", outputResourceTypes) + "'"; + string script = "param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)\n" + + String.Format("$values = {0}\n", scriptResourceTypeList) + + "$values | Where-Object { $_ -Like \"$wordToComplete*\" -or $_ -Like \"'$wordToComplete*\" } | Sort-Object | ForEach-Object { [System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_) }"; + ScriptBlock scriptBlock = ScriptBlock.Create(script); + return scriptBlock; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Cmdlets/ExportCmdletSurface.cs b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Cmdlets/ExportCmdletSurface.cs new file mode 100644 index 000000000000..7a6c578ae2a8 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Cmdlets/ExportCmdletSurface.cs @@ -0,0 +1,113 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Text; +using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.PsHelpers; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell +{ + [Cmdlet(VerbsData.Export, "CmdletSurface")] + [DoNotExport] + public class ExportCmdletSurface : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ModuleName { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string CmdletFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string OutputFolder { get; set; } + + [Parameter] + public bool IncludeGeneralParameters { get; set; } + + [Parameter] + public bool UseExpandedFormat { get; set; } + + protected override void ProcessRecord() + { + try + { + var variants = GetScriptCmdlets(this, CmdletFolder) + .SelectMany(fi => fi.ToVariants()) + .Where(v => !v.IsDoNotExport) + .ToArray(); + var allProfiles = variants.SelectMany(v => v.Profiles).Distinct().ToArray(); + var profileGroups = allProfiles.Any() + ? variants + .SelectMany(v => (v.Profiles.Any() ? v.Profiles : allProfiles).Select(p => (profile: p, variant: v))) + .GroupBy(pv => pv.profile) + .Select(pvg => new ProfileGroup(pvg.Select(pv => pv.variant).ToArray(), pvg.Key)) + : new[] { new ProfileGroup(variants) }; + foreach (var profileGroup in profileGroups) + { + var variantGroups = profileGroup.Variants + .GroupBy(v => new { v.CmdletName }) + .Select(vg => new VariantGroup(ModuleName, vg.Key.CmdletName, vg.Select(v => v).ToArray(), String.Empty, profileGroup.ProfileName)); + var sb = UseExpandedFormat ? ExpandedFormat(variantGroups) : CondensedFormat(variantGroups); + Directory.CreateDirectory(OutputFolder); + File.WriteAllText(Path.Combine(OutputFolder, $"CmdletSurface-{profileGroup.ProfileName}.md"), sb.ToString()); + } + } + catch (Exception ee) + { + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + + private StringBuilder ExpandedFormat(IEnumerable variantGroups) + { + var sb = new StringBuilder(); + foreach (var variantGroup in variantGroups.OrderBy(vg => vg.CmdletName)) + { + sb.Append($"### {variantGroup.CmdletName}{Environment.NewLine}"); + var parameterGroups = variantGroup.ParameterGroups + .Where(pg => !pg.DontShow && (IncludeGeneralParameters || (pg.OrderCategory != ParameterCategory.Azure && pg.OrderCategory != ParameterCategory.Runtime))); + foreach (var parameterGroup in parameterGroups) + { + sb.Append($" - {parameterGroup.ParameterName} `{parameterGroup.ParameterType.ToSyntaxTypeName()}`{Environment.NewLine}"); + } + sb.AppendLine(); + } + + return sb; + } + + private StringBuilder CondensedFormat(IEnumerable variantGroups) + { + var sb = new StringBuilder(); + var condensedGroups = variantGroups + .GroupBy(vg => vg.CmdletNoun) + .Select(vgg => ( + CmdletNoun: vgg.Key, + CmdletVerbs: vgg.Select(vg => vg.CmdletVerb).OrderBy(cv => cv).ToArray(), + ParameterGroups: vgg.SelectMany(vg => vg.ParameterGroups).DistinctBy(p => p.ParameterName).ToArray(), + OutputTypes: vgg.SelectMany(vg => vg.OutputTypes).Select(ot => ot.Type).DistinctBy(t => t.Name).Select(t => t.ToSyntaxTypeName()).ToArray())) + .OrderBy(vg => vg.CmdletNoun); + foreach (var condensedGroup in condensedGroups) + { + sb.Append($"### {condensedGroup.CmdletNoun} [{String.Join(", ", condensedGroup.CmdletVerbs)}] `{String.Join(", ", condensedGroup.OutputTypes)}`{Environment.NewLine}"); + var parameterGroups = condensedGroup.ParameterGroups + .Where(pg => !pg.DontShow && (IncludeGeneralParameters || (pg.OrderCategory != ParameterCategory.Azure && pg.OrderCategory != ParameterCategory.Runtime))); + foreach (var parameterGroup in parameterGroups) + { + sb.Append($" - {parameterGroup.ParameterName} `{parameterGroup.ParameterType.ToSyntaxTypeName()}`{Environment.NewLine}"); + } + sb.AppendLine(); + } + + return sb; + } + } +} diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Cmdlets/ExportExampleStub.cs b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Cmdlets/ExportExampleStub.cs new file mode 100644 index 000000000000..bee4257e119d --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Cmdlets/ExportExampleStub.cs @@ -0,0 +1,74 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.IO; +using System.Linq; +using System.Management.Automation; +using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.MarkdownTypesExtensions; +using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.PsHelpers; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell +{ + [Cmdlet(VerbsData.Export, "ExampleStub")] + [DoNotExport] + public class ExportExampleStub : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ExportsFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string OutputFolder { get; set; } + + protected override void ProcessRecord() + { + try + { + if (!Directory.Exists(ExportsFolder)) + { + throw new ArgumentException($"Exports folder '{ExportsFolder}' does not exist"); + } + + var exportDirectories = Directory.GetDirectories(ExportsFolder); + if (!exportDirectories.Any()) + { + exportDirectories = new[] { ExportsFolder }; + } + + var exampleText = String.Join(String.Empty, DefaultExampleHelpInfos.Select(ehi => ehi.ToHelpExampleOutput())); + foreach (var exportDirectory in exportDirectories) + { + var outputFolder = OutputFolder; + if (exportDirectory != ExportsFolder) + { + outputFolder = Path.Combine(OutputFolder, Path.GetFileName(exportDirectory)); + Directory.CreateDirectory(outputFolder); + } + + var cmdletFilePaths = GetScriptCmdlets(exportDirectory).Select(fi => Path.Combine(outputFolder, $"{fi.Name}.md")).ToArray(); + var currentExamplesFilePaths = Directory.GetFiles(outputFolder).ToArray(); + // Remove examples of non-existing cmdlets + var removedCmdletFilePaths = currentExamplesFilePaths.Except(cmdletFilePaths); + foreach (var removedCmdletFilePath in removedCmdletFilePaths) + { + File.Delete(removedCmdletFilePath); + } + + // Only create example stubs if they don't exist + foreach (var cmdletFilePath in cmdletFilePaths.Except(currentExamplesFilePaths)) + { + File.WriteAllText(cmdletFilePath, exampleText); + } + } + } + catch (Exception ee) + { + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + } +} diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs new file mode 100644 index 000000000000..f6098dd561cb --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs @@ -0,0 +1,103 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Reflection; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell +{ + [Cmdlet(VerbsData.Export, "FormatPs1xml")] + [DoNotExport] + public class ExportFormatPs1xml : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string FilePath { get; set; } + + private const string ModelNamespace = @"Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models"; + private const string SupportNamespace = @"${$project.supportNamespace.fullName}"; + private const string PropertiesExcludedForTableview = @"Id,Type"; + + private static readonly bool IsAzure = Convert.ToBoolean(@"true"); + + private static string SelectedBySuffix = @"#Multiple"; + + protected override void ProcessRecord() + { + try + { + var viewModels = GetFilteredViewParameters().Select(CreateViewModel).ToList(); + var ps1xml = new Configuration + { + ViewDefinitions = new ViewDefinitions + { + Views = viewModels + } + }; + File.WriteAllText(FilePath, ps1xml.ToXmlString()); + } + catch (Exception ee) + { + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + + private static IEnumerable GetFilteredViewParameters() + { + //https://stackoverflow.com/a/79738/294804 + //https://stackoverflow.com/a/949285/294804 + var types = Assembly.GetExecutingAssembly().GetExportedTypes() + .Where(t => t.IsClass + && (t.Namespace.StartsWith(ModelNamespace) || t.Namespace.StartsWith(SupportNamespace)) + && !t.GetCustomAttributes().Any()); + return types.Select(t => new ViewParameters(t, t.GetProperties() + .Select(p => new PropertyFormat(p)) + .Where(pf => !pf.Property.GetCustomAttributes().Any() + && (!PropertiesExcludedForTableview.Split(',').Contains(pf.Property.Name)) + && (pf.FormatTable != null || (pf.Origin != PropertyOrigin.Inlined && pf.Property.PropertyType.IsPsSimple()))) + .OrderByDescending(pf => pf.Index.HasValue) + .ThenBy(pf => pf.Index) + .ThenByDescending(pf => pf.Origin.HasValue) + .ThenBy(pf => pf.Origin))).Where(vp => vp.Properties.Any()); + } + + private static View CreateViewModel(ViewParameters viewParameters) + { + var entries = viewParameters.Properties.Select(pf => + (TableColumnHeader: new TableColumnHeader { Label = pf.Label, Width = pf.Width }, + TableColumnItem: new TableColumnItem { PropertyName = pf.Property.Name })).ToArray(); + + return new View + { + Name = viewParameters.Type.FullName, + ViewSelectedBy = new ViewSelectedBy + { + TypeName = string.Concat(viewParameters.Type.FullName, SelectedBySuffix) + }, + TableControl = new TableControl + { + TableHeaders = new TableHeaders + { + TableColumnHeaders = entries.Select(e => e.TableColumnHeader).ToList() + }, + TableRowEntries = new TableRowEntries + { + TableRowEntry = new TableRowEntry + { + TableColumnItems = new TableColumnItems + { + TableItems = entries.Select(e => e.TableColumnItem).ToList() + } + } + } + } + }; + } + } +} diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Cmdlets/ExportHelpMarkdown.cs b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Cmdlets/ExportHelpMarkdown.cs new file mode 100644 index 000000000000..80b410678f48 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Cmdlets/ExportHelpMarkdown.cs @@ -0,0 +1,56 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Linq; +using System.Management.Automation; +using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.MarkdownRenderer; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell +{ + [Cmdlet(VerbsData.Export, "HelpMarkdown")] + [DoNotExport] + public class ExportHelpMarkdown : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public PSModuleInfo ModuleInfo { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public PSObject[] FunctionInfo { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public PSObject[] HelpInfo { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string DocsFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ExamplesFolder { get; set; } + + [Parameter()] + public SwitchParameter AddComplexInterfaceInfo { get; set; } + + protected override void ProcessRecord() + { + try + { + var helpInfos = HelpInfo.Select(hi => hi.ToPsHelpInfo()); + var variantGroups = FunctionInfo.Select(fi => fi.BaseObject).Cast() + .Join(helpInfos, fi => fi.Name, phi => phi.CmdletName, (fi, phi) => fi.ToVariants(phi)) + .Select(va => new VariantGroup(ModuleInfo.Name, va.First().CmdletName, va, String.Empty)); + WriteMarkdowns(variantGroups, ModuleInfo.ToModuleInfo(), DocsFolder, ExamplesFolder, AddComplexInterfaceInfo.IsPresent); + } + catch (Exception ee) + { + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + } +} diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs new file mode 100644 index 000000000000..b9706ab5613c --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs @@ -0,0 +1,117 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Reflection; +using System.Text; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell +{ + [Cmdlet(VerbsData.Export, "ModelSurface")] + [DoNotExport] + public class ExportModelSurface : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string OutputFolder { get; set; } + + [Parameter] + public bool UseExpandedFormat { get; set; } + + private const string ModelNamespace = @"Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models"; + private const string SupportNamespace = @"${$project.supportNamespace.fullName}"; + + protected override void ProcessRecord() + { + try + { + var types = Assembly.GetExecutingAssembly().GetExportedTypes() + .Where(t => t.IsClass && (t.Namespace.StartsWith(ModelNamespace) || t.Namespace.StartsWith(SupportNamespace))); + var typeInfos = types.Select(t => new ModelTypeInfo + { + Type = t, + TypeName = t.Name, + Properties = t.GetProperties(BindingFlags.Public | BindingFlags.Instance).Where(p => !p.GetIndexParameters().Any()).OrderBy(p => p.Name).ToArray(), + NamespaceGroup = t.Namespace.Split('.').LastOrDefault().EmptyIfNull() + }).Where(mti => mti.Properties.Any()); + var sb = UseExpandedFormat ? ExpandedFormat(typeInfos) : CondensedFormat(typeInfos); + Directory.CreateDirectory(OutputFolder); + File.WriteAllText(Path.Combine(OutputFolder, "ModelSurface.md"), sb.ToString()); + } + catch (Exception ee) + { + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + + private static StringBuilder ExpandedFormat(IEnumerable typeInfos) + { + var sb = new StringBuilder(); + foreach (var typeInfo in typeInfos.OrderBy(mti => mti.TypeName).ThenBy(mti => mti.NamespaceGroup)) + { + sb.Append($"### {typeInfo.TypeName} [{typeInfo.NamespaceGroup}]{Environment.NewLine}"); + foreach (var property in typeInfo.Properties) + { + sb.Append($" - {property.Name} `{property.PropertyType.ToSyntaxTypeName()}`{Environment.NewLine}"); + } + sb.AppendLine(); + } + + return sb; + } + + private static StringBuilder CondensedFormat(IEnumerable typeInfos) + { + var sb = new StringBuilder(); + var typeGroups = typeInfos + .GroupBy(mti => mti.TypeName) + .Select(tig => ( + Types: tig.Select(mti => mti.Type).ToArray(), + TypeName: tig.Key, + Properties: tig.SelectMany(mti => mti.Properties).DistinctBy(p => p.Name).OrderBy(p => p.Name).ToArray(), + NamespaceGroups: tig.Select(mti => mti.NamespaceGroup).OrderBy(ng => ng).ToArray() + )) + .OrderBy(tg => tg.TypeName); + foreach (var typeGroup in typeGroups) + { + var aType = typeGroup.Types.Select(GetAssociativeType).FirstOrDefault(t => t != null); + var aText = aType != null ? $@" \<{aType.ToSyntaxTypeName()}\>" : String.Empty; + sb.Append($"### {typeGroup.TypeName}{aText} [{String.Join(", ", typeGroup.NamespaceGroups)}]{Environment.NewLine}"); + foreach (var property in typeGroup.Properties) + { + var propertyAType = GetAssociativeType(property.PropertyType); + var propertyAText = propertyAType != null ? $" <{propertyAType.ToSyntaxTypeName()}>" : String.Empty; + var enumNames = GetEnumFieldNames(property.PropertyType.Unwrap()); + var enumNamesText = enumNames.Any() ? $" **{{{String.Join(", ", enumNames)}}}**" : String.Empty; + sb.Append($" - {property.Name} `{property.PropertyType.ToSyntaxTypeName()}{propertyAText}`{enumNamesText}{Environment.NewLine}"); + } + sb.AppendLine(); + } + + return sb; + } + + //https://stackoverflow.com/a/4963190/294804 + private static Type GetAssociativeType(Type type) => + type.GetInterfaces().FirstOrDefault(i => i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IAssociativeArray<>))?.GetGenericArguments().First(); + + private static string[] GetEnumFieldNames(Type type) => + type.IsValueType && !type.IsPrimitive && type != typeof(decimal) && type != typeof(DateTime) + ? type.GetFields(BindingFlags.Public | BindingFlags.Static).Where(f => f.FieldType == type).Select(p => p.Name).ToArray() + : new string[] { }; + + private class ModelTypeInfo + { + public Type Type { get; set; } + public string TypeName { get; set; } + public PropertyInfo[] Properties { get; set; } + public string NamespaceGroup { get; set; } + } + } +} diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs new file mode 100644 index 000000000000..9c435a45fc74 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs @@ -0,0 +1,180 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Text; +using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.PsHelpers; +using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.MarkdownRenderer; +using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.PsProxyTypeExtensions; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell +{ + [Cmdlet(VerbsData.Export, "ProxyCmdlet", DefaultParameterSetName = "Docs")] + [DoNotExport] + public class ExportProxyCmdlet : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ModuleName { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string[] ModulePath { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ExportsFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string InternalFolder { get; set; } + + [Parameter(Mandatory = true, ParameterSetName = "Docs")] + [AllowEmptyString] + public string ModuleDescription { get; set; } + + [Parameter(Mandatory = true, ParameterSetName = "Docs")] + [ValidateNotNullOrEmpty] + public string DocsFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ExamplesFolder { get; set; } + + [Parameter(Mandatory = true, ParameterSetName = "Docs")] + public Guid ModuleGuid { get; set; } + + [Parameter(Mandatory = true, ParameterSetName = "NoDocs")] + public SwitchParameter ExcludeDocs { get; set; } + + [Parameter(ParameterSetName = "Docs")] + public SwitchParameter AddComplexInterfaceInfo { get; set; } + + protected override void ProcessRecord() + { + try + { + var variants = GetModuleCmdletsAndHelpInfo(this, ModulePath).SelectMany(ci => ci.ToVariants()).Where(v => !v.IsDoNotExport).ToArray(); + var allProfiles = variants.SelectMany(v => v.Profiles).Distinct().ToArray(); + var profileGroups = allProfiles.Any() + ? variants + .SelectMany(v => (v.Profiles.Any() ? v.Profiles : allProfiles).Select(p => (profile: p, variant: v))) + .GroupBy(pv => pv.profile) + .Select(pvg => new ProfileGroup(pvg.Select(pv => pv.variant).ToArray(), pvg.Key)) + : new[] { new ProfileGroup(variants) }; + var variantGroups = profileGroups.SelectMany(pg => pg.Variants + .GroupBy(v => new { v.CmdletName, v.IsInternal }) + .Select(vg => new VariantGroup(ModuleName, vg.Key.CmdletName, vg.Select(v => v).ToArray(), + Path.Combine(vg.Key.IsInternal ? InternalFolder : ExportsFolder, pg.ProfileFolder), pg.ProfileName, isInternal: vg.Key.IsInternal))) + .ToArray(); + var license = new StringBuilder(); + license.Append(@" +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- +"); + HashSet LicenseSet = new HashSet(); + foreach (var variantGroup in variantGroups) + { + var parameterGroups = variantGroup.ParameterGroups.ToList(); + var isValidProfile = !String.IsNullOrEmpty(variantGroup.ProfileName) && variantGroup.ProfileName != NoProfiles; + var examplesFolder = isValidProfile ? Path.Combine(ExamplesFolder, variantGroup.ProfileName) : ExamplesFolder; + var markdownInfo = new MarkdownHelpInfo(variantGroup, examplesFolder); + List examples = new List(); + foreach (var it in markdownInfo.Examples) + { + examples.Add(it); + } + variantGroup.HelpInfo.Examples = examples.ToArray(); + var sb = new StringBuilder(); + sb.Append($"{Environment.NewLine}"); + sb.Append(variantGroup.ToHelpCommentOutput()); + sb.Append($"function {variantGroup.CmdletName} {{{Environment.NewLine}"); + sb.Append(variantGroup.Aliases.ToAliasOutput()); + sb.Append(variantGroup.OutputTypes.ToOutputTypeOutput()); + sb.Append(variantGroup.ToCmdletBindingOutput()); + sb.Append(variantGroup.ProfileName.ToProfileOutput()); + + sb.Append("param("); + sb.Append($"{(parameterGroups.Any() ? Environment.NewLine : String.Empty)}"); + + foreach (var parameterGroup in parameterGroups) + { + var parameters = parameterGroup.HasAllVariants ? parameterGroup.Parameters.Take(1) : parameterGroup.Parameters; + parameters = parameters.Where(p => !p.IsHidden()); + if (!parameters.Any()) + { + continue; + } + foreach (var parameter in parameters) + { + sb.Append(parameter.ToParameterOutput(variantGroup.HasMultipleVariants, parameterGroup.HasAllVariants)); + } + sb.Append(parameterGroup.Aliases.ToAliasOutput(true)); + sb.Append(parameterGroup.HasValidateNotNull.ToValidateNotNullOutput()); + sb.Append(parameterGroup.HasAllowEmptyArray.ToAllowEmptyArray()); + sb.Append(parameterGroup.CompleterInfo.ToArgumentCompleterOutput()); + sb.Append(parameterGroup.OrderCategory.ToParameterCategoryOutput()); + sb.Append(parameterGroup.InfoAttribute.ToInfoOutput(parameterGroup.ParameterType)); + sb.Append(parameterGroup.ToDefaultInfoOutput()); + sb.Append(parameterGroup.ParameterType.ToParameterTypeOutput()); + sb.Append(parameterGroup.Description.ToParameterDescriptionOutput()); + sb.Append(parameterGroup.ParameterName.ToParameterNameOutput(parameterGroups.IndexOf(parameterGroup) == parameterGroups.Count - 1)); + } + sb.Append($"){Environment.NewLine}{Environment.NewLine}"); + + sb.Append(variantGroup.ToBeginOutput()); + sb.Append(variantGroup.ToProcessOutput()); + sb.Append(variantGroup.ToEndOutput()); + + sb.Append($"}}{Environment.NewLine}"); + + Directory.CreateDirectory(variantGroup.OutputFolder); + File.WriteAllText(variantGroup.FilePath, license.ToString()); + File.AppendAllText(variantGroup.FilePath, sb.ToString()); + if (!LicenseSet.Contains(Path.Combine(variantGroup.OutputFolder, "ProxyCmdletDefinitions.ps1"))) + { + // only add license in the header + File.AppendAllText(Path.Combine(variantGroup.OutputFolder, "ProxyCmdletDefinitions.ps1"), license.ToString()); + LicenseSet.Add(Path.Combine(variantGroup.OutputFolder, "ProxyCmdletDefinitions.ps1")); + } + File.AppendAllText(Path.Combine(variantGroup.OutputFolder, "ProxyCmdletDefinitions.ps1"), sb.ToString()); + } + + if (!ExcludeDocs) + { + var moduleInfo = new PsModuleHelpInfo(ModuleName, ModuleGuid, ModuleDescription); + foreach (var variantGroupsByProfile in variantGroups.GroupBy(vg => vg.ProfileName)) + { + var profileName = variantGroupsByProfile.Key; + var isValidProfile = !String.IsNullOrEmpty(profileName) && profileName != NoProfiles; + var docsFolder = isValidProfile ? Path.Combine(DocsFolder, profileName) : DocsFolder; + var examplesFolder = isValidProfile ? Path.Combine(ExamplesFolder, profileName) : ExamplesFolder; + WriteMarkdowns(variantGroupsByProfile, moduleInfo, docsFolder, examplesFolder, AddComplexInterfaceInfo.IsPresent); + } + } + } + catch (Exception ee) + { + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + } +} diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs new file mode 100644 index 000000000000..09f91f66ef89 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs @@ -0,0 +1,193 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Text; +using System.Text.RegularExpressions; +using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.PsHelpers; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell +{ + [Cmdlet(VerbsData.Export, "Psd1")] + [DoNotExport] + public class ExportPsd1 : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ExportsFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string CustomFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string Psd1Path { get; set; } + + [Parameter(Mandatory = true)] + public Guid ModuleGuid { get; set; } + + private static readonly bool IsAzure = Convert.ToBoolean(@"true"); + private const string CustomFolderRelative = "./custom"; + private const string Indent = Psd1Indent; + private const string Undefined = "undefined"; + private bool IsUndefined(string value) => string.Equals(Undefined, value, StringComparison.OrdinalIgnoreCase); + + protected override void ProcessRecord() + { + try + { + if (!Directory.Exists(ExportsFolder)) + { + throw new ArgumentException($"Exports folder '{ExportsFolder}' does not exist"); + } + + if (!Directory.Exists(CustomFolder)) + { + throw new ArgumentException($"Custom folder '{CustomFolder}' does not exist"); + } + + string version = Convert.ToString(@"0.1.0"); + // Validate the module version should be semantic version + // Following regex is official from https://semver.org/ + Regex rx = new Regex(@"^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$", RegexOptions.Compiled); + if (rx.Matches(version).Count != 1) + { + throw new ArgumentException("Module-version is not a valid Semantic Version"); + } + + string previewVersion = null; + if (version.Contains('-')) + { + string[] versions = version.Split("-".ToCharArray(), 2); + version = versions[0]; + previewVersion = versions[1]; + } + + var sb = new StringBuilder(); + sb.AppendLine("@{"); + sb.AppendLine($@"{GuidStart} = '{ModuleGuid}'"); + sb.AppendLine($@"{Indent}RootModule = '{"./Az.Sphere.psm1"}'"); + sb.AppendLine($@"{Indent}ModuleVersion = '{version}'"); + sb.AppendLine($@"{Indent}CompatiblePSEditions = 'Core', 'Desktop'"); + sb.AppendLine($@"{Indent}Author = '{"Microsoft Corporation"}'"); + sb.AppendLine($@"{Indent}CompanyName = '{"Microsoft Corporation"}'"); + sb.AppendLine($@"{Indent}Copyright = '{"Microsoft Corporation. All rights reserved."}'"); + sb.AppendLine($@"{Indent}Description = '{"Microsoft Azure PowerShell: Sphere cmdlets"}'"); + sb.AppendLine($@"{Indent}PowerShellVersion = '5.1'"); + sb.AppendLine($@"{Indent}DotNetFrameworkVersion = '4.7.2'"); + + // RequiredModules + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}RequiredModules = @({"undefined"})"); + } + + // RequiredAssemblies + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}RequiredAssemblies = @({"undefined"})"); + } + else + { + sb.AppendLine($@"{Indent}RequiredAssemblies = '{"./bin/Az.Sphere.private.dll"}'"); + } + + // NestedModules + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}NestedModules = @({"undefined"})"); + } + + // FormatsToProcess + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}FormatsToProcess = @({"undefined"})"); + } + else + { + var customFormatPs1xmlFiles = Directory.GetFiles(CustomFolder) + .Where(f => f.EndsWith(".format.ps1xml")) + .Select(f => $"{CustomFolderRelative}/{Path.GetFileName(f)}"); + var formatList = customFormatPs1xmlFiles.Prepend("./Az.Sphere.format.ps1xml").ToPsList(); + sb.AppendLine($@"{Indent}FormatsToProcess = {formatList}"); + } + + // TypesToProcess + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}TypesToProcess = @({"undefined"})"); + } + + // ScriptsToProcess + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}ScriptsToProcess = @({"undefined"})"); + } + + var functionInfos = GetScriptCmdlets(ExportsFolder).ToArray(); + // FunctionsToExport + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}FunctionsToExport = @({"undefined"})"); + } + else + { + var cmdletsList = functionInfos.Select(fi => fi.Name).Distinct().ToPsList(); + sb.AppendLine($@"{Indent}FunctionsToExport = {cmdletsList}"); + } + + // AliasesToExport + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}AliasesToExport = @({"undefined"})"); + } + else + { + var aliasesList = functionInfos.SelectMany(fi => fi.ScriptBlock.Attributes).ToAliasNames().ToPsList(); + if (!String.IsNullOrEmpty(aliasesList)) { + sb.AppendLine($@"{Indent}AliasesToExport = {aliasesList}"); + } + } + + // CmdletsToExport + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}CmdletsToExport = @({"undefined"})"); + } + + sb.AppendLine($@"{Indent}PrivateData = @{{"); + sb.AppendLine($@"{Indent}{Indent}PSData = @{{"); + + if (previewVersion != null) + { + sb.AppendLine($@"{Indent}{Indent}{Indent}Prerelease = '{previewVersion}'"); + } + sb.AppendLine($@"{Indent}{Indent}{Indent}Tags = {"Azure ResourceManager ARM PSModule Sphere".Split(' ').ToPsList().NullIfEmpty() ?? "''"}"); + sb.AppendLine($@"{Indent}{Indent}{Indent}LicenseUri = '{"https://aka.ms/azps-license"}'"); + sb.AppendLine($@"{Indent}{Indent}{Indent}ProjectUri = '{"https://github.com/Azure/azure-powershell"}'"); + sb.AppendLine($@"{Indent}{Indent}{Indent}ReleaseNotes = ''"); + var profilesList = ""; + if (IsAzure && !String.IsNullOrEmpty(profilesList)) + { + sb.AppendLine($@"{Indent}{Indent}{Indent}Profiles = {profilesList}"); + } + + sb.AppendLine($@"{Indent}{Indent}}}"); + sb.AppendLine($@"{Indent}}}"); + sb.AppendLine(@"}"); + + File.WriteAllText(Psd1Path, sb.ToString()); + } + catch (Exception ee) + { + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + } +} diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs new file mode 100644 index 000000000000..5a7d671e3736 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs @@ -0,0 +1,197 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Text; +using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.PsProxyOutputExtensions; +using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.PsHelpers; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell +{ + [Cmdlet(VerbsData.Export, "TestStub")] + [DoNotExport] + public class ExportTestStub : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ModuleName { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ExportsFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string OutputFolder { get; set; } + + [Parameter] + public SwitchParameter IncludeGenerated { get; set; } + + protected override void ProcessRecord() + { + try + { + if (!Directory.Exists(ExportsFolder)) + { + throw new ArgumentException($"Exports folder '{ExportsFolder}' does not exist"); + } + + var exportDirectories = Directory.GetDirectories(ExportsFolder); + if (!exportDirectories.Any()) + { + exportDirectories = new[] { ExportsFolder }; + } + /*var loadEnvFile = Path.Combine(OutputFolder, "loadEnv.ps1"); + if (!File.Exists(loadEnvFile)) + { + var sc = new StringBuilder(); + sc.AppendLine(@" +$envFile = 'env.json' +if ($TestMode -eq 'live') { + $envFile = 'localEnv.json' +} + +if (Test-Path -Path (Join-Path $PSScriptRoot $envFile)) { + $envFilePath = Join-Path $PSScriptRoot $envFile +} else { + $envFilePath = Join-Path $PSScriptRoot '..\$envFile' +} +$env = @{} +if (Test-Path -Path $envFilePath) { + $env = Get-Content (Join-Path $PSScriptRoot $envFile) | ConvertFrom-Json +}"); + File.WriteAllText(loadEnvFile, sc.ToString()); + }*/ + var utilFile = Path.Combine(OutputFolder, "utils.ps1"); + if (!File.Exists(utilFile)) + { + var sc = new StringBuilder(); + sc.AppendLine(@"function RandomString([bool]$allChars, [int32]$len) { + if ($allChars) { + return -join ((33..126) | Get-Random -Count $len | % {[char]$_}) + } else { + return -join ((48..57) + (97..122) | Get-Random -Count $len | % {[char]$_}) + } +} +function Start-TestSleep { + [CmdletBinding(DefaultParameterSetName = 'SleepBySeconds')] + param( + [parameter(Mandatory = $true, Position = 0, ParameterSetName = 'SleepBySeconds')] + [ValidateRange(0.0, 2147483.0)] + [double] $Seconds, + + [parameter(Mandatory = $true, ParameterSetName = 'SleepByMilliseconds')] + [ValidateRange('NonNegative')] + [Alias('ms')] + [int] $Milliseconds + ) + + if ($TestMode -ne 'playback') { + switch ($PSCmdlet.ParameterSetName) { + 'SleepBySeconds' { + Start-Sleep -Seconds $Seconds + } + 'SleepByMilliseconds' { + Start-Sleep -Milliseconds $Milliseconds + } + } + } +} + +$env = @{} +if ($UsePreviousConfigForRecord) { + $previousEnv = Get-Content (Join-Path $PSScriptRoot 'env.json') | ConvertFrom-Json + $previousEnv.psobject.properties | Foreach-Object { $env[$_.Name] = $_.Value } +} +# Add script method called AddWithCache to $env, when useCache is set true, it will try to get the value from the $env first. +# example: $val = $env.AddWithCache('key', $val, $true) +$env | Add-Member -Type ScriptMethod -Value { param( [string]$key, [object]$val, [bool]$useCache) if ($this.Contains($key) -and $useCache) { return $this[$key] } else { $this[$key] = $val; return $val } } -Name 'AddWithCache' +function setupEnv() { + # Preload subscriptionId and tenant from context, which will be used in test + # as default. You could change them if needed. + $env.SubscriptionId = (Get-AzContext).Subscription.Id + $env.Tenant = (Get-AzContext).Tenant.Id + # For any resources you created for test, you should add it to $env here. + $envFile = 'env.json' + if ($TestMode -eq 'live') { + $envFile = 'localEnv.json' + } + set-content -Path (Join-Path $PSScriptRoot $envFile) -Value (ConvertTo-Json $env) +} +function cleanupEnv() { + # Clean resources you create for testing +} +"); + File.WriteAllText(utilFile, sc.ToString()); + } + + + + foreach (var exportDirectory in exportDirectories) + { + var outputFolder = OutputFolder; + if (exportDirectory != ExportsFolder) + { + outputFolder = Path.Combine(OutputFolder, Path.GetFileName(exportDirectory)); + Directory.CreateDirectory(outputFolder); + } + + var variantGroups = GetScriptCmdlets(exportDirectory) + .SelectMany(fi => fi.ToVariants()) + .Where(v => !v.IsDoNotExport) + .GroupBy(v => v.CmdletName) + .Select(vg => new VariantGroup(ModuleName, vg.Key, vg.Select(v => v).ToArray(), outputFolder, isTest: true)) + .Where(vtg => !File.Exists(vtg.FilePath) && (IncludeGenerated || !vtg.IsGenerated)); + + foreach (var variantGroup in variantGroups) + { + var sb = new StringBuilder(); + sb.AppendLine($"if(($null -eq $TestName) -or ($TestName -contains '{variantGroup.CmdletName}'))"); + sb.AppendLine(@"{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath)" + ); + sb.AppendLine($@" $TestRecordingFile = Join-Path $PSScriptRoot '{variantGroup.CmdletName}.Recording.json'"); + sb.AppendLine(@" $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} +"); + + + sb.AppendLine($"Describe '{variantGroup.CmdletName}' {{"); + var variants = variantGroup.Variants + .Where(v => IncludeGenerated || !v.Attributes.OfType().Any()) + .ToList(); + + foreach (var variant in variants) + { + sb.AppendLine($"{Indent}It '{variant.VariantName}' -skip {{"); + sb.AppendLine($"{Indent}{Indent}{{ throw [System.NotImplementedException] }} | Should -Not -Throw"); + var variantSeparator = variants.IndexOf(variant) == variants.Count - 1 ? String.Empty : Environment.NewLine; + sb.AppendLine($"{Indent}}}{variantSeparator}"); + } + sb.AppendLine("}"); + + File.WriteAllText(variantGroup.FilePath, sb.ToString()); + } + } + } + catch (Exception ee) + { + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + } +} diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Cmdlets/GetCommonParameter.cs b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Cmdlets/GetCommonParameter.cs new file mode 100644 index 000000000000..b1a9a51805f8 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Cmdlets/GetCommonParameter.cs @@ -0,0 +1,52 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell +{ + [Cmdlet(VerbsCommon.Get, "CommonParameter")] + [OutputType(typeof(Dictionary))] + [DoNotExport] + public class GetCommonParameter : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public PSCmdlet PSCmdlet { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public Dictionary PSBoundParameter { get; set; } + + protected override void ProcessRecord() + { + try + { + var variants = PSCmdlet.MyInvocation.MyCommand.ToVariants(); + var commonParameterNames = variants.ToParameterGroups() + .Where(pg => pg.OrderCategory == ParameterCategory.Azure || pg.OrderCategory == ParameterCategory.Runtime) + .Select(pg => pg.ParameterName); + if (variants.Any(v => v.SupportsShouldProcess)) + { + commonParameterNames = commonParameterNames.Append("Confirm").Append("WhatIf"); + } + if (variants.Any(v => v.SupportsPaging)) + { + commonParameterNames = commonParameterNames.Append("First").Append("Skip").Append("IncludeTotalCount"); + } + + var names = commonParameterNames.ToArray(); + var keys = PSBoundParameter.Keys.Where(k => names.Contains(k)); + WriteObject(keys.ToDictionary(key => key, key => PSBoundParameter[key]), true); + } + catch (System.Exception ee) + { + System.Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + } +} diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Cmdlets/GetModuleGuid.cs b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Cmdlets/GetModuleGuid.cs new file mode 100644 index 000000000000..fc976771e5c4 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Cmdlets/GetModuleGuid.cs @@ -0,0 +1,31 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System.Management.Automation; +using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.PsHelpers; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell +{ + [Cmdlet(VerbsCommon.Get, "ModuleGuid")] + [DoNotExport] + public class GetModuleGuid : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string Psd1Path { get; set; } + + protected override void ProcessRecord() + { + try + { + WriteObject(ReadGuidFromPsd1(Psd1Path)); + } + catch (System.Exception ee) + { + System.Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + } +} diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Cmdlets/GetScriptCmdlet.cs b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Cmdlets/GetScriptCmdlet.cs new file mode 100644 index 000000000000..7684f77d872d --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Cmdlets/GetScriptCmdlet.cs @@ -0,0 +1,54 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System.Linq; +using System.Management.Automation; +using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.PsHelpers; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell +{ + [Cmdlet(VerbsCommon.Get, "ScriptCmdlet")] + [OutputType(typeof(string[]))] + [DoNotExport] + public class GetScriptCmdlet : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ScriptFolder { get; set; } + + [Parameter] + public SwitchParameter IncludeDoNotExport { get; set; } + + [Parameter] + public SwitchParameter AsAlias { get; set; } + + [Parameter] + public SwitchParameter AsFunctionInfo { get; set; } + + protected override void ProcessRecord() + { + try + { + var functionInfos = GetScriptCmdlets(this, ScriptFolder) + .Where(fi => IncludeDoNotExport || !fi.ScriptBlock.Attributes.OfType().Any()) + .ToArray(); + if (AsFunctionInfo) + { + WriteObject(functionInfos, true); + return; + } + var aliases = functionInfos.SelectMany(i => i.ScriptBlock.Attributes).ToAliasNames(); + var names = functionInfos.Select(fi => fi.Name).Distinct(); + var output = (AsAlias ? aliases : names).DefaultIfEmpty("''").ToArray(); + WriteObject(output, true); + } + catch (System.Exception ee) + { + System.Console.Error.WriteLine($"{ee.GetType().Name}: {ee.Message}"); + System.Console.Error.WriteLine(ee.StackTrace); + throw ee; + } + } + } +} diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/CollectionExtensions.cs b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/CollectionExtensions.cs new file mode 100644 index 000000000000..61704011073c --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/CollectionExtensions.cs @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell +{ + internal static class CollectionExtensions + { + public static T[] NullIfEmpty(this T[] collection) => (collection?.Any() ?? false) ? collection : null; + public static IEnumerable EmptyIfNull(this IEnumerable collection) => collection ?? Enumerable.Empty(); + + // https://stackoverflow.com/a/4158364/294804 + public static IEnumerable DistinctBy(this IEnumerable collection, Func selector) => + collection.GroupBy(selector).Select(group => group.First()); + } +} diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs new file mode 100644 index 000000000000..aee3c48a6daa --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs @@ -0,0 +1,122 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.MarkdownTypesExtensions; +using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.PsProxyOutputExtensions; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell +{ + internal static class MarkdownRenderer + { + public static void WriteMarkdowns(IEnumerable variantGroups, PsModuleHelpInfo moduleHelpInfo, string docsFolder, string examplesFolder, bool AddComplexInterfaceInfo = true) + { + Directory.CreateDirectory(docsFolder); + var markdownInfos = variantGroups.Where(vg => !vg.IsInternal).Select(vg => new MarkdownHelpInfo(vg, examplesFolder)).OrderBy(mhi => mhi.CmdletName).ToArray(); + + foreach (var markdownInfo in markdownInfos) + { + var sb = new StringBuilder(); + sb.Append(markdownInfo.ToHelpMetadataOutput()); + sb.Append($"# {markdownInfo.CmdletName}{Environment.NewLine}{Environment.NewLine}"); + sb.Append($"## SYNOPSIS{Environment.NewLine}{markdownInfo.Synopsis.ToDescriptionFormat()}{Environment.NewLine}{Environment.NewLine}"); + + sb.Append($"## SYNTAX{Environment.NewLine}{Environment.NewLine}"); + var hasMultipleParameterSets = markdownInfo.SyntaxInfos.Length > 1; + foreach (var syntaxInfo in markdownInfo.SyntaxInfos) + { + sb.Append(syntaxInfo.ToHelpSyntaxOutput(hasMultipleParameterSets)); + } + + sb.Append($"## DESCRIPTION{Environment.NewLine}{markdownInfo.Description.ToDescriptionFormat()}{Environment.NewLine}{Environment.NewLine}"); + + sb.Append($"## EXAMPLES{Environment.NewLine}{Environment.NewLine}"); + foreach (var exampleInfo in markdownInfo.Examples) + { + sb.Append(exampleInfo.ToHelpExampleOutput()); + } + + sb.Append($"## PARAMETERS{Environment.NewLine}{Environment.NewLine}"); + foreach (var parameter in markdownInfo.Parameters) + { + sb.Append(parameter.ToHelpParameterOutput()); + } + if (markdownInfo.SupportsShouldProcess) + { + foreach (var parameter in SupportsShouldProcessParameters) + { + sb.Append(parameter.ToHelpParameterOutput()); + } + } + + sb.Append($"### CommonParameters{Environment.NewLine}This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).{Environment.NewLine}{Environment.NewLine}"); + + sb.Append($"## INPUTS{Environment.NewLine}{Environment.NewLine}"); + foreach (var input in markdownInfo.Inputs) + { + sb.Append($"### {input}{Environment.NewLine}{Environment.NewLine}"); + } + + sb.Append($"## OUTPUTS{Environment.NewLine}{Environment.NewLine}"); + foreach (var output in markdownInfo.Outputs) + { + sb.Append($"### {output}{Environment.NewLine}{Environment.NewLine}"); + } + + sb.Append($"## NOTES{Environment.NewLine}{Environment.NewLine}"); + if (markdownInfo.Aliases.Any()) + { + sb.Append($"ALIASES{Environment.NewLine}{Environment.NewLine}"); + } + foreach (var alias in markdownInfo.Aliases) + { + sb.Append($"{alias}{Environment.NewLine}{Environment.NewLine}"); + } + + if (AddComplexInterfaceInfo) + { + if (markdownInfo.ComplexInterfaceInfos.Any()) + { + sb.Append($"{ComplexParameterHeader}{Environment.NewLine}"); + } + foreach (var complexInterfaceInfo in markdownInfo.ComplexInterfaceInfos) + { + sb.Append($"{complexInterfaceInfo.ToNoteOutput(includeDashes: true, includeBackticks: true)}{Environment.NewLine}{Environment.NewLine}"); + } + + } + + sb.Append($"## RELATED LINKS{Environment.NewLine}{Environment.NewLine}"); + foreach (var relatedLink in markdownInfo.RelatedLinks) + { + sb.Append($"[{relatedLink}]({relatedLink}){Environment.NewLine}{Environment.NewLine}"); + } + + File.WriteAllText(Path.Combine(docsFolder, $"{markdownInfo.CmdletName}.md"), sb.ToString()); + } + + WriteModulePage(moduleHelpInfo, markdownInfos, docsFolder); + } + + private static void WriteModulePage(PsModuleHelpInfo moduleInfo, MarkdownHelpInfo[] markdownInfos, string docsFolder) + { + var sb = new StringBuilder(); + sb.Append(moduleInfo.ToModulePageMetadataOutput()); + sb.Append($"# {moduleInfo.Name} Module{Environment.NewLine}"); + sb.Append($"## Description{Environment.NewLine}{moduleInfo.Description.ToDescriptionFormat()}{Environment.NewLine}{Environment.NewLine}"); + + sb.Append($"## {moduleInfo.Name} Cmdlets{Environment.NewLine}"); + foreach (var markdownInfo in markdownInfos) + { + sb.Append(markdownInfo.ToModulePageCmdletOutput()); + } + + File.WriteAllText(Path.Combine(docsFolder, $"{moduleInfo.Name}.md"), sb.ToString()); + } + } +} diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Models/PsFormatTypes.cs b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Models/PsFormatTypes.cs new file mode 100644 index 000000000000..03398c280ece --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Models/PsFormatTypes.cs @@ -0,0 +1,138 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Xml.Serialization; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell +{ + internal class ViewParameters + { + public Type Type { get; } + public IEnumerable Properties { get; } + + public ViewParameters(Type type, IEnumerable properties) + { + Type = type; + Properties = properties; + } + } + + internal class PropertyFormat + { + public PropertyInfo Property { get; } + public FormatTableAttribute FormatTable { get; } + + public int? Index { get; } + public string Label { get; } + public int? Width { get; } + public PropertyOrigin? Origin { get; } + + public PropertyFormat(PropertyInfo propertyInfo) + { + Property = propertyInfo; + FormatTable = Property.GetCustomAttributes().FirstOrDefault(); + var origin = Property.GetCustomAttributes().FirstOrDefault(); + + Index = FormatTable?.HasIndex ?? false ? (int?)FormatTable.Index : null; + Label = FormatTable?.Label ?? propertyInfo.Name; + Width = FormatTable?.HasWidth ?? false ? (int?)FormatTable.Width : null; + // If we have an index, we don't want to use Origin. + Origin = FormatTable?.HasIndex ?? false ? null : origin?.Origin; + } + } + + [Serializable] + [XmlRoot(nameof(Configuration))] + public class Configuration + { + [XmlElement("ViewDefinitions")] + public ViewDefinitions ViewDefinitions { get; set; } + } + + [Serializable] + public class ViewDefinitions + { + //https://stackoverflow.com/a/10518657/294804 + [XmlElement("View")] + public List Views { get; set; } + } + + [Serializable] + public class View + { + [XmlElement(nameof(Name))] + public string Name { get; set; } + [XmlElement(nameof(ViewSelectedBy))] + public ViewSelectedBy ViewSelectedBy { get; set; } + [XmlElement(nameof(TableControl))] + public TableControl TableControl { get; set; } + } + + [Serializable] + public class ViewSelectedBy + { + [XmlElement(nameof(TypeName))] + public string TypeName { get; set; } + } + + [Serializable] + public class TableControl + { + [XmlElement(nameof(TableHeaders))] + public TableHeaders TableHeaders { get; set; } + [XmlElement(nameof(TableRowEntries))] + public TableRowEntries TableRowEntries { get; set; } + } + + [Serializable] + public class TableHeaders + { + [XmlElement("TableColumnHeader")] + public List TableColumnHeaders { get; set; } + } + + [Serializable] + public class TableColumnHeader + { + [XmlElement(nameof(Label))] + public string Label { get; set; } + [XmlElement(nameof(Width))] + public int? Width { get; set; } + + //https://stackoverflow.com/a/4095225/294804 + public bool ShouldSerializeWidth() => Width.HasValue; + } + + [Serializable] + public class TableRowEntries + { + [XmlElement(nameof(TableRowEntry))] + public TableRowEntry TableRowEntry { get; set; } + } + + [Serializable] + public class TableRowEntry + { + [XmlElement(nameof(TableColumnItems))] + public TableColumnItems TableColumnItems { get; set; } + } + + [Serializable] + public class TableColumnItems + { + [XmlElement("TableColumnItem")] + public List TableItems { get; set; } + } + + [Serializable] + public class TableColumnItem + { + [XmlElement(nameof(PropertyName))] + public string PropertyName { get; set; } + } +} diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Models/PsHelpMarkdownOutputs.cs b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Models/PsHelpMarkdownOutputs.cs new file mode 100644 index 000000000000..a4d657f5954d --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Models/PsHelpMarkdownOutputs.cs @@ -0,0 +1,199 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Linq; +using System.Management.Automation; +using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.PsHelpOutputExtensions; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell +{ + internal class HelpMetadataOutput + { + public MarkdownHelpInfo HelpInfo { get; } + + public HelpMetadataOutput(MarkdownHelpInfo helpInfo) + { + HelpInfo = helpInfo; + } + + public override string ToString() => $@"--- +external help file:{(!String.IsNullOrEmpty(HelpInfo.ExternalHelpFilename) ? $" {HelpInfo.ExternalHelpFilename}" : String.Empty)} +Module Name: {HelpInfo.ModuleName} +online version: {HelpInfo.OnlineVersion} +schema: {HelpInfo.Schema.ToString(3)} +--- + +"; + } + + internal class HelpSyntaxOutput + { + public MarkdownSyntaxHelpInfo SyntaxInfo { get; } + public bool HasMultipleParameterSets { get; } + + public HelpSyntaxOutput(MarkdownSyntaxHelpInfo syntaxInfo, bool hasMultipleParameterSets) + { + SyntaxInfo = syntaxInfo; + HasMultipleParameterSets = hasMultipleParameterSets; + } + + public override string ToString() + { + var psnText = HasMultipleParameterSets ? $"### {SyntaxInfo.ParameterSetName}{(SyntaxInfo.IsDefault ? " (Default)" : String.Empty)}{Environment.NewLine}" : String.Empty; + return $@"{psnText}``` +{SyntaxInfo.SyntaxText} +``` + +"; + } + } + + internal class HelpExampleOutput + { + private string ExampleTemplate = + "{0}{1}" + Environment.NewLine + + "{2}" + Environment.NewLine + "{3}" + Environment.NewLine + "{4}" + Environment.NewLine + Environment.NewLine + + "{5}" + Environment.NewLine + Environment.NewLine; + + private string ExampleTemplateWithOutput = + "{0}{1}" + Environment.NewLine + + "{2}" + Environment.NewLine + "{3}" + Environment.NewLine + "{4}" + Environment.NewLine + Environment.NewLine + + "{5}" + Environment.NewLine + "{6}" + Environment.NewLine + "{7}" + Environment.NewLine + Environment.NewLine + + "{8}" + Environment.NewLine + Environment.NewLine; + + public MarkdownExampleHelpInfo ExampleInfo { get; } + + public HelpExampleOutput(MarkdownExampleHelpInfo exampleInfo) + { + ExampleInfo = exampleInfo; + } + + public override string ToString() + { + if (string.IsNullOrEmpty(ExampleInfo.Output)) + { + return string.Format(ExampleTemplate, + ExampleNameHeader, ExampleInfo.Name, + ExampleCodeHeader, ExampleInfo.Code, ExampleCodeFooter, + ExampleInfo.Description.ToDescriptionFormat()); + } + else + { + return string.Format(ExampleTemplateWithOutput, + ExampleNameHeader, ExampleInfo.Name, + ExampleCodeHeader, ExampleInfo.Code, ExampleCodeFooter, + ExampleOutputHeader, ExampleInfo.Output, ExampleOutputFooter, + ExampleInfo.Description.ToDescriptionFormat()); ; + } + } + } + + internal class HelpParameterOutput + { + public MarkdownParameterHelpInfo ParameterInfo { get; } + + public HelpParameterOutput(MarkdownParameterHelpInfo parameterInfo) + { + ParameterInfo = parameterInfo; + } + + public override string ToString() + { + var pipelineInputTypes = new[] + { + ParameterInfo.AcceptsPipelineByValue ? "ByValue" : String.Empty, + ParameterInfo.AcceptsPipelineByPropertyName ? "ByPropertyName" : String.Empty + }.JoinIgnoreEmpty(", "); + var pipelineInput = ParameterInfo.AcceptsPipelineByValue || ParameterInfo.AcceptsPipelineByPropertyName + ? $@"{true} ({pipelineInputTypes})" + : false.ToString(); + + return $@"### -{ParameterInfo.Name} +{ParameterInfo.Description.ToDescriptionFormat()} + +```yaml +Type: {ParameterInfo.Type.FullName} +Parameter Sets: {(ParameterInfo.HasAllParameterSets ? "(All)" : ParameterInfo.ParameterSetNames.JoinIgnoreEmpty(", "))} +Aliases:{(ParameterInfo.Aliases.Any() ? $" {ParameterInfo.Aliases.JoinIgnoreEmpty(", ")}" : String.Empty)} + +Required: {ParameterInfo.IsRequired} +Position: {ParameterInfo.Position} +Default value: {ParameterInfo.DefaultValue} +Accept pipeline input: {pipelineInput} +Accept wildcard characters: {ParameterInfo.AcceptsWildcardCharacters} +``` + +"; + } + } + + internal class ModulePageMetadataOutput + { + public PsModuleHelpInfo ModuleInfo { get; } + + private static string HelpLinkPrefix { get; } = @"https://learn.microsoft.com/powershell/module/"; + + public ModulePageMetadataOutput(PsModuleHelpInfo moduleInfo) + { + ModuleInfo = moduleInfo; + } + + public override string ToString() => $@"--- +Module Name: {ModuleInfo.Name} +Module Guid: {ModuleInfo.Guid} +Download Help Link: {HelpLinkPrefix}{ModuleInfo.Name.ToLowerInvariant()} +Help Version: 1.0.0.0 +Locale: en-US +--- + +"; + } + + internal class ModulePageCmdletOutput + { + public MarkdownHelpInfo HelpInfo { get; } + + public ModulePageCmdletOutput(MarkdownHelpInfo helpInfo) + { + HelpInfo = helpInfo; + } + + public override string ToString() => $@"### [{HelpInfo.CmdletName}]({HelpInfo.CmdletName}.md) +{HelpInfo.Synopsis.ToDescriptionFormat()} + +"; + } + + internal static class PsHelpOutputExtensions + { + public static string EscapeAngleBrackets(this string text) => text?.Replace("<", @"\<").Replace(">", @"\>"); + public static string ReplaceSentenceEndWithNewline(this string text) => text?.Replace(". ", $".{Environment.NewLine}").Replace(". ", $".{Environment.NewLine}"); + public static string ReplaceBrWithNewline(this string text) => text?.Replace("
", $"{Environment.NewLine}"); + public static string ToDescriptionFormat(this string text, bool escapeAngleBrackets = true) + { + var description = text?.ReplaceBrWithNewline(); + description = escapeAngleBrackets ? description?.EscapeAngleBrackets() : description; + return description?.ReplaceSentenceEndWithNewline().Trim(); + } + + public const string ExampleNameHeader = "### "; + public const string ExampleCodeHeader = "```powershell"; + public const string ExampleCodeFooter = "```"; + public const string ExampleOutputHeader = "```output"; + public const string ExampleOutputFooter = "```"; + + public static HelpMetadataOutput ToHelpMetadataOutput(this MarkdownHelpInfo helpInfo) => new HelpMetadataOutput(helpInfo); + + public static HelpSyntaxOutput ToHelpSyntaxOutput(this MarkdownSyntaxHelpInfo syntaxInfo, bool hasMultipleParameterSets) => new HelpSyntaxOutput(syntaxInfo, hasMultipleParameterSets); + + public static HelpExampleOutput ToHelpExampleOutput(this MarkdownExampleHelpInfo exampleInfo) => new HelpExampleOutput(exampleInfo); + + public static HelpParameterOutput ToHelpParameterOutput(this MarkdownParameterHelpInfo parameterInfo) => new HelpParameterOutput(parameterInfo); + + public static ModulePageMetadataOutput ToModulePageMetadataOutput(this PsModuleHelpInfo moduleInfo) => new ModulePageMetadataOutput(moduleInfo); + + public static ModulePageCmdletOutput ToModulePageCmdletOutput(this MarkdownHelpInfo helpInfo) => new ModulePageCmdletOutput(helpInfo); + } +} diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Models/PsHelpTypes.cs b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Models/PsHelpTypes.cs new file mode 100644 index 000000000000..d9990731402f --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Models/PsHelpTypes.cs @@ -0,0 +1,202 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell +{ + internal class PsHelpInfo + { + public string CmdletName { get; } + public string ModuleName { get; } + public string Synopsis { get; } + public string Description { get; } + public string AlertText { get; } + public string Category { get; } + public PsHelpLinkInfo OnlineVersion { get; } + public PsHelpLinkInfo[] RelatedLinks { get; } + public bool? HasCommonParameters { get; } + public bool? HasWorkflowCommonParameters { get; } + + public PsHelpTypeInfo[] InputTypes { get; } + public PsHelpTypeInfo[] OutputTypes { get; } + public PsHelpExampleInfo[] Examples { get; set; } + public string[] Aliases { get; } + + public PsParameterHelpInfo[] Parameters { get; } + public PsHelpSyntaxInfo[] Syntax { get; } + + public object Component { get; } + public object Functionality { get; } + public object PsSnapIn { get; } + public object Role { get; } + public string NonTerminatingErrors { get; } + + public PsHelpInfo(PSObject helpObject = null) + { + helpObject = helpObject ?? new PSObject(); + CmdletName = helpObject.GetProperty("Name").NullIfEmpty() ?? helpObject.GetNestedProperty("details", "name"); + ModuleName = helpObject.GetProperty("ModuleName"); + Synopsis = helpObject.GetProperty("Synopsis"); + Description = helpObject.GetProperty("description").EmptyIfNull().ToDescriptionText().NullIfEmpty() ?? + helpObject.GetNestedProperty("details", "description").EmptyIfNull().ToDescriptionText(); + AlertText = helpObject.GetNestedProperty("alertSet", "alert").EmptyIfNull().ToDescriptionText(); + Category = helpObject.GetProperty("Category"); + HasCommonParameters = helpObject.GetProperty("CommonParameters").ToNullableBool(); + HasWorkflowCommonParameters = helpObject.GetProperty("WorkflowCommonParameters").ToNullableBool(); + + var links = helpObject.GetNestedProperty("relatedLinks", "navigationLink").EmptyIfNull().Select(nl => nl.ToLinkInfo()).ToArray(); + OnlineVersion = links.FirstOrDefault(l => l.Text?.ToLowerInvariant().StartsWith("online version:") ?? links.Length == 1); + RelatedLinks = links.Where(l => !l.Text?.ToLowerInvariant().StartsWith("online version:") ?? links.Length != 1).ToArray(); + + InputTypes = helpObject.GetNestedProperty("inputTypes", "inputType").EmptyIfNull().Select(it => it.ToTypeInfo()).ToArray(); + OutputTypes = helpObject.GetNestedProperty("returnValues", "returnValue").EmptyIfNull().Select(rv => rv.ToTypeInfo()).ToArray(); + Examples = helpObject.GetNestedProperty("examples", "example").EmptyIfNull().Select(e => e.ToExampleInfo()).ToArray(); + Aliases = helpObject.GetProperty("aliases").EmptyIfNull().Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries); + + Parameters = helpObject.GetNestedProperty("parameters", "parameter").EmptyIfNull().Select(p => p.ToPsParameterHelpInfo()).ToArray(); + Syntax = helpObject.GetNestedProperty("syntax", "syntaxItem").EmptyIfNull().Select(si => si.ToSyntaxInfo()).ToArray(); + + Component = helpObject.GetProperty("Component"); + Functionality = helpObject.GetProperty("Functionality"); + PsSnapIn = helpObject.GetProperty("PSSnapIn"); + Role = helpObject.GetProperty("Role"); + NonTerminatingErrors = helpObject.GetProperty("nonTerminatingErrors"); + } + } + + internal class PsHelpTypeInfo + { + public string Name { get; } + public string Description { get; } + + public PsHelpTypeInfo(PSObject typeObject) + { + Name = typeObject.GetNestedProperty("type", "name").EmptyIfNull().Trim(); + Description = typeObject.GetProperty("description").EmptyIfNull().ToDescriptionText(); + } + } + + internal class PsHelpLinkInfo + { + public string Uri { get; } + public string Text { get; } + + public PsHelpLinkInfo(PSObject linkObject) + { + Uri = linkObject.GetProperty("uri"); + Text = linkObject.GetProperty("linkText"); + } + } + + internal class PsHelpSyntaxInfo + { + public string CmdletName { get; } + public PsParameterHelpInfo[] Parameters { get; } + + public PsHelpSyntaxInfo(PSObject syntaxObject) + { + CmdletName = syntaxObject.GetProperty("name"); + Parameters = syntaxObject.GetProperty("parameter").EmptyIfNull().Select(p => p.ToPsParameterHelpInfo()).ToArray(); + } + } + + internal class PsHelpExampleInfo + { + public string Title { get; } + public string Code { get; } + public string Output { get; } + public string Remarks { get; } + + public PsHelpExampleInfo(PSObject exampleObject) + { + Title = exampleObject.GetProperty("title"); + Code = exampleObject.GetProperty("code"); + Output = exampleObject.GetProperty("output"); + Remarks = exampleObject.GetProperty("remarks").EmptyIfNull().ToDescriptionText(); + } + public PsHelpExampleInfo(MarkdownExampleHelpInfo markdownExample) + { + Title = markdownExample.Name; + Code = markdownExample.Code; + Output = markdownExample.Output; + Remarks = markdownExample.Description; + } + + public static implicit operator PsHelpExampleInfo(MarkdownExampleHelpInfo markdownExample) => new PsHelpExampleInfo(markdownExample); + } + + internal class PsParameterHelpInfo + { + public string DefaultValueAsString { get; } + + public string Name { get; } + public string TypeName { get; } + public string Description { get; } + public string SupportsPipelineInput { get; } + public string PositionText { get; } + public string[] ParameterSetNames { get; } + public string[] Aliases { get; } + + public bool? SupportsGlobbing { get; } + public bool? IsRequired { get; } + public bool? IsVariableLength { get; } + public bool? IsDynamic { get; } + + public PsParameterHelpInfo(PSObject parameterHelpObject = null) + { + parameterHelpObject = parameterHelpObject ?? new PSObject(); + DefaultValueAsString = parameterHelpObject.GetProperty("defaultValue"); + Name = parameterHelpObject.GetProperty("name"); + TypeName = parameterHelpObject.GetProperty("parameterValue").NullIfEmpty() ?? parameterHelpObject.GetNestedProperty("type", "name"); + Description = parameterHelpObject.GetProperty("Description").EmptyIfNull().ToDescriptionText(); + SupportsPipelineInput = parameterHelpObject.GetProperty("pipelineInput"); + PositionText = parameterHelpObject.GetProperty("position"); + ParameterSetNames = parameterHelpObject.GetProperty("parameterSetName").EmptyIfNull().Split(new[] { ", " }, StringSplitOptions.RemoveEmptyEntries); + Aliases = parameterHelpObject.GetProperty("aliases").EmptyIfNull().Split(new[] { ", " }, StringSplitOptions.RemoveEmptyEntries); + + SupportsGlobbing = parameterHelpObject.GetProperty("globbing").ToNullableBool(); + IsRequired = parameterHelpObject.GetProperty("required").ToNullableBool(); + IsVariableLength = parameterHelpObject.GetProperty("variableLength").ToNullableBool(); + IsDynamic = parameterHelpObject.GetProperty("isDynamic").ToNullableBool(); + } + } + + internal class PsModuleHelpInfo + { + public string Name { get; } + public Guid Guid { get; } + public string Description { get; } + + public PsModuleHelpInfo(PSModuleInfo moduleInfo) + : this(moduleInfo?.Name ?? String.Empty, moduleInfo?.Guid ?? Guid.NewGuid(), moduleInfo?.Description ?? String.Empty) + { + } + + public PsModuleHelpInfo(string name, Guid guid, string description) + { + Name = name; + Guid = guid; + Description = description; + } + } + + internal static class HelpTypesExtensions + { + public static PsHelpInfo ToPsHelpInfo(this PSObject helpObject) => new PsHelpInfo(helpObject); + public static PsParameterHelpInfo ToPsParameterHelpInfo(this PSObject parameterHelpObject) => new PsParameterHelpInfo(parameterHelpObject); + + public static string ToDescriptionText(this IEnumerable descriptionObject) => descriptionObject != null + ? String.Join(Environment.NewLine, descriptionObject.Select(dl => dl.GetProperty("Text").EmptyIfNull())).NullIfWhiteSpace() + : null; + public static PsHelpTypeInfo ToTypeInfo(this PSObject typeObject) => new PsHelpTypeInfo(typeObject); + public static PsHelpExampleInfo ToExampleInfo(this PSObject exampleObject) => new PsHelpExampleInfo(exampleObject); + public static PsHelpLinkInfo ToLinkInfo(this PSObject linkObject) => new PsHelpLinkInfo(linkObject); + public static PsHelpSyntaxInfo ToSyntaxInfo(this PSObject syntaxObject) => new PsHelpSyntaxInfo(syntaxObject); + public static PsModuleHelpInfo ToModuleInfo(this PSModuleInfo moduleInfo) => new PsModuleHelpInfo(moduleInfo); + } +} diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs new file mode 100644 index 000000000000..57f909e42618 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs @@ -0,0 +1,329 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Management.Automation; +using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.MarkdownTypesExtensions; +using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.PsHelpOutputExtensions; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell +{ + internal class MarkdownHelpInfo + { + public string ExternalHelpFilename { get; } + public string ModuleName { get; } + public string OnlineVersion { get; } + public Version Schema { get; } + + public string CmdletName { get; } + public string[] Aliases { get; } + public string Synopsis { get; } + public string Description { get; } + + public MarkdownSyntaxHelpInfo[] SyntaxInfos { get; } + public MarkdownExampleHelpInfo[] Examples { get; } + public MarkdownParameterHelpInfo[] Parameters { get; } + + public string[] Inputs { get; } + public string[] Outputs { get; } + public ComplexInterfaceInfo[] ComplexInterfaceInfos { get; } + public MarkdownRelatedLinkInfo[] RelatedLinks { get; } + + public bool SupportsShouldProcess { get; } + public bool SupportsPaging { get; } + + public MarkdownHelpInfo(VariantGroup variantGroup, string examplesFolder, string externalHelpFilename = "") + { + ExternalHelpFilename = externalHelpFilename; + ModuleName = variantGroup.RootModuleName != "" ? variantGroup.RootModuleName : variantGroup.ModuleName; + var helpInfo = variantGroup.HelpInfo; + var commentInfo = variantGroup.CommentInfo; + Schema = Version.Parse("2.0.0"); + + CmdletName = variantGroup.CmdletName; + Aliases = (variantGroup.Aliases.NullIfEmpty() ?? helpInfo.Aliases).Where(a => a != "None").ToArray(); + Synopsis = commentInfo.Synopsis; + Description = commentInfo.Description; + + SyntaxInfos = variantGroup.Variants + .Select(v => new MarkdownSyntaxHelpInfo(v, variantGroup.ParameterGroups, v.VariantName == variantGroup.DefaultParameterSetName)) + .OrderByDescending(v => v.IsDefault).ThenBy(v => v.ParameterSetName).ToArray(); + Examples = GetExamplesFromMarkdown(examplesFolder).NullIfEmpty() + ?? helpInfo.Examples.Select(e => e.ToExampleHelpInfo()).ToArray().NullIfEmpty() + ?? DefaultExampleHelpInfos; + + Parameters = variantGroup.ParameterGroups + .Where(pg => !pg.DontShow && !pg.Parameters.All(p => p.IsHidden())) + .Select(pg => new MarkdownParameterHelpInfo( + variantGroup.Variants.SelectMany(v => v.HelpInfo.Parameters).Where(phi => phi.Name == pg.ParameterName).ToArray(), pg)) + .OrderBy(phi => phi.Name).ToArray(); + + Inputs = commentInfo.Inputs; + Outputs = commentInfo.Outputs; + + ComplexInterfaceInfos = variantGroup.ComplexInterfaceInfos; + OnlineVersion = commentInfo.OnlineVersion; + + var relatedLinkLists = new List(); + relatedLinkLists.AddRange(commentInfo.RelatedLinks?.Select(link => new MarkdownRelatedLinkInfo(link))); + relatedLinkLists.AddRange(variantGroup.Variants.SelectMany(v => v.Attributes).OfType()?.Distinct()?.Select(link => new MarkdownRelatedLinkInfo(link.Url, link.Description))); + RelatedLinks = relatedLinkLists?.ToArray(); + + SupportsShouldProcess = variantGroup.SupportsShouldProcess; + SupportsPaging = variantGroup.SupportsPaging; + } + + private MarkdownExampleHelpInfo[] GetExamplesFromMarkdown(string examplesFolder) + { + var filePath = Path.Combine(examplesFolder, $"{CmdletName}.md"); + if (!Directory.Exists(examplesFolder) || !File.Exists(filePath)) return null; + + var lines = File.ReadAllLines(filePath); + var nameIndices = lines.Select((l, i) => l.StartsWith(ExampleNameHeader) ? i : -1).Where(i => i != -1).ToArray(); + //https://codereview.stackexchange.com/a/187148/68772 + var indexCountGroups = nameIndices.Skip(1).Append(lines.Length).Zip(nameIndices, (next, current) => (NameIndex: current, LineCount: next - current)); + var exampleGroups = indexCountGroups.Select(icg => lines.Skip(icg.NameIndex).Take(icg.LineCount).ToArray()); + return exampleGroups.Select(eg => + { + var name = eg.First().Replace(ExampleNameHeader, String.Empty); + var codeStartIndex = eg.Select((l, i) => l.StartsWith(ExampleCodeHeader) ? (int?)i : null).FirstOrDefault(i => i.HasValue); + var codeEndIndex = eg.Select((l, i) => l.StartsWith(ExampleCodeFooter) ? (int?)i : null).FirstOrDefault(i => i.HasValue && i != codeStartIndex); + var code = codeStartIndex.HasValue && codeEndIndex.HasValue + ? String.Join(Environment.NewLine, eg.Skip(codeStartIndex.Value + 1).Take(codeEndIndex.Value - (codeStartIndex.Value + 1))) + : String.Empty; + var outputStartIndex = eg.Select((l, i) => l.StartsWith(ExampleOutputHeader) ? (int?)i : null).FirstOrDefault(i => i.HasValue); + var outputEndIndex = eg.Select((l, i) => l.StartsWith(ExampleOutputFooter) ? (int?)i : null).FirstOrDefault(i => i.HasValue && i > outputStartIndex); + var output = outputStartIndex.HasValue && outputEndIndex.HasValue + ? String.Join(Environment.NewLine, eg.Skip(outputStartIndex.Value + 1).Take(outputEndIndex.Value - (outputStartIndex.Value + 1))) + : String.Empty; + var descriptionStartIndex = (outputEndIndex ?? (codeEndIndex ?? 0)) + 1; + descriptionStartIndex = String.IsNullOrWhiteSpace(eg[descriptionStartIndex]) ? descriptionStartIndex + 1 : descriptionStartIndex; + var descriptionEndIndex = eg.Length - 1; + descriptionEndIndex = String.IsNullOrWhiteSpace(eg[descriptionEndIndex]) ? descriptionEndIndex - 1 : descriptionEndIndex; + var description = String.Join(Environment.NewLine, eg.Skip(descriptionStartIndex).Take((descriptionEndIndex + 1) - descriptionStartIndex)); + return new MarkdownExampleHelpInfo(name, code, output, description); + }).ToArray(); + } + } + + internal class MarkdownSyntaxHelpInfo + { + public Variant Variant { get; } + public bool IsDefault { get; } + public string ParameterSetName { get; } + public Parameter[] Parameters { get; } + public string SyntaxText { get; } + + public MarkdownSyntaxHelpInfo(Variant variant, ParameterGroup[] parameterGroups, bool isDefault) + { + Variant = variant; + IsDefault = isDefault; + ParameterSetName = Variant.VariantName; + Parameters = Variant.Parameters + .Where(p => !p.DontShow && !p.IsHidden()).OrderByDescending(p => p.IsMandatory) + //https://stackoverflow.com/a/6461526/294804 + .ThenByDescending(p => p.Position.HasValue).ThenBy(p => p.Position) + // Use the OrderCategory of the parameter group because the final order category is the highest of the group, and not the order category of the individual parameters from the variants. + .ThenBy(p => parameterGroups.First(pg => pg.ParameterName == p.ParameterName).OrderCategory).ThenBy(p => p.ParameterName).ToArray(); + SyntaxText = CreateSyntaxFormat(); + } + + //https://github.com/PowerShell/platyPS/blob/a607a926bfffe1e1a1e53c19e0057eddd0c07611/src/Markdown.MAML/Renderer/Markdownv2Renderer.cs#L29-L32 + private const int SyntaxLineWidth = 110; + private string CreateSyntaxFormat() + { + var parameterStrings = Parameters.Select(p => p.ToPropertySyntaxOutput().ToString()); + if (Variant.SupportsShouldProcess) + { + parameterStrings = parameterStrings.Append(" [-Confirm]").Append(" [-WhatIf]"); + } + parameterStrings = parameterStrings.Append(" []"); + + var lines = new List(20); + return parameterStrings.Aggregate(Variant.CmdletName, (current, ps) => + { + var combined = current + ps; + if (combined.Length <= SyntaxLineWidth) return combined; + + lines.Add(current); + return ps; + }, last => + { + lines.Add(last); + return String.Join(Environment.NewLine, lines); + }); + } + } + + internal class MarkdownExampleHelpInfo + { + public string Name { get; } + public string Code { get; } + public string Output { get; } + public string Description { get; } + + public MarkdownExampleHelpInfo(string name, string code, string output, string description) + { + Name = name; + Code = code; + Output = output; + Description = description; + } + } + + internal class MarkdownParameterHelpInfo + { + public string Name { get; set; } + public string Description { get; set; } + public Type Type { get; set; } + public string Position { get; set; } + public string DefaultValue { get; set; } + + public bool HasAllParameterSets { get; set; } + public string[] ParameterSetNames { get; set; } + public string[] Aliases { get; set; } + + public bool IsRequired { get; set; } + public bool IsDynamic { get; set; } + public bool AcceptsPipelineByValue { get; set; } + public bool AcceptsPipelineByPropertyName { get; set; } + public bool AcceptsWildcardCharacters { get; set; } + + // For use by common parameters that have no backing data in the objects themselves. + public MarkdownParameterHelpInfo() { } + + public MarkdownParameterHelpInfo(PsParameterHelpInfo[] parameterHelpInfos, ParameterGroup parameterGroup) + { + Name = parameterGroup.ParameterName; + Description = parameterGroup.Description.NullIfEmpty() + ?? parameterHelpInfos.Select(phi => phi.Description).FirstOrDefault(d => !String.IsNullOrEmpty(d)).EmptyIfNull(); + Type = parameterGroup.ParameterType; + Position = parameterGroup.FirstPosition?.ToString() + ?? parameterHelpInfos.Select(phi => phi.PositionText).FirstOrDefault(d => !String.IsNullOrEmpty(d)).ToUpperFirstCharacter().NullIfEmpty() + ?? "Named"; + // This no longer uses firstHelpInfo.DefaultValueAsString since it seems to be broken. For example, it has a value of 0 for Int32, but no default value was declared. + DefaultValue = parameterGroup.DefaultInfo?.Script ?? "None"; + + HasAllParameterSets = parameterGroup.HasAllVariants; + ParameterSetNames = (parameterGroup.Parameters.Select(p => p.VariantName).ToArray().NullIfEmpty() + ?? parameterHelpInfos.SelectMany(phi => phi.ParameterSetNames).Distinct()) + .OrderBy(psn => psn).ToArray(); + Aliases = parameterGroup.Aliases.NullIfEmpty() ?? parameterHelpInfos.SelectMany(phi => phi.Aliases).ToArray(); + + IsRequired = parameterHelpInfos.Select(phi => phi.IsRequired).FirstOrDefault(r => r == true) ?? parameterGroup.Parameters.Any(p => p.IsMandatory); + IsDynamic = parameterHelpInfos.Select(phi => phi.IsDynamic).FirstOrDefault(d => d == true) ?? false; + AcceptsPipelineByValue = parameterHelpInfos.Select(phi => phi.SupportsPipelineInput?.Contains("ByValue")).FirstOrDefault(bv => bv == true) ?? parameterGroup.ValueFromPipeline; + AcceptsPipelineByPropertyName = parameterHelpInfos.Select(phi => phi.SupportsPipelineInput?.Contains("ByPropertyName")).FirstOrDefault(bv => bv == true) ?? parameterGroup.ValueFromPipelineByPropertyName; + AcceptsWildcardCharacters = parameterGroup.SupportsWildcards; + } + } + + internal class MarkdownRelatedLinkInfo + { + public string Url { get; } + public string Description { get; } + + public MarkdownRelatedLinkInfo(string url) + { + Url = url; + } + + public MarkdownRelatedLinkInfo(string url, string description) + { + Url = url; + Description = description; + } + + public override string ToString() + { + if (string.IsNullOrEmpty(Description)) + { + return Url; + } + else + { + return $@"[{Description}]({Url})"; + + } + + } + } + + internal static class MarkdownTypesExtensions + { + public static MarkdownExampleHelpInfo ToExampleHelpInfo(this PsHelpExampleInfo exampleInfo) => new MarkdownExampleHelpInfo(exampleInfo.Title, exampleInfo.Code, exampleInfo.Output, exampleInfo.Remarks); + + public static MarkdownExampleHelpInfo[] DefaultExampleHelpInfos = + { + new MarkdownExampleHelpInfo("Example 1: {{ Add title here }}", $@"{{{{ Add code here }}}}", $@"{{{{ Add output here (remove the output block if the example doesn't have an output) }}}}", @"{{ Add description here }}"), + new MarkdownExampleHelpInfo("Example 2: {{ Add title here }}", $@"{{{{ Add code here }}}}", $@"{{{{ Add output here (remove the output block if the example doesn't have an output) }}}}", @"{{ Add description here }}"), + }; + + public static MarkdownParameterHelpInfo[] SupportsShouldProcessParameters = + { + new MarkdownParameterHelpInfo + { + Name = "Confirm", + Description ="Prompts you for confirmation before running the cmdlet.", + Type = typeof(SwitchParameter), + Position = "Named", + DefaultValue = "None", + HasAllParameterSets = true, + ParameterSetNames = new [] { "(All)" }, + Aliases = new [] { "cf" } + }, + new MarkdownParameterHelpInfo + { + Name = "WhatIf", + Description ="Shows what would happen if the cmdlet runs. The cmdlet is not run.", + Type = typeof(SwitchParameter), + Position = "Named", + DefaultValue = "None", + HasAllParameterSets = true, + ParameterSetNames = new [] { "(All)" }, + Aliases = new [] { "wi" } + } + }; + + public static MarkdownParameterHelpInfo[] SupportsPagingParameters = + { + new MarkdownParameterHelpInfo + { + Name = "First", + Description ="Gets only the first 'n' objects.", + Type = typeof(ulong), + Position = "Named", + DefaultValue = "None", + HasAllParameterSets = true, + ParameterSetNames = new [] { "(All)" }, + Aliases = new string[0] + }, + new MarkdownParameterHelpInfo + { + Name = "IncludeTotalCount", + Description ="Reports the number of objects in the data set (an integer) followed by the objects. If the cmdlet cannot determine the total count, it returns \"Unknown total count\".", + Type = typeof(SwitchParameter), + Position = "Named", + DefaultValue = "None", + HasAllParameterSets = true, + ParameterSetNames = new [] { "(All)" }, + Aliases = new string[0] + }, + new MarkdownParameterHelpInfo + { + Name = "Skip", + Description ="Ignores the first 'n' objects and then gets the remaining objects.", + Type = typeof(ulong), + Position = "Named", + DefaultValue = "None", + HasAllParameterSets = true, + ParameterSetNames = new [] { "(All)" }, + Aliases = new string[0] + } + }; + } +} diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs new file mode 100644 index 000000000000..8a8f74ac5682 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs @@ -0,0 +1,662 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using System.Text.RegularExpressions; +using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.PsProxyOutputExtensions; +using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.PsProxyTypeExtensions; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell +{ + internal class OutputTypeOutput + { + public PSTypeName[] OutputTypes { get; } + + public OutputTypeOutput(IEnumerable outputTypes) + { + OutputTypes = outputTypes.ToArray(); + } + + public override string ToString() => OutputTypes != null && OutputTypes.Any() ? $"[OutputType({OutputTypes.Select(ot => $"[{ot}]").JoinIgnoreEmpty(ItemSeparator)})]{Environment.NewLine}" : String.Empty; + } + + internal class CmdletBindingOutput + { + public VariantGroup VariantGroup { get; } + + public CmdletBindingOutput(VariantGroup variantGroup) + { + VariantGroup = variantGroup; + } + + public override string ToString() + { + var dpsText = VariantGroup.DefaultParameterSetName.IsValidDefaultParameterSetName() ? $"DefaultParameterSetName='{VariantGroup.DefaultParameterSetName}'" : String.Empty; + var sspText = VariantGroup.SupportsShouldProcess ? $"SupportsShouldProcess{ItemSeparator}ConfirmImpact='Medium'" : String.Empty; + var pbText = $"PositionalBinding={false.ToPsBool()}"; + var propertyText = new[] { dpsText, pbText, sspText }.JoinIgnoreEmpty(ItemSeparator); + return $"[CmdletBinding({propertyText})]{Environment.NewLine}"; + } + } + + internal class ParameterOutput + { + public Parameter Parameter { get; } + public bool HasMultipleVariantsInVariantGroup { get; } + public bool HasAllVariantsInParameterGroup { get; } + + public ParameterOutput(Parameter parameter, bool hasMultipleVariantsInVariantGroup, bool hasAllVariantsInParameterGroup) + { + Parameter = parameter; + HasMultipleVariantsInVariantGroup = hasMultipleVariantsInVariantGroup; + HasAllVariantsInParameterGroup = hasAllVariantsInParameterGroup; + } + + public override string ToString() + { + var psnText = HasMultipleVariantsInVariantGroup && !HasAllVariantsInParameterGroup ? $"ParameterSetName='{Parameter.VariantName}'" : String.Empty; + var positionText = Parameter.Position != null ? $"Position={Parameter.Position}" : String.Empty; + var mandatoryText = Parameter.IsMandatory ? "Mandatory" : String.Empty; + var dontShowText = Parameter.DontShow ? "DontShow" : String.Empty; + var vfpText = Parameter.ValueFromPipeline ? "ValueFromPipeline" : String.Empty; + var vfpbpnText = Parameter.ValueFromPipelineByPropertyName ? "ValueFromPipelineByPropertyName" : String.Empty; + var propertyText = new[] { psnText, positionText, mandatoryText, dontShowText, vfpText, vfpbpnText }.JoinIgnoreEmpty(ItemSeparator); + return $"{Indent}[Parameter({propertyText})]{Environment.NewLine}"; + } + } + + internal class AliasOutput + { + public string[] Aliases { get; } + public bool IncludeIndent { get; } + + public AliasOutput(string[] aliases, bool includeIndent = false) + { + Aliases = aliases; + IncludeIndent = includeIndent; + } + + public override string ToString() => Aliases?.Any() ?? false ? $"{(IncludeIndent ? Indent : String.Empty)}[Alias({Aliases.Select(an => $"'{an}'").JoinIgnoreEmpty(ItemSeparator)})]{Environment.NewLine}" : String.Empty; + } + + internal class ValidateNotNullOutput + { + public bool HasValidateNotNull { get; } + + public ValidateNotNullOutput(bool hasValidateNotNull) + { + HasValidateNotNull = hasValidateNotNull; + } + + public override string ToString() => HasValidateNotNull ? $"{Indent}[ValidateNotNull()]{Environment.NewLine}" : String.Empty; + } + + internal class AllowEmptyArrayOutput + { + public bool HasAllowEmptyArray { get; } + + public AllowEmptyArrayOutput(bool hasAllowEmptyArray) + { + HasAllowEmptyArray = hasAllowEmptyArray; + } + + public override string ToString() => HasAllowEmptyArray ? $"{Indent}[AllowEmptyCollection()]{Environment.NewLine}" : String.Empty; + } + internal class ArgumentCompleterOutput + { + public CompleterInfo CompleterInfo { get; } + + public ArgumentCompleterOutput(CompleterInfo completerInfo) + { + CompleterInfo = completerInfo; + } + + public override string ToString() => CompleterInfo != null + ? $"{Indent}[ArgumentCompleter({(CompleterInfo.IsTypeCompleter ? $"[{CompleterInfo.Type.Unwrap().ToPsType()}]" : $"{{{CompleterInfo.Script.ToPsSingleLine("; ")}}}")})]{Environment.NewLine}" + : String.Empty; + } + + internal class PSArgumentCompleterOutput : ArgumentCompleterOutput + { + public PSArgumentCompleterInfo PSArgumentCompleterInfo { get; } + + public PSArgumentCompleterOutput(PSArgumentCompleterInfo completerInfo) : base(completerInfo) + { + PSArgumentCompleterInfo = completerInfo; + } + + + public override string ToString() => PSArgumentCompleterInfo != null + ? $"{Indent}[{typeof(PSArgumentCompleterAttribute)}({(PSArgumentCompleterInfo.IsTypeCompleter ? $"[{PSArgumentCompleterInfo.Type.Unwrap().ToPsType()}]" : $"{PSArgumentCompleterInfo.ResourceTypes?.Select(r => $"\"{r}\"")?.JoinIgnoreEmpty(", ")}")})]{Environment.NewLine}" + : String.Empty; + } + + internal class DefaultInfoOutput + { + public bool HasDefaultInfo { get; } + public DefaultInfo DefaultInfo { get; } + + public DefaultInfoOutput(ParameterGroup parameterGroup) + { + HasDefaultInfo = parameterGroup.HasDefaultInfo; + DefaultInfo = parameterGroup.DefaultInfo; + } + + public override string ToString() + { + var nameText = !String.IsNullOrEmpty(DefaultInfo?.Name) ? $"Name='{DefaultInfo?.Name}'" : String.Empty; + var descriptionText = !String.IsNullOrEmpty(DefaultInfo?.Description) ? $"Description='{DefaultInfo?.Description.ToPsStringLiteral()}'" : String.Empty; + var scriptText = !String.IsNullOrEmpty(DefaultInfo?.Script) ? $"Script='{DefaultInfo?.Script.ToPsSingleLine("; ")}'" : String.Empty; + var propertyText = new[] { nameText, descriptionText, scriptText }.JoinIgnoreEmpty(ItemSeparator); + return HasDefaultInfo ? $"{Indent}[{typeof(DefaultInfoAttribute).ToPsAttributeType()}({propertyText})]{Environment.NewLine}" : String.Empty; + } + } + + internal class ParameterTypeOutput + { + public Type ParameterType { get; } + + public ParameterTypeOutput(Type parameterType) + { + ParameterType = parameterType; + } + + public override string ToString() => $"{Indent}[{ParameterType.ToPsType()}]{Environment.NewLine}"; + } + + internal class ParameterNameOutput + { + public string ParameterName { get; } + public bool IsLast { get; } + + public ParameterNameOutput(string parameterName, bool isLast) + { + ParameterName = parameterName; + IsLast = isLast; + } + + public override string ToString() => $"{Indent}${{{ParameterName}}}{(IsLast ? String.Empty : $",{Environment.NewLine}")}{Environment.NewLine}"; + } + + internal class BaseOutput + { + public VariantGroup VariantGroup { get; } + + protected static readonly bool IsAzure = Convert.ToBoolean(@"true"); + + public BaseOutput(VariantGroup variantGroup) + { + VariantGroup = variantGroup; + } + public string ClearTelemetryContext() + { + return (!VariantGroup.IsInternal && IsAzure) ? $@"{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()" : ""; + } + } + + internal class BeginOutput : BaseOutput + { + public BeginOutput(VariantGroup variantGroup) : base(variantGroup) + { + } + + public string GetProcessCustomAttributesAtRuntime() + { + return VariantGroup.IsInternal ? "" : IsAzure ? $@"{Indent}{Indent}$cmdInfo = Get-Command -Name $mapping[$parameterSet] +{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) +{Indent}{Indent}if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){{ +{Indent}{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) +{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) +{Indent}{Indent}}}" : $@"{Indent}{Indent}$cmdInfo = Get-Command -Name $mapping[$parameterSet]{Environment.NewLine}{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) +{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)"; + } + + private string GetTelemetry() + { + if (!VariantGroup.IsInternal && IsAzure) + { + return $@" +{Indent}{Indent}if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {{ +{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() +{Indent}{Indent}}} +{Indent}{Indent}$preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId +{Indent}{Indent}if ($preTelemetryId -eq '') {{ +{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() +{Indent}{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) +{Indent}{Indent}}} else {{ +{Indent}{Indent}{Indent}$internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets +{Indent}{Indent}{Indent}if ($internalCalledCmdlets -eq '') {{ +{Indent}{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name +{Indent}{Indent}{Indent}}} else {{ +{Indent}{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name +{Indent}{Indent}{Indent}}} +{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' +{Indent}{Indent}}} +"; + } + return ""; + } + public override string ToString() => $@"begin {{ +{Indent}try {{ +{Indent}{Indent}$outBuffer = $null +{Indent}{Indent}if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {{ +{Indent}{Indent}{Indent}$PSBoundParameters['OutBuffer'] = 1 +{Indent}{Indent}}} +{Indent}{Indent}$parameterSet = $PSCmdlet.ParameterSetName +{GetTelemetry()} +{GetParameterSetToCmdletMapping()}{GetDefaultValuesStatements()} +{GetProcessCustomAttributesAtRuntime()} +{Indent}{Indent}$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) +{Indent}{Indent}$scriptCmd = {{& $wrappedCmd @PSBoundParameters}} +{Indent}{Indent}$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) +{Indent}{Indent}$steppablePipeline.Begin($PSCmdlet) +{Indent}}} catch {{ +{ClearTelemetryContext()} +{Indent}{Indent}throw +{Indent}}} +}} + +"; + + private string GetParameterSetToCmdletMapping() + { + var sb = new StringBuilder(); + sb.AppendLine($"{Indent}{Indent}$mapping = @{{"); + foreach (var variant in VariantGroup.Variants) + { + sb.AppendLine($@"{Indent}{Indent}{Indent}{variant.VariantName} = '{variant.PrivateModuleName}\{variant.PrivateCmdletName}';"); + } + sb.Append($"{Indent}{Indent}}}"); + return sb.ToString(); + } + + private string GetDefaultValuesStatements() + { + var defaultInfos = VariantGroup.ParameterGroups.Where(pg => pg.HasDefaultInfo).Select(pg => pg.DefaultInfo).ToArray(); + var sb = new StringBuilder(); + + foreach (var defaultInfo in defaultInfos) + { + var variantListString = defaultInfo.ParameterGroup.VariantNames.ToPsList(); + var parameterName = defaultInfo.ParameterGroup.ParameterName; + sb.AppendLine(); + var setCondition = " "; + if (!String.IsNullOrEmpty(defaultInfo.SetCondition)) + { + setCondition = $" -and {defaultInfo.SetCondition}"; + } + //Yabo: this is bad to hard code the subscription id, but autorest load input README.md reversely (entry readme -> required readme), there are no other way to + //override default value set in required readme + if ("SubscriptionId".Equals(parameterName)) + { + sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}'){setCondition}) {{"); + sb.AppendLine($"{Indent}{Indent}{Indent}$testPlayback = $false"); + sb.AppendLine($"{Indent}{Indent}{Indent}$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object {{ if ($_) {{ $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) }} }}"); + sb.AppendLine($"{Indent}{Indent}{Indent}if ($testPlayback) {{"); + sb.AppendLine($"{Indent}{Indent}{Indent}{Indent}$PSBoundParameters['{parameterName}'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')"); + sb.AppendLine($"{Indent}{Indent}{Indent}}} else {{"); + sb.AppendLine($"{Indent}{Indent}{Indent}{Indent}$PSBoundParameters['{parameterName}'] = {defaultInfo.Script}"); + sb.AppendLine($"{Indent}{Indent}{Indent}}}"); + sb.Append($"{Indent}{Indent}}}"); + } + else + { + sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}'){setCondition}) {{"); + sb.AppendLine($"{Indent}{Indent}{Indent}$PSBoundParameters['{parameterName}'] = {defaultInfo.Script}"); + sb.Append($"{Indent}{Indent}}}"); + } + + } + return sb.ToString(); + } + + } + + internal class ProcessOutput : BaseOutput + { + public ProcessOutput(VariantGroup variantGroup) : base(variantGroup) + { + } + + private string GetFinally() + { + if (IsAzure && !VariantGroup.IsInternal) + { + return $@" +{Indent}finally {{ +{Indent}{Indent}$backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId +{Indent}{Indent}$backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets +{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() +{Indent}}} +"; + } + return ""; + } + public override string ToString() => $@"process {{ +{Indent}try {{ +{Indent}{Indent}$steppablePipeline.Process($_) +{Indent}}} catch {{ +{ClearTelemetryContext()} +{Indent}{Indent}throw +{Indent}}} +{GetFinally()} +}} +"; + } + + internal class EndOutput : BaseOutput + { + public EndOutput(VariantGroup variantGroup) : base(variantGroup) + { + } + + private string GetTelemetry() + { + if (!VariantGroup.IsInternal && IsAzure) + { + return $@" +{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId +{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets +{Indent}{Indent}if ($preTelemetryId -eq '') {{ +{Indent}{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.Sphere.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) +{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() +{Indent}{Indent}}} +{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId +"; + } + return ""; + } + public override string ToString() => $@"end {{ +{Indent}try {{ +{Indent}{Indent}$steppablePipeline.End() +{GetTelemetry()} +{Indent}}} catch {{ +{ClearTelemetryContext()} +{Indent}{Indent}throw +{Indent}}} +}} +"; + } + + internal class HelpCommentOutput + { + public VariantGroup VariantGroup { get; } + public CommentInfo CommentInfo { get; } + + public HelpCommentOutput(VariantGroup variantGroup) + { + VariantGroup = variantGroup; + CommentInfo = variantGroup.CommentInfo; + } + + public override string ToString() + { + var inputs = String.Join(Environment.NewLine, CommentInfo.Inputs.Select(i => $".Inputs{Environment.NewLine}{i}")); + var inputsText = !String.IsNullOrEmpty(inputs) ? $"{Environment.NewLine}{inputs}" : String.Empty; + var outputs = String.Join(Environment.NewLine, CommentInfo.Outputs.Select(o => $".Outputs{Environment.NewLine}{o}")); + var outputsText = !String.IsNullOrEmpty(outputs) ? $"{Environment.NewLine}{outputs}" : String.Empty; + var notes = String.Join($"{Environment.NewLine}{Environment.NewLine}", VariantGroup.ComplexInterfaceInfos.Select(cii => cii.ToNoteOutput())); + var notesText = !String.IsNullOrEmpty(notes) ? $"{Environment.NewLine}.Notes{Environment.NewLine}{ComplexParameterHeader}{notes}" : String.Empty; + var relatedLinks = String.Join(Environment.NewLine, CommentInfo.RelatedLinks.Select(l => $".Link{Environment.NewLine}{l}")); + var relatedLinksText = !String.IsNullOrEmpty(relatedLinks) ? $"{Environment.NewLine}{relatedLinks}" : String.Empty; + var externalUrls = String.Join(Environment.NewLine, CommentInfo.ExternalUrls.Select(l => $".Link{Environment.NewLine}{l}")); + var externalUrlsText = !String.IsNullOrEmpty(externalUrls) ? $"{Environment.NewLine}{externalUrls}" : String.Empty; + var examples = ""; + foreach (var example in VariantGroup.HelpInfo.Examples) + { + examples = examples + ".Example" + "\r\n" + example.Code + "\r\n"; + } + return $@"<# +.Synopsis +{CommentInfo.Synopsis.ToDescriptionFormat(false)} +.Description +{CommentInfo.Description.ToDescriptionFormat(false)} +{examples}{inputsText}{outputsText}{notesText} +.Link +{CommentInfo.OnlineVersion}{relatedLinksText}{externalUrlsText} +#> +"; + } + } + + internal class ParameterDescriptionOutput + { + public string Description { get; } + + public ParameterDescriptionOutput(string description) + { + Description = description; + } + + public override string ToString() => !String.IsNullOrEmpty(Description) + ? Description.ToDescriptionFormat(false).NormalizeNewLines() + .Split(new[] { Environment.NewLine }, StringSplitOptions.None) + .Aggregate(String.Empty, (c, n) => c + $"{Indent}# {n}{Environment.NewLine}") + : String.Empty; + } + + internal class ProfileOutput + { + public string ProfileName { get; } + + public ProfileOutput(string profileName) + { + ProfileName = profileName; + } + + public override string ToString() => ProfileName != NoProfiles ? $"[{typeof(ProfileAttribute).ToPsAttributeType()}('{ProfileName}')]{Environment.NewLine}" : String.Empty; + } + + internal class DescriptionOutput + { + public string Description { get; } + + public DescriptionOutput(string description) + { + Description = description; + } + + public override string ToString() => !String.IsNullOrEmpty(Description) ? $"[{typeof(DescriptionAttribute).ToPsAttributeType()}('{Description.ToPsStringLiteral()}')]{Environment.NewLine}" : String.Empty; + } + + internal class ParameterCategoryOutput + { + public ParameterCategory Category { get; } + + public ParameterCategoryOutput(ParameterCategory category) + { + Category = category; + } + + public override string ToString() => $"{Indent}[{typeof(CategoryAttribute).ToPsAttributeType()}('{Category}')]{Environment.NewLine}"; + } + + internal class InfoOutput + { + public InfoAttribute Info { get; } + public Type ParameterType { get; } + + public InfoOutput(InfoAttribute info, Type parameterType) + { + Info = info; + ParameterType = parameterType; + } + + public override string ToString() + { + // Rendering of InfoAttribute members that are not used currently + /*var serializedNameText = Info.SerializedName != null ? $"SerializedName='{Info.SerializedName}'" : String.Empty; + var readOnlyText = Info.ReadOnly ? "ReadOnly" : String.Empty; + var descriptionText = !String.IsNullOrEmpty(Info.Description) ? $"Description='{Info.Description.ToPsStringLiteral()}'" : String.Empty;*/ + + var requiredText = Info.Required ? "Required" : String.Empty; + var unwrappedType = ParameterType.Unwrap(); + var hasValidPossibleTypes = Info.PossibleTypes.Any(pt => pt != unwrappedType); + var possibleTypesText = hasValidPossibleTypes + ? $"PossibleTypes=({Info.PossibleTypes.Select(pt => $"[{pt.ToPsType()}]").JoinIgnoreEmpty(ItemSeparator)})" + : String.Empty; + var propertyText = new[] { /*serializedNameText, */requiredText,/* readOnlyText,*/ possibleTypesText/*, descriptionText*/ }.JoinIgnoreEmpty(ItemSeparator); + return hasValidPossibleTypes ? $"{Indent}[{typeof(InfoAttribute).ToPsAttributeType()}({propertyText})]{Environment.NewLine}" : String.Empty; + } + } + + internal class PropertySyntaxOutput + { + public string ParameterName { get; } + public Type ParameterType { get; } + public bool IsMandatory { get; } + public int? Position { get; } + + public bool IncludeSpace { get; } + public bool IncludeDash { get; } + + public PropertySyntaxOutput(Parameter parameter) + { + ParameterName = parameter.ParameterName; + ParameterType = parameter.ParameterType; + IsMandatory = parameter.IsMandatory; + Position = parameter.Position; + IncludeSpace = true; + IncludeDash = true; + } + + public PropertySyntaxOutput(ComplexInterfaceInfo complexInterfaceInfo) + { + ParameterName = complexInterfaceInfo.Name; + ParameterType = complexInterfaceInfo.Type; + IsMandatory = complexInterfaceInfo.Required; + Position = null; + IncludeSpace = false; + IncludeDash = false; + } + + public override string ToString() + { + var leftOptional = !IsMandatory ? "[" : String.Empty; + var leftPositional = Position != null ? "[" : String.Empty; + var rightPositional = Position != null ? "]" : String.Empty; + var type = ParameterType != typeof(SwitchParameter) ? $" <{ParameterType.ToSyntaxTypeName()}>" : String.Empty; + var rightOptional = !IsMandatory ? "]" : String.Empty; + var space = IncludeSpace ? " " : String.Empty; + var dash = IncludeDash ? "-" : String.Empty; + return $"{space}{leftOptional}{leftPositional}{dash}{ParameterName}{rightPositional}{type}{rightOptional}"; + } + } + + internal static class PsProxyOutputExtensions + { + public const string NoParameters = "__NoParameters"; + + public const string AllParameterSets = "__AllParameterSets"; + + public const string HalfIndent = " "; + + public const string Indent = HalfIndent + HalfIndent; + + public const string ItemSeparator = ", "; + + public static readonly string ComplexParameterHeader = $"COMPLEX PARAMETER PROPERTIES{Environment.NewLine}{Environment.NewLine}To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.{Environment.NewLine}{Environment.NewLine}"; + + public static string ToPsBool(this bool value) => $"${value.ToString().ToLowerInvariant()}"; + + public static string ToPsType(this Type type) + { + var regex = new Regex(@"^(.*)`{1}\d+(.*)$"); + var typeText = type.ToString(); + var match = regex.Match(typeText); + return match.Success ? $"{match.Groups[1]}{match.Groups[2]}" : typeText; + } + + public static string ToPsAttributeType(this Type type) => type.ToPsType().RemoveEnd("Attribute"); + + // https://stackoverflow.com/a/5284606/294804 + private static string RemoveEnd(this string text, string suffix) => text.EndsWith(suffix) ? text.Substring(0, text.Length - suffix.Length) : text; + + public static string ToPsSingleLine(this string value, string replacer = " ") => value.ReplaceNewLines(replacer, new[] { "
", "\r\n", "\n" }); + + public static string ToPsStringLiteral(this string value) => value?.Replace("'", "''").Replace("‘", "''").Replace("’", "''").ToPsSingleLine().Trim() ?? String.Empty; + + public static string JoinIgnoreEmpty(this IEnumerable values, string separator) => String.Join(separator, values?.Where(v => !String.IsNullOrEmpty(v))); + + // https://stackoverflow.com/a/41961738/294804 + public static string ToSyntaxTypeName(this Type type) + { + if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>)) + { + return $"{type.GetGenericArguments().First().ToSyntaxTypeName()}?"; + } + + if (type.IsGenericType) + { + var genericTypes = String.Join(ItemSeparator, type.GetGenericArguments().Select(ToSyntaxTypeName)); + return $"{type.Name.Split('`').First()}<{genericTypes}>"; + } + + return type.Name; + } + + public static OutputTypeOutput ToOutputTypeOutput(this IEnumerable outputTypes) => new OutputTypeOutput(outputTypes); + + public static CmdletBindingOutput ToCmdletBindingOutput(this VariantGroup variantGroup) => new CmdletBindingOutput(variantGroup); + + public static ParameterOutput ToParameterOutput(this Parameter parameter, bool hasMultipleVariantsInVariantGroup, bool hasAllVariantsInParameterGroup) => new ParameterOutput(parameter, hasMultipleVariantsInVariantGroup, hasAllVariantsInParameterGroup); + + public static AliasOutput ToAliasOutput(this string[] aliases, bool includeIndent = false) => new AliasOutput(aliases, includeIndent); + + public static ValidateNotNullOutput ToValidateNotNullOutput(this bool hasValidateNotNull) => new ValidateNotNullOutput(hasValidateNotNull); + + public static AllowEmptyArrayOutput ToAllowEmptyArray(this bool hasAllowEmptyArray) => new AllowEmptyArrayOutput(hasAllowEmptyArray); + + public static ArgumentCompleterOutput ToArgumentCompleterOutput(this CompleterInfo completerInfo) => (completerInfo is PSArgumentCompleterInfo psArgumentCompleterInfo) ? psArgumentCompleterInfo.ToArgumentCompleterOutput() : new ArgumentCompleterOutput(completerInfo); + + public static PSArgumentCompleterOutput ToArgumentCompleterOutput(this PSArgumentCompleterInfo completerInfo) => new PSArgumentCompleterOutput(completerInfo); + + public static DefaultInfoOutput ToDefaultInfoOutput(this ParameterGroup parameterGroup) => new DefaultInfoOutput(parameterGroup); + + public static ParameterTypeOutput ToParameterTypeOutput(this Type parameterType) => new ParameterTypeOutput(parameterType); + + public static ParameterNameOutput ToParameterNameOutput(this string parameterName, bool isLast) => new ParameterNameOutput(parameterName, isLast); + + public static BeginOutput ToBeginOutput(this VariantGroup variantGroup) => new BeginOutput(variantGroup); + + public static ProcessOutput ToProcessOutput(this VariantGroup variantGroup) => new ProcessOutput(variantGroup); + + public static EndOutput ToEndOutput(this VariantGroup variantGroup) => new EndOutput(variantGroup); + + public static HelpCommentOutput ToHelpCommentOutput(this VariantGroup variantGroup) => new HelpCommentOutput(variantGroup); + + public static ParameterDescriptionOutput ToParameterDescriptionOutput(this string description) => new ParameterDescriptionOutput(description); + + public static ProfileOutput ToProfileOutput(this string profileName) => new ProfileOutput(profileName); + + public static DescriptionOutput ToDescriptionOutput(this string description) => new DescriptionOutput(description); + + public static ParameterCategoryOutput ToParameterCategoryOutput(this ParameterCategory category) => new ParameterCategoryOutput(category); + + public static PropertySyntaxOutput ToPropertySyntaxOutput(this Parameter parameter) => new PropertySyntaxOutput(parameter); + + public static PropertySyntaxOutput ToPropertySyntaxOutput(this ComplexInterfaceInfo complexInterfaceInfo) => new PropertySyntaxOutput(complexInterfaceInfo); + + public static InfoOutput ToInfoOutput(this InfoAttribute info, Type parameterType) => new InfoOutput(info, parameterType); + + public static string ToNoteOutput(this ComplexInterfaceInfo complexInterfaceInfo, string currentIndent = "", bool includeDashes = false, bool includeBackticks = false, bool isFirst = true) + { + string RenderProperty(ComplexInterfaceInfo info, string indent, bool dash, bool backtick) => + $"{indent}{(dash ? "- " : String.Empty)}{(backtick ? "`" : String.Empty)}{info.ToPropertySyntaxOutput()}{(backtick ? "`" : String.Empty)}: {info.Description}"; + + var nested = complexInterfaceInfo.NestedInfos.Select(ni => + { + var nestedIndent = $"{currentIndent}{HalfIndent}"; + return ni.IsComplexInterface + ? ni.ToNoteOutput(nestedIndent, includeDashes, includeBackticks, false) + : RenderProperty(ni, nestedIndent, includeDashes, includeBackticks); + }).Prepend(RenderProperty(complexInterfaceInfo, currentIndent, !isFirst && includeDashes, includeBackticks)); + return String.Join(Environment.NewLine, nested); + } + } +} diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs new file mode 100644 index 000000000000..f4d90e0d7c8d --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs @@ -0,0 +1,544 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Reflection; +using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.PsProxyOutputExtensions; +using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell.PsProxyTypeExtensions; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell +{ + internal class ProfileGroup + { + public string ProfileName { get; } + public Variant[] Variants { get; } + public string ProfileFolder { get; } + + public ProfileGroup(Variant[] variants, string profileName = NoProfiles) + { + ProfileName = profileName; + Variants = variants; + ProfileFolder = ProfileName != NoProfiles ? ProfileName : String.Empty; + } + } + + internal class VariantGroup + { + public string ModuleName { get; } + + public string RootModuleName { get => @""; } + public string CmdletName { get; } + public string CmdletVerb { get; } + public string CmdletNoun { get; } + public string ProfileName { get; } + public Variant[] Variants { get; } + public ParameterGroup[] ParameterGroups { get; } + public ComplexInterfaceInfo[] ComplexInterfaceInfos { get; } + + public string[] Aliases { get; } + public PSTypeName[] OutputTypes { get; } + public bool SupportsShouldProcess { get; } + public bool SupportsPaging { get; } + public string DefaultParameterSetName { get; } + public bool HasMultipleVariants { get; } + public PsHelpInfo HelpInfo { get; } + public bool IsGenerated { get; } + public bool IsInternal { get; } + public string OutputFolder { get; } + public string FileName { get; } + public string FilePath { get; } + + public CommentInfo CommentInfo { get; } + + public VariantGroup(string moduleName, string cmdletName, Variant[] variants, string outputFolder, string profileName = NoProfiles, bool isTest = false, bool isInternal = false) + { + ModuleName = moduleName; + CmdletName = cmdletName; + var cmdletNameParts = CmdletName.Split('-'); + CmdletVerb = cmdletNameParts.First(); + CmdletNoun = cmdletNameParts.Last(); + ProfileName = profileName; + Variants = variants; + ParameterGroups = Variants.ToParameterGroups().OrderBy(pg => pg.OrderCategory).ThenByDescending(pg => pg.IsMandatory).ToArray(); + var aliasDuplicates = ParameterGroups.SelectMany(pg => pg.Aliases) + //https://stackoverflow.com/a/18547390/294804 + .GroupBy(a => a).Where(g => g.Count() > 1).Select(g => g.Key).ToArray(); + if (aliasDuplicates.Any()) + { + throw new ParsingMetadataException($"The alias(es) [{String.Join(", ", aliasDuplicates)}] are defined on multiple parameters for cmdlet '{CmdletName}', which is not supported."); + } + ComplexInterfaceInfos = ParameterGroups.Where(pg => !pg.DontShow && pg.IsComplexInterface).OrderBy(pg => pg.ParameterName).Select(pg => pg.ComplexInterfaceInfo).ToArray(); + + Aliases = Variants.SelectMany(v => v.Attributes).ToAliasNames().ToArray(); + OutputTypes = Variants.SelectMany(v => v.Info.OutputType).Where(ot => ot.Type != null).GroupBy(ot => ot.Type).Select(otg => otg.First()).ToArray(); + SupportsShouldProcess = Variants.Any(v => v.SupportsShouldProcess); + SupportsPaging = Variants.Any(v => v.SupportsPaging); + DefaultParameterSetName = DetermineDefaultParameterSetName(); + HasMultipleVariants = Variants.Length > 1; + HelpInfo = Variants.Select(v => v.HelpInfo).FirstOrDefault() ?? new PsHelpInfo(); + IsGenerated = Variants.All(v => v.Attributes.OfType().Any()); + IsInternal = isInternal; + OutputFolder = outputFolder; + FileName = $"{CmdletName}{(isTest ? ".Tests" : String.Empty)}.ps1"; + FilePath = Path.Combine(OutputFolder, FileName); + + CommentInfo = new CommentInfo(this); + } + + private string DetermineDefaultParameterSetName() + { + var defaultParameterSet = Variants + .Select(v => v.Metadata.DefaultParameterSetName) + .LastOrDefault(dpsn => dpsn.IsValidDefaultParameterSetName()); + + if (String.IsNullOrEmpty(defaultParameterSet)) + { + var variantParamCountGroups = Variants + .Where(v => !v.IsNotSuggestDefaultParameterSet) + .Select(v => ( + variant: v.VariantName, + paramCount: v.CmdletOnlyParameters.Count(p => p.IsMandatory), + isSimple: v.CmdletOnlyParameters.Where(p => p.IsMandatory).All(p => p.ParameterType.IsPsSimple()))) + .GroupBy(vpc => vpc.isSimple) + .ToArray(); + if (variantParamCountGroups.Length == 0) + { + variantParamCountGroups = Variants + .Select(v => ( + variant: v.VariantName, + paramCount: v.CmdletOnlyParameters.Count(p => p.IsMandatory), + isSimple: v.CmdletOnlyParameters.Where(p => p.IsMandatory).All(p => p.ParameterType.IsPsSimple()))) + .GroupBy(vpc => vpc.isSimple) + .ToArray(); + } + var variantParameterCounts = (variantParamCountGroups.Any(g => g.Key) ? variantParamCountGroups.Where(g => g.Key) : variantParamCountGroups).SelectMany(g => g).ToArray(); + var smallestParameterCount = variantParameterCounts.Min(vpc => vpc.paramCount); + defaultParameterSet = variantParameterCounts.First(vpc => vpc.paramCount == smallestParameterCount).variant; + } + + return defaultParameterSet; + } + } + + internal class Variant + { + public string CmdletName { get; } + public string VariantName { get; } + public CommandInfo Info { get; } + public CommandMetadata Metadata { get; } + public PsHelpInfo HelpInfo { get; } + public bool HasParameterSets { get; } + public bool IsFunction { get; } + public string PrivateModuleName { get; } + public string PrivateCmdletName { get; } + public bool SupportsShouldProcess { get; } + public bool SupportsPaging { get; } + + public Attribute[] Attributes { get; } + public Parameter[] Parameters { get; } + public Parameter[] CmdletOnlyParameters { get; } + public bool IsInternal { get; } + public bool IsDoNotExport { get; } + public bool IsNotSuggestDefaultParameterSet { get; } + public string[] Profiles { get; } + + public Variant(string cmdletName, string variantName, CommandInfo info, CommandMetadata metadata, bool hasParameterSets = false, PsHelpInfo helpInfo = null) + { + CmdletName = cmdletName; + VariantName = variantName; + Info = info; + HelpInfo = helpInfo ?? new PsHelpInfo(); + Metadata = metadata; + HasParameterSets = hasParameterSets; + IsFunction = Info.CommandType == CommandTypes.Function; + PrivateModuleName = Info.Source; + PrivateCmdletName = Metadata.Name; + SupportsShouldProcess = Metadata.SupportsShouldProcess; + SupportsPaging = Metadata.SupportsPaging; + + Attributes = this.ToAttributes(); + Parameters = this.ToParameters().OrderBy(p => p.OrderCategory).ThenByDescending(p => p.IsMandatory).ToArray(); + IsInternal = Attributes.OfType().Any(); + IsDoNotExport = Attributes.OfType().Any(); + IsNotSuggestDefaultParameterSet = Attributes.OfType().Any(); + CmdletOnlyParameters = Parameters.Where(p => !p.Categories.Any(c => c == ParameterCategory.Azure || c == ParameterCategory.Runtime)).ToArray(); + Profiles = Attributes.OfType().SelectMany(pa => pa.Profiles).ToArray(); + } + } + + internal class ParameterGroup + { + public string ParameterName { get; } + public Parameter[] Parameters { get; } + + public string[] VariantNames { get; } + public string[] AllVariantNames { get; } + public bool HasAllVariants { get; } + public Type ParameterType { get; } + public string Description { get; } + + public string[] Aliases { get; } + public bool HasValidateNotNull { get; } + public bool HasAllowEmptyArray { get; } + public CompleterInfo CompleterInfo { get; } + public DefaultInfo DefaultInfo { get; } + public bool HasDefaultInfo { get; } + public ParameterCategory OrderCategory { get; } + public bool DontShow { get; } + public bool IsMandatory { get; } + public bool SupportsWildcards { get; } + public bool IsComplexInterface { get; } + public ComplexInterfaceInfo ComplexInterfaceInfo { get; } + public InfoAttribute InfoAttribute { get; } + + public int? FirstPosition { get; } + public bool ValueFromPipeline { get; } + public bool ValueFromPipelineByPropertyName { get; } + public bool IsInputType { get; } + + public ParameterGroup(string parameterName, Parameter[] parameters, string[] allVariantNames) + { + ParameterName = parameterName; + Parameters = parameters; + + VariantNames = Parameters.Select(p => p.VariantName).ToArray(); + AllVariantNames = allVariantNames; + HasAllVariants = VariantNames.Any(vn => vn == AllParameterSets) || !AllVariantNames.Except(VariantNames).Any(); + var types = Parameters.Select(p => p.ParameterType).Distinct().ToArray(); + if (types.Length > 1) + { + throw new ParsingMetadataException($"The parameter '{ParameterName}' has multiple parameter types [{String.Join(", ", types.Select(t => t.Name))}] defined, which is not supported."); + } + ParameterType = types.First(); + Description = Parameters.Select(p => p.Description).FirstOrDefault(d => !String.IsNullOrEmpty(d)).EmptyIfNull(); + + Aliases = Parameters.SelectMany(p => p.Attributes).ToAliasNames().ToArray(); + HasValidateNotNull = Parameters.SelectMany(p => p.Attributes.OfType()).Any(); + HasAllowEmptyArray = Parameters.SelectMany(p => p.Attributes.OfType()).Any(); + CompleterInfo = Parameters.Select(p => p.CompleterInfoAttribute).FirstOrDefault()?.ToCompleterInfo() + ?? Parameters.Select(p => p.PSArgumentCompleterAttribute).FirstOrDefault()?.ToPSArgumentCompleterInfo() + ?? Parameters.Select(p => p.ArgumentCompleterAttribute).FirstOrDefault()?.ToCompleterInfo(); + DefaultInfo = Parameters.Select(p => p.DefaultInfoAttribute).FirstOrDefault()?.ToDefaultInfo(this) + ?? Parameters.Select(p => p.DefaultValueAttribute).FirstOrDefault(dv => dv != null)?.ToDefaultInfo(this); + HasDefaultInfo = DefaultInfo != null && !String.IsNullOrEmpty(DefaultInfo.Script); + // When DefaultInfo is present, force all parameters from this group to be optional. + if (HasDefaultInfo) + { + foreach (var parameter in Parameters) + { + parameter.IsMandatory = false; + } + } + OrderCategory = Parameters.Select(p => p.OrderCategory).Distinct().DefaultIfEmpty(ParameterCategory.Body).Min(); + DontShow = Parameters.All(p => p.DontShow); + IsMandatory = HasAllVariants && Parameters.Any(p => p.IsMandatory); + SupportsWildcards = Parameters.Any(p => p.SupportsWildcards); + IsComplexInterface = Parameters.Any(p => p.IsComplexInterface); + ComplexInterfaceInfo = Parameters.Where(p => p.IsComplexInterface).Select(p => p.ComplexInterfaceInfo).FirstOrDefault(); + InfoAttribute = Parameters.Select(p => p.InfoAttribute).First(); + + FirstPosition = Parameters.Select(p => p.Position).FirstOrDefault(p => p != null); + ValueFromPipeline = Parameters.Any(p => p.ValueFromPipeline); + ValueFromPipelineByPropertyName = Parameters.Any(p => p.ValueFromPipelineByPropertyName); + IsInputType = ValueFromPipeline || ValueFromPipelineByPropertyName; + } + } + + internal class Parameter + { + public string VariantName { get; } + public string ParameterName { get; } + public ParameterMetadata Metadata { get; } + public PsParameterHelpInfo HelpInfo { get; } + public Type ParameterType { get; } + public Attribute[] Attributes { get; } + public ParameterCategory[] Categories { get; } + public ParameterCategory OrderCategory { get; } + public PSDefaultValueAttribute DefaultValueAttribute { get; } + public DefaultInfoAttribute DefaultInfoAttribute { get; } + public ParameterAttribute ParameterAttribute { get; } + public bool SupportsWildcards { get; } + public CompleterInfoAttribute CompleterInfoAttribute { get; } + public ArgumentCompleterAttribute ArgumentCompleterAttribute { get; } + public PSArgumentCompleterAttribute PSArgumentCompleterAttribute { get; } + + public bool ValueFromPipeline { get; } + public bool ValueFromPipelineByPropertyName { get; } + public int? Position { get; } + public bool DontShow { get; } + public bool IsMandatory { get; set; } + + public InfoAttribute InfoAttribute { get; } + public ComplexInterfaceInfo ComplexInterfaceInfo { get; } + public bool IsComplexInterface { get; } + public string Description { get; } + + public Parameter(string variantName, string parameterName, ParameterMetadata metadata, PsParameterHelpInfo helpInfo = null) + { + VariantName = variantName; + ParameterName = parameterName; + Metadata = metadata; + HelpInfo = helpInfo ?? new PsParameterHelpInfo(); + + Attributes = Metadata.Attributes.ToArray(); + ParameterType = Attributes.OfType().FirstOrDefault()?.Type ?? Metadata.ParameterType; + Categories = Attributes.OfType().SelectMany(ca => ca.Categories).Distinct().ToArray(); + OrderCategory = Categories.DefaultIfEmpty(ParameterCategory.Body).Min(); + DefaultValueAttribute = Attributes.OfType().FirstOrDefault(); + DefaultInfoAttribute = Attributes.OfType().FirstOrDefault(); + ParameterAttribute = Attributes.OfType().FirstOrDefault(pa => pa.ParameterSetName == VariantName || pa.ParameterSetName == AllParameterSets); + if (ParameterAttribute == null) + { + throw new ParsingMetadataException($"The variant '{VariantName}' has multiple parameter sets defined, which is not supported."); + } + SupportsWildcards = Attributes.OfType().Any(); + CompleterInfoAttribute = Attributes.OfType().FirstOrDefault(); + PSArgumentCompleterAttribute = Attributes.OfType().FirstOrDefault(); + ArgumentCompleterAttribute = Attributes.OfType().FirstOrDefault(attr => !attr.GetType().Equals(typeof(PSArgumentCompleterAttribute))); + + ValueFromPipeline = ParameterAttribute.ValueFromPipeline; + ValueFromPipelineByPropertyName = ParameterAttribute.ValueFromPipelineByPropertyName; + Position = ParameterAttribute.Position == Int32.MinValue ? (int?)null : ParameterAttribute.Position; + DontShow = ParameterAttribute.DontShow; + IsMandatory = ParameterAttribute.Mandatory; + + var complexParameterName = ParameterName.ToUpperInvariant(); + var complexMessage = $"{Environment.NewLine}"; + var description = ParameterAttribute.HelpMessage.NullIfEmpty() ?? HelpInfo.Description.NullIfEmpty() ?? InfoAttribute?.Description.NullIfEmpty() ?? String.Empty; + // Remove the complex type message as it will be reinserted if this is a complex type + description = description.NormalizeNewLines(); + // Make an InfoAttribute for processing only if one isn't provided + InfoAttribute = Attributes.OfType().FirstOrDefault() ?? new InfoAttribute { PossibleTypes = new[] { ParameterType.Unwrap() }, Required = IsMandatory }; + // Set the description if the InfoAttribute does not have one since they are exported without a description + InfoAttribute.Description = String.IsNullOrEmpty(InfoAttribute.Description) ? description : InfoAttribute.Description; + ComplexInterfaceInfo = InfoAttribute.ToComplexInterfaceInfo(complexParameterName, ParameterType, true); + IsComplexInterface = ComplexInterfaceInfo.IsComplexInterface; + Description = $"{description}{(IsComplexInterface ? complexMessage : String.Empty)}"; + } + } + + internal class ComplexInterfaceInfo + { + public InfoAttribute InfoAttribute { get; } + + public string Name { get; } + public Type Type { get; } + public bool Required { get; } + public bool ReadOnly { get; } + public string Description { get; } + + public ComplexInterfaceInfo[] NestedInfos { get; } + public bool IsComplexInterface { get; } + + public ComplexInterfaceInfo(string name, Type type, InfoAttribute infoAttribute, bool? required, List seenTypes) + { + Name = name; + Type = type; + InfoAttribute = infoAttribute; + + Required = required ?? InfoAttribute.Required; + ReadOnly = InfoAttribute.ReadOnly; + Description = InfoAttribute.Description.ToPsSingleLine(); + + var unwrappedType = Type.Unwrap(); + var hasBeenSeen = seenTypes?.Contains(unwrappedType) ?? false; + (seenTypes ?? (seenTypes = new List())).Add(unwrappedType); + NestedInfos = hasBeenSeen ? new ComplexInterfaceInfo[] { } : + unwrappedType.GetInterfaces() + .Concat(InfoAttribute.PossibleTypes) + .SelectMany(pt => pt.GetProperties() + .SelectMany(pi => pi.GetCustomAttributes(true).OfType() + .Select(ia => ia.ToComplexInterfaceInfo(pi.Name, pi.PropertyType, seenTypes: seenTypes)))) + .Where(cii => !cii.ReadOnly).OrderByDescending(cii => cii.Required).ToArray(); + // https://stackoverflow.com/a/503359/294804 + var associativeArrayInnerType = Type.GetInterfaces() + .FirstOrDefault(i => i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IAssociativeArray<>)) + ?.GetTypeInfo().GetGenericArguments().First(); + if (!hasBeenSeen && associativeArrayInnerType != null) + { + var anyInfo = new InfoAttribute { Description = "This indicates any property can be added to this object." }; + NestedInfos = NestedInfos.Prepend(anyInfo.ToComplexInterfaceInfo("(Any)", associativeArrayInnerType)).ToArray(); + } + IsComplexInterface = NestedInfos.Any(); + } + } + + internal class CommentInfo + { + public string Description { get; } + public string Synopsis { get; } + + public string[] Examples { get; } + public string[] Inputs { get; } + public string[] Outputs { get; } + + public string OnlineVersion { get; } + public string[] RelatedLinks { get; } + public string[] ExternalUrls { get; } + + private const string HelpLinkPrefix = @"https://learn.microsoft.com/powershell/module/"; + + public CommentInfo(VariantGroup variantGroup) + { + var helpInfo = variantGroup.HelpInfo; + Description = variantGroup.Variants.SelectMany(v => v.Attributes).OfType().FirstOrDefault()?.Description.NullIfEmpty() + ?? helpInfo.Description.EmptyIfNull(); + // If there is no Synopsis, PowerShell may put in the Syntax string as the Synopsis. This seems unintended, so we remove the Synopsis in this situation. + var synopsis = helpInfo.Synopsis.EmptyIfNull().Trim().StartsWith(variantGroup.CmdletName) ? String.Empty : helpInfo.Synopsis; + Synopsis = synopsis.NullIfEmpty() ?? Description; + + Examples = helpInfo.Examples.Select(rl => rl.Code).ToArray(); + + Inputs = (variantGroup.ParameterGroups.Where(pg => pg.IsInputType).Select(pg => pg.ParameterType.FullName).ToArray().NullIfEmpty() ?? + helpInfo.InputTypes.Where(it => it.Name.NullIfWhiteSpace() != null).Select(it => it.Name).ToArray()) + .Where(i => i != "None").Distinct().OrderBy(i => i).ToArray(); + Outputs = (variantGroup.OutputTypes.Select(ot => ot.Type.FullName).ToArray().NullIfEmpty() ?? + helpInfo.OutputTypes.Where(it => it.Name.NullIfWhiteSpace() != null).Select(ot => ot.Name).ToArray()) + .Where(o => o != "None").Distinct().OrderBy(o => o).ToArray(); + + // Use root module name in the help link + var moduleName = variantGroup.RootModuleName == "" ? variantGroup.ModuleName.ToLowerInvariant() : variantGroup.RootModuleName.ToLowerInvariant(); + OnlineVersion = helpInfo.OnlineVersion?.Uri.NullIfEmpty() ?? $@"{HelpLinkPrefix}{moduleName}/{variantGroup.CmdletName.ToLowerInvariant()}"; + RelatedLinks = helpInfo.RelatedLinks.Select(rl => rl.Text).ToArray(); + + // Get external urls from attribute + ExternalUrls = variantGroup.Variants.SelectMany(v => v.Attributes).OfType()?.Select(e => e.Url)?.Distinct()?.ToArray(); + } + } + + internal class CompleterInfo + { + public string Name { get; } + public string Description { get; } + public string Script { get; } + public Type Type { get; } + public bool IsTypeCompleter { get; } + + public CompleterInfo(CompleterInfoAttribute infoAttribute) + { + Name = infoAttribute.Name; + Description = infoAttribute.Description; + Script = infoAttribute.Script; + } + + public CompleterInfo(ArgumentCompleterAttribute completerAttribute) + { + Script = completerAttribute.ScriptBlock?.ToString(); + if (completerAttribute.Type != null) + { + Type = completerAttribute.Type; + IsTypeCompleter = true; + } + } + } + + internal class PSArgumentCompleterInfo : CompleterInfo + { + public string[] ResourceTypes { get; } + + public PSArgumentCompleterInfo(PSArgumentCompleterAttribute completerAttribute) : base(completerAttribute) + { + ResourceTypes = completerAttribute.ResourceTypes; + } + } + + internal class DefaultInfo + { + public string Name { get; } + public string Description { get; } + public string Script { get; } + public string SetCondition { get; } + public ParameterGroup ParameterGroup { get; } + + public DefaultInfo(DefaultInfoAttribute infoAttribute, ParameterGroup parameterGroup) + { + Name = infoAttribute.Name; + Description = infoAttribute.Description; + Script = infoAttribute.Script; + SetCondition = infoAttribute.SetCondition; + ParameterGroup = parameterGroup; + } + + public DefaultInfo(PSDefaultValueAttribute defaultValueAttribute, ParameterGroup parameterGroup) + { + Description = defaultValueAttribute.Help; + ParameterGroup = parameterGroup; + if (defaultValueAttribute.Value != null) + { + Script = defaultValueAttribute.Value.ToString(); + } + } + } + + internal static class PsProxyTypeExtensions + { + public const string NoProfiles = "__NoProfiles"; + + public static bool IsValidDefaultParameterSetName(this string parameterSetName) => + !String.IsNullOrEmpty(parameterSetName) && parameterSetName != AllParameterSets; + + public static Variant[] ToVariants(this CommandInfo info, PsHelpInfo helpInfo) + { + var metadata = new CommandMetadata(info); + var privateCmdletName = metadata.Name.Split('!').First(); + var parts = privateCmdletName.Split('_'); + return parts.Length > 1 + ? new[] { new Variant(parts[0], parts[1], info, metadata, helpInfo: helpInfo) } + // Process multiple parameter sets, so we declare a variant per parameter set. + : info.ParameterSets.Select(ps => new Variant(privateCmdletName, ps.Name, info, metadata, true, helpInfo)).ToArray(); + } + + public static Variant[] ToVariants(this CmdletAndHelpInfo info) => info.CommandInfo.ToVariants(info.HelpInfo); + + public static Variant[] ToVariants(this CommandInfo info, PSObject helpInfo = null) => info.ToVariants(helpInfo?.ToPsHelpInfo()); + + public static Parameter[] ToParameters(this Variant variant) + { + var parameters = variant.Metadata.Parameters.AsEnumerable(); + var parameterHelp = variant.HelpInfo.Parameters.AsEnumerable(); + + if (variant.HasParameterSets) + { + parameters = parameters.Where(p => p.Value.ParameterSets.Keys.Any(k => k == variant.VariantName || k == AllParameterSets)); + parameterHelp = parameterHelp.Where(ph => (!ph.ParameterSetNames.Any() || ph.ParameterSetNames.Any(psn => psn == variant.VariantName || psn == AllParameterSets)) && ph.Name != "IncludeTotalCount"); + } + var result = parameters.Select(p => new Parameter(variant.VariantName, p.Key, p.Value, parameterHelp.FirstOrDefault(ph => ph.Name == p.Key))); + if (variant.SupportsPaging) + { + // If supportsPaging is set, we will need to add First and Skip parameters since they are treated as common parameters which as not contained on Metadata>parameters + variant.Info.Parameters["First"].Attributes.OfType().FirstOrDefault(pa => pa.ParameterSetName == variant.VariantName || pa.ParameterSetName == AllParameterSets).HelpMessage = "Gets only the first 'n' objects."; + variant.Info.Parameters["Skip"].Attributes.OfType().FirstOrDefault(pa => pa.ParameterSetName == variant.VariantName || pa.ParameterSetName == AllParameterSets).HelpMessage = "Ignores the first 'n' objects and then gets the remaining objects."; + result = result.Append(new Parameter(variant.VariantName, "First", variant.Info.Parameters["First"], parameterHelp.FirstOrDefault(ph => ph.Name == "First"))); + result = result.Append(new Parameter(variant.VariantName, "Skip", variant.Info.Parameters["Skip"], parameterHelp.FirstOrDefault(ph => ph.Name == "Skip"))); + } + return result.ToArray(); + } + + public static Attribute[] ToAttributes(this Variant variant) => variant.IsFunction + ? ((FunctionInfo)variant.Info).ScriptBlock.Attributes.ToArray() + : variant.Metadata.CommandType.GetCustomAttributes(false).Cast().ToArray(); + + public static IEnumerable ToParameterGroups(this Variant[] variants) + { + var allVariantNames = variants.Select(vg => vg.VariantName).ToArray(); + return variants + .SelectMany(v => v.Parameters) + .GroupBy(p => p.ParameterName, StringComparer.InvariantCultureIgnoreCase) + .Select(pg => new ParameterGroup(pg.Key, pg.Select(p => p).ToArray(), allVariantNames)); + } + + public static ComplexInterfaceInfo ToComplexInterfaceInfo(this InfoAttribute infoAttribute, string name, Type type, bool? required = null, List seenTypes = null) + => new ComplexInterfaceInfo(name, type, infoAttribute, required, seenTypes); + + public static CompleterInfo ToCompleterInfo(this CompleterInfoAttribute infoAttribute) => new CompleterInfo(infoAttribute); + public static CompleterInfo ToCompleterInfo(this ArgumentCompleterAttribute completerAttribute) => new CompleterInfo(completerAttribute); + public static PSArgumentCompleterInfo ToPSArgumentCompleterInfo(this PSArgumentCompleterAttribute completerAttribute) => new PSArgumentCompleterInfo(completerAttribute); + public static DefaultInfo ToDefaultInfo(this DefaultInfoAttribute infoAttribute, ParameterGroup parameterGroup) => new DefaultInfo(infoAttribute, parameterGroup); + public static DefaultInfo ToDefaultInfo(this PSDefaultValueAttribute defaultValueAttribute, ParameterGroup parameterGroup) => new DefaultInfo(defaultValueAttribute, parameterGroup); + } +} diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/PsAttributes.cs b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/PsAttributes.cs new file mode 100644 index 000000000000..a4804e9d67d7 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/PsAttributes.cs @@ -0,0 +1,131 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere +{ + [AttributeUsage(AttributeTargets.Class)] + public class DescriptionAttribute : Attribute + { + public string Description { get; } + + public DescriptionAttribute(string description) + { + Description = description; + } + } + + [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property)] + public class DoNotExportAttribute : Attribute + { + } + + [AttributeUsage(AttributeTargets.Class)] + public class InternalExportAttribute : Attribute + { + } + + [AttributeUsage(AttributeTargets.Class)] + public class GeneratedAttribute : Attribute + { + } + + [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property)] + public class DoNotFormatAttribute : Attribute + { + } + + [AttributeUsage(AttributeTargets.Class)] + public class ProfileAttribute : Attribute + { + public string[] Profiles { get; } + + public ProfileAttribute(params string[] profiles) + { + Profiles = profiles; + } + } + + [AttributeUsage(AttributeTargets.Class)] + public class HttpPathAttribute : Attribute + { + public string Path { get; set; } + public string ApiVersion { get; set; } + } + + [AttributeUsage(AttributeTargets.Class)] + public class NotSuggestDefaultParameterSetAttribute : Attribute + { + } + + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] + public class CategoryAttribute : Attribute + { + public ParameterCategory[] Categories { get; } + + public CategoryAttribute(params ParameterCategory[] categories) + { + Categories = categories; + } + } + + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] + public class ExportAsAttribute : Attribute + { + public Type Type { get; set; } + + public ExportAsAttribute(Type type) + { + Type = type; + } + } + + public enum ParameterCategory + { + // Note: Order is significant + Uri = 0, + Path, + Query, + Header, + Cookie, + Body, + Azure, + Runtime + } + + [AttributeUsage(AttributeTargets.Property)] + public class OriginAttribute : Attribute + { + public PropertyOrigin Origin { get; } + + public OriginAttribute(PropertyOrigin origin) + { + Origin = origin; + } + } + + public enum PropertyOrigin + { + // Note: Order is significant + Inherited = 0, + Owned, + Inlined + } + + [AttributeUsage(AttributeTargets.Property)] + public class ConstantAttribute : Attribute + { + } + + [AttributeUsage(AttributeTargets.Property)] + public class FormatTableAttribute : Attribute + { + public int Index { get; set; } = -1; + public bool HasIndex => Index != -1; + public string Label { get; set; } + public int Width { get; set; } = -1; + public bool HasWidth => Width != -1; + } +} diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/PsExtensions.cs b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/PsExtensions.cs new file mode 100644 index 000000000000..63cbcf8173ad --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/PsExtensions.cs @@ -0,0 +1,176 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Reflection; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell +{ + internal static class PsExtensions + { + public static PSObject AddMultipleTypeNameIntoPSObject(this object obj, string multipleTag = "#Multiple") + { + var psObj = new PSObject(obj); + psObj.TypeNames.Insert(0, $"{psObj.TypeNames[0]}{multipleTag}"); + return psObj; + } + + // https://stackoverflow.com/a/863944/294804 + // https://stackoverflow.com/a/4452598/294804 + // https://stackoverflow.com/a/28701974/294804 + // Note: This will unwrap nested collections, but we don't generate nested collections. + public static Type Unwrap(this Type type) + { + if (type.IsArray) + { + return type.GetElementType().Unwrap(); + } + + var typeInfo = type.GetTypeInfo(); + if (typeInfo.IsGenericType + && (typeInfo.GetGenericTypeDefinition() == typeof(Nullable<>) || typeof(IEnumerable<>).IsAssignableFrom(type))) + { + return typeInfo.GetGenericArguments().First().Unwrap(); + } + + return type; + } + + // https://stackoverflow.com/a/863944/294804 + private static bool IsSimple(this Type type) + { + var typeInfo = type.GetTypeInfo(); + return typeInfo.IsPrimitive + || typeInfo.IsEnum + || type == typeof(string) + || type == typeof(decimal); + } + + // https://stackoverflow.com/a/32025393/294804 + private static bool HasImplicitConversion(this Type baseType, Type targetType) => + baseType.GetMethods(BindingFlags.Public | BindingFlags.Static) + .Where(mi => mi.Name == "op_Implicit" && mi.ReturnType == targetType) + .Any(mi => mi.GetParameters().FirstOrDefault()?.ParameterType == baseType); + + public static bool IsPsSimple(this Type type) + { + var unwrappedType = type.Unwrap(); + return unwrappedType.IsSimple() + || unwrappedType == typeof(SwitchParameter) + || unwrappedType == typeof(Hashtable) + || unwrappedType == typeof(PSCredential) + || unwrappedType == typeof(ScriptBlock) + || unwrappedType == typeof(DateTime) + || unwrappedType == typeof(Uri) + || unwrappedType.HasImplicitConversion(typeof(string)); + } + + public static string ToPsList(this IEnumerable items) => String.Join(", ", items.Select(i => $"'{i}'")); + + public static IEnumerable ToAliasNames(this IEnumerable attributes) => attributes.OfType().SelectMany(aa => aa.AliasNames).Distinct(); + + public static bool IsArrayAndElementTypeIsT(this object item) + { + var itemType = item.GetType(); + var tType = typeof(T); + return itemType.IsArray && !tType.IsArray && tType.IsAssignableFrom(itemType.GetElementType()); + } + + public static bool IsTArrayAndElementTypeIsItem(this object item) + { + var itemType = item.GetType(); + var tType = typeof(T); + return !itemType.IsArray && tType.IsArray && (tType.GetElementType()?.IsAssignableFrom(itemType) ?? false); + } + + public static bool IsTypeOrArrayOfType(this object item) => item is T || item.IsArrayAndElementTypeIsT() || item.IsTArrayAndElementTypeIsItem(); + + public static T NormalizeArrayType(this object item) + { + if (item is T result) + { + return result; + } + + if (item.IsArrayAndElementTypeIsT()) + { + var array = (T[])Convert.ChangeType(item, typeof(T[])); + return array.FirstOrDefault(); + } + + if (item.IsTArrayAndElementTypeIsItem()) + { + var tType = typeof(T); + var array = Array.CreateInstance(tType.GetElementType(), 1); + array.SetValue(item, 0); + return (T)Convert.ChangeType(array, tType); + } + + return default(T); + } + + public static T GetNestedProperty(this PSObject psObject, params string[] names) => psObject.Properties.GetNestedProperty(names); + + public static T GetNestedProperty(this PSMemberInfoCollection properties, params string[] names) + { + var lastName = names.Last(); + var nestedProperties = names.Take(names.Length - 1).Aggregate(properties, (p, n) => p?.GetProperty(n)?.Properties); + return nestedProperties != null ? nestedProperties.GetProperty(lastName) : default(T); + } + + public static T GetProperty(this PSObject psObject, string name) => psObject.Properties.GetProperty(name); + + public static T GetProperty(this PSMemberInfoCollection properties, string name) + { + switch (properties[name]?.Value) + { + case PSObject psObject when psObject.BaseObject is PSCustomObject && psObject.ImmediateBaseObject.IsTypeOrArrayOfType(): + return psObject.ImmediateBaseObject.NormalizeArrayType(); + case PSObject psObject when psObject.BaseObject.IsTypeOrArrayOfType(): + return psObject.BaseObject.NormalizeArrayType(); + case object value when value.IsTypeOrArrayOfType(): + return value.NormalizeArrayType(); + default: + return default(T); + } + } + + public static IEnumerable RunScript(this PSCmdlet cmdlet, string script) + => PsHelpers.RunScript(cmdlet.InvokeCommand, script); + + public static void RunScript(this PSCmdlet cmdlet, string script) + => cmdlet.RunScript(script); + + public static IEnumerable RunScript(this EngineIntrinsics engineIntrinsics, string script) + => PsHelpers.RunScript(engineIntrinsics.InvokeCommand, script); + + public static void RunScript(this EngineIntrinsics engineIntrinsics, string script) + => engineIntrinsics.RunScript(script); + + public static IEnumerable RunScript(this PSCmdlet cmdlet, ScriptBlock block) + => PsHelpers.RunScript(cmdlet.InvokeCommand, block.ToString()); + + public static void RunScript(this PSCmdlet cmdlet, ScriptBlock block) + => cmdlet.RunScript(block.ToString()); + + public static IEnumerable RunScript(this EngineIntrinsics engineIntrinsics, ScriptBlock block) + => PsHelpers.RunScript(engineIntrinsics.InvokeCommand, block.ToString()); + + public static void RunScript(this EngineIntrinsics engineIntrinsics, ScriptBlock block) + => engineIntrinsics.RunScript(block.ToString()); + + /// + /// Returns if a parameter should be hidden by checking for . + /// + /// A PowerShell parameter. + public static bool IsHidden(this Parameter parameter) + { + return parameter.Attributes.Any(attr => attr is DoNotExportAttribute); + } + } +} diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/PsHelpers.cs b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/PsHelpers.cs new file mode 100644 index 000000000000..e825abd8d9cc --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/PsHelpers.cs @@ -0,0 +1,105 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Management.Automation; +using Pwsh = System.Management.Automation.PowerShell; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell +{ + internal static class PsHelpers + { + public static IEnumerable RunScript(string script) + => Pwsh.Create().AddScript(script).Invoke(); + + public static void RunScript(string script) + => RunScript(script); + + public static IEnumerable RunScript(CommandInvocationIntrinsics cii, string script) + => cii.InvokeScript(script).Select(o => o?.BaseObject).Where(o => o != null).OfType(); + + public static void RunScript(CommandInvocationIntrinsics cii, string script) + => RunScript(cii, script); + + public static IEnumerable GetModuleCmdlets(PSCmdlet cmdlet, params string[] modulePaths) + { + var getCmdletsCommand = String.Join(" + ", modulePaths.Select(mp => $"(Get-Command -Module (Import-Module '{mp}' -PassThru))")); + return (cmdlet?.RunScript(getCmdletsCommand) ?? RunScript(getCmdletsCommand)) + .Where(ci => ci.CommandType != CommandTypes.Alias); + } + + public static IEnumerable GetModuleCmdlets(params string[] modulePaths) + => GetModuleCmdlets(null, modulePaths); + + public static IEnumerable GetScriptCmdlets(PSCmdlet cmdlet, string scriptFolder) + { + // https://stackoverflow.com/a/40969712/294804 + var wrappedFolder = scriptFolder.Contains("'") ? $@"""{scriptFolder}""" : $@"'{scriptFolder}'"; + var getCmdletsCommand = $@" +$currentFunctions = Get-ChildItem function: +Get-ChildItem -Path {wrappedFolder} -Recurse -Include '*.ps1' -File | ForEach-Object {{ . $_.FullName }} +Get-ChildItem function: | Where-Object {{ ($currentFunctions -notcontains $_) -and $_.CmdletBinding }} +"; + return cmdlet?.RunScript(getCmdletsCommand) ?? RunScript(getCmdletsCommand); + } + + public static IEnumerable GetScriptCmdlets(string scriptFolder) + => GetScriptCmdlets(null, scriptFolder); + + public static IEnumerable GetScriptHelpInfo(PSCmdlet cmdlet, params string[] modulePaths) + { + var importModules = String.Join(Environment.NewLine, modulePaths.Select(mp => $"Import-Module '{mp}'")); + var getHelpCommand = $@" +$currentFunctions = Get-ChildItem function: +{importModules} +Get-ChildItem function: | Where-Object {{ ($currentFunctions -notcontains $_) -and $_.CmdletBinding }} | ForEach-Object {{ Get-Help -Name $_.Name -Full }} +"; + return cmdlet?.RunScript(getHelpCommand) ?? RunScript(getHelpCommand); + } + + public static IEnumerable GetScriptHelpInfo(params string[] modulePaths) + => GetScriptHelpInfo(null, modulePaths); + + public static IEnumerable GetModuleCmdletsAndHelpInfo(PSCmdlet cmdlet, params string[] modulePaths) + { + var getCmdletAndHelp = String.Join(" + ", modulePaths.Select(mp => + $@"(Get-Command -Module (Import-Module '{mp}' -PassThru) | Where-Object {{ $_.CommandType -ne 'Alias' }} | ForEach-Object {{ @{{ CommandInfo = $_; HelpInfo = ( invoke-command {{ try {{ Get-Help -Name $_.Name -Full }} catch{{ '' }} }} ) }} }})" + )); + return (cmdlet?.RunScript(getCmdletAndHelp) ?? RunScript(getCmdletAndHelp)) + .Select(h => new CmdletAndHelpInfo { CommandInfo = (h["CommandInfo"] as PSObject)?.BaseObject as CommandInfo, HelpInfo = h["HelpInfo"] as PSObject }); + } + + public static IEnumerable GetModuleCmdletsAndHelpInfo(params string[] modulePaths) + => GetModuleCmdletsAndHelpInfo(null, modulePaths); + + public static CmdletAndHelpInfo ToCmdletAndHelpInfo(this CommandInfo commandInfo, PSObject helpInfo) => new CmdletAndHelpInfo { CommandInfo = commandInfo, HelpInfo = helpInfo }; + + public const string Psd1Indent = " "; + public const string GuidStart = Psd1Indent + "GUID"; + + public static Guid ReadGuidFromPsd1(string psd1Path) + { + var guid = Guid.NewGuid(); + if (File.Exists(psd1Path)) + { + var currentGuid = File.ReadAllLines(psd1Path) + .FirstOrDefault(l => l.TrimStart().StartsWith(GuidStart.TrimStart()))?.Split(new[] { " = " }, StringSplitOptions.RemoveEmptyEntries) + .LastOrDefault()?.Replace("'", String.Empty); + guid = currentGuid != null ? Guid.Parse(currentGuid) : guid; + } + + return guid; + } + } + + internal class CmdletAndHelpInfo + { + public CommandInfo CommandInfo { get; set; } + public PSObject HelpInfo { get; set; } + } +} diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/StringExtensions.cs b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/StringExtensions.cs new file mode 100644 index 000000000000..93a710699e73 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/StringExtensions.cs @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Linq; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell +{ + internal static class StringExtensions + { + public static string NullIfEmpty(this string text) => String.IsNullOrEmpty(text) ? null : text; + public static string NullIfWhiteSpace(this string text) => String.IsNullOrWhiteSpace(text) ? null : text; + public static string EmptyIfNull(this string text) => text ?? String.Empty; + + public static bool? ToNullableBool(this string text) => String.IsNullOrEmpty(text) ? (bool?)null : Convert.ToBoolean(text.ToLowerInvariant()); + + public static string ToUpperFirstCharacter(this string text) => String.IsNullOrEmpty(text) ? text : $"{text[0].ToString().ToUpperInvariant()}{text.Remove(0, 1)}"; + + public static string ReplaceNewLines(this string value, string replacer = " ", string[] newLineSymbols = null) + => (newLineSymbols ?? new []{ "\r\n", "\n" }).Aggregate(value.EmptyIfNull(), (current, symbol) => current.Replace(symbol, replacer)); + public static string NormalizeNewLines(this string value) => value.ReplaceNewLines("\u00A0").Replace("\u00A0", Environment.NewLine); + } +} diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/XmlExtensions.cs b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/XmlExtensions.cs new file mode 100644 index 000000000000..256aedebf97e --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/BuildTime/XmlExtensions.cs @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System.IO; +using System.Xml; +using System.Xml.Serialization; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell +{ + internal static class XmlExtensions + { + public static string ToXmlString(this T inputObject, bool excludeDeclaration = false) + { + var serializer = new XmlSerializer(typeof(T)); + //https://stackoverflow.com/a/760290/294804 + //https://stackoverflow.com/a/3732234/294804 + var namespaces = new XmlSerializerNamespaces(new[] { XmlQualifiedName.Empty }); + var xmlSettings = new XmlWriterSettings { OmitXmlDeclaration = excludeDeclaration, Indent = true }; + using (var stringWriter = new StringWriter()) + using (var xmlWriter = XmlWriter.Create(stringWriter, xmlSettings)) + { + serializer.Serialize(xmlWriter, inputObject, namespaces); + return stringWriter.ToString(); + } + } + } +} diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/CmdInfoHandler.cs b/src/Sphere/Sphere.Autorest/generated/runtime/CmdInfoHandler.cs new file mode 100644 index 000000000000..92e2f17da941 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/CmdInfoHandler.cs @@ -0,0 +1,40 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Management.Automation; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime +{ + using NextDelegate = Func, Task>, Task>; + using SignalDelegate = Func, Task>; + + public class CmdInfoHandler + { + private readonly string processRecordId; + private readonly string parameterSetName; + private readonly InvocationInfo invocationInfo; + + public CmdInfoHandler(string processRecordId, InvocationInfo invocationInfo, string parameterSetName) + { + this.processRecordId = processRecordId; + this.parameterSetName = parameterSetName; + this.invocationInfo = invocationInfo; + } + + public Task SendAsync(HttpRequestMessage request, CancellationToken token, Action cancel, SignalDelegate signal, NextDelegate next) + { + request.Headers.Add("x-ms-client-request-id", processRecordId); + request.Headers.Add("CommandName", invocationInfo?.InvocationName); + request.Headers.Add("FullCommandName", invocationInfo?.MyCommand?.Name); + request.Headers.Add("ParameterSetName", parameterSetName); + + // continue with pipeline. + return next(request, token, cancel, signal); + } + } +} diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Context.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Context.cs new file mode 100644 index 000000000000..6307b17a66ed --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Context.cs @@ -0,0 +1,33 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime +{ + + using System; + using System.Linq; + using System.Collections; + using System.Collections.Generic; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + using GetEventData = System.Func; + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + /// + /// The IContext Interface defines the communication mechanism for input customization. + /// + /// + /// In the context, we will have client, pipeline, PSBoundParamters, default EventListener, Cancellation. + /// + public interface IContext + { + System.Management.Automation.InvocationInfo InvocationInformation { get; set; } + System.Threading.CancellationTokenSource CancellationTokenSource { get; set; } + System.Collections.Generic.IDictionary ExtensibleParameters { get; } + HttpPipeline Pipeline { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Sphere.Sphere Client { get; } + } +} diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/ConversionException.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/ConversionException.cs new file mode 100644 index 000000000000..fa7f7b9dcd98 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/ConversionException.cs @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + internal class ConversionException : Exception + { + internal ConversionException(string message) + : base(message) { } + + internal ConversionException(JsonNode node, Type targetType) + : base($"Cannot convert '{node.Type}' to a {targetType.Name}") { } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/IJsonConverter.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/IJsonConverter.cs new file mode 100644 index 000000000000..7fa354608b53 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/IJsonConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + internal interface IJsonConverter + { + JsonNode ToJson(object value); + + object FromJson(JsonNode node); + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/BinaryConverter.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/BinaryConverter.cs new file mode 100644 index 000000000000..c16593151d4e --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/BinaryConverter.cs @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + public sealed class BinaryConverter : JsonConverter + { + internal override JsonNode ToJson(byte[] value) => new XBinary(value); + + internal override byte[] FromJson(JsonNode node) + { + switch (node.Type) + { + case JsonType.String : return Convert.FromBase64String(node.ToString()); // Base64 Encoded + case JsonType.Binary : return ((XBinary)node).Value; + } + + throw new ConversionException(node, typeof(byte[])); + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/BooleanConverter.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/BooleanConverter.cs new file mode 100644 index 000000000000..66fb53f55812 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/BooleanConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + public sealed class BooleanConverter : JsonConverter + { + internal override JsonNode ToJson(bool value) => new JsonBoolean(value); + + internal override bool FromJson(JsonNode node) => (bool)node; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/DateTimeConverter.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/DateTimeConverter.cs new file mode 100644 index 000000000000..808fb007dfed --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/DateTimeConverter.cs @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + public sealed class DateTimeConverter : JsonConverter + { + internal override JsonNode ToJson(DateTime value) + { + return new JsonDate(value); + } + + internal override DateTime FromJson(JsonNode node) => (DateTime)node; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/DateTimeOffsetConverter.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/DateTimeOffsetConverter.cs new file mode 100644 index 000000000000..3aa6afaedd2c --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/DateTimeOffsetConverter.cs @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + public sealed class DateTimeOffsetConverter : JsonConverter + { + internal override JsonNode ToJson(DateTimeOffset value) => new JsonDate(value); + + internal override DateTimeOffset FromJson(JsonNode node) => (DateTimeOffset)node; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/DecimalConverter.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/DecimalConverter.cs new file mode 100644 index 000000000000..3834b3f1878f --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/DecimalConverter.cs @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + public sealed class DecimalConverter : JsonConverter + { + internal override JsonNode ToJson(decimal value) => new JsonNumber(value.ToString()); + + internal override decimal FromJson(JsonNode node) + { + return (decimal)node; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/DoubleConverter.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/DoubleConverter.cs new file mode 100644 index 000000000000..92e99ebd9b07 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/DoubleConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + public sealed class DoubleConverter : JsonConverter + { + internal override JsonNode ToJson(double value) => new JsonNumber(value); + + internal override double FromJson(JsonNode node) => (double)node; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/EnumConverter.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/EnumConverter.cs new file mode 100644 index 000000000000..b5a4560b4107 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/EnumConverter.cs @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + public sealed class EnumConverter : IJsonConverter + { + private readonly Type type; + + internal EnumConverter(Type type) + { + this.type = type ?? throw new ArgumentNullException(nameof(type)); + } + + public JsonNode ToJson(object value) => new JsonString(value.ToString()); + + public object FromJson(JsonNode node) + { + if (node.Type == JsonType.Number) + { + return Enum.ToObject(type, (int)node); + } + + return Enum.Parse(type, node.ToString(), ignoreCase: true); + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/GuidConverter.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/GuidConverter.cs new file mode 100644 index 000000000000..a347db03cf22 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/GuidConverter.cs @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + public sealed class GuidConverter : JsonConverter + { + internal override JsonNode ToJson(Guid value) => new JsonString(value.ToString()); + + internal override Guid FromJson(JsonNode node) => (Guid)node; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/HashSet'1Converter.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/HashSet'1Converter.cs new file mode 100644 index 000000000000..8e3301f0b3f4 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/HashSet'1Converter.cs @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System.Collections.Generic; +using System.Linq; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + public sealed class HashSetConverter : JsonConverter> + { + internal override JsonNode ToJson(HashSet value) + { + return new XSet(value); + } + + internal override HashSet FromJson(JsonNode node) + { + var collection = node as ICollection; + + if (collection.Count == 0) return null; + + // TODO: Remove Linq depedency + return new HashSet(collection.Cast()); + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/Int16Converter.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/Int16Converter.cs new file mode 100644 index 000000000000..7fae51ca9126 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/Int16Converter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + public sealed class Int16Converter : JsonConverter + { + internal override JsonNode ToJson(short value) => new JsonNumber(value); + + internal override short FromJson(JsonNode node) => (short)node; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/Int32Converter.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/Int32Converter.cs new file mode 100644 index 000000000000..f300335ab9f1 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/Int32Converter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + public sealed class Int32Converter : JsonConverter + { + internal override JsonNode ToJson(int value) => new JsonNumber(value); + + internal override int FromJson(JsonNode node) => (int)node; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/Int64Converter.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/Int64Converter.cs new file mode 100644 index 000000000000..fde667a3d494 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/Int64Converter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + public sealed class Int64Converter : JsonConverter + { + internal override JsonNode ToJson(long value) => new JsonNumber(value); + + internal override long FromJson(JsonNode node) => (long)node; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/JsonArrayConverter.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/JsonArrayConverter.cs new file mode 100644 index 000000000000..590b596b2608 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/JsonArrayConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + public sealed class JsonArrayConverter : JsonConverter + { + internal override JsonNode ToJson(JsonArray value) => value; + + internal override JsonArray FromJson(JsonNode node) => (JsonArray)node; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/JsonObjectConverter.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/JsonObjectConverter.cs new file mode 100644 index 000000000000..7772d70b659b --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/JsonObjectConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + public sealed class JsonObjectConverter : JsonConverter + { + internal override JsonNode ToJson(JsonObject value) => value; + + internal override JsonObject FromJson(JsonNode node) => (JsonObject)node; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/SingleConverter.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/SingleConverter.cs new file mode 100644 index 000000000000..ca77d8c7ab24 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/SingleConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + public sealed class SingleConverter : JsonConverter + { + internal override JsonNode ToJson(float value) => new JsonNumber(value.ToString()); + + internal override float FromJson(JsonNode node) => (float)node; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/StringConverter.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/StringConverter.cs new file mode 100644 index 000000000000..faba3d90bced --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/StringConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + public sealed class StringConverter : JsonConverter + { + internal override JsonNode ToJson(string value) => new JsonString(value); + + internal override string FromJson(JsonNode node) => node.ToString(); + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/TimeSpanConverter.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/TimeSpanConverter.cs new file mode 100644 index 000000000000..f6fb11be1ca6 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/TimeSpanConverter.cs @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + public sealed class TimeSpanConverter : JsonConverter + { + internal override JsonNode ToJson(TimeSpan value) => new JsonString(value.ToString()); + + internal override TimeSpan FromJson(JsonNode node) => (TimeSpan)node; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/UInt16Converter.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/UInt16Converter.cs new file mode 100644 index 000000000000..45923c831732 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/UInt16Converter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + public sealed class UInt16Converter : JsonConverter + { + internal override JsonNode ToJson(ushort value) => new JsonNumber(value); + + internal override ushort FromJson(JsonNode node) => (ushort)node; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/UInt32Converter.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/UInt32Converter.cs new file mode 100644 index 000000000000..b1f24ab77f98 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/UInt32Converter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + public sealed class UInt32Converter : JsonConverter + { + internal override JsonNode ToJson(uint value) => new JsonNumber(value); + + internal override uint FromJson(JsonNode node) => (uint)node; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/UInt64Converter.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/UInt64Converter.cs new file mode 100644 index 000000000000..825a57305e5c --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/UInt64Converter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + public sealed class UInt64Converter : JsonConverter + { + internal override JsonNode ToJson(ulong value) => new JsonNumber(value.ToString()); + + internal override ulong FromJson(JsonNode node) => (ulong)node; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/UriConverter.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/UriConverter.cs new file mode 100644 index 000000000000..fd75b6cbaac2 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/Instances/UriConverter.cs @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + public sealed class UriConverter : JsonConverter + { + internal override JsonNode ToJson(Uri value) => new JsonString(value.AbsoluteUri); + + internal override Uri FromJson(JsonNode node) => (Uri)node; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/JsonConverter.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/JsonConverter.cs new file mode 100644 index 000000000000..c3a025a5ee37 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/JsonConverter.cs @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + public abstract class JsonConverter : IJsonConverter + { + internal abstract T FromJson(JsonNode node); + + internal abstract JsonNode ToJson(T value); + + #region IConverter + + object IJsonConverter.FromJson(JsonNode node) => FromJson(node); + + JsonNode IJsonConverter.ToJson(object value) => ToJson((T)value); + + #endregion + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/JsonConverterAttribute.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/JsonConverterAttribute.cs new file mode 100644 index 000000000000..743b2d5fa6fa --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/JsonConverterAttribute.cs @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + public sealed class JsonConverterAttribute : Attribute + { + internal JsonConverterAttribute(Type type) + { + Converter = (IJsonConverter)Activator.CreateInstance(type); + } + + internal IJsonConverter Converter { get; } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/JsonConverterFactory.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/JsonConverterFactory.cs new file mode 100644 index 000000000000..dcf5a175fa38 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/JsonConverterFactory.cs @@ -0,0 +1,91 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + public sealed class JsonConverterFactory + { + private static readonly Dictionary converters = new Dictionary(); + + static JsonConverterFactory() + { + AddInternal(new BooleanConverter()); + AddInternal(new DateTimeConverter()); + AddInternal(new DateTimeOffsetConverter()); + AddInternal(new BinaryConverter()); + AddInternal(new DecimalConverter()); + AddInternal(new DoubleConverter()); + AddInternal(new GuidConverter()); + AddInternal(new Int16Converter()); + AddInternal(new Int32Converter()); + AddInternal(new Int64Converter()); + AddInternal(new SingleConverter()); + AddInternal(new StringConverter()); + AddInternal(new TimeSpanConverter()); + AddInternal(new UInt16Converter()); + AddInternal(new UInt32Converter()); + AddInternal(new UInt64Converter()); + AddInternal(new UriConverter()); + + // Hash sets + AddInternal(new HashSetConverter()); + AddInternal(new HashSetConverter()); + AddInternal(new HashSetConverter()); + AddInternal(new HashSetConverter()); + AddInternal(new HashSetConverter()); + AddInternal(new HashSetConverter()); + + // JSON + + AddInternal(new JsonObjectConverter()); + AddInternal(new JsonArrayConverter()); + } + + internal static Dictionary Instances => converters; + + internal static IJsonConverter Get(Type type) + { + var details = TypeDetails.Get(type); + + if (details.JsonConverter == null) + { + throw new ConversionException($"No converter found for '{type.Name}'."); + } + + return details.JsonConverter; + } + + internal static bool TryGet(Type type, out IJsonConverter converter) + { + var typeDetails = TypeDetails.Get(type); + + converter = typeDetails.JsonConverter; + + return converter != null; + } + + private static void AddInternal(JsonConverter converter) + => converters.Add(typeof(T), converter); + + private static void AddInternal(IJsonConverter converter) + => converters.Add(typeof(T), converter); + + internal static void Add(JsonConverter converter) + { + if (converter == null) + { + throw new ArgumentNullException(nameof(converter)); + } + + AddInternal(converter); + + var type = TypeDetails.Get(); + + type.JsonConverter = converter; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/StringLikeConverter.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/StringLikeConverter.cs new file mode 100644 index 000000000000..5a1788d36ff7 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Conversions/StringLikeConverter.cs @@ -0,0 +1,45 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Reflection; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + public sealed class StringLikeConverter : IJsonConverter + { + private readonly Type type; + private readonly MethodInfo parseMethod; + + internal StringLikeConverter(Type type) + { + this.type = type ?? throw new ArgumentNullException(nameof(type)); + this.parseMethod = StringLikeHelper.GetParseMethod(type); + } + + public object FromJson(JsonNode node) => + parseMethod.Invoke(null, new[] { node.ToString() }); + + public JsonNode ToJson(object value) => new JsonString(value.ToString()); + } + + internal static class StringLikeHelper + { + private static readonly Type[] parseMethodParamaterTypes = new[] { typeof(string) }; + + internal static bool IsStringLike(Type type) + { + return GetParseMethod(type) != null; + } + + internal static MethodInfo GetParseMethod(Type type) + { + MethodInfo method = type.GetMethod("Parse", parseMethodParamaterTypes); + + if (method?.IsPublic != true) return null; + + return method; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Customizations/IJsonSerializable.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Customizations/IJsonSerializable.cs new file mode 100644 index 000000000000..b2ed78255eda --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Customizations/IJsonSerializable.cs @@ -0,0 +1,263 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json; +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime +{ + public interface IJsonSerializable + { + JsonNode ToJson(JsonObject container = null, SerializationMode serializationMode = SerializationMode.None); + } + internal static class JsonSerializable + { + /// + /// Serializes an enumerable and returns a JsonNode. + /// + /// an IEnumerable collection of items + /// A JsonNode that contains the collection of items serialized. + private static JsonNode ToJsonValue(System.Collections.IEnumerable enumerable) + { + if (enumerable != null) + { + // is it a byte array of some kind? + if (enumerable is System.Collections.Generic.IEnumerable byteEnumerable) + { + return new XBinary(System.Linq.Enumerable.ToArray(byteEnumerable)); + } + + var hasValues = false; + // just create an array of value nodes. + var result = new XNodeArray(); + foreach (var each in enumerable) + { + // we had at least one value. + hasValues = true; + + // try to serialize it. + var node = ToJsonValue(each); + if (null != node) + { + result.Add(node); + } + } + + // if we were able to add values, (or it was just empty), return it. + if (result.Count > 0 || !hasValues) + { + return result; + } + } + + // we couldn't serialize the values. Sorry. + return null; + } + + /// + /// Serializes a valuetype to a JsonNode. + /// + /// a ValueType (ie, a primitive, enum or struct) to be serialized + /// a JsonNode with the serialized value + private static JsonNode ToJsonValue(ValueType vValue) + { + // numeric type + if (vValue is SByte || vValue is Int16 || vValue is Int32 || vValue is Int64 || vValue is Byte || vValue is UInt16 || vValue is UInt32 || vValue is UInt64 || vValue is decimal || vValue is float || vValue is double) + { + return new JsonNumber(vValue.ToString()); + } + + // boolean type + if (vValue is bool bValue) + { + return new JsonBoolean(bValue); + } + + // dates + if (vValue is DateTime dtValue) + { + return new JsonDate(dtValue); + } + + // DictionaryEntity struct type + if (vValue is System.Collections.DictionaryEntry deValue) + { + return new JsonObject { { deValue.Key.ToString(), ToJsonValue(deValue.Value) } }; + } + + // sorry, no idea. + return null; + } + /// + /// Attempts to serialize an object by using ToJson() or ToJsonString() if they exist. + /// + /// the object to be serialized. + /// the serialized JsonNode (if successful), otherwise, null + private static JsonNode TryToJsonValue(dynamic oValue) + { + object jsonValue = null; + dynamic v = oValue; + try + { + jsonValue = v.ToJson().ToString(); + } + catch + { + // no harm... + try + { + jsonValue = v.ToJsonString().ToString(); + } + catch + { + // no worries here either. + } + } + + // if we got something out, let's use it. + if (null != jsonValue) + { + // JsonNumber is really a literal json value. Just don't try to cast that back to an actual number, ok? + return new JsonNumber(jsonValue.ToString()); + } + + return null; + } + + /// + /// Serialize an object by using a variety of methods. + /// + /// the object to be serialized. + /// the serialized JsonNode (if successful), otherwise, null + internal static JsonNode ToJsonValue(object value) + { + // things that implement our interface are preferred. + if (value is Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IJsonSerializable jsonSerializable) + { + return jsonSerializable.ToJson(); + } + + // strings are easy. + if (value is string || value is char) + { + return new JsonString(value.ToString()); + } + + // value types are fairly straightforward (fallback to ToJson()/ToJsonString() or literal JsonString ) + if (value is System.ValueType vValue) + { + return ToJsonValue(vValue) ?? TryToJsonValue(vValue) ?? new JsonString(vValue.ToString()); + } + + // dictionaries are objects that should be able to serialize + if (value is System.Collections.Generic.IDictionary dictionary) + { + return Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.JsonSerializable.ToJson(dictionary, null); + } + + // hashtables are converted to dictionaries for serialization + if (value is System.Collections.Hashtable hashtable) + { + var dict = new System.Collections.Generic.Dictionary(); + DictionaryExtensions.HashTableToDictionary(hashtable, dict); + return Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.JsonSerializable.ToJson(dict, null); + } + + // enumerable collections are handled like arrays (again, fallback to ToJson()/ToJsonString() or literal JsonString) + if (value is System.Collections.IEnumerable enumerableValue) + { + // some kind of enumerable value + return ToJsonValue(enumerableValue) ?? TryToJsonValue(value) ?? new JsonString(value.ToString()); + } + + // at this point, we're going to fallback to a string literal here, since we really have no idea what it is. + return new JsonString(value.ToString()); + } + + internal static JsonObject ToJson(System.Collections.Generic.Dictionary dictionary, JsonObject container) => ToJson((System.Collections.Generic.IDictionary)dictionary, container); + + /// + /// Serializes a dictionary into a JsonObject container. + /// + /// The dictionary to serailize + /// the container to serialize the dictionary into + /// the container + internal static JsonObject ToJson(System.Collections.Generic.IDictionary dictionary, JsonObject container) + { + container = container ?? new JsonObject(); + if (dictionary != null && dictionary.Count > 0) + { + foreach (var key in dictionary) + { + // currently, we don't serialize null values. + if (null != key.Value) + { + container.Add(key.Key, ToJsonValue(key.Value)); + continue; + } + } + } + return container; + } + + internal static Func> DeserializeDictionary(Func> dictionaryFactory) + { + return (node) => FromJson(node, dictionaryFactory(), (object)(DeserializeDictionary(dictionaryFactory)) as Func); + } + + internal static System.Collections.Generic.IDictionary FromJson(JsonObject json, System.Collections.Generic.Dictionary container, System.Func objectFactory, System.Collections.Generic.HashSet excludes = null) => FromJson(json, (System.Collections.Generic.IDictionary)container, objectFactory, excludes); + + + internal static System.Collections.Generic.IDictionary FromJson(JsonObject json, System.Collections.Generic.IDictionary container, System.Func objectFactory, System.Collections.Generic.HashSet excludes = null) + { + if (null == json) + { + return container; + } + + foreach (var key in json.Keys) + { + if (true == excludes?.Contains(key)) + { + continue; + } + + var value = json[key]; + try + { + switch (value.Type) + { + case JsonType.Null: + // skip null values. + continue; + + case JsonType.Array: + case JsonType.Boolean: + case JsonType.Date: + case JsonType.Binary: + case JsonType.Number: + case JsonType.String: + container.Add(key, (V)value.ToValue()); + break; + case JsonType.Object: + if (objectFactory != null) + { + var v = objectFactory(value as JsonObject); + if (null != v) + { + container.Add(key, v); + } + } + break; + } + } + catch + { + } + } + return container; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Customizations/JsonArray.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Customizations/JsonArray.cs new file mode 100644 index 000000000000..47760517c694 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Customizations/JsonArray.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + public partial class JsonArray + { + internal override object ToValue() => Count == 0 ? new object[0] : System.Linq.Enumerable.ToArray(System.Linq.Enumerable.Select(this, each => each.ToValue())); + } + + +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Customizations/JsonBoolean.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Customizations/JsonBoolean.cs new file mode 100644 index 000000000000..734d02bf9f26 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Customizations/JsonBoolean.cs @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + internal partial class JsonBoolean + { + internal static JsonBoolean Create(bool? value) => value is bool b ? new JsonBoolean(b) : null; + internal bool ToBoolean() => Value; + + internal override object ToValue() => Value; + } + + +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Customizations/JsonNode.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Customizations/JsonNode.cs new file mode 100644 index 000000000000..90ad05b2cd4d --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Customizations/JsonNode.cs @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + using System; + using System.Collections.Generic; + + public partial class JsonNode + { + /// + /// Returns the content of this node as the underlying value. + /// Will default to the string representation if not overridden in child classes. + /// + /// an object with the underlying value of the node. + internal virtual object ToValue() { + return this.ToString(); + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Customizations/JsonNumber.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Customizations/JsonNumber.cs new file mode 100644 index 000000000000..3800fb683642 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Customizations/JsonNumber.cs @@ -0,0 +1,78 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + using System; + + public partial class JsonNumber + { + internal static readonly DateTime EpochDate = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); + private static long ToUnixTime(DateTime dateTime) + { + return (long)dateTime.Subtract(EpochDate).TotalSeconds; + } + private static DateTime FromUnixTime(long totalSeconds) + { + return EpochDate.AddSeconds(totalSeconds); + } + internal byte ToByte() => this; + internal int ToInt() => this; + internal long ToLong() => this; + internal short ToShort() => this; + internal UInt16 ToUInt16() => this; + internal UInt32 ToUInt32() => this; + internal UInt64 ToUInt64() => this; + internal decimal ToDecimal() => this; + internal double ToDouble() => this; + internal float ToFloat() => this; + + internal static JsonNumber Create(int? value) => value is int n ? new JsonNumber(n) : null; + internal static JsonNumber Create(long? value) => value is long n ? new JsonNumber(n) : null; + internal static JsonNumber Create(float? value) => value is float n ? new JsonNumber(n) : null; + internal static JsonNumber Create(double? value) => value is double n ? new JsonNumber(n) : null; + internal static JsonNumber Create(decimal? value) => value is decimal n ? new JsonNumber(n) : null; + internal static JsonNumber Create(DateTime? value) => value is DateTime date ? new JsonNumber(ToUnixTime(date)) : null; + + public static implicit operator DateTime(JsonNumber number) => FromUnixTime(number); + internal DateTime ToDateTime() => this; + + internal JsonNumber(decimal value) + { + this.value = value.ToString(); + } + internal override object ToValue() + { + if (IsInteger) + { + if (int.TryParse(this.value, out int iValue)) + { + return iValue; + } + if (long.TryParse(this.value, out long lValue)) + { + return lValue; + } + } + else + { + if (float.TryParse(this.value, out float fValue)) + { + return fValue; + } + if (double.TryParse(this.value, out double dValue)) + { + return dValue; + } + if (decimal.TryParse(this.value, out decimal dcValue)) + { + return dcValue; + } + } + return null; + } + } + + +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Customizations/JsonObject.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Customizations/JsonObject.cs new file mode 100644 index 000000000000..9165c7df2ee3 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Customizations/JsonObject.cs @@ -0,0 +1,183 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + using System; + using System.Collections.Generic; + + public partial class JsonObject + { + internal override object ToValue() => Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.JsonSerializable.FromJson(this, new System.Collections.Generic.Dictionary(), (obj) => obj.ToValue()); + + internal void SafeAdd(string name, Func valueFn) + { + if (valueFn != null) + { + var value = valueFn(); + if (null != value) + { + items.Add(name, value); + } + } + } + + internal void SafeAdd(string name, JsonNode value) + { + if (null != value) + { + items.Add(name, value); + } + } + + internal T NullableProperty(string propertyName) where T : JsonNode + { + if (this.TryGetValue(propertyName, out JsonNode value)) + { + if (value.IsNull) + { + return null; + } + if (value is T tval) + { + return tval; + } + /* it's present, but not the correct type... */ + //throw new Exception($"Property {propertyName} in object expected type {typeof(T).Name} but value of type {value.Type.ToString()} was found."); + } + return null; + } + + internal JsonObject Property(string propertyName) + { + return PropertyT(propertyName); + } + + internal T PropertyT(string propertyName) where T : JsonNode + { + if (this.TryGetValue(propertyName, out JsonNode value)) + { + if (value.IsNull) + { + return null; // we're going to assume that the consumer knows what to do if null is explicity returned? + } + + if (value is T tval) + { + return tval; + } + /* it's present, but not the correct type... */ + // throw new Exception($"Property {propertyName} in object expected type {typeof(T).Name} but value of type {value.Type.ToString()} was found."); + } + return null; + } + + internal int NumberProperty(string propertyName, ref int output) => output = this.PropertyT(propertyName)?.ToInt() ?? output; + internal float NumberProperty(string propertyName, ref float output) => output = this.PropertyT(propertyName)?.ToFloat() ?? output; + internal byte NumberProperty(string propertyName, ref byte output) => output = this.PropertyT(propertyName)?.ToByte() ?? output; + internal long NumberProperty(string propertyName, ref long output) => output = this.PropertyT(propertyName)?.ToLong() ?? output; + internal double NumberProperty(string propertyName, ref double output) => output = this.PropertyT(propertyName)?.ToDouble() ?? output; + internal decimal NumberProperty(string propertyName, ref decimal output) => output = this.PropertyT(propertyName)?.ToDecimal() ?? output; + internal short NumberProperty(string propertyName, ref short output) => output = this.PropertyT(propertyName)?.ToShort() ?? output; + internal DateTime NumberProperty(string propertyName, ref DateTime output) => output = this.PropertyT(propertyName)?.ToDateTime() ?? output; + + internal int? NumberProperty(string propertyName, ref int? output) => output = this.NullableProperty(propertyName)?.ToInt() ?? null; + internal float? NumberProperty(string propertyName, ref float? output) => output = this.NullableProperty(propertyName)?.ToFloat() ?? null; + internal byte? NumberProperty(string propertyName, ref byte? output) => output = this.NullableProperty(propertyName)?.ToByte() ?? null; + internal long? NumberProperty(string propertyName, ref long? output) => output = this.NullableProperty(propertyName)?.ToLong() ?? null; + internal double? NumberProperty(string propertyName, ref double? output) => output = this.NullableProperty(propertyName)?.ToDouble() ?? null; + internal decimal? NumberProperty(string propertyName, ref decimal? output) => output = this.NullableProperty(propertyName)?.ToDecimal() ?? null; + internal short? NumberProperty(string propertyName, ref short? output) => output = this.NullableProperty(propertyName)?.ToShort() ?? null; + + internal DateTime? NumberProperty(string propertyName, ref DateTime? output) => output = this.NullableProperty(propertyName)?.ToDateTime() ?? null; + + + internal string StringProperty(string propertyName) => this.PropertyT(propertyName)?.ToString(); + internal string StringProperty(string propertyName, ref string output) => output = this.PropertyT(propertyName)?.ToString() ?? output; + internal char StringProperty(string propertyName, ref char output) => output = this.PropertyT(propertyName)?.ToChar() ?? output; + internal char? StringProperty(string propertyName, ref char? output) => output = this.PropertyT(propertyName)?.ToChar() ?? null; + + internal DateTime StringProperty(string propertyName, ref DateTime output) => DateTime.TryParse(this.PropertyT(propertyName)?.ToString(), out output) ? output : output; + internal DateTime? StringProperty(string propertyName, ref DateTime? output) => output = DateTime.TryParse(this.PropertyT(propertyName)?.ToString(), out var o) ? o : output; + + + internal bool BooleanProperty(string propertyName, ref bool output) => output = this.PropertyT(propertyName)?.ToBoolean() ?? output; + internal bool? BooleanProperty(string propertyName, ref bool? output) => output = this.PropertyT(propertyName)?.ToBoolean() ?? null; + + internal T[] ArrayProperty(string propertyName, ref T[] output, Func deserializer) + { + var array = this.PropertyT(propertyName); + if (array != null) + { + output = new T[array.Count]; + for (var i = 0; i < output.Length; i++) + { + output[i] = deserializer(array[i]); + } + } + return output; + } + internal T[] ArrayProperty(string propertyName, Func deserializer) + { + var array = this.PropertyT(propertyName); + if (array != null) + { + var output = new T[array.Count]; + for (var i = 0; i < output.Length; i++) + { + output[i] = deserializer(array[i]); + } + return output; + } + return new T[0]; + } + internal void IterateArrayProperty(string propertyName, Action deserializer) + { + var array = this.PropertyT(propertyName); + if (array != null) + { + for (var i = 0; i < array.Count; i++) + { + deserializer(array[i]); + } + } + } + + internal Dictionary DictionaryProperty(string propertyName, ref Dictionary output, Func deserializer) + { + var dictionary = this.PropertyT(propertyName); + if (output == null) + { + output = new Dictionary(); + } + else + { + output.Clear(); + } + if (dictionary != null) + { + foreach (var key in dictionary.Keys) + { + output[key] = deserializer(dictionary[key]); + } + } + return output; + } + + internal static JsonObject Create(IDictionary source, Func selector) + { + if (source == null || selector == null) + { + return null; + } + var result = new JsonObject(); + + foreach (var key in source.Keys) + { + result.SafeAdd(key, selector(source[key])); + } + return result; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Customizations/JsonString.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Customizations/JsonString.cs new file mode 100644 index 000000000000..b70776e4eca5 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Customizations/JsonString.cs @@ -0,0 +1,34 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + using System; + using System.Globalization; + using System.Linq; + + public partial class JsonString + { + internal static string DateFormat = "yyyy-MM-dd"; + internal static string DateTimeFormat = "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK"; + internal static string DateTimeRfc1123Format = "R"; + + internal static JsonString Create(string value) => value == null ? null : new JsonString(value); + internal static JsonString Create(char? value) => value is char c ? new JsonString(c.ToString()) : null; + + internal static JsonString CreateDate(DateTime? value) => value is DateTime date ? new JsonString(date.ToString(DateFormat, CultureInfo.CurrentCulture)) : null; + internal static JsonString CreateDateTime(DateTime? value) => value is DateTime date ? new JsonString(date.ToString(DateTimeFormat, CultureInfo.CurrentCulture)) : null; + internal static JsonString CreateDateTimeRfc1123(DateTime? value) => value is DateTime date ? new JsonString(date.ToString(DateTimeRfc1123Format, CultureInfo.CurrentCulture)) : null; + + internal char ToChar() => this.Value?.ToString()?.FirstOrDefault() ?? default(char); + public static implicit operator char(JsonString value) => value?.ToString()?.FirstOrDefault() ?? default(char); + public static implicit operator char? (JsonString value) => value?.ToString()?.FirstOrDefault(); + + public static implicit operator DateTime(JsonString value) => DateTime.TryParse(value, out var output) ? output : default(DateTime); + public static implicit operator DateTime? (JsonString value) => DateTime.TryParse(value, out var output) ? output : default(DateTime?); + + } + + +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Customizations/XNodeArray.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Customizations/XNodeArray.cs new file mode 100644 index 000000000000..70eecb043d8a --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Customizations/XNodeArray.cs @@ -0,0 +1,44 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + using System; + using System.Linq; + + public partial class XNodeArray + { + internal static XNodeArray Create(T[] source, Func selector) + { + if (source == null || selector == null) + { + return null; + } + var result = new XNodeArray(); + foreach (var item in source.Select(selector)) + { + result.SafeAdd(item); + } + return result; + } + internal void SafeAdd(JsonNode item) + { + if (item != null) + { + items.Add(item); + } + } + internal void SafeAdd(Func itemFn) + { + if (itemFn != null) + { + var item = itemFn(); + if (item != null) + { + items.Add(item); + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Debugging.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Debugging.cs new file mode 100644 index 000000000000..277a57bf1310 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Debugging.cs @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime +{ + internal static class AttachDebugger + { + internal static void Break() + { + while (!System.Diagnostics.Debugger.IsAttached) + { + System.Console.Error.WriteLine($"Waiting for debugger to attach to process {System.Diagnostics.Process.GetCurrentProcess().Id}"); + for (int i = 0; i < 50; i++) + { + if (System.Diagnostics.Debugger.IsAttached) + { + break; + } + System.Threading.Thread.Sleep(100); + System.Console.Error.Write("."); + } + System.Console.Error.WriteLine(); + } + System.Diagnostics.Debugger.Break(); + } + } +} diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/DictionaryExtensions.cs b/src/Sphere/Sphere.Autorest/generated/runtime/DictionaryExtensions.cs new file mode 100644 index 000000000000..d260f7964343 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/DictionaryExtensions.cs @@ -0,0 +1,33 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime +{ + internal static class DictionaryExtensions + { + internal static void HashTableToDictionary(System.Collections.Hashtable hashtable, System.Collections.Generic.IDictionary dictionary) + { + if (null == hashtable) + { + return; + } + foreach (var each in hashtable.Keys) + { + var key = each.ToString(); + var value = hashtable[key]; + if (null != value) + { + try + { + dictionary[key] = (V)value; + } + catch + { + // Values getting dropped; not compatible with target dictionary. Not sure what to do here. + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/EventData.cs b/src/Sphere/Sphere.Autorest/generated/runtime/EventData.cs new file mode 100644 index 000000000000..cf7293b5136c --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/EventData.cs @@ -0,0 +1,78 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime +{ + + using System; + using System.Threading; + + ///Represents the data in signaled event. + public partial class EventData + { + /// + /// The type of the event being signaled + /// + public string Id; + + /// + /// The user-ready message from the event. + /// + public string Message; + + /// + /// When the event is about a parameter, this is the parameter name. + /// Used in Validation Events + /// + public string Parameter; + + /// + /// This represents a numeric value associated with the event. + /// Use for progress-style events + /// + public double Value; + + /// + /// Any extended data for an event should be serialized and stored here. + /// + public string ExtendedData; + + /// + /// If the event triggers after the request message has been created, this will contain the Request Message (which in HTTP calls would be HttpRequestMessage) + /// + /// Typically you'd cast this to the expected type to use it: + /// + /// if(eventData.RequestMessgae is HttpRequestMessage httpRequest) + /// { + /// httpRequest.Headers.Add("x-request-flavor", "vanilla"); + /// } + /// + /// + public object RequestMessage; + + /// + /// If the event triggers after the response is back, this will contain the Response Message (which in HTTP calls would be HttpResponseMessage) + /// + /// Typically you'd cast this to the expected type to use it: + /// + /// if(eventData.ResponseMessage is HttpResponseMessage httpResponse){ + /// var flavor = httpResponse.Headers.GetValue("x-request-flavor"); + /// } + /// + /// + public object ResponseMessage; + + /// + /// Cancellation method for this event. + /// + /// If the event consumer wishes to cancel the request that initiated this event, call Cancel() + /// + /// + /// The original initiator of the request must provide the implementation of this. + /// + public System.Action Cancel; + } + +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/EventDataExtensions.cs b/src/Sphere/Sphere.Autorest/generated/runtime/EventDataExtensions.cs new file mode 100644 index 000000000000..6baaaffc59f2 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/EventDataExtensions.cs @@ -0,0 +1,94 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime +{ + using System; + + /// + /// PowerShell-specific data on top of the llc# EventData + /// + /// + /// In PowerShell, we add on the EventDataConverter to support sending events between modules. + /// Obviously, this code would need to be duplcated on both modules. + /// This is preferable to sharing a common library, as versioning makes that problematic. + /// + [System.ComponentModel.TypeConverter(typeof(EventDataConverter))] + public partial class EventData : EventArgs + { + } + + /// + /// A PowerShell PSTypeConverter to adapt an EventData object that has been passed. + /// Usually used between modules. + /// + public class EventDataConverter : System.Management.Automation.PSTypeConverter + { + public override bool CanConvertTo(object sourceValue, Type destinationType) => false; + public override object ConvertTo(object sourceValue, Type destinationType, IFormatProvider formatProvider, bool ignoreCase) => null; + public override bool CanConvertFrom(dynamic sourceValue, Type destinationType) => destinationType == typeof(EventData) && CanConvertFrom(sourceValue); + public override object ConvertFrom(dynamic sourceValue, Type destinationType, IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Verifies that a given object has the required members to convert it to the target type (EventData) + /// + /// Uses a dynamic type so that it is able to use the simplest code without excessive checking. + /// + /// The instance to verify + /// True, if the object has all the required parameters. + public static bool CanConvertFrom(dynamic sourceValue) + { + try + { + // check if this has *required* parameters... + sourceValue?.Id?.GetType(); + sourceValue?.Message?.GetType(); + sourceValue?.Cancel?.GetType(); + + // remaining parameters are not *required*, + // and if they have values, it will copy them at conversion time. + } + catch + { + // if anything throws an exception (because it's null, or doesn't have that member) + return false; + } + return true; + } + + /// + /// Returns result of the delegate as the expected type, or default(T) + /// + /// This isolates any exceptions from the consumer. + /// + /// A delegate that returns a value + /// The desired output type + /// The value from the function if the type is correct + private static T To(Func srcValue) + { + try { return srcValue(); } + catch { return default(T); } + } + + /// + /// Converts an incoming object to the expected type by treating the incoming object as a dynamic, and coping the expected values. + /// + /// the incoming object + /// EventData + public static EventData ConvertFrom(dynamic sourceValue) + { + return new EventData + { + Id = To(() => sourceValue.Id), + Message = To(() => sourceValue.Message), + Parameter = To(() => sourceValue.Parameter), + Value = To(() => sourceValue.Value), + RequestMessage = To(() => sourceValue.RequestMessage), + ResponseMessage = To(() => sourceValue.ResponseMessage), + Cancel = To(() => sourceValue.Cancel) + }; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/EventListener.cs b/src/Sphere/Sphere.Autorest/generated/runtime/EventListener.cs new file mode 100644 index 000000000000..28bd14f8f860 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/EventListener.cs @@ -0,0 +1,247 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime +{ + + using System; + using System.Linq; + using System.Collections; + using System.Collections.Generic; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + using GetEventData = System.Func; + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + public interface IValidates + { + Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IEventListener listener); + } + + /// + /// The IEventListener Interface defines the communication mechanism for Signaling events during a remote call. + /// + /// + /// The interface is designed to be as minimal as possible, allow for quick peeking of the event type (id) + /// and the cancellation status and provides a delegate for retrieving the event details themselves. + /// + public interface IEventListener + { + Task Signal(string id, CancellationToken token, GetEventData createMessage); + CancellationToken Token { get; } + System.Action Cancel { get; } + } + + internal static partial class Extensions + { + public static Task Signal(this IEventListener instance, string id, CancellationToken token, Func createMessage) => instance.Signal(id, token, createMessage); + public static Task Signal(this IEventListener instance, string id, CancellationToken token) => instance.Signal(id, token, () => new EventData { Id = id, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, string messageText) => instance.Signal(id, token, () => new EventData { Id = id, Message = messageText, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, string messageText, HttpRequestMessage request) => instance.Signal(id, token, () => new EventData { Id = id, Message = messageText, RequestMessage = request, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, string messageText, HttpResponseMessage response) => instance.Signal(id, token, () => new EventData { Id = id, Message = messageText, RequestMessage = response.RequestMessage, ResponseMessage = response, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, string messageText, double magnitude) => instance.Signal(id, token, () => new EventData { Id = id, Message = messageText, Value = magnitude, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, string messageText, double magnitude, HttpRequestMessage request) => instance.Signal(id, token, () => new EventData { Id = id, Message = messageText, RequestMessage = request, Value = magnitude, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, string messageText, double magnitude, HttpResponseMessage response) => instance.Signal(id, token, () => new EventData { Id = id, Message = messageText, RequestMessage = response.RequestMessage, ResponseMessage = response, Value = magnitude, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, HttpRequestMessage request) => instance.Signal(id, token, () => new EventData { Id = id, RequestMessage = request, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, HttpRequestMessage request, HttpResponseMessage response) => instance.Signal(id, token, () => new EventData { Id = id, RequestMessage = request, ResponseMessage = response, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, HttpResponseMessage response) => instance.Signal(id, token, () => new EventData { Id = id, RequestMessage = response.RequestMessage, ResponseMessage = response, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, EventData message) => instance.Signal(id, token, () => { message.Id = id; message.Cancel = instance.Cancel; return message; }); + + public static Task Signal(this IEventListener instance, string id, Func createMessage) => instance.Signal(id, instance.Token, createMessage); + public static Task Signal(this IEventListener instance, string id) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, string messageText) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = messageText, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, string messageText, HttpRequestMessage request) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = messageText, RequestMessage = request, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, string messageText, HttpResponseMessage response) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = messageText, RequestMessage = response.RequestMessage, ResponseMessage = response, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, string messageText, double magnitude) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = messageText, Value = magnitude, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, string messageText, double magnitude, HttpRequestMessage request) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = messageText, RequestMessage = request, Value = magnitude, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, string messageText, double magnitude, HttpResponseMessage response) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = messageText, RequestMessage = response.RequestMessage, ResponseMessage = response, Value = magnitude, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, HttpRequestMessage request) => instance.Signal(id, instance.Token, () => new EventData { Id = id, RequestMessage = request, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, HttpRequestMessage request, HttpResponseMessage response) => instance.Signal(id, instance.Token, () => new EventData { Id = id, RequestMessage = request, ResponseMessage = response, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, HttpResponseMessage response) => instance.Signal(id, instance.Token, () => new EventData { Id = id, RequestMessage = response.RequestMessage, ResponseMessage = response, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, EventData message) => instance.Signal(id, instance.Token, () => { message.Id = id; message.Cancel = instance.Cancel; return message; }); + + public static Task Signal(this IEventListener instance, string id, System.Uri uri) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = uri.ToString(), Cancel = instance.Cancel }); + + public static async Task AssertNotNull(this IEventListener instance, string parameterName, object value) + { + if (value == null) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ValidationWarning, Message = $"'{parameterName}' should not be null", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertMinimumLength(this IEventListener instance, string parameterName, string value, int length) + { + if (value != null && value.Length < length) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ValidationWarning, Message = $"Length of '{parameterName}' is less than {length}", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertMaximumLength(this IEventListener instance, string parameterName, string value, int length) + { + if (value != null && value.Length > length) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ValidationWarning, Message = $"Length of '{parameterName}' is greater than {length}", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + + public static async Task AssertRegEx(this IEventListener instance, string parameterName, string value, string regularExpression) + { + if (value != null && !System.Text.RegularExpressions.Regex.Match(value, regularExpression).Success) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ValidationWarning, Message = $"'{parameterName}' does not validate against pattern /{regularExpression}/", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertEnum(this IEventListener instance, string parameterName, string value, params string[] values) + { + if (!values.Any(each => each.Equals(value))) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ValidationWarning, Message = $"'{parameterName}' is not one of ({values.Aggregate((c, e) => $"'{e}',{c}")}", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertObjectIsValid(this IEventListener instance, string parameterName, object inst) + { + await (inst as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IValidates)?.Validate(instance); + } + + public static async Task AssertIsLessThan(this IEventListener instance, string parameterName, T? value, T max) where T : struct, System.IComparable + { + if (null != value && ((T)value).CompareTo(max) >= 0) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be less than {max} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertIsGreaterThan(this IEventListener instance, string parameterName, T? value, T max) where T : struct, System.IComparable + { + if (null != value && ((T)value).CompareTo(max) <= 0) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be greater than {max} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertIsLessThanOrEqual(this IEventListener instance, string parameterName, T? value, T max) where T : struct, System.IComparable + { + if (null != value && ((T)value).CompareTo(max) > 0) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be less than or equal to {max} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertIsGreaterThanOrEqual(this IEventListener instance, string parameterName, T? value, T max) where T : struct, System.IComparable + { + if (null != value && ((T)value).CompareTo(max) < 0) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be greater than or equal to {max} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertIsMultipleOf(this IEventListener instance, string parameterName, Int64? value, Int64 multiple) + { + if (null != value && value % multiple != 0) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be multiple of {multiple} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertIsMultipleOf(this IEventListener instance, string parameterName, double? value, double multiple) + { + if (null != value) + { + var i = (Int64)(value / multiple); + if (i != value / multiple) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be multiple of {multiple} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + } + public static async Task AssertIsMultipleOf(this IEventListener instance, string parameterName, decimal? value, decimal multiple) + { + if (null != value) + { + var i = (Int64)(value / multiple); + if (i != value / multiple) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be multiple of {multiple} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + } + } + + /// + /// An Implementation of the IEventListener that supports subscribing to events and dispatching them + /// (used for manually using the lowlevel interface) + /// + public class EventListener : CancellationTokenSource, IEnumerable>, IEventListener + { + private Dictionary calls = new Dictionary(); + public IEnumerator> GetEnumerator() => calls.GetEnumerator(); + IEnumerator IEnumerable.GetEnumerator() => calls.GetEnumerator(); + public EventListener() + { + } + + public new Action Cancel => base.Cancel; + private Event tracer; + + public EventListener(params (string name, Event callback)[] initializer) + { + foreach (var each in initializer) + { + Add(each.name, each.callback); + } + } + + public void Add(string name, SynchEvent callback) + { + Add(name, (message) => { callback(message); return Task.CompletedTask; }); + } + + public void Add(string name, Event callback) + { + if (callback != null) + { + if (string.IsNullOrEmpty(name)) + { + if (calls.ContainsKey(name)) + { + tracer += callback; + } + else + { + tracer = callback; + } + } + else + { + if (calls.ContainsKey(name)) + { + calls[name ?? System.String.Empty] += callback; + } + else + { + calls[name ?? System.String.Empty] = callback; + } + } + } + } + + + public async Task Signal(string id, CancellationToken token, GetEventData createMessage) + { + using (NoSynchronizationContext) + { + if (!string.IsNullOrEmpty(id) && (calls.TryGetValue(id, out Event listener) || tracer != null)) + { + var message = createMessage(); + message.Id = id; + + await listener?.Invoke(message); + await tracer?.Invoke(message); + + if (token.IsCancellationRequested) + { + throw new OperationCanceledException($"Canceled by event {id} ", this.Token); + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Events.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Events.cs new file mode 100644 index 000000000000..16bbfb3629dc --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Events.cs @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime +{ + public static partial class Events + { + public const string Log = nameof(Log); + public const string Validation = nameof(Validation); + public const string ValidationWarning = nameof(ValidationWarning); + public const string AfterValidation = nameof(AfterValidation); + public const string RequestCreated = nameof(RequestCreated); + public const string ResponseCreated = nameof(ResponseCreated); + public const string URLCreated = nameof(URLCreated); + public const string Finally = nameof(Finally); + public const string HeaderParametersAdded = nameof(HeaderParametersAdded); + public const string BodyContentSet = nameof(BodyContentSet); + public const string BeforeCall = nameof(BeforeCall); + public const string BeforeResponseDispatch = nameof(BeforeResponseDispatch); + public const string FollowingNextLink = nameof(FollowingNextLink); + public const string DelayBeforePolling = nameof(DelayBeforePolling); + public const string Polling = nameof(Polling); + public const string Progress = nameof(Progress); + } +} diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/EventsExtensions.cs b/src/Sphere/Sphere.Autorest/generated/runtime/EventsExtensions.cs new file mode 100644 index 000000000000..702cdf115331 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/EventsExtensions.cs @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime +{ + public static partial class Events + { + public const string CmdletProcessRecordStart = nameof(CmdletProcessRecordStart); + public const string CmdletProcessRecordAsyncStart = nameof(CmdletProcessRecordAsyncStart); + public const string CmdletException = nameof(CmdletException); + public const string CmdletGetPipeline = nameof(CmdletGetPipeline); + public const string CmdletBeforeAPICall = nameof(CmdletBeforeAPICall); + public const string CmdletBeginProcessing = nameof(CmdletBeginProcessing); + public const string CmdletEndProcessing = nameof(CmdletEndProcessing); + public const string CmdletProcessRecordEnd = nameof(CmdletProcessRecordEnd); + public const string CmdletProcessRecordAsyncEnd = nameof(CmdletProcessRecordAsyncEnd); + public const string CmdletAfterAPICall = nameof(CmdletAfterAPICall); + + public const string Verbose = nameof(Verbose); + public const string Debug = nameof(Debug); + public const string Information = nameof(Information); + public const string Error = nameof(Error); + public const string Warning = nameof(Warning); + } + +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Extensions.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Extensions.cs new file mode 100644 index 000000000000..be3e1d2d0050 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Extensions.cs @@ -0,0 +1,117 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime +{ + using System.Linq; + using System; + + internal static partial class Extensions + { + public static T[] SubArray(this T[] array, int offset, int length) + { + return new ArraySegment(array, offset, length) + .ToArray(); + } + + public static T ReadHeaders(this T instance, global::System.Net.Http.Headers.HttpResponseHeaders headers) where T : class + { + (instance as IHeaderSerializable)?.ReadHeaders(headers); + return instance; + } + + internal static bool If(T input, out T output) + { + if (null == input) + { + output = default(T); + return false; + } + output = input; + return true; + } + + internal static void AddIf(T value, System.Action addMethod) + { + // if value is present (and it's not just an empty JSON Object) + if (null != value && (value as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject)?.Keys.Count != 0) + { + addMethod(value); + } + } + + internal static void AddIf(T value, string serializedName, System.Action addMethod) + { + // if value is present (and it's not just an empty JSON Object) + if (null != value && (value as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject)?.Keys.Count != 0) + { + addMethod(serializedName, value); + } + } + + /// + /// Returns the first header value as a string from an HttpReponseMessage. + /// + /// the HttpResponseMessage to fetch a header from + /// the header name + /// the first header value as a string from an HttpReponseMessage. string.empty if there is no header value matching + internal static string GetFirstHeader(this System.Net.Http.HttpResponseMessage response, string headerName) => response.Headers.FirstOrDefault(each => string.Equals(headerName, each.Key, System.StringComparison.OrdinalIgnoreCase)).Value?.FirstOrDefault() ?? string.Empty; + + /// + /// Sets the Synchronization Context to null, and returns an IDisposable that when disposed, + /// will restore the synchonization context to the original value. + /// + /// This is used a less-invasive means to ensure that code in the library that doesn't + /// need to be continued in the original context doesn't have to have ConfigureAwait(false) + /// on every single await + /// + /// If the SynchronizationContext is null when this is used, the resulting IDisposable + /// will not do anything (this prevents excessive re-setting of the SynchronizationContext) + /// + /// Usage: + /// + /// using(NoSynchronizationContext) { + /// await SomeAsyncOperation(); + /// await SomeOtherOperation(); + /// } + /// + /// + /// + /// An IDisposable that will return the SynchronizationContext to original state + internal static System.IDisposable NoSynchronizationContext => System.Threading.SynchronizationContext.Current == null ? Dummy : new NoSyncContext(); + + /// + /// An instance of the Dummy IDispoable. + /// + /// + internal static System.IDisposable Dummy = new DummyDisposable(); + + /// + /// An IDisposable that does absolutely nothing. + /// + internal class DummyDisposable : System.IDisposable + { + public void Dispose() + { + } + } + /// + /// An IDisposable that saves the SynchronizationContext,sets it to null and + /// restores it to the original upon Dispose(). + /// + /// NOTE: This is designed to be less invasive than using .ConfigureAwait(false) + /// on every single await in library code (ie, places where we know we don't need + /// to continue in the same context as we went async) + /// + internal class NoSyncContext : System.IDisposable + { + private System.Threading.SynchronizationContext original = System.Threading.SynchronizationContext.Current; + internal NoSyncContext() + { + System.Threading.SynchronizationContext.SetSynchronizationContext(null); + } + public void Dispose() => System.Threading.SynchronizationContext.SetSynchronizationContext(original); + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Helpers/Extensions/StringBuilderExtensions.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Helpers/Extensions/StringBuilderExtensions.cs new file mode 100644 index 000000000000..d670f66ae370 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Helpers/Extensions/StringBuilderExtensions.cs @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System.Text; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + internal static class StringBuilderExtensions + { + /// + /// Extracts the buffered value and resets the buffer + /// + internal static string Extract(this StringBuilder builder) + { + var text = builder.ToString(); + + builder.Clear(); + + return text; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Helpers/Extensions/TypeExtensions.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Helpers/Extensions/TypeExtensions.cs new file mode 100644 index 000000000000..d06101fb17e0 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Helpers/Extensions/TypeExtensions.cs @@ -0,0 +1,61 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + internal static class TypeExtensions + { + internal static bool IsNullable(this Type type) => + type.IsGenericType && type.GetGenericTypeDefinition().Equals(typeof(Nullable<>)); + + internal static Type GetOpenGenericInterface(this Type candidateType, Type openGenericInterfaceType) + { + + if (candidateType.IsGenericType && candidateType.GetGenericTypeDefinition() == openGenericInterfaceType) + { + return candidateType; + } + + // Check if it references it's own converter.... + + foreach (Type interfaceType in candidateType.GetInterfaces()) + { + if (interfaceType.IsGenericType + && interfaceType.GetGenericTypeDefinition().Equals(openGenericInterfaceType)) + { + return interfaceType; + } + } + + return null; + } + + // Author: Sebastian Good + // http://stackoverflow.com/questions/503263/how-to-determine-if-a-type-implements-a-specific-generic-interface-type + internal static bool ImplementsOpenGenericInterface(this Type candidateType, Type openGenericInterfaceType) + { + if (candidateType.Equals(openGenericInterfaceType)) + { + return true; + } + + if (candidateType.IsGenericType && candidateType.GetGenericTypeDefinition().Equals(openGenericInterfaceType)) + { + return true; + } + + foreach (Type i in candidateType.GetInterfaces()) + { + if (i.IsGenericType && i.ImplementsOpenGenericInterface(openGenericInterfaceType)) + { + return true; + } + } + + return false; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Helpers/Seperator.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Helpers/Seperator.cs new file mode 100644 index 000000000000..5f3493df37f5 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Helpers/Seperator.cs @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + internal static class Seperator + { + internal static readonly char[] Dash = { '-' }; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Helpers/TypeDetails.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Helpers/TypeDetails.cs new file mode 100644 index 000000000000..f3ed2fd01a8a --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Helpers/TypeDetails.cs @@ -0,0 +1,116 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Reflection; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + + + + internal class TypeDetails + { + private readonly Type info; + + internal TypeDetails(Type info) + { + this.info = info ?? throw new ArgumentNullException(nameof(info)); + } + + internal Type NonNullType { get; set; } + + internal object DefaultValue { get; set; } + + internal bool IsNullable { get; set; } + + internal bool IsList { get; set; } + + internal bool IsStringLike { get; set; } + + internal bool IsEnum => info.IsEnum; + + internal bool IsArray => info.IsArray; + + internal bool IsValueType => info.IsValueType; + + internal Type ElementType { get; set; } + + internal IJsonConverter JsonConverter { get; set; } + + #region Creation + + private static readonly ConcurrentDictionary cache = new ConcurrentDictionary(); + + internal static TypeDetails Get() => Get(typeof(T)); + + internal static TypeDetails Get(Type type) => cache.GetOrAdd(type, Create); + + private static TypeDetails Create(Type type) + { + var isGenericList = !type.IsPrimitive && type.ImplementsOpenGenericInterface(typeof(IList<>)); + var isList = !type.IsPrimitive && (isGenericList || typeof(IList).IsAssignableFrom(type)); + + var isNullable = type.IsNullable(); + + Type elementType; + + if (type.IsArray) + { + elementType = type.GetElementType(); + } + else if (isGenericList) + { + var iList = type.GetOpenGenericInterface(typeof(IList<>)); + + elementType = iList.GetGenericArguments()[0]; + } + else + { + elementType = null; + } + + var nonNullType = isNullable ? type.GetGenericArguments()[0] : type; + + var isStringLike = false; + + IJsonConverter converter; + + var jsonConverterAttribute = type.GetCustomAttribute(); + + if (jsonConverterAttribute != null) + { + converter = jsonConverterAttribute.Converter; + } + else if (nonNullType.IsEnum) + { + converter = new EnumConverter(nonNullType); + } + else if (JsonConverterFactory.Instances.TryGetValue(nonNullType, out converter)) + { + } + else if (StringLikeHelper.IsStringLike(nonNullType)) + { + isStringLike = true; + + converter = new StringLikeConverter(nonNullType); + } + + return new TypeDetails(nonNullType) { + NonNullType = nonNullType, + DefaultValue = type.IsValueType ? Activator.CreateInstance(type) : null, + IsNullable = isNullable, + IsList = isList, + IsStringLike = isStringLike, + ElementType = elementType, + JsonConverter = converter + }; + } + + #endregion + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Helpers/XHelper.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Helpers/XHelper.cs new file mode 100644 index 000000000000..94ec1a63568e --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Helpers/XHelper.cs @@ -0,0 +1,75 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + internal static class XHelper + { + internal static JsonNode Create(JsonType type, TypeCode code, object value) + { + switch (type) + { + case JsonType.Binary : return new XBinary((byte[])value); + case JsonType.Boolean : return new JsonBoolean((bool)value); + case JsonType.Number : return new JsonNumber(value.ToString()); + case JsonType.String : return new JsonString((string)value); + } + + throw new Exception($"JsonType '{type}' does not have a fast conversion"); + } + + internal static bool TryGetElementType(TypeCode code, out JsonType type) + { + switch (code) + { + case TypeCode.Boolean : type = JsonType.Boolean; return true; + case TypeCode.Byte : type = JsonType.Number; return true; + case TypeCode.DateTime : type = JsonType.Date; return true; + case TypeCode.Decimal : type = JsonType.Number; return true; + case TypeCode.Double : type = JsonType.Number; return true; + case TypeCode.Empty : type = JsonType.Null; return true; + case TypeCode.Int16 : type = JsonType.Number; return true; + case TypeCode.Int32 : type = JsonType.Number; return true; + case TypeCode.Int64 : type = JsonType.Number; return true; + case TypeCode.SByte : type = JsonType.Number; return true; + case TypeCode.Single : type = JsonType.Number; return true; + case TypeCode.String : type = JsonType.String; return true; + case TypeCode.UInt16 : type = JsonType.Number; return true; + case TypeCode.UInt32 : type = JsonType.Number; return true; + case TypeCode.UInt64 : type = JsonType.Number; return true; + } + + type = default; + + return false; + } + + internal static JsonType GetElementType(TypeCode code) + { + switch (code) + { + case TypeCode.Boolean : return JsonType.Boolean; + case TypeCode.Byte : return JsonType.Number; + case TypeCode.DateTime : return JsonType.Date; + case TypeCode.Decimal : return JsonType.Number; + case TypeCode.Double : return JsonType.Number; + case TypeCode.Empty : return JsonType.Null; + case TypeCode.Int16 : return JsonType.Number; + case TypeCode.Int32 : return JsonType.Number; + case TypeCode.Int64 : return JsonType.Number; + case TypeCode.SByte : return JsonType.Number; + case TypeCode.Single : return JsonType.Number; + case TypeCode.String : return JsonType.String; + case TypeCode.UInt16 : return JsonType.Number; + case TypeCode.UInt32 : return JsonType.Number; + case TypeCode.UInt64 : return JsonType.Number; + default : return JsonType.Object; + } + + throw new Exception($"TypeCode '{code}' does not have a fast converter"); + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/HttpPipeline.cs b/src/Sphere/Sphere.Autorest/generated/runtime/HttpPipeline.cs new file mode 100644 index 000000000000..70e7e20a126d --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/HttpPipeline.cs @@ -0,0 +1,88 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime +{ + using System.Net.Http; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + using System.Collections; + using System.Linq; + + using GetEventData = System.Func; + using NextDelegate = System.Func, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>; + + using SignalDelegate = System.Func, System.Threading.Tasks.Task>; + using GetParameterDelegate = System.Func, string, object>; + using SendAsyncStepDelegate = System.Func, System.Threading.Tasks.Task>, System.Func, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>; + using PipelineChangeDelegate = System.Action, System.Threading.Tasks.Task>, System.Func, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>>; + using ModuleLoadPipelineDelegate = System.Action, System.Threading.Tasks.Task>, System.Func, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>>, System.Action, System.Threading.Tasks.Task>, System.Func, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>>>; + using NewRequestPipelineDelegate = System.Action, System.Action, System.Threading.Tasks.Task>, System.Func, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>>, System.Action, System.Threading.Tasks.Task>, System.Func, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>>>; + +/* + public class DelegateBasedEventListener : IEventListener + { + private EventListenerDelegate _listener; + public DelegateBasedEventListener(EventListenerDelegate listener) + { + _listener = listener; + } + public CancellationToken Token => CancellationToken.None; + public System.Action Cancel => () => { }; + + + public Task Signal(string id, CancellationToken token, GetEventData createMessage) + { + return _listener(id, token, () => createMessage()); + } + } +*/ + /// + /// This is a necessary extension to the SendAsyncFactory to support the 'generic' delegate format. + /// + public partial class SendAsyncFactory + { + /// + /// This translates a generic-defined delegate for a listener into one that fits our ISendAsync pattern. + /// (Provided to support out-of-module delegation for Azure Cmdlets) + /// + /// The Pipeline Step as a delegate + public SendAsyncFactory(SendAsyncStepDelegate step) => this.implementation = (request, listener, next) => + step( + request, + listener.Token, + listener.Cancel, + (id, token, getEventData) => listener.Signal(id, token, () => { + var data = EventDataConverter.ConvertFrom( getEventData() ) as EventData; + data.Id = id; + data.Cancel = listener.Cancel; + data.RequestMessage = request; + return data; + }), + (req, token, cancel, listenerDelegate) => next.SendAsync(req, listener)); + } + + public partial class HttpPipeline : ISendAsync + { + public HttpPipeline Append(SendAsyncStepDelegate item) + { + if (item != null) + { + Append(new SendAsyncFactory(item)); + } + return this; + } + + public HttpPipeline Prepend(SendAsyncStepDelegate item) + { + if (item != null) + { + Prepend(new SendAsyncFactory(item)); + } + return this; + } + } +} diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/HttpPipelineMocking.ps1 b/src/Sphere/Sphere.Autorest/generated/runtime/HttpPipelineMocking.ps1 new file mode 100644 index 000000000000..05ddc066c33c --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/HttpPipelineMocking.ps1 @@ -0,0 +1,110 @@ +$ErrorActionPreference = "Stop" + +# get the recording path +if (-not $TestRecordingFile) { + $TestRecordingFile = Join-Path $PSScriptRoot 'recording.json' +} + +# create the Http Pipeline Recorder +$Mock = New-Object -Type Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock $TestRecordingFile + +# set the recorder to the appropriate mode (default to 'live') +Write-Host -ForegroundColor Green "Running '$TestMode' mode..." +switch ($TestMode) { + 'record' { + Write-Host -ForegroundColor Green "Recording to $TestRecordingFile" + $Mock.SetRecord() + $null = erase -ea 0 $TestRecordingFile + } + 'playback' { + if (-not (Test-Path $TestRecordingFile)) { + Write-Host -fore:yellow "Recording file '$TestRecordingFile' is not present. Tests expecting recorded responses will fail" + } else { + Write-Host -ForegroundColor Green "Using recording $TestRecordingFile" + } + $Mock.SetPlayback() + $Mock.ForceResponseHeaders["Retry-After"] = "0"; + } + default: { + $Mock.SetLive() + } +} + +# overrides for Pester Describe/Context/It + +function Describe( + [Parameter(Mandatory = $true, Position = 0)] + [string] $Name, + + [Alias('Tags')] + [string[]] $Tag = @(), + + [Parameter(Position = 1)] + [ValidateNotNull()] + [ScriptBlock] $Fixture = $(Throw "No test script block is provided. (Have you put the open curly brace on the next line?)") +) { + $Mock.PushDescription($Name) + try { + return pester\Describe -Name $Name -Tag $Tag -Fixture $fixture + } + finally { + $Mock.PopDescription() + } +} + +function Context( + [Parameter(Mandatory = $true, Position = 0)] + [string] $Name, + + [Alias('Tags')] + [string[]] $Tag = @(), + + [Parameter(Position = 1)] + [ValidateNotNull()] + [ScriptBlock] $Fixture = $(Throw "No test script block is provided. (Have you put the open curly brace on the next line?)") +) { + $Mock.PushContext($Name) + try { + return pester\Context -Name $Name -Tag $Tag -Fixture $fixture + } + finally { + $Mock.PopContext() + } +} + +function It { + [CmdletBinding(DefaultParameterSetName = 'Normal')] + param( + [Parameter(Mandatory = $true, Position = 0)] + [string]$Name, + + [Parameter(Position = 1)] + [ScriptBlock] $Test = { }, + + [System.Collections.IDictionary[]] $TestCases, + + [Parameter(ParameterSetName = 'Pending')] + [Switch] $Pending, + + [Parameter(ParameterSetName = 'Skip')] + [Alias('Ignore')] + [Switch] $Skip + ) + $Mock.PushScenario($Name) + + try { + if ($skip) { + return pester\It -Name $Name -Test $Test -TestCases $TestCases -Skip + } + if ($pending) { + return pester\It -Name $Name -Test $Test -TestCases $TestCases -Pending + } + return pester\It -Name $Name -Test $Test -TestCases $TestCases + } + finally { + $null = $Mock.PopScenario() + } +} + +# set the HttpPipelineAppend for all the cmdlets +$PSDefaultParameterValues["*:HttpPipelinePrepend"] = $Mock diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/IAssociativeArray.cs b/src/Sphere/Sphere.Autorest/generated/runtime/IAssociativeArray.cs new file mode 100644 index 000000000000..3c68be32e4f7 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/IAssociativeArray.cs @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +#define DICT_PROPERTIES +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime +{ + /// A subset of IDictionary that doesn't implement IEnumerable or IDictionary to work around PowerShell's aggressive formatter + public interface IAssociativeArray + { +#if DICT_PROPERTIES + System.Collections.Generic.IEnumerable Keys { get; } + System.Collections.Generic.IEnumerable Values { get; } + int Count { get; } +#endif + System.Collections.Generic.IDictionary AdditionalProperties { get; } + T this[string index] { get; set; } + void Add(string key, T value); + bool ContainsKey(string key); + bool Remove(string key); + bool TryGetValue(string key, out T value); + void Clear(); + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/IHeaderSerializable.cs b/src/Sphere/Sphere.Autorest/generated/runtime/IHeaderSerializable.cs new file mode 100644 index 000000000000..4eae27d8e078 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/IHeaderSerializable.cs @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime +{ + public interface IHeaderSerializable + { + void ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers); + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/ISendAsync.cs b/src/Sphere/Sphere.Autorest/generated/runtime/ISendAsync.cs new file mode 100644 index 000000000000..c061fdf797b9 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/ISendAsync.cs @@ -0,0 +1,413 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime +{ + using System.Net.Http; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + using System.Collections; + using System.Linq; + using System; + + + /// + /// The interface for sending an HTTP request across the wire. + /// + public interface ISendAsync + { + Task SendAsync(HttpRequestMessage request, IEventListener callback); + } + + public class SendAsyncTerminalFactory : ISendAsyncTerminalFactory, ISendAsync + { + SendAsync implementation; + + public SendAsyncTerminalFactory(SendAsync implementation) => this.implementation = implementation; + public SendAsyncTerminalFactory(ISendAsync implementation) => this.implementation = implementation.SendAsync; + public ISendAsync Create() => this; + public Task SendAsync(HttpRequestMessage request, IEventListener callback) => implementation(request, callback); + } + + public partial class SendAsyncFactory : ISendAsyncFactory + { + public class Sender : ISendAsync + { + internal ISendAsync next; + internal SendAsyncStep implementation; + + public Task SendAsync(HttpRequestMessage request, IEventListener callback) => implementation(request, callback, next); + } + SendAsyncStep implementation; + + public SendAsyncFactory(SendAsyncStep implementation) => this.implementation = implementation; + public ISendAsync Create(ISendAsync next) => new Sender { next = next, implementation = implementation }; + + } + + public class HttpClientFactory : ISendAsyncTerminalFactory, ISendAsync + { + HttpClient client; + public HttpClientFactory() : this(new HttpClient()) + { + } + public HttpClientFactory(HttpClient client) => this.client = client; + public ISendAsync Create() => this; + + public Task SendAsync(HttpRequestMessage request, IEventListener callback) => client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead, callback.Token); + } + + public interface ISendAsyncFactory + { + ISendAsync Create(ISendAsync next); + } + + public interface ISendAsyncTerminalFactory + { + ISendAsync Create(); + } + + public partial class HttpPipeline : ISendAsync + { + private const int DefaultMaxRetry = 3; + private ISendAsync pipeline; + private ISendAsyncTerminalFactory terminal; + private List steps = new List(); + + public HttpPipeline() : this(new HttpClientFactory()) + { + } + + public HttpPipeline(ISendAsyncTerminalFactory terminalStep) + { + if (terminalStep == null) + { + throw new System.ArgumentNullException(nameof(terminalStep), "Terminal Step Factory in HttpPipeline may not be null"); + } + TerminalFactory = terminalStep; + } + + /// + /// Returns an HttpPipeline with the current state of this pipeline. + /// + public HttpPipeline Clone() => new HttpPipeline(terminal) { steps = this.steps.ToList(), pipeline = this.pipeline }; + + private bool shouldRetry429(HttpResponseMessage response) + { + if (response.StatusCode == (System.Net.HttpStatusCode)429) + { + var retryAfter = response.Headers.RetryAfter; + if (retryAfter != null && retryAfter.Delta.HasValue) + { + return true; + } + } + return false; + } + /// + /// The step to handle 429 response with retry-after header. + /// + public async Task Retry429(HttpRequestMessage request, IEventListener callback, ISendAsync next) + { + int retryCount = int.MaxValue; + + try + { + try + { + retryCount = int.Parse(System.Environment.GetEnvironmentVariable("PS_HTTP_MAX_RETRIES_FOR_429")); + } + finally + { + retryCount = int.Parse(System.Environment.GetEnvironmentVariable("AZURE_PS_HTTP_MAX_RETRIES_FOR_429")); + } + } + catch (System.Exception) + { + //no action + } + var cloneRequest = await request.CloneWithContent(); + var response = await next.SendAsync(request, callback); + int count = 0; + while (shouldRetry429(response) && count++ < retryCount) + { + request = await cloneRequest.CloneWithContent(); + var retryAfter = response.Headers.RetryAfter; + await Task.Delay(retryAfter.Delta.Value, callback.Token); + await callback.Signal("Debug", $"Start to retry {count} time(s) on status code 429 after waiting {retryAfter.Delta.Value.TotalSeconds} seconds."); + response = await next.SendAsync(request, callback); + } + return response; + } + + private bool shouldRetryError(HttpResponseMessage response) + { + if (response.StatusCode >= System.Net.HttpStatusCode.InternalServerError) + { + if (response.StatusCode != System.Net.HttpStatusCode.NotImplemented && + response.StatusCode != System.Net.HttpStatusCode.HttpVersionNotSupported) + { + return true; + } + } + else if (response.StatusCode == System.Net.HttpStatusCode.RequestTimeout) + { + return true; + } + else if (response.StatusCode == (System.Net.HttpStatusCode)429 && response.Headers.RetryAfter == null) + { + return true; + } + return false; + } + + /// + /// Returns true if status code in HttpRequestExceptionWithStatus exception is greater + /// than or equal to 500 and not NotImplemented (501) or HttpVersionNotSupported (505). + /// Or it's 429 (TOO MANY REQUESTS) without Retry-After header. + /// + public async Task RetryError(HttpRequestMessage request, IEventListener callback, ISendAsync next) + { + int retryCount = DefaultMaxRetry; + + try + { + try + { + retryCount = int.Parse(System.Environment.GetEnvironmentVariable("PS_HTTP_MAX_RETRIES")); + } + finally + { + retryCount = int.Parse(System.Environment.GetEnvironmentVariable("AZURE_PS_HTTP_MAX_RETRIES")); + } + } + catch (System.Exception) + { + //no action + } + var cloneRequest = await request.CloneWithContent(); + var response = await next.SendAsync(request, callback); + int count = 0; + while (shouldRetryError(response) && count++ < retryCount) + { + await callback.Signal("Debug", $"Start to retry {count} time(s) on status code {response.StatusCode}"); + request = await cloneRequest.CloneWithContent(); + response = await next.SendAsync(request, callback); + } + return response; + } + + public ISendAsyncTerminalFactory TerminalFactory + { + get => terminal; + set + { + if (value == null) + { + throw new System.ArgumentNullException("TerminalFactory in HttpPipeline may not be null"); + } + terminal = value; + } + } + + public ISendAsync Pipeline + { + get + { + // if the pipeline has been created and not invalidated, return it. + if (this.pipeline != null) + { + return this.pipeline; + } + + // create the pipeline from scratch. + var next = terminal.Create(); + if (Convert.ToBoolean(@"true")) + { + next = (new SendAsyncFactory(Retry429)).Create(next) ?? next; + next = (new SendAsyncFactory(RetryError)).Create(next) ?? next; + } + foreach (var factory in steps) + { + // skip factories that return null. + next = factory.Create(next) ?? next; + } + return this.pipeline = next; + } + } + + public int Count => steps.Count; + + public HttpPipeline Prepend(ISendAsyncFactory item) + { + if (item != null) + { + steps.Add(item); + pipeline = null; + } + return this; + } + + public HttpPipeline Append(SendAsyncStep item) + { + if (item != null) + { + Append(new SendAsyncFactory(item)); + } + return this; + } + + public HttpPipeline Prepend(SendAsyncStep item) + { + if (item != null) + { + Prepend(new SendAsyncFactory(item)); + } + return this; + } + public HttpPipeline Append(IEnumerable items) + { + if (items != null) + { + foreach (var item in items) + { + Append(new SendAsyncFactory(item)); + } + } + return this; + } + + public HttpPipeline Prepend(IEnumerable items) + { + if (items != null) + { + foreach (var item in items) + { + Prepend(new SendAsyncFactory(item)); + } + } + return this; + } + + public HttpPipeline Append(ISendAsyncFactory item) + { + if (item != null) + { + steps.Insert(0, item); + pipeline = null; + } + return this; + } + public HttpPipeline Prepend(IEnumerable items) + { + if (items != null) + { + foreach (var item in items) + { + Prepend(item); + } + } + return this; + } + + public HttpPipeline Append(IEnumerable items) + { + if (items != null) + { + foreach (var item in items) + { + Append(item); + } + } + return this; + } + + // you can use this as the ISendAsync Implementation + public Task SendAsync(HttpRequestMessage request, IEventListener callback) => Pipeline.SendAsync(request, callback); + } + + internal static partial class Extensions + { + internal static HttpRequestMessage CloneAndDispose(this HttpRequestMessage original, System.Uri requestUri = null, System.Net.Http.HttpMethod method = null) + { + using (original) + { + return original.Clone(requestUri, method); + } + } + + internal static Task CloneWithContentAndDispose(this HttpRequestMessage original, System.Uri requestUri = null, System.Net.Http.HttpMethod method = null) + { + using (original) + { + return original.CloneWithContent(requestUri, method); + } + } + + /// + /// Clones an HttpRequestMessage (without the content) + /// + /// Original HttpRequestMessage (Will be diposed before returning) + /// + /// + /// A clone of the HttpRequestMessage + internal static HttpRequestMessage Clone(this HttpRequestMessage original, System.Uri requestUri = null, System.Net.Http.HttpMethod method = null) + { + var clone = new HttpRequestMessage + { + Method = method ?? original.Method, + RequestUri = requestUri ?? original.RequestUri, + Version = original.Version, + }; + + foreach (KeyValuePair prop in original.Properties) + { + clone.Properties.Add(prop); + } + + foreach (KeyValuePair> header in original.Headers) + { + /* + **temporarily skip cloning telemetry related headers** + clone.Headers.TryAddWithoutValidation(header.Key, header.Value); + */ + if (!"x-ms-unique-id".Equals(header.Key) && !"x-ms-client-request-id".Equals(header.Key) && !"CommandName".Equals(header.Key) && !"FullCommandName".Equals(header.Key) && !"ParameterSetName".Equals(header.Key) && !"User-Agent".Equals(header.Key)) + { + clone.Headers.TryAddWithoutValidation(header.Key, header.Value); + } + } + + return clone; + } + + /// + /// Clones an HttpRequestMessage (including the content stream and content headers) + /// + /// Original HttpRequestMessage (Will be diposed before returning) + /// + /// + /// A clone of the HttpRequestMessage + internal static async Task CloneWithContent(this HttpRequestMessage original, System.Uri requestUri = null, System.Net.Http.HttpMethod method = null) + { + var clone = original.Clone(requestUri, method); + var stream = new System.IO.MemoryStream(); + if (original.Content != null) + { + await original.Content.CopyToAsync(stream).ConfigureAwait(false); + stream.Position = 0; + clone.Content = new StreamContent(stream); + if (original.Content.Headers != null) + { + foreach (var h in original.Content.Headers) + { + clone.Content.Headers.Add(h.Key, h.Value); + } + } + } + return clone; + } + } +} diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/InfoAttribute.cs b/src/Sphere/Sphere.Autorest/generated/runtime/InfoAttribute.cs new file mode 100644 index 000000000000..dd0420ee8be3 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/InfoAttribute.cs @@ -0,0 +1,38 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime +{ + using System; + + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Class)] + public class InfoAttribute : Attribute + { + public bool Required { get; set; } = false; + public bool ReadOnly { get; set; } = false; + public bool Read { get; set; } = true; + public bool Create { get; set; } = true; + public bool Update { get; set; } = true; + public Type[] PossibleTypes { get; set; } = new Type[0]; + public string Description { get; set; } = ""; + public string SerializedName { get; set; } = ""; + } + + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] + public class CompleterInfoAttribute : Attribute + { + public string Script { get; set; } = ""; + public string Name { get; set; } = ""; + public string Description { get; set; } = ""; + } + + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] + public class DefaultInfoAttribute : Attribute + { + public string Script { get; set; } = ""; + public string Name { get; set; } = ""; + public string Description { get; set; } = ""; + public string SetCondition { get; set; } = ""; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/InputHandler.cs b/src/Sphere/Sphere.Autorest/generated/runtime/InputHandler.cs new file mode 100644 index 000000000000..f5db0e407e9e --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/InputHandler.cs @@ -0,0 +1,22 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +using System; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Cmdlets +{ + public abstract class InputHandler + { + protected InputHandler NextHandler = null; + + public void SetNextHandler(InputHandler nextHandler) + { + this.NextHandler = nextHandler; + } + + public abstract void Process(Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.IContext context); + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Iso/IsoDate.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Iso/IsoDate.cs new file mode 100644 index 000000000000..fc771885e249 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Iso/IsoDate.cs @@ -0,0 +1,214 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Text; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + internal struct IsoDate + { + internal int Year { get; set; } // 0-3000 + + internal int Month { get; set; } // 1-12 + + internal int Day { get; set; } // 1-31 + + internal int Hour { get; set; } // 0-24 + + internal int Minute { get; set; } // 0-60 (60 is a special case) + + internal int Second { get; set; } // 0-60 (60 is used for leap seconds) + + internal double Millisecond { get; set; } // 0-999.9... + + internal TimeSpan Offset { get; set; } + + internal DateTimeKind Kind { get; set; } + + internal TimeSpan TimeOfDay => new TimeSpan(Hour, Minute, Second); + + internal DateTime ToDateTime() + { + if (Kind == DateTimeKind.Utc || Offset == TimeSpan.Zero) + { + return new DateTime(Year, Month, Day, Hour, Minute, Second, (int)Millisecond, DateTimeKind.Utc); + } + + return ToDateTimeOffset().DateTime; + } + + internal DateTimeOffset ToDateTimeOffset() + { + return new DateTimeOffset( + Year, + Month, + Day, + Hour, + Minute, + Second, + (int)Millisecond, + Offset + ); + } + + internal DateTime ToUtcDateTime() + { + return ToDateTimeOffset().UtcDateTime; + } + + public override string ToString() + { + var sb = new StringBuilder(); + + // yyyy-MM-dd + sb.Append($"{Year}-{Month:00}-{Day:00}"); + + if (TimeOfDay > new TimeSpan(0)) + { + sb.Append($"T{Hour:00}:{Minute:00}"); + + if (TimeOfDay.Seconds > 0) + { + sb.Append($":{Second:00}"); + } + } + + if (Offset.Ticks == 0) + { + sb.Append('Z'); // UTC + } + else + { + if (Offset.Ticks >= 0) + { + sb.Append('+'); + } + + sb.Append($"{Offset.Hours:00}:{Offset.Minutes:00}"); + } + + return sb.ToString(); + } + + internal static IsoDate FromDateTimeOffset(DateTimeOffset date) + { + return new IsoDate { + Year = date.Year, + Month = date.Month, + Day = date.Day, + Hour = date.Hour, + Minute = date.Minute, + Second = date.Second, + Offset = date.Offset, + Kind = date.Offset == TimeSpan.Zero ? DateTimeKind.Utc : DateTimeKind.Unspecified + }; + } + + private static readonly char[] timeSeperators = { ':', '.' }; + + internal static IsoDate Parse(string text) + { + var tzIndex = -1; + var timeIndex = text.IndexOf('T'); + + var builder = new IsoDate { Day = 1, Month = 1 }; + + // TODO: strip the time zone offset off the end + string dateTime = text; + string timeZone = null; + + if (dateTime.IndexOf('Z') > -1) + { + tzIndex = dateTime.LastIndexOf('Z'); + + builder.Kind = DateTimeKind.Utc; + } + else if (dateTime.LastIndexOf('+') > 10) + { + tzIndex = dateTime.LastIndexOf('+'); + } + else if (dateTime.LastIndexOf('-') > 10) + { + tzIndex = dateTime.LastIndexOf('-'); + } + + if (tzIndex > -1) + { + timeZone = dateTime.Substring(tzIndex); + dateTime = dateTime.Substring(0, tzIndex); + } + + string date = (timeIndex == -1) ? dateTime : dateTime.Substring(0, timeIndex); + + var dateParts = date.Split(Seperator.Dash); // '-' + + for (int i = 0; i < dateParts.Length; i++) + { + var part = dateParts[i]; + + switch (i) + { + case 0: builder.Year = int.Parse(part); break; + case 1: builder.Month = int.Parse(part); break; + case 2: builder.Day = int.Parse(part); break; + } + } + + if (timeIndex > -1) + { + string[] timeParts = dateTime.Substring(timeIndex + 1).Split(timeSeperators); + + for (int i = 0; i < timeParts.Length; i++) + { + var part = timeParts[i]; + + switch (i) + { + case 0: builder.Hour = int.Parse(part); break; + case 1: builder.Minute = int.Parse(part); break; + case 2: builder.Second = int.Parse(part); break; + case 3: builder.Millisecond = double.Parse("0." + part) * 1000; break; + } + } + } + + if (timeZone != null && timeZone != "Z") + { + var hours = int.Parse(timeZone.Substring(1, 2)); + var minutes = int.Parse(timeZone.Substring(4, 2)); + + if (timeZone[0] == '-') + { + hours = -hours; + minutes = -minutes; + } + + builder.Offset = new TimeSpan(hours, minutes, 0); + } + + return builder; + } + } + + /* + YYYY # eg 1997 + YYYY-MM # eg 1997-07 + YYYY-MM-DD # eg 1997-07-16 + YYYY-MM-DDThh:mmTZD # eg 1997-07-16T19:20+01:00 + YYYY-MM-DDThh:mm:ssTZD # eg 1997-07-16T19:20:30+01:00 + YYYY-MM-DDThh:mm:ss.sTZD # eg 1997-07-16T19:20:30.45+01:00 + + where: + + YYYY = four-digit year + MM = two-digit month (01=January, etc.) + DD = two-digit day of month (01 through 31) + hh = two digits of hour (00 through 23) (am/pm NOT allowed) + mm = two digits of minute (00 through 59) + ss = two digits of second (00 through 59) + s = one or more digits representing a decimal fraction of a second + TZD = time zone designator (Z or +hh:mm or -hh:mm) + */ +} diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/JsonType.cs b/src/Sphere/Sphere.Autorest/generated/runtime/JsonType.cs new file mode 100644 index 000000000000..028322f04a30 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/JsonType.cs @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + internal enum JsonType + { + Null = 0, + Object = 1, + Array = 2, + Binary = 3, + Boolean = 4, + Date = 5, + Number = 6, + String = 7 + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/MessageAttribute.cs b/src/Sphere/Sphere.Autorest/generated/runtime/MessageAttribute.cs new file mode 100644 index 000000000000..0aea2cb4f32c --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/MessageAttribute.cs @@ -0,0 +1,350 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.generated.runtime.Properties; + using System; + using System.Collections.Generic; + using System.Globalization; + using System.Linq; + using System.Management.Automation; + using System.Text; + + [AttributeUsage(AttributeTargets.All)] + public class GenericBreakingChangeAttribute : Attribute + { + private string _message; + //A dexcription of what the change is about, non mandatory + public string ChangeDescription { get; set; } = null; + + //The version the change is effective from, non mandatory + public string DeprecateByVersion { get; } + public string DeprecateByAzVersion { get; } + + //The date on which the change comes in effect + public DateTime ChangeInEfectByDate { get; } + public bool ChangeInEfectByDateSet { get; } = false; + + //Old way of calling the cmdlet + public string OldWay { get; set; } + //New way fo calling the cmdlet + public string NewWay { get; set; } + + public GenericBreakingChangeAttribute(string message, string deprecateByAzVersion, string deprecateByVersion) + { + _message = message; + this.DeprecateByAzVersion = deprecateByAzVersion; + this.DeprecateByVersion = deprecateByVersion; + } + + public GenericBreakingChangeAttribute(string message, string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) + { + _message = message; + this.DeprecateByVersion = deprecateByVersion; + this.DeprecateByAzVersion = deprecateByAzVersion; + + if (DateTime.TryParse(changeInEfectByDate, new CultureInfo("en-US"), DateTimeStyles.None, out DateTime result)) + { + this.ChangeInEfectByDate = result; + this.ChangeInEfectByDateSet = true; + } + } + + public DateTime getInEffectByDate() + { + return this.ChangeInEfectByDate.Date; + } + + + /** + * This function prints out the breaking change message for the attribute on the cmdline + * */ + public void PrintCustomAttributeInfo(Action writeOutput) + { + + if (!GetAttributeSpecificMessage().StartsWith(Environment.NewLine)) + { + writeOutput(Environment.NewLine); + } + writeOutput(string.Format(Resources.BreakingChangesAttributesDeclarationMessage, GetAttributeSpecificMessage())); + + + if (!string.IsNullOrWhiteSpace(ChangeDescription)) + { + writeOutput(string.Format(Resources.BreakingChangesAttributesChangeDescriptionMessage, this.ChangeDescription)); + } + + if (ChangeInEfectByDateSet) + { + writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByDateMessage, this.ChangeInEfectByDate.ToString("d"))); + } + + writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByAzVersion, this.DeprecateByAzVersion)); + writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByVersion, this.DeprecateByVersion)); + + if (OldWay != null && NewWay != null) + { + writeOutput(string.Format(Resources.BreakingChangesAttributesUsageChangeMessageConsole, OldWay, NewWay)); + } + } + + public virtual bool IsApplicableToInvocation(InvocationInfo invocation) + { + return true; + } + + protected virtual string GetAttributeSpecificMessage() + { + return _message; + } + } + + [AttributeUsage(AttributeTargets.All)] + public class CmdletBreakingChangeAttribute : GenericBreakingChangeAttribute + { + + public string ReplacementCmdletName { get; set; } + + public CmdletBreakingChangeAttribute(string deprecateByAzVersion, string deprecateByVersion) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion) + { + } + + public CmdletBreakingChangeAttribute(string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion, changeInEfectByDate) + { + } + + protected override string GetAttributeSpecificMessage() + { + if (string.IsNullOrWhiteSpace(ReplacementCmdletName)) + { + return Resources.BreakingChangesAttributesCmdLetDeprecationMessageNoReplacement; + } + else + { + return string.Format(Resources.BreakingChangesAttributesCmdLetDeprecationMessageWithReplacement, ReplacementCmdletName); + } + } + } + + [AttributeUsage(AttributeTargets.All)] + public class ParameterSetBreakingChangeAttribute : GenericBreakingChangeAttribute + { + public string[] ChangedParameterSet { set; get; } + + public ParameterSetBreakingChangeAttribute(string[] changedParameterSet, string deprecateByAzVersion, string deprecateByVersion) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion) + { + ChangedParameterSet = changedParameterSet; + } + + public ParameterSetBreakingChangeAttribute(string[] changedParameterSet, string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion, changeInEfectByDate) + { + ChangedParameterSet = changedParameterSet; + } + + protected override string GetAttributeSpecificMessage() + { + + return Resources.BreakingChangesAttributesParameterSetDeprecationMessageNoReplacement; + + } + + public bool IsApplicableToInvocation(InvocationInfo invocation, string parameterSetName) + { + if (ChangedParameterSet != null) + return ChangedParameterSet.Contains(parameterSetName); + return false; + } + + } + + [AttributeUsage(AttributeTargets.All)] + public class PreviewMessageAttribute : Attribute + { + public string _message; + + public DateTime EstimatedGaDate { get; } + + public bool IsEstimatedGaDateSet { get; } = false; + + + public PreviewMessageAttribute() + { + this._message = Resources.PreviewCmdletMessage; + } + + public PreviewMessageAttribute(string message) + { + this._message = string.IsNullOrEmpty(message) ? Resources.PreviewCmdletMessage : message; + } + + public PreviewMessageAttribute(string message, string estimatedDateOfGa) : this(message) + { + if (DateTime.TryParse(estimatedDateOfGa, new CultureInfo("en-US"), DateTimeStyles.None, out DateTime result)) + { + this.EstimatedGaDate = result; + this.IsEstimatedGaDateSet = true; + } + } + + public void PrintCustomAttributeInfo(Action writeOutput) + { + writeOutput(this._message); + + if (IsEstimatedGaDateSet) + { + writeOutput(string.Format(Resources.PreviewCmdletETAMessage, this.EstimatedGaDate.ToShortDateString())); + } + } + + public virtual bool IsApplicableToInvocation(InvocationInfo invocation) + { + return true; + } + } + + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] + public class ParameterBreakingChangeAttribute : GenericBreakingChangeAttribute + { + public string NameOfParameterChanging { get; } + + public string ReplaceMentCmdletParameterName { get; set; } = null; + + public bool IsBecomingMandatory { get; set; } = false; + + public String OldParamaterType { get; set; } + + public String NewParameterType { get; set; } + + public ParameterBreakingChangeAttribute(string nameOfParameterChanging, string deprecateByAzVersion, string deprecateByVersion) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion) + { + this.NameOfParameterChanging = nameOfParameterChanging; + } + + public ParameterBreakingChangeAttribute(string nameOfParameterChanging, string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion, changeInEfectByDate) + { + this.NameOfParameterChanging = nameOfParameterChanging; + } + + protected override string GetAttributeSpecificMessage() + { + StringBuilder message = new StringBuilder(); + if (!string.IsNullOrWhiteSpace(ReplaceMentCmdletParameterName)) + { + if (IsBecomingMandatory) + { + message.Append(string.Format(Resources.BreakingChangeAttributeParameterReplacedMandatory, NameOfParameterChanging, ReplaceMentCmdletParameterName)); + } + else + { + message.Append(string.Format(Resources.BreakingChangeAttributeParameterReplaced, NameOfParameterChanging, ReplaceMentCmdletParameterName)); + } + } + else + { + if (IsBecomingMandatory) + { + message.Append(string.Format(Resources.BreakingChangeAttributeParameterMandatoryNow, NameOfParameterChanging)); + } + else + { + message.Append(string.Format(Resources.BreakingChangeAttributeParameterChanging, NameOfParameterChanging)); + } + } + + //See if the type of the param is changing + if (OldParamaterType != null && !string.IsNullOrWhiteSpace(NewParameterType)) + { + message.Append(string.Format(Resources.BreakingChangeAttributeParameterTypeChange, OldParamaterType, NewParameterType)); + } + return message.ToString(); + } + + /// + /// See if the bound parameters contain the current parameter, if they do + /// then the attribbute is applicable + /// If the invocationInfo is null we return true + /// + /// + /// bool + public override bool IsApplicableToInvocation(InvocationInfo invocationInfo) + { + bool? applicable = invocationInfo == null ? true : invocationInfo.BoundParameters?.Keys?.Contains(this.NameOfParameterChanging); + return applicable.HasValue ? applicable.Value : false; + } + } + + [AttributeUsage(AttributeTargets.All)] + public class OutputBreakingChangeAttribute : GenericBreakingChangeAttribute + { + public string DeprecatedCmdLetOutputType { get; } + + //This is still a String instead of a Type as this + //might be undefined at the time of adding the attribute + public string ReplacementCmdletOutputType { get; set; } + + public string[] DeprecatedOutputProperties { get; set; } + + public string[] NewOutputProperties { get; set; } + + public OutputBreakingChangeAttribute(string deprecatedCmdletOutputType, string deprecateByAzVersion, string deprecateByVersion) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion) + { + this.DeprecatedCmdLetOutputType = deprecatedCmdletOutputType; + } + + public OutputBreakingChangeAttribute(string deprecatedCmdletOutputType, string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion, changeInEfectByDate) + { + this.DeprecatedCmdLetOutputType = deprecatedCmdletOutputType; + } + + protected override string GetAttributeSpecificMessage() + { + StringBuilder message = new StringBuilder(); + + //check for the deprecation scenario + if (string.IsNullOrWhiteSpace(ReplacementCmdletOutputType) && NewOutputProperties == null && DeprecatedOutputProperties == null && string.IsNullOrWhiteSpace(ChangeDescription)) + { + message.Append(string.Format(Resources.BreakingChangesAttributesCmdLetOutputTypeDeprecated, DeprecatedCmdLetOutputType)); + } + else + { + if (!string.IsNullOrWhiteSpace(ReplacementCmdletOutputType)) + { + message.Append(string.Format(Resources.BreakingChangesAttributesCmdLetOutputChange1, DeprecatedCmdLetOutputType, ReplacementCmdletOutputType)); + } + else + { + message.Append(string.Format(Resources.BreakingChangesAttributesCmdLetOutputChange2, DeprecatedCmdLetOutputType)); + } + + if (DeprecatedOutputProperties != null && DeprecatedOutputProperties.Length > 0) + { + message.Append(Resources.BreakingChangesAttributesCmdLetOutputPropertiesRemoved); + foreach (string property in DeprecatedOutputProperties) + { + message.Append(" '" + property + "'"); + } + } + + if (NewOutputProperties != null && NewOutputProperties.Length > 0) + { + message.Append(Resources.BreakingChangesAttributesCmdLetOutputPropertiesAdded); + foreach (string property in NewOutputProperties) + { + message.Append(" '" + property + "'"); + } + } + } + return message.ToString(); + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/MessageAttributeHelper.cs b/src/Sphere/Sphere.Autorest/generated/runtime/MessageAttributeHelper.cs new file mode 100644 index 000000000000..700093b6d7b8 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/MessageAttributeHelper.cs @@ -0,0 +1,184 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime +{ + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.generated.runtime.Properties; + using System; + using System.Collections.Generic; + using System.Linq; + using System.Management.Automation; + using System.Reflection; + using System.Text; + using System.Threading.Tasks; + public class MessageAttributeHelper + { + private static readonly bool IsAzure = Convert.ToBoolean(@"true"); + public const string BREAKING_CHANGE_ATTRIBUTE_INFORMATION_LINK = "https://aka.ms/azps-changewarnings"; + public const string SUPPRESS_ERROR_OR_WARNING_MESSAGE_ENV_VARIABLE_NAME = "SuppressAzurePowerShellBreakingChangeWarnings"; + + /** + * This function takes in a CommandInfo (CmdletInfo or FunctionInfo) + * And reads all the deprecation attributes attached to it + * Prints a message on the cmdline For each of the attribute found + * + * the boundParameterNames is a list of parameters bound to the cmdlet at runtime, + * We only process the Parameter beaking change attributes attached only params listed in this list (if present) + * */ + public static void ProcessCustomAttributesAtRuntime(CommandInfo commandInfo, InvocationInfo invocationInfo, String parameterSet, System.Management.Automation.PSCmdlet psCmdlet, bool showPreviewMessage = true) + { + bool supressWarningOrError = false; + + try + { + supressWarningOrError = bool.Parse(System.Environment.GetEnvironmentVariable(SUPPRESS_ERROR_OR_WARNING_MESSAGE_ENV_VARIABLE_NAME)); + } + catch (Exception) + { + //no action + } + + if (supressWarningOrError) + { + //Do not process the attributes at runtime... The env variable to override the warning messages is set + return; + } + if (IsAzure && invocationInfo.BoundParameters.ContainsKey("DefaultProfile")) + { + psCmdlet.WriteWarning("The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription."); + } + + ProcessBreakingChangeAttributesAtRuntime(commandInfo, invocationInfo, parameterSet, psCmdlet); + + } + + private static void ProcessBreakingChangeAttributesAtRuntime(CommandInfo commandInfo, InvocationInfo invocationInfo, String parameterSet, System.Management.Automation.PSCmdlet psCmdlet) + { + List attributes = new List(GetAllBreakingChangeAttributesInType(commandInfo, invocationInfo, parameterSet)); + StringBuilder sb = new StringBuilder(); + Action appendAttributeMessage = (string s) => sb.Append(s); + + if (attributes != null && attributes.Count > 0) + { + appendAttributeMessage(string.Format(Resources.BreakingChangesAttributesHeaderMessage, commandInfo.Name.Split('_')[0])); + + foreach (GenericBreakingChangeAttribute attribute in attributes) + { + attribute.PrintCustomAttributeInfo(appendAttributeMessage); + } + + appendAttributeMessage(string.Format(Resources.BreakingChangesAttributesFooterMessage, BREAKING_CHANGE_ATTRIBUTE_INFORMATION_LINK)); + + psCmdlet.WriteWarning(sb.ToString()); + } + } + + + public static void ProcessPreviewMessageAttributesAtRuntime(CommandInfo commandInfo, InvocationInfo invocationInfo, String parameterSet, System.Management.Automation.PSCmdlet psCmdlet) + { + List previewAttributes = new List(GetAllPreviewAttributesInType(commandInfo, invocationInfo)); + StringBuilder sb = new StringBuilder(); + Action appendAttributeMessage = (string s) => sb.Append(s); + + if (previewAttributes != null && previewAttributes.Count > 0) + { + foreach (PreviewMessageAttribute attribute in previewAttributes) + { + attribute.PrintCustomAttributeInfo(appendAttributeMessage); + } + psCmdlet.WriteWarning(sb.ToString()); + } + } + + /** + * This function takes in a CommandInfo (CmdletInfo or FunctionInfo) + * And returns all the deprecation attributes attached to it + * + * the boundParameterNames is a list of parameters bound to the cmdlet at runtime, + * We only process the Parameter beaking change attributes attached only params listed in this list (if present) + **/ + private static IEnumerable GetAllBreakingChangeAttributesInType(CommandInfo commandInfo, InvocationInfo invocationInfo, String parameterSet) + { + List attributeList = new List(); + + if (commandInfo.GetType() == typeof(CmdletInfo)) + { + var type = ((CmdletInfo)commandInfo).ImplementingType; + attributeList.AddRange(type.GetCustomAttributes(typeof(GenericBreakingChangeAttribute), false).Cast()); + + foreach (MethodInfo m in type.GetRuntimeMethods()) + { + attributeList.AddRange((m.GetCustomAttributes(typeof(GenericBreakingChangeAttribute), false).Cast())); + } + + foreach (FieldInfo f in type.GetRuntimeFields()) + { + attributeList.AddRange(f.GetCustomAttributes(typeof(GenericBreakingChangeAttribute), false).Cast()); + } + + foreach (PropertyInfo p in type.GetRuntimeProperties()) + { + attributeList.AddRange(p.GetCustomAttributes(typeof(GenericBreakingChangeAttribute), false).Cast()); + } + } + else if (commandInfo.GetType() == typeof(FunctionInfo)) + { + attributeList.AddRange(((FunctionInfo)commandInfo).ScriptBlock.Attributes.Where(e => typeof(GenericBreakingChangeAttribute).IsAssignableFrom(e.GetType())).Cast()); + foreach (var parameter in ((FunctionInfo)commandInfo).Parameters) + { + attributeList.AddRange(parameter.Value.Attributes.Where(e => typeof(GenericBreakingChangeAttribute).IsAssignableFrom(e.GetType())).Cast()); + } + } + return invocationInfo == null ? attributeList : attributeList.Where(e => e.GetType() == typeof(ParameterSetBreakingChangeAttribute) ? ((ParameterSetBreakingChangeAttribute)e).IsApplicableToInvocation(invocationInfo, parameterSet) : e.IsApplicableToInvocation(invocationInfo)); + } + + public static bool ContainsPreviewAttribute(CommandInfo commandInfo, InvocationInfo invocationInfo) + { + return GetAllPreviewAttributesInType(commandInfo, invocationInfo)?.Count() > 0; + } + + private static IEnumerable GetAllPreviewAttributesInType(CommandInfo commandInfo, InvocationInfo invocationInfo) + { + List attributeList = new List(); + if (commandInfo.GetType() == typeof(CmdletInfo)) + { + var type = ((CmdletInfo)commandInfo).ImplementingType; + attributeList.AddRange(type.GetCustomAttributes(typeof(PreviewMessageAttribute), false).Cast()); + + foreach (MethodInfo m in type.GetRuntimeMethods()) + { + attributeList.AddRange((m.GetCustomAttributes(typeof(PreviewMessageAttribute), false).Cast())); + } + + foreach (FieldInfo f in type.GetRuntimeFields()) + { + attributeList.AddRange(f.GetCustomAttributes(typeof(PreviewMessageAttribute), false).Cast()); + } + + foreach (PropertyInfo p in type.GetRuntimeProperties()) + { + attributeList.AddRange(p.GetCustomAttributes(typeof(PreviewMessageAttribute), false).Cast()); + } + } + else if (commandInfo.GetType() == typeof(FunctionInfo)) + { + attributeList.AddRange(((FunctionInfo)commandInfo).ScriptBlock.Attributes.Where(e => typeof(PreviewMessageAttribute).IsAssignableFrom(e.GetType())).Cast()); + foreach (var parameter in ((FunctionInfo)commandInfo).Parameters) + { + attributeList.AddRange(parameter.Value.Attributes.Where(e => typeof(PreviewMessageAttribute).IsAssignableFrom(e.GetType())).Cast()); + } + } + return invocationInfo == null ? attributeList : attributeList.Where(e => e.IsApplicableToInvocation(invocationInfo)); + } + } +} diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Method.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Method.cs new file mode 100644 index 000000000000..a576fecbcc95 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Method.cs @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime +{ + internal static class Method + { + internal static System.Net.Http.HttpMethod Get = System.Net.Http.HttpMethod.Get; + internal static System.Net.Http.HttpMethod Put = System.Net.Http.HttpMethod.Put; + internal static System.Net.Http.HttpMethod Head = System.Net.Http.HttpMethod.Head; + internal static System.Net.Http.HttpMethod Post = System.Net.Http.HttpMethod.Post; + internal static System.Net.Http.HttpMethod Delete = System.Net.Http.HttpMethod.Delete; + internal static System.Net.Http.HttpMethod Options = System.Net.Http.HttpMethod.Options; + internal static System.Net.Http.HttpMethod Trace = System.Net.Http.HttpMethod.Trace; + internal static System.Net.Http.HttpMethod Patch = new System.Net.Http.HttpMethod("PATCH"); + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Models/JsonMember.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Models/JsonMember.cs new file mode 100644 index 000000000000..7d2172c977d7 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Models/JsonMember.cs @@ -0,0 +1,83 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Reflection; +using System.Runtime.Serialization; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + + + internal sealed class JsonMember + { + private readonly TypeDetails type; + + private readonly Func getter; + private readonly Action setter; + + internal JsonMember(PropertyInfo property, int defaultOrder) + { + getter = property.GetValue; + setter = property.SetValue; + + var dataMember = property.GetCustomAttribute(); + + Name = dataMember?.Name ?? property.Name; + Order = dataMember?.Order ?? defaultOrder; + EmitDefaultValue = dataMember?.EmitDefaultValue ?? true; + + this.type = TypeDetails.Get(property.PropertyType); + + CanRead = property.CanRead; + } + + internal JsonMember(FieldInfo field, int defaultOrder) + { + getter = field.GetValue; + setter = field.SetValue; + + var dataMember = field.GetCustomAttribute(); + + Name = dataMember?.Name ?? field.Name; + Order = dataMember?.Order ?? defaultOrder; + EmitDefaultValue = dataMember?.EmitDefaultValue ?? true; + + this.type = TypeDetails.Get(field.FieldType); + + CanRead = true; + } + + internal string Name { get; } + + internal int Order { get; } + + internal TypeDetails TypeDetails => type; + + internal Type Type => type.NonNullType; + + internal bool IsList => type.IsList; + + // Arrays, Sets, ... + internal Type ElementType => type.ElementType; + + internal IJsonConverter Converter => type.JsonConverter; + + internal bool EmitDefaultValue { get; } + + internal bool IsStringLike => type.IsStringLike; + + internal object DefaultValue => type.DefaultValue; + + internal bool CanRead { get; } + + #region Helpers + + internal object GetValue(object instance) => getter(instance); + + internal void SetValue(object instance, object value) => setter(instance, value); + + #endregion + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Models/JsonModel.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Models/JsonModel.cs new file mode 100644 index 000000000000..7a2836dc13ca --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Models/JsonModel.cs @@ -0,0 +1,89 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; +using System.Reflection; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + internal class JsonModel + { + private Dictionary map; + private readonly object _sync = new object(); + + private JsonModel(Type type, List members) + { + Type = type ?? throw new ArgumentNullException(nameof(type)); + Members = members ?? throw new ArgumentNullException(nameof(members)); + } + + internal string Name => Type.Name; + + internal Type Type { get; } + + internal List Members { get; } + + internal JsonMember this[string name] + { + get + { + if (map == null) + { + lock (_sync) + { + if (map == null) + { + map = new Dictionary(); + + foreach (JsonMember m in Members) + { + map[m.Name.ToLower()] = m; + } + } + } + } + + + map.TryGetValue(name.ToLower(), out JsonMember member); + + return member; + } + } + + internal static JsonModel FromType(Type type) + { + var members = new List(); + + int i = 0; + + // BindingFlags.Instance | BindingFlags.Public + + foreach (var member in type.GetFields()) + { + if (member.IsStatic) continue; + + if (member.IsDefined(typeof(IgnoreDataMemberAttribute))) continue; + + members.Add(new JsonMember(member, i)); + + i++; + } + + foreach (var member in type.GetProperties(BindingFlags.Public | BindingFlags.Instance)) + { + if (member.IsDefined(typeof(IgnoreDataMemberAttribute))) continue; + + members.Add(new JsonMember(member, i)); + + i++; + } + + members.Sort((a, b) => a.Order.CompareTo(b.Order)); // inline sort + + return new JsonModel(type, members); + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Models/JsonModelCache.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Models/JsonModelCache.cs new file mode 100644 index 000000000000..4f5f1d4d882f --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Models/JsonModelCache.cs @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Runtime.CompilerServices; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + internal static class JsonModelCache + { + private static readonly ConditionalWeakTable cache + = new ConditionalWeakTable(); + + internal static JsonModel Get(Type type) => cache.GetValue(type, Create); + + private static JsonModel Create(Type type) => JsonModel.FromType(type); + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Nodes/Collections/JsonArray.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Nodes/Collections/JsonArray.cs new file mode 100644 index 000000000000..9a5b8ce954a8 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Nodes/Collections/JsonArray.cs @@ -0,0 +1,65 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + public abstract partial class JsonArray : JsonNode, IEnumerable + { + internal override JsonType Type => JsonType.Array; + + internal abstract JsonType? ElementType { get; } + + public abstract int Count { get; } + + internal virtual bool IsSet => false; + + internal bool IsEmpty => Count == 0; + + #region IEnumerable + + IEnumerator IEnumerable.GetEnumerator() + { + throw new NotImplementedException(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + throw new NotImplementedException(); + } + + #endregion + + #region Static Helpers + + internal static JsonArray Create(short[] values) + => new XImmutableArray(values); + + internal static JsonArray Create(int[] values) + => new XImmutableArray(values); + + internal static JsonArray Create(long[] values) + => new XImmutableArray(values); + + internal static JsonArray Create(decimal[] values) + => new XImmutableArray(values); + + internal static JsonArray Create(float[] values) + => new XImmutableArray(values); + + internal static JsonArray Create(string[] values) + => new XImmutableArray(values); + + internal static JsonArray Create(XBinary[] values) + => new XImmutableArray(values); + + #endregion + + internal static new JsonArray Parse(string text) + => (JsonArray)JsonNode.Parse(text); + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Nodes/Collections/XImmutableArray.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Nodes/Collections/XImmutableArray.cs new file mode 100644 index 000000000000..7b11459d0c30 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Nodes/Collections/XImmutableArray.cs @@ -0,0 +1,62 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + internal sealed class XImmutableArray : JsonArray, IEnumerable + { + private readonly T[] values; + private readonly JsonType elementType; + private readonly TypeCode elementCode; + + internal XImmutableArray(T[] values) + { + this.values = values ?? throw new ArgumentNullException(nameof(values)); + this.elementCode = System.Type.GetTypeCode(typeof(T)); + this.elementType = XHelper.GetElementType(this.elementCode); + } + + public override JsonNode this[int index] => + XHelper.Create(elementType, elementCode, values[index]); + + internal override JsonType? ElementType => elementType; + + public override int Count => values.Length; + + public bool IsReadOnly => true; + + #region IEnumerable Members + + IEnumerator IEnumerable.GetEnumerator() + { + foreach (T value in values) + { + yield return XHelper.Create(elementType, elementCode, value); + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + foreach (T value in values) + { + yield return XHelper.Create(elementType, elementCode, value); + } + } + + #endregion + + #region Static Constructor + + internal XImmutableArray Create(T[] items) + { + return new XImmutableArray(items); + } + + #endregion + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Nodes/Collections/XList.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Nodes/Collections/XList.cs new file mode 100644 index 000000000000..3d25c8c5e2d8 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Nodes/Collections/XList.cs @@ -0,0 +1,64 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + internal sealed class XList : JsonArray, IEnumerable + { + private readonly IList values; + private readonly JsonType elementType; + private readonly TypeCode elementCode; + + internal XList(IList values) + { + this.values = values ?? throw new ArgumentNullException(nameof(values)); + this.elementCode = System.Type.GetTypeCode(typeof(T)); + this.elementType = XHelper.GetElementType(this.elementCode); + } + + public override JsonNode this[int index] => + XHelper.Create(elementType, elementCode, values[index]); + + internal override JsonType? ElementType => elementType; + + public override int Count => values.Count; + + public bool IsReadOnly => values.IsReadOnly; + + #region IList + + public void Add(T value) + { + values.Add(value); + } + + public bool Contains(T value) => values.Contains(value); + + #endregion + + #region IEnumerable Members + + IEnumerator IEnumerable.GetEnumerator() + { + foreach (var value in values) + { + yield return XHelper.Create(elementType, elementCode, value); + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + foreach (var value in values) + { + yield return XHelper.Create(elementType, elementCode, value); + } + } + + #endregion + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Nodes/Collections/XNodeArray.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Nodes/Collections/XNodeArray.cs new file mode 100644 index 000000000000..63a4d03353c0 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Nodes/Collections/XNodeArray.cs @@ -0,0 +1,73 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System.Collections; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + public sealed partial class XNodeArray : JsonArray, ICollection + { + private readonly List items; + + internal XNodeArray() + { + items = new List(); + } + + internal XNodeArray(params JsonNode[] values) + { + items = new List(values); + } + + internal XNodeArray(System.Collections.Generic.List values) + { + items = new List(values); + } + + public override JsonNode this[int index] => items[index]; + + internal override JsonType? ElementType => null; + + public bool IsReadOnly => false; + + public override int Count => items.Count; + + #region ICollection Members + + public void Add(JsonNode item) + { + items.Add(item); + } + + void ICollection.Clear() + { + items.Clear(); + } + + public bool Contains(JsonNode item) => items.Contains(item); + + void ICollection.CopyTo(JsonNode[] array, int arrayIndex) + { + items.CopyTo(array, arrayIndex); + } + + public bool Remove(JsonNode item) + { + return items.Remove(item); + } + + #endregion + + #region IEnumerable Members + + IEnumerator IEnumerable.GetEnumerator() + => items.GetEnumerator(); + + IEnumerator IEnumerable.GetEnumerator() + => items.GetEnumerator(); + + #endregion + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Nodes/Collections/XSet.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Nodes/Collections/XSet.cs new file mode 100644 index 000000000000..ea3c38f3ba1a --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Nodes/Collections/XSet.cs @@ -0,0 +1,60 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + internal sealed class XSet : JsonArray, IEnumerable + { + private readonly HashSet values; + private readonly JsonType elementType; + private readonly TypeCode elementCode; + + internal XSet(IEnumerable values) + : this(new HashSet(values)) + { } + + internal XSet(HashSet values) + { + this.values = values ?? throw new ArgumentNullException(nameof(values)); + this.elementCode = System.Type.GetTypeCode(typeof(T)); + this.elementType = XHelper.GetElementType(this.elementCode); + } + + internal override JsonType Type => JsonType.Array; + + internal override JsonType? ElementType => elementType; + + public bool IsReadOnly => true; + + public override int Count => values.Count; + + internal override bool IsSet => true; + + #region IEnumerable Members + + IEnumerator IEnumerable.GetEnumerator() + { + foreach (var value in values) + { + yield return XHelper.Create(elementType, elementCode, value); + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + foreach (var value in values) + { + yield return XHelper.Create(elementType, elementCode, value); + } + } + + #endregion + + internal HashSet AsHashSet() => values; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Nodes/JsonBoolean.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Nodes/JsonBoolean.cs new file mode 100644 index 000000000000..6e8621d3077d --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Nodes/JsonBoolean.cs @@ -0,0 +1,42 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + internal sealed partial class JsonBoolean : JsonNode + { + internal static readonly JsonBoolean True = new JsonBoolean(true); + internal static readonly JsonBoolean False = new JsonBoolean(false); + + internal JsonBoolean(bool value) + { + Value = value; + } + + internal bool Value { get; } + + internal override JsonType Type => JsonType.Boolean; + + internal static new JsonBoolean Parse(string text) + { + switch (text) + { + case "false": return False; + case "true": return True; + + default: throw new ArgumentException($"Expected true or false. Was {text}."); + } + } + + #region Implicit Casts + + public static implicit operator bool(JsonBoolean data) => data.Value; + + public static implicit operator JsonBoolean(bool data) => new JsonBoolean(data); + + #endregion + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Nodes/JsonDate.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Nodes/JsonDate.cs new file mode 100644 index 000000000000..f25766befa46 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Nodes/JsonDate.cs @@ -0,0 +1,173 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + + + internal sealed partial class JsonDate : JsonNode, IEquatable, IComparable + { + internal static bool AssumeUtcWhenKindIsUnspecified = true; + + private readonly DateTimeOffset value; + + internal JsonDate(DateTime value) + { + if (value.Kind == DateTimeKind.Unspecified && AssumeUtcWhenKindIsUnspecified) + { + value = DateTime.SpecifyKind(value, DateTimeKind.Utc); + } + + this.value = value; + } + + internal JsonDate(DateTimeOffset value) + { + this.value = value; + } + + internal override JsonType Type => JsonType.Date; + + #region Helpers + + internal DateTimeOffset ToDateTimeOffset() + { + return value; + } + + internal DateTime ToDateTime() + { + if (value.Offset == TimeSpan.Zero) + { + return value.UtcDateTime; + } + + return value.DateTime; + } + + internal DateTime ToUtcDateTime() => value.UtcDateTime; + + internal int ToUnixTimeSeconds() + { + return (int)value.ToUnixTimeSeconds(); + } + + internal long ToUnixTimeMilliseconds() + { + return (int)value.ToUnixTimeMilliseconds(); + } + + internal string ToIsoString() + { + return IsoDate.FromDateTimeOffset(value).ToString(); + } + + #endregion + + public override string ToString() + { + return ToIsoString(); + } + + internal static new JsonDate Parse(string text) + { + if (text == null) throw new ArgumentNullException(nameof(text)); + + // TODO support: unixtimeseconds.partialseconds + + if (text.Length > 4 && _IsNumber(text)) // UnixTime + { + var date = DateTimeOffset.FromUnixTimeSeconds(long.Parse(text)); + + return new JsonDate(date); + } + else if (text.Length <= 4 || text[4] == '-') // ISO: 2012- + { + return new JsonDate(IsoDate.Parse(text).ToDateTimeOffset()); + } + else + { + // NOT ISO ENCODED + // "Thu, 5 Apr 2012 16:59:01 +0200", + return new JsonDate(DateTimeOffset.Parse(text)); + } + } + + private static bool _IsNumber(string text) + { + foreach (var c in text) + { + if (!char.IsDigit(c)) return false; + } + + return true; + } + + internal static JsonDate FromUnixTime(int seconds) + { + return new JsonDate(DateTimeOffset.FromUnixTimeSeconds(seconds)); + } + + internal static JsonDate FromUnixTime(double seconds) + { + var milliseconds = (long)(seconds * 1000d); + + return new JsonDate(DateTimeOffset.FromUnixTimeMilliseconds(milliseconds)); + } + + #region Implicit Casts + + public static implicit operator DateTimeOffset(JsonDate value) + => value.ToDateTimeOffset(); + + public static implicit operator DateTime(JsonDate value) + => value.ToDateTime(); + + // From Date + public static implicit operator JsonDate(DateTimeOffset value) + { + return new JsonDate(value); + } + + public static implicit operator JsonDate(DateTime value) + { + return new JsonDate(value); + } + + // From String + public static implicit operator JsonDate(string value) + { + return Parse(value); + } + + #endregion + + #region Equality + + public override bool Equals(object obj) + { + return obj is JsonDate date && date.value == this.value; + } + + public bool Equals(JsonDate other) + { + return this.value == other.value; + } + + public override int GetHashCode() => value.GetHashCode(); + + #endregion + + #region IComparable Members + + int IComparable.CompareTo(JsonDate other) + { + return value.CompareTo(other.value); + } + + #endregion + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Nodes/JsonNode.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Nodes/JsonNode.cs new file mode 100644 index 000000000000..1cc4b8a02bc2 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Nodes/JsonNode.cs @@ -0,0 +1,250 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.IO; +using System.Text; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + + + public abstract partial class JsonNode + { + internal abstract JsonType Type { get; } + + public virtual JsonNode this[int index] => throw new NotImplementedException(); + + public virtual JsonNode this[string name] + { + get => throw new NotImplementedException(); + set => throw new NotImplementedException(); + } + + #region Type Helpers + + internal bool IsArray => Type == JsonType.Array; + + internal bool IsDate => Type == JsonType.Date; + + internal bool IsObject => Type == JsonType.Object; + + internal bool IsNumber => Type == JsonType.Number; + + internal bool IsNull => Type == JsonType.Null; + + #endregion + + internal void WriteTo(TextWriter textWriter, bool pretty = true) + { + var writer = new JsonWriter(textWriter, pretty); + + writer.WriteNode(this); + } + + internal T As() + where T : new() + => new JsonSerializer().Deseralize((JsonObject)this); + + internal T[] ToArrayOf() + { + return (T[])new JsonSerializer().DeserializeArray(typeof(T[]), (JsonArray)this); + } + + #region ToString Overrides + + public override string ToString() => ToString(pretty: true); + + internal string ToString(bool pretty) + { + var sb = new StringBuilder(); + + using (var writer = new StringWriter(sb)) + { + WriteTo(writer, pretty); + + return sb.ToString(); + } + } + + #endregion + + #region Static Constructors + + internal static JsonNode Parse(string text) + { + return Parse(new SourceReader(new StringReader(text))); + } + + internal static JsonNode Parse(TextReader textReader) + => Parse(new SourceReader(textReader)); + + private static JsonNode Parse(SourceReader sourceReader) + { + using (var parser = new JsonParser(sourceReader)) + { + return parser.ReadNode(); + } + } + + internal static JsonNode FromObject(object instance) + => new JsonSerializer().Serialize(instance); + + #endregion + + #region Implict Casts + + public static implicit operator string(JsonNode node) => node.ToString(); + + #endregion + + #region Explict Casts + + public static explicit operator DateTime(JsonNode node) + { + switch (node.Type) + { + case JsonType.Date: + return ((JsonDate)node).ToDateTime(); + + case JsonType.String: + return JsonDate.Parse(node.ToString()).ToDateTime(); + + case JsonType.Number: + var num = (JsonNumber)node; + + if (num.IsInteger) + { + return DateTimeOffset.FromUnixTimeSeconds(num).UtcDateTime; + } + else + { + return DateTimeOffset.FromUnixTimeMilliseconds((long)((double)num * 1000)).UtcDateTime; + } + } + + throw new ConversionException(node, typeof(DateTime)); + } + + public static explicit operator DateTimeOffset(JsonNode node) + { + switch (node.Type) + { + case JsonType.Date : return ((JsonDate)node).ToDateTimeOffset(); + case JsonType.String : return JsonDate.Parse(node.ToString()).ToDateTimeOffset(); + + case JsonType.Number: + var num = (JsonNumber)node; + + if (num.IsInteger) + { + return DateTimeOffset.FromUnixTimeSeconds(num); + } + else + { + return DateTimeOffset.FromUnixTimeMilliseconds((long)((double)num * 1000)); + } + + } + + throw new ConversionException(node, typeof(DateTimeOffset)); + } + + public static explicit operator float(JsonNode node) + { + switch (node.Type) + { + case JsonType.Number : return (JsonNumber)node; + case JsonType.String : return float.Parse(node.ToString()); + } + + throw new ConversionException(node, typeof(float)); + } + + public static explicit operator double(JsonNode node) + { + switch (node.Type) + { + case JsonType.Number : return (JsonNumber)node; + case JsonType.String : return double.Parse(node.ToString()); + } + + throw new ConversionException(node, typeof(double)); + } + + public static explicit operator decimal(JsonNode node) + { + switch (node.Type) + { + case JsonType.Number: return (JsonNumber)node; + case JsonType.String: return decimal.Parse(node.ToString()); + } + + throw new ConversionException(node, typeof(decimal)); + } + + public static explicit operator Guid(JsonNode node) + => new Guid(node.ToString()); + + public static explicit operator short(JsonNode node) + { + switch (node.Type) + { + case JsonType.Number : return (JsonNumber)node; + case JsonType.String : return short.Parse(node.ToString()); + } + + throw new ConversionException(node, typeof(short)); + } + + public static explicit operator int(JsonNode node) + { + switch (node.Type) + { + case JsonType.Number : return (JsonNumber)node; + case JsonType.String : return int.Parse(node.ToString()); + } + + throw new ConversionException(node, typeof(int)); + } + + public static explicit operator long(JsonNode node) + { + switch (node.Type) + { + case JsonType.Number: return (JsonNumber)node; + case JsonType.String: return long.Parse(node.ToString()); + } + + throw new ConversionException(node, typeof(long)); + } + + public static explicit operator bool(JsonNode node) + => ((JsonBoolean)node).Value; + + public static explicit operator ushort(JsonNode node) + => (JsonNumber)node; + + public static explicit operator uint(JsonNode node) + => (JsonNumber)node; + + public static explicit operator ulong(JsonNode node) + => (JsonNumber)node; + + public static explicit operator TimeSpan(JsonNode node) + => TimeSpan.Parse(node.ToString()); + + public static explicit operator Uri(JsonNode node) + { + if (node.Type == JsonType.String) + { + return new Uri(node.ToString()); + } + + throw new ConversionException(node, typeof(Uri)); + } + + #endregion + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Nodes/JsonNumber.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Nodes/JsonNumber.cs new file mode 100644 index 000000000000..d3d60b06a2f7 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Nodes/JsonNumber.cs @@ -0,0 +1,109 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + public sealed partial class JsonNumber : JsonNode + { + private readonly string value; + private readonly bool overflows = false; + + internal JsonNumber(string value) + { + this.value = value ?? throw new ArgumentNullException(nameof(value)); + } + + internal JsonNumber(int value) + { + this.value = value.ToString(); + } + + internal JsonNumber(long value) + { + this.value = value.ToString(); + + if (value > 9007199254740991) + { + overflows = true; + } + } + + internal JsonNumber(float value) + { + this.value = value.ToString(System.Globalization.CultureInfo.InvariantCulture); + } + + internal JsonNumber(double value) + { + this.value = value.ToString(System.Globalization.CultureInfo.InvariantCulture); + } + + internal override JsonType Type => JsonType.Number; + + internal string Value => value; + + #region Helpers + + internal bool Overflows => overflows; + + internal bool IsInteger => !value.Contains("."); + + internal bool IsFloat => value.Contains("."); + + #endregion + + #region Casting + + public static implicit operator byte(JsonNumber number) + => byte.Parse(number.Value); + + public static implicit operator short(JsonNumber number) + => short.Parse(number.Value); + + public static implicit operator int(JsonNumber number) + => int.Parse(number.Value); + + public static implicit operator long(JsonNumber number) + => long.Parse(number.value); + + public static implicit operator UInt16(JsonNumber number) + => ushort.Parse(number.Value); + + public static implicit operator UInt32(JsonNumber number) + => uint.Parse(number.Value); + + public static implicit operator UInt64(JsonNumber number) + => ulong.Parse(number.Value); + + public static implicit operator decimal(JsonNumber number) + => decimal.Parse(number.Value, System.Globalization.CultureInfo.InvariantCulture); + + public static implicit operator Double(JsonNumber number) + => double.Parse(number.value, System.Globalization.CultureInfo.InvariantCulture); + + public static implicit operator float(JsonNumber number) + => float.Parse(number.value, System.Globalization.CultureInfo.InvariantCulture); + + public static implicit operator JsonNumber(short data) + => new JsonNumber(data.ToString()); + + public static implicit operator JsonNumber(int data) + => new JsonNumber(data); + + public static implicit operator JsonNumber(long data) + => new JsonNumber(data); + + public static implicit operator JsonNumber(Single data) + => new JsonNumber(data.ToString()); + + public static implicit operator JsonNumber(double data) + => new JsonNumber(data.ToString()); + + #endregion + + public override string ToString() => value; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Nodes/JsonObject.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Nodes/JsonObject.cs new file mode 100644 index 000000000000..cd4fe621016c --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Nodes/JsonObject.cs @@ -0,0 +1,172 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + public partial class JsonObject : JsonNode, IDictionary + { + private readonly Dictionary items; + + internal JsonObject() + { + items = new Dictionary(); + } + + internal JsonObject(IEnumerable> properties) + { + if (properties == null) throw new ArgumentNullException(nameof(properties)); + + items = new Dictionary(); + + foreach (var field in properties) + { + items.Add(field.Key, field.Value); + } + } + + #region IDictionary Constructors + + internal JsonObject(IDictionary dic) + { + items = new Dictionary(dic.Count); + + foreach (var pair in dic) + { + Add(pair.Key, pair.Value); + } + } + + #endregion + + internal override JsonType Type => JsonType.Object; + + #region Add Overloads + + public void Add(string name, JsonNode value) => + items.Add(name, value); + + public void Add(string name, byte[] value) => + items.Add(name, new XBinary(value)); + + public void Add(string name, DateTime value) => + items.Add(name, new JsonDate(value)); + + public void Add(string name, int value) => + items.Add(name, new JsonNumber(value.ToString())); + + public void Add(string name, long value) => + items.Add(name, new JsonNumber(value.ToString())); + + public void Add(string name, float value) => + items.Add(name, new JsonNumber(value.ToString())); + + public void Add(string name, double value) => + items.Add(name, new JsonNumber(value.ToString())); + + public void Add(string name, string value) => + items.Add(name, new JsonString(value)); + + public void Add(string name, bool value) => + items.Add(name, new JsonBoolean(value)); + + public void Add(string name, Uri url) => + items.Add(name, new JsonString(url.AbsoluteUri)); + + public void Add(string name, string[] values) => + items.Add(name, new XImmutableArray(values)); + + public void Add(string name, int[] values) => + items.Add(name, new XImmutableArray(values)); + + #endregion + + #region ICollection> Members + + void ICollection>.Add(KeyValuePair item) + { + items.Add(item.Key, item.Value); + } + + void ICollection>.Clear() + { + items.Clear(); + } + + bool ICollection>.Contains(KeyValuePair item) => + throw new NotImplementedException(); + + void ICollection>.CopyTo(KeyValuePair[] array, int arrayIndex) => + throw new NotImplementedException(); + + + int ICollection>.Count => items.Count; + + bool ICollection>.IsReadOnly => false; + + bool ICollection>.Remove(KeyValuePair item) => + throw new NotImplementedException(); + + #endregion + + #region IDictionary Members + + public bool ContainsKey(string key) => items.ContainsKey(key); + + public ICollection Keys => items.Keys; + + public bool Remove(string key) => items.Remove(key); + + public bool TryGetValue(string key, out JsonNode value) => + items.TryGetValue(key, out value); + + public ICollection Values => items.Values; + + public override JsonNode this[string key] + { + get => items[key]; + set => items[key] = value; + } + + #endregion + + #region IEnumerable + + IEnumerator> IEnumerable>.GetEnumerator() + => items.GetEnumerator(); + + IEnumerator IEnumerable.GetEnumerator() + => items.GetEnumerator(); + + #endregion + + #region Helpers + + internal static new JsonObject FromObject(object instance) => + (JsonObject)new JsonSerializer().Serialize(instance); + + #endregion + + #region Static Constructors + + internal static JsonObject FromStream(Stream stream) + { + using (var tr = new StreamReader(stream)) + { + return (JsonObject)Parse(tr); + } + } + + internal static new JsonObject Parse(string text) + { + return (JsonObject)JsonNode.Parse(text); + } + + #endregion + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Nodes/JsonString.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Nodes/JsonString.cs new file mode 100644 index 000000000000..5968e2b23a8d --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Nodes/JsonString.cs @@ -0,0 +1,42 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + public sealed partial class JsonString : JsonNode, IEquatable + { + private readonly string value; + + internal JsonString(string value) + { + this.value = value ?? throw new ArgumentNullException(nameof(value)); + } + + internal override JsonType Type => JsonType.String; + + internal string Value => value; + + internal int Length => value.Length; + + #region #region Implicit Casts + + public static implicit operator string(JsonString data) => data.Value; + + public static implicit operator JsonString(string value) => new JsonString(value); + + #endregion + + public override int GetHashCode() => value.GetHashCode(); + + public override string ToString() => value; + + #region IEquatable + + bool IEquatable.Equals(JsonString other) => this.Value == other.Value; + + #endregion + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Nodes/XBinary.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Nodes/XBinary.cs new file mode 100644 index 000000000000..5333ba06588c --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Nodes/XBinary.cs @@ -0,0 +1,40 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + internal sealed class XBinary : JsonNode + { + private readonly byte[] _value; + private readonly string _base64; + + internal XBinary(byte[] value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + internal XBinary(string base64EncodedString) + { + _base64 = base64EncodedString ?? throw new ArgumentNullException(nameof(base64EncodedString)); + } + + internal override JsonType Type => JsonType.Binary; + + internal byte[] Value => _value ?? Convert.FromBase64String(_base64); + + #region #region Implicit Casts + + public static implicit operator byte[] (XBinary data) => data.Value; + + public static implicit operator XBinary(byte[] data) => new XBinary(data); + + #endregion + + public override int GetHashCode() => Value.GetHashCode(); + + public override string ToString() => _base64 ?? Convert.ToBase64String(_value); + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Nodes/XNull.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Nodes/XNull.cs new file mode 100644 index 000000000000..981f0a61f7e0 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Nodes/XNull.cs @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + internal sealed class XNull : JsonNode + { + internal static readonly XNull Instance = new XNull(); + + private XNull() { } + + internal override JsonType Type => JsonType.Null; + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Parser/Exceptions/ParseException.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Parser/Exceptions/ParseException.cs new file mode 100644 index 000000000000..f8b845fc6cb2 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Parser/Exceptions/ParseException.cs @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + internal class ParserException : Exception + { + internal ParserException(string message) + : base(message) + { } + + internal ParserException(string message, SourceLocation location) + : base(message) + { + + Location = location; + } + + internal SourceLocation Location { get; } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Parser/JsonParser.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Parser/JsonParser.cs new file mode 100644 index 000000000000..130d6af89b94 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Parser/JsonParser.cs @@ -0,0 +1,180 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.IO; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + public class JsonParser : IDisposable + { + private readonly TokenReader reader; + + internal JsonParser(TextReader reader) + : this(new SourceReader(reader)) { } + + internal JsonParser(SourceReader sourceReader) + { + if (sourceReader == null) + throw new ArgumentNullException(nameof(sourceReader)); + + this.reader = new TokenReader(new JsonTokenizer(sourceReader)); + + this.reader.Next(); // Start with the first token + } + + internal IEnumerable ReadNodes() + { + JsonNode node; + + while ((node = ReadNode()) != null) yield return node; + } + + internal JsonNode ReadNode() + { + if (reader.Current.Kind == TokenKind.Eof || reader.Current.IsTerminator) + { + return null; + } + + switch (reader.Current.Kind) + { + case TokenKind.LeftBrace : return ReadObject(); // { + case TokenKind.LeftBracket : return ReadArray(); // [ + + default: throw new ParserException($"Expected '{{' or '['. Was {reader.Current}."); + } + } + + private JsonNode ReadFieldValue() + { + // Boolean, Date, Null, Number, String, Uri + if (reader.Current.IsLiteral) + { + return ReadLiteral(); + } + else + { + switch (reader.Current.Kind) + { + case TokenKind.LeftBracket: return ReadArray(); + case TokenKind.LeftBrace : return ReadObject(); + + default: throw new ParserException($"Unexpected token reading field value. Was {reader.Current}."); + } + } + } + + private JsonNode ReadLiteral() + { + var literal = reader.Current; + + reader.Next(); // Read the literal token + + switch (literal.Kind) + { + case TokenKind.Boolean : return JsonBoolean.Parse(literal.Value); + case TokenKind.Null : return XNull.Instance; + case TokenKind.Number : return new JsonNumber(literal.Value); + case TokenKind.String : return new JsonString(literal.Value); + + default: throw new ParserException($"Unexpected token reading literal. Was {literal}."); + } + } + + internal JsonObject ReadObject() + { + reader.Ensure(TokenKind.LeftBrace, "object"); + + reader.Next(); // Read '{' (Object start) + + var jsonObject = new JsonObject(); + + // Read the object's fields until we reach the end of the object ('}') + while (reader.Current.Kind != TokenKind.RightBrace) + { + if (reader.Current.Kind == TokenKind.Comma) + { + reader.Next(); // Read ',' (Seperator) + } + + // Ensure we have a field name + reader.Ensure(TokenKind.String, "Expected field name"); + + var field = ReadField(); + + jsonObject.Add(field.Key, field.Value); + } + + reader.Next(); // Read '}' (Object end) + + return jsonObject; + } + + + // TODO: Use ValueTuple in C#7 + private KeyValuePair ReadField() + { + var fieldName = reader.Current.Value; + + reader.Next(); // Read the field name + + reader.Ensure(TokenKind.Colon, "field"); + + reader.Next(); // Read ':' (Field value indicator) + + return new KeyValuePair(fieldName, ReadFieldValue()); + } + + + internal JsonArray ReadArray() + { + reader.Ensure(TokenKind.LeftBracket, "array"); + + var array = new XNodeArray(); + + reader.Next(); // Read the '[' (Array start) + + // Read the array's items + while (reader.Current.Kind != TokenKind.RightBracket) + { + if (reader.Current.Kind == TokenKind.Comma) + { + reader.Next(); // Read the ',' (Seperator) + } + + if (reader.Current.IsLiteral) + { + array.Add(ReadLiteral()); // Boolean, Date, Number, Null, String, Uri + } + else if (reader.Current.Kind == TokenKind.LeftBracket) + { + array.Add(ReadArray()); // Array + } + else if (reader.Current.Kind == TokenKind.LeftBrace) + { + array.Add(ReadObject()); // Object + } + else + { + throw new ParserException($"Expected comma, literal, or object. Was {reader.Current}."); + } + } + + reader.Next(); // Read the ']' (Array end) + + return array; + } + + #region IDisposable + + public void Dispose() + { + reader.Dispose(); + } + + #endregion + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Parser/JsonToken.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Parser/JsonToken.cs new file mode 100644 index 000000000000..3ab9ed38484a --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Parser/JsonToken.cs @@ -0,0 +1,66 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + internal enum TokenKind + { + LeftBrace, // { Object start + RightBrace, // } Object end + + LeftBracket, // [ Array start + RightBracket, // ] Array end + + Comma, // , Comma + Colon, // : Value indicator + Dot, // . Access field indicator + Terminator, // \0 Stream terminator + + Boolean = 31, // true or false + Null = 33, // null + Number = 34, // i.e. -1.93, -1, 0, 1, 1.1 + String = 35, // i.e. "text" + + Eof = 50 + } + + internal /* readonly */ struct JsonToken + { + internal static readonly JsonToken BraceOpen = new JsonToken(TokenKind.LeftBrace, "{"); + internal static readonly JsonToken BraceClose = new JsonToken(TokenKind.RightBrace, "}"); + + internal static readonly JsonToken BracketOpen = new JsonToken(TokenKind.LeftBracket, "["); + internal static readonly JsonToken BracketClose = new JsonToken(TokenKind.RightBracket, "]"); + + internal static readonly JsonToken Colon = new JsonToken(TokenKind.Colon, ":"); + internal static readonly JsonToken Comma = new JsonToken(TokenKind.Comma, ","); + internal static readonly JsonToken Terminator = new JsonToken(TokenKind.Terminator, "\0"); + + internal static readonly JsonToken True = new JsonToken(TokenKind.Boolean, "true"); + internal static readonly JsonToken False = new JsonToken(TokenKind.Boolean, "false"); + internal static readonly JsonToken Null = new JsonToken(TokenKind.Null, "null"); + + internal static readonly JsonToken Eof = new JsonToken(TokenKind.Eof, null); + + internal JsonToken(TokenKind kind, string value) + { + Kind = kind; + Value = value; + } + + internal readonly TokenKind Kind; + + internal readonly string Value; + + public override string ToString() => Kind + ": " + Value; + + #region Helpers + + internal bool IsLiteral => (byte)Kind > 30 && (byte)Kind < 40; + + internal bool IsTerminator => Kind == TokenKind.Terminator; + + #endregion + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Parser/JsonTokenizer.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Parser/JsonTokenizer.cs new file mode 100644 index 000000000000..327978119545 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Parser/JsonTokenizer.cs @@ -0,0 +1,177 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Text; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + using System.IO; + + + public class JsonTokenizer : IDisposable + { + private readonly StringBuilder sb = new StringBuilder(); + + private readonly SourceReader reader; + + internal JsonTokenizer(TextReader reader) + : this(new SourceReader(reader)) { } + + internal JsonTokenizer(SourceReader reader) + { + this.reader = reader; + + reader.Next(); // Start with the first char + } + + internal JsonToken ReadNext() + { + reader.SkipWhitespace(); + + if (reader.IsEof) return JsonToken.Eof; + + switch (reader.Current) + { + case '"': return ReadQuotedString(); + + // Symbols + case '[' : reader.Next(); return JsonToken.BracketOpen; // Array start + case ']' : reader.Next(); return JsonToken.BracketClose; // Array end + case ',' : reader.Next(); return JsonToken.Comma; // Value seperator + case ':' : reader.Next(); return JsonToken.Colon; // Field value indicator + case '{' : reader.Next(); return JsonToken.BraceOpen; // Object start + case '}' : reader.Next(); return JsonToken.BraceClose; // Object end + case '\0' : reader.Next(); return JsonToken.Terminator; // Stream terminiator + + default: return ReadLiteral(); + } + } + + private JsonToken ReadQuotedString() + { + Expect('"', "quoted string indicator"); + + reader.Next(); // Read '"' (Starting quote) + + // Read until we reach an unescaped quote char + while (reader.Current != '"') + { + EnsureNotEof("quoted string"); + + if (reader.Current == '\\') + { + char escapedCharacter = reader.ReadEscapeCode(); + + sb.Append(escapedCharacter); + + continue; + } + + StoreCurrentCharacterAndReadNext(); + } + + reader.Next(); // Read '"' (Ending quote) + + return new JsonToken(TokenKind.String, value: sb.Extract()); + } + + private JsonToken ReadLiteral() + { + if (char.IsDigit(reader.Current) || + reader.Current == '-' || + reader.Current == '+') + { + return ReadNumber(); + } + + return ReadIdentifer(); + } + + private JsonToken ReadNumber() + { + // Read until we hit a non-numeric character + // -6.247737e-06 + // E + + while (char.IsDigit(reader.Current) + || reader.Current == '.' + || reader.Current == 'e' + || reader.Current == 'E' + || reader.Current == '-' + || reader.Current == '+') + { + StoreCurrentCharacterAndReadNext(); + } + + return new JsonToken(TokenKind.Number, value: sb.Extract()); + } + + int count = 0; + + private JsonToken ReadIdentifer() + { + count++; + + if (!char.IsLetter(reader.Current)) + { + throw new ParserException( + message : $"Expected literal (number, boolean, or null). Was '{reader.Current}'.", + location : reader.Location + ); + } + + // Read letters, numbers, and underscores '_' + while (char.IsLetterOrDigit(reader.Current) || reader.Current == '_') + { + StoreCurrentCharacterAndReadNext(); + } + + string text = sb.Extract(); + + switch (text) + { + case "true": return JsonToken.True; + case "false": return JsonToken.False; + case "null": return JsonToken.Null; + + default: return new JsonToken(TokenKind.String, text); + } + } + + private void Expect(char character, string description) + { + if (reader.Current != character) + { + throw new ParserException( + message: $"Expected {description} ('{character}'). Was '{reader.Current}'.", + location: reader.Location + ); + } + } + + private void EnsureNotEof(string tokenType) + { + if (reader.IsEof) + { + throw new ParserException( + message: $"Unexpected EOF while reading {tokenType}.", + location: reader.Location + ); + } + } + + private void StoreCurrentCharacterAndReadNext() + { + sb.Append(reader.Current); + + reader.Next(); + } + + public void Dispose() + { + reader.Dispose(); + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Parser/Location.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Parser/Location.cs new file mode 100644 index 000000000000..7cbfdb214cd6 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Parser/Location.cs @@ -0,0 +1,43 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + internal struct SourceLocation + { + private int line; + private int column; + private int position; + + internal SourceLocation(int line = 0, int column = 0, int position = 0) + { + this.line = line; + this.column = column; + this.position = position; + } + + internal int Line => line; + + internal int Column => column; + + internal int Position => position; + + internal void Advance() + { + this.column++; + this.position++; + } + + internal void MarkNewLine() + { + this.line++; + this.column = 0; + } + + internal SourceLocation Clone() + { + return new SourceLocation(line, column, position); + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Parser/Readers/SourceReader.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Parser/Readers/SourceReader.cs new file mode 100644 index 000000000000..7bb9f06c70e5 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Parser/Readers/SourceReader.cs @@ -0,0 +1,130 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Globalization; +using System.IO; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + public sealed class SourceReader : IDisposable + { + private readonly TextReader source; + + private char current; + + private readonly SourceLocation location = new SourceLocation(); + + private bool isEof = false; + + internal SourceReader(TextReader textReader) + { + this.source = textReader ?? throw new ArgumentNullException(nameof(textReader)); + } + + /// + /// Advances to the next character + /// + internal void Next() + { + // Advance to the new line when we see a new line '\n'. + // A new line may be prefixed by a carriage return '\r'. + + if (current == '\n') + { + location.MarkNewLine(); + } + + int charCode = source.Read(); // -1 for end + + if (charCode >= 0) + { + current = (char)charCode; + } + else + { + // If we've already marked this as the EOF, throw an exception + if (isEof) + { + throw new EndOfStreamException("Cannot advance past end of stream."); + } + + isEof = true; + + current = '\0'; + } + + location.Advance(); + } + + internal void SkipWhitespace() + { + while (char.IsWhiteSpace(current)) + { + Next(); + } + } + + internal char ReadEscapeCode() + { + Next(); + + char escapedChar = current; + + Next(); // Consume escaped character + + switch (escapedChar) + { + // Special escape codes + case '"': return '"'; // " (Quotation mark) U+0022 + case '/': return '/'; // / (Solidus) U+002F + case '\\': return '\\'; // \ (Reverse solidus) U+005C + + // Control Characters + case '0': return '\0'; // Nul (0) U+0000 + case 'a': return '\a'; // Alert (7) + case 'b': return '\b'; // Backspace (8) U+0008 + case 'f': return '\f'; // Form feed (12) U+000C + case 'n': return '\n'; // Line feed (10) U+000A + case 'r': return '\r'; // Carriage return (13) U+000D + case 't': return '\t'; // Horizontal tab (9) U+0009 + case 'v': return '\v'; // Vertical tab + + // Unicode escape sequence + case 'u': return ReadUnicodeEscapeSequence(); // U+XXXX + + default: throw new Exception($"Unrecognized escape sequence '\\{escapedChar}'"); + } + } + + private readonly char[] hexCode = new char[4]; + + private char ReadUnicodeEscapeSequence() + { + hexCode[0] = current; Next(); + hexCode[1] = current; Next(); + hexCode[2] = current; Next(); + hexCode[3] = current; Next(); + + return Convert.ToChar(int.Parse( + s : new string(hexCode), + style : NumberStyles.HexNumber, + provider: NumberFormatInfo.InvariantInfo + )); + } + + internal char Current => current; + + internal bool IsEof => isEof; + + internal char Peek() => (char)source.Peek(); + + internal SourceLocation Location => location; + + public void Dispose() + { + source.Dispose(); + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Parser/TokenReader.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Parser/TokenReader.cs new file mode 100644 index 000000000000..3f44a2ef7724 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Parser/TokenReader.cs @@ -0,0 +1,39 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + public class TokenReader : IDisposable + { + private readonly JsonTokenizer tokenizer; + private JsonToken current; + + internal TokenReader(JsonTokenizer tokenizer) + { + this.tokenizer = tokenizer ?? throw new ArgumentNullException(nameof(tokenizer)); + } + + internal void Next() + { + current = tokenizer.ReadNext(); + } + + internal JsonToken Current => current; + + internal void Ensure(TokenKind kind, string readerName) + { + if (current.Kind != kind) + { + throw new ParserException($"Expected {kind} while reading {readerName}). Was {current}."); + } + } + + public void Dispose() + { + tokenizer.Dispose(); + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/PipelineMocking.cs b/src/Sphere/Sphere.Autorest/generated/runtime/PipelineMocking.cs new file mode 100644 index 000000000000..1838c4a15b83 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/PipelineMocking.cs @@ -0,0 +1,262 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime +{ + using System.Threading.Tasks; + using System.Collections.Generic; + using System.Net.Http; + using System.Linq; + using System.Net; + using Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json; + + public enum MockMode + { + Live, + Record, + Playback, + + } + + public class PipelineMock + { + + private System.Collections.Generic.Stack scenario = new System.Collections.Generic.Stack(); + private System.Collections.Generic.Stack context = new System.Collections.Generic.Stack(); + private System.Collections.Generic.Stack description = new System.Collections.Generic.Stack(); + + private readonly string recordingPath; + private int counter = 0; + + public static implicit operator Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep(PipelineMock instance) => instance.SendAsync; + + public MockMode Mode { get; set; } = MockMode.Live; + public PipelineMock(string recordingPath) + { + this.recordingPath = recordingPath; + } + + public void PushContext(string text) => context.Push(text); + + public void PushDescription(string text) => description.Push(text); + + + public void PushScenario(string it) + { + // reset counter too + counter = 0; + + scenario.Push(it); + } + + public void PopContext() => context.Pop(); + + public void PopDescription() => description.Pop(); + + public void PopScenario() => scenario.Pop(); + + public void SetRecord() => Mode = MockMode.Record; + + public void SetPlayback() => Mode = MockMode.Playback; + + public void SetLive() => Mode = MockMode.Live; + + public string Scenario => (scenario.Count > 0 ? scenario.Peek() : "[NoScenario]"); + public string Description => (description.Count > 0 ? description.Peek() : "[NoDescription]"); + public string Context => (context.Count > 0 ? context.Peek() : "[NoContext]"); + + /// + /// Headers that we substitute out blank values for in the recordings + /// Add additional headers as necessary + /// + public static HashSet Blacklist = new HashSet(System.StringComparer.CurrentCultureIgnoreCase) { + "Authorization", + }; + + public Dictionary ForceResponseHeaders = new Dictionary(); + + internal static XImmutableArray Removed = new XImmutableArray(new string[] { "[Filtered]" }); + + internal static IEnumerable> FilterHeaders(IEnumerable>> headers) => headers.Select(header => new KeyValuePair(header.Key, Blacklist.Contains(header.Key) ? Removed : new XImmutableArray(header.Value.ToArray()))); + + internal static JsonNode SerializeContent(HttpContent content, ref bool isBase64) => content == null ? XNull.Instance : SerializeContent(content.ReadAsByteArrayAsync().Result, ref isBase64); + + internal static JsonNode SerializeContent(byte[] content, ref bool isBase64) + { + if (null == content || content.Length == 0) + { + return XNull.Instance; + } + var first = content[0]; + var last = content[content.Length - 1]; + + // plaintext for JSON/SGML/XML/HTML/STRINGS/ARRAYS + if ((first == '{' && last == '}') || (first == '<' && last == '>') || (first == '[' && last == ']') || (first == '"' && last == '"')) + { + return new JsonString(System.Text.Encoding.UTF8.GetString(content)); + } + + // base64 for everyone else + return new JsonString(System.Convert.ToBase64String(content)); + } + + internal static byte[] DeserializeContent(string content, bool isBase64) + { + if (string.IsNullOrWhiteSpace(content)) + { + return new byte[0]; + } + + if (isBase64) + { + try + { + return System.Convert.FromBase64String(content); + } + catch + { + // hmm. didn't work, return it as a string I guess. + } + } + return System.Text.Encoding.UTF8.GetBytes(content); + } + + public void SaveMessage(string rqKey, HttpRequestMessage request, HttpResponseMessage response) + { + var messages = System.IO.File.Exists(this.recordingPath) ? Load() : new JsonObject() ?? new JsonObject(); + bool isBase64Request = false; + bool isBase64Response = false; + messages[rqKey] = new JsonObject { + { "Request",new JsonObject { + { "Method", request.Method.Method }, + { "RequestUri", request.RequestUri }, + { "Content", SerializeContent( request.Content, ref isBase64Request) }, + { "isContentBase64", isBase64Request }, + { "Headers", new JsonObject(FilterHeaders(request.Headers)) }, + { "ContentHeaders", request.Content == null ? new JsonObject() : new JsonObject(FilterHeaders(request.Content.Headers))} + } }, + {"Response", new JsonObject { + { "StatusCode", (int)response.StatusCode}, + { "Headers", new JsonObject(FilterHeaders(response.Headers))}, + { "ContentHeaders", new JsonObject(FilterHeaders(response.Content.Headers))}, + { "Content", SerializeContent(response.Content, ref isBase64Response) }, + { "isContentBase64", isBase64Response }, + }} + }; + System.IO.File.WriteAllText(this.recordingPath, messages.ToString()); + } + + private JsonObject Load() + { + if (System.IO.File.Exists(this.recordingPath)) + { + try + { + return JsonObject.FromStream(System.IO.File.OpenRead(this.recordingPath)); + } + catch + { + throw new System.Exception($"Invalid recording file: '{recordingPath}'"); + } + } + + throw new System.ArgumentException($"Missing recording file: '{recordingPath}'", nameof(recordingPath)); + } + + public HttpResponseMessage LoadMessage(string rqKey) + { + var responses = Load(); + var message = responses.Property(rqKey); + + if (null == message) + { + throw new System.ArgumentException($"Missing Request '{rqKey}' in recording file", nameof(rqKey)); + } + + var sc = 0; + var reqMessage = message.Property("Request"); + var respMessage = message.Property("Response"); + + // --------------------------- deserialize response ---------------------------------------------------------------- + bool isBase64Response = false; + respMessage.BooleanProperty("isContentBase64", ref isBase64Response); + var response = new HttpResponseMessage + { + StatusCode = (HttpStatusCode)respMessage.NumberProperty("StatusCode", ref sc), + Content = new System.Net.Http.ByteArrayContent(DeserializeContent(respMessage.StringProperty("Content"), isBase64Response)) + }; + + foreach (var each in respMessage.Property("Headers")) + { + response.Headers.TryAddWithoutValidation(each.Key, each.Value.ToArrayOf()); + } + + foreach (var frh in ForceResponseHeaders) + { + response.Headers.Remove(frh.Key); + response.Headers.TryAddWithoutValidation(frh.Key, frh.Value); + } + + foreach (var each in respMessage.Property("ContentHeaders")) + { + response.Content.Headers.TryAddWithoutValidation(each.Key, each.Value.ToArrayOf()); + } + + // --------------------------- deserialize request ---------------------------------------------------------------- + bool isBase64Request = false; + reqMessage.BooleanProperty("isContentBase64", ref isBase64Request); + response.RequestMessage = new HttpRequestMessage + { + Method = new HttpMethod(reqMessage.StringProperty("Method")), + RequestUri = new System.Uri(reqMessage.StringProperty("RequestUri")), + Content = new System.Net.Http.ByteArrayContent(DeserializeContent(reqMessage.StringProperty("Content"), isBase64Request)) + }; + + foreach (var each in reqMessage.Property("Headers")) + { + response.RequestMessage.Headers.TryAddWithoutValidation(each.Key, each.Value.ToArrayOf()); + } + foreach (var each in reqMessage.Property("ContentHeaders")) + { + response.RequestMessage.Content.Headers.TryAddWithoutValidation(each.Key, each.Value.ToArrayOf()); + } + + return response; + } + + public async Task SendAsync(HttpRequestMessage request, IEventListener callback, ISendAsync next) + { + counter++; + var rqkey = $"{Description}+{Context}+{Scenario}+${request.Method.Method}+{request.RequestUri}+{counter}"; + + switch (Mode) + { + case MockMode.Record: + //Add following code since the request.Content will be released after sendAsync + var requestClone = request; + if (requestClone.Content != null) + { + requestClone = await request.CloneWithContent(request.RequestUri, request.Method); + } + // make the call + var response = await next.SendAsync(request, callback); + + // save the message to the recording file + SaveMessage(rqkey, requestClone, response); + + // return the response. + return response; + + case MockMode.Playback: + // load and return the response. + return LoadMessage(rqkey); + + default: + // pass-thru, do nothing + return await next.SendAsync(request, callback); + } + } + } +} diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Properties/Resources.Designer.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Properties/Resources.Designer.cs new file mode 100644 index 000000000000..555175b51cf3 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Properties/Resources.Designer.cs @@ -0,0 +1,5655 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.generated.runtime.Properties +{ + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Resources.ResourceManager ResourceManager + { + get + { + if (object.ReferenceEquals(resourceMan, null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.Azure.PowerShell.Cmdlets.Sphere.generated.runtime.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to The remote server returned an error: (401) Unauthorized.. + /// + public static string AccessDeniedExceptionMessage + { + get + { + return ResourceManager.GetString("AccessDeniedExceptionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account id doesn't match one in subscription.. + /// + public static string AccountIdDoesntMatchSubscription + { + get + { + return ResourceManager.GetString("AccountIdDoesntMatchSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account needs to be specified. + /// + public static string AccountNeedsToBeSpecified + { + get + { + return ResourceManager.GetString("AccountNeedsToBeSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account "{0}" has been added.. + /// + public static string AddAccountAdded + { + get + { + return ResourceManager.GetString("AddAccountAdded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to To switch to a different subscription, please use Select-AzureSubscription.. + /// + public static string AddAccountChangeSubscription + { + get + { + return ResourceManager.GetString("AddAccountChangeSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Skipping external tenant {0}, because you are using a guest or a foreign principal object identity. In order to access this tenant, please run Add-AzureAccount without "-Credential".. + /// + public static string AddAccountNonInteractiveGuestOrFpo + { + get + { + return ResourceManager.GetString("AddAccountNonInteractiveGuestOrFpo", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Subscription "{0}" is selected as the default subscription.. + /// + public static string AddAccountShowDefaultSubscription + { + get + { + return ResourceManager.GetString("AddAccountShowDefaultSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to To view all the subscriptions, please use Get-AzureSubscription.. + /// + public static string AddAccountViewSubscriptions + { + get + { + return ResourceManager.GetString("AddAccountViewSubscriptions", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add-On {0} is created successfully.. + /// + public static string AddOnCreatedMessage + { + get + { + return ResourceManager.GetString("AddOnCreatedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add-on name {0} is already used.. + /// + public static string AddOnNameAlreadyUsed + { + get + { + return ResourceManager.GetString("AddOnNameAlreadyUsed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add-On {0} not found.. + /// + public static string AddOnNotFound + { + get + { + return ResourceManager.GetString("AddOnNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add-on {0} is removed successfully.. + /// + public static string AddOnRemovedMessage + { + get + { + return ResourceManager.GetString("AddOnRemovedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add-On {0} is updated successfully.. + /// + public static string AddOnUpdatedMessage + { + get + { + return ResourceManager.GetString("AddOnUpdatedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role has been created at {0}\{1}.. + /// + public static string AddRoleMessageCreate + { + get + { + return ResourceManager.GetString("AddRoleMessageCreate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role has been created at {0}\{1}. For easy access to Microsoft Azure services from your application code, install the Microsoft Azure client library for Node.js by running ‘npm install azure’.. + /// + public static string AddRoleMessageCreateNode + { + get + { + return ResourceManager.GetString("AddRoleMessageCreateNode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role has been created at {0}\{1}. For easy access to Microsoft Azure services from your application code, install the Microsoft Azure client library for PHP by running "pear WindowsAzure/WindowsAzure".. + /// + public static string AddRoleMessageCreatePHP + { + get + { + return ResourceManager.GetString("AddRoleMessageCreatePHP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to set role permissions. Please give the 'Network Service' user 'Read & execute' and 'Modify' permissions to the role folder, or run PowerShell as an Administrator. + /// + public static string AddRoleMessageInsufficientPermissions + { + get + { + return ResourceManager.GetString("AddRoleMessageInsufficientPermissions", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A role name '{0}' already exists. + /// + public static string AddRoleMessageRoleExists + { + get + { + return ResourceManager.GetString("AddRoleMessageRoleExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Profile {0} already has an endpoint with name {1}. + /// + public static string AddTrafficManagerEndpointFailed + { + get + { + return ResourceManager.GetString("AddTrafficManagerEndpointFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Azure PowerShell collects usage data in order to improve your experience. + ///The data is anonymous and does not include commandline argument values. + ///The data is collected by Microsoft. + /// + ///Use the Disable-AzDataCollection cmdlet to turn the feature Off. The cmdlet can be found in the Az.Accounts module. To disable data collection: PS > Disable-AzDataCollection. + ///Use the Enable-AzDataCollection cmdlet to turn the feature On. The cmdlet can be found in the Az.Accounts module. To enable [rest of string was truncated]";. + /// + public static string ARMDataCollectionMessage + { + get + { + return ResourceManager.GetString("ARMDataCollectionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [Common.Authentication]: Authenticating for account {0} with single tenant {1}.. + /// + public static string AuthenticatingForSingleTenant + { + get + { + return ResourceManager.GetString("AuthenticatingForSingleTenant", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Windows Azure Powershell\. + /// + public static string AzureDirectory + { + get + { + return ResourceManager.GetString("AzureDirectory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to https://manage.windowsazure.com. + /// + public static string AzurePortalUrl + { + get + { + return ResourceManager.GetString("AzurePortalUrl", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to AZURE_PORTAL_URL. + /// + public static string AzurePortalUrlEnv + { + get + { + return ResourceManager.GetString("AzurePortalUrlEnv", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Selected profile must not be null.. + /// + public static string AzureProfileMustNotBeNull + { + get + { + return ResourceManager.GetString("AzureProfileMustNotBeNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Azure SDK\{0}\. + /// + public static string AzureSdkDirectory + { + get + { + return ResourceManager.GetString("AzureSdkDirectory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to File '{0}' already exists. Use the -Force parameter to overwrite it.. + /// + public static string AzureVMDscArchiveAlreadyExists + { + get + { + return ResourceManager.GetString("AzureVMDscArchiveAlreadyExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find configuration data file: {0}. + /// + public static string AzureVMDscCannotFindConfigurationDataFile + { + get + { + return ResourceManager.GetString("AzureVMDscCannotFindConfigurationDataFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Create Archive. + /// + public static string AzureVMDscCreateArchiveAction + { + get + { + return ResourceManager.GetString("AzureVMDscCreateArchiveAction", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The configuration data must be a .psd1 file. + /// + public static string AzureVMDscInvalidConfigurationDataFile + { + get + { + return ResourceManager.GetString("AzureVMDscInvalidConfigurationDataFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Parsing configuration script: {0}. + /// + public static string AzureVMDscParsingConfiguration + { + get + { + return ResourceManager.GetString("AzureVMDscParsingConfiguration", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Storage Blob '{0}' already exists. Use the -Force parameter to overwrite it.. + /// + public static string AzureVMDscStorageBlobAlreadyExists + { + get + { + return ResourceManager.GetString("AzureVMDscStorageBlobAlreadyExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Upload '{0}'. + /// + public static string AzureVMDscUploadToBlobStorageAction + { + get + { + return ResourceManager.GetString("AzureVMDscUploadToBlobStorageAction", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Execution failed because a background thread could not prompt the user.. + /// + public static string BaseShouldMethodFailureReason + { + get + { + return ResourceManager.GetString("BaseShouldMethodFailureReason", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Base Uri was empty.. + /// + public static string BaseUriEmpty + { + get + { + return ResourceManager.GetString("BaseUriEmpty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} begin processing without ParameterSet.. + /// + public static string BeginProcessingWithoutParameterSetLog + { + get + { + return ResourceManager.GetString("BeginProcessingWithoutParameterSetLog", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} begin processing with ParameterSet '{1}'.. + /// + public static string BeginProcessingWithParameterSetLog + { + get + { + return ResourceManager.GetString("BeginProcessingWithParameterSetLog", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Blob with the name {0} already exists in the account.. + /// + public static string BlobAlreadyExistsInTheAccount + { + get + { + return ResourceManager.GetString("BlobAlreadyExistsInTheAccount", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to https://{0}.blob.core.windows.net/. + /// + public static string BlobEndpointUri + { + get + { + return ResourceManager.GetString("BlobEndpointUri", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to AZURE_BLOBSTORAGE_TEMPLATE. + /// + public static string BlobEndpointUriEnv + { + get + { + return ResourceManager.GetString("BlobEndpointUriEnv", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The parameter : '{0}' is changing.. + /// + public static string BreakingChangeAttributeParameterChanging + { + get + { + return ResourceManager.GetString("BreakingChangeAttributeParameterChanging", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The parameter : '{0}' is becoming mandatory.. + /// + public static string BreakingChangeAttributeParameterMandatoryNow + { + get + { + return ResourceManager.GetString("BreakingChangeAttributeParameterMandatoryNow", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The parameter : '{0}' is being replaced by parameter : '{1}'.. + /// + public static string BreakingChangeAttributeParameterReplaced + { + get + { + return ResourceManager.GetString("BreakingChangeAttributeParameterReplaced", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The parameter : '{0}' is being replaced by mandatory parameter : '{1}'.. + /// + public static string BreakingChangeAttributeParameterReplacedMandatory + { + get + { + return ResourceManager.GetString("BreakingChangeAttributeParameterReplacedMandatory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The type of the parameter is changing from '{0}' to '{1}'.. + /// + public static string BreakingChangeAttributeParameterTypeChange + { + get + { + return ResourceManager.GetString("BreakingChangeAttributeParameterTypeChange", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Change description : {0} + ///. + /// + public static string BreakingChangesAttributesChangeDescriptionMessage + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesChangeDescriptionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The cmdlet is being deprecated. There will be no replacement for it.. + /// + public static string BreakingChangesAttributesCmdLetDeprecationMessageNoReplacement + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesCmdLetDeprecationMessageNoReplacement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The cmdlet is being deprecated. There will be no replacement for it.. + /// + public static string BreakingChangesAttributesParameterSetDeprecationMessageNoReplacement + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesParameterSetDeprecationMessageNoReplacement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The cmdlet '{0}' is replacing this cmdlet.. + /// + public static string BreakingChangesAttributesCmdLetDeprecationMessageWithReplacement + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesCmdLetDeprecationMessageWithReplacement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The output type is changing from the existing type :'{0}' to the new type :'{1}'. + /// + public static string BreakingChangesAttributesCmdLetOutputChange1 + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesCmdLetOutputChange1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to "The output type '{0}' is changing". + /// + public static string BreakingChangesAttributesCmdLetOutputChange2 + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesCmdLetOutputChange2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to + ///- The following properties are being added to the output type : + ///. + /// + public static string BreakingChangesAttributesCmdLetOutputPropertiesAdded + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesCmdLetOutputPropertiesAdded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to + /// - The following properties in the output type are being deprecated : + ///. + /// + public static string BreakingChangesAttributesCmdLetOutputPropertiesRemoved + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesCmdLetOutputPropertiesRemoved", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The output type '{0}' is being deprecated without a replacement.. + /// + public static string BreakingChangesAttributesCmdLetOutputTypeDeprecated + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesCmdLetOutputTypeDeprecated", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to - {0} + /// + ///. + /// + public static string BreakingChangesAttributesDeclarationMessage + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesDeclarationMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to - Cmdlet : '{0}' + /// - {1} + ///. + /// + public static string BreakingChangesAttributesDeclarationMessageWithCmdletName + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesDeclarationMessageWithCmdletName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to NOTE : Go to {0} for steps to suppress (and other related information on) the breaking change messages.. + /// + public static string BreakingChangesAttributesFooterMessage + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesFooterMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Breaking changes in the cmdlet '{0}' :. + /// + public static string BreakingChangesAttributesHeaderMessage + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesHeaderMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Note : This change will take effect on '{0}' + ///. + /// + public static string BreakingChangesAttributesInEffectByDateMessage + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesInEffectByDateMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Note :The change is expected to take effect from version : '{0}' + /// + ///. + /// + public static string BreakingChangesAttributesInEffectByVersion + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesInEffectByVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Note :The change is expected to take effect from az version : '{0}' + /// + ///. + /// + public static string BreakingChangesAttributesInEffectByAzVersion + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesInEffectByAzVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ```powershell + ///# Old + ///{0} + /// + ///# New + ///{1} + ///``` + /// + ///. + /// + public static string BreakingChangesAttributesUsageChangeMessage + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesUsageChangeMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cmdlet invocation changes : + /// Old Way : {0} + /// New Way : {1}. + /// + public static string BreakingChangesAttributesUsageChangeMessageConsole + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesUsageChangeMessageConsole", resourceCulture); + } + } + + /// + /// The cmdlet is in experimental stage. The function may not be enabled in current subscription. + /// + public static string ExperimentalCmdletMessage + { + get + { + return ResourceManager.GetString("ExperimentalCmdletMessage", resourceCulture); + } + } + + + + /// + /// Looks up a localized string similar to CACHERUNTIMEURL. + /// + public static string CacheRuntimeUrl + { + get + { + return ResourceManager.GetString("CacheRuntimeUrl", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to cache. + /// + public static string CacheRuntimeValue + { + get + { + return ResourceManager.GetString("CacheRuntimeValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to CacheRuntimeVersion. + /// + public static string CacheRuntimeVersionKey + { + get + { + return ResourceManager.GetString("CacheRuntimeVersionKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Installing caching version {0} for Role '{1}' (the caching version locally installed is: {2}). + /// + public static string CacheVersionWarningText + { + get + { + return ResourceManager.GetString("CacheVersionWarningText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot change built-in environment {0}.. + /// + public static string CannotChangeBuiltinEnvironment + { + get + { + return ResourceManager.GetString("CannotChangeBuiltinEnvironment", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find {0} with name {1}.. + /// + public static string CannotFind + { + get + { + return ResourceManager.GetString("CannotFind", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deployment for service {0} with {1} slot doesn't exist. + /// + public static string CannotFindDeployment + { + get + { + return ResourceManager.GetString("CannotFindDeployment", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Can't find valid Microsoft Azure role in current directory {0}. + /// + public static string CannotFindRole + { + get + { + return ResourceManager.GetString("CannotFindRole", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service {0} configuration file (ServiceConfiguration.Cloud.cscfg) is either null or doesn't exist. + /// + public static string CannotFindServiceConfigurationFile + { + get + { + return ResourceManager.GetString("CannotFindServiceConfigurationFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid service path! Cannot locate ServiceDefinition.csdef in current folder or parent folders.. + /// + public static string CannotFindServiceRoot + { + get + { + return ResourceManager.GetString("CannotFindServiceRoot", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The subscription named {0} with id {1} is not currently imported. You must import this subscription before it can be updated.. + /// + public static string CannotUpdateUnknownSubscription + { + get + { + return ResourceManager.GetString("CannotUpdateUnknownSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ManagementCertificate. + /// + public static string CertificateElementName + { + get + { + return ResourceManager.GetString("CertificateElementName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to certificate.pfx. + /// + public static string CertificateFileName + { + get + { + return ResourceManager.GetString("CertificateFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Certificate imported into CurrentUser\My\{0}. + /// + public static string CertificateImportedMessage + { + get + { + return ResourceManager.GetString("CertificateImportedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No certificate was found in the certificate store with thumbprint {0}. + /// + public static string CertificateNotFoundInStore + { + get + { + return ResourceManager.GetString("CertificateNotFoundInStore", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Your account does not have access to the private key for certificate {0}. + /// + public static string CertificatePrivateKeyAccessError + { + get + { + return ResourceManager.GetString("CertificatePrivateKeyAccessError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} {1} deployment for {2} service. + /// + public static string ChangeDeploymentStateWaitMessage + { + get + { + return ResourceManager.GetString("ChangeDeploymentStateWaitMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cloud service {0} is in {1} state.. + /// + public static string ChangeDeploymentStatusCompleteMessage + { + get + { + return ResourceManager.GetString("ChangeDeploymentStatusCompleteMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Changing/Removing public environment '{0}' is not allowed.. + /// + public static string ChangePublicEnvironmentMessage + { + get + { + return ResourceManager.GetString("ChangePublicEnvironmentMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service {0} is set to value {1}. + /// + public static string ChangeSettingsElementMessage + { + get + { + return ResourceManager.GetString("ChangeSettingsElementMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Changing public environment is not supported.. + /// + public static string ChangingDefaultEnvironmentNotSupported + { + get + { + return ResourceManager.GetString("ChangingDefaultEnvironmentNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Choose which publish settings file to use:. + /// + public static string ChoosePublishSettingsFile + { + get + { + return ResourceManager.GetString("ChoosePublishSettingsFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.WindowsAzure.Plugins.Caching.ClientDiagnosticLevel. + /// + public static string ClientDiagnosticLevelName + { + get + { + return ResourceManager.GetString("ClientDiagnosticLevelName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 1. + /// + public static string ClientDiagnosticLevelValue + { + get + { + return ResourceManager.GetString("ClientDiagnosticLevelValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to cloud_package.cspkg. + /// + public static string CloudPackageFileName + { + get + { + return ResourceManager.GetString("CloudPackageFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ServiceConfiguration.Cloud.cscfg. + /// + public static string CloudServiceConfigurationFileName + { + get + { + return ResourceManager.GetString("CloudServiceConfigurationFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add-ons for {0}. + /// + public static string CloudServiceDescription + { + get + { + return ResourceManager.GetString("CloudServiceDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Communication could not be established. This could be due to an invalid subscription ID. Note that subscription IDs are case sensitive.. + /// + public static string CommunicationCouldNotBeEstablished + { + get + { + return ResourceManager.GetString("CommunicationCouldNotBeEstablished", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Complete. + /// + public static string CompleteMessage + { + get + { + return ResourceManager.GetString("CompleteMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to OperationID : '{0}'. + /// + public static string ComputeCloudExceptionOperationIdMessage + { + get + { + return ResourceManager.GetString("ComputeCloudExceptionOperationIdMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to config.json. + /// + public static string ConfigurationFileName + { + get + { + return ResourceManager.GetString("ConfigurationFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to VirtualMachine creation failed.. + /// + public static string CreateFailedErrorMessage + { + get + { + return ResourceManager.GetString("CreateFailedErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Creating the website failed. If this is the first website for this subscription, please create it using the management portal instead.. + /// + public static string CreateWebsiteFailed + { + get + { + return ResourceManager.GetString("CreateWebsiteFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.ApplicationServer.Caching.DataCacheClientsSection, Microsoft.ApplicationServer.Caching.Core. + /// + public static string DataCacheClientsType + { + get + { + return ResourceManager.GetString("DataCacheClientsType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to //blobcontainer[@datacenter='{0}']. + /// + public static string DatacenterBlobQuery + { + get + { + return ResourceManager.GetString("DatacenterBlobQuery", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft Azure PowerShell Data Collection Confirmation. + /// + public static string DataCollectionActivity + { + get + { + return ResourceManager.GetString("DataCollectionActivity", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You choose not to participate in Microsoft Azure PowerShell data collection.. + /// + public static string DataCollectionConfirmNo + { + get + { + return ResourceManager.GetString("DataCollectionConfirmNo", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This confirmation message will be dismissed in '{0}' second(s).... + /// + public static string DataCollectionConfirmTime + { + get + { + return ResourceManager.GetString("DataCollectionConfirmTime", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You choose to participate in Microsoft Azure PowerShell data collection.. + /// + public static string DataCollectionConfirmYes + { + get + { + return ResourceManager.GetString("DataCollectionConfirmYes", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The setting profile has been saved to the following path '{0}'.. + /// + public static string DataCollectionSaveFileInformation + { + get + { + return ResourceManager.GetString("DataCollectionSaveFileInformation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Setting: {0} as the default and current subscription. To view other subscriptions use Get-AzureSubscription. + /// + public static string DefaultAndCurrentSubscription + { + get + { + return ResourceManager.GetString("DefaultAndCurrentSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to none. + /// + public static string DefaultFileVersion + { + get + { + return ResourceManager.GetString("DefaultFileVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There are no hostnames which could be used for validation.. + /// + public static string DefaultHostnamesValidation + { + get + { + return ResourceManager.GetString("DefaultHostnamesValidation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 8080. + /// + public static string DefaultPort + { + get + { + return ResourceManager.GetString("DefaultPort", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 1000. + /// + public static string DefaultRoleCachingInMB + { + get + { + return ResourceManager.GetString("DefaultRoleCachingInMB", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Auto. + /// + public static string DefaultUpgradeMode + { + get + { + return ResourceManager.GetString("DefaultUpgradeMode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 80. + /// + public static string DefaultWebPort + { + get + { + return ResourceManager.GetString("DefaultWebPort", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Delete. + /// + public static string Delete + { + get + { + return ResourceManager.GetString("Delete", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The {0} slot for service {1} is already in {2} state. + /// + public static string DeploymentAlreadyInState + { + get + { + return ResourceManager.GetString("DeploymentAlreadyInState", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The deployment in {0} slot for service {1} is removed. + /// + public static string DeploymentRemovedMessage + { + get + { + return ResourceManager.GetString("DeploymentRemovedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.WindowsAzure.Plugins.Caching.DiagnosticLevel. + /// + public static string DiagnosticLevelName + { + get + { + return ResourceManager.GetString("DiagnosticLevelName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 1. + /// + public static string DiagnosticLevelValue + { + get + { + return ResourceManager.GetString("DiagnosticLevelValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The key to add already exists in the dictionary.. + /// + public static string DictionaryAddAlreadyContainsKey + { + get + { + return ResourceManager.GetString("DictionaryAddAlreadyContainsKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The array index cannot be less than zero.. + /// + public static string DictionaryCopyToArrayIndexLessThanZero + { + get + { + return ResourceManager.GetString("DictionaryCopyToArrayIndexLessThanZero", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The supplied array does not have enough room to contain the copied elements.. + /// + public static string DictionaryCopyToArrayTooShort + { + get + { + return ResourceManager.GetString("DictionaryCopyToArrayTooShort", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided dns {0} doesn't exist. + /// + public static string DnsDoesNotExist + { + get + { + return ResourceManager.GetString("DnsDoesNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft Azure Certificate. + /// + public static string EnableRemoteDesktop_FriendlyCertificateName + { + get + { + return ResourceManager.GetString("EnableRemoteDesktop_FriendlyCertificateName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Endpoint can't be retrieved for storage account. + /// + public static string EndPointNotFoundForBlobStorage + { + get + { + return ResourceManager.GetString("EndPointNotFoundForBlobStorage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} end processing.. + /// + public static string EndProcessingLog + { + get + { + return ResourceManager.GetString("EndProcessingLog", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to To use Active Directory authentication, you must configure the ActiveDirectoryEndpoint, ActiveDirectoryTenantId, and ActiveDirectorServiceEndpointResourceId for environment of '{0}'. You can configure these properties for this environment using the Set-AzureEnvironment cmdlet.. + /// + public static string EnvironmentDoesNotSupportActiveDirectory + { + get + { + return ResourceManager.GetString("EnvironmentDoesNotSupportActiveDirectory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The environment '{0}' already exists.. + /// + public static string EnvironmentExists + { + get + { + return ResourceManager.GetString("EnvironmentExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Environment name doesn't match one in subscription.. + /// + public static string EnvironmentNameDoesntMatchSubscription + { + get + { + return ResourceManager.GetString("EnvironmentNameDoesntMatchSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Environment name needs to be specified.. + /// + public static string EnvironmentNameNeedsToBeSpecified + { + get + { + return ResourceManager.GetString("EnvironmentNameNeedsToBeSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Environment needs to be specified.. + /// + public static string EnvironmentNeedsToBeSpecified + { + get + { + return ResourceManager.GetString("EnvironmentNeedsToBeSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The environment name '{0}' is not found.. + /// + public static string EnvironmentNotFound + { + get + { + return ResourceManager.GetString("EnvironmentNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to environments.xml. + /// + public static string EnvironmentsFileName + { + get + { + return ResourceManager.GetString("EnvironmentsFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error creating VirtualMachine. + /// + public static string ErrorCreatingVirtualMachine + { + get + { + return ResourceManager.GetString("ErrorCreatingVirtualMachine", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to download available runtimes for location '{0}'. + /// + public static string ErrorRetrievingRuntimesForLocation + { + get + { + return ResourceManager.GetString("ErrorRetrievingRuntimesForLocation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error updating VirtualMachine. + /// + public static string ErrorUpdatingVirtualMachine + { + get + { + return ResourceManager.GetString("ErrorUpdatingVirtualMachine", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Job Id {0} failed. Error: {1}, ExceptionDetails: {2}. + /// + public static string FailedJobErrorMessage + { + get + { + return ResourceManager.GetString("FailedJobErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to File path is not valid.. + /// + public static string FilePathIsNotValid + { + get + { + return ResourceManager.GetString("FilePathIsNotValid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The HTTP request was forbidden with client authentication scheme 'Anonymous'.. + /// + public static string FirstPurchaseErrorMessage + { + get + { + return ResourceManager.GetString("FirstPurchaseErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This add-on requires you to purchase the first instance through the Microsoft Azure Portal. Subsequent purchases can be performed through PowerShell.. + /// + public static string FirstPurchaseMessage + { + get + { + return ResourceManager.GetString("FirstPurchaseMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Operation Status:. + /// + public static string GatewayOperationStatus + { + get + { + return ResourceManager.GetString("GatewayOperationStatus", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resources\Scaffolding\General. + /// + public static string GeneralScaffolding + { + get + { + return ResourceManager.GetString("GeneralScaffolding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Getting all available Microsoft Azure Add-Ons, this may take few minutes.... + /// + public static string GetAllAddOnsWaitMessage + { + get + { + return ResourceManager.GetString("GetAllAddOnsWaitMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Name{0}Primary Key{0}Seconday Key. + /// + public static string GetStorageKeysHeader + { + get + { + return ResourceManager.GetString("GetStorageKeysHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Git not found. Please install git and place it in your command line path.. + /// + public static string GitNotFound + { + get + { + return ResourceManager.GetString("GitNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not find publish settings. Please run Import-AzurePublishSettingsFile.. + /// + public static string GlobalSettingsManager_Load_PublishSettingsNotFound + { + get + { + return ResourceManager.GetString("GlobalSettingsManager_Load_PublishSettingsNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find the WadCfg end element in the config.. + /// + public static string IaasDiagnosticsBadConfigNoEndWadCfg + { + get + { + return ResourceManager.GetString("IaasDiagnosticsBadConfigNoEndWadCfg", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WadCfg start element in the config is not matching the end element.. + /// + public static string IaasDiagnosticsBadConfigNoMatchingWadCfg + { + get + { + return ResourceManager.GetString("IaasDiagnosticsBadConfigNoMatchingWadCfg", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find the WadCfg element in the config.. + /// + public static string IaasDiagnosticsBadConfigNoWadCfg + { + get + { + return ResourceManager.GetString("IaasDiagnosticsBadConfigNoWadCfg", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to iisnode.dll. + /// + public static string IISNodeDll + { + get + { + return ResourceManager.GetString("IISNodeDll", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to iisnode. + /// + public static string IISNodeEngineKey + { + get + { + return ResourceManager.GetString("IISNodeEngineKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to iisnode-dev\\release\\x64. + /// + public static string IISNodePath + { + get + { + return ResourceManager.GetString("IISNodePath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to iisnode. + /// + public static string IISNodeRuntimeValue + { + get + { + return ResourceManager.GetString("IISNodeRuntimeValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Installing IISNode version {0} in Azure for WebRole '{1}' (the version locally installed is: {2}). + /// + public static string IISNodeVersionWarningText + { + get + { + return ResourceManager.GetString("IISNodeVersionWarningText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Illegal characters in path.. + /// + public static string IllegalPath + { + get + { + return ResourceManager.GetString("IllegalPath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Internal Server Error. + /// + public static string InternalServerErrorMessage + { + get + { + return ResourceManager.GetString("InternalServerErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot enable memcach protocol on a cache worker role {0}.. + /// + public static string InvalidCacheRoleName + { + get + { + return ResourceManager.GetString("InvalidCacheRoleName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid certificate format. Publish settings may be corrupted. Use Get-AzurePublishSettingsFile to download updated settings. + /// + public static string InvalidCertificate + { + get + { + return ResourceManager.GetString("InvalidCertificate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid certificate format.. + /// + public static string InvalidCertificateSingle + { + get + { + return ResourceManager.GetString("InvalidCertificateSingle", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided configuration path is invalid or doesn't exist. + /// + public static string InvalidConfigPath + { + get + { + return ResourceManager.GetString("InvalidConfigPath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The country name is invalid, please use a valid two character country code, as described in ISO 3166-1 alpha-2.. + /// + public static string InvalidCountryNameMessage + { + get + { + return ResourceManager.GetString("InvalidCountryNameMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No default subscription has been designated. Use Select-AzureSubscription -Default <subscriptionName> to set the default subscription.. + /// + public static string InvalidDefaultSubscription + { + get + { + return ResourceManager.GetString("InvalidDefaultSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deployment with {0} does not exist. + /// + public static string InvalidDeployment + { + get + { + return ResourceManager.GetString("InvalidDeployment", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The deployment slot name {0} is invalid. Slot name must be either "Staging" or "Production".. + /// + public static string InvalidDeploymentSlot + { + get + { + return ResourceManager.GetString("InvalidDeploymentSlot", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to "{0}" is an invalid DNS name for {1}. + /// + public static string InvalidDnsName + { + get + { + return ResourceManager.GetString("InvalidDnsName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid service endpoint.. + /// + public static string InvalidEndpoint + { + get + { + return ResourceManager.GetString("InvalidEndpoint", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided file in {0} must be have {1} extension. + /// + public static string InvalidFileExtension + { + get + { + return ResourceManager.GetString("InvalidFileExtension", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to File {0} has invalid characters. + /// + public static string InvalidFileName + { + get + { + return ResourceManager.GetString("InvalidFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You must create your git publishing credentials using the Microsoft Azure portal. + ///Please follow these steps in the portal: + ///1. On the left side open "Web Sites" + ///2. Click on any website + ///3. Choose "Setup Git Publishing" or "Reset deployment credentials" + ///4. Back in the PowerShell window, rerun this command by typing "New-AzureWebSite {site name} -Git -PublishingUsername {username}. + /// + public static string InvalidGitCredentials + { + get + { + return ResourceManager.GetString("InvalidGitCredentials", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The value {0} provided is not a valid GUID. Please provide a valid GUID.. + /// + public static string InvalidGuid + { + get + { + return ResourceManager.GetString("InvalidGuid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The specified hostname does not exist. Please specify a valid hostname for the site.. + /// + public static string InvalidHostnameValidation + { + get + { + return ResourceManager.GetString("InvalidHostnameValidation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role {0} instances must be greater than or equal 0 and less than or equal 20. + /// + public static string InvalidInstancesCount + { + get + { + return ResourceManager.GetString("InvalidInstancesCount", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There was an error creating your webjob. Please make sure that the script is in the root folder of the zip file.. + /// + public static string InvalidJobFile + { + get + { + return ResourceManager.GetString("InvalidJobFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not download a valid runtime manifest, Please check your internet connection and try again.. + /// + public static string InvalidManifestError + { + get + { + return ResourceManager.GetString("InvalidManifestError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The account {0} was not found. Please specify a valid account name.. + /// + public static string InvalidMediaServicesAccount + { + get + { + return ResourceManager.GetString("InvalidMediaServicesAccount", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided name "{0}" does not match the service bus namespace naming rules.. + /// + public static string InvalidNamespaceName + { + get + { + return ResourceManager.GetString("InvalidNamespaceName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Path must specify a valid path to an Azure profile.. + /// + public static string InvalidNewProfilePath + { + get + { + return ResourceManager.GetString("InvalidNewProfilePath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Value cannot be null. Parameter name: '{0}'. + /// + public static string InvalidNullArgument + { + get + { + return ResourceManager.GetString("InvalidNullArgument", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} is invalid or empty. + /// + public static string InvalidOrEmptyArgumentMessage + { + get + { + return ResourceManager.GetString("InvalidOrEmptyArgumentMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided package path is invalid or doesn't exist. + /// + public static string InvalidPackagePath + { + get + { + return ResourceManager.GetString("InvalidPackagePath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '{0}' is an invalid parameter set name.. + /// + public static string InvalidParameterSetName + { + get + { + return ResourceManager.GetString("InvalidParameterSetName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} doesn't exist in {1} or you've not passed valid value for it. + /// + public static string InvalidPath + { + get + { + return ResourceManager.GetString("InvalidPath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Path {0} has invalid characters. + /// + public static string InvalidPathName + { + get + { + return ResourceManager.GetString("InvalidPathName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Property bag Hashtable must contain one of the following sets of properties: {SubscriptionId, Certificate}, {SubscriptionId, Username, Password}, {SubscriptionId, ServicePrincipal, Password, Tenant}, {SubscriptionId, AccountId, Token}. + /// + public static string InvalidProfileProperties + { + get + { + return ResourceManager.GetString("InvalidProfileProperties", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided publish settings file {0} has invalid content. Please get valid by running cmdlet Get-AzurePublishSettingsFile. + /// + public static string InvalidPublishSettingsSchema + { + get + { + return ResourceManager.GetString("InvalidPublishSettingsSchema", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided role name "{0}" has invalid characters. + /// + public static string InvalidRoleNameMessage + { + get + { + return ResourceManager.GetString("InvalidRoleNameMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A valid name for the service root folder is required. + /// + public static string InvalidRootNameMessage + { + get + { + return ResourceManager.GetString("InvalidRootNameMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} is not a recognized runtime type. + /// + public static string InvalidRuntimeError + { + get + { + return ResourceManager.GetString("InvalidRuntimeError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A valid language is required. + /// + public static string InvalidScaffoldingLanguageArg + { + get + { + return ResourceManager.GetString("InvalidScaffoldingLanguageArg", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No subscription is currently selected. Use Select-Subscription to activate a subscription.. + /// + public static string InvalidSelectedSubscription + { + get + { + return ResourceManager.GetString("InvalidSelectedSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided location "{0}" does not exist in the available locations use Get-AzureSBLocation for listing available locations.. + /// + public static string InvalidServiceBusLocation + { + get + { + return ResourceManager.GetString("InvalidServiceBusLocation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please provide a service name or run this command from inside a service project directory.. + /// + public static string InvalidServiceName + { + get + { + return ResourceManager.GetString("InvalidServiceName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You must provide valid value for {0}. + /// + public static string InvalidServiceSettingElement + { + get + { + return ResourceManager.GetString("InvalidServiceSettingElement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to settings.json is invalid or doesn't exist. + /// + public static string InvalidServiceSettingMessage + { + get + { + return ResourceManager.GetString("InvalidServiceSettingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The subscription named '{0}' cannot be found. Use Set-AzureSubscription to initialize the subscription data.. + /// + public static string InvalidSubscription + { + get + { + return ResourceManager.GetString("InvalidSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided subscription id {0} is not valid. + /// + public static string InvalidSubscriptionId + { + get + { + return ResourceManager.GetString("InvalidSubscriptionId", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Must specify a non-null subscription name.. + /// + public static string InvalidSubscriptionName + { + get + { + return ResourceManager.GetString("InvalidSubscriptionName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A valid subscription name is required. This can be provided using the -Subscription parameter or by setting the subscription via the Set-AzureSubscription cmdlet. + /// + public static string InvalidSubscriptionNameMessage + { + get + { + return ResourceManager.GetString("InvalidSubscriptionNameMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided subscriptions file {0} has invalid content.. + /// + public static string InvalidSubscriptionsDataSchema + { + get + { + return ResourceManager.GetString("InvalidSubscriptionsDataSchema", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role {0} VM size should be ExtraSmall, Small, Medium, Large or ExtraLarge.. + /// + public static string InvalidVMSize + { + get + { + return ResourceManager.GetString("InvalidVMSize", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The web job file must have *.zip extension. + /// + public static string InvalidWebJobFile + { + get + { + return ResourceManager.GetString("InvalidWebJobFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Singleton option works for continuous jobs only.. + /// + public static string InvalidWebJobSingleton + { + get + { + return ResourceManager.GetString("InvalidWebJobSingleton", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The website {0} was not found. Please specify a valid website name.. + /// + public static string InvalidWebsite + { + get + { + return ResourceManager.GetString("InvalidWebsite", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No job for id: {0} was found.. + /// + public static string JobNotFound + { + get + { + return ResourceManager.GetString("JobNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to engines. + /// + public static string JsonEnginesSectionName + { + get + { + return ResourceManager.GetString("JsonEnginesSectionName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Scaffolding for this language is not yet supported. + /// + public static string LanguageScaffoldingIsNotSupported + { + get + { + return ResourceManager.GetString("LanguageScaffoldingIsNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Link already established. + /// + public static string LinkAlreadyEstablished + { + get + { + return ResourceManager.GetString("LinkAlreadyEstablished", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to local_package.csx. + /// + public static string LocalPackageFileName + { + get + { + return ResourceManager.GetString("LocalPackageFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ServiceConfiguration.Local.cscfg. + /// + public static string LocalServiceConfigurationFileName + { + get + { + return ResourceManager.GetString("LocalServiceConfigurationFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Looking for {0} deployment for {1} cloud service.... + /// + public static string LookingForDeploymentMessage + { + get + { + return ResourceManager.GetString("LookingForDeploymentMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Looking for cloud service {0}.... + /// + public static string LookingForServiceMessage + { + get + { + return ResourceManager.GetString("LookingForServiceMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Azure Long-Running Job. + /// + public static string LROJobName + { + get + { + return ResourceManager.GetString("LROJobName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The cmdlet failed in background execution. The returned error was '{0}'. Please execute the cmdlet again. You may need to execute this cmdlet synchronously, by omitting the '-AsJob' parameter.. + /// + public static string LROTaskExceptionMessage + { + get + { + return ResourceManager.GetString("LROTaskExceptionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to managementCertificate.pem. + /// + public static string ManagementCertificateFileName + { + get + { + return ResourceManager.GetString("ManagementCertificateFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ?whr={0}. + /// + public static string ManagementPortalRealmFormat + { + get + { + return ResourceManager.GetString("ManagementPortalRealmFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to //baseuri. + /// + public static string ManifestBaseUriQuery + { + get + { + return ResourceManager.GetString("ManifestBaseUriQuery", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to uri. + /// + public static string ManifestBlobUriKey + { + get + { + return ResourceManager.GetString("ManifestBlobUriKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to http://az413943.vo.msecnd.net/node/runtimemanifest_0.7.5.2.xml. + /// + public static string ManifestUri + { + get + { + return ResourceManager.GetString("ManifestUri", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Property bag Hashtable must contain a 'Certificate' of type 'X509Certificate2'.. + /// + public static string MissingCertificateInProfileProperties + { + get + { + return ResourceManager.GetString("MissingCertificateInProfileProperties", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Property bag Hashtable must contain a 'Password' with an associated 'Username' or 'ServicePrincipal'.. + /// + public static string MissingPasswordInProfileProperties + { + get + { + return ResourceManager.GetString("MissingPasswordInProfileProperties", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Property bag Hashtable must contain a 'SubscriptionId'.. + /// + public static string MissingSubscriptionInProfileProperties + { + get + { + return ResourceManager.GetString("MissingSubscriptionInProfileProperties", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Multiple Add-Ons found holding name {0}. + /// + public static string MultipleAddOnsFoundMessage + { + get + { + return ResourceManager.GetString("MultipleAddOnsFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Multiple possible publishing users. Please go to the Portal and use the listed deployment user, or click 'set/reset deployment credentials' to set up a new user account, then reurn this cmdlet and specify PublishingUsername.. + /// + public static string MultiplePublishingUsernames + { + get + { + return ResourceManager.GetString("MultiplePublishingUsernames", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The first publish settings file "{0}" is used. If you want to use another file specify the file name.. + /// + public static string MultiplePublishSettingsFilesFoundMessage + { + get + { + return ResourceManager.GetString("MultiplePublishSettingsFilesFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.WindowsAzure.Plugins.Caching.NamedCaches. + /// + public static string NamedCacheSettingName + { + get + { + return ResourceManager.GetString("NamedCacheSettingName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {"caches":[{"name":"default","policy":{"eviction":{"type":0},"expiration":{"defaultTTL":10,"isExpirable":true,"type":1},"serverNotification":{"isEnabled":false}},"secondaries":0}]}. + /// + public static string NamedCacheSettingValue + { + get + { + return ResourceManager.GetString("NamedCacheSettingValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A publishing username is required. Please specify one using the argument PublishingUsername.. + /// + public static string NeedPublishingUsernames + { + get + { + return ResourceManager.GetString("NeedPublishingUsernames", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to New Add-On Confirmation. + /// + public static string NewAddOnConformation + { + get + { + return ResourceManager.GetString("NewAddOnConformation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis + ///for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) + ///agree to the {2}'s terms of user and privacy statement at {0} and (c) agree to sharing my + ///contact information with {2}.. + /// + public static string NewMicrosoftAddOnMessage + { + get + { + return ResourceManager.GetString("NewMicrosoftAddOnMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Internal Server Error. This could happen because the namespace name is already used or due to an incorrect location name. Use Get-AzureSBLocation cmdlet to list valid names.. + /// + public static string NewNamespaceErrorMessage + { + get + { + return ResourceManager.GetString("NewNamespaceErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis + ///for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) + ///acknowledge the offering is provided by {2}, not Microsoft, and agree to {2}'s terms of + ///use and privacy statement at {0} and (c) agree to sharing my contact information with {2}.. + /// + public static string NewNonMicrosoftAddOnMessage + { + get + { + return ResourceManager.GetString("NewNonMicrosoftAddOnMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service has been created at {0}. + /// + public static string NewServiceCreatedMessage + { + get + { + return ResourceManager.GetString("NewServiceCreatedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No. + /// + public static string No + { + get + { + return ResourceManager.GetString("No", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is no access token cached for subscription {0}, user id {1}. Use the Add-AzureAccount cmdlet to log in again and get a token for this subscription.. + /// + public static string NoCachedToken + { + get + { + return ResourceManager.GetString("NoCachedToken", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The service does not have any cache worker roles, add one first by running cmdlet Add-AzureCacheWorkerRole.. + /// + public static string NoCacheWorkerRoles + { + get + { + return ResourceManager.GetString("NoCacheWorkerRoles", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No clouds available. + /// + public static string NoCloudsAvailable + { + get + { + return ResourceManager.GetString("NoCloudsAvailable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to "There is no current context, please log in using Connect-AzAccount.". + /// + public static string NoCurrentContextForDataCmdlet + { + get + { + return ResourceManager.GetString("NoCurrentContextForDataCmdlet", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to nodejs. + /// + public static string NodeDirectory + { + get + { + return ResourceManager.GetString("NodeDirectory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to node. + /// + public static string NodeEngineKey + { + get + { + return ResourceManager.GetString("NodeEngineKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to node.exe. + /// + public static string NodeExe + { + get + { + return ResourceManager.GetString("NodeExe", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is no default subscription set, please set a default subscription by running Set-AzureSubscription -Default <subscription name>. + /// + public static string NoDefaultSubscriptionMessage + { + get + { + return ResourceManager.GetString("NoDefaultSubscriptionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft SDKs\Azure\Nodejs\Nov2011. + /// + public static string NodeModulesPath + { + get + { + return ResourceManager.GetString("NodeModulesPath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to nodejs. + /// + public static string NodeProgramFilesFolderName + { + get + { + return ResourceManager.GetString("NodeProgramFilesFolderName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to node. + /// + public static string NodeRuntimeValue + { + get + { + return ResourceManager.GetString("NodeRuntimeValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resources\Scaffolding\Node. + /// + public static string NodeScaffolding + { + get + { + return ResourceManager.GetString("NodeScaffolding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.WindowsAzure.Commands.CloudService.ScaffoldingResources.Node. + /// + public static string NodeScaffoldingResources + { + get + { + return ResourceManager.GetString("NodeScaffoldingResources", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Installing Node version {0} in Azure for Role '{1}' (the Node version locally installed is: {2}). + /// + public static string NodeVersionWarningText + { + get + { + return ResourceManager.GetString("NodeVersionWarningText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No, I do not agree. + /// + public static string NoHint + { + get + { + return ResourceManager.GetString("NoHint", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please connect to internet before executing this cmdlet. + /// + public static string NoInternetConnection + { + get + { + return ResourceManager.GetString("NoInternetConnection", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to <NONE>. + /// + public static string None + { + get + { + return ResourceManager.GetString("None", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No publish settings files with extension *.publishsettings are found in the directory "{0}".. + /// + public static string NoPublishSettingsFilesFoundMessage + { + get + { + return ResourceManager.GetString("NoPublishSettingsFilesFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is no subscription associated with account {0}.. + /// + public static string NoSubscriptionAddedMessage + { + get + { + return ResourceManager.GetString("NoSubscriptionAddedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No subscriptions are associated with the logged in account in Azure Service Management (RDFE). This means that the logged in user is not an administrator or co-administrator for any account.\r\nDid you mean to execute Connect-AzAccount?. + /// + public static string NoSubscriptionFoundForTenant + { + get + { + return ResourceManager.GetString("NoSubscriptionFoundForTenant", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '{0}' must be a cache worker role. Verify that it has proper cache worker role configuration.. + /// + public static string NotCacheWorkerRole + { + get + { + return ResourceManager.GetString("NotCacheWorkerRole", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Certificate can't be null.. + /// + public static string NullCertificateMessage + { + get + { + return ResourceManager.GetString("NullCertificateMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} could not be null or empty. + /// + public static string NullObjectMessage + { + get + { + return ResourceManager.GetString("NullObjectMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to add a null RoleSettings to {0}. + /// + public static string NullRoleSettingsMessage + { + get + { + return ResourceManager.GetString("NullRoleSettingsMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to add new role to null service definition. + /// + public static string NullServiceDefinitionMessage + { + get + { + return ResourceManager.GetString("NullServiceDefinitionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The request offer '{0}' is not found.. + /// + public static string OfferNotFoundMessage + { + get + { + return ResourceManager.GetString("OfferNotFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Operation "{0}" failed on VM with ID: {1}. + /// + public static string OperationFailedErrorMessage + { + get + { + return ResourceManager.GetString("OperationFailedErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The REST operation failed with message '{0}' and error code '{1}'. + /// + public static string OperationFailedMessage + { + get + { + return ResourceManager.GetString("OperationFailedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Job Id {0} did not complete within expected time or it is in Failed/Canceled/Invalid state.. + /// + public static string OperationTimedOutOrError + { + get + { + return ResourceManager.GetString("OperationTimedOutOrError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to package. + /// + public static string Package + { + get + { + return ResourceManager.GetString("Package", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Package is created at service root path {0}.. + /// + public static string PackageCreated + { + get + { + return ResourceManager.GetString("PackageCreated", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {{ + /// "author": "", + /// + /// "name": "{0}", + /// "version": "0.0.0", + /// "dependencies":{{}}, + /// "devDependencies":{{}}, + /// "optionalDependencies": {{}}, + /// "engines": {{ + /// "node": "*", + /// "iisnode": "*" + /// }} + /// + ///}} + ///. + /// + public static string PackageJsonDefaultFile + { + get + { + return ResourceManager.GetString("PackageJsonDefaultFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to package.json. + /// + public static string PackageJsonFileName + { + get + { + return ResourceManager.GetString("PackageJsonFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Path {0} doesn't exist.. + /// + public static string PathDoesNotExist + { + get + { + return ResourceManager.GetString("PathDoesNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Path for {0} doesn't exist in {1}.. + /// + public static string PathDoesNotExistForElement + { + get + { + return ResourceManager.GetString("PathDoesNotExistForElement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A value for the Peer Asn has to be provided.. + /// + public static string PeerAsnRequired + { + get + { + return ResourceManager.GetString("PeerAsnRequired", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 5.4.0. + /// + public static string PHPDefaultRuntimeVersion + { + get + { + return ResourceManager.GetString("PHPDefaultRuntimeVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to php. + /// + public static string PhpRuntimeValue + { + get + { + return ResourceManager.GetString("PhpRuntimeValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resources\Scaffolding\PHP. + /// + public static string PHPScaffolding + { + get + { + return ResourceManager.GetString("PHPScaffolding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.WindowsAzure.Commands.CloudService.ScaffoldingResources.PHP. + /// + public static string PHPScaffoldingResources + { + get + { + return ResourceManager.GetString("PHPScaffoldingResources", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Installing PHP version {0} for Role '{1}' (the PHP version locally installed is: {2}). + /// + public static string PHPVersionWarningText + { + get + { + return ResourceManager.GetString("PHPVersionWarningText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You must create your first web site using the Microsoft Azure portal. + ///Please follow these steps in the portal: + ///1. At the bottom of the page, click on New > Web Site > Quick Create + ///2. Type {0} in the URL field + ///3. Click on "Create Web Site" + ///4. Once the site has been created, click on the site name + ///5. Click on "Set up Git publishing" or "Reset deployment credentials" and setup a publishing username and password. Use those credentials for all new websites you create.. + /// + public static string PortalInstructions + { + get + { + return ResourceManager.GetString("PortalInstructions", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 6. Back in the console window, rerun this command by typing "New-AzureWebsite <site name> -Git". + /// + public static string PortalInstructionsGit + { + get + { + return ResourceManager.GetString("PortalInstructionsGit", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The estimated generally available date is '{0}'.. + /// + public static string PreviewCmdletETAMessage { + get { + return ResourceManager.GetString("PreviewCmdletETAMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This cmdlet is in preview. Its behavior is subject to change based on customer feedback.. + /// + public static string PreviewCmdletMessage + { + get + { + return ResourceManager.GetString("PreviewCmdletMessage", resourceCulture); + } + } + + + /// + /// Looks up a localized string similar to A value for the Primary Peer Subnet has to be provided.. + /// + public static string PrimaryPeerSubnetRequired + { + get + { + return ResourceManager.GetString("PrimaryPeerSubnetRequired", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Promotion code can be used only when updating to a new plan.. + /// + public static string PromotionCodeWithCurrentPlanMessage + { + get + { + return ResourceManager.GetString("PromotionCodeWithCurrentPlanMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service not published at user request.. + /// + public static string PublishAbortedAtUserRequest + { + get + { + return ResourceManager.GetString("PublishAbortedAtUserRequest", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Complete.. + /// + public static string PublishCompleteMessage + { + get + { + return ResourceManager.GetString("PublishCompleteMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Connecting.... + /// + public static string PublishConnectingMessage + { + get + { + return ResourceManager.GetString("PublishConnectingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Created Deployment ID: {0}.. + /// + public static string PublishCreatedDeploymentMessage + { + get + { + return ResourceManager.GetString("PublishCreatedDeploymentMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Created hosted service '{0}'.. + /// + public static string PublishCreatedServiceMessage + { + get + { + return ResourceManager.GetString("PublishCreatedServiceMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Created Website URL: {0}.. + /// + public static string PublishCreatedWebsiteMessage + { + get + { + return ResourceManager.GetString("PublishCreatedWebsiteMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Creating.... + /// + public static string PublishCreatingServiceMessage + { + get + { + return ResourceManager.GetString("PublishCreatingServiceMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Initializing.... + /// + public static string PublishInitializingMessage + { + get + { + return ResourceManager.GetString("PublishInitializingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to busy. + /// + public static string PublishInstanceStatusBusy + { + get + { + return ResourceManager.GetString("PublishInstanceStatusBusy", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to creating the virtual machine. + /// + public static string PublishInstanceStatusCreating + { + get + { + return ResourceManager.GetString("PublishInstanceStatusCreating", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Instance {0} of role {1} is {2}.. + /// + public static string PublishInstanceStatusMessage + { + get + { + return ResourceManager.GetString("PublishInstanceStatusMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ready. + /// + public static string PublishInstanceStatusReady + { + get + { + return ResourceManager.GetString("PublishInstanceStatusReady", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Preparing deployment for {0} with Subscription ID: {1}.... + /// + public static string PublishPreparingDeploymentMessage + { + get + { + return ResourceManager.GetString("PublishPreparingDeploymentMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Publishing {0} to Microsoft Azure. This may take several minutes.... + /// + public static string PublishServiceStartMessage + { + get + { + return ResourceManager.GetString("PublishServiceStartMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to publish settings. + /// + public static string PublishSettings + { + get + { + return ResourceManager.GetString("PublishSettings", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Azure. + /// + public static string PublishSettingsElementName + { + get + { + return ResourceManager.GetString("PublishSettingsElementName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to .PublishSettings. + /// + public static string PublishSettingsFileExtention + { + get + { + return ResourceManager.GetString("PublishSettingsFileExtention", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to publishSettings.xml. + /// + public static string PublishSettingsFileName + { + get + { + return ResourceManager.GetString("PublishSettingsFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to &whr={0}. + /// + public static string PublishSettingsFileRealmFormat + { + get + { + return ResourceManager.GetString("PublishSettingsFileRealmFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Publish settings imported. + /// + public static string PublishSettingsSetSuccessfully + { + get + { + return ResourceManager.GetString("PublishSettingsSetSuccessfully", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to AZURE_PUBLISHINGPROFILE_URL. + /// + public static string PublishSettingsUrlEnv + { + get + { + return ResourceManager.GetString("PublishSettingsUrlEnv", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Starting.... + /// + public static string PublishStartingMessage + { + get + { + return ResourceManager.GetString("PublishStartingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Upgrading.... + /// + public static string PublishUpgradingMessage + { + get + { + return ResourceManager.GetString("PublishUpgradingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Uploading Package to storage service {0}.... + /// + public static string PublishUploadingPackageMessage + { + get + { + return ResourceManager.GetString("PublishUploadingPackageMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Verifying storage account '{0}'.... + /// + public static string PublishVerifyingStorageMessage + { + get + { + return ResourceManager.GetString("PublishVerifyingStorageMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Path '{0}' not found.. + /// + public static string PublishVMDscExtensionAdditionalContentPathNotExist + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionAdditionalContentPathNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Configuration published to {0}. + /// + public static string PublishVMDscExtensionArchiveUploadedMessage + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionArchiveUploadedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Copy '{0}' to '{1}'.. + /// + public static string PublishVMDscExtensionCopyFileVerbose + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionCopyFileVerbose", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Copy the module '{0}' to '{1}'.. + /// + public static string PublishVMDscExtensionCopyModuleVerbose + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionCopyModuleVerbose", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid configuration file: {0}. + ///The file needs to be a PowerShell script (.ps1 or .psm1).. + /// + public static string PublishVMDscExtensionCreateArchiveConfigFileInvalidExtension + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionCreateArchiveConfigFileInvalidExtension", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deleted '{0}'. + /// + public static string PublishVMDscExtensionDeletedFileMessage + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionDeletedFileMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot delete '{0}': {1}. + /// + public static string PublishVMDscExtensionDeleteErrorMessage + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionDeleteErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Path '{0}' not found.. + /// + public static string PublishVMDscExtensionDirectoryNotExist + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionDirectoryNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot get module for DscResource '{0}'. Possible solutions: + ///1) Specify -ModuleName for Import-DscResource in your configuration. + ///2) Unblock module that contains resource. + ///3) Move Import-DscResource inside Node block. + ///. + /// + public static string PublishVMDscExtensionGetDscResourceFailed + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionGetDscResourceFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to List of required modules: [{0}].. + /// + public static string PublishVMDscExtensionRequiredModulesVerbose + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionRequiredModulesVerbose", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Your current PowerShell version {1} is less then required by this cmdlet {0}. Consider download and install latest PowerShell version.. + /// + public static string PublishVMDscExtensionRequiredPsVersion + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionRequiredPsVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Configuration script '{0}' contained parse errors: + ///{1}. + /// + public static string PublishVMDscExtensionStorageParserErrors + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionStorageParserErrors", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Temp folder '{0}' created.. + /// + public static string PublishVMDscExtensionTempFolderVerbose + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionTempFolderVerbose", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid configuration file: {0}. + ///The file needs to be a PowerShell script (.ps1 or .psm1) or a ZIP archive (.zip).. + /// + public static string PublishVMDscExtensionUploadArchiveConfigFileInvalidExtension + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionUploadArchiveConfigFileInvalidExtension", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Configuration file '{0}' not found.. + /// + public static string PublishVMDscExtensionUploadArchiveConfigFileNotExist + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionUploadArchiveConfigFileNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Azure PowerShell collects usage data in order to improve your experience. + ///The data is anonymous and does not include commandline argument values. + ///The data is collected by Microsoft. + /// + ///Use the Disable-AzureDataCollection cmdlet to turn the feature Off. The cmdlet can be found in the Azure module. To disable data collection: PS > Disable-AzureDataCollection. + ///Use the Enable-AzureDataCollection cmdlet to turn the feature On. The cmdlet can be found in the Azure module. To enable data collection: PS > Enab [rest of string was truncated]";. + /// + public static string RDFEDataCollectionMessage + { + get + { + return ResourceManager.GetString("RDFEDataCollectionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Replace current deployment with '{0}' Id ?. + /// + public static string RedeployCommit + { + get + { + return ResourceManager.GetString("RedeployCommit", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to regenerate key?. + /// + public static string RegenerateKeyWarning + { + get + { + return ResourceManager.GetString("RegenerateKeyWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Generate new key.. + /// + public static string RegenerateKeyWhatIfMessage + { + get + { + return ResourceManager.GetString("RegenerateKeyWhatIfMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove account '{0}'?. + /// + public static string RemoveAccountConfirmation + { + get + { + return ResourceManager.GetString("RemoveAccountConfirmation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing account. + /// + public static string RemoveAccountMessage + { + get + { + return ResourceManager.GetString("RemoveAccountMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove Add-On Confirmation. + /// + public static string RemoveAddOnConformation + { + get + { + return ResourceManager.GetString("RemoveAddOnConformation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to If you delete this add-on, your data may be deleted and the operation may not be undone. You may have to purchase it again from the Microsoft Azure Store to use it. The price of the add-on may not be refunded. Are you sure you want to delete this add-on? Enter “Yes” to confirm.. + /// + public static string RemoveAddOnMessage + { + get + { + return ResourceManager.GetString("RemoveAddOnMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove-AzureBGPPeering Operation failed.. + /// + public static string RemoveAzureBGPPeeringFailed + { + get + { + return ResourceManager.GetString("RemoveAzureBGPPeeringFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing Bgp Peering. + /// + public static string RemoveAzureBGPPeeringMessage + { + get + { + return ResourceManager.GetString("RemoveAzureBGPPeeringMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Successfully removed Azure Bgp Peering with Service Key {0}.. + /// + public static string RemoveAzureBGPPeeringSucceeded + { + get + { + return ResourceManager.GetString("RemoveAzureBGPPeeringSucceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the Bgp Peering with service key '{0}'?. + /// + public static string RemoveAzureBGPPeeringWarning + { + get + { + return ResourceManager.GetString("RemoveAzureBGPPeeringWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the Dedicated Circuit with service key '{0}'?. + /// + public static string RemoveAzureDedicatdCircuitWarning + { + get + { + return ResourceManager.GetString("RemoveAzureDedicatdCircuitWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove-AzureDedicatedCircuit Operation failed.. + /// + public static string RemoveAzureDedicatedCircuitFailed + { + get + { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove-AzureDedicatedCircuitLink Operation failed.. + /// + public static string RemoveAzureDedicatedCircuitLinkFailed + { + get + { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitLinkFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing Dedicated Circui Link. + /// + public static string RemoveAzureDedicatedCircuitLinkMessage + { + get + { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitLinkMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Successfully removed Azure Dedicated Circuit Link with Service Key {0} and Vnet Name {1}. + /// + public static string RemoveAzureDedicatedCircuitLinkSucceeded + { + get + { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitLinkSucceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the Dedicated Circuit Link with service key '{0}' and virtual network name '{1}'?. + /// + public static string RemoveAzureDedicatedCircuitLinkWarning + { + get + { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitLinkWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing Dedicated Circuit. + /// + public static string RemoveAzureDedicatedCircuitMessage + { + get + { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Successfully removed Azure Dedicated Circuit with Service Key {0}.. + /// + public static string RemoveAzureDedicatedCircuitSucceeded + { + get + { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitSucceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing cloud service {0}.... + /// + public static string RemoveAzureServiceWaitMessage + { + get + { + return ResourceManager.GetString("RemoveAzureServiceWaitMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The default subscription is being removed. Use Select-AzureSubscription -Default <subscriptionName> to select a new default subscription.. + /// + public static string RemoveDefaultSubscription + { + get + { + return ResourceManager.GetString("RemoveDefaultSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing {0} deployment for {1} service. + /// + public static string RemoveDeploymentWaitMessage + { + get + { + return ResourceManager.GetString("RemoveDeploymentWaitMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing an environment will remove all associated subscriptions and accounts. Are you sure you want to remove an environment '{0}'?. + /// + public static string RemoveEnvironmentConfirmation + { + get + { + return ResourceManager.GetString("RemoveEnvironmentConfirmation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing environment. + /// + public static string RemoveEnvironmentMessage + { + get + { + return ResourceManager.GetString("RemoveEnvironmentMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing job collection. + /// + public static string RemoveJobCollectionMessage + { + get + { + return ResourceManager.GetString("RemoveJobCollectionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the job collection "{0}". + /// + public static string RemoveJobCollectionWarning + { + get + { + return ResourceManager.GetString("RemoveJobCollectionWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing job. + /// + public static string RemoveJobMessage + { + get + { + return ResourceManager.GetString("RemoveJobMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the job "{0}". + /// + public static string RemoveJobWarning + { + get + { + return ResourceManager.GetString("RemoveJobWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the account?. + /// + public static string RemoveMediaAccountWarning + { + get + { + return ResourceManager.GetString("RemoveMediaAccountWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account removed.. + /// + public static string RemoveMediaAccountWhatIfMessage + { + get + { + return ResourceManager.GetString("RemoveMediaAccountWhatIfMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Internal Server Error. This could happen because the namespace does not exist or it does not exist under your subscription.. + /// + public static string RemoveNamespaceErrorMessage + { + get + { + return ResourceManager.GetString("RemoveNamespaceErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing old package {0}.... + /// + public static string RemovePackage + { + get + { + return ResourceManager.GetString("RemovePackage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing the Azure profile will remove all associated environments, subscriptions, and accounts. Are you sure you want to remove the Azure profile?. + /// + public static string RemoveProfileConfirmation + { + get + { + return ResourceManager.GetString("RemoveProfileConfirmation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing the Azure profile. + /// + public static string RemoveProfileMessage + { + get + { + return ResourceManager.GetString("RemoveProfileMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to delete the namespace '{0}'?. + /// + public static string RemoveServiceBusNamespaceConfirmation + { + get + { + return ResourceManager.GetString("RemoveServiceBusNamespaceConfirmation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove cloud service?. + /// + public static string RemoveServiceWarning + { + get + { + return ResourceManager.GetString("RemoveServiceWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove cloud service and all it's deployments. + /// + public static string RemoveServiceWhatIfMessage + { + get + { + return ResourceManager.GetString("RemoveServiceWhatIfMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove subscription '{0}'?. + /// + public static string RemoveSubscriptionConfirmation + { + get + { + return ResourceManager.GetString("RemoveSubscriptionConfirmation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing subscription. + /// + public static string RemoveSubscriptionMessage + { + get + { + return ResourceManager.GetString("RemoveSubscriptionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The endpoint {0} cannot be removed from profile {1} because it's not in the profile.. + /// + public static string RemoveTrafficManagerEndpointMissing + { + get + { + return ResourceManager.GetString("RemoveTrafficManagerEndpointMissing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove-AzureTrafficManagerProfile Operation failed.. + /// + public static string RemoveTrafficManagerProfileFailed + { + get + { + return ResourceManager.GetString("RemoveTrafficManagerProfileFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Successfully removed Traffic Manager profile with name {0}.. + /// + public static string RemoveTrafficManagerProfileSucceeded + { + get + { + return ResourceManager.GetString("RemoveTrafficManagerProfileSucceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the Traffic Manager profile "{0}"?. + /// + public static string RemoveTrafficManagerProfileWarning + { + get + { + return ResourceManager.GetString("RemoveTrafficManagerProfileWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to delete the VM '{0}'?. + /// + public static string RemoveVMConfirmationMessage + { + get + { + return ResourceManager.GetString("RemoveVMConfirmationMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deleting VM.. + /// + public static string RemoveVMMessage + { + get + { + return ResourceManager.GetString("RemoveVMMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing WebJob.... + /// + public static string RemoveWebJobMessage + { + get + { + return ResourceManager.GetString("RemoveWebJobMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove job '{0}'?. + /// + public static string RemoveWebJobWarning + { + get + { + return ResourceManager.GetString("RemoveWebJobWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing website. + /// + public static string RemoveWebsiteMessage + { + get + { + return ResourceManager.GetString("RemoveWebsiteMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the website "{0}". + /// + public static string RemoveWebsiteWarning + { + get + { + return ResourceManager.GetString("RemoveWebsiteWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing public environment is not supported.. + /// + public static string RemovingDefaultEnvironmentsNotSupported + { + get + { + return ResourceManager.GetString("RemovingDefaultEnvironmentsNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deleting namespace. + /// + public static string RemovingNamespaceMessage + { + get + { + return ResourceManager.GetString("RemovingNamespaceMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Repository is not setup. You need to pass a valid site name.. + /// + public static string RepositoryNotSetup + { + get + { + return ResourceManager.GetString("RepositoryNotSetup", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Reserved IP with the Name:'{0}' will no longer be in use after the deployment is deleted, and it is still reserved for later use.. + /// + public static string ReservedIPNameNoLongerInUseButStillBeingReserved + { + get + { + return ResourceManager.GetString("ReservedIPNameNoLongerInUseButStillBeingReserved", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resource with ID : {0} does not exist.. + /// + public static string ResourceNotFound + { + get + { + return ResourceManager.GetString("ResourceNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Restart. + /// + public static string Restart + { + get + { + return ResourceManager.GetString("Restart", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resume. + /// + public static string Resume + { + get + { + return ResourceManager.GetString("Resume", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /role:{0};"{1}/{0}" . + /// + public static string RoleArgTemplate + { + get + { + return ResourceManager.GetString("RoleArgTemplate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to bin. + /// + public static string RoleBinFolderName + { + get + { + return ResourceManager.GetString("RoleBinFolderName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role {0} is {1}. + /// + public static string RoleInstanceWaitMsg + { + get + { + return ResourceManager.GetString("RoleInstanceWaitMsg", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 20. + /// + public static string RoleMaxInstances + { + get + { + return ResourceManager.GetString("RoleMaxInstances", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to role name. + /// + public static string RoleName + { + get + { + return ResourceManager.GetString("RoleName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided role name {0} doesn't exist. + /// + public static string RoleNotFoundMessage + { + get + { + return ResourceManager.GetString("RoleNotFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to RoleSettings.xml. + /// + public static string RoleSettingsTemplateFileName + { + get + { + return ResourceManager.GetString("RoleSettingsTemplateFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role type {0} doesn't exist. + /// + public static string RoleTypeDoesNotExist + { + get + { + return ResourceManager.GetString("RoleTypeDoesNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to public static Dictionary<string, Location> ReverseLocations { get; private set; }. + /// + public static string RuntimeDeploymentLocationError + { + get + { + return ResourceManager.GetString("RuntimeDeploymentLocationError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Preparing runtime deployment for service '{0}'. + /// + public static string RuntimeDeploymentStart + { + get + { + return ResourceManager.GetString("RuntimeDeploymentStart", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WARNING Runtime Mismatch: Are you sure that you want to publish service '{0}' using an Azure runtime version that does not match your local runtime version?. + /// + public static string RuntimeMismatchWarning + { + get + { + return ResourceManager.GetString("RuntimeMismatchWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to RUNTIMEOVERRIDEURL. + /// + public static string RuntimeOverrideKey + { + get + { + return ResourceManager.GetString("RuntimeOverrideKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /runtimemanifest/runtimes/runtime. + /// + public static string RuntimeQuery + { + get + { + return ResourceManager.GetString("RuntimeQuery", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to RUNTIMEID. + /// + public static string RuntimeTypeKey + { + get + { + return ResourceManager.GetString("RuntimeTypeKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to RUNTIMEURL. + /// + public static string RuntimeUrlKey + { + get + { + return ResourceManager.GetString("RuntimeUrlKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to RUNTIMEVERSIONPRIMARYKEY. + /// + public static string RuntimeVersionPrimaryKey + { + get + { + return ResourceManager.GetString("RuntimeVersionPrimaryKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to scaffold.xml. + /// + public static string ScaffoldXml + { + get + { + return ResourceManager.GetString("ScaffoldXml", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid location entered. Pick one of the locations from Get-AzureSchedulerLocation. + /// + public static string SchedulerInvalidLocation + { + get + { + return ResourceManager.GetString("SchedulerInvalidLocation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A value for the Secondary Peer Subnet has to be provided.. + /// + public static string SecondaryPeerSubnetRequired + { + get + { + return ResourceManager.GetString("SecondaryPeerSubnetRequired", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service {0} already exists on disk in location {1}. + /// + public static string ServiceAlreadyExistsOnDisk + { + get + { + return ResourceManager.GetString("ServiceAlreadyExistsOnDisk", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No ServiceBus authorization rule with the given characteristics was found. + /// + public static string ServiceBusAuthorizationRuleNotFound + { + get + { + return ResourceManager.GetString("ServiceBusAuthorizationRuleNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The service bus entity '{0}' is not found.. + /// + public static string ServiceBusEntityTypeNotFound + { + get + { + return ResourceManager.GetString("ServiceBusEntityTypeNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Internal Server Error. This could happen due to an incorrect/missing namespace. + /// + public static string ServiceBusNamespaceMissingMessage + { + get + { + return ResourceManager.GetString("ServiceBusNamespaceMissingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service configuration. + /// + public static string ServiceConfiguration + { + get + { + return ResourceManager.GetString("ServiceConfiguration", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service definition. + /// + public static string ServiceDefinition + { + get + { + return ResourceManager.GetString("ServiceDefinition", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ServiceDefinition.csdef. + /// + public static string ServiceDefinitionFileName + { + get + { + return ResourceManager.GetString("ServiceDefinitionFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0}Deploy. + /// + public static string ServiceDeploymentName + { + get + { + return ResourceManager.GetString("ServiceDeploymentName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The specified cloud service "{0}" does not exist.. + /// + public static string ServiceDoesNotExist + { + get + { + return ResourceManager.GetString("ServiceDoesNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} slot for service {1} is in {2} state, please wait until it finish and update it's status. + /// + public static string ServiceIsInTransitionState + { + get + { + return ResourceManager.GetString("ServiceIsInTransitionState", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to "An exception occurred when calling the ServiceManagement API. HTTP Status Code: {0}. Service Management Error Code: {1}. Message: {2}. Operation Tracking ID: {3}.". + /// + public static string ServiceManagementClientExceptionStringFormat + { + get + { + return ResourceManager.GetString("ServiceManagementClientExceptionStringFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Begin Operation: {0}. + /// + public static string ServiceManagementExecuteClientActionBeginOperation + { + get + { + return ResourceManager.GetString("ServiceManagementExecuteClientActionBeginOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Completed Operation: {0}. + /// + public static string ServiceManagementExecuteClientActionCompletedOperation + { + get + { + return ResourceManager.GetString("ServiceManagementExecuteClientActionCompletedOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Begin Operation: {0}. + /// + public static string ServiceManagementExecuteClientActionInOCSBeginOperation + { + get + { + return ResourceManager.GetString("ServiceManagementExecuteClientActionInOCSBeginOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Completed Operation: {0}. + /// + public static string ServiceManagementExecuteClientActionInOCSCompletedOperation + { + get + { + return ResourceManager.GetString("ServiceManagementExecuteClientActionInOCSCompletedOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service name. + /// + public static string ServiceName + { + get + { + return ResourceManager.GetString("ServiceName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided service name {0} already exists, please pick another name. + /// + public static string ServiceNameExists + { + get + { + return ResourceManager.GetString("ServiceNameExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please provide name for the hosted service. + /// + public static string ServiceNameMissingMessage + { + get + { + return ResourceManager.GetString("ServiceNameMissingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service parent directory. + /// + public static string ServiceParentDirectory + { + get + { + return ResourceManager.GetString("ServiceParentDirectory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service {0} removed successfully. + /// + public static string ServiceRemovedMessage + { + get + { + return ResourceManager.GetString("ServiceRemovedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service directory. + /// + public static string ServiceRoot + { + get + { + return ResourceManager.GetString("ServiceRoot", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service settings. + /// + public static string ServiceSettings + { + get + { + return ResourceManager.GetString("ServiceSettings", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The storage account name '{0}' is invalid. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.. + /// + public static string ServiceSettings_ValidateStorageAccountName_InvalidName + { + get + { + return ResourceManager.GetString("ServiceSettings_ValidateStorageAccountName_InvalidName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The {0} slot for cloud service {1} doesn't exist.. + /// + public static string ServiceSlotDoesNotExist + { + get + { + return ResourceManager.GetString("ServiceSlotDoesNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} slot for service {1} is {2}. + /// + public static string ServiceStatusChanged + { + get + { + return ResourceManager.GetString("ServiceStatusChanged", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Set Add-On Confirmation. + /// + public static string SetAddOnConformation + { + get + { + return ResourceManager.GetString("SetAddOnConformation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Profile {0} does not contain endpoint {1}. Adding it.. + /// + public static string SetInexistentTrafficManagerEndpointMessage + { + get + { + return ResourceManager.GetString("SetInexistentTrafficManagerEndpointMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Note - You will be charged the amount for the new plan, without being refunded for time remaining + ///in the existing plan. + ///By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis + ///for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) + ///agree to the {2}'s terms of user and privacy statement at {0} and (c) agree to sharing my + ///contact information with {2}.. + /// + public static string SetMicrosoftAddOnMessage + { + get + { + return ResourceManager.GetString("SetMicrosoftAddOnMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Note - You will be charged the amount for the new plan, without being refunded for time remaining + ///in the existing plan. + ///By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis + ///for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) + ///acknowledge the offering is provided by {2}, not Microsoft, and agree to {2}'s terms of + ///use and privacy statement at <url> and (c) agree to sharing my contact information with {2}.. + /// + public static string SetNonMicrosoftAddOnMessage + { + get + { + return ResourceManager.GetString("SetNonMicrosoftAddOnMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role {0} instances are set to {1}. + /// + public static string SetRoleInstancesMessage + { + get + { + return ResourceManager.GetString("SetRoleInstancesMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {"Slot":"","Location":"","Subscription":"","StorageAccountName":""}. + /// + public static string SettingsFileEmptyContent + { + get + { + return ResourceManager.GetString("SettingsFileEmptyContent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to deploymentSettings.json. + /// + public static string SettingsFileName + { + get + { + return ResourceManager.GetString("SettingsFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Insufficient parameters passed to create a new endpoint.. + /// + public static string SetTrafficManagerEndpointNeedsParameters + { + get + { + return ResourceManager.GetString("SetTrafficManagerEndpointNeedsParameters", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Ambiguous operation: the profile name specified doesn't match the name of the profile object.. + /// + public static string SetTrafficManagerProfileAmbiguous + { + get + { + return ResourceManager.GetString("SetTrafficManagerProfileAmbiguous", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please execute the cmdlet again and include the 'Force' parameter, if available, to avoid unnecessary prompts.. + /// + public static string ShouldContinueFail + { + get + { + return ResourceManager.GetString("ShouldContinueFail", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Confirm. + /// + public static string ShouldProcessCaption + { + get + { + return ResourceManager.GetString("ShouldProcessCaption", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please execute the cmdlet again and omit the 'Confirm' parameter when using the 'AsJob' parameter.. + /// + public static string ShouldProcessFailConfirm + { + get + { + return ResourceManager.GetString("ShouldProcessFailConfirm", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please increase the user $ConfirmPreference setting, or include turn off confirmation using '-Confirm:$false' when using the 'AsJob' parameter and execute the cmdet again.. + /// + public static string ShouldProcessFailImpact + { + get + { + return ResourceManager.GetString("ShouldProcessFailImpact", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please execute the cmdlet again and omit the 'WhatIf' parameter when using the 'AsJob' parameter.. + /// + public static string ShouldProcessFailWhatIf + { + get + { + return ResourceManager.GetString("ShouldProcessFailWhatIf", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Shutdown. + /// + public static string Shutdown + { + get + { + return ResourceManager.GetString("Shutdown", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /sites:{0};{1};"{2}/{0}" . + /// + public static string SitesArgTemplate + { + get + { + return ResourceManager.GetString("SitesArgTemplate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 1000. + /// + public static string StandardRetryDelayInMs + { + get + { + return ResourceManager.GetString("StandardRetryDelayInMs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Start. + /// + public static string Start + { + get + { + return ResourceManager.GetString("Start", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Started. + /// + public static string StartedEmulator + { + get + { + return ResourceManager.GetString("StartedEmulator", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Starting Emulator.... + /// + public static string StartingEmulator + { + get + { + return ResourceManager.GetString("StartingEmulator", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to start. + /// + public static string StartStorageEmulatorCommandArgument + { + get + { + return ResourceManager.GetString("StartStorageEmulatorCommandArgument", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Stop. + /// + public static string Stop + { + get + { + return ResourceManager.GetString("Stop", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Stopping emulator.... + /// + public static string StopEmulatorMessage + { + get + { + return ResourceManager.GetString("StopEmulatorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Stopped. + /// + public static string StoppedEmulatorMessage + { + get + { + return ResourceManager.GetString("StoppedEmulatorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to stop. + /// + public static string StopStorageEmulatorCommandArgument + { + get + { + return ResourceManager.GetString("StopStorageEmulatorCommandArgument", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account Name:. + /// + public static string StorageAccountName + { + get + { + return ResourceManager.GetString("StorageAccountName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find storage account '{0}' please type the name of an existing storage account.. + /// + public static string StorageAccountNotFound + { + get + { + return ResourceManager.GetString("StorageAccountNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to AzureStorageEmulator.exe. + /// + public static string StorageEmulatorExe + { + get + { + return ResourceManager.GetString("StorageEmulatorExe", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to InstallPath. + /// + public static string StorageEmulatorInstallPathRegistryKeyValue + { + get + { + return ResourceManager.GetString("StorageEmulatorInstallPathRegistryKeyValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SOFTWARE\Microsoft\Windows Azure Storage Emulator. + /// + public static string StorageEmulatorRegistryKey + { + get + { + return ResourceManager.GetString("StorageEmulatorRegistryKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Primary Key:. + /// + public static string StoragePrimaryKey + { + get + { + return ResourceManager.GetString("StoragePrimaryKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Secondary Key:. + /// + public static string StorageSecondaryKey + { + get + { + return ResourceManager.GetString("StorageSecondaryKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The subscription named {0} already exists.. + /// + public static string SubscriptionAlreadyExists + { + get + { + return ResourceManager.GetString("SubscriptionAlreadyExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The SubscriptionDataFile parameter is deprecated. This parameter will be removed in a future release. See https://github.com/Azure/azure-powershell/wiki/Proposed-Design-Stateless-Azure-Profile for a description of the upcoming mechanism for providing alternate sources of subscription information.. + /// + public static string SubscriptionDataFileDeprecated + { + get + { + return ResourceManager.GetString("SubscriptionDataFileDeprecated", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to DefaultSubscriptionData.xml. + /// + public static string SubscriptionDataFileName + { + get + { + return ResourceManager.GetString("SubscriptionDataFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The subscription data file {0} does not exist.. + /// + public static string SubscriptionDataFileNotFound + { + get + { + return ResourceManager.GetString("SubscriptionDataFileNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The subscription id {0} doesn't exist.. + /// + public static string SubscriptionIdNotFoundMessage + { + get + { + return ResourceManager.GetString("SubscriptionIdNotFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Subscription must not be null. + /// + public static string SubscriptionMustNotBeNull + { + get + { + return ResourceManager.GetString("SubscriptionMustNotBeNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Subscription name needs to be specified.. + /// + public static string SubscriptionNameNeedsToBeSpecified + { + get + { + return ResourceManager.GetString("SubscriptionNameNeedsToBeSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The subscription name {0} doesn't exist.. + /// + public static string SubscriptionNameNotFoundMessage + { + get + { + return ResourceManager.GetString("SubscriptionNameNotFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Subscription needs to be specified.. + /// + public static string SubscriptionNeedsToBeSpecified + { + get + { + return ResourceManager.GetString("SubscriptionNeedsToBeSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Suspend. + /// + public static string Suspend + { + get + { + return ResourceManager.GetString("Suspend", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Swapping website production slot .... + /// + public static string SwappingWebsite + { + get + { + return ResourceManager.GetString("SwappingWebsite", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to swap the website '{0}' production slot with slot '{1}'?. + /// + public static string SwapWebsiteSlotWarning + { + get + { + return ResourceManager.GetString("SwapWebsiteSlotWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The Switch-AzureMode cmdlet is deprecated and will be removed in a future release.. + /// + public static string SwitchAzureModeDeprecated + { + get + { + return ResourceManager.GetString("SwitchAzureModeDeprecated", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [AzureLongRunningJob]: Starting cmdlet execution, setting for cmdlet confirmation required: '{0}'. + /// + public static string TraceBeginLROJob + { + get + { + return ResourceManager.GetString("TraceBeginLROJob", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [AzureLongRunningJob]: Blocking job for ShouldMethod '{0}'. + /// + public static string TraceBlockLROThread + { + get + { + return ResourceManager.GetString("TraceBlockLROThread", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [AzureLongRunningJob]: Completing cmdlet execution in RunJob. + /// + public static string TraceEndLROJob + { + get + { + return ResourceManager.GetString("TraceEndLROJob", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [AzureLongRunningJob]: State change from '{0}' to '{1}' because '{2}'. + /// + public static string TraceHandleLROStateChange + { + get + { + return ResourceManager.GetString("TraceHandleLROStateChange", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [AzureLongRunningJob]: Unblocking job due to stoppage or failure. + /// + public static string TraceHandlerCancelJob + { + get + { + return ResourceManager.GetString("TraceHandlerCancelJob", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [AzureLongRunningJob]: Unblocking job that was previously blocked.. + /// + public static string TraceHandlerUnblockJob + { + get + { + return ResourceManager.GetString("TraceHandlerUnblockJob", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [AzureLongRunningJob]: Error in cmdlet execution. + /// + public static string TraceLROJobException + { + get + { + return ResourceManager.GetString("TraceLROJobException", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [AzureLongRunningJob]: Removing state changed event handler, exception '{0}'. + /// + public static string TraceRemoveLROEventHandler + { + get + { + return ResourceManager.GetString("TraceRemoveLROEventHandler", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [AzureLongRunningJob]: ShouldMethod '{0}' unblocked.. + /// + public static string TraceUnblockLROThread + { + get + { + return ResourceManager.GetString("TraceUnblockLROThread", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to decode string from base 64. Please make sure the string is correctly encoded: {0}.. + /// + public static string UnableToDecodeBase64String + { + get + { + return ResourceManager.GetString("UnableToDecodeBase64String", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to update mismatching Json structured: {0} {1}.. + /// + public static string UnableToPatchJson + { + get + { + return ResourceManager.GetString("UnableToPatchJson", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provider {0} is unknown.. + /// + public static string UnknownProviderMessage + { + get + { + return ResourceManager.GetString("UnknownProviderMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Update. + /// + public static string Update + { + get + { + return ResourceManager.GetString("Update", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Updated settings for subscription '{0}'. Current subscription is '{1}'.. + /// + public static string UpdatedSettings + { + get + { + return ResourceManager.GetString("UpdatedSettings", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to User name is not valid.. + /// + public static string UserNameIsNotValid + { + get + { + return ResourceManager.GetString("UserNameIsNotValid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to User name needs to be specified.. + /// + public static string UserNameNeedsToBeSpecified + { + get + { + return ResourceManager.GetString("UserNameNeedsToBeSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A value for the VLan Id has to be provided.. + /// + public static string VlanIdRequired + { + get + { + return ResourceManager.GetString("VlanIdRequired", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please wait.... + /// + public static string WaitMessage + { + get + { + return ResourceManager.GetString("WaitMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The azure storage emulator is not installed, skip launching.... + /// + public static string WarningWhenStorageEmulatorIsMissing + { + get + { + return ResourceManager.GetString("WarningWhenStorageEmulatorIsMissing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Web.cloud.config. + /// + public static string WebCloudConfig + { + get + { + return ResourceManager.GetString("WebCloudConfig", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to web.config. + /// + public static string WebConfigTemplateFileName + { + get + { + return ResourceManager.GetString("WebConfigTemplateFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to MSDeploy. + /// + public static string WebDeployKeywordInWebSitePublishProfile + { + get + { + return ResourceManager.GetString("WebDeployKeywordInWebSitePublishProfile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot build the project successfully. Please see logs in {0}.. + /// + public static string WebProjectBuildFailTemplate + { + get + { + return ResourceManager.GetString("WebProjectBuildFailTemplate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WebRole. + /// + public static string WebRole + { + get + { + return ResourceManager.GetString("WebRole", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to setup_web.cmd > log.txt. + /// + public static string WebRoleStartupTaskCommandLine + { + get + { + return ResourceManager.GetString("WebRoleStartupTaskCommandLine", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WebRole.xml. + /// + public static string WebRoleTemplateFileName + { + get + { + return ResourceManager.GetString("WebRoleTemplateFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WebSite with given name {0} already exists in the specified Subscription and Webspace.. + /// + public static string WebsiteAlreadyExists + { + get + { + return ResourceManager.GetString("WebsiteAlreadyExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WebSite with given name {0} already exists in the specified Subscription and Location.. + /// + public static string WebsiteAlreadyExistsReplacement + { + get + { + return ResourceManager.GetString("WebsiteAlreadyExistsReplacement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Site {0} already has repository created for it.. + /// + public static string WebsiteRepositoryAlreadyExists + { + get + { + return ResourceManager.GetString("WebsiteRepositoryAlreadyExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Workspaces/WebsiteExtension/Website/{0}/dashboard/. + /// + public static string WebsiteSufixUrl + { + get + { + return ResourceManager.GetString("WebsiteSufixUrl", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to https://{0}/msdeploy.axd?site={1}. + /// + public static string WebSiteWebDeployUriTemplate + { + get + { + return ResourceManager.GetString("WebSiteWebDeployUriTemplate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WorkerRole. + /// + public static string WorkerRole + { + get + { + return ResourceManager.GetString("WorkerRole", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to setup_worker.cmd > log.txt. + /// + public static string WorkerRoleStartupTaskCommandLine + { + get + { + return ResourceManager.GetString("WorkerRoleStartupTaskCommandLine", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WorkerRole.xml. + /// + public static string WorkerRoleTemplateFileName + { + get + { + return ResourceManager.GetString("WorkerRoleTemplateFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to (x86). + /// + public static string x86InProgramFiles + { + get + { + return ResourceManager.GetString("x86InProgramFiles", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Yes. + /// + public static string Yes + { + get + { + return ResourceManager.GetString("Yes", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Yes, I agree. + /// + public static string YesHint + { + get + { + return ResourceManager.GetString("YesHint", resourceCulture); + } + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Properties/Resources.resx b/src/Sphere/Sphere.Autorest/generated/runtime/Properties/Resources.resx new file mode 100644 index 000000000000..a08a2e50172b --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Properties/Resources.resx @@ -0,0 +1,1747 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + The remote server returned an error: (401) Unauthorized. + + + Account "{0}" has been added. + + + To switch to a different subscription, please use Select-AzureSubscription. + + + Subscription "{0}" is selected as the default subscription. + + + To view all the subscriptions, please use Get-AzureSubscription. + + + Add-On {0} is created successfully. + + + Add-on name {0} is already used. + + + Add-On {0} not found. + + + Add-on {0} is removed successfully. + + + Add-On {0} is updated successfully. + + + Role has been created at {0}\{1}. + + + Role has been created at {0}\{1}. For easy access to Microsoft Azure services from your application code, install the Microsoft Azure client library for Node.js by running ‘npm install azure’. + + + Role has been created at {0}\{1}. For easy access to Microsoft Azure services from your application code, install the Microsoft Azure client library for PHP by running "pear WindowsAzure/WindowsAzure". + + + Unable to set role permissions. Please give the 'Network Service' user 'Read & execute' and 'Modify' permissions to the role folder, or run PowerShell as an Administrator + + + A role name '{0}' already exists + + + Windows Azure Powershell\ + + + https://manage.windowsazure.com + + + AZURE_PORTAL_URL + + + Azure SDK\{0}\ + + + Base Uri was empty. + WAPackIaaS + + + {0} begin processing without ParameterSet. + + + {0} begin processing with ParameterSet '{1}'. + + + Blob with the name {0} already exists in the account. + + + https://{0}.blob.core.windows.net/ + + + AZURE_BLOBSTORAGE_TEMPLATE + + + CACHERUNTIMEURL + + + cache + + + CacheRuntimeVersion + + + Installing caching version {0} for Role '{1}' (the caching version locally installed is: {2}) + + + Cannot find {0} with name {1}. + + + Deployment for service {0} with {1} slot doesn't exist + + + Can't find valid Microsoft Azure role in current directory {0} + + + service {0} configuration file (ServiceConfiguration.Cloud.cscfg) is either null or doesn't exist + + + Invalid service path! Cannot locate ServiceDefinition.csdef in current folder or parent folders. + + + The subscription named {0} with id {1} is not currently imported. You must import this subscription before it can be updated. + + + ManagementCertificate + + + certificate.pfx + + + Certificate imported into CurrentUser\My\{0} + + + Your account does not have access to the private key for certificate {0} + + + {0} {1} deployment for {2} service + + + Cloud service {0} is in {1} state. + + + Changing/Removing public environment '{0}' is not allowed. + + + Service {0} is set to value {1} + + + Choose which publish settings file to use: + + + Microsoft.WindowsAzure.Plugins.Caching.ClientDiagnosticLevel + + + 1 + + + cloud_package.cspkg + + + ServiceConfiguration.Cloud.cscfg + + + Add-ons for {0} + + + Communication could not be established. This could be due to an invalid subscription ID. Note that subscription IDs are case sensitive. + + + Complete + + + config.json + + + VirtualMachine creation failed. + WAPackIaaS + + + Creating the website failed. If this is the first website for this subscription, please create it using the management portal instead. + + + Microsoft.ApplicationServer.Caching.DataCacheClientsSection, Microsoft.ApplicationServer.Caching.Core + + + //blobcontainer[@datacenter='{0}'] + + + Setting: {0} as the default and current subscription. To view other subscriptions use Get-AzureSubscription + + + none + + + There are no hostnames which could be used for validation. + + + 8080 + + + 1000 + + + Auto + + + 80 + + + Delete + WAPackIaaS + + + The {0} slot for service {1} is already in {2} state + + + The deployment in {0} slot for service {1} is removed + + + Microsoft.WindowsAzure.Plugins.Caching.DiagnosticLevel + + + 1 + + + The key to add already exists in the dictionary. + + + The array index cannot be less than zero. + + + The supplied array does not have enough room to contain the copied elements. + + + The provided dns {0} doesn't exist + + + Microsoft Azure Certificate + + + Endpoint can't be retrieved for storage account + + + {0} end processing. + + + To use Active Directory authentication, you must configure the ActiveDirectoryEndpoint, ActiveDirectoryTenantId, and ActiveDirectorServiceEndpointResourceId for environment of '{0}'. You can configure these properties for this environment using the Set-AzureEnvironment cmdlet. + + + The environment '{0}' already exists. + + + environments.xml + + + Error creating VirtualMachine + WAPackIaaS + + + Unable to download available runtimes for location '{0}' + + + Error updating VirtualMachine + WAPackIaaS + + + Job Id {0} failed. Error: {1}, ExceptionDetails: {2} + WAPackIaaS + + + The HTTP request was forbidden with client authentication scheme 'Anonymous'. + + + This add-on requires you to purchase the first instance through the Microsoft Azure Portal. Subsequent purchases can be performed through PowerShell. + + + Operation Status: + + + Resources\Scaffolding\General + + + Getting all available Microsoft Azure Add-Ons, this may take few minutes... + + + Name{0}Primary Key{0}Seconday Key + + + Git not found. Please install git and place it in your command line path. + + + Could not find publish settings. Please run Import-AzurePublishSettingsFile. + + + iisnode.dll + + + iisnode + + + iisnode-dev\\release\\x64 + + + iisnode + + + Installing IISNode version {0} in Azure for WebRole '{1}' (the version locally installed is: {2}) + + + Internal Server Error + + + Cannot enable memcach protocol on a cache worker role {0}. + + + Invalid certificate format. + + + The provided configuration path is invalid or doesn't exist + + + The country name is invalid, please use a valid two character country code, as described in ISO 3166-1 alpha-2. + + + Deployment with {0} does not exist + + + The deployment slot name {0} is invalid. Slot name must be either "Staging" or "Production". + + + Invalid service endpoint. + + + File {0} has invalid characters + + + You must create your git publishing credentials using the Microsoft Azure portal. +Please follow these steps in the portal: +1. On the left side open "Web Sites" +2. Click on any website +3. Choose "Setup Git Publishing" or "Reset deployment credentials" +4. Back in the PowerShell window, rerun this command by typing "New-AzureWebSite {site name} -Git -PublishingUsername {username} + + + The value {0} provided is not a valid GUID. Please provide a valid GUID. + + + The specified hostname does not exist. Please specify a valid hostname for the site. + + + Role {0} instances must be greater than or equal 0 and less than or equal 20 + + + There was an error creating your webjob. Please make sure that the script is in the root folder of the zip file. + + + Could not download a valid runtime manifest, Please check your internet connection and try again. + + + The account {0} was not found. Please specify a valid account name. + + + The provided name "{0}" does not match the service bus namespace naming rules. + + + Value cannot be null. Parameter name: '{0}' + + + The provided package path is invalid or doesn't exist + + + '{0}' is an invalid parameter set name. + + + {0} doesn't exist in {1} or you've not passed valid value for it + + + Path {0} has invalid characters + + + The provided publish settings file {0} has invalid content. Please get valid by running cmdlet Get-AzurePublishSettingsFile + + + The provided role name "{0}" has invalid characters + + + A valid name for the service root folder is required + + + {0} is not a recognized runtime type + + + A valid language is required + + + No subscription is currently selected. Use Select-Subscription to activate a subscription. + + + The provided location "{0}" does not exist in the available locations use Get-AzureSBLocation for listing available locations. + + + Please provide a service name or run this command from inside a service project directory. + + + You must provide valid value for {0} + + + settings.json is invalid or doesn't exist + + + The subscription named '{0}' cannot be found. Use Set-AzureSubscription to initialize the subscription data. + + + The provided subscription id {0} is not valid + + + A valid subscription name is required. This can be provided using the -Subscription parameter or by setting the subscription via the Set-AzureSubscription cmdlet + + + The provided subscriptions file {0} has invalid content. + + + Role {0} VM size should be ExtraSmall, Small, Medium, Large or ExtraLarge. + + + The web job file must have *.zip extension + + + Singleton option works for continuous jobs only. + + + The website {0} was not found. Please specify a valid website name. + + + No job for id: {0} was found. + WAPackIaaS + + + engines + + + Scaffolding for this language is not yet supported + + + Link already established + + + local_package.csx + + + ServiceConfiguration.Local.cscfg + + + Looking for {0} deployment for {1} cloud service... + + + Looking for cloud service {0}... + + + managementCertificate.pem + + + ?whr={0} + + + //baseuri + + + uri + + + http://az413943.vo.msecnd.net/node/runtimemanifest_0.7.5.2.xml + + + Multiple Add-Ons found holding name {0} + + + Multiple possible publishing users. Please go to the Portal and use the listed deployment user, or click 'set/reset deployment credentials' to set up a new user account, then reurn this cmdlet and specify PublishingUsername. + + + The first publish settings file "{0}" is used. If you want to use another file specify the file name. + + + Microsoft.WindowsAzure.Plugins.Caching.NamedCaches + + + {"caches":[{"name":"default","policy":{"eviction":{"type":0},"expiration":{"defaultTTL":10,"isExpirable":true,"type":1},"serverNotification":{"isEnabled":false}},"secondaries":0}]} + + + A publishing username is required. Please specify one using the argument PublishingUsername. + + + New Add-On Confirmation + + + By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis +for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) +agree to the {2}'s terms of user and privacy statement at {0} and (c) agree to sharing my +contact information with {2}. + + + Internal Server Error. This could happen because the namespace name is already used or due to an incorrect location name. Use Get-AzureSBLocation cmdlet to list valid names. + + + By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis +for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) +acknowledge the offering is provided by {2}, not Microsoft, and agree to {2}'s terms of +use and privacy statement at {0} and (c) agree to sharing my contact information with {2}. + + + Service has been created at {0} + + + No + + + There is no access token cached for subscription {0}, user id {1}. Use the Add-AzureAccount cmdlet to log in again and get a token for this subscription. + + + The service does not have any cache worker roles, add one first by running cmdlet Add-AzureCacheWorkerRole. + + + No clouds available + WAPackIaaS + + + nodejs + + + node + + + node.exe + + + There is no default subscription set, please set a default subscription by running Set-AzureSubscription -Default <subscription name> + + + Microsoft SDKs\Azure\Nodejs\Nov2011 + + + nodejs + + + node + + + Resources\Scaffolding\Node + + + Microsoft.WindowsAzure.Commands.CloudService.ScaffoldingResources.Node + + + Installing Node version {0} in Azure for Role '{1}' (the Node version locally installed is: {2}) + + + No, I do not agree + + + No publish settings files with extension *.publishsettings are found in the directory "{0}". + + + '{0}' must be a cache worker role. Verify that it has proper cache worker role configuration. + + + Certificate can't be null. + + + {0} could not be null or empty + + + Unable to add a null RoleSettings to {0} + + + Unable to add new role to null service definition + + + The request offer '{0}' is not found. + + + Operation "{0}" failed on VM with ID: {1} + WAPackIaaS + + + The REST operation failed with message '{0}' and error code '{1}' + + + Job Id {0} did not complete within expected time or it is in Failed/Canceled/Invalid state. + WAPackIaaS + + + package + + + Package is created at service root path {0}. + + + {{ + "author": "", + + "name": "{0}", + "version": "0.0.0", + "dependencies":{{}}, + "devDependencies":{{}}, + "optionalDependencies": {{}}, + "engines": {{ + "node": "*", + "iisnode": "*" + }} + +}} + + + + package.json + + + A value for the Peer Asn has to be provided. + + + 5.4.0 + + + php + + + Resources\Scaffolding\PHP + + + Microsoft.WindowsAzure.Commands.CloudService.ScaffoldingResources.PHP + + + Installing PHP version {0} for Role '{1}' (the PHP version locally installed is: {2}) + + + You must create your first web site using the Microsoft Azure portal. +Please follow these steps in the portal: +1. At the bottom of the page, click on New > Web Site > Quick Create +2. Type {0} in the URL field +3. Click on "Create Web Site" +4. Once the site has been created, click on the site name +5. Click on "Set up Git publishing" or "Reset deployment credentials" and setup a publishing username and password. Use those credentials for all new websites you create. + + + 6. Back in the console window, rerun this command by typing "New-AzureWebsite <site name> -Git" + + + A value for the Primary Peer Subnet has to be provided. + + + Promotion code can be used only when updating to a new plan. + + + Service not published at user request. + + + Complete. + + + Connecting... + + + Created Deployment ID: {0}. + + + Created hosted service '{0}'. + + + Created Website URL: {0}. + + + Creating... + + + Initializing... + + + busy + + + creating the virtual machine + + + Instance {0} of role {1} is {2}. + + + ready + + + Preparing deployment for {0} with Subscription ID: {1}... + + + Publishing {0} to Microsoft Azure. This may take several minutes... + + + publish settings + + + Azure + + + .PublishSettings + + + publishSettings.xml + + + Publish settings imported + + + AZURE_PUBLISHINGPROFILE_URL + + + Starting... + + + Upgrading... + + + Uploading Package to storage service {0}... + + + Verifying storage account '{0}'... + + + Replace current deployment with '{0}' Id ? + + + Are you sure you want to regenerate key? + + + Generate new key. + + + Are you sure you want to remove account '{0}'? + + + Removing account + + + Remove Add-On Confirmation + + + If you delete this add-on, your data may be deleted and the operation may not be undone. You may have to purchase it again from the Microsoft Azure Store to use it. The price of the add-on may not be refunded. Are you sure you want to delete this add-on? Enter “Yes” to confirm. + + + Remove-AzureBGPPeering Operation failed. + + + Removing Bgp Peering + + + Successfully removed Azure Bgp Peering with Service Key {0}. + + + Are you sure you want to remove the Bgp Peering with service key '{0}'? + + + Are you sure you want to remove the Dedicated Circuit with service key '{0}'? + + + Remove-AzureDedicatedCircuit Operation failed. + + + Remove-AzureDedicatedCircuitLink Operation failed. + + + Removing Dedicated Circui Link + + + Successfully removed Azure Dedicated Circuit Link with Service Key {0} and Vnet Name {1} + + + Are you sure you want to remove the Dedicated Circuit Link with service key '{0}' and virtual network name '{1}'? + + + Removing Dedicated Circuit + + + Successfully removed Azure Dedicated Circuit with Service Key {0}. + + + Removing cloud service {0}... + + + Removing {0} deployment for {1} service + + + Removing job collection + + + Are you sure you want to remove the job collection "{0}" + + + Removing job + + + Are you sure you want to remove the job "{0}" + + + Are you sure you want to remove the account? + + + Account removed. + + + Internal Server Error. This could happen because the namespace does not exist or it does not exist under your subscription. + + + Removing old package {0}... + + + Are you sure you want to delete the namespace '{0}'? + + + Are you sure you want to remove cloud service? + + + Remove cloud service and all it's deployments + + + Are you sure you want to remove subscription '{0}'? + + + Removing subscription + + + Are you sure you want to delete the VM '{0}'? + + + Deleting VM. + + + Removing WebJob... + + + Are you sure you want to remove job '{0}'? + + + Removing website + + + Are you sure you want to remove the website "{0}" + + + Deleting namespace + + + Repository is not setup. You need to pass a valid site name. + + + Reserved IP with the Name:'{0}' will no longer be in use after the deployment is deleted, and it is still reserved for later use. + + + Resource with ID : {0} does not exist. + WAPackIaaS + + + Restart + WAPackIaaS + + + Resume + WAPackIaaS + + + /role:{0};"{1}/{0}" + + + bin + + + Role {0} is {1} + + + 20 + + + role name + + + The provided role name {0} doesn't exist + + + RoleSettings.xml + + + Role type {0} doesn't exist + + + public static Dictionary<string, Location> ReverseLocations { get; private set; } + + + Preparing runtime deployment for service '{0}' + + + WARNING Runtime Mismatch: Are you sure that you want to publish service '{0}' using an Azure runtime version that does not match your local runtime version? + + + RUNTIMEOVERRIDEURL + + + /runtimemanifest/runtimes/runtime + + + RUNTIMEID + + + RUNTIMEURL + + + RUNTIMEVERSIONPRIMARYKEY + + + scaffold.xml + + + Invalid location entered. Pick one of the locations from Get-AzureSchedulerLocation + + + A value for the Secondary Peer Subnet has to be provided. + + + Service {0} already exists on disk in location {1} + + + No ServiceBus authorization rule with the given characteristics was found + + + The service bus entity '{0}' is not found. + + + Internal Server Error. This could happen due to an incorrect/missing namespace + + + service configuration + + + service definition + + + ServiceDefinition.csdef + + + {0}Deploy + + + The specified cloud service "{0}" does not exist. + + + {0} slot for service {1} is in {2} state, please wait until it finish and update it's status + + + Begin Operation: {0} + + + Completed Operation: {0} + + + Begin Operation: {0} + + + Completed Operation: {0} + + + service name + + + Please provide name for the hosted service + + + service parent directory + + + Service {0} removed successfully + + + service directory + + + service settings + + + The storage account name '{0}' is invalid. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + + + The {0} slot for cloud service {1} doesn't exist. + + + {0} slot for service {1} is {2} + + + Set Add-On Confirmation + + + Note - You will be charged the amount for the new plan, without being refunded for time remaining +in the existing plan. +By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis +for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) +agree to the {2}'s terms of user and privacy statement at {0} and (c) agree to sharing my +contact information with {2}. + + + Note - You will be charged the amount for the new plan, without being refunded for time remaining +in the existing plan. +By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis +for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) +acknowledge the offering is provided by {2}, not Microsoft, and agree to {2}'s terms of +use and privacy statement at <url> and (c) agree to sharing my contact information with {2}. + + + Role {0} instances are set to {1} + + + {"Slot":"","Location":"","Subscription":"","StorageAccountName":""} + + + deploymentSettings.json + + + Confirm + + + Shutdown + WAPackIaaS + + + /sites:{0};{1};"{2}/{0}" + + + 1000 + + + Start + WAPackIaaS + + + Started + + + Starting Emulator... + + + start + + + Stop + WAPackIaaS + + + Stopping emulator... + + + Stopped + + + stop + + + Account Name: + + + Cannot find storage account '{0}' please type the name of an existing storage account. + + + AzureStorageEmulator.exe + + + InstallPath + + + SOFTWARE\Microsoft\Windows Azure Storage Emulator + + + Primary Key: + + + Secondary Key: + + + The subscription named {0} already exists. + + + DefaultSubscriptionData.xml + + + The subscription data file {0} does not exist. + + + Subscription must not be null + WAPackIaaS + + + Suspend + WAPackIaaS + + + Swapping website production slot ... + + + Are you sure you want to swap the website '{0}' production slot with slot '{1}'? + + + The provider {0} is unknown. + + + Update + WAPackIaaS + + + Updated settings for subscription '{0}'. Current subscription is '{1}'. + + + A value for the VLan Id has to be provided. + + + Please wait... + + + The azure storage emulator is not installed, skip launching... + + + Web.cloud.config + + + web.config + + + MSDeploy + + + Cannot build the project successfully. Please see logs in {0}. + + + WebRole + + + setup_web.cmd > log.txt + + + WebRole.xml + + + WebSite with given name {0} already exists in the specified Subscription and Webspace. + + + WebSite with given name {0} already exists in the specified Subscription and Location. + + + Site {0} already has repository created for it. + + + Workspaces/WebsiteExtension/Website/{0}/dashboard/ + + + https://{0}/msdeploy.axd?site={1} + + + WorkerRole + + + setup_worker.cmd > log.txt + + + WorkerRole.xml + + + Yes + + + Yes, I agree + + + Remove-AzureTrafficManagerProfile Operation failed. + + + Successfully removed Traffic Manager profile with name {0}. + + + Are you sure you want to remove the Traffic Manager profile "{0}"? + + + Profile {0} already has an endpoint with name {1} + + + Profile {0} does not contain endpoint {1}. Adding it. + + + The endpoint {0} cannot be removed from profile {1} because it's not in the profile. + + + Insufficient parameters passed to create a new endpoint. + + + Ambiguous operation: the profile name specified doesn't match the name of the profile object. + + + <NONE> + + + "An exception occurred when calling the ServiceManagement API. HTTP Status Code: {0}. Service Management Error Code: {1}. Message: {2}. Operation Tracking ID: {3}." + {0} is the HTTP status code. {1} is the Service Management Error Code. {2} is the Service Management Error message. {3} is the operation tracking ID. + + + Unable to decode string from base 64. Please make sure the string is correctly encoded: {0}. + {0} is the string that is not in a valid base 64 format. + + + Skipping external tenant {0}, because you are using a guest or a foreign principal object identity. In order to access this tenant, please run Add-AzureAccount without "-Credential". + + + Removing an environment will remove all associated subscriptions and accounts. Are you sure you want to remove an environment '{0}'? + + + Removing environment + + + There is no subscription associated with account {0}. + + + Account id doesn't match one in subscription. + + + Environment name doesn't match one in subscription. + + + Removing the Azure profile will remove all associated environments, subscriptions, and accounts. Are you sure you want to remove the Azure profile? + + + Removing the Azure profile + + + The SubscriptionDataFile parameter is deprecated. This parameter will be removed in a future release. See https://github.com/Azure/azure-powershell/wiki/Proposed-Design-Stateless-Azure-Profile for a description of the upcoming mechanism for providing alternate sources of subscription information. + + + Account needs to be specified + + + No default subscription has been designated. Use Select-AzureSubscription -Default <subscriptionName> to set the default subscription. + + + Path must specify a valid path to an Azure profile. + + + Property bag Hashtable must contain one of the following sets of properties: {SubscriptionId, Certificate}, {SubscriptionId, Username, Password}, {SubscriptionId, ServicePrincipal, Password, Tenant}, {SubscriptionId, AccountId, Token} + + + Property bag Hashtable must contain a 'Certificate' of type 'X509Certificate2'. + + + Property bag Hashtable must contain a 'Password' with an associated 'Username' or 'ServicePrincipal'. + + + Property bag Hashtable must contain a 'SubscriptionId'. + + + Selected profile must not be null. + + + The Switch-AzureMode cmdlet is deprecated and will be removed in a future release. + + + OperationID : '{0}' + + + Cannot get module for DscResource '{0}'. Possible solutions: +1) Specify -ModuleName for Import-DscResource in your configuration. +2) Unblock module that contains resource. +3) Move Import-DscResource inside Node block. + + 0 = name of DscResource + + + Your current PowerShell version {1} is less then required by this cmdlet {0}. Consider download and install latest PowerShell version. + {0} = minimal required PS version, {1} = current PS version + + + Parsing configuration script: {0} + {0} is the path to a script file + + + Configuration script '{0}' contained parse errors: +{1} + 0 = path to the configuration script, 1 = parser errors + + + List of required modules: [{0}]. + {0} = list of modules + + + Temp folder '{0}' created. + {0} = temp folder path + + + Copy '{0}' to '{1}'. + {0} = source, {1} = destination + + + Copy the module '{0}' to '{1}'. + {0} = source, {1} = destination + + + File '{0}' already exists. Use the -Force parameter to overwrite it. + {0} is the path to a file + + + Configuration file '{0}' not found. + 0 = path to the configuration file + + + Path '{0}' not found. + 0 = path to the additional content file/directory + + + Path '{0}' not found. + 0 = path to the additional content file/directory + + + Invalid configuration file: {0}. +The file needs to be a PowerShell script (.ps1 or .psm1) or a ZIP archive (.zip). + 0 = path to the configuration file + + + Invalid configuration file: {0}. +The file needs to be a PowerShell script (.ps1 or .psm1). + 0 = path to the configuration file + + + Create Archive + + + Upload '{0}' + {0} is the name of an storage blob + + + Storage Blob '{0}' already exists. Use the -Force parameter to overwrite it. + {0} is the name of an storage blob + + + Configuration published to {0} + {0} is an URI + + + Deleted '{0}' + {0} is the path of a file + + + Cannot delete '{0}': {1} + {0} is the path of a file, {1} is an error message + + + Cannot find the WadCfg end element in the config. + + + WadCfg start element in the config is not matching the end element. + + + Cannot find the WadCfg element in the config. + + + Cannot find configuration data file: {0} + + + The configuration data must be a .psd1 file + + + Cannot change built-in environment {0}. + + + Azure PowerShell collects usage data in order to improve your experience. +The data is anonymous and does not include commandline argument values. +The data is collected by Microsoft. + +Use the Disable-AzDataCollection cmdlet to turn the feature Off. The cmdlet can be found in the Az.Accounts module. To disable data collection: PS > Disable-AzDataCollection. +Use the Enable-AzDataCollection cmdlet to turn the feature On. The cmdlet can be found in the Az.Accounts module. To enable data collection: PS > Enable-AzDataCollection. + + + Microsoft Azure PowerShell Data Collection Confirmation + + + You choose not to participate in Microsoft Azure PowerShell data collection. + + + This confirmation message will be dismissed in '{0}' second(s)... + + + You choose to participate in Microsoft Azure PowerShell data collection. + + + The setting profile has been saved to the following path '{0}'. + + + [Common.Authentication]: Authenticating for account {0} with single tenant {1}. + + + Changing public environment is not supported. + + + Environment name needs to be specified. + + + Environment needs to be specified. + + + The environment name '{0}' is not found. + + + File path is not valid. + + + Must specify a non-null subscription name. + + + The default subscription is being removed. Use Select-AzureSubscription -Default <subscriptionName> to select a new default subscription. + + + Removing public environment is not supported. + + + The subscription id {0} doesn't exist. + + + Subscription name needs to be specified. + + + The subscription name {0} doesn't exist. + + + Subscription needs to be specified. + + + User name is not valid. + + + User name needs to be specified. + + + "There is no current context, please log in using Connect-AzAccount." + + + No subscriptions are associated with the logged in account in Azure Service Management (RDFE). This means that the logged in user is not an administrator or co-administrator for any account.\r\nDid you mean to execute Connect-AzAccount? + + + No certificate was found in the certificate store with thumbprint {0} + + + Illegal characters in path. + + + Invalid certificate format. Publish settings may be corrupted. Use Get-AzurePublishSettingsFile to download updated settings + + + "{0}" is an invalid DNS name for {1} + + + The provided file in {0} must be have {1} extension + + + {0} is invalid or empty + + + Please connect to internet before executing this cmdlet + + + Path {0} doesn't exist. + + + Path for {0} doesn't exist in {1}. + + + &whr={0} + + + The provided service name {0} already exists, please pick another name + + + Unable to update mismatching Json structured: {0} {1}. + + + (x86) + + + Azure PowerShell collects usage data in order to improve your experience. +The data is anonymous and does not include commandline argument values. +The data is collected by Microsoft. + +Use the Disable-AzureDataCollection cmdlet to turn the feature Off. The cmdlet can be found in the Azure module. To disable data collection: PS > Disable-AzureDataCollection. +Use the Enable-AzureDataCollection cmdlet to turn the feature On. The cmdlet can be found in the Azure module. To enable data collection: PS > Enable-AzureDataCollection. + + + Execution failed because a background thread could not prompt the user. + + + Azure Long-Running Job + + + The cmdlet failed in background execution. The returned error was '{0}'. Please execute the cmdlet again. You may need to execute this cmdlet synchronously, by omitting the '-AsJob' parameter. + 0(string): exception message in background task + + + Please execute the cmdlet again and include the 'Force' parameter, if available, to avoid unnecessary prompts. + + + Please execute the cmdlet again and omit the 'Confirm' parameter when using the 'AsJob' parameter. + + + Please increase the user $ConfirmPreference setting, or include turn off confirmation using '-Confirm:$false' when using the 'AsJob' parameter and execute the cmdet again. + + + Please execute the cmdlet again and omit the 'WhatIf' parameter when using the 'AsJob' parameter. + + + [AzureLongRunningJob]: Starting cmdlet execution, setting for cmdlet confirmation required: '{0}' + 0(bool): whether cmdlet confirmation is required + + + [AzureLongRunningJob]: Blocking job for ShouldMethod '{0}' + 0(string): method type + + + [AzureLongRunningJob]: Completing cmdlet execution in RunJob + + + [AzureLongRunningJob]: State change from '{0}' to '{1}' because '{2}' + 0(string): last state, 1(string): new state, 2(string): state change reason + + + [AzureLongRunningJob]: Unblocking job due to stoppage or failure + + + [AzureLongRunningJob]: Unblocking job that was previously blocked. + + + [AzureLongRunningJob]: Error in cmdlet execution + + + [AzureLongRunningJob]: Removing state changed event handler, exception '{0}' + 0(string): exception message + + + [AzureLongRunningJob]: ShouldMethod '{0}' unblocked. + 0(string): methodType + + + +- The parameter : '{0}' is changing. + + + +- The parameter : '{0}' is becoming mandatory. + + + +- The parameter : '{0}' is being replaced by parameter : '{1}'. + + + +- The parameter : '{0}' is being replaced by mandatory parameter : '{1}'. + + + +- Change description : {0} + + + The cmdlet is being deprecated. There will be no replacement for it. + + + The cmdlet parameter set is being deprecated. There will be no replacement for it. + + + The cmdlet '{0}' is replacing this cmdlet. + + + +- The output type is changing from the existing type :'{0}' to the new type :'{1}' + + + +- The output type '{0}' is changing + + + +- The following properties are being added to the output type : + + + +- The following properties in the output type are being deprecated : + + + {0} + + + +- Cmdlet : '{0}' + - {1} + + + Upcoming breaking changes in the cmdlet '{0}' : + + + +- This change will take effect on '{0}' + + + +- The change is expected to take effect from version : '{0}' + + + ```powershell +# Old +{0} + +# New +{1} +``` + + + + +Cmdlet invocation changes : + Old Way : {0} + New Way : {1} + + + +The output type '{0}' is being deprecated without a replacement. + + + +The type of the parameter is changing from '{0}' to '{1}'. + + + +Note : Go to {0} for steps to suppress this breaking change warning, and other information on breaking changes in Azure PowerShell. + + + This cmdlet is in preview. Its behavior is subject to change based on customer feedback. + + + The estimated generally available date is '{0}'. + + + - The change is expected to take effect from Az version : '{0}' + + \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Response.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Response.cs new file mode 100644 index 000000000000..e6005fd4806e --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Response.cs @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime +{ + using System; + using System.Threading.Tasks; + public class Response : EventData + { + public Response() : base() + { + } + } + + public class Response : Response + { + private Func> _resultDelegate; + private Task _resultValue; + + public Response(T value) : base() => _resultValue = Task.FromResult(value); + public Response(Func value) : base() => _resultDelegate = () => Task.FromResult(value()); + public Response(Func> value) : base() => _resultDelegate = value; + public Task Result => _resultValue ?? (_resultValue = this._resultDelegate()); + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Serialization/JsonSerializer.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Serialization/JsonSerializer.cs new file mode 100644 index 000000000000..73a95b8d6859 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Serialization/JsonSerializer.cs @@ -0,0 +1,350 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + internal class JsonSerializer + { + private int depth = 0; + + private SerializationOptions options = new SerializationOptions(); + + #region Deserialization + + internal T Deseralize(JsonObject json) + where T : new() + { + var contract = JsonModelCache.Get(typeof(T)); + + return (T)DeserializeObject(contract, json); + } + + internal object DeserializeObject(JsonModel contract, JsonObject json) + { + var instance = Activator.CreateInstance(contract.Type); + + depth++; + + // Ensure we don't recurse forever + if (depth > 5) throw new Exception("Depth greater than 5"); + + foreach (var field in json) + { + var member = contract[field.Key]; + + if (member != null) + { + var value = DeserializeValue(member, field.Value); + + member.SetValue(instance, value); + } + } + + depth--; + + return instance; + } + + private object DeserializeValue(JsonMember member, JsonNode value) + { + if (value.Type == JsonType.Null) return null; + + var type = member.Type; + + if (member.IsStringLike && value.Type != JsonType.String) + { + // Take the long path... + return DeserializeObject(JsonModelCache.Get(type), (JsonObject)value); + } + else if (member.Converter != null) + { + return member.Converter.FromJson(value); + } + else if (type.IsArray) + { + return DeserializeArray(type, (JsonArray)value); + } + else if (member.IsList) + { + return DeserializeList(type, (JsonArray)value); + } + else + { + var contract = JsonModelCache.Get(type); + + return DeserializeObject(contract, (JsonObject)value); + } + } + + private object DeserializeValue(Type type, JsonNode value) + { + if (type == null) throw new ArgumentNullException(nameof(type)); + + if (value.Type == JsonType.Null) return null; + + var typeDetails = TypeDetails.Get(type); + + if (typeDetails.JsonConverter != null) + { + return typeDetails.JsonConverter.FromJson(value); + } + else if (typeDetails.IsEnum) + { + return Enum.Parse(type, value.ToString(), ignoreCase: true); + } + else if (type.IsArray) + { + return DeserializeArray(type, (JsonArray)value); + } + else if (typeDetails.IsList) + { + return DeserializeList(type, (JsonArray)value); + } + else + { + var contract = JsonModelCache.Get(type); + + return DeserializeObject(contract, (JsonObject)value); + } + } + + internal Array DeserializeArray(Type type, JsonArray elements) + { + var elementType = type.GetElementType(); + + var elementTypeDetails = TypeDetails.Get(elementType); + + var array = Array.CreateInstance(elementType, elements.Count); + + int i = 0; + + if (elementTypeDetails.JsonConverter != null) + { + foreach (var value in elements) + { + array.SetValue(elementTypeDetails.JsonConverter.FromJson(value), i); + + i++; + } + } + else + { + foreach (var value in elements) + { + array.SetValue(DeserializeValue(elementType, value), i); + + i++; + } + } + + return array; + } + + internal IList DeserializeList(Type type, JsonArray jsonArray) + { + // TODO: Handle non-generic types + if (!type.IsGenericType) + throw new ArgumentException("Must be a generic type", nameof(type)); + + var elementType = type.GetGenericArguments()[0]; + + IList list; + + if (type.IsInterface) + { + // Create a concrete generic list + list = (IList)Activator.CreateInstance(typeof(List<>).MakeGenericType(elementType)); + } + else + { + list = (IList)Activator.CreateInstance(type); + } + + foreach (var value in jsonArray) + { + list.Add(DeserializeValue(elementType, value)); + } + + return list; + } + + #endregion + + #region Serialization + + internal JsonNode Serialize(object instance) => + Serialize(instance, SerializationOptions.Default); + + internal JsonNode Serialize(object instance, string[] include) => + Serialize(instance, new SerializationOptions { Include = include }); + + internal JsonNode Serialize(object instance, SerializationOptions options) + { + this.options = options; + + if (instance == null) + { + return XNull.Instance; + } + + return ReadValue(instance.GetType(), instance); + } + + #region Readers + + internal JsonArray ReadArray(IEnumerable collection) + { + var array = new XNodeArray(); + + foreach (var item in collection) + { + array.Add(ReadValue(item.GetType(), item)); + } + + return array; + } + + internal IEnumerable> ReadProperties(object instance) + { + var contract = JsonModelCache.Get(instance.GetType()); + + foreach (var member in contract.Members) + { + string name = member.Name; + + if (options.PropertyNameTransformer != null) + { + name = options.PropertyNameTransformer.Invoke(name); + } + + // Skip the field if it's not included + if ((depth == 1 && !options.IsIncluded(name))) + { + continue; + } + + var value = member.GetValue(instance); + + if (!member.EmitDefaultValue && (value == null || (member.IsList && ((IList)value).Count == 0) || value.Equals(member.DefaultValue))) + { + continue; + } + else if (options.IgnoreNullValues && value == null) // Ignore null values + { + continue; + } + + // Transform the value if there is one + if (options.Transformations != null) + { + var transform = options.GetTransformation(name); + + if (transform != null) + { + value = transform.Transformer(value); + } + } + + yield return new KeyValuePair(name, ReadValue(member.TypeDetails, value)); + } + } + + private JsonObject ReadObject(object instance) + { + depth++; + + // TODO: Guard against a self referencing graph + if (depth > options.MaxDepth) + { + depth--; + + return new JsonObject(); + } + + var node = new JsonObject(ReadProperties(instance)); + + depth--; + + return node; + } + + private JsonNode ReadValue(Type type, object value) + { + if (value == null) + { + return XNull.Instance; + } + + var member = TypeDetails.Get(type); + + return ReadValue(member, value); + } + + private JsonNode ReadValue(TypeDetails type, object value) + { + if (value == null) + { + return XNull.Instance; + } + + if (type.JsonConverter != null) + { + return type.JsonConverter.ToJson(value); + } + else if (type.IsArray) + { + switch (Type.GetTypeCode(type.ElementType)) + { + case TypeCode.String: return CreateArray((string[])value); + case TypeCode.UInt16: return CreateArray((ushort[])value); + case TypeCode.UInt32: return CreateArray((uint[])value); + case TypeCode.UInt64: return CreateArray((ulong[])value); + case TypeCode.Int16: return CreateArray((short[])value); + case TypeCode.Int32: return CreateArray((int[])value); + case TypeCode.Int64: return CreateArray((long[])value); + case TypeCode.Single: return CreateArray((float[])value); + case TypeCode.Double: return CreateArray((double[])value); + default: return ReadArray((IEnumerable)value); + } + } + else if (value is IEnumerable) + { + if (type.IsList && type.ElementType != null) + { + switch (Type.GetTypeCode(type.ElementType)) + { + case TypeCode.String: return CreateList(value); + case TypeCode.UInt16: return CreateList(value); + case TypeCode.UInt32: return CreateList(value); + case TypeCode.UInt64: return CreateList(value); + case TypeCode.Int16: return CreateList(value); + case TypeCode.Int32: return CreateList(value); + case TypeCode.Int64: return CreateList(value); + case TypeCode.Single: return CreateList(value); + case TypeCode.Double: return CreateList(value); + } + } + + return ReadArray((IEnumerable)value); + } + else + { + // Complex object + return ReadObject(value); + } + } + + private XList CreateList(object value) => new XList((IList)value); + + private XImmutableArray CreateArray(T[] array) => new XImmutableArray(array); + + #endregion + + #endregion + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Serialization/PropertyTransformation.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Serialization/PropertyTransformation.cs new file mode 100644 index 000000000000..df9242efa663 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Serialization/PropertyTransformation.cs @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + internal class PropertyTransformation + { + internal PropertyTransformation(string name, Func transformer) + { + Name = name ?? throw new ArgumentNullException(nameof(name)); + Transformer = transformer ?? throw new ArgumentNullException(nameof(transformer)); + } + + internal string Name { get; } + + internal Func Transformer { get; } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Serialization/SerializationOptions.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Serialization/SerializationOptions.cs new file mode 100644 index 000000000000..f10ebfc9699b --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Serialization/SerializationOptions.cs @@ -0,0 +1,65 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Linq; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + internal class SerializationOptions + { + internal static readonly SerializationOptions Default = new SerializationOptions(); + + internal SerializationOptions() { } + + internal SerializationOptions( + string[] include = null, + bool ingoreNullValues = false) + { + Include = include; + IgnoreNullValues = ingoreNullValues; + } + + internal string[] Include { get; set; } + + internal string[] Exclude { get; set; } + + internal bool IgnoreNullValues { get; set; } + + internal PropertyTransformation[] Transformations { get; set; } + + internal Func PropertyNameTransformer { get; set; } + + internal int MaxDepth { get; set; } = 5; + + internal bool IsIncluded(string name) + { + if (Exclude != null) + { + return !Exclude.Any(exclude => exclude.Equals(name, StringComparison.OrdinalIgnoreCase)); + } + else if (Include != null) + { + return Include.Any(exclude => exclude.Equals(name, StringComparison.OrdinalIgnoreCase)); + } + + return true; + } + + internal PropertyTransformation GetTransformation(string propertyName) + { + if (Transformations == null) return null; + + foreach (var t in Transformations) + { + if (t.Name.Equals(propertyName, StringComparison.OrdinalIgnoreCase)) + { + return t; + } + } + + return null; + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/SerializationMode.cs b/src/Sphere/Sphere.Autorest/generated/runtime/SerializationMode.cs new file mode 100644 index 000000000000..faa37db5bc84 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/SerializationMode.cs @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime +{ + [System.Flags] + public enum SerializationMode + { + None = 0, + IncludeHeaders = 1 << 0, + IncludeRead = 1 << 1, + IncludeCreate = 1 << 2, + IncludeUpdate = 1 << 3, + IncludeAll = IncludeHeaders | IncludeRead | IncludeCreate | IncludeUpdate, + IncludeCreateOrUpdate = IncludeCreate | IncludeUpdate + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/TypeConverterExtensions.cs b/src/Sphere/Sphere.Autorest/generated/runtime/TypeConverterExtensions.cs new file mode 100644 index 000000000000..520b6531fe10 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/TypeConverterExtensions.cs @@ -0,0 +1,261 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System.IO; +using System.Linq; +using System.Xml; +using System.Xml.Serialization; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PowerShell +{ + internal static class TypeConverterExtensions + { + internal static T[] SelectToArray(object source, System.Func converter) + { + // null begets null + if (source == null) + { + return null; + } + + // single values and strings are just encapsulated in the array. + if (source is string || !(source is System.Collections.IEnumerable)) + { + try + { + return new T[] { (T)converter(source) }; + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + // silent conversion fail + } +#endif + return new T[0]; // empty result if couldn't convert. + } + + var result = new System.Collections.Generic.List(); + foreach (var each in (System.Collections.IEnumerable)source) + { + try + { + result.Add((T)converter(each)); + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + // silent conversion fail + } +#endif + } + return result.ToArray(); + } + + internal static System.Collections.Generic.List SelectToList(object source, System.Func converter) + { + // null begets null + if (source == null) + { + return null; + } + + // single values and strings are just encapsulated in the array. + if (source is string || !(source is System.Collections.IEnumerable)) + { + try + { + return new T[] { (T)converter(source) }.ToList(); + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + // silent conversion fail + } +#endif + return new T[0].ToList(); // empty result if couldn't convert. + } + + var result = new System.Collections.Generic.List(); + foreach (var each in (System.Collections.IEnumerable)source) + { + try + { + result.Add((T)converter(each)); + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + // silent conversion fail + } +#endif + } + return result; + } + internal static System.Collections.Generic.IEnumerable GetPropertyKeys(this System.Collections.Generic.IDictionary dictionary) + { + if (null != dictionary) + { + foreach (var each in dictionary.Keys) + { + yield return each; + } + } + } + internal static System.Collections.Generic.IEnumerable GetPropertyKeys(this System.Collections.IDictionary dictionary) + { + if (null != dictionary) + { + foreach (var each in dictionary.Keys) + { + yield return each; + } + } + } + internal static System.Collections.Generic.IEnumerable GetPropertyKeys(this System.Management.Automation.PSObject instance) + { + if (null != instance) + { + foreach (var each in instance.Properties) + { + yield return each; + } + } + } + + internal static System.Collections.Generic.IEnumerable> GetFilteredProperties(this System.Collections.Generic.IDictionary instance, global::System.Collections.Generic.HashSet exclusions = null, global::System.Collections.Generic.HashSet inclusions = null) + { + return (null == instance || instance.Count == 0) ? + Enumerable.Empty>() : + instance.Keys + .Where(key => + !(true == exclusions?.Contains(key?.ToString())) + && (false != inclusions?.Contains(key?.ToString()))) + .Select(key => new System.Collections.Generic.KeyValuePair(key, instance[key])); + } + + internal static System.Collections.Generic.IEnumerable> GetFilteredProperties(this System.Collections.IDictionary instance, global::System.Collections.Generic.HashSet exclusions = null, global::System.Collections.Generic.HashSet inclusions = null) + { + return (null == instance || instance.Count == 0) ? + Enumerable.Empty>() : + instance.Keys.OfType() + .Where(key => + !(true == exclusions?.Contains(key?.ToString())) + && (false != inclusions?.Contains(key?.ToString()))) + .Select(key => new System.Collections.Generic.KeyValuePair(key, instance[key])); + } + + internal static System.Collections.Generic.IEnumerable> GetFilteredProperties(this System.Management.Automation.PSObject instance, global::System.Collections.Generic.HashSet exclusions = null, global::System.Collections.Generic.HashSet inclusions = null) + { + // new global::System.Collections.Generic.HashSet(System.StringComparer.InvariantCultureIgnoreCase) + return (null == instance || !instance.Properties.Any()) ? + Enumerable.Empty>() : + instance.Properties + .Where(property => + !(true == exclusions?.Contains(property.Name)) + && (false != inclusions?.Contains(property.Name))) + .Select(property => new System.Collections.Generic.KeyValuePair(property.Name, property.Value)); + } + + + internal static T GetValueForProperty(this System.Collections.Generic.IDictionary dictionary, string propertyName, T defaultValue, System.Func converter) + { + try + { + var key = System.Linq.Enumerable.FirstOrDefault(dictionary.Keys, each => System.String.Equals(each.ToString(), propertyName, System.StringComparison.CurrentCultureIgnoreCase)); + return key == null ? defaultValue : (T)converter(dictionary[key]); + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + } +#endif + return defaultValue; + } + internal static T GetValueForProperty(this System.Collections.IDictionary dictionary, string propertyName, T defaultValue, System.Func converter) + { + try + { + var key = System.Linq.Enumerable.FirstOrDefault(dictionary.Keys.OfType(), each => System.String.Equals(each.ToString(), propertyName, System.StringComparison.CurrentCultureIgnoreCase)); + return key == null ? defaultValue : (T)converter(dictionary[key]); + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + } +#endif + return defaultValue; + } + + internal static T GetValueForProperty(this System.Management.Automation.PSObject psObject, string propertyName, T defaultValue, System.Func converter) + { + try + { + var property = System.Linq.Enumerable.FirstOrDefault(psObject.Properties, each => System.String.Equals(each.Name.ToString(), propertyName, System.StringComparison.CurrentCultureIgnoreCase)); + return property == null ? defaultValue : (T)converter(property.Value); + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + } +#endif + return defaultValue; + } + + internal static bool Contains(this System.Management.Automation.PSObject psObject, string propertyName) + { + bool result = false; + try + { + var property = System.Linq.Enumerable.FirstOrDefault(psObject.Properties, each => System.String.Equals(each.Name.ToString(), propertyName, System.StringComparison.CurrentCultureIgnoreCase)); + result = property == null ? false : true; + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + } +#endif + return result; + } + } +} diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/UndeclaredResponseException.cs b/src/Sphere/Sphere.Autorest/generated/runtime/UndeclaredResponseException.cs new file mode 100644 index 000000000000..042b1d461f61 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/UndeclaredResponseException.cs @@ -0,0 +1,112 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime +{ + using System; + using System.Net.Http; + using System.Net.Http.Headers; + using static Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Extensions; + + public class RestException : Exception, IDisposable + { + public System.Net.HttpStatusCode StatusCode { get; set; } + public string Code { get; protected set; } + protected string message; + public HttpRequestMessage RequestMessage { get; protected set; } + public HttpResponseHeaders ResponseHeaders { get; protected set; } + + public string ResponseBody { get; protected set; } + public string ClientRequestId { get; protected set; } + public string RequestId { get; protected set; } + + public override string Message => message; + public string Action { get; protected set; } + + public RestException(System.Net.Http.HttpResponseMessage response) + { + StatusCode = response.StatusCode; + //CloneWithContent will not work here since the content is disposed after sendAsync + //Besides, it seems there is no need for the request content cloned here. + RequestMessage = response.RequestMessage.Clone(); + ResponseBody = response.Content.ReadAsStringAsync().Result; + ResponseHeaders = response.Headers; + + RequestId = response.GetFirstHeader("x-ms-request-id"); + ClientRequestId = response.GetFirstHeader("x-ms-client-request-id"); + + try + { + // try to parse the body as JSON, and see if a code and message are in there. + var json = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonNode.Parse(ResponseBody) as Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json.JsonObject; + + // error message could be in properties.statusMessage + { message = If(json?.Property("properties"), out var p) + && If(p?.PropertyT("statusMessage"), out var sm) + ? (string)sm : (string)Message; } + + // see if there is an error block in the body + json = json?.Property("error") ?? json; + + { Code = If(json?.PropertyT("code"), out var c) ? (string)c : (string)StatusCode.ToString(); } + { message = If(json?.PropertyT("message"), out var m) ? (string)m : (string)Message; } + { Action = If(json?.PropertyT("action"), out var a) ? (string)a : (string)Action; } + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + // couldn't get the code/message from the body response. + // In this case, we will assume the response is the expected error message + if(!string.IsNullOrEmpty(ResponseBody)) { + message = ResponseBody; + } + } +#endif + if (string.IsNullOrEmpty(message)) + { + if (StatusCode >= System.Net.HttpStatusCode.BadRequest && StatusCode < System.Net.HttpStatusCode.InternalServerError) + { + message = $"The server responded with a Request Error, Status: {StatusCode}"; + } + else if (StatusCode >= System.Net.HttpStatusCode.InternalServerError) + { + message = $"The server responded with a Server Error, Status: {StatusCode}"; + } + else + { + message = $"The server responded with an unrecognized response, Status: {StatusCode}"; + } + } + } + + public void Dispose() + { + ((IDisposable)RequestMessage).Dispose(); + } + } + + public class RestException : RestException + { + public T Error { get; protected set; } + public RestException(System.Net.Http.HttpResponseMessage response, T error) : base(response) + { + Error = error; + } + } + + + public class UndeclaredResponseException : RestException + { + public UndeclaredResponseException(System.Net.Http.HttpResponseMessage response) : base(response) + { + + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/Writers/JsonWriter.cs b/src/Sphere/Sphere.Autorest/generated/runtime/Writers/JsonWriter.cs new file mode 100644 index 000000000000..f393b5823ed9 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/Writers/JsonWriter.cs @@ -0,0 +1,223 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.IO; +using System.Web; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Json +{ + internal class JsonWriter + { + const string indentation = " "; // 2 spaces + + private readonly bool pretty; + private readonly TextWriter writer; + + protected int currentLevel = 0; + + internal JsonWriter(TextWriter writer, bool pretty = true) + { + this.writer = writer ?? throw new ArgumentNullException(nameof(writer)); + this.pretty = pretty; + } + + internal void WriteNode(JsonNode node) + { + switch (node.Type) + { + case JsonType.Array: WriteArray((IEnumerable)node); break; + case JsonType.Object: WriteObject((JsonObject)node); break; + + // Primitives + case JsonType.Binary: WriteBinary((XBinary)node); break; + case JsonType.Boolean: WriteBoolean((bool)node); break; + case JsonType.Date: WriteDate((JsonDate)node); break; + case JsonType.Null: WriteNull(); break; + case JsonType.Number: WriteNumber((JsonNumber)node); break; + case JsonType.String: WriteString(node); break; + } + } + + internal void WriteArray(IEnumerable array) + { + currentLevel++; + + writer.Write('['); + + bool doIndentation = false; + + if (pretty) + { + foreach (var node in array) + { + if (node.Type == JsonType.Object || node.Type == JsonType.Array) + { + doIndentation = true; + + break; + } + } + } + + bool isFirst = true; + + foreach (JsonNode node in array) + { + if (!isFirst) writer.Write(','); + + if (doIndentation) + { + WriteIndent(); + } + else if (pretty) + { + writer.Write(' '); + } + + WriteNode(node); + + isFirst = false; + } + + currentLevel--; + + if (doIndentation) + { + WriteIndent(); + } + else if (pretty) + { + writer.Write(' '); + } + + writer.Write(']'); + } + + internal void WriteIndent() + { + if (pretty) + { + writer.Write(Environment.NewLine); + + for (int level = 0; level < currentLevel; level++) + { + writer.Write(indentation); + } + } + } + + internal void WriteObject(JsonObject obj) + { + currentLevel++; + + writer.Write('{'); + + bool isFirst = true; + + foreach (var field in obj) + { + if (!isFirst) writer.Write(','); + + WriteIndent(); + + WriteFieldName(field.Key); + + writer.Write(':'); + + if (pretty) + { + writer.Write(' '); + } + + // Write the field value + WriteNode(field.Value); + + isFirst = false; + } + + currentLevel--; + + WriteIndent(); + + writer.Write('}'); + } + + internal void WriteFieldName(string fieldName) + { + writer.Write('"'); + writer.Write(HttpUtility.JavaScriptStringEncode(fieldName)); + writer.Write('"'); + } + + #region Primitives + + internal void WriteBinary(XBinary value) + { + writer.Write('"'); + writer.Write(value.ToString()); + writer.Write('"'); + } + + internal void WriteBoolean(bool value) + { + writer.Write(value ? "true" : "false"); + } + + internal void WriteDate(JsonDate date) + { + if (date.ToDateTime().Year == 1) + { + WriteNull(); + } + else + { + writer.Write('"'); + writer.Write(date.ToIsoString()); + writer.Write('"'); + } + } + + internal void WriteNull() + { + writer.Write("null"); + } + + internal void WriteNumber(JsonNumber number) + { + if (number.Overflows) + { + writer.Write('"'); + writer.Write(number.Value); + writer.Write('"'); + } + else + { + writer.Write(number.Value); + } + } + + internal void WriteString(string text) + { + if (text == null) + { + WriteNull(); + } + else + { + writer.Write('"'); + + writer.Write(HttpUtility.JavaScriptStringEncode(text)); + + writer.Write('"'); + } + } + + #endregion + } +} + + +// TODO: Replace with System.Text.Json when available diff --git a/src/Sphere/Sphere.Autorest/generated/runtime/delegates.cs b/src/Sphere/Sphere.Autorest/generated/runtime/delegates.cs new file mode 100644 index 000000000000..5e324dd9a7e0 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/generated/runtime/delegates.cs @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime +{ + using System; + using System.Collections; + using System.Collections.Generic; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + using GetEventData=System.Func; + + public delegate Task SendAsync(HttpRequestMessage request, IEventListener callback); + public delegate Task SendAsyncStep(HttpRequestMessage request, IEventListener callback, ISendAsync next); + public delegate Task SignalEvent(string id, CancellationToken token, GetEventData getEventData); + public delegate Task Event(EventData message); + public delegate void SynchEvent(EventData message); + public delegate Task OnResponse(Response message); + public delegate Task OnResponse(Response message); +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/help/Az.Sphere.md b/src/Sphere/Sphere.Autorest/help/Az.Sphere.md new file mode 100644 index 000000000000..4559012a1b6b --- /dev/null +++ b/src/Sphere/Sphere.Autorest/help/Az.Sphere.md @@ -0,0 +1,120 @@ +--- +Module Name: Az.Sphere +Module Guid: 4855dcb5-d1a4-45e3-b4b2-49d37925ed0b +Download Help Link: https://learn.microsoft.com/powershell/module/az.sphere +Help Version: 1.0.0.0 +Locale: en-US +--- + +# Az.Sphere Module +## Description +Microsoft Azure PowerShell: Sphere cmdlets + +## Az.Sphere Cmdlets +### [Get-AzSphereCatalog](Get-AzSphereCatalog.md) +Get a Catalog + +### [Get-AzSphereCatalogDevice](Get-AzSphereCatalogDevice.md) +Lists devices for catalog. + +### [Get-AzSphereCatalogDeviceGroup](Get-AzSphereCatalogDeviceGroup.md) +List the device groups for the catalog. + +### [Get-AzSphereCatalogDeviceInsight](Get-AzSphereCatalogDeviceInsight.md) +Lists device insights for catalog. + +### [Get-AzSphereCertificate](Get-AzSphereCertificate.md) +Get a Certificate + +### [Get-AzSphereCertificateCertChain](Get-AzSphereCertificateCertChain.md) +Retrieves cert chain. + +### [Get-AzSphereCertificateProof](Get-AzSphereCertificateProof.md) +Gets the proof of possession nonce. + +### [Get-AzSphereDeployment](Get-AzSphereDeployment.md) +Get a Deployment. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + +### [Get-AzSphereDevice](Get-AzSphereDevice.md) +Get a Device. +Use '.unassigned' or '.default' for the device group and product names when a device does not belong to a device group and product. + +### [Get-AzSphereDeviceGroup](Get-AzSphereDeviceGroup.md) +Get a DeviceGroup. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + +### [Get-AzSphereImage](Get-AzSphereImage.md) +Get a Image + +### [Get-AzSphereProduct](Get-AzSphereProduct.md) +Get a Product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. + +### [Invoke-AzSphereCountCatalogDevice](Invoke-AzSphereCountCatalogDevice.md) +Counts devices in catalog. + +### [Invoke-AzSphereCountDeviceGroupDevice](Invoke-AzSphereCountDeviceGroupDevice.md) +Counts devices in device group. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + +### [Invoke-AzSphereCountProductDevice](Invoke-AzSphereCountProductDevice.md) +Counts devices in product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. + +### [New-AzSphereCatalog](New-AzSphereCatalog.md) +Create a Catalog + +### [New-AzSphereDeployment](New-AzSphereDeployment.md) +Create a Deployment. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + +### [New-AzSphereDevice](New-AzSphereDevice.md) +Create a Device. +Use '.unassigned' or '.default' for the device group and product names to claim a device to the catalog only. + +### [New-AzSphereDeviceCapabilityImage](New-AzSphereDeviceCapabilityImage.md) +Generates the capability image for the device. +Use '.unassigned' or '.default' for the device group and product names to generate the image for a device that does not belong to a specific device group and product. + +### [New-AzSphereDeviceGroup](New-AzSphereDeviceGroup.md) +Create a DeviceGroup. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + +### [New-AzSphereImage](New-AzSphereImage.md) +Create a Image + +### [New-AzSphereProduct](New-AzSphereProduct.md) +Create a Product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. + +### [New-AzSphereProductDefaultDeviceGroup](New-AzSphereProductDefaultDeviceGroup.md) +Generates default device groups for the product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. + +### [Remove-AzSphereCatalog](Remove-AzSphereCatalog.md) +Delete a Catalog + +### [Remove-AzSphereDeviceGroup](Remove-AzSphereDeviceGroup.md) +Delete a DeviceGroup. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + +### [Remove-AzSphereProduct](Remove-AzSphereProduct.md) +Delete a Product. +'.default' and '.unassigned' are system defined values and cannot be used for product name' + +### [Update-AzSphereCatalog](Update-AzSphereCatalog.md) +Update a Catalog + +### [Update-AzSphereDevice](Update-AzSphereDevice.md) +Update a Device. +Use '.unassigned' or '.default' for the device group and product names to move a device to the catalog level. + +### [Update-AzSphereDeviceGroup](Update-AzSphereDeviceGroup.md) +Update a DeviceGroup. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + +### [Update-AzSphereProduct](Update-AzSphereProduct.md) +Update a Product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. + diff --git a/src/Sphere/Sphere.Autorest/help/Get-AzSphereCatalog.md b/src/Sphere/Sphere.Autorest/help/Get-AzSphereCatalog.md new file mode 100644 index 000000000000..d2611f1902f7 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/help/Get-AzSphereCatalog.md @@ -0,0 +1,206 @@ +--- +external help file: +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/get-azspherecatalog +schema: 2.0.0 +--- + +# Get-AzSphereCatalog + +## SYNOPSIS +Get a Catalog + +## SYNTAX + +### List (Default) +``` +Get-AzSphereCatalog [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzSphereCatalog -Name -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzSphereCatalog -InputObject [-DefaultProfile ] [] +``` + +### List1 +``` +Get-AzSphereCatalog -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] + [] +``` + +## DESCRIPTION +Get a Catalog + +## EXAMPLES + +### Example 1: List all catalogs for a given resource group +```powershell +Get-AzSphereCatalog -ResourceGroupName test-sataneja-10 +``` + +```output +Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +-------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------- +global CAT43 9/24/2022 12:54:16 PM example@microsoft.com User 9/24/2022 12:54:16 PM example@microsoft.com User test-satan… +global CAT007 9/26/2022 8:58:15 PM example@microsoft.com User 9/26/2022 8:58:15 PM example@microsoft.com User test-satan… +global CAT10 10/10/2022 4:23:53 PM example@microsoft.com User 10/10/2022 4:23:53 PM example@microsoft.com User test-satan… +global TCAT01 10/14/2022 12:12:22 AM example@microsoft.com User 10/14/2022 12:12:22 AM example@microsoft.com User test-satan… +global TestCatalog1x3 4/25/2023 10:00:52 PM example@microsoft.com User 4/25/2023 10:00:52 PM example@microsoft.com User test-satan… +global TestCatalog1x3_Catalog 5/11/2023 6:12:50 PM example@microsoft.com User 5/11/2023 6:12:50 PM example@microsoft.com User test-satan… +``` + +This command lists all catalogs for a given resource group. + +### Example 2: Get specific catalog with specified resource group +```powershell +Get-AzSphereCatalog -Name "testcat" -ResourceGroupName "goyedokun" +``` + +```output +Id : /subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/goyedokun/providers/Microsoft.AzureSphere/catalogs/testcat +Location : global +Name : testcat +ProvisioningState : Succeeded +ResourceGroupName : goyedokun +RetryAfter : +SystemDataCreatedAt : 6/27/2023 6:49:50 PM +SystemDataCreatedBy : example@microsoft.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 6/27/2023 6:49:50 PM +SystemDataLastModifiedBy : example@microsoft.com +SystemDataLastModifiedByType : User +Tag : { + } +Type : microsoft.azuresphere/catalogs +``` + +This command get specific catalog with specified resource group. + +### Example 2: List all catalogs for connected subscription +```powershell +Get-AzSphereCatalog +``` + +```output +Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemData + LastModifi + edBy +-------- ---- ------------------- ------------------- ----------------------- ------------------------ ---------- +global MyCatalog3 4/21/2021 9:32:32 PM example@microsoft.com User 8/10/2023 3:21:08 PM example@m… +global MyCatalog2 5/20/2021 4:44:38 PM example@microsoft.com User 5/20/2021 4:44:38 PM example@m… +global MyCatalog1 5/20/2021 4:45:44 PM example@microsoft.com User 5/20/2021 4:45:44 PM example@m… +global CatalogARMSetup_39f85f04 8/18/2021 8:28:11 PM 5223a8bc-448a-411c-bcd4-7d41745ed6ba Application 8/18/2021 8:28:11 PM 5223a8bc-… +global CatalogARMSetup_3b15f308 9/17/2021 6:41:41 PM 5223a8bc-448a-411c-bcd4-7d41745ed6ba Application 9/17/2021 6:41:41 PM 5223a8bc-… +global mrarmcatalog1 9/21/2021 7:27:16 PM example@microsoft.com User 9/21/2021 7:27:16 PM example@m… +global CatalogARMSetup_eb5cca0a 9/21/2021 10:06:28 PM 5223a8bc-448a-411c-bcd4-7d41745ed6ba Application 9/21/2021 10:06:28 PM 5223a8bc-… +global CatalogARMSetup_f8c1fea7 9/21/2021 10:06:31 PM 5223a8bc-448a-411c-bcd4-7d41745ed6ba Application 9/21/2021 10:06:31 PM 5223a8bc-… +global CatalogARMSetup_f2d88f81 9/21/2021 10:06:38 PM 5223a8bc-448a-411c-bcd4-7d41745ed6ba Application 9/21/2021 10:06:38 PM 5223a8bc-… +global CatalogARMSetup_1711d4b8 9/21/2021 10:06:42 PM 5223a8bc-448a-411c-bcd4-7d41745ed6ba Application 9/21/2021 10:06:42 PM 5223a8bc-… +global CatalogARMSetup_04744136 10/1/2021 7:14:04 PM 5223a8bc-448a-411c-bcd4-7d41745ed6ba Application 10/1/2021 7:14:04 PM 5223a8bc-… +global CatalogARMSetup_bff4a3fe 10/5/2021 5:14:48 PM 5223a8bc-448a-411c-bcd4-7d41745ed6ba Application 10/5/2021 5:14:48 PM 5223a8bc-… +global CatalogARMSetup_e05ad6ac 10/5/2021 5:15:05 PM 5223a8bc-448a-411c-bcd4-7d41745ed6ba Application 10/5/2021 5:15:05 PM 5223a8bc-… +global newCatalog 8/15/2023 3:06:31 AM example@microsoft.com User 8/15/2023 3:10:39 AM example@m… +``` + +This command lists all catalogs for current subscription. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Name of catalog + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: CatalogName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get, List1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: Get, List, List1 +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog + +## NOTES + +## RELATED LINKS + diff --git a/src/Sphere/Sphere.Autorest/help/Get-AzSphereCatalogDevice.md b/src/Sphere/Sphere.Autorest/help/Get-AzSphereCatalogDevice.md new file mode 100644 index 000000000000..1191508a5117 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/help/Get-AzSphereCatalogDevice.md @@ -0,0 +1,212 @@ +--- +external help file: +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/get-azspherecatalogdevice +schema: 2.0.0 +--- + +# Get-AzSphereCatalogDevice + +## SYNOPSIS +Lists devices for catalog. + +## SYNTAX + +``` +Get-AzSphereCatalogDevice -CatalogName -ResourceGroupName [-SubscriptionId ] + [-Filter ] [-Maxpagesize ] [-Skip ] [-Top ] [-DefaultProfile ] + [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Lists devices for catalog. + +## EXAMPLES + +### Example 1: List for the specified catalog with resource group +```powershell +Get-AzSphereCatalogDevice -CatalogName test2024 -ResourceGroupName joyer-test +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy System + DataLa + stModi + fiedBy + Type +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ------ +dbb0e0cb8bd961a6129096e1e8a1375ac1fa274f030c08161b37ae3bc5a94f443bdb628cf257bc5bc810d8768c03b6f5ca301a35cd0169f56a49624255964560 +b15332603ba55fb52b00fec8549fdaa46b7fb6ba35694bc8943131ccb4b302846d224580a27880a2996b9fd4f1b2699400b1627059b6a90d67dd29e2984ee147 +5d257fbcf76a5853832122d9b0e2410daa1438e3c1cde005162a837a7535c08973cc819a50cf8eb724ffc88dada06b40bee6010e82a8f84d2fef0fc263061d67 +``` + +This command gets list of device resources for the specified catalog with resource group. + +## PARAMETERS + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter +Filter the result list using the given expression + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Maxpagesize +The maximum number of result items per page. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Skip +The number of result items to skip. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Top +The number of result items to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + +## NOTES + +## RELATED LINKS + diff --git a/src/Sphere/Sphere.Autorest/help/Get-AzSphereCatalogDeviceGroup.md b/src/Sphere/Sphere.Autorest/help/Get-AzSphereCatalogDeviceGroup.md new file mode 100644 index 000000000000..105cdc0b7df4 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/help/Get-AzSphereCatalogDeviceGroup.md @@ -0,0 +1,222 @@ +--- +external help file: +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/get-azspherecatalogdevicegroup +schema: 2.0.0 +--- + +# Get-AzSphereCatalogDeviceGroup + +## SYNOPSIS +List the device groups for the catalog. + +## SYNTAX + +``` +Get-AzSphereCatalogDeviceGroup -CatalogName -ResourceGroupName [-SubscriptionId ] + [-Filter ] [-Maxpagesize ] [-Skip ] [-Top ] [-DeviceGroupName ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +List the device groups for the catalog. + +## EXAMPLES + +### Example 1: List for the specified catalog with resource group +```powershell +Get-AzSphereCatalogDeviceGroup -CatalogName test2024 -ResourceGroupName joyer-test +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +testdevicegroup joyer-test +testdevicegroup2 joyer-test +``` + +This command gets list of device groups for the specified catalog with resource group. + +## PARAMETERS + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceGroupName +Device Group name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter +Filter the result list using the given expression + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Maxpagesize +The maximum number of result items per page. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Skip +The number of result items to skip. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Top +The number of result items to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + +## NOTES + +## RELATED LINKS + diff --git a/src/Sphere/Sphere.Autorest/help/Get-AzSphereCatalogDeviceInsight.md b/src/Sphere/Sphere.Autorest/help/Get-AzSphereCatalogDeviceInsight.md new file mode 100644 index 000000000000..d125a7aa6d94 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/help/Get-AzSphereCatalogDeviceInsight.md @@ -0,0 +1,200 @@ +--- +external help file: +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/get-azspherecatalogdeviceinsight +schema: 2.0.0 +--- + +# Get-AzSphereCatalogDeviceInsight + +## SYNOPSIS +Lists device insights for catalog. + +## SYNTAX + +``` +Get-AzSphereCatalogDeviceInsight -CatalogName -ResourceGroupName + [-SubscriptionId ] [-Filter ] [-Maxpagesize ] [-Skip ] [-Top ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Lists device insights for catalog. + +## EXAMPLES + +### Example 1: List device insight +```powershell +Get-AzSphereCatalogDeviceInsight -CatalogName test2024 -ResourceGroupName joyer-test +``` + +This command gets a list of device insights for specified catalog. + +## PARAMETERS + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter +Filter the result list using the given expression + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Maxpagesize +The maximum number of result items per page. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Skip +The number of result items to skip. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Top +The number of result items to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsight + +## NOTES + +## RELATED LINKS + diff --git a/src/Sphere/Sphere.Autorest/help/Get-AzSphereCertificate.md b/src/Sphere/Sphere.Autorest/help/Get-AzSphereCertificate.md new file mode 100644 index 000000000000..451dda512882 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/help/Get-AzSphereCertificate.md @@ -0,0 +1,255 @@ +--- +external help file: +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/get-azspherecertificate +schema: 2.0.0 +--- + +# Get-AzSphereCertificate + +## SYNOPSIS +Get a Certificate + +## SYNTAX + +### List (Default) +``` +Get-AzSphereCertificate -CatalogName -ResourceGroupName [-SubscriptionId ] + [-Filter ] [-Maxpagesize ] [-Skip ] [-Top ] [-DefaultProfile ] + [] +``` + +### Get +``` +Get-AzSphereCertificate -CatalogName -ResourceGroupName -SerialNumber + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzSphereCertificate -InputObject [-DefaultProfile ] [] +``` + +### GetViaIdentityCatalog +``` +Get-AzSphereCertificate -CatalogInputObject -SerialNumber + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Get a Certificate + +## EXAMPLES + +### Example 1: List for the specified catalog with resource group +```powershell +Get-AzSphereCertificate -CatalogName test2024 -ResourceGroupName joyer-test +``` + +```output +ExpiryUtc : 4/30/2024 10:51:54 PM +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024/certificates/'serial number' +Name : 'serial number' +NotBeforeUtc : 1/31/2024 10:51:54 PM +PropertiesCertificate : 'certificate information' +ProvisioningState : Succeeded +ResourceGroupName : joyer-test +Status : Active +Subject : CN=Microsoft Azure Sphere INT 7de8a199-bb33-4eda-9600-583103317243, O=Microsoft Corporation, L=Redmond, S=Washington, C=US +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Thumbprint : 92C60521BB46C72D66FA72CF59EF701D9269A236 +Type : Microsoft.AzureSphere/catalogs/certificates +``` + +This command get a list of certificate for the specified catalog with resource group. + +## PARAMETERS + +### -CatalogInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: GetViaIdentityCatalog +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter +Filter the result list using the given expression + +```yaml +Type: System.String +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Maxpagesize +The maximum number of result items per page. + +```yaml +Type: System.Int32 +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SerialNumber +Serial number of the certificate. +Use '.default' to get current active certificate. + +```yaml +Type: System.String +Parameter Sets: Get, GetViaIdentityCatalog +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Skip +The number of result items to skip. + +```yaml +Type: System.Int32 +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Top +The number of result items to return. + +```yaml +Type: System.Int32 +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificate + +## NOTES + +## RELATED LINKS + diff --git a/src/Sphere/Sphere.Autorest/help/Get-AzSphereCertificateCertChain.md b/src/Sphere/Sphere.Autorest/help/Get-AzSphereCertificateCertChain.md new file mode 100644 index 000000000000..c6c6a23d2005 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/help/Get-AzSphereCertificateCertChain.md @@ -0,0 +1,206 @@ +--- +external help file: +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/get-azspherecertificatecertchain +schema: 2.0.0 +--- + +# Get-AzSphereCertificateCertChain + +## SYNOPSIS +Retrieves cert chain. + +## SYNTAX + +### Retrieve (Default) +``` +Get-AzSphereCertificateCertChain -CatalogName -ResourceGroupName -SerialNumber + [-SubscriptionId ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### RetrieveViaIdentity +``` +Get-AzSphereCertificateCertChain -InputObject [-DefaultProfile ] [-Confirm] + [-WhatIf] [] +``` + +### RetrieveViaIdentityCatalog +``` +Get-AzSphereCertificateCertChain -CatalogInputObject -SerialNumber + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Retrieves cert chain. + +## EXAMPLES + +### Example 1: Get a certificate cert chain +```powershell +Get-AzSphereCertificateCertChain -CatalogName test2024 -ResourceGroupName joyer-test -SerialNumber 'serial number' +``` + +```output +CertificateChain +---------------- +'information' +``` + +This command gets a certificate cert chain. + +## PARAMETERS + +### -CatalogInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: RetrieveViaIdentityCatalog +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: Retrieve +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: RetrieveViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Retrieve +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SerialNumber +Serial number of the certificate. +Use '.default' to get current active certificate. + +```yaml +Type: System.String +Parameter Sets: Retrieve, RetrieveViaIdentityCatalog +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: Retrieve +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateChainResponse + +## NOTES + +## RELATED LINKS + diff --git a/src/Sphere/Sphere.Autorest/help/Get-AzSphereCertificateProof.md b/src/Sphere/Sphere.Autorest/help/Get-AzSphereCertificateProof.md new file mode 100644 index 000000000000..e7c7039414e6 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/help/Get-AzSphereCertificateProof.md @@ -0,0 +1,226 @@ +--- +external help file: +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/get-azspherecertificateproof +schema: 2.0.0 +--- + +# Get-AzSphereCertificateProof + +## SYNOPSIS +Gets the proof of possession nonce. + +## SYNTAX + +### RetrieveExpanded (Default) +``` +Get-AzSphereCertificateProof -CatalogName -ResourceGroupName -SerialNumber + -ProofOfPossessionNonce [-SubscriptionId ] [-DefaultProfile ] [-Confirm] + [-WhatIf] [] +``` + +### RetrieveViaIdentityCatalogExpanded +``` +Get-AzSphereCertificateProof -CatalogInputObject -SerialNumber + -ProofOfPossessionNonce [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### RetrieveViaIdentityExpanded +``` +Get-AzSphereCertificateProof -InputObject -ProofOfPossessionNonce + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Gets the proof of possession nonce. + +## EXAMPLES + +### Example 1: Get a proof Of Possession Nonce +```powershell +Get-AzSphereCertificateProof -CatalogName test2024 -ResourceGroupName joyer-test -SerialNumber 'serial number' -ProofOfPossessionNonce proofOfPossessionNonce +``` + +```output +Certificate : 'information' +ExpiryUtc : +NotBeforeUtc : +ProvisioningState : +Status : +Subject : +Thumbprint : +``` + +This command gets a proof Of Possession Nonce for specified catalog and serial number. + +## PARAMETERS + +### -CatalogInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: RetrieveViaIdentityCatalogExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: RetrieveExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: RetrieveViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProofOfPossessionNonce +The proof of possession nonce + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: RetrieveExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SerialNumber +Serial number of the certificate. +Use '.default' to get current active certificate. + +```yaml +Type: System.String +Parameter Sets: RetrieveExpanded, RetrieveViaIdentityCatalogExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: RetrieveExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceResponse + +## NOTES + +## RELATED LINKS + diff --git a/src/Sphere/Sphere.Autorest/help/Get-AzSphereDeployment.md b/src/Sphere/Sphere.Autorest/help/Get-AzSphereDeployment.md new file mode 100644 index 000000000000..d75fe3a7d9e6 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/help/Get-AzSphereDeployment.md @@ -0,0 +1,357 @@ +--- +external help file: +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/get-azspheredeployment +schema: 2.0.0 +--- + +# Get-AzSphereDeployment + +## SYNOPSIS +Get a Deployment. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + +## SYNTAX + +### List (Default) +``` +Get-AzSphereDeployment -CatalogName -DeviceGroupName -ProductName + -ResourceGroupName [-SubscriptionId ] [-Filter ] [-Maxpagesize ] + [-Skip ] [-Top ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzSphereDeployment -CatalogName -DeviceGroupName -Name -ProductName + -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzSphereDeployment -InputObject [-DefaultProfile ] [] +``` + +### GetViaIdentityCatalog +``` +Get-AzSphereDeployment -CatalogInputObject -DeviceGroupName -Name + -ProductName [-DefaultProfile ] [] +``` + +### GetViaIdentityDeviceGroup +``` +Get-AzSphereDeployment -DeviceGroupInputObject -Name [-DefaultProfile ] + [] +``` + +### GetViaIdentityProduct +``` +Get-AzSphereDeployment -DeviceGroupName -Name -ProductInputObject + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Get a Deployment. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + +## EXAMPLES + +### Example 1: List by resource group +```powershell +Get-AzSphereDeployment -ResourceGroupName joyer-test -DeviceGroupName testdevicegroup -ProductName product2024 -CatalogName test2024 +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +009ada36-7515-4ff0-a54c-33b75bfae976 2/28/2024 2:36:04 AM 2/28/2024 2:36:04 AM joyer-test +2e83ddd9-6297-48df-9c2c-2257e6b3cc71 2/28/2024 2:57:56 AM 2/28/2024 2:57:56 AM joyer-test +``` + +This command lists all deployments for specified device group. + +### Example 2: Get specific deployment for device group +```powershell +Get-AzSphereDeployment -ResourceGroupName joyer-test -DeviceGroupName testdevicegroup -ProductName product2024 -CatalogName test2024 -Name 2e83ddd9-6297-48df-9c2c-2257e6b3cc71 +``` + +```output +DateUtc : 2/28/2024 2:57:56 AM +DeployedImage : {{ + "id": "/subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024/images/a04f0a91-b369-4249-a47d-28c118e2cb3b", + "name": "a04f0a91-b369-4249-a47d-28c118e2cb3b", + "type": "Microsoft.AzureSphere/catalogs/images", + "properties": { + "image": "GPIO_HighLevelApp", + "imageId": "a04f0a91-b369-4249-a47d-28c118e2cb3b", + "regionalDataBoundary": "None", + "uri": "https://as3imgptint003.blob.core.windows.net/7de8a199-bb33-4eda-9600-583103317243/imagesaks/a04f0a91-b369-4249-a47d-28c118e2cb3b?skoid=cc6e + 3fcf-ab4d-4b0d-b3f9-9769604c1e52\u0026sktid=72f988bf-86f1-41af-91ab-2d7cd011db47\u0026skt=2024-02-28T07%3A31%3A00Z\u0026ske=2024-02-28T08%3A36%3A00Z\u0 + 026sks=b\u0026skv=2021-12-02\u0026sv=2021-12-02\u0026spr=https,http\u0026se=2024-02-28T15%3A36%3A00Z\u0026sr=b\u0026sp=r\u0026sig=MbkzxZH1VQUGft%2BfXbE + DhubAVucDykFSEGgvqZVn5yk%3D", + "componentId": "dc7f135c-6074-4d49-aa3a-160e4eed884f", + "imageType": "Applications", + "provisioningState": "Succeeded" + } + }} +DeploymentId : 2e83ddd9-6297-48df-9c2c-2257e6b3cc71 +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024/products/product2024/de + viceGroups/testdevicegroup/deployments/2e83ddd9-6297-48df-9c2c-2257e6b3cc71 +Name : 2e83ddd9-6297-48df-9c2c-2257e6b3cc71 +ProvisioningState : Succeeded +ResourceGroupName : joyer-test +SystemDataCreatedAt : 2/28/2024 2:57:56 AM +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : 2/28/2024 2:57:56 AM +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.AzureSphere/catalogs/products/deviceGroups/deployments +``` + +This command gets specific deployment in specified device group. + +## PARAMETERS + +### -CatalogInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: GetViaIdentityCatalog +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceGroupInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: GetViaIdentityDeviceGroup +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -DeviceGroupName +Name of device group. + +```yaml +Type: System.String +Parameter Sets: Get, GetViaIdentityCatalog, GetViaIdentityProduct, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter +Filter the result list using the given expression + +```yaml +Type: System.String +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Maxpagesize +The maximum number of result items per page. + +```yaml +Type: System.Int32 +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Deployment name. +Use .default for deployment creation and to get the current deployment for the associated device group. + +```yaml +Type: System.String +Parameter Sets: Get, GetViaIdentityCatalog, GetViaIdentityDeviceGroup, GetViaIdentityProduct +Aliases: DeploymentName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProductInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: GetViaIdentityProduct +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProductName +Name of product. + +```yaml +Type: System.String +Parameter Sets: Get, GetViaIdentityCatalog, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Skip +The number of result items to skip. + +```yaml +Type: System.Int32 +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Top +The number of result items to return. + +```yaml +Type: System.Int32 +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment + +## NOTES + +## RELATED LINKS + diff --git a/src/Sphere/Sphere.Autorest/help/Get-AzSphereDevice.md b/src/Sphere/Sphere.Autorest/help/Get-AzSphereDevice.md new file mode 100644 index 000000000000..96fcfed13577 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/help/Get-AzSphereDevice.md @@ -0,0 +1,286 @@ +--- +external help file: +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/get-azspheredevice +schema: 2.0.0 +--- + +# Get-AzSphereDevice + +## SYNOPSIS +Get a Device. +Use '.unassigned' or '.default' for the device group and product names when a device does not belong to a device group and product. + +## SYNTAX + +### List (Default) +``` +Get-AzSphereDevice -CatalogName -GroupName -ProductName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzSphereDevice -CatalogName -GroupName -Name -ProductName + -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzSphereDevice -InputObject [-DefaultProfile ] [] +``` + +### GetViaIdentityCatalog +``` +Get-AzSphereDevice -CatalogInputObject -GroupName -Name + -ProductName [-DefaultProfile ] [] +``` + +### GetViaIdentityDeviceGroup +``` +Get-AzSphereDevice -DeviceGroupInputObject -Name [-DefaultProfile ] + [] +``` + +### GetViaIdentityProduct +``` +Get-AzSphereDevice -GroupName -Name -ProductInputObject + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Get a Device. +Use '.unassigned' or '.default' for the device group and product names when a device does not belong to a device group and product. + +## EXAMPLES + +### Example 1: List by resource group +```powershell +Get-AzSphereDevice -CatalogName test2024 -ResourceGroupName "joyer-test" -GroupName testdevicegroup -ProductName product2024 +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy System + DataLa + stModi + fiedBy + Type +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ------ +dbb0e0cb8bd961a6129096e1e8a1375ac1fa274f030c08161b37ae3bc5a94f443bdb628cf257bc5bc810d8768c03b6f5ca301a35cd0169f56a49624255964560 +b15332603ba55fb52b00fec8549fdaa46b7fb6ba35694bc8943131ccb4b302846d224580a27880a2996b9fd4f1b2699400b1627059b6a90d67dd29e2984ee147 +5d257fbcf76a5853832122d9b0e2410daa1438e3c1cde005162a837a7535c08973cc819a50cf8eb724ffc88dada06b40bee6010e82a8f84d2fef0fc263061d67 +``` + +This command gets list of device resources by resource group. + +### Example 2: Get specific resource with specified resource group +```powershell +Get-AzSphereDevice -CatalogName test2024 -ResourceGroupName "joyer-test" -GroupName testdevicegroup -ProductName product2024 -Name dbb0e0cb8bd961a6129096e1e8a1375ac1fa274f030c08161b37ae3bc5a94f443bdb628cf257bc5bc810d8768c03b6f5ca301a35cd0169f56a49624255964560 +``` + +```output +ChipSku : MT3620AN +DeviceId : dbb0e0cb8bd961a6129096e1e8a1375ac1fa274f030c08161b37ae3bc5a94f443bdb628cf257bc5bc810d8768c03b6f5ca301a35cd0169f56a49624255964560 +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024/products/product2024/deviceGroups/testdevicegroup/devices/dbb0e0cb8bd961a6129096e1e8a1375ac1fa274f030c08161b37ae3bc5a94f443bdb628cf257bc5bc810d8768c03b6f5ca301a35cd0169f56a49624255964560 +LastAvailableOSVersion : +LastInstalledOSVersion : +LastOSUpdateUtc : +LastUpdateRequestUtc : +Name : dbb0e0cb8bd961a6129096e1e8a1375ac1fa274f030c08161b37ae3bc5a94f443bdb628cf257bc5bc810d8768c03b6f5ca301a35cd0169f56a49624255964560 +ProvisioningState : Succeeded +ResourceGroupName : joyer-test +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.AzureSphere/catalogs/products/deviceGroups/devices +``` + +This command gets specific device resource with specified resource group. + +## PARAMETERS + +### -CatalogInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: GetViaIdentityCatalog +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceGroupInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: GetViaIdentityDeviceGroup +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -GroupName +Name of device group. + +```yaml +Type: System.String +Parameter Sets: Get, GetViaIdentityCatalog, GetViaIdentityProduct, List +Aliases: DeviceGroupName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Device name + +```yaml +Type: System.String +Parameter Sets: Get, GetViaIdentityCatalog, GetViaIdentityDeviceGroup, GetViaIdentityProduct +Aliases: DeviceName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProductInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: GetViaIdentityProduct +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProductName +Name of product. + +```yaml +Type: System.String +Parameter Sets: Get, GetViaIdentityCatalog, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + +## NOTES + +## RELATED LINKS + diff --git a/src/Sphere/Sphere.Autorest/help/Get-AzSphereDeviceGroup.md b/src/Sphere/Sphere.Autorest/help/Get-AzSphereDeviceGroup.md new file mode 100644 index 000000000000..9ab7581a7259 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/help/Get-AzSphereDeviceGroup.md @@ -0,0 +1,321 @@ +--- +external help file: +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/get-azspheredevicegroup +schema: 2.0.0 +--- + +# Get-AzSphereDeviceGroup + +## SYNOPSIS +Get a DeviceGroup. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + +## SYNTAX + +### List (Default) +``` +Get-AzSphereDeviceGroup -CatalogName -ProductName -ResourceGroupName + [-SubscriptionId ] [-Filter ] [-Maxpagesize ] [-Skip ] [-Top ] + [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzSphereDeviceGroup -CatalogName -Name -ProductName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzSphereDeviceGroup -InputObject [-DefaultProfile ] [] +``` + +### GetViaIdentityCatalog +``` +Get-AzSphereDeviceGroup -CatalogInputObject -Name -ProductName + [-DefaultProfile ] [] +``` + +### GetViaIdentityProduct +``` +Get-AzSphereDeviceGroup -Name -ProductInputObject [-DefaultProfile ] + [] +``` + +## DESCRIPTION +Get a DeviceGroup. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + +## EXAMPLES + +### Example 1: List device group for specific product with specified catalog and resource group +```powershell +Get-AzSphereDeviceGroup -CatalogName NewCatalog -ProductName MyProd815 -ResourceGroupName ps1-test +``` + +```output +AllowCrashDumpsCollection : Disabled +Description : test device group +HasDeployment : False +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/ps1-test/providers/Microsoft.AzureSphere/catalogs/NewCatalog/products/MyProd815/deviceGroups/Marketing +Name : Marketing +OSFeedType : Retail +ProvisioningState : Succeeded +RegionalDataBoundary : None +ResourceGroupName : ps1-test +RetryAfter : +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.AzureSphere/catalogs/products/deviceGroups +UpdatePolicy : UpdateAll +``` + +This command lists device groups. + +### Example 2: Get specific device group of specified product with specified catalog and resource group +```powershell +Get-AzSphereDeviceGroup -CatalogName NewCatalog -Name Marketing -ProductName MyProd815 -ResourceGroupName ps1-test +``` + +```output +AllowCrashDumpsCollection : Disabled +Description : test device group +HasDeployment : +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/ps1-test/providers/Microsoft.AzureSphere/catalogs/NewCatalog/products/MyProd815/deviceGroups/Marketing +Name : Marketing +OSFeedType : Retail +ProvisioningState : Succeeded +RegionalDataBoundary : None +ResourceGroupName : ps1-test +RetryAfter : +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.AzureSphere/catalogs/products/deviceGroups +UpdatePolicy : UpdateAll +``` + +This command gets specific device group. + +## PARAMETERS + +### -CatalogInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: GetViaIdentityCatalog +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter +Filter the result list using the given expression + +```yaml +Type: System.String +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Maxpagesize +The maximum number of result items per page. + +```yaml +Type: System.Int32 +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Name of device group. + +```yaml +Type: System.String +Parameter Sets: Get, GetViaIdentityCatalog, GetViaIdentityProduct +Aliases: DeviceGroupName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProductInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: GetViaIdentityProduct +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProductName +Name of product. + +```yaml +Type: System.String +Parameter Sets: Get, GetViaIdentityCatalog, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Skip +The number of result items to skip. + +```yaml +Type: System.Int32 +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Top +The number of result items to return. + +```yaml +Type: System.Int32 +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + +## NOTES + +## RELATED LINKS + diff --git a/src/Sphere/Sphere.Autorest/help/Get-AzSphereImage.md b/src/Sphere/Sphere.Autorest/help/Get-AzSphereImage.md new file mode 100644 index 000000000000..17080cf7e286 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/help/Get-AzSphereImage.md @@ -0,0 +1,275 @@ +--- +external help file: +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/get-azsphereimage +schema: 2.0.0 +--- + +# Get-AzSphereImage + +## SYNOPSIS +Get a Image + +## SYNTAX + +### List (Default) +``` +Get-AzSphereImage -CatalogName -ResourceGroupName [-SubscriptionId ] + [-Filter ] [-Maxpagesize ] [-Skip ] [-Top ] [-DefaultProfile ] + [] +``` + +### Get +``` +Get-AzSphereImage -CatalogName -Name -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzSphereImage -InputObject [-DefaultProfile ] [] +``` + +### GetViaIdentityCatalog +``` +Get-AzSphereImage -CatalogInputObject -Name [-DefaultProfile ] + [] +``` + +## DESCRIPTION +Get a Image + +## EXAMPLES + +### Example 1: List images for specific catalog with specified resource group +```powershell +Get-AzSphereImage -CatalogName MyCatalog1 -ResourceGroupName ResourceGroup1 +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDa + taLastMo + difiedBy + Type +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ -------- +fa0bdab1-42bc-4871-84d5-fa05c8c0c895 +5f05300e-b0e0-47d5-8255-e4bddb2ddd81 +``` + +This command lists images. + +### Example 2: Get specific image with specified catalog and resource group +```powershell +Get-AzSphereImage -CatalogName anotherCatalog -Name 14a6729e-5819-4737-8713-37b4798533f8 -ResourceGroupName Sphere-test +``` + +```output +ComponentId : 42257ad6-382d-405f-b7cc-e110fbda2d0b +Description : +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/Sphere-test/providers/Microsoft.AzureSphere/catalogs/anotherCatalog/images/14a6729e-5819-4737-8713-37b4798533f8 +ImageId : 14a6729e-5819-4737-8713-37b4798533f8 +ImageName : +ImageType : Applications +Name : 14a6729e-5819-4737-8713-37b4798533f8 +PropertiesImage : AzureSphereBlink1 +ProvisioningState : Succeeded +RegionalDataBoundary : None +ResourceGroupName : Sphere-test +RetryAfter : +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.AzureSphere/catalogs/images +Uri : https://as3imgptint003.blob.core.windows.net/9e508310-247c-4bba-add7-39169e9b7482/imagesaks/14a6729e-5819-4737-8713-37b4798533f8?skoid=41781aa8-e455-49b8-8db3-eb9232b581c2&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2024-01-30T08%3A27%3A57Z&ske=2024-01-30T09%3A32%3A57Z&sks=b&skv=2021-12-02&sv=2021-12-02&spr=https,http&se=2024-01-30T16%3A32%3A57Z&sr=b&sp=r&sig=EiMxkiDu6yHzV%2BB2LSqMp27AnJc3lKice%2Fm2AJ63r%2Bg%3D +``` + +This command get specific image. + +## PARAMETERS + +### -CatalogInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: GetViaIdentityCatalog +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter +Filter the result list using the given expression + +```yaml +Type: System.String +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Maxpagesize +The maximum number of result items per page. + +```yaml +Type: System.Int32 +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Image name. +Use an image GUID for GA versions of the API. + +```yaml +Type: System.String +Parameter Sets: Get, GetViaIdentityCatalog +Aliases: ImageName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Skip +The number of result items to skip. + +```yaml +Type: System.Int32 +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Top +The number of result items to return. + +```yaml +Type: System.Int32 +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage + +## NOTES + +## RELATED LINKS + diff --git a/src/Sphere/Sphere.Autorest/help/Get-AzSphereProduct.md b/src/Sphere/Sphere.Autorest/help/Get-AzSphereProduct.md new file mode 100644 index 000000000000..323cf169c9c1 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/help/Get-AzSphereProduct.md @@ -0,0 +1,204 @@ +--- +external help file: +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/get-azsphereproduct +schema: 2.0.0 +--- + +# Get-AzSphereProduct + +## SYNOPSIS +Get a Product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. + +## SYNTAX + +### List (Default) +``` +Get-AzSphereProduct -CatalogName -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzSphereProduct -CatalogName -Name -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzSphereProduct -InputObject [-DefaultProfile ] [] +``` + +### GetViaIdentityCatalog +``` +Get-AzSphereProduct -CatalogInputObject -Name [-DefaultProfile ] + [] +``` + +## DESCRIPTION +Get a Product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. + +## EXAMPLES + +### Example 1: List with specified catalog by resource group +```powershell +Get-AzSphereProduct -ResourceGroupName joyer-test -CatalogName test2024 +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +product2024 joyer-test +product0207 joyer-test +``` + +This command gets list of product with specified catalog by resource group. + +### Example 2: Get product with specified catalog and resource group +```powershell +Get-AzSphereProduct -ResourceGroupName joyer-test -CatalogName test2024 -Name product2024 +``` + +```output +Description : 222 +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024/products/product2024 +Name : product2024 +ProvisioningState : Succeeded +ResourceGroupName : joyer-test +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.AzureSphere/catalogs/products +``` + +This command gets specific product with specified catalog and resource group. + +## PARAMETERS + +### -CatalogInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: GetViaIdentityCatalog +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Name of product. + +```yaml +Type: System.String +Parameter Sets: Get, GetViaIdentityCatalog +Aliases: ProductName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + +## NOTES + +## RELATED LINKS + diff --git a/src/Sphere/Sphere.Autorest/help/Invoke-AzSphereCountCatalogDevice.md b/src/Sphere/Sphere.Autorest/help/Invoke-AzSphereCountCatalogDevice.md new file mode 100644 index 000000000000..8ce10993e9ba --- /dev/null +++ b/src/Sphere/Sphere.Autorest/help/Invoke-AzSphereCountCatalogDevice.md @@ -0,0 +1,169 @@ +--- +external help file: +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/invoke-azspherecountcatalogdevice +schema: 2.0.0 +--- + +# Invoke-AzSphereCountCatalogDevice + +## SYNOPSIS +Counts devices in catalog. + +## SYNTAX + +### CountDevice (Default) +``` +Invoke-AzSphereCountCatalogDevice -CatalogName -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### CountDeviceViaIdentity +``` +Invoke-AzSphereCountCatalogDevice -InputObject [-DefaultProfile ] [-Confirm] + [-WhatIf] [] +``` + +## DESCRIPTION +Counts devices in catalog. + +## EXAMPLES + +### Example 1: Get device number +```powershell +Invoke-AzSphereCountCatalogDevice -CatalogName test2024 -ResourceGroupName joyer-test +``` + +```output +Value +----- + 3 +``` + +This command returns a number of device in the catalog. + +## PARAMETERS + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: CountDevice +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: CountDeviceViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: CountDevice +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: CountDevice +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse + +## NOTES + +## RELATED LINKS + diff --git a/src/Sphere/Sphere.Autorest/help/Invoke-AzSphereCountDeviceGroupDevice.md b/src/Sphere/Sphere.Autorest/help/Invoke-AzSphereCountDeviceGroupDevice.md new file mode 100644 index 000000000000..45e1e72458bd --- /dev/null +++ b/src/Sphere/Sphere.Autorest/help/Invoke-AzSphereCountDeviceGroupDevice.md @@ -0,0 +1,244 @@ +--- +external help file: +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/invoke-azspherecountdevicegroupdevice +schema: 2.0.0 +--- + +# Invoke-AzSphereCountDeviceGroupDevice + +## SYNOPSIS +Counts devices in device group. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + +## SYNTAX + +### CountDevice (Default) +``` +Invoke-AzSphereCountDeviceGroupDevice -CatalogName -DeviceGroupName -ProductName + -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [-Confirm] [-WhatIf] + [] +``` + +### CountDeviceViaIdentity +``` +Invoke-AzSphereCountDeviceGroupDevice -InputObject [-DefaultProfile ] [-Confirm] + [-WhatIf] [] +``` + +### CountDeviceViaIdentityCatalog +``` +Invoke-AzSphereCountDeviceGroupDevice -CatalogInputObject -DeviceGroupName + -ProductName [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### CountDeviceViaIdentityProduct +``` +Invoke-AzSphereCountDeviceGroupDevice -DeviceGroupName -ProductInputObject + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Counts devices in device group. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + +## EXAMPLES + +### Example 1: Get device number +```powershell +Invoke-AzSphereCountDeviceGroupDevice -CatalogName test2024 -ResourceGroupName joyer-test -DeviceGroupName testdevicegroup -ProductName product2024 +``` + +```output +Value +----- + 3 +``` + +This command returns device number for the device group. + +## PARAMETERS + +### -CatalogInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: CountDeviceViaIdentityCatalog +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: CountDevice +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceGroupName +Name of device group. + +```yaml +Type: System.String +Parameter Sets: CountDevice, CountDeviceViaIdentityCatalog, CountDeviceViaIdentityProduct +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: CountDeviceViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProductInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: CountDeviceViaIdentityProduct +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProductName +Name of product. + +```yaml +Type: System.String +Parameter Sets: CountDevice, CountDeviceViaIdentityCatalog +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: CountDevice +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: CountDevice +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse + +## NOTES + +## RELATED LINKS + diff --git a/src/Sphere/Sphere.Autorest/help/Invoke-AzSphereCountProductDevice.md b/src/Sphere/Sphere.Autorest/help/Invoke-AzSphereCountProductDevice.md new file mode 100644 index 000000000000..f1756318de96 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/help/Invoke-AzSphereCountProductDevice.md @@ -0,0 +1,207 @@ +--- +external help file: +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/invoke-azspherecountproductdevice +schema: 2.0.0 +--- + +# Invoke-AzSphereCountProductDevice + +## SYNOPSIS +Counts devices in product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. + +## SYNTAX + +### CountDevice (Default) +``` +Invoke-AzSphereCountProductDevice -CatalogName -ProductName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### CountDeviceViaIdentity +``` +Invoke-AzSphereCountProductDevice -InputObject [-DefaultProfile ] [-Confirm] + [-WhatIf] [] +``` + +### CountDeviceViaIdentityCatalog +``` +Invoke-AzSphereCountProductDevice -CatalogInputObject -ProductName + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Counts devices in product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. + +## EXAMPLES + +### Example 1: Get device number +```powershell +Invoke-AzSphereCountProductDevice -CatalogName test2024 -ResourceGroupName joyer-test -ProductName product2024 +``` + +```output +Value +----- + 3 +``` + +This command returns device number for the product. + +## PARAMETERS + +### -CatalogInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: CountDeviceViaIdentityCatalog +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: CountDevice +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: CountDeviceViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProductName +Name of product. + +```yaml +Type: System.String +Parameter Sets: CountDevice, CountDeviceViaIdentityCatalog +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: CountDevice +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: CountDevice +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse + +## NOTES + +## RELATED LINKS + diff --git a/src/Sphere/Sphere.Autorest/help/New-AzSphereCatalog.md b/src/Sphere/Sphere.Autorest/help/New-AzSphereCatalog.md new file mode 100644 index 000000000000..dbe49a61ec4c --- /dev/null +++ b/src/Sphere/Sphere.Autorest/help/New-AzSphereCatalog.md @@ -0,0 +1,262 @@ +--- +external help file: +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/new-azspherecatalog +schema: 2.0.0 +--- + +# New-AzSphereCatalog + +## SYNOPSIS +Create a Catalog + +## SYNTAX + +### CreateExpanded (Default) +``` +New-AzSphereCatalog -Name -ResourceGroupName -Location [-SubscriptionId ] + [-Tag ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### CreateViaJsonFilePath +``` +New-AzSphereCatalog -Name -ResourceGroupName -JsonFilePath + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +### CreateViaJsonString +``` +New-AzSphereCatalog -Name -ResourceGroupName -JsonString [-SubscriptionId ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Create a Catalog + +## EXAMPLES + +### Example 1: Example 1: Create a catalog +```powershell +New-AzSphereCatalog -name test2024 -ResourceGroupName joyer-test -Location global +``` + +```output +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024 +Location : global +Name : test2024 +ProvisioningState : Succeeded +ResourceGroupName : joyer-test +RetryAfter : +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Tag : { + } +TenantId : 7de8a199-bb33-4eda-9600-583103317243 +Type : microsoft.azuresphere/catalogs +``` + +This command creates a catalog. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Location +The geo-location where the resource lives + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Name of catalog + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: CatalogName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Resource tags. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog + +## NOTES + +## RELATED LINKS + diff --git a/src/Sphere/Sphere.Autorest/help/New-AzSphereDeployment.md b/src/Sphere/Sphere.Autorest/help/New-AzSphereDeployment.md new file mode 100644 index 000000000000..19de12994d15 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/help/New-AzSphereDeployment.md @@ -0,0 +1,328 @@ +--- +external help file: +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/new-azspheredeployment +schema: 2.0.0 +--- + +# New-AzSphereDeployment + +## SYNOPSIS +Create a Deployment. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + +## SYNTAX + +### CreateExpanded (Default) +``` +New-AzSphereDeployment -CatalogName -DeviceGroupName -Name -ProductName + -ResourceGroupName [-SubscriptionId ] [-DeployedImage ] [-DeploymentId ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### CreateViaJsonFilePath +``` +New-AzSphereDeployment -CatalogName -DeviceGroupName -Name -ProductName + -ResourceGroupName -JsonFilePath [-SubscriptionId ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### CreateViaJsonString +``` +New-AzSphereDeployment -CatalogName -DeviceGroupName -Name -ProductName + -ResourceGroupName -JsonString [-SubscriptionId ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Create a Deployment. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + +## EXAMPLES + +### Example 1: Create a deployment with deployed image +```powershell +$image1 = Get-AzSphereImage -Name '14a6729e-5819-4737-8713-37b4798533f8' -CatalogName test2024 -ResourceGroupName joyer-test +New-AzSphereDeployment -Name .default -CatalogName test2024 -DeviceGroupName testdevicegroup -ProductName product2024 -ResourceGroupName joyer-test -DeployedImage $image1 +``` + +```output +DateUtc : 3/1/2024 8:08:11 AM +DeployedImage : {{ + "id": "/subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024/images/14a6729e-5819-4737 + -8713-37b4798533f8", + "name": "14a6729e-5819-4737-8713-37b4798533f8", + "type": "Microsoft.AzureSphere/catalogs/images", + "properties": { + "image": "AzureSphereBlink1", + "imageId": "14a6729e-5819-4737-8713-37b4798533f8", + "regionalDataBoundary": "None", + "uri": "https://as3imgptint003.blob.core.windows.net/7de8a199-bb33-4eda-9600-583103317243/imagesaks/14a6729e-5819-4737-8713-37b4798533f8?skoid=cc6e3fcf-ab4d-4 + b0d-b3f9-9769604c1e52\u0026sktid=72f988bf-86f1-41af-91ab-2d7cd011db47\u0026skt=2024-03-01T08%3A03%3A45Z\u0026ske=2024-03-01T09%3A08%3A45Z\u0026sks=b\u0026skv=2021 + -12-02\u0026sv=2021-12-02\u0026spr=https,http\u0026se=2024-03-01T16%3A08%3A45Z\u0026sr=b\u0026sp=r\u0026sig=UviBTlciImOjqw968crarXzXyQ29UMEi4js56AEOPgU%3D", + "componentId": "42257ad6-382d-405f-b7cc-e110fbda2d0b", + "imageType": "Applications", + "provisioningState": "Succeeded" + } + }} +DeploymentId : e1e61a75-0629-491c-8f4f-0c054116d71c +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024/products/product2024/deviceGroups/ + testdevicegroup/deployments/e1e61a75-0629-491c-8f4f-0c054116d71c +Name : e1e61a75-0629-491c-8f4f-0c054116d71c +ProvisioningState : Succeeded +ResourceGroupName : joyer-test +SystemDataCreatedAt : 3/1/2024 8:08:11 AM +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : 3/1/2024 8:08:11 AM +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.AzureSphere/catalogs/products/deviceGroups/deployments +``` + +This command create a deployment with deployed images. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeployedImage +Images deployed + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage[] +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeploymentId +Deployment ID + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceGroupName +Name of device group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Deployment name. +Use .default for deployment creation and to get the current deployment for the associated device group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: DeploymentName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProductName +Name of product. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment + +## NOTES + +## RELATED LINKS + diff --git a/src/Sphere/Sphere.Autorest/help/New-AzSphereDevice.md b/src/Sphere/Sphere.Autorest/help/New-AzSphereDevice.md new file mode 100644 index 000000000000..26175272af28 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/help/New-AzSphereDevice.md @@ -0,0 +1,299 @@ +--- +external help file: +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/new-azspheredevice +schema: 2.0.0 +--- + +# New-AzSphereDevice + +## SYNOPSIS +Create a Device. +Use '.unassigned' or '.default' for the device group and product names to claim a device to the catalog only. + +## SYNTAX + +### CreateExpanded (Default) +``` +New-AzSphereDevice -CatalogName -GroupName -Name -ProductName + -ResourceGroupName [-SubscriptionId ] [-DeviceId ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### CreateViaJsonFilePath +``` +New-AzSphereDevice -CatalogName -GroupName -Name -ProductName + -ResourceGroupName -JsonFilePath [-SubscriptionId ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### CreateViaJsonString +``` +New-AzSphereDevice -CatalogName -GroupName -Name -ProductName + -ResourceGroupName -JsonString [-SubscriptionId ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Create a Device. +Use '.unassigned' or '.default' for the device group and product names to claim a device to the catalog only. + +## EXAMPLES + +### Example 1: Create a device +```powershell +New-AzSphereDevice -CatalogName "anotherNewOne" -GroupName ".default" -Name "45ffd2afe82d77b2b70f1daed2054abc64853a27395c6112d9adaf01047bae5a0caa72219f93db02e1a93f2c159ba2090a783077138e7fa542459621e6091e4c" -ProductName ".default" -ResourceGroupName "goyedokun" +``` + +```output +ChipSku : MT3620AN +DeviceId : fc9085337153e47eca0d42dcae83819f18ae90d916ae3b87d0206fef6acb9ca44f9e21b93c01311e83168393d112841decc5ef6d48c3d1d07be6b0bf8fec6e2b +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/goyedokun/providers/Microsoft.AzureSphere/catalogs/anotherNewOne/products/.default/deviceGroups/.default/devices/FC9085337153E47ECA0D42DCAE83819F18AE90D916AE3B87D0206FEF6ACB9CA44F9E21B93C01311E83168393D112841DECC5EF6D48C3D1D07BE6B0BF8FEC6E2B +LastAvailableOSVersion : +LastInstalledOSVersion : +LastOSUpdateUtc : +LastUpdateRequestUtc : +Name : fc9085337153e47eca0d42dcae83819f18ae90d916ae3b87d0206fef6acb9ca44f9e21b93c01311e83168393d112841decc5ef6d48c3d1d07be6b0bf8fec6e2b +ProvisioningState : Succeeded +ResourceGroupName : goyedokun +RetryAfter : +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.AzureSphere/catalogs/products/deviceGroups/devices + +``` + +This command creates a device. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceId +Device ID + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupName +Name of device group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: DeviceGroupName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Device name + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: DeviceName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProductName +Name of product. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + +## NOTES + +## RELATED LINKS + diff --git a/src/Sphere/Sphere.Autorest/help/New-AzSphereDeviceCapabilityImage.md b/src/Sphere/Sphere.Autorest/help/New-AzSphereDeviceCapabilityImage.md new file mode 100644 index 000000000000..5209eaacc619 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/help/New-AzSphereDeviceCapabilityImage.md @@ -0,0 +1,351 @@ +--- +external help file: +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/new-azspheredevicecapabilityimage +schema: 2.0.0 +--- + +# New-AzSphereDeviceCapabilityImage + +## SYNOPSIS +Generates the capability image for the device. +Use '.unassigned' or '.default' for the device group and product names to generate the image for a device that does not belong to a specific device group and product. + +## SYNTAX + +### GenerateExpanded (Default) +``` +New-AzSphereDeviceCapabilityImage -CatalogName -DeviceGroupName -DeviceName + -ProductName -ResourceGroupName -Capability [-SubscriptionId ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### GenerateViaIdentityCatalogExpanded +``` +New-AzSphereDeviceCapabilityImage -CatalogInputObject -DeviceGroupName + -DeviceName -ProductName -Capability [-DefaultProfile ] [-AsJob] + [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### GenerateViaIdentityDeviceGroupExpanded +``` +New-AzSphereDeviceCapabilityImage -DeviceGroupInputObject -DeviceName + -Capability [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +### GenerateViaIdentityProductExpanded +``` +New-AzSphereDeviceCapabilityImage -DeviceGroupName -DeviceName + -ProductInputObject -Capability [-DefaultProfile ] [-AsJob] [-NoWait] + [-Confirm] [-WhatIf] [] +``` + +### GenerateViaJsonFilePath +``` +New-AzSphereDeviceCapabilityImage -CatalogName -DeviceGroupName -DeviceName + -ProductName -ResourceGroupName -JsonFilePath [-SubscriptionId ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### GenerateViaJsonString +``` +New-AzSphereDeviceCapabilityImage -CatalogName -DeviceGroupName -DeviceName + -ProductName -ResourceGroupName -JsonString [-SubscriptionId ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Generates the capability image for the device. +Use '.unassigned' or '.default' for the device group and product names to generate the image for a device that does not belong to a specific device group and product. + +## EXAMPLES + +### Example 1: Generates the capability image for the device. +```powershell +New-AzSphereDeviceCapabilityImage -ResourceGroupName joyer-test -CatalogName test2024 -DeviceGroupName testdevicegroup2 -ProductName product2024 -DeviceName DBB0E0CB8BD961A6129096E1E8A1375AC1FA274F030C08161B37AE3BC5A94F443BDB628CF257BC5BC810D8768C03B6F5CA301A35CD0169F56A49624255964560 -Capability 'ApplicationDevelopment' | Format-List +``` + +```output +Image : /Vz9XAEAAADMAAAA27Dgy4vZYaYSkJbh6KE3WsH6J08DDAgWGzeuO8WpT0Q722KM8le8W8gQ2HaMA7b1yjAaNc0BafVqSWJCVZZFYAsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANFg0TQMAAABJRCQADQAAANi1KEHCq1VBmjOKHzHtZ+yYQTwYazyNRbRvoHzwyZefU0cYAJZKiVhXTEtr0FMmMLhe+JiQpbh/AQAA + AERCKAAAAAAAAAAAAGZ3X2NvbmZpZwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAfAAAAMyzku8X6GdcOC1Sd9Cfozpmsiny2TzmjyXK7IvOhfA1B8nwdf1GoPa6PPVNMnn15TPIFK/P5/S2TD/mQrNh0Nk= +``` + +This command generates the capability image for specified device. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Capability +List of capabilities to create + +```yaml +Type: System.String[] +Parameter Sets: GenerateExpanded, GenerateViaIdentityCatalogExpanded, GenerateViaIdentityDeviceGroupExpanded, GenerateViaIdentityProductExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CatalogInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: GenerateViaIdentityCatalogExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: GenerateExpanded, GenerateViaJsonFilePath, GenerateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceGroupInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: GenerateViaIdentityDeviceGroupExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -DeviceGroupName +Name of device group. + +```yaml +Type: System.String +Parameter Sets: GenerateExpanded, GenerateViaIdentityCatalogExpanded, GenerateViaIdentityProductExpanded, GenerateViaJsonFilePath, GenerateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceName +Device name + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Generate operation + +```yaml +Type: System.String +Parameter Sets: GenerateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Generate operation + +```yaml +Type: System.String +Parameter Sets: GenerateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProductInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: GenerateViaIdentityProductExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProductName +Name of product. + +```yaml +Type: System.String +Parameter Sets: GenerateExpanded, GenerateViaIdentityCatalogExpanded, GenerateViaJsonFilePath, GenerateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: GenerateExpanded, GenerateViaJsonFilePath, GenerateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: GenerateExpanded, GenerateViaJsonFilePath, GenerateViaJsonString +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse + +## NOTES + +## RELATED LINKS + diff --git a/src/Sphere/Sphere.Autorest/help/New-AzSphereDeviceGroup.md b/src/Sphere/Sphere.Autorest/help/New-AzSphereDeviceGroup.md new file mode 100644 index 000000000000..839a5474dd4e --- /dev/null +++ b/src/Sphere/Sphere.Autorest/help/New-AzSphereDeviceGroup.md @@ -0,0 +1,344 @@ +--- +external help file: +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/new-azspheredevicegroup +schema: 2.0.0 +--- + +# New-AzSphereDeviceGroup + +## SYNOPSIS +Create a DeviceGroup. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + +## SYNTAX + +### CreateExpanded (Default) +``` +New-AzSphereDeviceGroup -CatalogName -Name -ProductName -ResourceGroupName + [-SubscriptionId ] [-AllowCrashDumpsCollection ] [-Description ] + [-OSFeedType ] [-RegionalDataBoundary ] [-UpdatePolicy ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### CreateViaJsonFilePath +``` +New-AzSphereDeviceGroup -CatalogName -Name -ProductName -ResourceGroupName + -JsonFilePath [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-WhatIf] [] +``` + +### CreateViaJsonString +``` +New-AzSphereDeviceGroup -CatalogName -Name -ProductName -ResourceGroupName + -JsonString [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-WhatIf] [] +``` + +## DESCRIPTION +Create a DeviceGroup. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + +## EXAMPLES + +### Example 1: Create a device group into specified catalog and product +```powershell +New-AzSphereDeviceGroup -CatalogName anotherCatalog -Name testgroup -ProductName test -ResourceGroupName Sphere-test +``` + +```output +AllowCrashDumpsCollection : Disabled +Description : +HasDeployment : +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/Sphere-test/providers/Microsoft.AzureSphere/catalogs/anotherCatalog/products/test/deviceGroups/testgroup +Name : testgroup +OSFeedType : Retail +ProvisioningState : Succeeded +RegionalDataBoundary : None +ResourceGroupName : Sphere-test +RetryAfter : +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.AzureSphere/catalogs/products/deviceGroups +UpdatePolicy : UpdateAll +``` + +This command creates a device group into specified catalog and product. + +## PARAMETERS + +### -AllowCrashDumpsCollection +Flag to define if the user allows for crash dump collection. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Description +Description of the device group. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Name of device group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: DeviceGroupName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OSFeedType +Operating system feed type of the device group. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProductName +Name of product. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RegionalDataBoundary +Regional data boundary for the device group. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UpdatePolicy +Update policy of the device group. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + +## NOTES + +## RELATED LINKS + diff --git a/src/Sphere/Sphere.Autorest/help/New-AzSphereImage.md b/src/Sphere/Sphere.Autorest/help/New-AzSphereImage.md new file mode 100644 index 000000000000..4f178e3552e9 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/help/New-AzSphereImage.md @@ -0,0 +1,304 @@ +--- +external help file: +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/new-azsphereimage +schema: 2.0.0 +--- + +# New-AzSphereImage + +## SYNOPSIS +Create a Image + +## SYNTAX + +### CreateExpanded (Default) +``` +New-AzSphereImage -CatalogName -Name -ResourceGroupName [-SubscriptionId ] + [-Image ] [-ImageId ] [-RegionalDataBoundary ] [-DefaultProfile ] [-AsJob] + [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### CreateViaJsonFilePath +``` +New-AzSphereImage -CatalogName -Name -ResourceGroupName -JsonFilePath + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +### CreateViaJsonString +``` +New-AzSphereImage -CatalogName -Name -ResourceGroupName -JsonString + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +## DESCRIPTION +Create a Image + +## EXAMPLES + +### Example 1: Create a image for device group +```powershell +$imagefile1 = 'D:\GitHub\azure-powershell\src\Sphere\Sphere.Autorest\test\imagefile\AzureSphereBlink1.imagepackage' +$encf1 = [system.io.file]::ReadAllBytes($imagefile1) +$base64str = [system.convert]::ToBase64String($encf1) +New-AzSphereImage -CatalogName test2024 -ResourceGroupName joyer-test -Name 14a6729e-5819-4737-8713-37b4798533f8 -Image $base64str +``` + +```output +ComponentId : 42257ad6-382d-405f-b7cc-e110fbda2d0b +Description : +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024/images/14a6729e-5819-4737-8713-37b4798533f8 +ImageId : 14a6729e-5819-4737-8713-37b4798533f8 +ImageName : +ImageType : Applications +Name : 14a6729e-5819-4737-8713-37b4798533f8 +PropertiesImage : AzureSphereBlink1 +ProvisioningState : Succeeded +RegionalDataBoundary : None +ResourceGroupName : joyer-test +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.AzureSphere/catalogs/images +Uri : https://as3imgptint003.blob.core.windows.net/7de8a199-bb33-4eda-9600-583103317243/imagesaks/14a6729e-5819-4737-8713-37b4798533f8?skoid=cc6e3fcf-ab4d-4b0d-b3f9-9769 + 604c1e52&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2024-02-23T02%3A31%3A35Z&ske=2024-02-23T03%3A36%3A35Z&sks=b&skv=2021-12-02&sv=2021-12-02&spr=https,http&se= + 2024-02-23T10%3A36%3A35Z&sr=b&sp=r&sig=7ZNckgqdazn9Af8fHUfsEEA2JrZO0SjDZpUgbh0jEZI%3D +``` + +This command creates a image for the device group. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Image +Image as a UTF-8 encoded base 64 string on image create. +This field contains the image URI on image reads. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ImageId +Image ID + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Image name. +Use an image GUID for GA versions of the API. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ImageName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RegionalDataBoundary +Regional data boundary for an image + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage + +## NOTES + +## RELATED LINKS + diff --git a/src/Sphere/Sphere.Autorest/help/New-AzSphereProduct.md b/src/Sphere/Sphere.Autorest/help/New-AzSphereProduct.md new file mode 100644 index 000000000000..fbf6b7069119 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/help/New-AzSphereProduct.md @@ -0,0 +1,263 @@ +--- +external help file: +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/new-azsphereproduct +schema: 2.0.0 +--- + +# New-AzSphereProduct + +## SYNOPSIS +Create a Product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. + +## SYNTAX + +### CreateExpanded (Default) +``` +New-AzSphereProduct -CatalogName -Name -ResourceGroupName + [-SubscriptionId ] [-Description ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-WhatIf] [] +``` + +### CreateViaJsonFilePath +``` +New-AzSphereProduct -CatalogName -Name -ResourceGroupName -JsonFilePath + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +### CreateViaJsonString +``` +New-AzSphereProduct -CatalogName -Name -ResourceGroupName -JsonString + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +## DESCRIPTION +Create a Product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. + +## EXAMPLES + +### Example 1: Create a product into specified catalog +```powershell +New-AzSphereProduct -CatalogName test2024 -ResourceGroupName joyer-test -Name product2024 +``` + +```output +Description : +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024/products/product2024 +Name : product2024 +ProvisioningState : Succeeded +ResourceGroupName : joyer-test +RetryAfter : +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.AzureSphere/catalogs/products +``` + +This command create a product into specified catalog. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Description +Description of the product + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Name of product. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ProductName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + +## NOTES + +## RELATED LINKS + diff --git a/src/Sphere/Sphere.Autorest/help/New-AzSphereProductDefaultDeviceGroup.md b/src/Sphere/Sphere.Autorest/help/New-AzSphereProductDefaultDeviceGroup.md new file mode 100644 index 000000000000..242906f6be1c --- /dev/null +++ b/src/Sphere/Sphere.Autorest/help/New-AzSphereProductDefaultDeviceGroup.md @@ -0,0 +1,211 @@ +--- +external help file: +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/new-azsphereproductdefaultdevicegroup +schema: 2.0.0 +--- + +# New-AzSphereProductDefaultDeviceGroup + +## SYNOPSIS +Generates default device groups for the product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. + +## SYNTAX + +### Generate (Default) +``` +New-AzSphereProductDefaultDeviceGroup -CatalogName -ProductName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### GenerateViaIdentity +``` +New-AzSphereProductDefaultDeviceGroup -InputObject [-DefaultProfile ] [-Confirm] + [-WhatIf] [] +``` + +### GenerateViaIdentityCatalog +``` +New-AzSphereProductDefaultDeviceGroup -CatalogInputObject -ProductName + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Generates default device groups for the product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. + +## EXAMPLES + +### Example 1: Generate default device groups for the product +```powershell +New-AzSphereProductDefaultDeviceGroup -CatalogName test2024 -ProductName product0207 -ResourceGroupName joyer-test +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +Development joyer-test +Field Test joyer-test +Production joyer-test +Production OS Evaluation joyer-test +Field Test OS Evaluation joyer-test +``` + +This command generates default device groups for the product. + +## PARAMETERS + +### -CatalogInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: GenerateViaIdentityCatalog +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: Generate +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: GenerateViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProductName +Name of product. + +```yaml +Type: System.String +Parameter Sets: Generate, GenerateViaIdentityCatalog +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Generate +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: Generate +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + +## NOTES + +## RELATED LINKS + diff --git a/src/Sphere/Sphere.Autorest/help/README.md b/src/Sphere/Sphere.Autorest/help/README.md new file mode 100644 index 000000000000..144e5518fad7 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/help/README.md @@ -0,0 +1,11 @@ +# Docs +This directory contains the documentation of the cmdlets for the `Az.Sphere` module. To run documentation generation, use the `generate-help.ps1` script at the root module folder. Files in this folder will *always be overridden on regeneration*. To update documentation examples, please use the `..\examples` folder. + +## Info +- Modifiable: no +- Generated: all +- Committed: yes +- Packaged: yes + +## Details +The process of documentation generation loads `Az.Sphere` and analyzes the exported cmdlets from the module. It recognizes the [help comments](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) that are generated into the scripts in the `..\exports` folder. Additionally, when writing custom cmdlets in the `..\custom` folder, you can use the help comments syntax, which decorate the exported scripts at build-time. The documentation examples are taken from the `..\examples` folder. \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/help/Remove-AzSphereCatalog.md b/src/Sphere/Sphere.Autorest/help/Remove-AzSphereCatalog.md new file mode 100644 index 000000000000..45a1611c5c04 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/help/Remove-AzSphereCatalog.md @@ -0,0 +1,208 @@ +--- +external help file: +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/remove-azspherecatalog +schema: 2.0.0 +--- + +# Remove-AzSphereCatalog + +## SYNOPSIS +Delete a Catalog + +## SYNTAX + +### Delete (Default) +``` +Remove-AzSphereCatalog -Name -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentity +``` +Remove-AzSphereCatalog -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Delete a Catalog + +## EXAMPLES + +### Example 1: Delete a catalog +```powershell +Remove-AzSphereCatalog -Name test2024 -ResourceGroupName joyer-test +``` + +This command deletes specified catalog. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Name of catalog + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: CatalogName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/src/Sphere/Sphere.Autorest/help/Remove-AzSphereDeviceGroup.md b/src/Sphere/Sphere.Autorest/help/Remove-AzSphereDeviceGroup.md new file mode 100644 index 000000000000..9b2c0133af11 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/help/Remove-AzSphereDeviceGroup.md @@ -0,0 +1,283 @@ +--- +external help file: +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/remove-azspheredevicegroup +schema: 2.0.0 +--- + +# Remove-AzSphereDeviceGroup + +## SYNOPSIS +Delete a DeviceGroup. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + +## SYNTAX + +### Delete (Default) +``` +Remove-AzSphereDeviceGroup -CatalogName -Name -ProductName + -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentity +``` +Remove-AzSphereDeviceGroup -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentityCatalog +``` +Remove-AzSphereDeviceGroup -CatalogInputObject -Name -ProductName + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentityProduct +``` +Remove-AzSphereDeviceGroup -Name -ProductInputObject [-DefaultProfile ] + [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Delete a DeviceGroup. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + +## EXAMPLES + +### Example 1: Delete specified device group +```powershell +Remove-AzSphereDeviceGroup -CatalogName NewCatalog -Name Marketing -ProductName MyProd129 -ResourceGroupName Sphere-test +``` + +This command deletes specified device group. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CatalogInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: DeleteViaIdentityCatalog +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Name of device group. + +```yaml +Type: System.String +Parameter Sets: Delete, DeleteViaIdentityCatalog, DeleteViaIdentityProduct +Aliases: DeviceGroupName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProductInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: DeleteViaIdentityProduct +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProductName +Name of product. + +```yaml +Type: System.String +Parameter Sets: Delete, DeleteViaIdentityCatalog +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/src/Sphere/Sphere.Autorest/help/Remove-AzSphereProduct.md b/src/Sphere/Sphere.Autorest/help/Remove-AzSphereProduct.md new file mode 100644 index 000000000000..b729bfc0609f --- /dev/null +++ b/src/Sphere/Sphere.Autorest/help/Remove-AzSphereProduct.md @@ -0,0 +1,247 @@ +--- +external help file: +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/remove-azsphereproduct +schema: 2.0.0 +--- + +# Remove-AzSphereProduct + +## SYNOPSIS +Delete a Product. +'.default' and '.unassigned' are system defined values and cannot be used for product name' + +## SYNTAX + +### Delete (Default) +``` +Remove-AzSphereProduct -CatalogName -Name -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] + [] +``` + +### DeleteViaIdentity +``` +Remove-AzSphereProduct -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentityCatalog +``` +Remove-AzSphereProduct -CatalogInputObject -Name [-DefaultProfile ] + [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Delete a Product. +'.default' and '.unassigned' are system defined values and cannot be used for product name' + +## EXAMPLES + +### Example 1: Delete a product +```powershell +Remove-AzSphereProduct -CatalogName test2024 -ResourceGroupName joyer-test -Name product2024 +``` + +This command deletes specified product. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CatalogInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: DeleteViaIdentityCatalog +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Name of product. + +```yaml +Type: System.String +Parameter Sets: Delete, DeleteViaIdentityCatalog +Aliases: ProductName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/src/Sphere/Sphere.Autorest/help/Update-AzSphereCatalog.md b/src/Sphere/Sphere.Autorest/help/Update-AzSphereCatalog.md new file mode 100644 index 000000000000..9475a145ab29 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/help/Update-AzSphereCatalog.md @@ -0,0 +1,239 @@ +--- +external help file: +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/update-azspherecatalog +schema: 2.0.0 +--- + +# Update-AzSphereCatalog + +## SYNOPSIS +Update a Catalog + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzSphereCatalog -Name -ResourceGroupName [-SubscriptionId ] + [-Tag ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzSphereCatalog -InputObject [-Tag ] [-DefaultProfile ] + [-Confirm] [-WhatIf] [] +``` + +### UpdateViaJsonFilePath +``` +Update-AzSphereCatalog -Name -ResourceGroupName -JsonFilePath + [-SubscriptionId ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaJsonString +``` +Update-AzSphereCatalog -Name -ResourceGroupName -JsonString + [-SubscriptionId ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Update a Catalog + +## EXAMPLES + +### Example 1: Update tag +```powershell +Update-AzSphereCatalog -Name test2024 -ResourceGroupName joyer-test -Tag @{"123"="abc"} +``` + +```output +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024 +Location : global +Name : test2024 +ProvisioningState : Succeeded +ResourceGroupName : joyer-test +SystemDataCreatedAt : 2/1/2024 1:51:44 AM +SystemDataCreatedBy : example@microsoft.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 2/8/2024 1:54:33 AM +SystemDataLastModifiedBy : example@microsoft.com +SystemDataLastModifiedByType : User +Tag : { + "123": "abc" + } +TenantId : +Type : microsoft.azuresphere/catalogs +``` + +This command updates tag for specified catalog. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Name of catalog + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString +Aliases: CatalogName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Resource tags. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog + +## NOTES + +## RELATED LINKS + diff --git a/src/Sphere/Sphere.Autorest/help/Update-AzSphereDevice.md b/src/Sphere/Sphere.Autorest/help/Update-AzSphereDevice.md new file mode 100644 index 000000000000..185f65e587ce --- /dev/null +++ b/src/Sphere/Sphere.Autorest/help/Update-AzSphereDevice.md @@ -0,0 +1,414 @@ +--- +external help file: +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/update-azspheredevice +schema: 2.0.0 +--- + +# Update-AzSphereDevice + +## SYNOPSIS +Update a Device. +Use '.unassigned' or '.default' for the device group and product names to move a device to the catalog level. + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzSphereDevice -CatalogName -GroupName -Name -ProductName + -ResourceGroupName [-SubscriptionId ] [-DeviceGroupId ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityCatalogExpanded +``` +Update-AzSphereDevice -CatalogInputObject -GroupName -Name + -ProductName [-DeviceGroupId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-WhatIf] [] +``` + +### UpdateViaIdentityDeviceGroupExpanded +``` +Update-AzSphereDevice -DeviceGroupInputObject -Name [-DeviceGroupId ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzSphereDevice -InputObject [-DeviceGroupId ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityProductExpanded +``` +Update-AzSphereDevice -GroupName -Name -ProductInputObject + [-DeviceGroupId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +### UpdateViaJsonFilePath +``` +Update-AzSphereDevice -CatalogName -GroupName -Name -ProductName + -ResourceGroupName -JsonFilePath [-SubscriptionId ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaJsonString +``` +Update-AzSphereDevice -CatalogName -GroupName -Name -ProductName + -ResourceGroupName -JsonString [-SubscriptionId ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Update a Device. +Use '.unassigned' or '.default' for the device group and product names to move a device to the catalog level. + +## EXAMPLES + +### Example 1: Assign a device to another device group +```powershell +Update-AzSphereDevice -ResourceGroupName joyer-test -CatalogName test2024 -GroupName testdevicegroup -ProductName product2024 -Name DBB0E0CB8BD961A6129096E1E8A1375AC1FA274F030C08161B37AE3BC5A94F443BDB628CF257BC5BC810D8768C03B6F5CA301A35CD0169F56A49624255964560 -DeviceGroupId /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024/products/product2024/deviceGroups/testdevicegroup2 +``` + +```output +ChipSku : +DeviceId : +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/dc3e0b1a-59ae-4b00-bb84-9 + a7ea253f4e8*648856149066E98CE43CF51B8F3FC827768BFF5C8740097AD36EDFC456E7B110 +LastAvailableOSVersion : +LastInstalledOSVersion : +LastOSUpdateUtc : +LastUpdateRequestUtc : +Name : dc3e0b1a-59ae-4b00-bb84-9a7ea253f4e8*648856149066E98CE43CF51B8F3FC827768BFF5C8740097AD36EDFC456E7B110 +ProvisioningState : +ResourceGroupName : +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : +``` + +This command assign a device to another device group. + +### Example 2: unassign a device +```powershell +Update-AzSphereDevice -ResourceGroupName joyer-test -CatalogName test2024 -GroupName testdevicegroup -ProductName product2024 -Name DBB0E0CB8BD961A6129096E1E8A1375AC1FA274F030C08161B37AE3BC5A94F443BDB628CF257BC5BC810D8768C03B6F5CA301A35CD0169F56A49624255964560 -DeviceGroupId /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024/products/.default/deviceGroups/.default +``` + +```output +ChipSku : +DeviceId : +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/89c583a1-2a79-4f5f-ab4b-7e1cc7fb52e7* + 648856149066E98CE43CF51B8F3FC827768BFF5C8740097AD36EDFC456E7B110 +LastAvailableOSVersion : +LastInstalledOSVersion : +LastOSUpdateUtc : +LastUpdateRequestUtc : +Name : 89c583a1-2a79-4f5f-ab4b-7e1cc7fb52e7*648856149066E98CE43CF51B8F3FC827768BFF5C8740097AD36EDFC456E7B110 +ProvisioningState : +ResourceGroupName : +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : +``` + +This command unassign a device to catalog. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CatalogInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: UpdateViaIdentityCatalogExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceGroupId +Device group id + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityCatalogExpanded, UpdateViaIdentityDeviceGroupExpanded, UpdateViaIdentityExpanded, UpdateViaIdentityProductExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceGroupInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: UpdateViaIdentityDeviceGroupExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -GroupName +Name of device group. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityCatalogExpanded, UpdateViaIdentityProductExpanded, UpdateViaJsonFilePath, UpdateViaJsonString +Aliases: DeviceGroupName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Device name + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityCatalogExpanded, UpdateViaIdentityDeviceGroupExpanded, UpdateViaIdentityProductExpanded, UpdateViaJsonFilePath, UpdateViaJsonString +Aliases: DeviceName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProductInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: UpdateViaIdentityProductExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProductName +Name of product. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityCatalogExpanded, UpdateViaJsonFilePath, UpdateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + +## NOTES + +## RELATED LINKS + diff --git a/src/Sphere/Sphere.Autorest/help/Update-AzSphereDeviceGroup.md b/src/Sphere/Sphere.Autorest/help/Update-AzSphereDeviceGroup.md new file mode 100644 index 000000000000..6191fb26a14c --- /dev/null +++ b/src/Sphere/Sphere.Autorest/help/Update-AzSphereDeviceGroup.md @@ -0,0 +1,413 @@ +--- +external help file: +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/update-azspheredevicegroup +schema: 2.0.0 +--- + +# Update-AzSphereDeviceGroup + +## SYNOPSIS +Update a DeviceGroup. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzSphereDeviceGroup -CatalogName -Name -ProductName + -ResourceGroupName [-SubscriptionId ] [-AllowCrashDumpsCollection ] + [-Description ] [-OSFeedType ] [-RegionalDataBoundary ] [-UpdatePolicy ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityCatalogExpanded +``` +Update-AzSphereDeviceGroup -CatalogInputObject -Name -ProductName + [-AllowCrashDumpsCollection ] [-Description ] [-OSFeedType ] + [-RegionalDataBoundary ] [-UpdatePolicy ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzSphereDeviceGroup -InputObject [-AllowCrashDumpsCollection ] + [-Description ] [-OSFeedType ] [-RegionalDataBoundary ] [-UpdatePolicy ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityProductExpanded +``` +Update-AzSphereDeviceGroup -Name -ProductInputObject + [-AllowCrashDumpsCollection ] [-Description ] [-OSFeedType ] + [-RegionalDataBoundary ] [-UpdatePolicy ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-Confirm] [-WhatIf] [] +``` + +### UpdateViaJsonFilePath +``` +Update-AzSphereDeviceGroup -CatalogName -Name -ProductName + -ResourceGroupName -JsonFilePath [-SubscriptionId ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaJsonString +``` +Update-AzSphereDeviceGroup -CatalogName -Name -ProductName + -ResourceGroupName -JsonString [-SubscriptionId ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Update a DeviceGroup. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + +## EXAMPLES + +### Example 1: Update device group +```powershell +Update-AzSphereDeviceGroup -ResourceGroupName joyer-test -CatalogName test2024 -ProductName product2024 -Name testdevicegroup -Description test +``` + +```output +AllowCrashDumpsCollection : +Description : test +HasDeployment : +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024/products/product2024/deviceGroups/testdevicegroup +Name : testdevicegroup +OSFeedType : +ProvisioningState : Succeeded +RegionalDataBoundary : +ResourceGroupName : joyer-test +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.AzureSphere/catalogs/products/deviceGroups +UpdatePolicy : +``` + +This command updates device group. + +## PARAMETERS + +### -AllowCrashDumpsCollection +Flag to define if the user allows for crash dump collection. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityCatalogExpanded, UpdateViaIdentityExpanded, UpdateViaIdentityProductExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CatalogInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: UpdateViaIdentityCatalogExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Description +Description of the device group. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityCatalogExpanded, UpdateViaIdentityExpanded, UpdateViaIdentityProductExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Name of device group. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityCatalogExpanded, UpdateViaIdentityProductExpanded, UpdateViaJsonFilePath, UpdateViaJsonString +Aliases: DeviceGroupName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OSFeedType +Operating system feed type of the device group. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityCatalogExpanded, UpdateViaIdentityExpanded, UpdateViaIdentityProductExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProductInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: UpdateViaIdentityProductExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProductName +Name of product. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityCatalogExpanded, UpdateViaJsonFilePath, UpdateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RegionalDataBoundary +Regional data boundary for the device group. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityCatalogExpanded, UpdateViaIdentityExpanded, UpdateViaIdentityProductExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UpdatePolicy +Update policy of the device group. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityCatalogExpanded, UpdateViaIdentityExpanded, UpdateViaIdentityProductExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + +## NOTES + +## RELATED LINKS + diff --git a/src/Sphere/Sphere.Autorest/help/Update-AzSphereProduct.md b/src/Sphere/Sphere.Autorest/help/Update-AzSphereProduct.md new file mode 100644 index 000000000000..6f6b8e054420 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/help/Update-AzSphereProduct.md @@ -0,0 +1,306 @@ +--- +external help file: +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/update-azsphereproduct +schema: 2.0.0 +--- + +# Update-AzSphereProduct + +## SYNOPSIS +Update a Product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzSphereProduct -CatalogName -Name -ResourceGroupName + [-SubscriptionId ] [-Description ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-WhatIf] [] +``` + +### UpdateViaIdentityCatalogExpanded +``` +Update-AzSphereProduct -CatalogInputObject -Name [-Description ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzSphereProduct -InputObject [-Description ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaJsonFilePath +``` +Update-AzSphereProduct -CatalogName -Name -ResourceGroupName -JsonFilePath + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +### UpdateViaJsonString +``` +Update-AzSphereProduct -CatalogName -Name -ResourceGroupName -JsonString + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +## DESCRIPTION +Update a Product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. + +## EXAMPLES + +### Example 1: Update description +```powershell +Update-AzSphereProduct -ResourceGroupName joyer-test -CatalogName test2024 -Name product2024 -Description 2222 +``` + +```output +Description : 2222 +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024/products/product2024 +Name : product2024 +ProvisioningState : Succeeded +ResourceGroupName : joyer-test +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.AzureSphere/catalogs/products +``` + +This command updates product description. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CatalogInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: UpdateViaIdentityCatalogExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Description +Description of the product + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityCatalogExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Name of product. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityCatalogExpanded, UpdateViaJsonFilePath, UpdateViaJsonString +Aliases: ProductName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + +## NOTES + +## RELATED LINKS + diff --git a/src/Sphere/Sphere.Autorest/how-to.md b/src/Sphere/Sphere.Autorest/how-to.md new file mode 100644 index 000000000000..bd9685500486 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/how-to.md @@ -0,0 +1,58 @@ +# How-To +This document describes how to develop for `Az.Sphere`. + +## Building `Az.Sphere` +To build, run the `build-module.ps1` at the root of the module directory. This will generate the proxy script cmdlets that are the cmdlets being exported by this module. After the build completes, the proxy script cmdlets will be output to the `exports` folder. To read more about the proxy script cmdlets, look at the [README.md](exports/README.md) in the `exports` folder. + +## Creating custom cmdlets +To add cmdlets that were not generated by the REST specification, use the `custom` folder. This folder allows you to add handwritten `.ps1` and `.cs` files. Currently, we support using `.ps1` scripts as new cmdlets or as additional low-level variants (via `ParameterSet`), and `.cs` files as low-level (variants) cmdlets that the exported script cmdlets call. We do not support exporting any `.cs` (dll) cmdlets directly. To read more about custom cmdlets, look at the [README.md](custom/README.md) in the `custom` folder. + +## Generating documentation +To generate documentation, the process is now integrated into the `build-module.ps1` script. If you don't want to run this process as part of `build-module.ps1`, you can provide the `-NoDocs` switch. If you want to run documentation generation after the build process, you may still run the `generate-help.ps1` script. Overall, the process will look at the documentation comments in the generated and custom cmdlets and types, and create `.md` files into the `docs` folder. Additionally, this pulls in any examples from the `examples` folder and adds them to the generated help markdown documents. To read more about examples, look at the [README.md](examples/README.md) in the `examples` folder. To read more about documentation, look at the [README.md](docs/README.md) in the `docs` folder. + +## Testing `Az.Sphere` +To test the cmdlets, we use [Pester](https://github.com/pester/Pester). Tests scripts (`.ps1`) should be added to the `test` folder. To execute the Pester tests, run the `test-module.ps1` script. This will run all tests in `playback` mode within the `test` folder. To read more about testing cmdlets, look at the [README.md](examples/README.md) in the `examples` folder. + +## Packing `Az.Sphere` +To pack `Az.Sphere` for distribution, run the `pack-module.ps1` script. This will take the contents of multiple directories and certain root-folder files to create a `.nupkg`. The structure of the `.nupkg` is created so it can be loaded part of a [PSRepository](https://learn.microsoft.com/powershell/module/powershellget/register-psrepository). Additionally, this package is in a format for distribution to the [PSGallery](https://www.powershellgallery.com/). For signing an Azure module, please contact the [Azure PowerShell](https://github.com/Azure/azure-powershell) team. + +## Module Script Details +There are multiple scripts created for performing different actions for developing `Az.Sphere`. +- `build-module.ps1` + - Builds the module DLL (`./bin/Az.Sphere.private.dll`), creates the exported cmdlets and documentation, generates custom cmdlet test stubs and exported cmdlet example stubs, and updates `./Az.Sphere.psd1` with Azure profile information. + - **Parameters**: [`Switch` parameters] + - `-Run`: After building, creates an isolated PowerShell session and loads `Az.Sphere`. + - `-Test`: After building, runs the `Pester` tests defined in the `test` folder. + - `-Docs`: After building, generates the Markdown documents for the modules into the `docs` folder. + - `-Pack`: After building, packages the module into a `.nupkg`. + - `-Code`: After building, opens a VSCode window with the module's directory and runs (see `-Run`) the module. + - `-Release`: Builds the module in `Release` configuration (as opposed to `Debug` configuration). + - `-NoDocs`: Supresses writing the documentation markdown files as part of the cmdlet exporting process. + - `-Debugger`: Used when attaching the debugger in Visual Studio to the PowerShell session, and running the build process without recompiling the DLL. This suppresses running the script as an isolated process. +- `run-module.ps1` + - Creates an isolated PowerShell session and loads `Az.Sphere` into the session. + - Same as `-Run` in `build-module.ps1`. + - **Parameters**: [`Switch` parameters] + - `-Code`: Opens a VSCode window with the module's directory. + - Same as `-Code` in `build-module.ps1`. +- `generate-help.ps1` + - Generates the Markdown documents for the modules into the `docs` folder. + - Same as `-Docs` in `build-module.ps1`. +- `test-module.ps1` + - Runs the `Pester` tests defined in the `test` folder. + - Same as `-Test` in `build-module.ps1`. +- `pack-module.ps1` + - Packages the module into a `.nupkg` for distribution. + - Same as `-Pack` in `build-module.ps1`. +- `generate-help.ps1` + - Generates the Markdown documents for the modules into the `docs` folder. + - Same as `-Docs` in `build-module.ps1`. + - This process is now integrated into `build-module.ps1` automatically. To disable, use `-NoDocs` when running `build-module.ps1`. +- `export-surface.ps1` + - Generates Markdown documents for both the cmdlet surface and the model (class) surface of the module. + - These files are placed into the `resources` folder. + - Used for investigating the surface of your module. These are *not* documentation for distribution. +- `check-dependencies.ps1` + - Used in `run-module.ps1` and `test-module.ps1` to verify dependent modules are available to run those tasks. + - It will download local (within the module's directory structure) versions of those modules as needed. + - This script *does not* need to be ran by-hand. \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/internal/Az.Sphere.internal.psm1 b/src/Sphere/Sphere.Autorest/internal/Az.Sphere.internal.psm1 new file mode 100644 index 000000000000..bf36296417db --- /dev/null +++ b/src/Sphere/Sphere.Autorest/internal/Az.Sphere.internal.psm1 @@ -0,0 +1,38 @@ +# region Generated + # Load the private module dll + $null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.Sphere.private.dll') + + # Get the private module's instance + $instance = [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module]::Instance + + # Export nothing to clear implicit exports + Export-ModuleMember + + # Export proxy cmdlet scripts + $exportsPath = $PSScriptRoot + $directories = Get-ChildItem -Directory -Path $exportsPath + $profileDirectory = $null + if($instance.ProfileName) { + if(($directories | ForEach-Object { $_.Name }) -contains $instance.ProfileName) { + $profileDirectory = $directories | Where-Object { $_.Name -eq $instance.ProfileName } + } else { + # Don't export anything if the profile doesn't exist for the module + $exportsPath = $null + Write-Warning "Selected Azure profile '$($instance.ProfileName)' does not exist for module '$($instance.Name)'. No cmdlets were loaded." + } + } elseif(($directories | Measure-Object).Count -gt 0) { + # Load the last folder if no profile is selected + $profileDirectory = $directories | Select-Object -Last 1 + } + + if($profileDirectory) { + Write-Information "Loaded Azure profile '$($profileDirectory.Name)' for module '$($instance.Name)'" + $exportsPath = $profileDirectory.FullName + } + + if($exportsPath) { + Get-ChildItem -Path $exportsPath -Recurse -Include '*.ps1' -File | ForEach-Object { . $_.FullName } + $cmdletNames = Get-ScriptCmdlet -ScriptFolder $exportsPath + Export-ModuleMember -Function $cmdletNames -Alias (Get-ScriptCmdlet -ScriptFolder $exportsPath -AsAlias) + } +# endregion diff --git a/src/Sphere/Sphere.Autorest/internal/Get-AzSphereOperation.ps1 b/src/Sphere/Sphere.Autorest/internal/Get-AzSphereOperation.ps1 new file mode 100644 index 000000000000..ec79c93fad52 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/internal/Get-AzSphereOperation.ps1 @@ -0,0 +1,125 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +List the operations for the provider +.Description +List the operations for the provider +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperation +.Link +https://learn.microsoft.com/powershell/module/az.sphere/get-azsphereoperation +#> +function Get-AzSphereOperation { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperation])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $mapping = @{ + List = 'Az.Sphere.private\Get-AzSphereOperation_List'; + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} diff --git a/src/Sphere/Sphere.Autorest/internal/ProxyCmdletDefinitions.ps1 b/src/Sphere/Sphere.Autorest/internal/ProxyCmdletDefinitions.ps1 new file mode 100644 index 000000000000..54833e06efda --- /dev/null +++ b/src/Sphere/Sphere.Autorest/internal/ProxyCmdletDefinitions.ps1 @@ -0,0 +1,1293 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +List the operations for the provider +.Description +List the operations for the provider +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperation +.Link +https://learn.microsoft.com/powershell/module/az.sphere/get-azsphereoperation +#> +function Get-AzSphereOperation { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IOperation])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $mapping = @{ + List = 'Az.Sphere.private\Get-AzSphereOperation_List'; + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} + +<# +.Synopsis +Create a Catalog +.Description +Create a Catalog +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog +.Link +https://learn.microsoft.com/powershell/module/az.sphere/set-azspherecatalog +#> +function Set-AzSphereCatalog { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Alias('CatalogName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # The geo-location where the resource lives + ${Location}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $mapping = @{ + UpdateExpanded = 'Az.Sphere.private\Set-AzSphereCatalog_UpdateExpanded'; + UpdateViaJsonFilePath = 'Az.Sphere.private\Set-AzSphereCatalog_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.Sphere.private\Set-AzSphereCatalog_UpdateViaJsonString'; + } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} + +<# +.Synopsis +Create a Deployment. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. +.Description +Create a Deployment. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +DEPLOYEDIMAGE : Images deployed + [ImageId ]: Image ID + [PropertiesImage ]: Image as a UTF-8 encoded base 64 string on image create. This field contains the image URI on image reads. + [RegionalDataBoundary ]: Regional data boundary for an image +.Link +https://learn.microsoft.com/powershell/module/az.sphere/set-azspheredeployment +#> +function Set-AzSphereDeployment { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of device group. + ${DeviceGroupName}, + + [Parameter(Mandatory)] + [Alias('DeploymentName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Deployment name. + # Use .default for deployment creation and to get the current deployment for the associated device group. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of product. + ${ProductName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage[]] + # Images deployed + ${DeployedImage}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Deployment ID + ${DeploymentId}, + + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $mapping = @{ + UpdateExpanded = 'Az.Sphere.private\Set-AzSphereDeployment_UpdateExpanded'; + UpdateViaJsonFilePath = 'Az.Sphere.private\Set-AzSphereDeployment_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.Sphere.private\Set-AzSphereDeployment_UpdateViaJsonString'; + } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} + +<# +.Synopsis +Create a DeviceGroup. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. +.Description +Create a DeviceGroup. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup +.Link +https://learn.microsoft.com/powershell/module/az.sphere/set-azspheredevicegroup +#> +function Set-AzSphereDeviceGroup { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(Mandatory)] + [Alias('DeviceGroupName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of device group. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of product. + ${ProductName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Enabled", "Disabled")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Flag to define if the user allows for crash dump collection. + ${AllowCrashDumpsCollection}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Description of the device group. + ${Description}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Retail", "RetailEval")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Operating system feed type of the device group. + ${OSFeedType}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("None", "EU")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Regional data boundary for the device group. + ${RegionalDataBoundary}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("UpdateAll", "No3rdPartyAppUpdates")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Update policy of the device group. + ${UpdatePolicy}, + + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $mapping = @{ + UpdateExpanded = 'Az.Sphere.private\Set-AzSphereDeviceGroup_UpdateExpanded'; + UpdateViaJsonFilePath = 'Az.Sphere.private\Set-AzSphereDeviceGroup_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.Sphere.private\Set-AzSphereDeviceGroup_UpdateViaJsonString'; + } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} + +<# +.Synopsis +Create a Device. +Use '.unassigned' or '.default' for the device group and product names to claim a device to the catalog only. +.Description +Create a Device. +Use '.unassigned' or '.default' for the device group and product names to claim a device to the catalog only. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice +.Link +https://learn.microsoft.com/powershell/module/az.sphere/set-azspheredevice +#> +function Set-AzSphereDevice { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(Mandatory)] + [Alias('DeviceGroupName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of device group. + ${GroupName}, + + [Parameter(Mandatory)] + [Alias('DeviceName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Device name + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of product. + ${ProductName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Device ID + ${DeviceId}, + + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $mapping = @{ + UpdateExpanded = 'Az.Sphere.private\Set-AzSphereDevice_UpdateExpanded'; + UpdateViaJsonFilePath = 'Az.Sphere.private\Set-AzSphereDevice_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.Sphere.private\Set-AzSphereDevice_UpdateViaJsonString'; + } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} + +<# +.Synopsis +Create a Image +.Description +Create a Image +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage +.Link +https://learn.microsoft.com/powershell/module/az.sphere/set-azsphereimage +#> +function Set-AzSphereImage { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(Mandatory)] + [Alias('ImageName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Image name. + # Use an image GUID for GA versions of the API. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Image as a UTF-8 encoded base 64 string on image create. + # This field contains the image URI on image reads. + ${Image}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Image ID + ${ImageId}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("None", "EU")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Regional data boundary for an image + ${RegionalDataBoundary}, + + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $mapping = @{ + UpdateExpanded = 'Az.Sphere.private\Set-AzSphereImage_UpdateExpanded'; + UpdateViaJsonFilePath = 'Az.Sphere.private\Set-AzSphereImage_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.Sphere.private\Set-AzSphereImage_UpdateViaJsonString'; + } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} + +<# +.Synopsis +Create a Product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. +.Description +Create a Product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct +.Link +https://learn.microsoft.com/powershell/module/az.sphere/set-azsphereproduct +#> +function Set-AzSphereProduct { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(Mandatory)] + [Alias('ProductName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of product. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Description of the product + ${Description}, + + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $mapping = @{ + UpdateExpanded = 'Az.Sphere.private\Set-AzSphereProduct_UpdateExpanded'; + UpdateViaJsonFilePath = 'Az.Sphere.private\Set-AzSphereProduct_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.Sphere.private\Set-AzSphereProduct_UpdateViaJsonString'; + } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} diff --git a/src/Sphere/Sphere.Autorest/internal/README.md b/src/Sphere/Sphere.Autorest/internal/README.md new file mode 100644 index 000000000000..537270a69586 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/internal/README.md @@ -0,0 +1,14 @@ +# Internal +This directory contains a module to handle *internal only* cmdlets. Cmdlets that you **hide** in configuration are created here. For more information on hiding, see [cmdlet hiding](https://github.com/Azure/autorest.powershell/blob/main/docs/directives.md#cmdlet-hiding-exportation-suppression). The cmdlets in this directory are generated at **build-time**. Do not put any custom code, files, cmdlets, etc. into this directory. Please use `..\custom` for all custom implementation. + +## Info +- Modifiable: no +- Generated: all +- Committed: no +- Packaged: yes + +## Details +The `Az.Sphere.internal.psm1` file is generated to this folder. This module file handles the hidden cmdlets. These cmdlets will not be exported by `Az.Sphere`. Instead, this sub-module is imported by the `..\custom\Az.Sphere.custom.psm1` module, allowing you to use hidden cmdlets in your custom, exposed cmdlets. To call these cmdlets in your custom scripts, simply use [module-qualified calls](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_command_precedence?view=powershell-6#qualified-names). For example, `Az.Sphere.internal\Get-Example` would call an internal cmdlet named `Get-Example`. + +## Purpose +This allows you to include REST specifications for services that you *do not wish to expose from your module*, but simply want to call within custom cmdlets. For example, if you want to make a custom cmdlet that uses `Storage` services, you could include a simplified `Storage` REST specification that has only the operations you need. When you run the generator and build this module, note the generated `Storage` cmdlets. Then, in your readme configuration, use [cmdlet hiding](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md#cmdlet-hiding-exportation-suppression) on the `Storage` cmdlets and they will *only be exposed to the custom cmdlets* you want to write, and not be exported as part of `Az.Sphere`. diff --git a/src/Sphere/Sphere.Autorest/internal/Set-AzSphereCatalog.ps1 b/src/Sphere/Sphere.Autorest/internal/Set-AzSphereCatalog.ps1 new file mode 100644 index 000000000000..fea2f1754e0e --- /dev/null +++ b/src/Sphere/Sphere.Autorest/internal/Set-AzSphereCatalog.ps1 @@ -0,0 +1,194 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create a Catalog +.Description +Create a Catalog +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog +.Link +https://learn.microsoft.com/powershell/module/az.sphere/set-azspherecatalog +#> +function Set-AzSphereCatalog { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Alias('CatalogName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # The geo-location where the resource lives + ${Location}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $mapping = @{ + UpdateExpanded = 'Az.Sphere.private\Set-AzSphereCatalog_UpdateExpanded'; + UpdateViaJsonFilePath = 'Az.Sphere.private\Set-AzSphereCatalog_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.Sphere.private\Set-AzSphereCatalog_UpdateViaJsonString'; + } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} diff --git a/src/Sphere/Sphere.Autorest/internal/Set-AzSphereDeployment.ps1 b/src/Sphere/Sphere.Autorest/internal/Set-AzSphereDeployment.ps1 new file mode 100644 index 000000000000..85368a05dd62 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/internal/Set-AzSphereDeployment.ps1 @@ -0,0 +1,224 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create a Deployment. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. +.Description +Create a Deployment. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +DEPLOYEDIMAGE : Images deployed + [ImageId ]: Image ID + [PropertiesImage ]: Image as a UTF-8 encoded base 64 string on image create. This field contains the image URI on image reads. + [RegionalDataBoundary ]: Regional data boundary for an image +.Link +https://learn.microsoft.com/powershell/module/az.sphere/set-azspheredeployment +#> +function Set-AzSphereDeployment { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of device group. + ${DeviceGroupName}, + + [Parameter(Mandatory)] + [Alias('DeploymentName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Deployment name. + # Use .default for deployment creation and to get the current deployment for the associated device group. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of product. + ${ProductName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage[]] + # Images deployed + ${DeployedImage}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Deployment ID + ${DeploymentId}, + + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $mapping = @{ + UpdateExpanded = 'Az.Sphere.private\Set-AzSphereDeployment_UpdateExpanded'; + UpdateViaJsonFilePath = 'Az.Sphere.private\Set-AzSphereDeployment_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.Sphere.private\Set-AzSphereDeployment_UpdateViaJsonString'; + } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} diff --git a/src/Sphere/Sphere.Autorest/internal/Set-AzSphereDevice.ps1 b/src/Sphere/Sphere.Autorest/internal/Set-AzSphereDevice.ps1 new file mode 100644 index 000000000000..8b90176df7d1 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/internal/Set-AzSphereDevice.ps1 @@ -0,0 +1,208 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create a Device. +Use '.unassigned' or '.default' for the device group and product names to claim a device to the catalog only. +.Description +Create a Device. +Use '.unassigned' or '.default' for the device group and product names to claim a device to the catalog only. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice +.Link +https://learn.microsoft.com/powershell/module/az.sphere/set-azspheredevice +#> +function Set-AzSphereDevice { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(Mandatory)] + [Alias('DeviceGroupName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of device group. + ${GroupName}, + + [Parameter(Mandatory)] + [Alias('DeviceName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Device name + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of product. + ${ProductName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Device ID + ${DeviceId}, + + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $mapping = @{ + UpdateExpanded = 'Az.Sphere.private\Set-AzSphereDevice_UpdateExpanded'; + UpdateViaJsonFilePath = 'Az.Sphere.private\Set-AzSphereDevice_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.Sphere.private\Set-AzSphereDevice_UpdateViaJsonString'; + } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} diff --git a/src/Sphere/Sphere.Autorest/internal/Set-AzSphereDeviceGroup.ps1 b/src/Sphere/Sphere.Autorest/internal/Set-AzSphereDeviceGroup.ps1 new file mode 100644 index 000000000000..e68769b3d2bf --- /dev/null +++ b/src/Sphere/Sphere.Autorest/internal/Set-AzSphereDeviceGroup.ps1 @@ -0,0 +1,229 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create a DeviceGroup. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. +.Description +Create a DeviceGroup. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup +.Link +https://learn.microsoft.com/powershell/module/az.sphere/set-azspheredevicegroup +#> +function Set-AzSphereDeviceGroup { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(Mandatory)] + [Alias('DeviceGroupName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of device group. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of product. + ${ProductName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Enabled", "Disabled")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Flag to define if the user allows for crash dump collection. + ${AllowCrashDumpsCollection}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Description of the device group. + ${Description}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("Retail", "RetailEval")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Operating system feed type of the device group. + ${OSFeedType}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("None", "EU")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Regional data boundary for the device group. + ${RegionalDataBoundary}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("UpdateAll", "No3rdPartyAppUpdates")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Update policy of the device group. + ${UpdatePolicy}, + + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $mapping = @{ + UpdateExpanded = 'Az.Sphere.private\Set-AzSphereDeviceGroup_UpdateExpanded'; + UpdateViaJsonFilePath = 'Az.Sphere.private\Set-AzSphereDeviceGroup_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.Sphere.private\Set-AzSphereDeviceGroup_UpdateViaJsonString'; + } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} diff --git a/src/Sphere/Sphere.Autorest/internal/Set-AzSphereImage.ps1 b/src/Sphere/Sphere.Autorest/internal/Set-AzSphereImage.ps1 new file mode 100644 index 000000000000..f791a3f81774 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/internal/Set-AzSphereImage.ps1 @@ -0,0 +1,208 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create a Image +.Description +Create a Image +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage +.Link +https://learn.microsoft.com/powershell/module/az.sphere/set-azsphereimage +#> +function Set-AzSphereImage { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(Mandatory)] + [Alias('ImageName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Image name. + # Use an image GUID for GA versions of the API. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Image as a UTF-8 encoded base 64 string on image create. + # This field contains the image URI on image reads. + ${Image}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Image ID + ${ImageId}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.PSArgumentCompleterAttribute("None", "EU")] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Regional data boundary for an image + ${RegionalDataBoundary}, + + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $mapping = @{ + UpdateExpanded = 'Az.Sphere.private\Set-AzSphereImage_UpdateExpanded'; + UpdateViaJsonFilePath = 'Az.Sphere.private\Set-AzSphereImage_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.Sphere.private\Set-AzSphereImage_UpdateViaJsonString'; + } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} diff --git a/src/Sphere/Sphere.Autorest/internal/Set-AzSphereProduct.ps1 b/src/Sphere/Sphere.Autorest/internal/Set-AzSphereProduct.ps1 new file mode 100644 index 000000000000..4f07ecf9a589 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/internal/Set-AzSphereProduct.ps1 @@ -0,0 +1,195 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create a Product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. +.Description +Create a Product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct +.Link +https://learn.microsoft.com/powershell/module/az.sphere/set-azsphereproduct +#> +function Set-AzSphereProduct { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of catalog + ${CatalogName}, + + [Parameter(Mandatory)] + [Alias('ProductName')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # Name of product. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Description of the product + ${Description}, + + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $mapping = @{ + UpdateExpanded = 'Az.Sphere.private\Set-AzSphereProduct_UpdateExpanded'; + UpdateViaJsonFilePath = 'Az.Sphere.private\Set-AzSphereProduct_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.Sphere.private\Set-AzSphereProduct_UpdateViaJsonString'; + } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Sphere.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} diff --git a/src/Sphere/Sphere.Autorest/pack-module.ps1 b/src/Sphere/Sphere.Autorest/pack-module.ps1 new file mode 100644 index 000000000000..2f30ca3fffa0 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/pack-module.ps1 @@ -0,0 +1,17 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- +Write-Host -ForegroundColor Green 'Packing module...' +dotnet pack $PSScriptRoot --no-build /nologo +Write-Host -ForegroundColor Green '-------------Done-------------' \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/run-module.ps1 b/src/Sphere/Sphere.Autorest/run-module.ps1 new file mode 100644 index 000000000000..f8a461702f72 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/run-module.ps1 @@ -0,0 +1,62 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- +param([switch]$NotIsolated, [switch]$Code) +$ErrorActionPreference = 'Stop' + +if(-not $NotIsolated) { + Write-Host -ForegroundColor Green 'Creating isolated process...' + $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path + & "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated + return +} + +$isAzure = $true +if($isAzure) { + . (Join-Path $PSScriptRoot 'check-dependencies.ps1') -NotIsolated -Accounts + # Load the latest version of Az.Accounts installed + Import-Module -Name Az.Accounts -RequiredVersion (Get-Module -Name Az.Accounts -ListAvailable | Sort-Object -Property Version -Descending)[0].Version +} + +$localModulesPath = Join-Path $PSScriptRoot 'generated\modules' +if(Test-Path -Path $localModulesPath) { + $env:PSModulePath = "$localModulesPath$([IO.Path]::PathSeparator)$env:PSModulePath" +} + +$modulePsd1 = Get-Item -Path (Join-Path $PSScriptRoot './Az.Sphere.psd1') +$modulePath = $modulePsd1.FullName +$moduleName = $modulePsd1.BaseName + +function Prompt { + Write-Host -NoNewline -ForegroundColor Green "PS $(Get-Location)" + Write-Host -NoNewline -ForegroundColor Gray ' [' + Write-Host -NoNewline -ForegroundColor White -BackgroundColor DarkCyan $moduleName + ']> ' +} + +# where we would find the launch.json file +$vscodeDirectory = New-Item -ItemType Directory -Force -Path (Join-Path $PSScriptRoot '.vscode') +$launchJson = Join-Path $vscodeDirectory 'launch.json' + +# if there is a launch.json file, let's just assume -Code, and update the file +if(($Code) -or (test-Path $launchJson) ) { + $launchContent = '{ "version": "0.2.0", "configurations":[{ "name":"Attach to PowerShell", "type":"coreclr", "request":"attach", "processId":"' + ([System.Diagnostics.Process]::GetCurrentProcess().Id) + '", "justMyCode":false }] }' + Set-Content -Path $launchJson -Value $launchContent + if($Code) { + # only launch vscode if they say -code + code $PSScriptRoot + } +} + +Import-Module -Name $modulePath \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/test-module.ps1 b/src/Sphere/Sphere.Autorest/test-module.ps1 new file mode 100644 index 000000000000..44e8b630440a --- /dev/null +++ b/src/Sphere/Sphere.Autorest/test-module.ps1 @@ -0,0 +1,98 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- +param([switch]$NotIsolated, [switch]$Live, [switch]$Record, [switch]$Playback, [switch]$RegenerateSupportModule, [switch]$UsePreviousConfigForRecord, [string[]]$TestName) +$ErrorActionPreference = 'Stop' + +if(-not $NotIsolated) +{ + Write-Host -ForegroundColor Green 'Creating isolated process...' + if ($PSBoundParameters.ContainsKey("TestName")) { + $PSBoundParameters["TestName"] = $PSBoundParameters["TestName"] -join "," + } + $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path + & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated + return +} + +# This is a workaround, since for string array parameter, pwsh -File will only take the first element +if ($PSBoundParameters.ContainsKey("TestName") -and ($TestName.count -eq 1) -and ($TestName[0].Contains(','))) { + $TestName = $TestName[0].Split(",") +} + +$ProgressPreference = 'SilentlyContinue' +$baseName = $PSScriptRoot.BaseName +$requireResourceModule = (($baseName -ne "Resources") -and ($Record.IsPresent -or $Live.IsPresent)) +. (Join-Path $PSScriptRoot 'check-dependencies.ps1') -NotIsolated -Accounts:$false -Pester -Resources:$requireResourceModule -RegenerateSupportModule:$RegenerateSupportModule +. ("$PSScriptRoot\test\utils.ps1") + +if ($requireResourceModule) +{ + # Load the latest Az.Accounts installed + Import-Module -Name Az.Accounts -RequiredVersion (Get-Module -Name Az.Accounts -ListAvailable | Sort-Object -Property Version -Descending)[0].Version + $resourceModulePSD = Get-Item -Path (Join-Path $HOME '.PSSharedModules\Resources\Az.Resources.TestSupport.psd1') + Import-Module -Name $resourceModulePSD.FullName +} + +$localModulesPath = Join-Path $PSScriptRoot 'generated\modules' +if(Test-Path -Path $localModulesPath) +{ + $env:PSModulePath = "$localModulesPath$([IO.Path]::PathSeparator)$env:PSModulePath" +} + +$modulePsd1 = Get-Item -Path (Join-Path $PSScriptRoot './Az.Sphere.psd1') +$modulePath = $modulePsd1.FullName +$moduleName = $modulePsd1.BaseName + +Import-Module -Name Pester +Import-Module -Name $modulePath + +$TestMode = 'playback' +$ExcludeTag = @("LiveOnly") +if($Live) +{ + $TestMode = 'live' + $ExcludeTag = @() +} +if($Record) +{ + $TestMode = 'record' +} +try +{ + if ($TestMode -ne 'playback') + { + setupEnv + } else { + $env:AzPSAutorestTestPlaybackMode = $true + } + $testFolder = Join-Path $PSScriptRoot 'test' + if ($null -ne $TestName) + { + Invoke-Pester -Script @{ Path = $testFolder } -TestName $TestName -ExcludeTag $ExcludeTag -EnableExit -OutputFile (Join-Path $testFolder "$moduleName-TestResults.xml") + } else { + Invoke-Pester -Script @{ Path = $testFolder } -ExcludeTag $ExcludeTag -EnableExit -OutputFile (Join-Path $testFolder "$moduleName-TestResults.xml") + } +} Finally +{ + if ($TestMode -ne 'playback') + { + cleanupEnv + } + else { + $env:AzPSAutorestTestPlaybackMode = '' + } +} + +Write-Host -ForegroundColor Green '-------------Done-------------' diff --git a/src/Sphere/Sphere.Autorest/test/AzSphereDeviceScenario.Recording.json b/src/Sphere/Sphere.Autorest/test/AzSphereDeviceScenario.Recording.json new file mode 100644 index 000000000000..a283d312e94c --- /dev/null +++ b/src/Sphere/Sphere.Autorest/test/AzSphereDeviceScenario.Recording.json @@ -0,0 +1,876 @@ +{ + "AzSphereDeviceScenario+[NoContext]+CreateProduct+$PUT+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1?api-version=2024-04-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1?api-version=2024-04-01", + "Content": "{\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "4" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "2c8ab3da-74a8-4b54-9acb-8e7c8697bb0d" ], + "x-ms-request-id": [ "5d18b94f-2da6-4324-88fa-89e5986f7f7d" ], + "x-ms-correlation-request-id": [ "d537770b-3cb1-41aa-af0f-b30fec8ad5f8" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T082909Z:d537770b-3cb1-41aa-af0f-b30fec8ad5f8" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 07D122748EF3464899AF2DBD43FC23E9 Ref B: MAA201060515051 Ref C: 2024-04-01T08:28:59Z" ], + "Date": [ "Mon, 01 Apr 2024 08:29:08 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "527" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1\",\"name\":\"Product1\",\"type\":\"microsoft.azuresphere/catalogs/products\",\"systemData\":{\"createdBy\":\"v-jiaji@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-01T08:29:00.3694924Z\",\"lastModifiedBy\":\"v-jiaji@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-04-01T08:29:00.3694924Z\"},\"properties\":{\"description\":null,\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereDeviceScenario+[NoContext]+CreateProduct+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1?api-version=2024-04-01+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "4" ], + "x-ms-client-request-id": [ "c165e3a5-c2af-4888-ad64-0d5bb368f466" ], + "CommandName": [ "New-AzSphereProduct" ], + "FullCommandName": [ "New-AzSphereProduct_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "be30dd29-6b70-4bb8-922c-3cc17ea1086f" ], + "x-ms-request-id": [ "be3fb2fa-3058-4b3c-8f59-0e41c6d78abe" ], + "x-ms-correlation-request-id": [ "de5f9c99-9acc-41ac-b22a-f96bafab7beb" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T082943Z:de5f9c99-9acc-41ac-b22a-f96bafab7beb" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: B3F571693E5A4EA9AFAEC33B428E4D3E Ref B: MAA201060515051 Ref C: 2024-04-01T08:29:39Z" ], + "Date": [ "Mon, 01 Apr 2024 08:29:42 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "293" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1\",\"name\":\"Product1\",\"type\":\"Microsoft.AzureSphere/catalogs/products\",\"properties\":{\"description\":null,\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereDeviceScenario+[NoContext]+CreateProduct+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1?api-version=2024-04-01+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "5" ], + "x-ms-client-request-id": [ "c165e3a5-c2af-4888-ad64-0d5bb368f466" ], + "CommandName": [ "New-AzSphereProduct" ], + "FullCommandName": [ "New-AzSphereProduct_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "a963fc55-3e6a-4640-81db-56009c81024a" ], + "x-ms-request-id": [ "c2cddcf2-0a7c-452f-9422-2052f30afa5f" ], + "x-ms-correlation-request-id": [ "1fea06d7-2188-48d4-b536-34e9c42ed3fe" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T082944Z:1fea06d7-2188-48d4-b536-34e9c42ed3fe" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 08A814A4B2194377B9C98F7BC9620F33 Ref B: MAA201060515051 Ref C: 2024-04-01T08:29:43Z" ], + "Date": [ "Mon, 01 Apr 2024 08:29:43 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "293" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1\",\"name\":\"Product1\",\"type\":\"Microsoft.AzureSphere/catalogs/products\",\"properties\":{\"description\":null,\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereDeviceScenario+[NoContext]+CreateProduct+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1?api-version=2024-04-01+4": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "6" ], + "x-ms-client-request-id": [ "676cdc22-4f40-498b-9d9f-9c3c160dc269" ], + "CommandName": [ "Get-AzSphereProduct" ], + "FullCommandName": [ "Get-AzSphereProduct_GetViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "cc00417d-a0cb-4e0e-a444-0e22f05077e7" ], + "x-ms-request-id": [ "f0aae51f-5f55-4980-9962-a1a3e4b15085" ], + "x-ms-correlation-request-id": [ "e924a9d3-048b-4a81-a043-718f4291351c" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T082944Z:e924a9d3-048b-4a81-a043-718f4291351c" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: AE343E6CCFC4469B901215FF7FB9730B Ref B: MAA201060515051 Ref C: 2024-04-01T08:29:44Z" ], + "Date": [ "Mon, 01 Apr 2024 08:29:44 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "293" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1\",\"name\":\"Product1\",\"type\":\"Microsoft.AzureSphere/catalogs/products\",\"properties\":{\"description\":null,\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereDeviceScenario+[NoContext]+CreateProduct+$PUT+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2?api-version=2024-04-01+5": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2?api-version=2024-04-01", + "Content": "{\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "4" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "481465ef-22b9-427e-9f12-411e8df1356c" ], + "x-ms-request-id": [ "1e6a2662-e36f-41ad-b703-c4b5168f8840" ], + "x-ms-correlation-request-id": [ "ee8de47a-499a-4acd-a4fd-a5c461541709" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T082950Z:ee8de47a-499a-4acd-a4fd-a5c461541709" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 4FD2F5B0C9DB455F9547348C03FE6242 Ref B: MAA201060515051 Ref C: 2024-04-01T08:29:45Z" ], + "Date": [ "Mon, 01 Apr 2024 08:29:49 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "527" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2\",\"name\":\"Product2\",\"type\":\"microsoft.azuresphere/catalogs/products\",\"systemData\":{\"createdBy\":\"v-jiaji@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-01T08:29:45.7122465Z\",\"lastModifiedBy\":\"v-jiaji@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-04-01T08:29:45.7122465Z\"},\"properties\":{\"description\":null,\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereDeviceScenario+[NoContext]+CreateProduct+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2?api-version=2024-04-01+6": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "8" ], + "x-ms-client-request-id": [ "2b67abf5-6ebc-4efe-835d-deb818b3d52a" ], + "CommandName": [ "New-AzSphereProduct" ], + "FullCommandName": [ "New-AzSphereProduct_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "0880aa5d-10eb-4be9-9a8b-cb8dbdfdb7c8" ], + "x-ms-request-id": [ "4bf30b67-5dd6-4759-8303-b8c1912050e8" ], + "x-ms-correlation-request-id": [ "9b032a47-2917-4698-ad42-fa5662995ebc" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T083022Z:9b032a47-2917-4698-ad42-fa5662995ebc" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: C4734812D0594CE092E7C34B2CCC0C51 Ref B: MAA201060515051 Ref C: 2024-04-01T08:30:20Z" ], + "Date": [ "Mon, 01 Apr 2024 08:30:22 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "293" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2\",\"name\":\"Product2\",\"type\":\"Microsoft.AzureSphere/catalogs/products\",\"properties\":{\"description\":null,\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereDeviceScenario+[NoContext]+CreateProduct+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2?api-version=2024-04-01+7": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "9" ], + "x-ms-client-request-id": [ "2b67abf5-6ebc-4efe-835d-deb818b3d52a" ], + "CommandName": [ "New-AzSphereProduct" ], + "FullCommandName": [ "New-AzSphereProduct_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "dfaa8db3-a475-4521-9fe8-4a9b98aa02b1" ], + "x-ms-request-id": [ "8636a977-cb7e-4e3b-8f01-5b73f4b12f74" ], + "x-ms-correlation-request-id": [ "d5bd966b-b068-403c-bbff-6edf35167e26" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T083025Z:d5bd966b-b068-403c-bbff-6edf35167e26" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: F9DCC968BE8C4EBDB8B8393F05DFFCF4 Ref B: MAA201060515051 Ref C: 2024-04-01T08:30:22Z" ], + "Date": [ "Mon, 01 Apr 2024 08:30:24 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "293" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2\",\"name\":\"Product2\",\"type\":\"Microsoft.AzureSphere/catalogs/products\",\"properties\":{\"description\":null,\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereDeviceScenario+[NoContext]+ListProduct+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products?api-version=2024-04-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "10" ], + "x-ms-client-request-id": [ "f30c5362-fd32-4c24-98aa-375d026a61da" ], + "CommandName": [ "Get-AzSphereProduct" ], + "FullCommandName": [ "Get-AzSphereProduct_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "92f6d190-0bc3-44bf-b224-6de97824cf97" ], + "x-ms-request-id": [ "c890f23d-3e1f-4d89-a6da-e24ba2ae5c57" ], + "x-ms-correlation-request-id": [ "5ccd401b-01c3-420e-9325-c6f39dcb9126" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T083028Z:5ccd401b-01c3-420e-9325-c6f39dcb9126" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 513AA4873F79496B86478B6B424CFFD9 Ref B: MAA201060515051 Ref C: 2024-04-01T08:30:25Z" ], + "Date": [ "Mon, 01 Apr 2024 08:30:27 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "883" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/test\",\"name\":\"test\",\"type\":\"Microsoft.AzureSphere/catalogs/products\",\"properties\":{\"description\":\"test\",\"provisioningState\":\"Succeeded\"}},{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1\",\"name\":\"Product1\",\"type\":\"Microsoft.AzureSphere/catalogs/products\",\"properties\":{\"description\":\"\",\"provisioningState\":\"Succeeded\"}},{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2\",\"name\":\"Product2\",\"type\":\"Microsoft.AzureSphere/catalogs/products\",\"properties\":{\"description\":\"\",\"provisioningState\":\"Succeeded\"}}]}", + "isContentBase64": false + } + }, + "AzSphereDeviceScenario+[NoContext]+GetProduct+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1?api-version=2024-04-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "11" ], + "x-ms-client-request-id": [ "1fd81787-b891-403b-a9e8-c1832f9ec213" ], + "CommandName": [ "Get-AzSphereProduct" ], + "FullCommandName": [ "Get-AzSphereProduct_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "8bc4b50e-22ee-4269-9a6e-8f94902f5528" ], + "x-ms-request-id": [ "eae2fdf7-9a98-4529-b837-7d58d762036c" ], + "x-ms-correlation-request-id": [ "f1bd7d56-df16-4b58-842e-1a0f1f1419db" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T083033Z:f1bd7d56-df16-4b58-842e-1a0f1f1419db" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 08C6D21ED4C54C318181F92F1921F314 Ref B: MAA201060515051 Ref C: 2024-04-01T08:30:28Z" ], + "Date": [ "Mon, 01 Apr 2024 08:30:33 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "293" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1\",\"name\":\"Product1\",\"type\":\"Microsoft.AzureSphere/catalogs/products\",\"properties\":{\"description\":null,\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereDeviceScenario+[NoContext]+GenerateDefaultAndListDeviceGroup+$POST+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/generateDefaultDeviceGroups?api-version=2024-04-01+1": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/generateDefaultDeviceGroups?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "12" ], + "x-ms-client-request-id": [ "c5ff986b-bb21-4a53-9724-3300a9269a68" ], + "CommandName": [ "New-AzSphereProductDefaultDeviceGroup" ], + "FullCommandName": [ "New-AzSphereProductDefaultDeviceGroup_Generate" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "b86b1efd-8be9-461f-96c2-4b8df9db94cb" ], + "x-ms-request-id": [ "db191f89-9929-48c9-a6e2-b6a354b52d08" ], + "x-ms-correlation-request-id": [ "0cbc4dc4-e071-48dd-b4d1-acf16c5c54b7" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T083036Z:0cbc4dc4-e071-48dd-b4d1-acf16c5c54b7" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 3257B834FF714A92A66B5B8F799A6DB4 Ref B: MAA201060515051 Ref C: 2024-04-01T08:30:34Z" ], + "Date": [ "Mon, 01 Apr 2024 08:30:35 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "2727" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"properties\":{\"description\":\"Default development device group\",\"osFeedType\":\"Retail\",\"updatePolicy\":\"No3rdPartyAppUpdates\",\"allowCrashDumpsCollection\":\"Disabled\",\"regionalDataBoundary\":\"None\",\"hasDeployment\":false,\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Development\",\"name\":\"Development\",\"type\":\"Microsoft.AzureSphere/catalogs/products/deviceGroups\",\"systemData\":null},{\"properties\":{\"description\":\"Default test device group\",\"osFeedType\":\"Retail\",\"updatePolicy\":\"UpdateAll\",\"allowCrashDumpsCollection\":\"Disabled\",\"regionalDataBoundary\":\"None\",\"hasDeployment\":false,\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Field Test\",\"name\":\"Field Test\",\"type\":\"Microsoft.AzureSphere/catalogs/products/deviceGroups\",\"systemData\":null},{\"properties\":{\"description\":\"Default production device group\",\"osFeedType\":\"Retail\",\"updatePolicy\":\"UpdateAll\",\"allowCrashDumpsCollection\":\"Disabled\",\"regionalDataBoundary\":\"None\",\"hasDeployment\":false,\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Production\",\"name\":\"Production\",\"type\":\"Microsoft.AzureSphere/catalogs/products/deviceGroups\",\"systemData\":null},{\"properties\":{\"description\":\"Default Production OS Evaluation device group\",\"osFeedType\":\"RetailEval\",\"updatePolicy\":\"UpdateAll\",\"allowCrashDumpsCollection\":\"Disabled\",\"regionalDataBoundary\":\"None\",\"hasDeployment\":false,\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Production OS Evaluation\",\"name\":\"Production OS Evaluation\",\"type\":\"Microsoft.AzureSphere/catalogs/products/deviceGroups\",\"systemData\":null},{\"properties\":{\"description\":\"Default Field Test OS Evaluation device group\",\"osFeedType\":\"RetailEval\",\"updatePolicy\":\"UpdateAll\",\"allowCrashDumpsCollection\":\"Disabled\",\"regionalDataBoundary\":\"None\",\"hasDeployment\":false,\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Field Test OS Evaluation\",\"name\":\"Field Test OS Evaluation\",\"type\":\"Microsoft.AzureSphere/catalogs/products/deviceGroups\",\"systemData\":null}],\"nextLink\":null}", + "isContentBase64": false + } + }, + "AzSphereDeviceScenario+[NoContext]+GenerateDefaultAndListDeviceGroup+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups?api-version=2024-04-01+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "13" ], + "x-ms-client-request-id": [ "9d781565-3451-440f-a85d-1372c6b0f78a" ], + "CommandName": [ "Get-AzSphereDeviceGroup" ], + "FullCommandName": [ "Get-AzSphereDeviceGroup_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "29ebd3ec-ebbd-40b6-b8ab-f0229d304436" ], + "x-ms-request-id": [ "9590e4db-10e9-4c7a-8215-27d53eea4919" ], + "x-ms-correlation-request-id": [ "e3e85a88-71b1-40ea-b5be-6c9d57a27436" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T083038Z:e3e85a88-71b1-40ea-b5be-6c9d57a27436" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 0C70E603D9954083BBA068F3513966AB Ref B: MAA201060515051 Ref C: 2024-04-01T08:30:36Z" ], + "Date": [ "Mon, 01 Apr 2024 08:30:38 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "2621" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Development\",\"name\":\"Development\",\"type\":\"Microsoft.AzureSphere/catalogs/products/deviceGroups\",\"properties\":{\"description\":\"Default development device group\",\"osFeedType\":\"Retail\",\"updatePolicy\":\"No3rdPartyAppUpdates\",\"allowCrashDumpsCollection\":\"Disabled\",\"regionalDataBoundary\":\"None\",\"hasDeployment\":false,\"provisioningState\":\"Succeeded\"}},{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Field Test\",\"name\":\"Field Test\",\"type\":\"Microsoft.AzureSphere/catalogs/products/deviceGroups\",\"properties\":{\"description\":\"Default test device group\",\"osFeedType\":\"Retail\",\"updatePolicy\":\"UpdateAll\",\"allowCrashDumpsCollection\":\"Disabled\",\"regionalDataBoundary\":\"None\",\"hasDeployment\":false,\"provisioningState\":\"Succeeded\"}},{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Production\",\"name\":\"Production\",\"type\":\"Microsoft.AzureSphere/catalogs/products/deviceGroups\",\"properties\":{\"description\":\"Default production device group\",\"osFeedType\":\"Retail\",\"updatePolicy\":\"UpdateAll\",\"allowCrashDumpsCollection\":\"Disabled\",\"regionalDataBoundary\":\"None\",\"hasDeployment\":false,\"provisioningState\":\"Succeeded\"}},{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Production OS Evaluation\",\"name\":\"Production OS Evaluation\",\"type\":\"Microsoft.AzureSphere/catalogs/products/deviceGroups\",\"properties\":{\"description\":\"Default Production OS Evaluation device group\",\"osFeedType\":\"RetailEval\",\"updatePolicy\":\"UpdateAll\",\"allowCrashDumpsCollection\":\"Disabled\",\"regionalDataBoundary\":\"None\",\"hasDeployment\":false,\"provisioningState\":\"Succeeded\"}},{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Field Test OS Evaluation\",\"name\":\"Field Test OS Evaluation\",\"type\":\"Microsoft.AzureSphere/catalogs/products/deviceGroups\",\"properties\":{\"description\":\"Default Field Test OS Evaluation device group\",\"osFeedType\":\"RetailEval\",\"updatePolicy\":\"UpdateAll\",\"allowCrashDumpsCollection\":\"Disabled\",\"regionalDataBoundary\":\"None\",\"hasDeployment\":false,\"provisioningState\":\"Succeeded\"}}]}", + "isContentBase64": false + } + }, + "AzSphereDeviceScenario+[NoContext]+ListGroupInCatalog+$POST+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/listDeviceGroups?api-version=2024-04-01+1": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/listDeviceGroups?api-version=2024-04-01", + "Content": "{\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "4" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "f1fb90dc-7c56-42f3-841d-1e890330563c" ], + "x-ms-request-id": [ "8ac7e0c2-59e5-4111-9212-c5da6420d86d" ], + "x-ms-correlation-request-id": [ "30b44e9f-53b9-4c99-bd8d-7306f19f7a40" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T083042Z:30b44e9f-53b9-4c99-bd8d-7306f19f7a40" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 3252ABB322BA41218034C38211B413A5 Ref B: MAA201060515051 Ref C: 2024-04-01T08:30:38Z" ], + "Date": [ "Mon, 01 Apr 2024 08:30:41 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "3204" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"properties\":{\"description\":\"test\",\"osFeedType\":\"Retail\",\"updatePolicy\":\"UpdateAll\",\"allowCrashDumpsCollection\":\"Disabled\",\"regionalDataBoundary\":\"None\",\"hasDeployment\":false,\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/test/deviceGroups/test\",\"name\":\"test\",\"type\":\"Microsoft.AzureSphere/catalogs/products/deviceGroups\",\"systemData\":null},{\"properties\":{\"description\":\"Default development device group\",\"osFeedType\":\"Retail\",\"updatePolicy\":\"No3rdPartyAppUpdates\",\"allowCrashDumpsCollection\":\"Disabled\",\"regionalDataBoundary\":\"None\",\"hasDeployment\":false,\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Development\",\"name\":\"Development\",\"type\":\"Microsoft.AzureSphere/catalogs/products/deviceGroups\",\"systemData\":null},{\"properties\":{\"description\":\"Default test device group\",\"osFeedType\":\"Retail\",\"updatePolicy\":\"UpdateAll\",\"allowCrashDumpsCollection\":\"Disabled\",\"regionalDataBoundary\":\"None\",\"hasDeployment\":false,\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Field Test\",\"name\":\"Field Test\",\"type\":\"Microsoft.AzureSphere/catalogs/products/deviceGroups\",\"systemData\":null},{\"properties\":{\"description\":\"Default production device group\",\"osFeedType\":\"Retail\",\"updatePolicy\":\"UpdateAll\",\"allowCrashDumpsCollection\":\"Disabled\",\"regionalDataBoundary\":\"None\",\"hasDeployment\":false,\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Production\",\"name\":\"Production\",\"type\":\"Microsoft.AzureSphere/catalogs/products/deviceGroups\",\"systemData\":null},{\"properties\":{\"description\":\"Default Production OS Evaluation device group\",\"osFeedType\":\"RetailEval\",\"updatePolicy\":\"UpdateAll\",\"allowCrashDumpsCollection\":\"Disabled\",\"regionalDataBoundary\":\"None\",\"hasDeployment\":false,\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Production OS Evaluation\",\"name\":\"Production OS Evaluation\",\"type\":\"Microsoft.AzureSphere/catalogs/products/deviceGroups\",\"systemData\":null},{\"properties\":{\"description\":\"Default Field Test OS Evaluation device group\",\"osFeedType\":\"RetailEval\",\"updatePolicy\":\"UpdateAll\",\"allowCrashDumpsCollection\":\"Disabled\",\"regionalDataBoundary\":\"None\",\"hasDeployment\":false,\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Field Test OS Evaluation\",\"name\":\"Field Test OS Evaluation\",\"type\":\"Microsoft.AzureSphere/catalogs/products/deviceGroups\",\"systemData\":null}],\"nextLink\":null}", + "isContentBase64": false + } + }, + "AzSphereDeviceScenario+[NoContext]+GetDevDeviceGroup+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Development?api-version=2024-04-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Development?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "15" ], + "x-ms-client-request-id": [ "9fbda02a-db1e-44c8-9dc6-11a57b8d750b" ], + "CommandName": [ "Get-AzSphereDeviceGroup" ], + "FullCommandName": [ "Get-AzSphereDeviceGroup_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "f7102875-7a42-479b-8492-c4b28c0f9155" ], + "x-ms-request-id": [ "32d4e098-1cfc-4e9e-9f24-26aee588d1e7" ], + "x-ms-correlation-request-id": [ "d82d63b8-fca4-441a-b45d-45d7327eab41" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T083044Z:d82d63b8-fca4-441a-b45d-45d7327eab41" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 6D76987D0D4E42F88ED42B875A515144 Ref B: MAA201060515051 Ref C: 2024-04-01T08:30:42Z" ], + "Date": [ "Mon, 01 Apr 2024 08:30:43 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "514" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Development\",\"name\":\"Development\",\"type\":\"Microsoft.AzureSphere/catalogs/products/deviceGroups\",\"properties\":{\"description\":\"Default development device group\",\"osFeedType\":\"Retail\",\"updatePolicy\":\"No3rdPartyAppUpdates\",\"allowCrashDumpsCollection\":\"Disabled\",\"regionalDataBoundary\":\"None\",\"hasDeployment\":null,\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereDeviceScenario+[NoContext]+GetCreateDevice-GenerateDeviceImage+$PUT+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Development/devices/0B3703164F0F4F20AAD0A2CEE26E2CBE0095B423A67C999B288410A2159EB7138FD6813438D765B5DE1C3F4C314E49B74A1D82714DDD7B8BA6F369C8D89A2BB2?api-version=2024-04-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Development/devices/0B3703164F0F4F20AAD0A2CEE26E2CBE0095B423A67C999B288410A2159EB7138FD6813438D765B5DE1C3F4C314E49B74A1D82714DDD7B8BA6F369C8D89A2BB2?api-version=2024-04-01", + "Content": "{\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "4" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "3b1226d9-c404-444c-900c-0b0e87afaaaa" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/cd96e9f2-4987-482d-b2b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EBAGj6QqaLOPa3RZUHMPeeSymifn86nh52yaIojZbdHUiE_o0iWzV-2ZRZOxE2IgkOrAeMYXIUhMoqV7XxTwfpi6zGwrzIeuTWMbNjgzbIZGIMJCbUyNbvEkGqxvBpcwzATT8KQYU2-J2iL5slKYZIACN6THLJn5BI6dAecS1X4PJ5vNAgI8qlsYmnafZSCIrWLUQQUsZeLUaxy3t-hozvyfVe-B-nktPdgNv3-iCsI0AtlvezwfFcJXQHQeNByXg5oxXPIe02On7O1u8swvMta16Va5_kDzD80TS3LYzVk2nzUVxEqPaGhpA-vs_ttjm7hDhYk80OIsQ_YZd286sA58Q\u0026s=pL6hhb3SxpzAldlPg4Nm6ATvUDckLQPZW_aucmtnIRdJxFhilX1v4f0QivpcAFSsd29EOMSqh45B9MApEPfPvvr9XmqG9prhfyRdZCHfsGB12DiCwdox0tSCKEqlrsDRJQzFoNbLcy3P4grKDlpVlG5pJWvKiuDzkymqBT_q7jjt0rdj8lnVZt5ETxMxQmRnYFYXS-aLKCvuRTawn8FIwrepHEp0-arpIwcgwgupNr28G3myV3WrHnrIk2cFuvqFou1YOtFxYEwPaZ4-cdr3BMvnunDXFoxJebhQmDhefp30_gK_1BSAAJFHG7I1cKsrbhVWNwrH3IjkhSjDfU73lA\u0026h=g1_o8mvTaotbeG9iLRiYyp0h5wMFtJUMbvm17zgvp-o" ], + "x-ms-request-id": [ "cd96e9f2-4987-482d-b2b5-3a98e2d3a793" ], + "x-ms-correlation-request-id": [ "65846c2d-6469-4b85-a755-6f169fc0decb" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T083047Z:65846c2d-6469-4b85-a755-6f169fc0decb" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: E7265F648EE24702AFF101562B64B0C4 Ref B: MAA201060515051 Ref C: 2024-04-01T08:30:44Z" ], + "Date": [ "Mon, 01 Apr 2024 08:30:46 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "810" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Development/devices/0B3703164F0F4F20AAD0A2CEE26E2CBE0095B423A67C999B288410A2159EB7138FD6813438D765B5DE1C3F4C314E49B74A1D82714DDD7B8BA6F369C8D89A2BB2\",\"name\":\"0B3703164F0F4F20AAD0A2CEE26E2CBE0095B423A67C999B288410A2159EB7138FD6813438D765B5DE1C3F4C314E49B74A1D82714DDD7B8BA6F369C8D89A2BB2\",\"type\":\"microsoft.azuresphere/catalogs/products/devicegroups/devices\",\"systemData\":{\"createdBy\":\"v-jiaji@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-01T08:30:45.0152904Z\",\"lastModifiedBy\":\"v-jiaji@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-04-01T08:30:45.0152904Z\"},\"properties\":{\"provisioningState\":\"Accepted\"}}", + "isContentBase64": false + } + }, + "AzSphereDeviceScenario+[NoContext]+GetCreateDevice-GenerateDeviceImage+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/cd96e9f2-4987-482d-b2b5-3a98e2d3a793*9AA710C3CB839F28E65651FCEA61E88C5CFD991E3A0E88256C38AEDD3126613E?api-version=2024-04-01\u0026t=638475570472965461\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMTUwODE5WhcNMjUwMTI0MTUwODE5WjBAMT4w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zUVxEqPaGhpA-vs_ttjm7hDhYk80OIsQ_YZd286sA58Q\u0026s=pL6hhb3SxpzAldlPg4Nm6ATvUDckLQPZW_aucmtnIRdJxFhilX1v4f0QivpcAFSsd29EOMSqh45B9MApEPfPvvr9XmqG9prhfyRdZCHfsGB12DiCwdox0tSCKEqlrsDRJQzFoNbLcy3P4grKDlpVlG5pJWvKiuDzkymqBT_q7jjt0rdj8lnVZt5ETxMxQmRnYFYXS-aLKCvuRTawn8FIwrepHEp0-arpIwcgwgupNr28G3myV3WrHnrIk2cFuvqFou1YOtFxYEwPaZ4-cdr3BMvnunDXFoxJebhQmDhefp30_gK_1BSAAJFHG7I1cKsrbhVWNwrH3IjkhSjDfU73lA\u0026h=g1_o8mvTaotbeG9iLRiYyp0h5wMFtJUMbvm17zgvp-o+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/cd96e9f2-4987-482d-b2b5-3a98e2d3a793*9AA710C3CB839F28E65651FCEA61E88C5CFD991E3A0E88256C38AEDD3126613E?api-version=2024-04-01\u0026t=638475570472965461\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMTUwODE5WhcNMjUwMTI0MTUwODE5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK902W8oGHqHsYxfQcAXt6Ljumrh6DLgGihvCAJqh_U0j8R4Jupt1lXUnhMY-cA7JAT9q7SEoTZskdrko1uzzlaykxYQ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jjt0rdj8lnVZt5ETxMxQmRnYFYXS-aLKCvuRTawn8FIwrepHEp0-arpIwcgwgupNr28G3myV3WrHnrIk2cFuvqFou1YOtFxYEwPaZ4-cdr3BMvnunDXFoxJebhQmDhefp30_gK_1BSAAJFHG7I1cKsrbhVWNwrH3IjkhSjDfU73lA\u0026h=g1_o8mvTaotbeG9iLRiYyp0h5wMFtJUMbvm17zgvp-o", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "17" ], + "x-ms-client-request-id": [ "90d982a8-dea0-4456-8f1d-fd9ab3d7691e" ], + "CommandName": [ "New-AzSphereDevice" ], + "FullCommandName": [ "New-AzSphereDevice_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"68003ba2-0000-0600-0000-660a70b90000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "3743e8df-07f3-4b54-b9e5-4e0974d6cb26" ], + "x-ms-correlation-request-id": [ "ff6ac575-0c76-4da3-a7e2-f29fec144a9d" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T083118Z:ff6ac575-0c76-4da3-a7e2-f29fec144a9d" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 9C8B1841D56748799AE3860C9B85B776 Ref B: MAA201060515051 Ref C: 2024-04-01T08:31:17Z" ], + "Date": [ "Mon, 01 Apr 2024 08:31:17 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "866" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/cd96e9f2-4987-482d-b2b5-3a98e2d3a793*9AA710C3CB839F28E65651FCEA61E88C5CFD991E3A0E88256C38AEDD3126613E\",\"name\":\"cd96e9f2-4987-482d-b2b5-3a98e2d3a793*9AA710C3CB839F28E65651FCEA61E88C5CFD991E3A0E88256C38AEDD3126613E\",\"resourceId\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Development/devices/0B3703164F0F4F20AAD0A2CEE26E2CBE0095B423A67C999B288410A2159EB7138FD6813438D765B5DE1C3F4C314E49B74A1D82714DDD7B8BA6F369C8D89A2BB2\",\"status\":\"Succeeded\",\"startTime\":\"2024-04-01T08:30:45.1682167Z\",\"endTime\":\"2024-04-01T08:30:49.7914267Z\",\"error\":{\"target\":\"DeviceClaim\",\"details\":[]},\"properties\":{\"targetResourceId\":null}}", + "isContentBase64": false + } + }, + "AzSphereDeviceScenario+[NoContext]+GetCreateDevice-GenerateDeviceImage+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Development/devices/0B3703164F0F4F20AAD0A2CEE26E2CBE0095B423A67C999B288410A2159EB7138FD6813438D765B5DE1C3F4C314E49B74A1D82714DDD7B8BA6F369C8D89A2BB2?api-version=2024-04-01+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Development/devices/0B3703164F0F4F20AAD0A2CEE26E2CBE0095B423A67C999B288410A2159EB7138FD6813438D765B5DE1C3F4C314E49B74A1D82714DDD7B8BA6F369C8D89A2BB2?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "18" ], + "x-ms-client-request-id": [ "90d982a8-dea0-4456-8f1d-fd9ab3d7691e" ], + "CommandName": [ "New-AzSphereDevice" ], + "FullCommandName": [ "New-AzSphereDevice_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "229c4f92-0e6d-4de2-a399-7134e8ef382b" ], + "x-ms-request-id": [ "80a61501-eb58-445b-86a2-e543ecbac55e" ], + "x-ms-correlation-request-id": [ "d8d88aae-38be-4380-879d-caa76459699a" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T083119Z:d8d88aae-38be-4380-879d-caa76459699a" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 1B137F950CE34720931661DB1447A2A2 Ref B: MAA201060515051 Ref C: 2024-04-01T08:31:18Z" ], + "Date": [ "Mon, 01 Apr 2024 08:31:18 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "847" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Development/devices/0B3703164F0F4F20AAD0A2CEE26E2CBE0095B423A67C999B288410A2159EB7138FD6813438D765B5DE1C3F4C314E49B74A1D82714DDD7B8BA6F369C8D89A2BB2\",\"name\":\"0b3703164f0f4f20aad0a2cee26e2cbe0095b423a67c999b288410a2159eb7138fd6813438d765b5de1c3f4c314e49b74a1d82714ddd7b8ba6f369c8d89a2bb2\",\"type\":\"Microsoft.AzureSphere/catalogs/products/deviceGroups/devices\",\"properties\":{\"chipSku\":\"MT3620AN\",\"deviceId\":\"0b3703164f0f4f20aad0a2cee26e2cbe0095b423a67c999b288410a2159eb7138fd6813438d765b5de1c3f4c314e49b74a1d82714ddd7b8ba6f369c8d89a2bb2\",\"lastAvailableOsVersion\":\"\",\"lastInstalledOsVersion\":\"\",\"lastOsUpdateUtc\":null,\"lastUpdateRequestUtc\":null,\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereDeviceScenario+[NoContext]+GetCreateDevice-GenerateDeviceImage+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Development/devices/0B3703164F0F4F20AAD0A2CEE26E2CBE0095B423A67C999B288410A2159EB7138FD6813438D765B5DE1C3F4C314E49B74A1D82714DDD7B8BA6F369C8D89A2BB2?api-version=2024-04-01+4": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Development/devices/0B3703164F0F4F20AAD0A2CEE26E2CBE0095B423A67C999B288410A2159EB7138FD6813438D765B5DE1C3F4C314E49B74A1D82714DDD7B8BA6F369C8D89A2BB2?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "19" ], + "x-ms-client-request-id": [ "dea7e88e-5095-4895-b026-b391d4e72397" ], + "CommandName": [ "Get-AzSphereDevice" ], + "FullCommandName": [ "Get-AzSphereDevice_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "19928e2f-c727-4bfd-9d72-56916bc359cb" ], + "x-ms-request-id": [ "0c199ddf-b574-4466-8a43-70aa8ee208d9" ], + "x-ms-correlation-request-id": [ "be1ea311-a399-4e1e-8101-c2a9af7345cc" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T083122Z:be1ea311-a399-4e1e-8101-c2a9af7345cc" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 17B716648D874CF89847FC78B30A3C24 Ref B: MAA201060515051 Ref C: 2024-04-01T08:31:19Z" ], + "Date": [ "Mon, 01 Apr 2024 08:31:21 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "847" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Development/devices/0B3703164F0F4F20AAD0A2CEE26E2CBE0095B423A67C999B288410A2159EB7138FD6813438D765B5DE1C3F4C314E49B74A1D82714DDD7B8BA6F369C8D89A2BB2\",\"name\":\"0b3703164f0f4f20aad0a2cee26e2cbe0095b423a67c999b288410a2159eb7138fd6813438d765b5de1c3f4c314e49b74a1d82714ddd7b8ba6f369c8d89a2bb2\",\"type\":\"Microsoft.AzureSphere/catalogs/products/deviceGroups/devices\",\"properties\":{\"chipSku\":\"MT3620AN\",\"deviceId\":\"0b3703164f0f4f20aad0a2cee26e2cbe0095b423a67c999b288410a2159eb7138fd6813438d765b5de1c3f4c314e49b74a1d82714ddd7b8ba6f369c8d89a2bb2\",\"lastAvailableOsVersion\":\"\",\"lastInstalledOsVersion\":\"\",\"lastOsUpdateUtc\":null,\"lastUpdateRequestUtc\":null,\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereDeviceScenario+[NoContext]+GetCreateDevice-GenerateDeviceImage+$POST+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Development/devices/0B3703164F0F4F20AAD0A2CEE26E2CBE0095B423A67C999B288410A2159EB7138FD6813438D765B5DE1C3F4C314E49B74A1D82714DDD7B8BA6F369C8D89A2BB2/generateCapabilityImage?api-version=2024-04-01+5": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Development/devices/0B3703164F0F4F20AAD0A2CEE26E2CBE0095B423A67C999B288410A2159EB7138FD6813438D765B5DE1C3F4C314E49B74A1D82714DDD7B8BA6F369C8D89A2BB2/generateCapabilityImage?api-version=2024-04-01", + "Content": "{\r\n \"capabilities\": [ \"ApplicationDevelopment\" ]\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "52" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "dca51d97-ad35-45ab-b1f0-6ad150c3583c" ], + "x-ms-request-id": [ "64ec2079-b431-4b69-ae96-54a5b73b0c41" ], + "x-ms-correlation-request-id": [ "0b574340-6b7a-4ecd-84c2-5152763239dd" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T083125Z:0b574340-6b7a-4ecd-84c2-5152763239dd" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 3F58C6BF35F24E2197163FA5EDA6BE85 Ref B: MAA201060515051 Ref C: 2024-04-01T08:31:22Z" ], + "Date": [ "Mon, 01 Apr 2024 08:31:25 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "536" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"image\":\"/Vz9XAEAAADMAAAACzcDFk8PTyCq0KLO4m4svgCVtCOmfJmbKIQQohWetxOP1oE0ONdltd4cP0wxTkm3Sh2CcU3de4um82nI2JorsgsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANFg0TQMAAABJRCQADQAAANi1KEHCq1VBmjOKHzHtZ+xFLLCmm4ReRac0rqIbbs8yU0cYABiq2C12Mi0VNH7cC2Ro/4DLfLCNAQAAAERCKAAAAAAAAAAAAGZ3X2NvbmZpZwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAfAAAAOBgwdLx0S6EG3knEppZiI622THikhofVhieT6teCsr1l0StfzLqN0CBvYBdIjEaPgr7hJLYzJeyAE9xdYqs5Xk=\"}", + "isContentBase64": false + } + }, + "AzSphereDeviceScenario+[NoContext]+ListDeviceInsight+$POST+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/listDeviceInsights?api-version=2024-04-01+1": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/listDeviceInsights?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "25" ], + "x-ms-client-request-id": [ "dcf3dfae-5b18-4a09-b6b4-a794a9ed0ee0" ], + "CommandName": [ "Get-AzSphereCatalogDeviceInsight" ], + "FullCommandName": [ "Get-AzSphereCatalogDeviceInsight_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "b0e48bfa-7ac4-435a-96f9-33bd337a6283" ], + "x-ms-request-id": [ "5c2ab830-392e-4035-9bfc-4401dfacd67f" ], + "x-ms-correlation-request-id": [ "8f934f71-b8e1-4173-b106-18c41d4b58ff" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T083210Z:8f934f71-b8e1-4173-b106-18c41d4b58ff" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 1CC3A83A7C134AB79805C307711578C7 Ref B: MAA201060515051 Ref C: 2024-04-01T08:32:08Z" ], + "Date": [ "Mon, 01 Apr 2024 08:32:09 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "28" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[],\"nextLink\":null}", + "isContentBase64": false + } + }, + "AzSphereDeviceScenario+[NoContext]+ListDeviceByGroup+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Development/devices?api-version=2024-04-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Development/devices?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "27" ], + "x-ms-client-request-id": [ "62395319-6851-4c91-bdc2-5dacbbd6e619" ], + "CommandName": [ "Get-AzSphereDevice" ], + "FullCommandName": [ "Get-AzSphereDevice_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "4becfa39-949e-461d-85f6-f61c284653bd" ], + "x-ms-request-id": [ "801b033e-eacd-4d83-835e-63c2bc2b7b04" ], + "x-ms-correlation-request-id": [ "066bfb2c-548b-4700-b430-0047616a2607" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T083214Z:066bfb2c-548b-4700-b430-0047616a2607" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 0B29D95A811D4258A2FAB6CF9572D9F1 Ref B: MAA201060515051 Ref C: 2024-04-01T08:32:13Z" ], + "Date": [ "Mon, 01 Apr 2024 08:32:14 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "733" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Development/devices/0b3703164f0f4f20aad0a2cee26e2cbe0095b423a67c999b288410a2159eb7138fd6813438d765b5de1c3f4c314e49b74a1d82714ddd7b8ba6f369c8d89a2bb2\",\"name\":\"0b3703164f0f4f20aad0a2cee26e2cbe0095b423a67c999b288410a2159eb7138fd6813438d765b5de1c3f4c314e49b74a1d82714ddd7b8ba6f369c8d89a2bb2\",\"type\":\"Microsoft.AzureSphere/catalogs/products/deviceGroups/devices\",\"properties\":{\"chipSku\":\"MT3620AN\",\"deviceId\":null,\"lastAvailableOsVersion\":\"\",\"lastInstalledOsVersion\":\"\",\"lastOsUpdateUtc\":null,\"lastUpdateRequestUtc\":null,\"provisioningState\":\"Succeeded\"}}]}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/test/AzSphereDeviceScenario.Tests.ps1 b/src/Sphere/Sphere.Autorest/test/AzSphereDeviceScenario.Tests.ps1 new file mode 100644 index 000000000000..8e7cd0c93aac --- /dev/null +++ b/src/Sphere/Sphere.Autorest/test/AzSphereDeviceScenario.Tests.ps1 @@ -0,0 +1,92 @@ +if(($null -eq $TestName) -or ($TestName -contains 'AzSphereDeviceScenario')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'AzSphereDeviceScenario.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} +### This test is running with new device. +### Please record this scenario wih new ids. +### It should have one device in first catalog. +Describe 'AzSphereDeviceScenario' { + It 'CreateProduct' { + { + $prodObject = New-AzSphereProduct -CatalogName $env.firstCatalog -Name $env.firstProduct -ResourceGroupName $env.resourceGroup + $prod1 = Get-AzSphereProduct -InputObject $prodObject + $prod1.Name | Should -Be $env.firstProduct + + New-AzSphereProduct -CatalogName $env.firstCatalog -Name $env.secondProduct -ResourceGroupName $env.resourceGroup + } | Should -Not -Throw + } + + It 'ListProduct' { + { + $listProd = Get-AzSphereProduct -CatalogName $env.firstCatalog -ResourceGroupName $env.resourceGroup + $listProd.Count | Should -BeGreaterOrEqual 2 + } | Should -Not -Throw + } + + It 'GetProduct' { + { + $prod1 = Get-AzSphereProduct -CatalogName $env.firstCatalog -Name $env.firstProduct -ResourceGroupName $env.resourceGroup + $prod1.Name | Should -Be $env.firstProduct + } | Should -Not -Throw + } + + It 'GenerateDefaultAndListDeviceGroup' { + { + New-AzSphereProductDefaultDeviceGroup -CatalogName $env.firstCatalog -ProductName $env.firstProduct -ResourceGroupName $env.resourceGroup + + Write-Host 'List test device group to verify' + $listDeviceGroup = Get-AzSphereDeviceGroup -CatalogName $env.firstCatalog -ProductName $env.firstProduct -ResourceGroupName $env.resourceGroup + $listDeviceGroup.Count | Should -BeGreaterOrEqual 5 + } | Should -Not -Throw + } + + It 'ListGroupInCatalog' { + { + $listDeviceGroup = Get-AzSphereCatalogDeviceGroup -ResourceGroupName $env.resourceGroup -CatalogName $env.firstCatalog + $listDeviceGroup.Count | Should -BeGreaterOrEqual 5 + } | Should -Not -Throw + } + + It 'GetDevDeviceGroup' { + { + $group = Get-AzSphereDeviceGroup -Name $env.DevDeviceGroup -ProductName $env.firstProduct -CatalogName $env.firstCatalog -ResourceGroupName $env.resourceGroup + $group.Name | Should -Be $env.DevDeviceGroup + } | Should -Not -Throw + } + + It 'GetCreateDevice-GenerateDeviceImage' { + { + New-AzSphereDevice -CatalogName $env.firstCatalog -GroupName $env.DevDeviceGroup -Name $env.deviceID -ProductName $env.firstProduct -ResourceGroupName $env.resourceGroup + + $device = Get-AzSphereDevice -ResourceGroupName $env.resourceGroup -CatalogName $env.firstCatalog -ProductName $env.firstProduct -GroupName $env.DevDeviceGroup -Name $env.deviceID + $device.Name | Should -Be $env.deviceID + + New-AzSphereDeviceCapabilityImage -CatalogName $env.firstCatalog -DeviceGroupName $env.DevDeviceGroup -DeviceName $env.deviceID -ProductName $env.firstProduct -ResourceGroupName $env.resourceGroup -Capability 'ApplicationDevelopment' + } | Should -Not -Throw + } + + It 'ListDeviceInsight' { + { + Get-AzSphereCatalogDeviceInsight -ResourceGroupName $env.resourceGroup -CatalogName $env.firstCatalog + } | Should -Not -Throw + } + + It 'ListDeviceByGroup' { + { + # first product DevGroup 1 + $listDevice = Get-AzSphereDevice -ResourceGroupName $env.resourceGroup -CatalogName $env.firstCatalog -ProductName $env.firstProduct -GroupName $env.DevDeviceGroup + $listDevice.Count | Should -Be 1 + } | Should -Not -Throw + } +} diff --git a/src/Sphere/Sphere.Autorest/test/AzSphereDeviceSecondScenario.Recording.json b/src/Sphere/Sphere.Autorest/test/AzSphereDeviceSecondScenario.Recording.json new file mode 100644 index 000000000000..40438c5cd475 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/test/AzSphereDeviceSecondScenario.Recording.json @@ -0,0 +1,1608 @@ +{ + "AzSphereDeviceSecondScenario+[NoContext]+CreateSecondEnvironment+$PUT+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2?api-version=2024-04-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2?api-version=2024-04-01", + "Content": "{\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "4" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "14157522-1e58-4d29-b9bd-2701889c51e9" ], + "x-ms-request-id": [ "5182b405-6083-4b92-94c5-fb5345919f86" ], + "x-ms-correlation-request-id": [ "918c92d2-d8b0-4ddb-88a0-5f89265e01f2" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T101256Z:918c92d2-d8b0-4ddb-88a0-5f89265e01f2" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 1767BC67E31F462DA2A337D27E21BB1A Ref B: MAA201060516039 Ref C: 2024-04-01T10:12:53Z" ], + "Date": [ "Mon, 01 Apr 2024 10:12:56 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "527" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2\",\"name\":\"Product2\",\"type\":\"microsoft.azuresphere/catalogs/products\",\"systemData\":{\"createdBy\":\"v-jiaji@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-01T10:12:54.5260701Z\",\"lastModifiedBy\":\"v-jiaji@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-04-01T10:12:54.5260701Z\"},\"properties\":{\"description\":null,\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereDeviceSecondScenario+[NoContext]+CreateSecondEnvironment+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2?api-version=2024-04-01+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "4" ], + "x-ms-client-request-id": [ "ca1f6191-18bf-4eaf-97de-c42b074234c1" ], + "CommandName": [ "New-AzSphereProduct" ], + "FullCommandName": [ "New-AzSphereProduct_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "2fdedbd3-10c2-43a9-938e-7e6e49c75afd" ], + "x-ms-request-id": [ "6646440f-78c1-4960-bf62-f611277bbe3b" ], + "x-ms-correlation-request-id": [ "0e805d00-e969-4bb6-889b-94bee60abcbc" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T101328Z:0e805d00-e969-4bb6-889b-94bee60abcbc" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 147C27F6CF7C464B878F21DA7189562B Ref B: MAA201060516039 Ref C: 2024-04-01T10:13:26Z" ], + "Date": [ "Mon, 01 Apr 2024 10:13:28 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "293" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2\",\"name\":\"Product2\",\"type\":\"Microsoft.AzureSphere/catalogs/products\",\"properties\":{\"description\":null,\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereDeviceSecondScenario+[NoContext]+CreateSecondEnvironment+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2?api-version=2024-04-01+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "5" ], + "x-ms-client-request-id": [ "ca1f6191-18bf-4eaf-97de-c42b074234c1" ], + "CommandName": [ "New-AzSphereProduct" ], + "FullCommandName": [ "New-AzSphereProduct_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "5ca223e6-58de-4c3a-8eac-2c89b9500a9d" ], + "x-ms-request-id": [ "3f781613-bf72-48d1-8b50-3a77358b7d32" ], + "x-ms-correlation-request-id": [ "ca493159-abf8-4bc4-84ee-6db076f95118" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T101333Z:ca493159-abf8-4bc4-84ee-6db076f95118" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 21E6F9715605412E9931A668FCF1F093 Ref B: MAA201060516039 Ref C: 2024-04-01T10:13:28Z" ], + "Date": [ "Mon, 01 Apr 2024 10:13:33 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "293" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2\",\"name\":\"Product2\",\"type\":\"Microsoft.AzureSphere/catalogs/products\",\"properties\":{\"description\":null,\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereDeviceSecondScenario+[NoContext]+AssignOtherDevices+$PATCH+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/.default/deviceGroups/.default/devices/0B3703164F0F4F20AAD0A2CEE26E2CBE0095B423A67C999B288410A2159EB7138FD6813438D765B5DE1C3F4C314E49B74A1D82714DDD7B8BA6F369C8D89A2BB2?api-version=2024-04-01+1": { + "Request": { + "Method": "PATCH", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/.default/deviceGroups/.default/devices/0B3703164F0F4F20AAD0A2CEE26E2CBE0095B423A67C999B288410A2159EB7138FD6813438D765B5DE1C3F4C314E49B74A1D82714DDD7B8BA6F369C8D89A2BB2?api-version=2024-04-01", + "Content": "{\r\n \"properties\": {\r\n \"deviceGroupId\": \"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Development\"\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "229" ] + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Location": [ "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/f2f20d8e-9221-4dfc-81b6-5a4e097997ae*CBB9B87E27B47A5AEDDEAA0392003A3A8DEF8946145153AA43A2718E829B3455?api-version=2024-04-01\u0026t=638475632197903834\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMTUwODE5WhcNMjUwMTI0MTUwODE5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3LYzVk2nzUVxEqPaGhpA-vs_ttjm7hDhYk80OIsQ_YZd286sA58Q\u0026s=bjEVdk_lu3lSWvP-v-VUpsr1ISRAsJcZf2RgMeZ7iKEcgAxNYNd_up2pMc0qul_ZbLw9kXa1loRZLNm9IhD5r77JP4kkHzSFxQb2iruQLAhK9vyszHDL7Pg-iesCBXWNEZe6g3gG-ZmIhsODRWHENATVaD95QtIdEH8CSSxDj3L1hAT4BgzrWW-6myw7_XXoValHxd2xliiU6I31dwIjm8V9N3kXmYOZ-3m75LyMlAnPcgxiUK7CRi1-KcRBx7XhLwcAMMy7mphfvGmkQCWX64X7spIweQwCsTJ9c8ADHKvcViwZB9PLNX35NP98dMA1zrtPrn5YKFi-A4tEqoM8Mw\u0026h=bp8DL9FMc2CawbkyDRGZxsuDaYQTYEUFm-YqhhNs_-U" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "013b0301-6378-46bb-908d-d935bae5ba18" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/f2f20d8e-9221-4dfc-81b6-5a4e097997ae*CBB9B87E27B47A5AEDDEAA0392003A3A8DEF8946145153AA43A2718E829B3455?api-version=2024-04-01\u0026t=638475632197903834\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMTUwODE5WhcNMjUwMTI0MTUwODE5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0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dk_lu3lSWvP-v-VUpsr1ISRAsJcZf2RgMeZ7iKEcgAxNYNd_up2pMc0qul_ZbLw9kXa1loRZLNm9IhD5r77JP4kkHzSFxQb2iruQLAhK9vyszHDL7Pg-iesCBXWNEZe6g3gG-ZmIhsODRWHENATVaD95QtIdEH8CSSxDj3L1hAT4BgzrWW-6myw7_XXoValHxd2xliiU6I31dwIjm8V9N3kXmYOZ-3m75LyMlAnPcgxiUK7CRi1-KcRBx7XhLwcAMMy7mphfvGmkQCWX64X7spIweQwCsTJ9c8ADHKvcViwZB9PLNX35NP98dMA1zrtPrn5YKFi-A4tEqoM8Mw\u0026h=bp8DL9FMc2CawbkyDRGZxsuDaYQTYEUFm-YqhhNs_-U" ], + "x-ms-request-id": [ "f2f20d8e-9221-4dfc-81b6-5a4e097997ae" ], + "x-ms-correlation-request-id": [ "96cc6d1f-6e64-4599-b98b-f008e5135ed6" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T101339Z:96cc6d1f-6e64-4599-b98b-f008e5135ed6" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: A754ECE189D649768CE2748147025D1E Ref B: MAA201060516039 Ref C: 2024-04-01T10:13:33Z" ], + "Date": [ "Mon, 01 Apr 2024 10:13:39 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "4" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "bnVsbA==", + "isContentBase64": false + } + }, + "AzSphereDeviceSecondScenario+[NoContext]+AssignOtherDevices+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/f2f20d8e-9221-4dfc-81b6-5a4e097997ae*CBB9B87E27B47A5AEDDEAA0392003A3A8DEF8946145153AA43A2718E829B3455?api-version=2024-04-01\u0026t=638475632197903834\u0026c=MIIHADCCBeigAwIBA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bIZGIMJCbUyNbvEkGqxvBpcwzATT8KQYU2-J2iL5slKYZIACN6THLJn5BI6dAecS1X4PJ5vNAgI8qlsYmnafZSCIrWLUQQUsZeLUaxy3t-hozvyfVe-B-nktPdgNv3-iCsI0AtlvezwfFcJXQHQeNByXg5oxXPIe02On7O1u8swvMta16Va5_kDzD80TS3LYzVk2nzUVxEqPaGhpA-vs_ttjm7hDhYk80OIsQ_YZd286sA58Q\u0026s=bjEVdk_lu3lSWvP-v-VUpsr1ISRAsJcZf2RgMeZ7iKEcgAxNYNd_up2pMc0qul_ZbLw9kXa1loRZLNm9IhD5r77JP4kkHzSFxQb2iruQLAhK9vyszHDL7Pg-iesCBXWNEZe6g3gG-ZmIhsODRWHENATVaD95QtIdEH8CSSxDj3L1hAT4BgzrWW-6myw7_XXoValHxd2xliiU6I31dwIjm8V9N3kXmYOZ-3m75LyMlAnPcgxiUK7CRi1-KcRBx7XhLwcAMMy7mphfvGmkQCWX64X7spIweQwCsTJ9c8ADHKvcViwZB9PLNX35NP98dMA1zrtPrn5YKFi-A4tEqoM8Mw\u0026h=bp8DL9FMc2CawbkyDRGZxsuDaYQTYEUFm-YqhhNs_-U+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/f2f20d8e-9221-4dfc-81b6-5a4e097997ae*CBB9B87E27B47A5AEDDEAA0392003A3A8DEF8946145153AA43A2718E829B3455?api-version=2024-04-01\u0026t=638475632197903834\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMTUwODE5WhcNMjUwMTI0MTUwODE5WjBAMT4wPAYDVQQDEzVhc3luY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ttjm7hDhYk80OIsQ_YZd286sA58Q\u0026s=bjEVdk_lu3lSWvP-v-VUpsr1ISRAsJcZf2RgMeZ7iKEcgAxNYNd_up2pMc0qul_ZbLw9kXa1loRZLNm9IhD5r77JP4kkHzSFxQb2iruQLAhK9vyszHDL7Pg-iesCBXWNEZe6g3gG-ZmIhsODRWHENATVaD95QtIdEH8CSSxDj3L1hAT4BgzrWW-6myw7_XXoValHxd2xliiU6I31dwIjm8V9N3kXmYOZ-3m75LyMlAnPcgxiUK7CRi1-KcRBx7XhLwcAMMy7mphfvGmkQCWX64X7spIweQwCsTJ9c8ADHKvcViwZB9PLNX35NP98dMA1zrtPrn5YKFi-A4tEqoM8Mw\u0026h=bp8DL9FMc2CawbkyDRGZxsuDaYQTYEUFm-YqhhNs_-U", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "7" ], + "x-ms-client-request-id": [ "f7094fe0-1951-4455-9d30-9f7a1d456f1b" ], + "CommandName": [ "Update-AzSphereDevice" ], + "FullCommandName": [ "Update-AzSphereDevice_UpdateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"6900836f-0000-0600-0000-660a88d40000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "e9218722-dbf9-4998-8914-118af737e3cc" ], + "x-ms-correlation-request-id": [ "aa4acb13-e266-42ad-81d0-47f30e77474e" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T101410Z:aa4acb13-e266-42ad-81d0-47f30e77474e" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: A11271F80D87450897860DE4825669DF Ref B: MAA201060516039 Ref C: 2024-04-01T10:14:10Z" ], + "Date": [ "Mon, 01 Apr 2024 10:14:10 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1185" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/f2f20d8e-9221-4dfc-81b6-5a4e097997ae*CBB9B87E27B47A5AEDDEAA0392003A3A8DEF8946145153AA43A2718E829B3455\",\"name\":\"f2f20d8e-9221-4dfc-81b6-5a4e097997ae*CBB9B87E27B47A5AEDDEAA0392003A3A8DEF8946145153AA43A2718E829B3455\",\"resourceId\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/.default/deviceGroups/.default/devices/0B3703164F0F4F20AAD0A2CEE26E2CBE0095B423A67C999B288410A2159EB7138FD6813438D765B5DE1C3F4C314E49B74A1D82714DDD7B8BA6F369C8D89A2BB2\",\"status\":\"Succeeded\",\"startTime\":\"2024-04-01T10:13:34.8048678Z\",\"endTime\":\"2024-04-01T10:13:40.690212Z\",\"error\":{\"target\":\"DeviceUpdateDeviceGroup\",\"details\":[]},\"properties\":{\"targetResourceId\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Development/devices/0B3703164F0F4F20AAD0A2CEE26E2CBE0095B423A67C999B288410A2159EB7138FD6813438D765B5DE1C3F4C314E49B74A1D82714DDD7B8BA6F369C8D89A2BB2\"}}", + "isContentBase64": false + } + }, + "AzSphereDeviceSecondScenario+[NoContext]+AssignOtherDevices+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/f2f20d8e-9221-4dfc-81b6-5a4e097997ae*CBB9B87E27B47A5AEDDEAA0392003A3A8DEF8946145153AA43A2718E829B3455?api-version=2024-04-01\u0026t=638475632197903834\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMTUwODE5WhcNMjUwMTI0MTUwODE5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK902W8oGHqHsYxfQcAXt6Ljumrh6DLgGihvCAJqh_U0j8R4Jupt1lXUnhMY-cA7JAT9q7SEoTZskdrko1uzzlaykxYQUacRB8irTYwbgK6DCIqWuOd2G-W2g3eWAyxRb-Dffjnsz-vBsjd1fyP0MvIXDSDMzp2oK65BSxTbBiStV3YxtKZ3eONvKga4d77iEw0zAZHIFkt0PSHzHO7kk-b_trhadwDxPYnjrQOGmouEj7HuNoC8H7-vKZvgbeplfrHtJO9vq0TOUUqIGlT236cbPe62XQNJRim_aa3chEFUmacjUnjEZtgJjup_tDQ0iV_Oe0ZqRBBGzpjoK23Wch0CAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29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mFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAGj6QqaLOPa3RZUHMPeeSymifn86nh52yaIojZbdHUiE_o0iWzV-2ZRZOxE2IgkOrAeMYXIUhMoqV7XxTwfpi6zGwrzIeuTWMbNjgzbIZGIMJCbUyNbvEkGqxvBpcwzATT8KQYU2-J2iL5slKYZIACN6THLJn5BI6dAecS1X4PJ5vNAgI8qlsYmnafZSCIrWLUQQUsZeLUaxy3t-hozvyfVe-B-nktPdgNv3-iCsI0AtlvezwfFcJXQHQeNByXg5oxXPIe02On7O1u8swvMta16Va5_kDzD80TS3LYzVk2nzUVxEqPaGhpA-vs_ttjm7hDhYk80OIsQ_YZd286sA58Q\u0026s=bjEVdk_lu3lSWvP-v-VUpsr1ISRAsJcZf2RgMeZ7iKEcgAxNYNd_up2pMc0qul_ZbLw9kXa1loRZLNm9IhD5r77JP4kkHzSFxQb2iruQLAhK9vyszHDL7Pg-iesCBXWNEZe6g3gG-ZmIhsODRWHENATVaD95QtIdEH8CSSxDj3L1hAT4BgzrWW-6myw7_XXoValHxd2xliiU6I31dwIjm8V9N3kXmYOZ-3m75LyMlAnPcgxiUK7CRi1-KcRBx7XhLwcAMMy7mphfvGmkQCWX64X7spIweQwCsTJ9c8ADHKvcViwZB9PLNX35NP98dMA1zrtPrn5YKFi-A4tEqoM8Mw\u0026h=bp8DL9FMc2CawbkyDRGZxsuDaYQTYEUFm-YqhhNs_-U+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/f2f20d8e-9221-4dfc-81b6-5a4e097997ae*CBB9B87E27B47A5AEDDEAA0392003A3A8DEF8946145153AA43A2718E829B3455?api-version=2024-04-01\u0026t=638475632197903834\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRaf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GqxvBpcwzATT8KQYU2-J2iL5slKYZIACN6THLJn5BI6dAecS1X4PJ5vNAgI8qlsYmnafZSCIrWLUQQUsZeLUaxy3t-hozvyfVe-B-nktPdgNv3-iCsI0AtlvezwfFcJXQHQeNByXg5oxXPIe02On7O1u8swvMta16Va5_kDzD80TS3LYzVk2nzUVxEqPaGhpA-vs_ttjm7hDhYk80OIsQ_YZd286sA58Q\u0026s=bjEVdk_lu3lSWvP-v-VUpsr1ISRAsJcZf2RgMeZ7iKEcgAxNYNd_up2pMc0qul_ZbLw9kXa1loRZLNm9IhD5r77JP4kkHzSFxQb2iruQLAhK9vyszHDL7Pg-iesCBXWNEZe6g3gG-ZmIhsODRWHENATVaD95QtIdEH8CSSxDj3L1hAT4BgzrWW-6myw7_XXoValHxd2xliiU6I31dwIjm8V9N3kXmYOZ-3m75LyMlAnPcgxiUK7CRi1-KcRBx7XhLwcAMMy7mphfvGmkQCWX64X7spIweQwCsTJ9c8ADHKvcViwZB9PLNX35NP98dMA1zrtPrn5YKFi-A4tEqoM8Mw\u0026h=bp8DL9FMc2CawbkyDRGZxsuDaYQTYEUFm-YqhhNs_-U", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "8" ], + "x-ms-client-request-id": [ "f7094fe0-1951-4455-9d30-9f7a1d456f1b" ], + "CommandName": [ "Update-AzSphereDevice" ], + "FullCommandName": [ "Update-AzSphereDevice_UpdateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"6900836f-0000-0600-0000-660a88d40000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "241d9167-a37c-46b1-a2ce-21716c05c971" ], + "x-ms-correlation-request-id": [ "f707fb6e-dacf-4626-b98f-a5bebcafdacf" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T101411Z:f707fb6e-dacf-4626-b98f-a5bebcafdacf" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 6D308BACD1BF4C1AB3D20DE838AE012B Ref B: MAA201060516039 Ref C: 2024-04-01T10:14:10Z" ], + "Date": [ "Mon, 01 Apr 2024 10:14:11 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1185" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/f2f20d8e-9221-4dfc-81b6-5a4e097997ae*CBB9B87E27B47A5AEDDEAA0392003A3A8DEF8946145153AA43A2718E829B3455\",\"name\":\"f2f20d8e-9221-4dfc-81b6-5a4e097997ae*CBB9B87E27B47A5AEDDEAA0392003A3A8DEF8946145153AA43A2718E829B3455\",\"resourceId\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/.default/deviceGroups/.default/devices/0B3703164F0F4F20AAD0A2CEE26E2CBE0095B423A67C999B288410A2159EB7138FD6813438D765B5DE1C3F4C314E49B74A1D82714DDD7B8BA6F369C8D89A2BB2\",\"status\":\"Succeeded\",\"startTime\":\"2024-04-01T10:13:34.8048678Z\",\"endTime\":\"2024-04-01T10:13:40.690212Z\",\"error\":{\"target\":\"DeviceUpdateDeviceGroup\",\"details\":[]},\"properties\":{\"targetResourceId\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Development/devices/0B3703164F0F4F20AAD0A2CEE26E2CBE0095B423A67C999B288410A2159EB7138FD6813438D765B5DE1C3F4C314E49B74A1D82714DDD7B8BA6F369C8D89A2BB2\"}}", + "isContentBase64": false + } + }, + "AzSphereDeviceSecondScenario+[NoContext]+AssignOtherDevices+$PATCH+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/.default/deviceGroups/.default/devices/B15332603BA55FB52B00FEC8549FDAA46B7FB6BA35694BC8943131CCB4B302846D224580A27880A2996B9FD4F1B2699400B1627059B6A90D67DD29E2984EE147?api-version=2024-04-01+4": { + "Request": { + "Method": "PATCH", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/.default/deviceGroups/.default/devices/B15332603BA55FB52B00FEC8549FDAA46B7FB6BA35694BC8943131CCB4B302846D224580A27880A2996B9FD4F1B2699400B1627059B6A90D67DD29E2984EE147?api-version=2024-04-01", + "Content": "{\r\n \"properties\": {\r\n \"deviceGroupId\": \"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Field Test\"\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "228" ] + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Location": [ "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/509e993f-41f7-4be3-b644-b056100ae2b1*CF3F2AEA7ACB032D8753CC81F72A32A5340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IojZbdHUiE_o0iWzV-2ZRZOxE2IgkOrAeMYXIUhMoqV7XxTwfpi6zGwrzIeuTWMbNjgzbIZGIMJCbUyNbvEkGqxvBpcwzATT8KQYU2-J2iL5slKYZIACN6THLJn5BI6dAecS1X4PJ5vNAgI8qlsYmnafZSCIrWLUQQUsZeLUaxy3t-hozvyfVe-B-nktPdgNv3-iCsI0AtlvezwfFcJXQHQeNByXg5oxXPIe02On7O1u8swvMta16Va5_kDzD80TS3LYzVk2nzUVxEqPaGhpA-vs_ttjm7hDhYk80OIsQ_YZd286sA58Q\u0026s=C_3OEry0a1PDhuJMLFbm7CDlRnwv3Lx1HaH6I6yGycQ0LQT_lQHQ0p3zZ7WaZ-3QT_paC9RKeTYumJX8UpN-5laql5p5sVcxotLXrUynIidQp8MYHoBqtTWEP4nmR0Pndva4dl_JU5ec3HdA7Q0Oz2ezlTVifKqC74eB7GsqYgMxKwplvRadQ8OVnz3cjJg6eehClvfHa3xIqHL_8fxURu_rvzWY3gwzlUqxbnRrBqGUDtgjxMz-S7_zP6pwa3axOHFsAiTNMCBICVDugDg-WNYo4SKemBBYjQg1_Gjh6BGn4e6j64GdKKwOebKRhiDI_5apujWvrIf5G7H3Oq3ueA\u0026h=WOuuubArWcaaALBw1ZRTUgU0UvQQtLUACf9J0lBtDJc" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "33dda7fa-cbc0-4c4b-bfab-ec4611ad4b00" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/509e993f-41f7-4be3-b644-b056100ae2b1*CF3F2AEA7ACB032D8753CC81F72A32A5340BA761D5E1FBA3BB8CC46635CF5C7A?api-version=2024-04-01\u0026t=638475632548457295\u0026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6zGwrzIeuTWMbNjgzbIZGIMJCbUyNbvEkGqxvBpcwzATT8KQYU2-J2iL5slKYZIACN6THLJn5BI6dAecS1X4PJ5vNAgI8qlsYmnafZSCIrWLUQQUsZeLUaxy3t-hozvyfVe-B-nktPdgNv3-iCsI0AtlvezwfFcJXQHQeNByXg5oxXPIe02On7O1u8swvMta16Va5_kDzD80TS3LYzVk2nzUVxEqPaGhpA-vs_ttjm7hDhYk80OIsQ_YZd286sA58Q\u0026s=rSWP4EePTamcUW0ZVuHnyjzNF4UZTzn3SpXSp3m-dRCYv7WgOpE9ysde40oDXVORxVTpVis0KsuYMJWYRI7NlOITyUdX9MW42nUDeq2_Y7rSJ0re2wy9-LhJaOS4FqiH4aaVzQR4AaKDmZN17JELbjULKpioh6ijRDUbCB5pczk6nJj7Mllv5u7UYj91sP5s2P-QbRG-9GxQtnMHBQoOYk7Tb_0I2LySY6JQRudT6spsRcR9xMa_RGJu0Y5VuhkZMkw2SEv1o-1kuS2qYmYiza0-o0qHuLtnO7ZIQVq9oF0fhSkfle3x8MY1AzXVrZO1NvLIiSla3pWQZJxLLtmHZg\u0026h=PCL0kOrRp6gLge9VhubAFx0NjeFNLxzum6C66RDt7jE" ], + "x-ms-request-id": [ "509e993f-41f7-4be3-b644-b056100ae2b1" ], + "x-ms-correlation-request-id": [ "9604381b-1a94-4f24-b69a-1830b8bc287f" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T101414Z:9604381b-1a94-4f24-b69a-1830b8bc287f" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 1D201A28710D439687068CBC3F351599 Ref B: MAA201060516039 Ref C: 2024-04-01T10:14:11Z" ], + "Date": [ "Mon, 01 Apr 2024 10:14:14 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "4" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "bnVsbA==", + "isContentBase64": false + } + }, + "AzSphereDeviceSecondScenario+[NoContext]+AssignOtherDevices+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/509e993f-41f7-4be3-b644-b056100ae2b1*CF3F2AEA7ACB032D8753CC81F72A32A5340BA761D5E1FBA3BB8CC46635CF5C7A?api-version=2024-04-01\u0026t=638475632548457295\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMTUwODE5WhcNMjUwMTI0MTUwODE5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK902W8oGHqHsYxfQcAXt6Ljumrh6DLgGihvCAJqh_U0j8R4Jupt1lXUnhMY-cA7JAT9q7SEoTZskdrko1uzzlaykxYQUacRB8irTYwbgK6DCIqWuOd2G-W2g3eWAyxRb-Dffjnsz-vBsjd1fyP0MvIXDSDMzp2oK65BSxTbBiStV3YxtKZ3eONvKga4d77iEw0zAZHIFkt0PSHzHO7kk-b_trhadwDxPYnjrQOGmouEj7HuNoC8H7-vKZvgbeplfrHtJO9vq0TOUUqIGlT236cbPe62XQNJRim_aa3chEFUmacjUnjEZtgJjup_tDQ0iV_Oe0ZqRBBGzpjoK23Wch0CAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggH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TIwMDUuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAGj6QqaLOPa3RZUHMPeeSymifn86nh52yaIojZbdHUiE_o0iWzV-2ZRZOxE2IgkOrAeMYXIUhMoqV7XxTwfpi6zGwrzIeuTWMbNjgzbIZGIMJCbUyNbvEkGqxvBpcwzATT8KQYU2-J2iL5slKYZIACN6THLJn5BI6dAecS1X4PJ5vNAgI8qlsYmnafZSCIrWLUQQUsZeLUaxy3t-hozvyfVe-B-nktPdgNv3-iCsI0AtlvezwfFcJXQHQeNByXg5oxXPIe02On7O1u8swvMta16Va5_kDzD80TS3LYzVk2nzUVxEqPaGhpA-vs_ttjm7hDhYk80OIsQ_YZd286sA58Q\u0026s=rSWP4EePTamcUW0ZVuHnyjzNF4UZTzn3SpXSp3m-dRCYv7WgOpE9ysde40oDXVORxVTpVis0KsuYMJWYRI7NlOITyUdX9MW42nUDeq2_Y7rSJ0re2wy9-LhJaOS4FqiH4aaVzQR4AaKDmZN17JELbjULKpioh6ijRDUbCB5pczk6nJj7Mllv5u7UYj91sP5s2P-QbRG-9GxQtnMHBQoOYk7Tb_0I2LySY6JQRudT6spsRcR9xMa_RGJu0Y5VuhkZMkw2SEv1o-1kuS2qYmYiza0-o0qHuLtnO7ZIQVq9oF0fhSkfle3x8MY1AzXVrZO1NvLIiSla3pWQZJxLLtmHZg\u0026h=PCL0kOrRp6gLge9VhubAFx0NjeFNLxzum6C66RDt7jE+5": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/509e993f-41f7-4be3-b644-b056100ae2b1*CF3F2AEA7ACB032D8753CC81F72A32A5340BA761D5E1FBA3BB8CC46635CF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RZOxE2IgkOrAeMYXIUhMoqV7XxTwfpi6zGwrzIeuTWMbNjgzbIZGIMJCbUyNbvEkGqxvBpcwzATT8KQYU2-J2iL5slKYZIACN6THLJn5BI6dAecS1X4PJ5vNAgI8qlsYmnafZSCIrWLUQQUsZeLUaxy3t-hozvyfVe-B-nktPdgNv3-iCsI0AtlvezwfFcJXQHQeNByXg5oxXPIe02On7O1u8swvMta16Va5_kDzD80TS3LYzVk2nzUVxEqPaGhpA-vs_ttjm7hDhYk80OIsQ_YZd286sA58Q\u0026s=rSWP4EePTamcUW0ZVuHnyjzNF4UZTzn3SpXSp3m-dRCYv7WgOpE9ysde40oDXVORxVTpVis0KsuYMJWYRI7NlOITyUdX9MW42nUDeq2_Y7rSJ0re2wy9-LhJaOS4FqiH4aaVzQR4AaKDmZN17JELbjULKpioh6ijRDUbCB5pczk6nJj7Mllv5u7UYj91sP5s2P-QbRG-9GxQtnMHBQoOYk7Tb_0I2LySY6JQRudT6spsRcR9xMa_RGJu0Y5VuhkZMkw2SEv1o-1kuS2qYmYiza0-o0qHuLtnO7ZIQVq9oF0fhSkfle3x8MY1AzXVrZO1NvLIiSla3pWQZJxLLtmHZg\u0026h=PCL0kOrRp6gLge9VhubAFx0NjeFNLxzum6C66RDt7jE", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "10" ], + "x-ms-client-request-id": [ "9cf5d791-d293-4fe1-a528-d551e2870040" ], + "CommandName": [ "Update-AzSphereDevice" ], + "FullCommandName": [ "Update-AzSphereDevice_UpdateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"69006670-0000-0600-0000-660a88f70000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "e5f24611-e28f-4f6b-82ce-8e0accacbaca" ], + "x-ms-correlation-request-id": [ "65a71d65-5389-4649-89aa-b16c302bd243" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T101446Z:65a71d65-5389-4649-89aa-b16c302bd243" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: B3B800D1E3214F62AED08CA9D6EC4589 Ref B: MAA201060516039 Ref C: 2024-04-01T10:14:45Z" ], + "Date": [ "Mon, 01 Apr 2024 10:14:45 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1185" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/509e993f-41f7-4be3-b644-b056100ae2b1*CF3F2AEA7ACB032D8753CC81F72A32A5340BA761D5E1FBA3BB8CC46635CF5C7A\",\"name\":\"509e993f-41f7-4be3-b644-b056100ae2b1*CF3F2AEA7ACB032D8753CC81F72A32A5340BA761D5E1FBA3BB8CC46635CF5C7A\",\"resourceId\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/.default/deviceGroups/.default/devices/B15332603BA55FB52B00FEC8549FDAA46B7FB6BA35694BC8943131CCB4B302846D224580A27880A2996B9FD4F1B2699400B1627059B6A90D67DD29E2984EE147\",\"status\":\"Succeeded\",\"startTime\":\"2024-04-01T10:14:12.6652265Z\",\"endTime\":\"2024-04-01T10:14:15.5870682Z\",\"error\":{\"target\":\"DeviceUpdateDeviceGroup\",\"details\":[]},\"properties\":{\"targetResourceId\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Field Test/devices/B15332603BA55FB52B00FEC8549FDAA46B7FB6BA35694BC8943131CCB4B302846D224580A27880A2996B9FD4F1B2699400B1627059B6A90D67DD29E2984EE147\"}}", + "isContentBase64": false + } + }, + "AzSphereDeviceSecondScenario+[NoContext]+AssignOtherDevices+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/509e993f-41f7-4be3-b644-b056100ae2b1*CF3F2AEA7ACB032D8753CC81F72A32A5340BA761D5E1FBA3BB8CC46635CF5C7A?api-version=2024-04-01\u0026t=638475632548613563\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMTUwODE5WhcNMjUwMTI0MTUwODE5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK902W8oGHqHsYxfQcAXt6Ljumrh6DLgGihvCAJqh_U0j8R4Jupt1lXUnhMY-cA7JAT9q7SEoTZskdrko1uzzlaykxYQUacRB8irTYwbgK6DCIqWuOd2G-W2g3eWAyxRb-Dffjnsz-vBsjd1fyP0MvIXDSDMzp2oK65BSxTbBiStV3YxtKZ3eONvKga4d77iEw0zAZHIFkt0PSHzHO7kk-b_trhadwDxPYnjrQOGmouEj7HuNoC8H7-vKZvgbeplfrHtJO9vq0TOUUqIGlT236cbPe62XQNJRim_aa3chEFUmacjUnjEZtgJjup_tDQ0iV_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+6": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/509e993f-41f7-4be3-b644-b056100ae2b1*CF3F2AEA7ACB032D8753CC81F72A32A5340BA761D5E1FBA3BB8CC46635CF5C7A?api-version=2024-04-01\u0026t=638475632548613563\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMTUwODE5WhcNMjUwMTI0MTUwODE5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK902W8oGHqHsYxfQcAXt6Ljumrh6DLgGihvCAJqh_U0j8R4Jupt1lXUnhMY-cA7JAT9q7SEoTZskdrko1uzzlaykxYQUacRB8irTYwbgK6DCIqWuOd2G-W2g3eWAyxRb-Dffjnsz-vBsjd1fyP0MvIXDSDMzp2oK65BSxTbBiStV3YxtKZ3eONvKga4d77iEw0zAZHIFkt0PSHzHO7kk-b_trhadwDxPYnjrQOGmouEj7HuNoC8H7-vKZvgbeplfrHtJO9vq0TOUUqIGlT236cbPe62XQNJRim_aa3chEFUmacjUnjEZtgJjup_tDQ0iV_Oe0ZqRBBGzpjoK23Wch0CAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0w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AQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAGj6QqaLOPa3RZUHMPeeSymifn86nh52yaIojZbdHUiE_o0iWzV-2ZRZOxE2IgkOrAeMYXIUhMoqV7XxTwfpi6zGwrzIeuTWMbNjgzbIZGIMJCbUyNbvEkGqxvBpcwzATT8KQYU2-J2iL5slKYZIACN6THLJn5BI6dAecS1X4PJ5vNAgI8qlsYmnafZSCIrWLUQQUsZeLUaxy3t-hozvyfVe-B-nktPdgNv3-iCsI0AtlvezwfFcJXQHQeNByXg5oxXPIe02On7O1u8swvMta16Va5_kDzD80TS3LYzVk2nzUVxEqPaGhpA-vs_ttjm7hDhYk80OIsQ_YZd286sA58Q\u0026s=C_3OEry0a1PDhuJMLFbm7CDlRnwv3Lx1HaH6I6yGycQ0LQT_lQHQ0p3zZ7WaZ-3QT_paC9RKeTYumJX8UpN-5laql5p5sVcxotLXrUynIidQp8MYHoBqtTWEP4nmR0Pndva4dl_JU5ec3HdA7Q0Oz2ezlTVifKqC74eB7GsqYgMxKwplvRadQ8OVnz3cjJg6eehClvfHa3xIqHL_8fxURu_rvzWY3gwzlUqxbnRrBqGUDtgjxMz-S7_zP6pwa3axOHFsAiTNMCBICVDugDg-WNYo4SKemBBYjQg1_Gjh6BGn4e6j64GdKKwOebKRhiDI_5apujWvrIf5G7H3Oq3ueA\u0026h=WOuuubArWcaaALBw1ZRTUgU0UvQQtLUACf9J0lBtDJc", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "11" ], + "x-ms-client-request-id": [ "9cf5d791-d293-4fe1-a528-d551e2870040" ], + "CommandName": [ "Update-AzSphereDevice" ], + "FullCommandName": [ "Update-AzSphereDevice_UpdateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"69006670-0000-0600-0000-660a88f70000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "5cbded24-3de7-470c-943f-2682f174f129" ], + "x-ms-correlation-request-id": [ "252481c6-fd77-4c19-a247-3a3722932ab3" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T101446Z:252481c6-fd77-4c19-a247-3a3722932ab3" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 5021C8C3D8A9446EAB423198006AE163 Ref B: MAA201060516039 Ref C: 2024-04-01T10:14:46Z" ], + "Date": [ "Mon, 01 Apr 2024 10:14:46 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1185" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/509e993f-41f7-4be3-b644-b056100ae2b1*CF3F2AEA7ACB032D8753CC81F72A32A5340BA761D5E1FBA3BB8CC46635CF5C7A\",\"name\":\"509e993f-41f7-4be3-b644-b056100ae2b1*CF3F2AEA7ACB032D8753CC81F72A32A5340BA761D5E1FBA3BB8CC46635CF5C7A\",\"resourceId\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/.default/deviceGroups/.default/devices/B15332603BA55FB52B00FEC8549FDAA46B7FB6BA35694BC8943131CCB4B302846D224580A27880A2996B9FD4F1B2699400B1627059B6A90D67DD29E2984EE147\",\"status\":\"Succeeded\",\"startTime\":\"2024-04-01T10:14:12.6652265Z\",\"endTime\":\"2024-04-01T10:14:15.5870682Z\",\"error\":{\"target\":\"DeviceUpdateDeviceGroup\",\"details\":[]},\"properties\":{\"targetResourceId\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Field Test/devices/B15332603BA55FB52B00FEC8549FDAA46B7FB6BA35694BC8943131CCB4B302846D224580A27880A2996B9FD4F1B2699400B1627059B6A90D67DD29E2984EE147\"}}", + "isContentBase64": false + } + }, + "AzSphereDeviceSecondScenario+[NoContext]+AssignOtherDevices+$PUT+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2/deviceGroups/Development?api-version=2024-04-01+7": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2/deviceGroups/Development?api-version=2024-04-01", + "Content": "{\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "4" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "ced50617-e66d-41c5-aaf9-ce070dd75824" ], + "x-ms-request-id": [ "2748ae2c-967b-4c3c-9a42-6e975adad1d4" ], + "x-ms-correlation-request-id": [ "bf2c3505-435c-4c42-8a35-342657b230d8" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T101452Z:bf2c3505-435c-4c42-8a35-342657b230d8" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 80615FC06CF24C9DB2629F14877ECEA4 Ref B: MAA201060516039 Ref C: 2024-04-01T10:14:46Z" ], + "Date": [ "Mon, 01 Apr 2024 10:14:52 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "708" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2/deviceGroups/Development\",\"name\":\"Development\",\"type\":\"microsoft.azuresphere/catalogs/products/devicegroups\",\"systemData\":{\"createdBy\":\"v-jiaji@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-01T10:14:47.4883928Z\",\"lastModifiedBy\":\"v-jiaji@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-04-01T10:14:47.4883928Z\"},\"properties\":{\"description\":null,\"osFeedType\":\"Retail\",\"updatePolicy\":\"UpdateAll\",\"allowCrashDumpsCollection\":\"Disabled\",\"regionalDataBoundary\":\"None\",\"hasDeployment\":false,\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereDeviceSecondScenario+[NoContext]+AssignOtherDevices+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2/deviceGroups/Development?api-version=2024-04-01+8": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2/deviceGroups/Development?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "13" ], + "x-ms-client-request-id": [ "738b215b-6514-452a-86bc-9ac72c4b2a87" ], + "CommandName": [ "New-AzSphereDeviceGroup" ], + "FullCommandName": [ "New-AzSphereDeviceGroup_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "6aa04b66-f10e-44fc-95a4-274a0cddc53c" ], + "x-ms-request-id": [ "6c596df2-15c4-4ca3-9166-d34c217c40b4" ], + "x-ms-correlation-request-id": [ "53c881c5-cdf0-4f8f-8eb1-4b4294f036c4" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T101524Z:53c881c5-cdf0-4f8f-8eb1-4b4294f036c4" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: A4E9D07B54144F51868B85C15BBB7AF1 Ref B: MAA201060516039 Ref C: 2024-04-01T10:15:23Z" ], + "Date": [ "Mon, 01 Apr 2024 10:15:24 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "473" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2/deviceGroups/Development\",\"name\":\"Development\",\"type\":\"Microsoft.AzureSphere/catalogs/products/deviceGroups\",\"properties\":{\"description\":null,\"osFeedType\":\"Retail\",\"updatePolicy\":\"UpdateAll\",\"allowCrashDumpsCollection\":\"Disabled\",\"regionalDataBoundary\":\"None\",\"hasDeployment\":null,\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereDeviceSecondScenario+[NoContext]+AssignOtherDevices+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2/deviceGroups/Development?api-version=2024-04-01+9": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2/deviceGroups/Development?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "14" ], + "x-ms-client-request-id": [ "738b215b-6514-452a-86bc-9ac72c4b2a87" ], + "CommandName": [ "New-AzSphereDeviceGroup" ], + "FullCommandName": [ "New-AzSphereDeviceGroup_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "98974b58-73cd-4a5a-b19a-2e5ddda5811e" ], + "x-ms-request-id": [ "1f5856fd-da9e-44eb-86af-6c549c480b1b" ], + "x-ms-correlation-request-id": [ "d0988b8c-4f4e-41ef-9c73-df452af17308" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T101526Z:d0988b8c-4f4e-41ef-9c73-df452af17308" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 6BA48CB34C9C4C5CAB9992AEC648880D Ref B: MAA201060516039 Ref C: 2024-04-01T10:15:24Z" ], + "Date": [ "Mon, 01 Apr 2024 10:15:26 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "473" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2/deviceGroups/Development\",\"name\":\"Development\",\"type\":\"Microsoft.AzureSphere/catalogs/products/deviceGroups\",\"properties\":{\"description\":null,\"osFeedType\":\"Retail\",\"updatePolicy\":\"UpdateAll\",\"allowCrashDumpsCollection\":\"Disabled\",\"regionalDataBoundary\":\"None\",\"hasDeployment\":null,\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereDeviceSecondScenario+[NoContext]+AssignOtherDevices+$PATCH+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/.default/deviceGroups/.default/devices/DBB0E0CB8BD961A6129096E1E8A1375AC1FA274F030C08161B37AE3BC5A94F443BDB628CF257BC5BC810D8768C03B6F5CA301A35CD0169F56A49624255964560?api-version=2024-04-01+10": { + "Request": { + "Method": "PATCH", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/.default/deviceGroups/.default/devices/DBB0E0CB8BD961A6129096E1E8A1375AC1FA274F030C08161B37AE3BC5A94F443BDB628CF257BC5BC810D8768C03B6F5CA301A35CD0169F56A49624255964560?api-version=2024-04-01", + "Content": "{\r\n \"properties\": {\r\n \"deviceGroupId\": \"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2/deviceGroups/Development\"\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "229" ] + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Location": [ "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/c2fd715c-87df-4100-a411-0f05f4bb9f4d*E422315D3A03C1DCC2F1F85C72048A263846857788F29D4636B5E7DCCC91DDEC?api-version=2024-04-01\u0026t=638475633294090882\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMTUwODE5WhcNMjUwMTI0MTUwODE5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK902W8oGHqHsYxfQcAXt6Ljumrh6DLgGihvCAJqh_U0j8R4Jupt1lXUnhMY-cA7JAT9q7SEoTZskdrko1uzzlaykxYQUacRB8irTYwbgK6DCIqWuOd2G-W2g3eWAyxRb-Dffjnsz-vBsjd1fyP0MvIXDSDMzp2oK65BSxTbBiStV3YxtKZ3eONv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Pji3OlJxHg3dFPcONXjj77VaWCzuEfv7MM9w04fI8FYkn4uqZTGC6gLsaaONZSM6LceQuArlmQ7091HqZwi0Oi78WI4fqXe8hxw\u0026h=E9RDFMhIgaydG-ubXXEwQ82jeKDNA1ameRo_romsEEU" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "e5e756e3-c2a5-4249-8ab3-fc7da5e101e6" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/c2fd715c-87df-4100-a411-0f05f4bb9f4d*E422315D3A03C1DCC2F1F85C72048A263846857788F29D4636B5E7DCCC91DDEC?api-version=2024-04-01\u0026t=638475633293934647\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMTUwODE5WhcNMjUwMTI0MTUwODE5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK902W8oGHqHsYxfQcAXt6Ljumrh6DLgGihvCAJqh_U0j8R4Jupt1lXUnhMY-cA7JAT9q7SEoTZskdrko1uzzlaykxYQUacRB8irTYwbgK6DCIqWuOd2G-W2g3eWAyxRb-Dffjnsz-vBsjd1fyP0MvIXDSDMzp2oK65BSxTbBiStV3YxtKZ3eONvKga4d77iEw0zAZHIFkt0PSHzHO7kk-b_trhadwDxPYnjrQOGmouE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b4iCP-xaAihyw4yO89mbArCezlxr4vQ\u0026h=QCIXaAbA85CorbYvzhn9AZCJX2bA-bqma5oumzFe_7w" ], + "x-ms-request-id": [ "c2fd715c-87df-4100-a411-0f05f4bb9f4d" ], + "x-ms-correlation-request-id": [ "7b0cb306-d7a6-4bd2-8844-d892fb361181" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T101529Z:7b0cb306-d7a6-4bd2-8844-d892fb361181" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: DDA471C4F97A452A9D6B65126A4D3D0A Ref B: MAA201060516039 Ref C: 2024-04-01T10:15:26Z" ], + "Date": [ "Mon, 01 Apr 2024 10:15:29 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "4" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "bnVsbA==", + "isContentBase64": false + } + }, + "AzSphereDeviceSecondScenario+[NoContext]+AssignOtherDevices+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/c2fd715c-87df-4100-a411-0f05f4bb9f4d*E422315D3A03C1DCC2F1F85C72048A263846857788F29D4636B5E7DCCC91DDEC?api-version=2024-04-01\u0026t=638475633293934647\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMTUwODE5WhcNMjUwMTI0MTUwODE5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCA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1JIwKJrc65zqkFn9vzEKCYkr61Bmx7QSit8lr7toQ_rPr163t_2N8C81xGMFlUAyrShaDQM63WHLJ3CA830JhkMDS6kywc_t4tbxNGU3UybKsFORmz_Ro19Skz8ybJlVJA3r6SHr3qgbqgh1CqKDYIp5l90KcweCUQAHmVw4gckaUYj7SJC-9zi6NXWQmPMGJ6FVKV72hvaJplGW0XwhJoAa89g0OY9rYS55rW3hUYVBzbu0bPGPb4iCP-xaAihyw4yO89mbArCezlxr4vQ\u0026h=QCIXaAbA85CorbYvzhn9AZCJX2bA-bqma5oumzFe_7w+11": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/c2fd715c-87df-4100-a411-0f05f4bb9f4d*E422315D3A03C1DCC2F1F85C72048A263846857788F29D4636B5E7DCCC91DDEC?api-version=2024-04-01\u0026t=638475633293934647\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMTUwODE5WhcNMjUwMTI0MTUwODE5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK902W8oGHqHsYxfQcAXt6Ljumrh6DLgGihvCAJqh_U0j8R4Jupt1lXUnhMY-cA7JAT9q7SEoTZskdrko1uzzlaykxYQUacRB8irTYwbgK6DCIqWuOd2G-W2g3eWAyxRb-Dffjnsz-vBsjd1fyP0MvIXDSDMzp2oK65BSxTbBiStV3YxtKZ3eONvKga4d77iEw0zAZHIFkt0PSHzHO7kk-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YS55rW3hUYVBzbu0bPGPb4iCP-xaAihyw4yO89mbArCezlxr4vQ\u0026h=QCIXaAbA85CorbYvzhn9AZCJX2bA-bqma5oumzFe_7w", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "16" ], + "x-ms-client-request-id": [ "4675e613-5ad8-416d-9ebc-7dd3b3b80c81" ], + "CommandName": [ "Update-AzSphereDevice" ], + "FullCommandName": [ "Update-AzSphereDevice_UpdateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"69001374-0000-0600-0000-660a89420000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "82a74ef0-0067-4fa9-be22-008be0d1cf71" ], + "x-ms-correlation-request-id": [ "50499a1c-d9d6-4683-ac16-6e4e10f9b74e" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T101600Z:50499a1c-d9d6-4683-ac16-6e4e10f9b74e" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 94D879F76BBB44DDB03419133C215FB9 Ref B: MAA201060516039 Ref C: 2024-04-01T10:15:59Z" ], + "Date": [ "Mon, 01 Apr 2024 10:16:00 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1186" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/c2fd715c-87df-4100-a411-0f05f4bb9f4d*E422315D3A03C1DCC2F1F85C72048A263846857788F29D4636B5E7DCCC91DDEC\",\"name\":\"c2fd715c-87df-4100-a411-0f05f4bb9f4d*E422315D3A03C1DCC2F1F85C72048A263846857788F29D4636B5E7DCCC91DDEC\",\"resourceId\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/.default/deviceGroups/.default/devices/DBB0E0CB8BD961A6129096E1E8A1375AC1FA274F030C08161B37AE3BC5A94F443BDB628CF257BC5BC810D8768C03B6F5CA301A35CD0169F56A49624255964560\",\"status\":\"Succeeded\",\"startTime\":\"2024-04-01T10:15:27.5330049Z\",\"endTime\":\"2024-04-01T10:15:30.9864063Z\",\"error\":{\"target\":\"DeviceUpdateDeviceGroup\",\"details\":[]},\"properties\":{\"targetResourceId\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2/deviceGroups/Development/devices/DBB0E0CB8BD961A6129096E1E8A1375AC1FA274F030C08161B37AE3BC5A94F443BDB628CF257BC5BC810D8768C03B6F5CA301A35CD0169F56A49624255964560\"}}", + "isContentBase64": false + } + }, + "AzSphereDeviceSecondScenario+[NoContext]+AssignOtherDevices+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/c2fd715c-87df-4100-a411-0f05f4bb9f4d*E422315D3A03C1DCC2F1F85C72048A263846857788F29D4636B5E7DCCC91DDEC?api-version=2024-04-01\u0026t=638475633294090882\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDU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XQHQeNByXg5oxXPIe02On7O1u8swvMta16Va5_kDzD80TS3LYzVk2nzUVxEqPaGhpA-vs_ttjm7hDhYk80OIsQ_YZd286sA58Q\u0026s=Y2UbOXYYx1OO7qRNyrIKdp3EWNMB4iKE3BRcJxyg-pWyXpIUvf_pa6tSl4qvARj_G-HWNlWlxqTn7hi06xvJb2b-uFEC6e4_cxxcdxRQZR41MFQ3AdCnpEXAJ4Ur1aNSzGRJhv-qwypp7NuuKd1Yl-4vXqBG4Y0i9Iv2otypHo5FPzTSyt5FM6Uyc-UWsmmgPwH-SQgeDPrnnjw7OfP_Luybtr-HjBlCcrmCbB5dWNyy4FZ0dd9Pji3OlJxHg3dFPcONXjj77VaWCzuEfv7MM9w04fI8FYkn4uqZTGC6gLsaaONZSM6LceQuArlmQ7091HqZwi0Oi78WI4fqXe8hxw\u0026h=E9RDFMhIgaydG-ubXXEwQ82jeKDNA1ameRo_romsEEU+12": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/c2fd715c-87df-4100-a411-0f05f4bb9f4d*E422315D3A03C1DCC2F1F85C72048A263846857788F29D4636B5E7DCCC91DDEC?api-version=2024-04-01\u0026t=638475633294090882\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMTUwODE5WhcNMjUwMTI0MTUwODE5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK902W8oGHqHsYxfQcAXt6Ljumr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xxcdxRQZR41MFQ3AdCnpEXAJ4Ur1aNSzGRJhv-qwypp7NuuKd1Yl-4vXqBG4Y0i9Iv2otypHo5FPzTSyt5FM6Uyc-UWsmmgPwH-SQgeDPrnnjw7OfP_Luybtr-HjBlCcrmCbB5dWNyy4FZ0dd9Pji3OlJxHg3dFPcONXjj77VaWCzuEfv7MM9w04fI8FYkn4uqZTGC6gLsaaONZSM6LceQuArlmQ7091HqZwi0Oi78WI4fqXe8hxw\u0026h=E9RDFMhIgaydG-ubXXEwQ82jeKDNA1ameRo_romsEEU", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "17" ], + "x-ms-client-request-id": [ "4675e613-5ad8-416d-9ebc-7dd3b3b80c81" ], + "CommandName": [ "Update-AzSphereDevice" ], + "FullCommandName": [ "Update-AzSphereDevice_UpdateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"69001374-0000-0600-0000-660a89420000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "f060fff1-30b5-4e21-968f-bd8d7bd45912" ], + "x-ms-correlation-request-id": [ "9550be66-122a-41b4-abb0-bf59707ee398" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T101601Z:9550be66-122a-41b4-abb0-bf59707ee398" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 13E36F7E44644819AB5480C1BEB94564 Ref B: MAA201060516039 Ref C: 2024-04-01T10:16:00Z" ], + "Date": [ "Mon, 01 Apr 2024 10:16:01 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1186" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/c2fd715c-87df-4100-a411-0f05f4bb9f4d*E422315D3A03C1DCC2F1F85C72048A263846857788F29D4636B5E7DCCC91DDEC\",\"name\":\"c2fd715c-87df-4100-a411-0f05f4bb9f4d*E422315D3A03C1DCC2F1F85C72048A263846857788F29D4636B5E7DCCC91DDEC\",\"resourceId\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/.default/deviceGroups/.default/devices/DBB0E0CB8BD961A6129096E1E8A1375AC1FA274F030C08161B37AE3BC5A94F443BDB628CF257BC5BC810D8768C03B6F5CA301A35CD0169F56A49624255964560\",\"status\":\"Succeeded\",\"startTime\":\"2024-04-01T10:15:27.5330049Z\",\"endTime\":\"2024-04-01T10:15:30.9864063Z\",\"error\":{\"target\":\"DeviceUpdateDeviceGroup\",\"details\":[]},\"properties\":{\"targetResourceId\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2/deviceGroups/Development/devices/DBB0E0CB8BD961A6129096E1E8A1375AC1FA274F030C08161B37AE3BC5A94F443BDB628CF257BC5BC810D8768C03B6F5CA301A35CD0169F56A49624255964560\"}}", + "isContentBase64": false + } + }, + "AzSphereDeviceSecondScenario+[NoContext]+ListDeviceInCatalog+$POST+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/listDevices?api-version=2024-04-01+1": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/listDevices?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "18" ], + "x-ms-client-request-id": [ "53976323-4666-4c8c-b3f7-4db743ee4805" ], + "CommandName": [ "Get-AzSphereCatalogDevice" ], + "FullCommandName": [ "Get-AzSphereCatalogDevice_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "f3eebf51-6bf0-46c3-b7b7-b8422b63a701" ], + "x-ms-request-id": [ "188156d9-90d6-43b6-aa88-a1a0ab38b7b8" ], + "x-ms-correlation-request-id": [ "a2defcb6-ca1a-4bea-a6be-e3011cef41cd" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T101604Z:a2defcb6-ca1a-4bea-a6be-e3011cef41cd" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: A67F5DF92F9E4E24AAC436C618F0B818 Ref B: MAA201060516039 Ref C: 2024-04-01T10:16:01Z" ], + "Date": [ "Mon, 01 Apr 2024 10:16:04 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "6104" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"properties\":{\"chipSku\":\"MT3620AN\",\"deviceId\":\"9821102ab4bd238196247124795853bcec5f1150cd6f802a22eb3713c5b945ead6dfc4c2354cf89e20842769dbdeb013f6f5f94d604399a0d03ade424207234b\",\"lastAvailableOsVersion\":null,\"lastInstalledOsVersion\":null,\"lastOsUpdateUtc\":null,\"lastUpdateRequestUtc\":null,\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/.default/deviceGroups/.default/devices/9821102ab4bd238196247124795853bcec5f1150cd6f802a22eb3713c5b945ead6dfc4c2354cf89e20842769dbdeb013f6f5f94d604399a0d03ade424207234b\",\"name\":\"9821102ab4bd238196247124795853bcec5f1150cd6f802a22eb3713c5b945ead6dfc4c2354cf89e20842769dbdeb013f6f5f94d604399a0d03ade424207234b\",\"type\":\"Microsoft.AzureSphere/catalogs/products/deviceGroups/devices\",\"systemData\":null},{\"properties\":{\"chipSku\":\"MT3620AN\",\"deviceId\":\"5d257fbcf76a5853832122d9b0e2410daa1438e3c1cde005162a837a7535c08973cc819a50cf8eb724ffc88dada06b40bee6010e82a8f84d2fef0fc263061d67\",\"lastAvailableOsVersion\":null,\"lastInstalledOsVersion\":null,\"lastOsUpdateUtc\":null,\"lastUpdateRequestUtc\":null,\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/.default/deviceGroups/.default/devices/5d257fbcf76a5853832122d9b0e2410daa1438e3c1cde005162a837a7535c08973cc819a50cf8eb724ffc88dada06b40bee6010e82a8f84d2fef0fc263061d67\",\"name\":\"5d257fbcf76a5853832122d9b0e2410daa1438e3c1cde005162a837a7535c08973cc819a50cf8eb724ffc88dada06b40bee6010e82a8f84d2fef0fc263061d67\",\"type\":\"Microsoft.AzureSphere/catalogs/products/deviceGroups/devices\",\"systemData\":null},{\"properties\":{\"chipSku\":\"MT3620AN\",\"deviceId\":\"b15332603ba55fb52b00fec8549fdaa46b7fb6ba35694bc8943131ccb4b302846d224580a27880a2996b9fd4f1b2699400b1627059b6a90d67dd29e2984ee147\",\"lastAvailableOsVersion\":null,\"lastInstalledOsVersion\":null,\"lastOsUpdateUtc\":null,\"lastUpdateRequestUtc\":null,\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Field Test/devices/b15332603ba55fb52b00fec8549fdaa46b7fb6ba35694bc8943131ccb4b302846d224580a27880a2996b9fd4f1b2699400b1627059b6a90d67dd29e2984ee147\",\"name\":\"b15332603ba55fb52b00fec8549fdaa46b7fb6ba35694bc8943131ccb4b302846d224580a27880a2996b9fd4f1b2699400b1627059b6a90d67dd29e2984ee147\",\"type\":\"Microsoft.AzureSphere/catalogs/products/deviceGroups/devices\",\"systemData\":null},{\"properties\":{\"chipSku\":\"MT3620AN\",\"deviceId\":\"dbb0e0cb8bd961a6129096e1e8a1375ac1fa274f030c08161b37ae3bc5a94f443bdb628cf257bc5bc810d8768c03b6f5ca301a35cd0169f56a49624255964560\",\"lastAvailableOsVersion\":null,\"lastInstalledOsVersion\":null,\"lastOsUpdateUtc\":null,\"lastUpdateRequestUtc\":null,\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2/deviceGroups/Development/devices/dbb0e0cb8bd961a6129096e1e8a1375ac1fa274f030c08161b37ae3bc5a94f443bdb628cf257bc5bc810d8768c03b6f5ca301a35cd0169f56a49624255964560\",\"name\":\"dbb0e0cb8bd961a6129096e1e8a1375ac1fa274f030c08161b37ae3bc5a94f443bdb628cf257bc5bc810d8768c03b6f5ca301a35cd0169f56a49624255964560\",\"type\":\"Microsoft.AzureSphere/catalogs/products/deviceGroups/devices\",\"systemData\":null},{\"properties\":{\"chipSku\":\"MT3620AN\",\"deviceId\":\"f226406c4bc3c2b3703abea7476bc31388d6209bdd506871d9668688b8528e3daf7318b60351b20243188baaaebfbe5b4f61c92ab2f1dbd648309b6c5e27bc86\",\"lastAvailableOsVersion\":null,\"lastInstalledOsVersion\":null,\"lastOsUpdateUtc\":null,\"lastUpdateRequestUtc\":null,\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/.default/deviceGroups/.default/devices/f226406c4bc3c2b3703abea7476bc31388d6209bdd506871d9668688b8528e3daf7318b60351b20243188baaaebfbe5b4f61c92ab2f1dbd648309b6c5e27bc86\",\"name\":\"f226406c4bc3c2b3703abea7476bc31388d6209bdd506871d9668688b8528e3daf7318b60351b20243188baaaebfbe5b4f61c92ab2f1dbd648309b6c5e27bc86\",\"type\":\"Microsoft.AzureSphere/catalogs/products/deviceGroups/devices\",\"systemData\":null},{\"properties\":{\"chipSku\":\"MT3620AN\",\"deviceId\":\"1d318b77308f859c1d35cc88ec8599f4b6fa1bd27ddf28312b6cbae5f04b6fa329b7139c82ae33d6d4c507db317d36a8a8139bfbb4fe6ecb20deab4ceec0fc87\",\"lastAvailableOsVersion\":null,\"lastInstalledOsVersion\":null,\"lastOsUpdateUtc\":null,\"lastUpdateRequestUtc\":null,\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/.default/deviceGroups/.default/devices/1d318b77308f859c1d35cc88ec8599f4b6fa1bd27ddf28312b6cbae5f04b6fa329b7139c82ae33d6d4c507db317d36a8a8139bfbb4fe6ecb20deab4ceec0fc87\",\"name\":\"1d318b77308f859c1d35cc88ec8599f4b6fa1bd27ddf28312b6cbae5f04b6fa329b7139c82ae33d6d4c507db317d36a8a8139bfbb4fe6ecb20deab4ceec0fc87\",\"type\":\"Microsoft.AzureSphere/catalogs/products/deviceGroups/devices\",\"systemData\":null},{\"properties\":{\"chipSku\":\"MT3620AN\",\"deviceId\":\"0b3703164f0f4f20aad0a2cee26e2cbe0095b423a67c999b288410a2159eb7138fd6813438d765b5de1c3f4c314e49b74a1d82714ddd7b8ba6f369c8d89a2bb2\",\"lastAvailableOsVersion\":null,\"lastInstalledOsVersion\":null,\"lastOsUpdateUtc\":null,\"lastUpdateRequestUtc\":null,\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Development/devices/0b3703164f0f4f20aad0a2cee26e2cbe0095b423a67c999b288410a2159eb7138fd6813438d765b5de1c3f4c314e49b74a1d82714ddd7b8ba6f369c8d89a2bb2\",\"name\":\"0b3703164f0f4f20aad0a2cee26e2cbe0095b423a67c999b288410a2159eb7138fd6813438d765b5de1c3f4c314e49b74a1d82714ddd7b8ba6f369c8d89a2bb2\",\"type\":\"Microsoft.AzureSphere/catalogs/products/deviceGroups/devices\",\"systemData\":null}],\"nextLink\":null}", + "isContentBase64": false + } + }, + "AzSphereDeviceSecondScenario+[NoContext]+CountDeviceInCatalog+$POST+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/countDevices?api-version=2024-04-01+1": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/countDevices?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "19" ], + "x-ms-client-request-id": [ "593e004d-daef-43d8-9fa4-fcb42faa5eb8" ], + "CommandName": [ "Invoke-AzSphereCountCatalogDevice" ], + "FullCommandName": [ "Invoke-AzSphereCountCatalogDevice_Count" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "3c66d8bb-cadb-4b98-9fb9-fed549e3317b" ], + "x-ms-request-id": [ "43856062-0665-45c0-9d34-3090949738ba" ], + "x-ms-correlation-request-id": [ "4ffa2f5b-dcd6-474a-8243-90c8aae69528" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T101606Z:4ffa2f5b-dcd6-474a-8243-90c8aae69528" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: E733A01D3D9046698BD585A1D30F8211 Ref B: MAA201060516039 Ref C: 2024-04-01T10:16:04Z" ], + "Date": [ "Mon, 01 Apr 2024 10:16:06 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "11" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":7}", + "isContentBase64": false + } + }, + "AzSphereDeviceSecondScenario+[NoContext]+CountDeviceInProdcut+$POST+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/countDevices?api-version=2024-04-01+1": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/countDevices?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "20" ], + "x-ms-client-request-id": [ "ceb69eaa-be3e-4daa-a5e6-c1faed7315eb" ], + "CommandName": [ "Invoke-AzSphereCountProductDevice" ], + "FullCommandName": [ "Invoke-AzSphereCountProductDevice_Count" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "36a73972-ba64-4f5e-af6f-989159a85d1b" ], + "x-ms-request-id": [ "a3c52078-fb5b-46aa-892c-585dc6e11bf9" ], + "x-ms-correlation-request-id": [ "7a361df7-9fec-4754-8752-474c21bfb112" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T101609Z:7a361df7-9fec-4754-8752-474c21bfb112" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: C5CE96AAA7564A86A016869AB07C040E Ref B: MAA201060516039 Ref C: 2024-04-01T10:16:07Z" ], + "Date": [ "Mon, 01 Apr 2024 10:16:08 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "11" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":2}", + "isContentBase64": false + } + }, + "AzSphereDeviceSecondScenario+[NoContext]+CountDeviceInGroup+$POST+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2/deviceGroups/Development/countDevices?api-version=2024-04-01+1": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2/deviceGroups/Development/countDevices?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "21" ], + "x-ms-client-request-id": [ "b828913c-ca4f-43a0-af8c-063a545d9e39" ], + "CommandName": [ "Invoke-AzSphereCountDeviceGroupDevice" ], + "FullCommandName": [ "Invoke-AzSphereCountDeviceGroupDevice_Count" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "0b8b5c7b-acd9-4ccf-ab69-c1c64dd29f0f" ], + "x-ms-request-id": [ "15daca45-85f4-43df-8fe9-014a2ed66ebd" ], + "x-ms-correlation-request-id": [ "ee865039-6275-4e5b-97f8-33d43f33bdd9" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T101610Z:ee865039-6275-4e5b-97f8-33d43f33bdd9" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: E9B22F508775436DB8EF88A2B50FBBEA Ref B: MAA201060516039 Ref C: 2024-04-01T10:16:09Z" ], + "Date": [ "Mon, 01 Apr 2024 10:16:09 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "11" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":1}", + "isContentBase64": false + } + }, + "AzSphereDeviceSecondScenario+[NoContext]+UpdateDevice2AssignSecondProduct+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2/deviceGroups/Development?api-version=2024-04-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2/deviceGroups/Development?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "22" ], + "x-ms-client-request-id": [ "e700a829-a48e-4d06-8790-3b853d669699" ], + "CommandName": [ "Get-AzSphereDeviceGroup" ], + "FullCommandName": [ "Get-AzSphereDeviceGroup_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "411c44ac-8bed-4da4-bfbc-8f79e9a46ef5" ], + "x-ms-request-id": [ "452a8330-239d-4ec9-b4a9-5e31f060e759" ], + "x-ms-correlation-request-id": [ "70c41fcd-bbf8-457f-8335-45547a9361d3" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T101611Z:70c41fcd-bbf8-457f-8335-45547a9361d3" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 1B6FEEE2F52E460BB173AADDDED1CE65 Ref B: MAA201060516039 Ref C: 2024-04-01T10:16:10Z" ], + "Date": [ "Mon, 01 Apr 2024 10:16:10 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "473" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2/deviceGroups/Development\",\"name\":\"Development\",\"type\":\"Microsoft.AzureSphere/catalogs/products/deviceGroups\",\"properties\":{\"description\":null,\"osFeedType\":\"Retail\",\"updatePolicy\":\"UpdateAll\",\"allowCrashDumpsCollection\":\"Disabled\",\"regionalDataBoundary\":\"None\",\"hasDeployment\":null,\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereDeviceSecondScenario+[NoContext]+UpdateDevice2AssignSecondProduct+$PATCH+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Field Test/devices/B15332603BA55FB52B00FEC8549FDAA46B7FB6BA35694BC8943131CCB4B302846D224580A27880A2996B9FD4F1B2699400B1627059B6A90D67DD29E2984EE147?api-version=2024-04-01+2": { + "Request": { + "Method": "PATCH", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Field%20Test/devices/B15332603BA55FB52B00FEC8549FDAA46B7FB6BA35694BC8943131CCB4B302846D224580A27880A2996B9FD4F1B2699400B1627059B6A90D67DD29E2984EE147?api-version=2024-04-01", + "Content": "{\r\n \"properties\": {\r\n \"deviceGroupId\": \"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2/deviceGroups/Development\"\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "229" ] + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Location": [ "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/b594cd51-fb8a-4e57-af78-678a137adf46*DCFDAACE5BC93B20668F74CE987432CEB94BA61001506E4167900B36E3FD98F4?api-version=2024-04-01\u0026t=638475633745989246\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMTUwODE5WhcNMjUwMTI0MTUwODE5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK902W8oGHqHsYxfQcAXt6Ljumrh6DLgGihvCAJqh_U0j8R4Jupt1lXUnhMY-cA7JAT9q7SEoTZskdrko1uzzlaykxYQUacRB8irTYwbgK6DCIqWuOd2G-W2g3eWAyxRb-Dffjnsz-vBsjd1fyP0MvIXDSDMzp2oK65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UMBT_Yt4Wm3bsZad6htGQY6aWK4WnHyFV9sDEz57Yt0Fo65kbC07WLBxNx_1_kHO9W053B3Kn8TW-GeWqE5ZbwnP8SWNWqqWd0UxGpPi9FyUxPg2iWiw\u0026h=Gjl33MMFZ3OFeqYn7nFIWrRZiL7YuD2DZJ6ysVLplZE" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "a227c6bf-6ff4-4ee3-8636-5e48d287936d" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/b594cd51-fb8a-4e57-af78-678a137adf46*DCFDAACE5BC93B20668F74CE987432CEB94BA61001506E4167900B36E3FD98F4?api-version=2024-04-01\u0026t=638475633745989246\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMTUwODE5WhcNMjUwMTI0MTUwODE5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK902W8oGHqHsYxfQcAXt6Ljumrh6DLgGihvCAJqh_U0j8R4Jupt1lXUnhMY-cA7JAT9q7SEoTZskdrko1uzzlaykxYQUacRB8irTYwbgK6DCIqWuOd2G-W2g3eWAyxRb-Dffjnsz-vBsjd1fyP0MvIXDSDMzp2oK65BSxTbBiStV3YxtKZ3eONvKga4d77iEw0zAZHIFkt0PSHzHO7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o65kbC07WLBxNx_1_kHO9W053B3Kn8TW-GeWqE5ZbwnP8SWNWqqWd0UxGpPi9FyUxPg2iWiw\u0026h=Gjl33MMFZ3OFeqYn7nFIWrRZiL7YuD2DZJ6ysVLplZE" ], + "x-ms-request-id": [ "b594cd51-fb8a-4e57-af78-678a137adf46" ], + "x-ms-correlation-request-id": [ "de0d8713-bf4a-44a1-96a3-4d0ddfc587d9" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T101614Z:de0d8713-bf4a-44a1-96a3-4d0ddfc587d9" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 581D22BB8F694CA990CB68679D597CA9 Ref B: MAA201060516039 Ref C: 2024-04-01T10:16:11Z" ], + "Date": [ "Mon, 01 Apr 2024 10:16:14 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "4" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "bnVsbA==", + "isContentBase64": false + } + }, + "AzSphereDeviceSecondScenario+[NoContext]+UpdateDevice2AssignSecondProduct+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/b594cd51-fb8a-4e57-af78-678a137adf46*DCFDAACE5BC93B20668F74CE987432CEB94BA61001506E4167900B36E3FD98F4?api-version=2024-04-01\u0026t=638475633745989246\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMTUwODE5WhcNMjUwMTI0MTUwODE5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ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w_LjkkLlaM64rTlqlSkAlPDstY9ZMxK52tyg7Gm8Qk0z7SyGb6FVmwEoDi7uA6fA_WX6tZZEq8zZINQ3_cqd2fJijeCoDanMAnJ2TW0KJfQoKsFsH4xkTXsNIH1VHOSZgwosLSWnTp65bWkZT_Gh-3EKGT0s4L6CgPnf-esHRoAh1MM_EKjijYYw2XZ1x5Kf_RVIEqdQ8dC_OSPtcZBYrUMBT_Yt4Wm3bsZad6htGQY6aWK4WnHyFV9sDEz57Yt0Fo65kbC07WLBxNx_1_kHO9W053B3Kn8TW-GeWqE5ZbwnP8SWNWqqWd0UxGpPi9FyUxPg2iWiw\u0026h=Gjl33MMFZ3OFeqYn7nFIWrRZiL7YuD2DZJ6ysVLplZE+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/b594cd51-fb8a-4e57-af78-678a137adf46*DCFDAACE5BC93B20668F74CE987432CEB94BA61001506E4167900B36E3FD98F4?api-version=2024-04-01\u0026t=638475633745989246\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMTUwODE5WhcNMjUwMTI0MTUwODE5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK902W8oGHqHsYxfQcAXt6Ljumrh6DLgGihvCAJqh_U0j8R4Jupt1lXUnhMY-cA7JAT9q7SEoTZskdrko1uzzlaykxYQUacRB8irTYwbgK6DCIqWuOd2G-W2g3eWAyxRb-Dffjnsz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Kf_RVIEqdQ8dC_OSPtcZBYrUMBT_Yt4Wm3bsZad6htGQY6aWK4WnHyFV9sDEz57Yt0Fo65kbC07WLBxNx_1_kHO9W053B3Kn8TW-GeWqE5ZbwnP8SWNWqqWd0UxGpPi9FyUxPg2iWiw\u0026h=Gjl33MMFZ3OFeqYn7nFIWrRZiL7YuD2DZJ6ysVLplZE", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "24" ], + "x-ms-client-request-id": [ "76ff64bb-3145-41b2-8c6c-2fe84a598a55" ], + "CommandName": [ "Update-AzSphereDevice" ], + "FullCommandName": [ "Update-AzSphereDevice_UpdateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"69009277-0000-0600-0000-660a896f0000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "628b5ced-8ed3-4d03-a35b-dbf3abeaa065" ], + "x-ms-correlation-request-id": [ "26994d89-e464-4e5b-9849-8003ff868199" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T101645Z:26994d89-e464-4e5b-9849-8003ff868199" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 75E1D49351974138BA65C80C98C411CD Ref B: MAA201060516039 Ref C: 2024-04-01T10:16:44Z" ], + "Date": [ "Mon, 01 Apr 2024 10:16:45 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1188" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/b594cd51-fb8a-4e57-af78-678a137adf46*DCFDAACE5BC93B20668F74CE987432CEB94BA61001506E4167900B36E3FD98F4\",\"name\":\"b594cd51-fb8a-4e57-af78-678a137adf46*DCFDAACE5BC93B20668F74CE987432CEB94BA61001506E4167900B36E3FD98F4\",\"resourceId\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Field Test/devices/B15332603BA55FB52B00FEC8549FDAA46B7FB6BA35694BC8943131CCB4B302846D224580A27880A2996B9FD4F1B2699400B1627059B6A90D67DD29E2984EE147\",\"status\":\"Succeeded\",\"startTime\":\"2024-04-01T10:16:12.4330973Z\",\"endTime\":\"2024-04-01T10:16:15.8921317Z\",\"error\":{\"target\":\"DeviceUpdateDeviceGroup\",\"details\":[]},\"properties\":{\"targetResourceId\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2/deviceGroups/Development/devices/B15332603BA55FB52B00FEC8549FDAA46B7FB6BA35694BC8943131CCB4B302846D224580A27880A2996B9FD4F1B2699400B1627059B6A90D67DD29E2984EE147\"}}", + "isContentBase64": false + } + }, + "AzSphereDeviceSecondScenario+[NoContext]+UpdateDevice2AssignSecondProduct+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/b594cd51-fb8a-4e57-af78-678a137adf46*DCFDAACE5BC93B20668F74CE987432CEB94BA61001506E4167900B36E3FD98F4?api-version=2024-04-01\u0026t=638475633745989246\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZIm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AecS1X4PJ5vNAgI8qlsYmnafZSCIrWLUQQUsZeLUaxy3t-hozvyfVe-B-nktPdgNv3-iCsI0AtlvezwfFcJXQHQeNByXg5oxXPIe02On7O1u8swvMta16Va5_kDzD80TS3LYzVk2nzUVxEqPaGhpA-vs_ttjm7hDhYk80OIsQ_YZd286sA58Q\u0026s=bKvPSZaFIRrxsw_LjkkLlaM64rTlqlSkAlPDstY9ZMxK52tyg7Gm8Qk0z7SyGb6FVmwEoDi7uA6fA_WX6tZZEq8zZINQ3_cqd2fJijeCoDanMAnJ2TW0KJfQoKsFsH4xkTXsNIH1VHOSZgwosLSWnTp65bWkZT_Gh-3EKGT0s4L6CgPnf-esHRoAh1MM_EKjijYYw2XZ1x5Kf_RVIEqdQ8dC_OSPtcZBYrUMBT_Yt4Wm3bsZad6htGQY6aWK4WnHyFV9sDEz57Yt0Fo65kbC07WLBxNx_1_kHO9W053B3Kn8TW-GeWqE5ZbwnP8SWNWqqWd0UxGpPi9FyUxPg2iWiw\u0026h=Gjl33MMFZ3OFeqYn7nFIWrRZiL7YuD2DZJ6ysVLplZE+4": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/b594cd51-fb8a-4e57-af78-678a137adf46*DCFDAACE5BC93B20668F74CE987432CEB94BA61001506E4167900B36E3FD98F4?api-version=2024-04-01\u0026t=638475633745989246\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMTUwODE5WhcNMjUwMTI0MTUwODE5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ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w_LjkkLlaM64rTlqlSkAlPDstY9ZMxK52tyg7Gm8Qk0z7SyGb6FVmwEoDi7uA6fA_WX6tZZEq8zZINQ3_cqd2fJijeCoDanMAnJ2TW0KJfQoKsFsH4xkTXsNIH1VHOSZgwosLSWnTp65bWkZT_Gh-3EKGT0s4L6CgPnf-esHRoAh1MM_EKjijYYw2XZ1x5Kf_RVIEqdQ8dC_OSPtcZBYrUMBT_Yt4Wm3bsZad6htGQY6aWK4WnHyFV9sDEz57Yt0Fo65kbC07WLBxNx_1_kHO9W053B3Kn8TW-GeWqE5ZbwnP8SWNWqqWd0UxGpPi9FyUxPg2iWiw\u0026h=Gjl33MMFZ3OFeqYn7nFIWrRZiL7YuD2DZJ6ysVLplZE", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "25" ], + "x-ms-client-request-id": [ "76ff64bb-3145-41b2-8c6c-2fe84a598a55" ], + "CommandName": [ "Update-AzSphereDevice" ], + "FullCommandName": [ "Update-AzSphereDevice_UpdateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"69009277-0000-0600-0000-660a896f0000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "eb506fe6-0c3d-4c0d-aa41-1cae8dab560d" ], + "x-ms-correlation-request-id": [ "6ac89943-8317-4fa5-8fe9-3a731a646de8" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T101646Z:6ac89943-8317-4fa5-8fe9-3a731a646de8" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 318A0CBF405E4D388734FEDFE3650449 Ref B: MAA201060516039 Ref C: 2024-04-01T10:16:45Z" ], + "Date": [ "Mon, 01 Apr 2024 10:16:46 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1188" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/b594cd51-fb8a-4e57-af78-678a137adf46*DCFDAACE5BC93B20668F74CE987432CEB94BA61001506E4167900B36E3FD98F4\",\"name\":\"b594cd51-fb8a-4e57-af78-678a137adf46*DCFDAACE5BC93B20668F74CE987432CEB94BA61001506E4167900B36E3FD98F4\",\"resourceId\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Field Test/devices/B15332603BA55FB52B00FEC8549FDAA46B7FB6BA35694BC8943131CCB4B302846D224580A27880A2996B9FD4F1B2699400B1627059B6A90D67DD29E2984EE147\",\"status\":\"Succeeded\",\"startTime\":\"2024-04-01T10:16:12.4330973Z\",\"endTime\":\"2024-04-01T10:16:15.8921317Z\",\"error\":{\"target\":\"DeviceUpdateDeviceGroup\",\"details\":[]},\"properties\":{\"targetResourceId\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2/deviceGroups/Development/devices/B15332603BA55FB52B00FEC8549FDAA46B7FB6BA35694BC8943131CCB4B302846D224580A27880A2996B9FD4F1B2699400B1627059B6A90D67DD29E2984EE147\"}}", + "isContentBase64": false + } + }, + "AzSphereDeviceSecondScenario+[NoContext]+UpdateDeviceUnassign+$PATCH+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2/deviceGroups/Development/devices/DBB0E0CB8BD961A6129096E1E8A1375AC1FA274F030C08161B37AE3BC5A94F443BDB628CF257BC5BC810D8768C03B6F5CA301A35CD0169F56A49624255964560?api-version=2024-04-01+1": { + "Request": { + "Method": "PATCH", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2/deviceGroups/Development/devices/DBB0E0CB8BD961A6129096E1E8A1375AC1FA274F030C08161B37AE3BC5A94F443BDB628CF257BC5BC810D8768C03B6F5CA301A35CD0169F56A49624255964560?api-version=2024-04-01", + "Content": "{\r\n \"properties\": {\r\n \"deviceGroupId\": \"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/.default/deviceGroups/.default\"\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "226" ] + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Location": [ "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/d025feaa-9e6e-4d3d-9a7d-a208613d2a63*C53163FEB8D2071758A7118352C590EF440C47A793C63FF141B928FE05D08CF6?api-version=2024-04-01\u0026t=638475634095184999\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMTUwODE5WhcNMjUwMTI0M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DzD80TS3LYzVk2nzUVxEqPaGhpA-vs_ttjm7hDhYk80OIsQ_YZd286sA58Q\u0026s=XJUOja3KpAN0JDpphNAFRonCTs7LvzMWWHF0ffbgW4r63qNp-CTF77cfpCO_q4p3HNgnkS0IGuiakj_oQsp2qrPDgcWyWggRsL7q0DkBEXVK7Q5eVU2SrDrS80Z1fChp5pF8JuYZo3xw56DB0CD1wmfnzN6-KlNqaINr__JcKOISHzXdiM8DGVSNDQ0hKNi0dvdB9vDxJx7hwntqgW22o0G318ElqItXGpK0w9ZsKblbbe48WMktslzu-Mupz4MNKamtm-lwe0SSdS3GRlE7VD8kexPRwfV7PcSSuoVViKxOGJTmDzCcnsePBMNnYKH8nlT7ip5EeRrfcw2pemnrag\u0026h=ozu_lTioaY2PwqqqI0caJ3A_sJI892E_r-87HNthLwI" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "9c0f2d4e-1ba0-42e9-aabe-9d276c1558f6" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/d025feaa-9e6e-4d3d-9a7d-a208613d2a63*C53163FEB8D2071758A7118352C590EF440C47A793C63FF141B928FE05D08CF6?api-version=2024-04-01\u0026t=638475634095184999\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMTUwODE5WhcNMjUwMTI0MTUwODE5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5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pAN0JDpphNAFRonCTs7LvzMWWHF0ffbgW4r63qNp-CTF77cfpCO_q4p3HNgnkS0IGuiakj_oQsp2qrPDgcWyWggRsL7q0DkBEXVK7Q5eVU2SrDrS80Z1fChp5pF8JuYZo3xw56DB0CD1wmfnzN6-KlNqaINr__JcKOISHzXdiM8DGVSNDQ0hKNi0dvdB9vDxJx7hwntqgW22o0G318ElqItXGpK0w9ZsKblbbe48WMktslzu-Mupz4MNKamtm-lwe0SSdS3GRlE7VD8kexPRwfV7PcSSuoVViKxOGJTmDzCcnsePBMNnYKH8nlT7ip5EeRrfcw2pemnrag\u0026h=ozu_lTioaY2PwqqqI0caJ3A_sJI892E_r-87HNthLwI" ], + "x-ms-request-id": [ "d025feaa-9e6e-4d3d-9a7d-a208613d2a63" ], + "x-ms-correlation-request-id": [ "470d65f9-3edb-4c57-86a9-0214f734b716" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T101649Z:470d65f9-3edb-4c57-86a9-0214f734b716" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 98FAE8848B8A45A7B60C1BE29ECF2E3C Ref B: MAA201060516039 Ref C: 2024-04-01T10:16:46Z" ], + "Date": [ "Mon, 01 Apr 2024 10:16:49 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "4" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "bnVsbA==", + "isContentBase64": false + } + }, + "AzSphereDeviceSecondScenario+[NoContext]+UpdateDeviceUnassign+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/d025feaa-9e6e-4d3d-9a7d-a208613d2a63*C53163FEB8D2071758A7118352C590EF440C47A793C63FF141B928FE05D08CF6?api-version=2024-04-01\u0026t=638475634095184999\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_Zgls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vEkGqxvBpcwzATT8KQYU2-J2iL5slKYZIACN6THLJn5BI6dAecS1X4PJ5vNAgI8qlsYmnafZSCIrWLUQQUsZeLUaxy3t-hozvyfVe-B-nktPdgNv3-iCsI0AtlvezwfFcJXQHQeNByXg5oxXPIe02On7O1u8swvMta16Va5_kDzD80TS3LYzVk2nzUVxEqPaGhpA-vs_ttjm7hDhYk80OIsQ_YZd286sA58Q\u0026s=XJUOja3KpAN0JDpphNAFRonCTs7LvzMWWHF0ffbgW4r63qNp-CTF77cfpCO_q4p3HNgnkS0IGuiakj_oQsp2qrPDgcWyWggRsL7q0DkBEXVK7Q5eVU2SrDrS80Z1fChp5pF8JuYZo3xw56DB0CD1wmfnzN6-KlNqaINr__JcKOISHzXdiM8DGVSNDQ0hKNi0dvdB9vDxJx7hwntqgW22o0G318ElqItXGpK0w9ZsKblbbe48WMktslzu-Mupz4MNKamtm-lwe0SSdS3GRlE7VD8kexPRwfV7PcSSuoVViKxOGJTmDzCcnsePBMNnYKH8nlT7ip5EeRrfcw2pemnrag\u0026h=ozu_lTioaY2PwqqqI0caJ3A_sJI892E_r-87HNthLwI+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/d025feaa-9e6e-4d3d-9a7d-a208613d2a63*C53163FEB8D2071758A7118352C590EF440C47A793C63FF141B928FE05D08CF6?api-version=2024-04-01\u0026t=638475634095184999\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMTUwODE5WhcNMjUwMTI0MTUwODE5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aW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026s=XJUOja3KpAN0JDpphNAFRonCTs7LvzMWWHF0ffbgW4r63qNp-CTF77cfpCO_q4p3HNgnkS0IGuiakj_oQsp2qrPDgcWyWggRsL7q0DkBEXVK7Q5eVU2SrDrS80Z1fChp5pF8JuYZo3xw56DB0CD1wmfnzN6-KlNqaINr__JcKOISHzXdiM8DGVSNDQ0hKNi0dvdB9vDxJx7hwntqgW22o0G318ElqItXGpK0w9ZsKblbbe48WMktslzu-Mupz4MNKamtm-lwe0SSdS3GRlE7VD8kexPRwfV7PcSSuoVViKxOGJTmDzCcnsePBMNnYKH8nlT7ip5EeRrfcw2pemnrag\u0026h=ozu_lTioaY2PwqqqI0caJ3A_sJI892E_r-87HNthLwI", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "27" ], + "x-ms-client-request-id": [ "59ecdfb1-fb48-41a3-b971-b93c9cd3c627" ], + "CommandName": [ "Update-AzSphereDevice" ], + "FullCommandName": [ "Update-AzSphereDevice_UpdateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"69003778-0000-0600-0000-660a89930000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "76ada09c-abae-4ad5-a8ec-3a8af431a052" ], + "x-ms-correlation-request-id": [ "f91a9229-d0c6-4a1d-95f2-988d2e40d95d" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T101720Z:f91a9229-d0c6-4a1d-95f2-988d2e40d95d" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 23BB7068398443A3B266688915EF5E4C Ref B: MAA201060516039 Ref C: 2024-04-01T10:17:19Z" ], + "Date": [ "Mon, 01 Apr 2024 10:17:20 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1186" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/d025feaa-9e6e-4d3d-9a7d-a208613d2a63*C53163FEB8D2071758A7118352C590EF440C47A793C63FF141B928FE05D08CF6\",\"name\":\"d025feaa-9e6e-4d3d-9a7d-a208613d2a63*C53163FEB8D2071758A7118352C590EF440C47A793C63FF141B928FE05D08CF6\",\"resourceId\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2/deviceGroups/Development/devices/DBB0E0CB8BD961A6129096E1E8A1375AC1FA274F030C08161B37AE3BC5A94F443BDB628CF257BC5BC810D8768C03B6F5CA301A35CD0169F56A49624255964560\",\"status\":\"Succeeded\",\"startTime\":\"2024-04-01T10:16:47.4597841Z\",\"endTime\":\"2024-04-01T10:16:51.1551359Z\",\"error\":{\"target\":\"DeviceUpdateDeviceGroup\",\"details\":[]},\"properties\":{\"targetResourceId\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/.default/deviceGroups/.default/devices/DBB0E0CB8BD961A6129096E1E8A1375AC1FA274F030C08161B37AE3BC5A94F443BDB628CF257BC5BC810D8768C03B6F5CA301A35CD0169F56A49624255964560\"}}", + "isContentBase64": false + } + }, + "AzSphereDeviceSecondScenario+[NoContext]+UpdateDeviceUnassign+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/d025feaa-9e6e-4d3d-9a7d-a208613d2a63*C53163FEB8D2071758A7118352C590EF440C47A793C63FF141B928FE05D08CF6?api-version=2024-04-01\u0026t=638475634095184999\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMTUwODE5WhcNMjUwMTI0MTUwODE5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK902W8oGHqHsYxfQcAXt6Ljumrh6DLgGihvCAJqh_U0j8R4Jupt1lXUnhMY-cA7JAT9q7SEoTZskdrko1uzzlaykxYQUacRB8irTYwbgK6DCIqWuOd2G-W2g3eWAyxRb-Dffjnsz-vBsjd1fyP0MvIXDSDMzp2oK65BSxTbBiStV3YxtKZ3eONvKga4d77iEw0zAZHIFkt0PSHzHO7kk-b_trhadwDxPYnjrQOGmouEj7HuNoC8H7-vKZvgbeplfrHtJO9vq0TOUUqIGlT236cbPe62XQNJRim_aa3chEFUmacjUnjEZtgJjup_tDQ0iV_Oe0ZqRBBGzpjoK23Wch0CAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQ08xUEtJSU5UQ0EwMS5BTUU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wYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAGj6QqaLOPa3RZUHMPeeSymifn86nh52yaIojZbdHUiE_o0iWzV-2ZRZOxE2IgkOrAeMYXIUhMoqV7XxTwfpi6zGwrzIeuTWMbNjgzbIZGIMJCbUyNbvEkGqxvBpcwzATT8KQYU2-J2iL5slKYZIACN6THLJn5BI6dAecS1X4PJ5vNAgI8qlsYmnafZSCIrWLUQQUsZeLUaxy3t-hozvyfVe-B-nktPdgNv3-iCsI0AtlvezwfFcJXQHQeNByXg5oxXPIe02On7O1u8swvMta16Va5_kDzD80TS3LYzVk2nzUVxEqPaGhpA-vs_ttjm7hDhYk80OIsQ_YZd286sA58Q\u0026s=XJUOja3KpAN0JDpphNAFRonCTs7LvzMWWHF0ffbgW4r63qNp-CTF77cfpCO_q4p3HNgnkS0IGuiakj_oQsp2qrPDgcWyWggRsL7q0DkBEXVK7Q5eVU2SrDrS80Z1fChp5pF8JuYZo3xw56DB0CD1wmfnzN6-KlNqaINr__JcKOISHzXdiM8DGVSNDQ0hKNi0dvdB9vDxJx7hwntqgW22o0G318ElqItXGpK0w9ZsKblbbe48WMktslzu-Mupz4MNKamtm-lwe0SSdS3GRlE7VD8kexPRwfV7PcSSuoVViKxOGJTmDzCcnsePBMNnYKH8nlT7ip5EeRrfcw2pemnrag\u0026h=ozu_lTioaY2PwqqqI0caJ3A_sJI892E_r-87HNthLwI+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/d025feaa-9e6e-4d3d-9a7d-a208613d2a63*C53163FEB8D2071758A7118352C590EF440C47A793C63FF141B928FE05D08CF6?api-version=2024-04-01\u0026t=638475634095184999\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImi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WLUQQUsZeLUaxy3t-hozvyfVe-B-nktPdgNv3-iCsI0AtlvezwfFcJXQHQeNByXg5oxXPIe02On7O1u8swvMta16Va5_kDzD80TS3LYzVk2nzUVxEqPaGhpA-vs_ttjm7hDhYk80OIsQ_YZd286sA58Q\u0026s=XJUOja3KpAN0JDpphNAFRonCTs7LvzMWWHF0ffbgW4r63qNp-CTF77cfpCO_q4p3HNgnkS0IGuiakj_oQsp2qrPDgcWyWggRsL7q0DkBEXVK7Q5eVU2SrDrS80Z1fChp5pF8JuYZo3xw56DB0CD1wmfnzN6-KlNqaINr__JcKOISHzXdiM8DGVSNDQ0hKNi0dvdB9vDxJx7hwntqgW22o0G318ElqItXGpK0w9ZsKblbbe48WMktslzu-Mupz4MNKamtm-lwe0SSdS3GRlE7VD8kexPRwfV7PcSSuoVViKxOGJTmDzCcnsePBMNnYKH8nlT7ip5EeRrfcw2pemnrag\u0026h=ozu_lTioaY2PwqqqI0caJ3A_sJI892E_r-87HNthLwI", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "28" ], + "x-ms-client-request-id": [ "59ecdfb1-fb48-41a3-b971-b93c9cd3c627" ], + "CommandName": [ "Update-AzSphereDevice" ], + "FullCommandName": [ "Update-AzSphereDevice_UpdateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"69003778-0000-0600-0000-660a89930000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "ca179df2-7b36-4745-ae06-07f5e40abda3" ], + "x-ms-correlation-request-id": [ "660d1c41-dee3-438d-8694-9871513bc1bb" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T101721Z:660d1c41-dee3-438d-8694-9871513bc1bb" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 729F4D8EF96E402FAFAC400082365754 Ref B: MAA201060516039 Ref C: 2024-04-01T10:17:20Z" ], + "Date": [ "Mon, 01 Apr 2024 10:17:21 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1186" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/d025feaa-9e6e-4d3d-9a7d-a208613d2a63*C53163FEB8D2071758A7118352C590EF440C47A793C63FF141B928FE05D08CF6\",\"name\":\"d025feaa-9e6e-4d3d-9a7d-a208613d2a63*C53163FEB8D2071758A7118352C590EF440C47A793C63FF141B928FE05D08CF6\",\"resourceId\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2/deviceGroups/Development/devices/DBB0E0CB8BD961A6129096E1E8A1375AC1FA274F030C08161B37AE3BC5A94F443BDB628CF257BC5BC810D8768C03B6F5CA301A35CD0169F56A49624255964560\",\"status\":\"Succeeded\",\"startTime\":\"2024-04-01T10:16:47.4597841Z\",\"endTime\":\"2024-04-01T10:16:51.1551359Z\",\"error\":{\"target\":\"DeviceUpdateDeviceGroup\",\"details\":[]},\"properties\":{\"targetResourceId\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/.default/deviceGroups/.default/devices/DBB0E0CB8BD961A6129096E1E8A1375AC1FA274F030C08161B37AE3BC5A94F443BDB628CF257BC5BC810D8768C03B6F5CA301A35CD0169F56A49624255964560\"}}", + "isContentBase64": false + } + }, + "AzSphereDeviceSecondScenario+[NoContext]+UpdateDeviceUnassign+$PATCH+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2/deviceGroups/Development/devices/B15332603BA55FB52B00FEC8549FDAA46B7FB6BA35694BC8943131CCB4B302846D224580A27880A2996B9FD4F1B2699400B1627059B6A90D67DD29E2984EE147?api-version=2024-04-01+4": { + "Request": { + "Method": "PATCH", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2/deviceGroups/Development/devices/B15332603BA55FB52B00FEC8549FDAA46B7FB6BA35694BC8943131CCB4B302846D224580A27880A2996B9FD4F1B2699400B1627059B6A90D67DD29E2984EE147?api-version=2024-04-01", + "Content": "{\r\n \"properties\": {\r\n \"deviceGroupId\": \"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/.default/deviceGroups/.default\"\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "226" ] + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Location": [ "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/998a4cd4-8d9e-4b1a-80f2-e8c1675de846*C4C217914099368B956CC7955DEA6BA1D99B048580D0F6F6A635632C3173872D?api-version=2024-04-01\u0026t=638475634453319822\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMR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THLJn5BI6dAecS1X4PJ5vNAgI8qlsYmnafZSCIrWLUQQUsZeLUaxy3t-hozvyfVe-B-nktPdgNv3-iCsI0AtlvezwfFcJXQHQeNByXg5oxXPIe02On7O1u8swvMta16Va5_kDzD80TS3LYzVk2nzUVxEqPaGhpA-vs_ttjm7hDhYk80OIsQ_YZd286sA58Q\u0026s=FpRA_rpyYape6OBYfdjbDZMjfJJ-bppYF6tTkN4K4yHB0yqlN7-n-OEMXE6JS04mB8rp4-sZxu-RjKnv8KL3BN_53YH8hJfvAWZrnSdPARyhChgSeJpgOFRwFpuYWlS2mrlyhW7MQ9T9UqlXHGRO_hZ6PMZfQEURsSTpSDzvPn7d1Oh-os0aEtDMgRM7P1gusdKvJ_Tn6jsFTqqNo8t5Lug1u-qjQ606xP3I3Rm_NEksghApdTUYl1i-Y3muojNrwXSTMJw7HvPrXRO4FKqUc6oWaZB3Suxohs5FJmCM8q3GOqIi5O5bRk-ldclIaNGtLDKhZiwu3hX3fKHKdhIe1A\u0026h=ypW7FdlFuaLDomVzwBE2kqi1kaCkKzKntLFH0bTVWMg" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "d8816429-e1ef-4ba2-aa16-d5f0e9243011" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/998a4cd4-8d9e-4b1a-80f2-e8c1675de846*C4C217914099368B956CC7955DEA6BA1D99B048580D0F6F6A635632C3173872D?api-version=2024-04-01\u0026t=638475634453319822\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRg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ozvyfVe-B-nktPdgNv3-iCsI0AtlvezwfFcJXQHQeNByXg5oxXPIe02On7O1u8swvMta16Va5_kDzD80TS3LYzVk2nzUVxEqPaGhpA-vs_ttjm7hDhYk80OIsQ_YZd286sA58Q\u0026s=FpRA_rpyYape6OBYfdjbDZMjfJJ-bppYF6tTkN4K4yHB0yqlN7-n-OEMXE6JS04mB8rp4-sZxu-RjKnv8KL3BN_53YH8hJfvAWZrnSdPARyhChgSeJpgOFRwFpuYWlS2mrlyhW7MQ9T9UqlXHGRO_hZ6PMZfQEURsSTpSDzvPn7d1Oh-os0aEtDMgRM7P1gusdKvJ_Tn6jsFTqqNo8t5Lug1u-qjQ606xP3I3Rm_NEksghApdTUYl1i-Y3muojNrwXSTMJw7HvPrXRO4FKqUc6oWaZB3Suxohs5FJmCM8q3GOqIi5O5bRk-ldclIaNGtLDKhZiwu3hX3fKHKdhIe1A\u0026h=ypW7FdlFuaLDomVzwBE2kqi1kaCkKzKntLFH0bTVWMg" ], + "x-ms-request-id": [ "998a4cd4-8d9e-4b1a-80f2-e8c1675de846" ], + "x-ms-correlation-request-id": [ "01e69744-d4fb-4b97-8f62-5311c14c022d" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T101725Z:01e69744-d4fb-4b97-8f62-5311c14c022d" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: BC5115B627BF4885B2BB157C95B7E078 Ref B: MAA201060516039 Ref C: 2024-04-01T10:17:21Z" ], + "Date": [ "Mon, 01 Apr 2024 10:17:24 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "4" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "bnVsbA==", + "isContentBase64": false + } + }, + "AzSphereDeviceSecondScenario+[NoContext]+UpdateDeviceUnassign+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/998a4cd4-8d9e-4b1a-80f2-e8c1675de846*C4C217914099368B956CC7955DEA6BA1D99B048580D0F6F6A635632C3173872D?api-version=2024-04-01\u0026t=638475634453319822\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMTUwODE5WhcNMjUwMTI0MTUwODE5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK902W8oGHqHsYxfQcAXt6Ljumrh6DLgGihvCAJqh_U0j8R4Jupt1lXUnhMY-cA7JAT9q7SEoTZskdrko1uzzlaykxYQUacRB8irTYwbgK6DCIqWuOd2G-W2g3eWAyxRb-Dffjnsz-vBsjd1fyP0MvIXDSDMzp2oK65BSxTbBiStV3YxtKZ3eONvKga4d77iEw0zAZHIFkt0PSHzHO7kk-b_trhadwDxPYnjrQOGmouEj7HuNoC8H7-vKZvgbeplfrHtJO9vq0TOUUqIGlT236cbPe62XQNJRim_aa3chEFUmacjUnjEZtgJjup_tDQ0iV_Oe0ZqRBBGzpjoK23Wch0CAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQ08xUEtJSU5UQ0EwM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DAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAGj6QqaLOPa3RZUHMPeeSymifn86nh52yaIojZbdHUiE_o0iWzV-2ZRZOxE2IgkOrAeMYXIUhMoqV7XxTwfpi6zGwrzIeuTWMbNjgzbIZGIMJCbUyNbvEkGqxvBpcwzATT8KQYU2-J2iL5slKYZIACN6THLJn5BI6dAecS1X4PJ5vNAgI8qlsYmnafZSCIrWLUQQUsZeLUaxy3t-hozvyfVe-B-nktPdgNv3-iCsI0AtlvezwfFcJXQHQeNByXg5oxXPIe02On7O1u8swvMta16Va5_kDzD80TS3LYzVk2nzUVxEqPaGhpA-vs_ttjm7hDhYk80OIsQ_YZd286sA58Q\u0026s=FpRA_rpyYape6OBYfdjbDZMjfJJ-bppYF6tTkN4K4yHB0yqlN7-n-OEMXE6JS04mB8rp4-sZxu-RjKnv8KL3BN_53YH8hJfvAWZrnSdPARyhChgSeJpgOFRwFpuYWlS2mrlyhW7MQ9T9UqlXHGRO_hZ6PMZfQEURsSTpSDzvPn7d1Oh-os0aEtDMgRM7P1gusdKvJ_Tn6jsFTqqNo8t5Lug1u-qjQ606xP3I3Rm_NEksghApdTUYl1i-Y3muojNrwXSTMJw7HvPrXRO4FKqUc6oWaZB3Suxohs5FJmCM8q3GOqIi5O5bRk-ldclIaNGtLDKhZiwu3hX3fKHKdhIe1A\u0026h=ypW7FdlFuaLDomVzwBE2kqi1kaCkKzKntLFH0bTVWMg+5": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/998a4cd4-8d9e-4b1a-80f2-e8c1675de846*C4C217914099368B956CC7955DEA6BA1D99B048580D0F6F6A635632C3173872D?api-version=2024-04-01\u0026t=638475634453319822\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyL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4PJ5vNAgI8qlsYmnafZSCIrWLUQQUsZeLUaxy3t-hozvyfVe-B-nktPdgNv3-iCsI0AtlvezwfFcJXQHQeNByXg5oxXPIe02On7O1u8swvMta16Va5_kDzD80TS3LYzVk2nzUVxEqPaGhpA-vs_ttjm7hDhYk80OIsQ_YZd286sA58Q\u0026s=FpRA_rpyYape6OBYfdjbDZMjfJJ-bppYF6tTkN4K4yHB0yqlN7-n-OEMXE6JS04mB8rp4-sZxu-RjKnv8KL3BN_53YH8hJfvAWZrnSdPARyhChgSeJpgOFRwFpuYWlS2mrlyhW7MQ9T9UqlXHGRO_hZ6PMZfQEURsSTpSDzvPn7d1Oh-os0aEtDMgRM7P1gusdKvJ_Tn6jsFTqqNo8t5Lug1u-qjQ606xP3I3Rm_NEksghApdTUYl1i-Y3muojNrwXSTMJw7HvPrXRO4FKqUc6oWaZB3Suxohs5FJmCM8q3GOqIi5O5bRk-ldclIaNGtLDKhZiwu3hX3fKHKdhIe1A\u0026h=ypW7FdlFuaLDomVzwBE2kqi1kaCkKzKntLFH0bTVWMg", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "30" ], + "x-ms-client-request-id": [ "776b7c41-6d4b-4f48-ac40-848a57e2a6b2" ], + "CommandName": [ "Update-AzSphereDevice" ], + "FullCommandName": [ "Update-AzSphereDevice_UpdateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"6900b179-0000-0600-0000-660a89b60000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "16c9cf4b-099b-4efe-8970-9d5c4fad1385" ], + "x-ms-correlation-request-id": [ "3a058cca-ea07-4b9f-af91-e35406cd2f56" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T101756Z:3a058cca-ea07-4b9f-af91-e35406cd2f56" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: D613C744881143C1AD6BC308FA93BEB9 Ref B: MAA201060516039 Ref C: 2024-04-01T10:17:55Z" ], + "Date": [ "Mon, 01 Apr 2024 10:17:55 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1186" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/998a4cd4-8d9e-4b1a-80f2-e8c1675de846*C4C217914099368B956CC7955DEA6BA1D99B048580D0F6F6A635632C3173872D\",\"name\":\"998a4cd4-8d9e-4b1a-80f2-e8c1675de846*C4C217914099368B956CC7955DEA6BA1D99B048580D0F6F6A635632C3173872D\",\"resourceId\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2/deviceGroups/Development/devices/B15332603BA55FB52B00FEC8549FDAA46B7FB6BA35694BC8943131CCB4B302846D224580A27880A2996B9FD4F1B2699400B1627059B6A90D67DD29E2984EE147\",\"status\":\"Succeeded\",\"startTime\":\"2024-04-01T10:17:23.2040946Z\",\"endTime\":\"2024-04-01T10:17:26.8896674Z\",\"error\":{\"target\":\"DeviceUpdateDeviceGroup\",\"details\":[]},\"properties\":{\"targetResourceId\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/.default/deviceGroups/.default/devices/B15332603BA55FB52B00FEC8549FDAA46B7FB6BA35694BC8943131CCB4B302846D224580A27880A2996B9FD4F1B2699400B1627059B6A90D67DD29E2984EE147\"}}", + "isContentBase64": false + } + }, + "AzSphereDeviceSecondScenario+[NoContext]+UpdateDeviceUnassign+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/998a4cd4-8d9e-4b1a-80f2-e8c1675de846*C4C217914099368B956CC7955DEA6BA1D99B048580D0F6F6A635632C3173872D?api-version=2024-04-01\u0026t=638475634453319822\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMTUwODE5WhcNMjUwMTI0MTUwODE5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK902W8oGHqHsYxfQcAXt6Ljumrh6DLgGihvCAJqh_U0j8R4Jupt1lXUnhMY-cA7JAT9q7SEoTZskdrko1uzzlaykxYQUacRB8irTYwbgK6DCIqWuOd2G-W2g3eWAyxRb-Dffjnsz-vBsjd1fyP0MvIXDSDMzp2oK65BSxTbBiStV3YxtKZ3eONvKga4d77iEw0zAZHIFkt0PSHzHO7kk-b_trhadwDxPYnjrQOGmouEj7HuNoC8H7-vKZvgbeplfrHtJO9vq0TOUUqIGlT236cbPe62XQNJRim_aa3chEFUmacjUnjEZtgJjup_tDQ0iV_Oe0ZqRBBGzpjoK23Wch0CAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwL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wMDUuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAGj6QqaLOPa3RZUHMPeeSymifn86nh52yaIojZbdHUiE_o0iWzV-2ZRZOxE2IgkOrAeMYXIUhMoqV7XxTwfpi6zGwrzIeuTWMbNjgzbIZGIMJCbUyNbvEkGqxvBpcwzATT8KQYU2-J2iL5slKYZIACN6THLJn5BI6dAecS1X4PJ5vNAgI8qlsYmnafZSCIrWLUQQUsZeLUaxy3t-hozvyfVe-B-nktPdgNv3-iCsI0AtlvezwfFcJXQHQeNByXg5oxXPIe02On7O1u8swvMta16Va5_kDzD80TS3LYzVk2nzUVxEqPaGhpA-vs_ttjm7hDhYk80OIsQ_YZd286sA58Q\u0026s=FpRA_rpyYape6OBYfdjbDZMjfJJ-bppYF6tTkN4K4yHB0yqlN7-n-OEMXE6JS04mB8rp4-sZxu-RjKnv8KL3BN_53YH8hJfvAWZrnSdPARyhChgSeJpgOFRwFpuYWlS2mrlyhW7MQ9T9UqlXHGRO_hZ6PMZfQEURsSTpSDzvPn7d1Oh-os0aEtDMgRM7P1gusdKvJ_Tn6jsFTqqNo8t5Lug1u-qjQ606xP3I3Rm_NEksghApdTUYl1i-Y3muojNrwXSTMJw7HvPrXRO4FKqUc6oWaZB3Suxohs5FJmCM8q3GOqIi5O5bRk-ldclIaNGtLDKhZiwu3hX3fKHKdhIe1A\u0026h=ypW7FdlFuaLDomVzwBE2kqi1kaCkKzKntLFH0bTVWMg+6": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/998a4cd4-8d9e-4b1a-80f2-e8c1675de846*C4C217914099368B956CC7955DEA6BA1D99B048580D0F6F6A635632C3173872D?api-version=2024-04-01\u0026t=638475634453319822\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMTUwODE5WhcNMjUwMTI0MTUwODE5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK902W8oGHqHsYxfQcAXt6Ljumrh6DLgGihvCAJqh_U0j8R4Jupt1lXUnhMY-cA7JAT9q7SEoTZskdrko1uzzlaykxYQUacRB8irTYwbgK6DCIqWuOd2G-W2g3eWAyxRb-Dffjnsz-vBsjd1fyP0MvIXDSDMzp2oK65BSxTbBiStV3YxtKZ3eONvKga4d77iEw0zAZHIFkt0PSHzHO7kk-b_trhadwDxPYnjrQOGmouEj7HuNoC8H7-vKZvgbeplfrHtJO9vq0TOUUqIGlT236cbPe62XQNJRim_aa3chEFUmacjUnjEZtgJjup_tDQ0iV_Oe0ZqRBBGzpjoK23Wch0CAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJ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hvcNAQELBQADggEBAGj6QqaLOPa3RZUHMPeeSymifn86nh52yaIojZbdHUiE_o0iWzV-2ZRZOxE2IgkOrAeMYXIUhMoqV7XxTwfpi6zGwrzIeuTWMbNjgzbIZGIMJCbUyNbvEkGqxvBpcwzATT8KQYU2-J2iL5slKYZIACN6THLJn5BI6dAecS1X4PJ5vNAgI8qlsYmnafZSCIrWLUQQUsZeLUaxy3t-hozvyfVe-B-nktPdgNv3-iCsI0AtlvezwfFcJXQHQeNByXg5oxXPIe02On7O1u8swvMta16Va5_kDzD80TS3LYzVk2nzUVxEqPaGhpA-vs_ttjm7hDhYk80OIsQ_YZd286sA58Q\u0026s=FpRA_rpyYape6OBYfdjbDZMjfJJ-bppYF6tTkN4K4yHB0yqlN7-n-OEMXE6JS04mB8rp4-sZxu-RjKnv8KL3BN_53YH8hJfvAWZrnSdPARyhChgSeJpgOFRwFpuYWlS2mrlyhW7MQ9T9UqlXHGRO_hZ6PMZfQEURsSTpSDzvPn7d1Oh-os0aEtDMgRM7P1gusdKvJ_Tn6jsFTqqNo8t5Lug1u-qjQ606xP3I3Rm_NEksghApdTUYl1i-Y3muojNrwXSTMJw7HvPrXRO4FKqUc6oWaZB3Suxohs5FJmCM8q3GOqIi5O5bRk-ldclIaNGtLDKhZiwu3hX3fKHKdhIe1A\u0026h=ypW7FdlFuaLDomVzwBE2kqi1kaCkKzKntLFH0bTVWMg", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "31" ], + "x-ms-client-request-id": [ "776b7c41-6d4b-4f48-ac40-848a57e2a6b2" ], + "CommandName": [ "Update-AzSphereDevice" ], + "FullCommandName": [ "Update-AzSphereDevice_UpdateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"6900b179-0000-0600-0000-660a89b60000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "6514cd29-fd26-42fd-a3a8-997a35ef79e5" ], + "x-ms-correlation-request-id": [ "c162773c-2252-44d5-9737-4b80465b009c" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T101756Z:c162773c-2252-44d5-9737-4b80465b009c" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 502E561658184B5AB4EBFEC006D4B522 Ref B: MAA201060516039 Ref C: 2024-04-01T10:17:56Z" ], + "Date": [ "Mon, 01 Apr 2024 10:17:56 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1186" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/998a4cd4-8d9e-4b1a-80f2-e8c1675de846*C4C217914099368B956CC7955DEA6BA1D99B048580D0F6F6A635632C3173872D\",\"name\":\"998a4cd4-8d9e-4b1a-80f2-e8c1675de846*C4C217914099368B956CC7955DEA6BA1D99B048580D0F6F6A635632C3173872D\",\"resourceId\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2/deviceGroups/Development/devices/B15332603BA55FB52B00FEC8549FDAA46B7FB6BA35694BC8943131CCB4B302846D224580A27880A2996B9FD4F1B2699400B1627059B6A90D67DD29E2984EE147\",\"status\":\"Succeeded\",\"startTime\":\"2024-04-01T10:17:23.2040946Z\",\"endTime\":\"2024-04-01T10:17:26.8896674Z\",\"error\":{\"target\":\"DeviceUpdateDeviceGroup\",\"details\":[]},\"properties\":{\"targetResourceId\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/.default/deviceGroups/.default/devices/B15332603BA55FB52B00FEC8549FDAA46B7FB6BA35694BC8943131CCB4B302846D224580A27880A2996B9FD4F1B2699400B1627059B6A90D67DD29E2984EE147\"}}", + "isContentBase64": false + } + }, + "AzSphereDeviceSecondScenario+[NoContext]+UpdateDeviceUnassign+$PATCH+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Development/devices/0B3703164F0F4F20AAD0A2CEE26E2CBE0095B423A67C999B288410A2159EB7138FD6813438D765B5DE1C3F4C314E49B74A1D82714DDD7B8BA6F369C8D89A2BB2?api-version=2024-04-01+7": { + "Request": { + "Method": "PATCH", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Development/devices/0B3703164F0F4F20AAD0A2CEE26E2CBE0095B423A67C999B288410A2159EB7138FD6813438D765B5DE1C3F4C314E49B74A1D82714DDD7B8BA6F369C8D89A2BB2?api-version=2024-04-01", + "Content": "{\r\n \"properties\": {\r\n \"deviceGroupId\": \"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/.default/deviceGroups/.default\"\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "226" ] + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Location": [ "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/ce1c97bb-c2ea-4d17-ad65-31000a7e0300*9AA710C3CB839F28E65651FCEA61E88C5CFD991E3A0E88256C38AEDD3126613E?api-version=2024-04-01\u0026t=638475634797917287\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMTUwODE5WhcNMjUwMTI0MTUwODE5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK902W8oGHqHsYxfQcAXt6Ljumrh6DLgGihvCAJqh_U0j8R4Jupt1lXUnhMY-cA7JAT9q7SEoTZskdrko1uzzlaykxYQUacRB8irTYwbgK6DCIqWuOd2G-W2g3eWAyxRb-Dffjnsz-vBsjd1fyP0MvIXDSDMzp2oK65BSxTbBiStV3YxtKZ3eONvKga4d77iEw0zAZHIFkt0PSHzHO7kk-b_trhadwDxPYnjrQOGmouEj7HuNoC8H7-vKZvgbeplfrHtJO9vq0TOUUqIGlT236cbPe62XQNJRim_aa3chEFUmacjUnjEZtgJjup_tDQ0iV_Oe0ZqRBBGzpjoK23Wch0CAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc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hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAGj6QqaLOPa3RZUHMPeeSymifn86nh52yaIojZbdHUiE_o0iWzV-2ZRZOxE2IgkOrAeMYXIUhMoqV7XxTwfpi6zGwrzIeuTWMbNjgzbIZGIMJCbUyNbvEkGqxvBpcwzATT8KQYU2-J2iL5slKYZIACN6THLJn5BI6dAecS1X4PJ5vNAgI8qlsYmnafZSCIrWLUQQUsZeLUaxy3t-hozvyfVe-B-nktPdgNv3-iCsI0AtlvezwfFcJXQHQeNByXg5oxXPIe02On7O1u8swvMta16Va5_kDzD80TS3LYzVk2nzUVxEqPaGhpA-vs_ttjm7hDhYk80OIsQ_YZd286sA58Q\u0026s=ph2izeClKZvy9QJSKM93x5DGDHT8rZQtdzy8agtUVKSJDxP-IBdqum9y04STc_NWPHQObVUIfmH19uL4VXuUCX_1auI_bp3XAyzOTjccrvKIvA_KoqoTIxknGugq8EjH37lISvofPMhFBGXv9eXOAHVXprm71RzkQSf62HPUf5lYKeF_JUQUBme4iN_2Etr2iKlBShboElWDCKxZEbbP5Gig3tpOnhMFWiri5nR6azfsWqXalLFuMbUTPpZrmKf3sz5aVuv_EQXBOO2qxR02byC2e6SBF7ylPm1Zpjxja8zXBzKbNxXtonrR823RJEQ2WczlFfYswXRbfWwLB9vKGQ\u0026h=dh6faEnx8HhLCF4KPcNjtOt1RQlErqjOm4aDBhdLybg" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "047c43f3-32a7-41d2-aad4-3ec0a7f6544a" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/ce1c97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IhvcNAQELBQADggEBAGj6QqaLOPa3RZUHMPeeSymifn86nh52yaIojZbdHUiE_o0iWzV-2ZRZOxE2IgkOrAeMYXIUhMoqV7XxTwfpi6zGwrzIeuTWMbNjgzbIZGIMJCbUyNbvEkGqxvBpcwzATT8KQYU2-J2iL5slKYZIACN6THLJn5BI6dAecS1X4PJ5vNAgI8qlsYmnafZSCIrWLUQQUsZeLUaxy3t-hozvyfVe-B-nktPdgNv3-iCsI0AtlvezwfFcJXQHQeNByXg5oxXPIe02On7O1u8swvMta16Va5_kDzD80TS3LYzVk2nzUVxEqPaGhpA-vs_ttjm7hDhYk80OIsQ_YZd286sA58Q\u0026s=ph2izeClKZvy9QJSKM93x5DGDHT8rZQtdzy8agtUVKSJDxP-IBdqum9y04STc_NWPHQObVUIfmH19uL4VXuUCX_1auI_bp3XAyzOTjccrvKIvA_KoqoTIxknGugq8EjH37lISvofPMhFBGXv9eXOAHVXprm71RzkQSf62HPUf5lYKeF_JUQUBme4iN_2Etr2iKlBShboElWDCKxZEbbP5Gig3tpOnhMFWiri5nR6azfsWqXalLFuMbUTPpZrmKf3sz5aVuv_EQXBOO2qxR02byC2e6SBF7ylPm1Zpjxja8zXBzKbNxXtonrR823RJEQ2WczlFfYswXRbfWwLB9vKGQ\u0026h=dh6faEnx8HhLCF4KPcNjtOt1RQlErqjOm4aDBhdLybg" ], + "x-ms-request-id": [ "ce1c97bb-c2ea-4d17-ad65-31000a7e0300" ], + "x-ms-correlation-request-id": [ "c4bfac7e-6813-4d25-abe2-723b3afb01b3" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T101759Z:c4bfac7e-6813-4d25-abe2-723b3afb01b3" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 05C209055B174BB5A04D60BF58D47E97 Ref B: MAA201060516039 Ref C: 2024-04-01T10:17:56Z" ], + "Date": [ "Mon, 01 Apr 2024 10:17:59 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "4" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "bnVsbA==", + "isContentBase64": false + } + }, + "AzSphereDeviceSecondScenario+[NoContext]+UpdateDeviceUnassign+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/ce1c97bb-c2ea-4d17-ad65-31000a7e0300*9AA710C3CB839F28E65651FCEA61E88C5CFD991E3A0E88256C38AEDD3126613E?api-version=2024-04-01\u0026t=638475634797917287\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMTUwODE5WhcNMjUwMTI0MTUwODE5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK902W8oGHqHsYxfQcAXt6Ljumrh6DLgGihvCAJqh_U0j8R4Jupt1lXUnhMY-cA7JAT9q7SEoTZskdrko1uzzlaykxYQUacRB8irTYwbgK6DCIqWuOd2G-W2g3eWAyxRb-Dffjnsz-vBsjd1fyP0MvIXDSDMzp2oK65BSxTbBiStV3YxtKZ3eONvKga4d77iEw0zAZHIFkt0PSHzHO7kk-b_trhadwDxPYnjrQOGmouEj7HuNoC8H7-vKZvgbeplfrHtJO9vq0TOUUqIGlT236cbPe62XQNJRim_aa3chEFUmacjUnjEZtgJjup_tDQ0iV_Oe0ZqRBBGzpjoK23Wch0CAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYB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L2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAGj6QqaLOPa3RZUHMPeeSymifn86nh52yaIojZbdHUiE_o0iWzV-2ZRZOxE2IgkOrAeMYXIUhMoqV7XxTwfpi6zGwrzIeuTWMbNjgzbIZGIMJCbUyNbvEkGqxvBpcwzATT8KQYU2-J2iL5slKYZIACN6THLJn5BI6dAecS1X4PJ5vNAgI8qlsYmnafZSCIrWLUQQUsZeLUaxy3t-hozvyfVe-B-nktPdgNv3-iCsI0AtlvezwfFcJXQHQeNByXg5oxXPIe02On7O1u8swvMta16Va5_kDzD80TS3LYzVk2nzUVxEqPaGhpA-vs_ttjm7hDhYk80OIsQ_YZd286sA58Q\u0026s=ph2izeClKZvy9QJSKM93x5DGDHT8rZQtdzy8agtUVKSJDxP-IBdqum9y04STc_NWPHQObVUIfmH19uL4VXuUCX_1auI_bp3XAyzOTjccrvKIvA_KoqoTIxknGugq8EjH37lISvofPMhFBGXv9eXOAHVXprm71RzkQSf62HPUf5lYKeF_JUQUBme4iN_2Etr2iKlBShboElWDCKxZEbbP5Gig3tpOnhMFWiri5nR6azfsWqXalLFuMbUTPpZrmKf3sz5aVuv_EQXBOO2qxR02byC2e6SBF7ylPm1Zpjxja8zXBzKbNxXtonrR823RJEQ2WczlFfYswXRbfWwLB9vKGQ\u0026h=dh6faEnx8HhLCF4KPcNjtOt1RQlErqjOm4aDBhdLybg+8": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/ce1c97bb-c2ea-4d17-ad65-31000a7e0300*9AA710C3CB839F28E65651FCEA61E88C5CFD991E3A0E88256C38AEDD3126613E?api-version=2024-04-01\u0026t=638475634797917287\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMTUwODE5WhcNMjUwMTI0MTUwODE5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK902W8oGHqHsYxfQcAXt6Ljumrh6DLgGihvCAJqh_U0j8R4Jupt1lXUnhMY-cA7JAT9q7SEoTZskdrko1uzzlaykxYQUacRB8irTYwbgK6DCIqWuOd2G-W2g3eWAyxRb-Dffjnsz-vBsjd1fyP0MvIXDSDMzp2oK65BSxTbBiStV3YxtKZ3eONvKga4d77iEw0zAZHIFkt0PSHzHO7kk-b_trhadwDxPYnjrQOGmouEj7HuNoC8H7-vKZvgbeplfrHtJO9vq0TOUUqIGlT236cbPe62XQNJRim_aa3chEFUmacjUnjEZtgJjup_tDQ0iV_Oe0ZqRBBGzpjoK23Wch0CAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0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AwIwDQYJKoZIhvcNAQELBQADggEBAGj6QqaLOPa3RZUHMPeeSymifn86nh52yaIojZbdHUiE_o0iWzV-2ZRZOxE2IgkOrAeMYXIUhMoqV7XxTwfpi6zGwrzIeuTWMbNjgzbIZGIMJCbUyNbvEkGqxvBpcwzATT8KQYU2-J2iL5slKYZIACN6THLJn5BI6dAecS1X4PJ5vNAgI8qlsYmnafZSCIrWLUQQUsZeLUaxy3t-hozvyfVe-B-nktPdgNv3-iCsI0AtlvezwfFcJXQHQeNByXg5oxXPIe02On7O1u8swvMta16Va5_kDzD80TS3LYzVk2nzUVxEqPaGhpA-vs_ttjm7hDhYk80OIsQ_YZd286sA58Q\u0026s=ph2izeClKZvy9QJSKM93x5DGDHT8rZQtdzy8agtUVKSJDxP-IBdqum9y04STc_NWPHQObVUIfmH19uL4VXuUCX_1auI_bp3XAyzOTjccrvKIvA_KoqoTIxknGugq8EjH37lISvofPMhFBGXv9eXOAHVXprm71RzkQSf62HPUf5lYKeF_JUQUBme4iN_2Etr2iKlBShboElWDCKxZEbbP5Gig3tpOnhMFWiri5nR6azfsWqXalLFuMbUTPpZrmKf3sz5aVuv_EQXBOO2qxR02byC2e6SBF7ylPm1Zpjxja8zXBzKbNxXtonrR823RJEQ2WczlFfYswXRbfWwLB9vKGQ\u0026h=dh6faEnx8HhLCF4KPcNjtOt1RQlErqjOm4aDBhdLybg", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "33" ], + "x-ms-client-request-id": [ "f85351df-f65a-4615-a8e2-4eb65ec7fdfe" ], + "CommandName": [ "Update-AzSphereDevice" ], + "FullCommandName": [ "Update-AzSphereDevice_UpdateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"6900b67a-0000-0600-0000-660a89d90000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "59b1b72e-cc84-49e5-8767-78cc57f0e5ed" ], + "x-ms-correlation-request-id": [ "5c51bf7b-1941-4fcd-b02b-ab7607309cbc" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T101830Z:5c51bf7b-1941-4fcd-b02b-ab7607309cbc" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 485B7A36440F44708EB25BEA0E18E9E2 Ref B: MAA201060516039 Ref C: 2024-04-01T10:18:30Z" ], + "Date": [ "Mon, 01 Apr 2024 10:18:30 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1186" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/ce1c97bb-c2ea-4d17-ad65-31000a7e0300*9AA710C3CB839F28E65651FCEA61E88C5CFD991E3A0E88256C38AEDD3126613E\",\"name\":\"ce1c97bb-c2ea-4d17-ad65-31000a7e0300*9AA710C3CB839F28E65651FCEA61E88C5CFD991E3A0E88256C38AEDD3126613E\",\"resourceId\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Development/devices/0B3703164F0F4F20AAD0A2CEE26E2CBE0095B423A67C999B288410A2159EB7138FD6813438D765B5DE1C3F4C314E49B74A1D82714DDD7B8BA6F369C8D89A2BB2\",\"status\":\"Succeeded\",\"startTime\":\"2024-04-01T10:17:57.7477413Z\",\"endTime\":\"2024-04-01T10:18:01.0631005Z\",\"error\":{\"target\":\"DeviceUpdateDeviceGroup\",\"details\":[]},\"properties\":{\"targetResourceId\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/.default/deviceGroups/.default/devices/0B3703164F0F4F20AAD0A2CEE26E2CBE0095B423A67C999B288410A2159EB7138FD6813438D765B5DE1C3F4C314E49B74A1D82714DDD7B8BA6F369C8D89A2BB2\"}}", + "isContentBase64": false + } + }, + "AzSphereDeviceSecondScenario+[NoContext]+UpdateDeviceUnassign+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/ce1c97bb-c2ea-4d17-ad65-31000a7e0300*9AA710C3CB839F28E65651FCEA61E88C5CFD991E3A0E88256C38AEDD3126613E?api-version=2024-04-01\u0026t=638475634797917287\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMTUwODE5WhcNMjUwMTI0MTUwODE5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK902W8oGHqHsYxfQcAXt6Ljumrh6DLgGihvCAJqh_U0j8R4Jupt1lXUnhMY-cA7JAT9q7SEoTZskdrko1uzzlaykxYQUacRB8irTYwbgK6DCIqWuOd2G-W2g3eWAyxRb-Dffjnsz-vBsjd1fyP0MvIXDSDMzp2oK65BSxTbBiStV3YxtKZ3eONvKga4d77iEw0zAZHIFkt0PSHzHO7kk-b_trhadwDxPY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823RJEQ2WczlFfYswXRbfWwLB9vKGQ\u0026h=dh6faEnx8HhLCF4KPcNjtOt1RQlErqjOm4aDBhdLybg+9": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/ce1c97bb-c2ea-4d17-ad65-31000a7e0300*9AA710C3CB839F28E65651FCEA61E88C5CFD991E3A0E88256C38AEDD3126613E?api-version=2024-04-01\u0026t=638475634797917287\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMTUwODE5WhcNMjUwMTI0MTUwODE5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK902W8oGHqHsYxfQcAXt6Ljumrh6DLgGihvCAJqh_U0j8R4Jupt1lXUnhMY-cA7JAT9q7SEoTZskdrko1uzzlaykxYQUacRB8irTYwbgK6DCIqWuOd2G-W2g3eWAyxRb-Dffjnsz-vBsjd1fyP0MvIXDSDMzp2oK65BSxTbBiStV3YxtKZ3eONvKga4d77iEw0zAZHIFkt0PSHzHO7kk-b_trhadwDxPYnjrQOGmouEj7HuNoC8H7-vKZvgbeplfrHtJO9vq0TOUUqIGlT236cbPe62XQNJRim_aa3chEFUmacjUnjEZtgJjup_tDQ0iV_Oe0ZqRBBGzpjoK23Wch0CAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGC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odHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAGj6QqaLOPa3RZUHMPeeSymifn86nh52yaIojZbdHUiE_o0iWzV-2ZRZOxE2IgkOrAeMYXIUhMoqV7XxTwfpi6zGwrzIeuTWMbNjgzbIZGIMJCbUyNbvEkGqxvBpcwzATT8KQYU2-J2iL5slKYZIACN6THLJn5BI6dAecS1X4PJ5vNAgI8qlsYmnafZSCIrWLUQQUsZeLUaxy3t-hozvyfVe-B-nktPdgNv3-iCsI0AtlvezwfFcJXQHQeNByXg5oxXPIe02On7O1u8swvMta16Va5_kDzD80TS3LYzVk2nzUVxEqPaGhpA-vs_ttjm7hDhYk80OIsQ_YZd286sA58Q\u0026s=ph2izeClKZvy9QJSKM93x5DGDHT8rZQtdzy8agtUVKSJDxP-IBdqum9y04STc_NWPHQObVUIfmH19uL4VXuUCX_1auI_bp3XAyzOTjccrvKIvA_KoqoTIxknGugq8EjH37lISvofPMhFBGXv9eXOAHVXprm71RzkQSf62HPUf5lYKeF_JUQUBme4iN_2Etr2iKlBShboElWDCKxZEbbP5Gig3tpOnhMFWiri5nR6azfsWqXalLFuMbUTPpZrmKf3sz5aVuv_EQXBOO2qxR02byC2e6SBF7ylPm1Zpjxja8zXBzKbNxXtonrR823RJEQ2WczlFfYswXRbfWwLB9vKGQ\u0026h=dh6faEnx8HhLCF4KPcNjtOt1RQlErqjOm4aDBhdLybg", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "34" ], + "x-ms-client-request-id": [ "f85351df-f65a-4615-a8e2-4eb65ec7fdfe" ], + "CommandName": [ "Update-AzSphereDevice" ], + "FullCommandName": [ "Update-AzSphereDevice_UpdateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"6900b67a-0000-0600-0000-660a89d90000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "40d7ce76-7bdf-4170-be8b-9e317b9fb0a4" ], + "x-ms-correlation-request-id": [ "ec63e5d9-bb32-405c-ab6b-f4fea5dd9243" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T101831Z:ec63e5d9-bb32-405c-ab6b-f4fea5dd9243" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 9EC410D053114A5B957CC25A198035DE Ref B: MAA201060516039 Ref C: 2024-04-01T10:18:31Z" ], + "Date": [ "Mon, 01 Apr 2024 10:18:31 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1186" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/ce1c97bb-c2ea-4d17-ad65-31000a7e0300*9AA710C3CB839F28E65651FCEA61E88C5CFD991E3A0E88256C38AEDD3126613E\",\"name\":\"ce1c97bb-c2ea-4d17-ad65-31000a7e0300*9AA710C3CB839F28E65651FCEA61E88C5CFD991E3A0E88256C38AEDD3126613E\",\"resourceId\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Development/devices/0B3703164F0F4F20AAD0A2CEE26E2CBE0095B423A67C999B288410A2159EB7138FD6813438D765B5DE1C3F4C314E49B74A1D82714DDD7B8BA6F369C8D89A2BB2\",\"status\":\"Succeeded\",\"startTime\":\"2024-04-01T10:17:57.7477413Z\",\"endTime\":\"2024-04-01T10:18:01.0631005Z\",\"error\":{\"target\":\"DeviceUpdateDeviceGroup\",\"details\":[]},\"properties\":{\"targetResourceId\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/.default/deviceGroups/.default/devices/0B3703164F0F4F20AAD0A2CEE26E2CBE0095B423A67C999B288410A2159EB7138FD6813438D765B5DE1C3F4C314E49B74A1D82714DDD7B8BA6F369C8D89A2BB2\"}}", + "isContentBase64": false + } + }, + "AzSphereDeviceSecondScenario+[NoContext]+DeleteViaIdentityDeviceGroup+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Field Test?api-version=2024-04-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Field%20Test?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "35" ], + "x-ms-client-request-id": [ "0e964036-98fd-46b4-b9d7-4f6aa2a1bd6a" ], + "CommandName": [ "Get-AzSphereDeviceGroup" ], + "FullCommandName": [ "Get-AzSphereDeviceGroup_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "21caf335-8608-4e09-ac32-0bcfc7dcb408" ], + "x-ms-request-id": [ "c7e2adb5-a22d-4e95-ab9a-c845862f70d8" ], + "x-ms-correlation-request-id": [ "032c382a-10dc-482f-ad92-efcf42c9b095" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T101833Z:032c382a-10dc-482f-ad92-efcf42c9b095" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 978FE59B9EDC4ABB8FEAE5231C5B11DA Ref B: MAA201060516039 Ref C: 2024-04-01T10:18:31Z" ], + "Date": [ "Mon, 01 Apr 2024 10:18:33 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "494" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Field Test\",\"name\":\"Field Test\",\"type\":\"Microsoft.AzureSphere/catalogs/products/deviceGroups\",\"properties\":{\"description\":\"Default test device group\",\"osFeedType\":\"Retail\",\"updatePolicy\":\"UpdateAll\",\"allowCrashDumpsCollection\":\"Disabled\",\"regionalDataBoundary\":\"None\",\"hasDeployment\":null,\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereDeviceSecondScenario+[NoContext]+DeleteViaIdentityDeviceGroup+$DELETE+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Field Test?api-version=2024-04-01+2": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Field%20Test?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "36" ], + "x-ms-client-request-id": [ "7a538a8d-9938-4204-86c1-3aa231ee0e5e" ], + "CommandName": [ "Remove-AzSphereDeviceGroup" ], + "FullCommandName": [ "Remove-AzSphereDeviceGroup_DeleteViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "af9a5da9-6622-4d50-b0e1-3646e0c759f7" ], + "x-ms-request-id": [ "f1a4e1c0-de99-4b74-9146-5e256d2a3173" ], + "x-ms-correlation-request-id": [ "d417892b-3da1-4396-8d13-f6796b24f6dd" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T101837Z:d417892b-3da1-4396-8d13-f6796b24f6dd" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 1140E867BFD8437DB2DE5DB3267062E9 Ref B: MAA201060516039 Ref C: 2024-04-01T10:18:33Z" ], + "Date": [ "Mon, 01 Apr 2024 10:18:36 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "4" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "bnVsbA==", + "isContentBase64": false + } + }, + "AzSphereDeviceSecondScenario+[NoContext]+DeleteDeviceGroup+$DELETE+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Development?api-version=2024-04-01+1": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Development?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "37" ], + "x-ms-client-request-id": [ "7e33073a-c2f4-46e5-a05e-10e5033c0b1a" ], + "CommandName": [ "Remove-AzSphereDeviceGroup" ], + "FullCommandName": [ "Remove-AzSphereDeviceGroup_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14998" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "4bc32121-6b4e-438a-8446-878ba725c6b3" ], + "x-ms-request-id": [ "c8ce8cec-472a-4f63-a8a1-50011cfcc39e" ], + "x-ms-correlation-request-id": [ "a1d46804-f26e-4252-a9d1-85cfa284d2d1" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T101839Z:a1d46804-f26e-4252-a9d1-85cfa284d2d1" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 671DC1E7E859481C98D81A9782ED8936 Ref B: MAA201060516039 Ref C: 2024-04-01T10:18:37Z" ], + "Date": [ "Mon, 01 Apr 2024 10:18:38 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "4" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "bnVsbA==", + "isContentBase64": false + } + }, + "AzSphereDeviceSecondScenario+[NoContext]+DeleteViaIdentityProduct+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2?api-version=2024-04-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "38" ], + "x-ms-client-request-id": [ "e0341e09-298c-4192-9986-84a0b432a8fb" ], + "CommandName": [ "Get-AzSphereProduct" ], + "FullCommandName": [ "Get-AzSphereProduct_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "668cf0a5-b092-4011-bf7a-a4b400a9afe6" ], + "x-ms-request-id": [ "07ccafa7-44a8-42c2-9154-46a390c24b03" ], + "x-ms-correlation-request-id": [ "802cd2eb-52d8-45bc-a87a-5368b6de7d77" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T101840Z:802cd2eb-52d8-45bc-a87a-5368b6de7d77" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 29FF55C3A6684F4DA07F0922028AC0B2 Ref B: MAA201060516039 Ref C: 2024-04-01T10:18:39Z" ], + "Date": [ "Mon, 01 Apr 2024 10:18:39 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "293" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2\",\"name\":\"Product2\",\"type\":\"Microsoft.AzureSphere/catalogs/products\",\"properties\":{\"description\":null,\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereDeviceSecondScenario+[NoContext]+DeleteViaIdentityProduct+$DELETE+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2?api-version=2024-04-01+2": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product2?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "39" ], + "x-ms-client-request-id": [ "4771862d-7417-43f0-8d53-7a313fde31ba" ], + "CommandName": [ "Remove-AzSphereProduct" ], + "FullCommandName": [ "Remove-AzSphereProduct_DeleteViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "326c0906-2aff-46aa-a163-6bf4e1500c1f" ], + "x-ms-request-id": [ "7ffda683-ece7-4a3e-af1b-1edbc9dc1e36" ], + "x-ms-correlation-request-id": [ "ddd8c115-c93e-48ff-a271-1429271019eb" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T101846Z:ddd8c115-c93e-48ff-a271-1429271019eb" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: BFFE8FB118304FF98C649B5EA9C47444 Ref B: MAA201060516039 Ref C: 2024-04-01T10:18:40Z" ], + "Date": [ "Mon, 01 Apr 2024 10:18:45 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "4" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "bnVsbA==", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/test/AzSphereDeviceSecondScenario.Tests.ps1 b/src/Sphere/Sphere.Autorest/test/AzSphereDeviceSecondScenario.Tests.ps1 new file mode 100644 index 000000000000..f5e1dabb001b --- /dev/null +++ b/src/Sphere/Sphere.Autorest/test/AzSphereDeviceSecondScenario.Tests.ps1 @@ -0,0 +1,136 @@ +if(($null -eq $TestName) -or ($TestName -contains 'AzSphereDeviceSecondScenario')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'AzSphereDeviceSecondScenario.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} +### This test is running with old devices. +### Please clean the environment if necessary. +### Please commit below create cases with new catalog. It need three devices in first catalog. +Describe 'AzSphereDeviceSecondScenario' { + It 'CreateSecondEnvironment' { + { + New-AzSphereProduct -CatalogName $env.firstCatalog -Name $env.secondProduct -ResourceGroupName $env.resourceGroup + } | Should -Not -Throw + } + + #Command has some issues + It 'ClaimDevice23' -Skip { + { + Invoke-AzSphereClaimDeviceGroupDevice -ResourceGroupName $env.resourceGroup -CatalogName $env.firstCatalog -ProductName $env.firstProduct -DeviceGroupName $env.TestDeviceGroup -DeviceIdentifier $env.deviceID3,$env.deviceID2 + } | Should -Not -Throw + } + + # Please uncommit this case for new device id + It 'CreateOtherDevices' -Skip { + { + New-AzSphereDevice -CatalogName $env.firstCatalog -GroupName $env.TestDeviceGroup -Name $env.deviceID2 -ProductName $env.firstProduct -ResourceGroupName $env.resourceGroup + + New-AzSphereDeviceGroup -Name $env.DevDeviceGroup -ProductName $env.secondProduct -CatalogName $env.firstCatalog -ResourceGroupName $env.resourceGroup + + New-AzSphereDevice -CatalogName $env.firstCatalog -GroupName $env.DevDeviceGroup -Name $env.deviceID3 -ProductName $env.secondProduct -ResourceGroupName $env.resourceGroup + } | Should -Not -Throw + } + # Please uncommit this case for old devices record running + It 'AssignOtherDevices' { + { + # New-AzSphereDeviceGroup -Name $env.DevDeviceGroup -ProductName $env.firstProduct -CatalogName $env.firstCatalog -ResourceGroupName $env.resourceGroup + $FirstGroupId = '/subscriptions/'+$env.subscriptionId+'/resourceGroups/'+$env.resourceGroup+'/providers/Microsoft.AzureSphere/catalogs/'+$env.firstCatalog+'/products/'+$env.firstProduct+'/deviceGroups/'+$env.DevDeviceGroup + Update-AzSphereDevice -CatalogName $env.firstCatalog -GroupName $env.defaultLocation -Name $env.deviceID -ProductName $env.defaultLocation -ResourceGroupName $env.resourceGroup -DeviceGroupId $FirstGroupId + + # New-AzSphereDeviceGroup -Name $env.TestDeviceGroup -ProductName $env.firstProduct -CatalogName $env.firstCatalog -ResourceGroupName $env.resourceGroup + $TestDevice2Group = '/subscriptions/'+$env.subscriptionId+'/resourceGroups/'+$env.resourceGroup+'/providers/Microsoft.AzureSphere/catalogs/'+$env.firstCatalog+'/products/'+$env.firstProduct+'/deviceGroups/'+$env.TestDeviceGroup + Update-AzSphereDevice -CatalogName $env.firstCatalog -GroupName $env.defaultLocation -Name $env.deviceID2 -ProductName $env.defaultLocation -ResourceGroupName $env.resourceGroup -DeviceGroupId $TestDevice2Group + + New-AzSphereDeviceGroup -Name $env.DevDeviceGroup -ProductName $env.secondProduct -CatalogName $env.firstCatalog -ResourceGroupName $env.resourceGroup + $TestDevice3Group = '/subscriptions/'+$env.subscriptionId+'/resourceGroups/'+$env.resourceGroup+'/providers/Microsoft.AzureSphere/catalogs/'+$env.firstCatalog+'/products/'+$env.secondProduct+'/deviceGroups/'+$env.DevDeviceGroup + Update-AzSphereDevice -CatalogName $env.firstCatalog -GroupName $env.defaultLocation -Name $env.deviceID3 -ProductName $env.defaultLocation -ResourceGroupName $env.resourceGroup -DeviceGroupId $TestDevice3Group + } | Should -Not -Throw + } + + It 'ListDeviceInCatalog' { + { + # first product DevGroup 1,first product TestGroup 1, second product DevGroup 1 + $listDevice = Get-AzSphereCatalogDevice -ResourceGroupName $env.resourceGroup -CatalogName $env.firstCatalog + $listDevice.Count | Should -BeGreaterOrEqual 3 + } | Should -Not -Throw + } + + It 'CountDeviceInCatalog' { + { + # first product DevGroup 1,first product TestGroup 1, second product DevGroup 1 + $result = Invoke-AzSphereCountCatalogDevice -ResourceGroupName $env.resourceGroup -CatalogName $env.firstCatalog + $result.Value | Should -BeGreaterOrEqual 3 + } | Should -Not -Throw + } + + It 'CountDeviceInProdcut' { + { + # first product DevGroup 1,first product TestGroup 1 + $result = Invoke-AzSphereCountProductDevice -ResourceGroupName $env.resourceGroup -CatalogName $env.firstCatalog -ProductName $env.firstProduct + $result.Value | Should -Be 2 + } | Should -Not -Throw + } + + It 'CountDeviceInGroup' { + { + #second product DevGroup 1 + $result = Invoke-AzSphereCountDeviceGroupDevice -ResourceGroupName $env.resourceGroup -CatalogName $env.firstCatalog -ProductName $env.secondProduct -DeviceGroupName $env.DevDeviceGroup + $result.Value | Should -Be 1 + } | Should -Not -Throw + } + + It 'UpdateDevice2AssignSecondProduct' { + { + # first product TestGroup 1->0, second product DevGroup 1->2 + $devGroup = Get-AzSphereDeviceGroup -Name $env.DevDeviceGroup -ProductName $env.secondProduct -CatalogName $env.firstCatalog -ResourceGroupName $env.resourceGroup + + Update-AzSphereDevice -CatalogName $env.firstCatalog -GroupName $env.TestDeviceGroup -Name $env.deviceID2 -ProductName $env.firstProduct -ResourceGroupName $env.resourceGroup -DeviceGroupId $devGroup.Id + } | Should -Not -Throw + } + + It 'UpdateDeviceUnassign' { + { + # first product DevGroup 1, second product DevGroup 2 + $defaultGroupId = '/subscriptions/'+$env.subscriptionId+'/resourceGroups/'+$env.resourceGroup+'/providers/Microsoft.AzureSphere/catalogs/'+$env.firstCatalog+'/products/'+$env.defaultLocation+'/deviceGroups/'+$env.defaultLocation + + Write-Host 'Unassign device 3 from second product dev device group into' $env.firstCatalog + Update-AzSphereDevice -CatalogName $env.firstCatalog -GroupName $env.DevDeviceGroup -Name $env.deviceID3 -ProductName $env.secondProduct -ResourceGroupName $env.resourceGroup -DeviceGroupId $defaultGroupId + + Write-Host 'Unassign device 2 from second product test device group into' $env.firstCatalog + Update-AzSphereDevice -CatalogName $env.firstCatalog -GroupName $env.DevDeviceGroup -Name $env.deviceID2 -ProductName $env.secondProduct -ResourceGroupName $env.resourceGroup -DeviceGroupId $defaultGroupId + + Write-Host 'Unassign device 1 from first product dev device group into' $env.firstCatalog + Update-AzSphereDevice -CatalogName $env.firstCatalog -GroupName $env.DevDeviceGroup -Name $env.deviceID -ProductName $env.firstProduct -ResourceGroupName $env.resourceGroup -DeviceGroupId $defaultGroupId + } | Should -Not -Throw + } + + It 'DeleteViaIdentityDeviceGroup' { + { + $devicegroup = Get-AzSphereDeviceGroup -CatalogName $env.firstCatalog -Name $env.TestDeviceGroup -ProductName $env.firstProduct -ResourceGroupName $env.resourceGroup + Remove-AzSphereDeviceGroup -InputObject $devicegroup + } | Should -Not -Throw + } + + It 'DeleteDeviceGroup' { + { + Remove-AzSphereDeviceGroup -CatalogName $env.firstCatalog -Name $env.DevDeviceGroup -ProductName $env.firstProduct -ResourceGroupName $env.resourceGroup + } | Should -Not -Throw + } + + It 'DeleteViaIdentityProduct' { + { + $product = Get-AzSphereProduct -CatalogName $env.firstCatalog -Name $env.secondProduct -ResourceGroupName $env.resourceGroup + Remove-AzSphereProduct -InputObject $product + } | Should -Not -Throw + } +} diff --git a/src/Sphere/Sphere.Autorest/test/AzSphereImageandDeploymentScenario.Recording.json b/src/Sphere/Sphere.Autorest/test/AzSphereImageandDeploymentScenario.Recording.json new file mode 100644 index 000000000000..2efb45a09c5f --- /dev/null +++ b/src/Sphere/Sphere.Autorest/test/AzSphereImageandDeploymentScenario.Recording.json @@ -0,0 +1,1181 @@ +{ + "AzSphereImageandDepoymentScenario+[NoContext]+CreateImages+$PUT+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/14a6729e-5819-4737-8713-37b4798533f8?api-version=2024-04-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.A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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADRYNE0FAAAASUQkAAoAAADWeiVCLThfQLfM4RD72i0LnnKmFBlYN0eHEze0eYUz+FNHGACo1cxpWPSHEBQNeiYWD8HPwx9d8AEAAABEQigAFn4WYgAAAABBenVyZVNwaGVyZUJsaW5rMQAAAAAAAAAAAAAAAAAAAFRQBAACAAAATkQMAAEAAAAMAAAAAwAAAJQAAAD74VWpjYmIi8BagFVyGXi+sJKE2DTVRUlxBF8Hb5LomjnabrcEYZqD1bY6S8QLMa3LwL8kv2KhUznbdZS5DpxZ\"\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "22173" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "aeadcbe6-f15f-4235-81a1-7c44f52a543a" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/3a21fb06-21ff-492d-bf19-877547146be9*61232BB12D914275120FCAF5390C461B4EBD7FEF6196D995C7E77052B95FCC6A?api-version=2024-04-01\u0026t=638475571603715551\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMTU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02On7O1u8swvMta16Va5_kDzD80TS3LYzVk2nzUVxEqPaGhpA-vs_ttjm7hDhYk80OIsQ_YZd286sA58Q\u0026s=dxDcIo8Rg5NOVWlPggeVQJF0YOXomVvaZjTrQ9Y6ld9wxJOWzaD7iqWt9pMTKTn-j4TRURu8aI8Kfh_eu-8xVdQdkiioH__x0o2M0MYQfDXDmnIO0mhXfwvDGceizOxAepiAaimPwPqjPTPoSxp4qsNZgkspW3CykfdCUqTL9yTLgWwmM_84Ki5--1Qe-1juoLZWdb7b8lQxX0nCB-3pucidAol00FineBn99pMPtjtp_fBojnatdF86IVVWIBez7hQXP1w-Yq5dEYzZsYJYRqwHKhhl1sLqwDQoEA275T90ODtcOd0aEJ5o7FQbjEVlt6jJXqZxFpzePxxz7NL2Vw\u0026h=DvhjsRWwKaNxlQn6CfHysPi07nGDX3WV7cRoYWUyHTY" ], + "x-ms-request-id": [ "3a21fb06-21ff-492d-bf19-877547146be9" ], + "x-ms-correlation-request-id": [ "e115ff48-b310-452c-8032-51f8d29cca12" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T083240Z:e115ff48-b310-452c-8032-51f8d29cca12" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 59C601137DE943ED83D69F2C554055FC Ref B: MAA201060515051 Ref C: 2024-04-01T08:32:37Z" ], + "Date": [ "Mon, 01 Apr 2024 08:32:39 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "559" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/14a6729e-5819-4737-8713-37b4798533f8\",\"name\":\"14a6729e-5819-4737-8713-37b4798533f8\",\"type\":\"microsoft.azuresphere/catalogs/images\",\"systemData\":{\"createdBy\":\"v-jiaji@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-01T08:32:38.2933857Z\",\"lastModifiedBy\":\"v-jiaji@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-04-01T08:32:38.2933857Z\"},\"properties\":{\"provisioningState\":\"Accepted\"}}", + "isContentBase64": false + } + }, + "AzSphereImageandDepoymentScenario+[NoContext]+CreateImages+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/3a21fb06-21ff-492d-bf19-877547146be9*61232BB12D914275120FCAF5390C461B4EBD7FEF6196D995C7E77052B95FCC6A?api-version=2024-04-01\u0026t=638475571603715551\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMTUwODE5WhcNMjUwMTI0MTUwODE5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK902W8oGHqHsYxfQcAXt6Ljumrh6DLgGihvCAJqh_U0j8R4Jupt1lXUnhMY-cA7JAT9q7SEoTZskdrko1uzzlaykxYQUacRB8irTYwbgK6DCIqWuOd2G-W2g3eWAyxRb-Dffjnsz-vBsjd1fyP0MvIXDSDMzp2oK65BSxTbBiStV3YxtKZ3eONvKga4d77iEw0zAZHIFkt0PSHzHO7kk-b_trhadwDxPYnjrQOGmouEj7HuNoC8H7-vKZvgbeplfrHtJO9vq0TOUUqIGlT236cbPe62XQNJRim_aa3chEFUmacjUnjEZtgJjup_tDQ0iV_Oe0ZqRBBGzpjoK23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"RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/3a21fb06-21ff-492d-bf19-877547146be9*61232BB12D914275120FCAF5390C461B4EBD7FEF6196D995C7E77052B95FCC6A?api-version=2024-04-01\u0026t=638475571603715551\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMTUwODE5WhcNMjUwMTI0MTUwODE5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK902W8oGHqHsYxfQcAXt6Ljumrh6DLgGihvCAJqh_U0j8R4Jupt1lXUnhMY-cA7JAT9q7SEoTZskdrko1uzzlaykxYQUacRB8irTYwbgK6DCIqWuOd2G-W2g3eWAyxRb-Dffjnsz-vBsjd1fyP0MvIXDSDMzp2oK65BSxTbBiStV3YxtKZ3eONvKga4d77iEw0zAZHIFkt0PSHzHO7kk-b_trhadwDxPYnjrQOGmouEj7HuNoC8H7-vKZvgbeplfrHtJO9vq0TOUUqIGlT236cbPe62XQNJRim_aa3chEFUmacjUnjEZtgJjup_tDQ0iV_Oe0ZqRBBGzpjoK23Wch0CAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY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VHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAGj6QqaLOPa3RZUHMPeeSymifn86nh52yaIojZbdHUiE_o0iWzV-2ZRZOxE2IgkOrAeMYXIUhMoqV7XxTwfpi6zGwrzIeuTWMbNjgzbIZGIMJCbUyNbvEkGqxvBpcwzATT8KQYU2-J2iL5slKYZIACN6THLJn5BI6dAecS1X4PJ5vNAgI8qlsYmnafZSCIrWLUQQUsZeLUaxy3t-hozvyfVe-B-nktPdgNv3-iCsI0AtlvezwfFcJXQHQeNByXg5oxXPIe02On7O1u8swvMta16Va5_kDzD80TS3LYzVk2nzUVxEqPaGhpA-vs_ttjm7hDhYk80OIsQ_YZd286sA58Q\u0026s=dxDcIo8Rg5NOVWlPggeVQJF0YOXomVvaZjTrQ9Y6ld9wxJOWzaD7iqWt9pMTKTn-j4TRURu8aI8Kfh_eu-8xVdQdkiioH__x0o2M0MYQfDXDmnIO0mhXfwvDGceizOxAepiAaimPwPqjPTPoSxp4qsNZgkspW3CykfdCUqTL9yTLgWwmM_84Ki5--1Qe-1juoLZWdb7b8lQxX0nCB-3pucidAol00FineBn99pMPtjtp_fBojnatdF86IVVWIBez7hQXP1w-Yq5dEYzZsYJYRqwHKhhl1sLqwDQoEA275T90ODtcOd0aEJ5o7FQbjEVlt6jJXqZxFpzePxxz7NL2Vw\u0026h=DvhjsRWwKaNxlQn6CfHysPi07nGDX3WV7cRoYWUyHTY", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "39" ], + "x-ms-client-request-id": [ "30f63d2f-8591-4a08-be2a-545a5a56ebde" ], + "CommandName": [ "New-AzSphereImage" ], + "FullCommandName": [ "New-AzSphereImage_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"680071a4-0000-0600-0000-660a712c0000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "ff391772-d498-447b-8b00-d53a5df90265" ], + "x-ms-correlation-request-id": [ "cd16b4e8-a8b1-4a65-9874-1d6c3b371683" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T083311Z:cd16b4e8-a8b1-4a65-9874-1d6c3b371683" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: C25AF6B0148148C59A5E1FA93D4DD250 Ref B: MAA201060515051 Ref C: 2024-04-01T08:33:10Z" ], + "Date": [ "Mon, 01 Apr 2024 08:33:10 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "905" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/3a21fb06-21ff-492d-bf19-877547146be9*61232BB12D914275120FCAF5390C461B4EBD7FEF6196D995C7E77052B95FCC6A\",\"name\":\"3a21fb06-21ff-492d-bf19-877547146be9*61232BB12D914275120FCAF5390C461B4EBD7FEF6196D995C7E77052B95FCC6A\",\"resourceId\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/14a6729e-5819-4737-8713-37b4798533f8\",\"status\":\"Succeeded\",\"startTime\":\"2024-04-01T08:32:38.3598101Z\",\"endTime\":\"2024-04-01T08:32:44.9072587Z\",\"error\":{\"target\":\"ImageUpload\",\"details\":[]},\"properties\":{\"targetResourceId\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/14a6729e-5819-4737-8713-37b4798533f8\"}}", + "isContentBase64": false + } + }, + "AzSphereImageandDepoymentScenario+[NoContext]+CreateImages+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/14a6729e-5819-4737-8713-37b4798533f8?api-version=2024-04-01+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/14a6729e-5819-4737-8713-37b4798533f8?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "40" ], + "x-ms-client-request-id": [ "30f63d2f-8591-4a08-be2a-545a5a56ebde" ], + "CommandName": [ "New-AzSphereImage" ], + "FullCommandName": [ "New-AzSphereImage_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "33a09edb-0dac-412e-8628-0be1a29f6c39" ], + "x-ms-request-id": [ "2f1669d4-1bb9-4a61-b246-2a0c69db391b" ], + "x-ms-correlation-request-id": [ "dbc936fc-9e56-4278-a2b4-d76bf128e58f" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T083314Z:dbc936fc-9e56-4278-a2b4-d76bf128e58f" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: F035E3EBD74C43429C4F7C0FD6C50F72 Ref B: MAA201060515051 Ref C: 2024-04-01T08:33:11Z" ], + "Date": [ "Mon, 01 Apr 2024 08:33:13 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "946" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/14a6729e-5819-4737-8713-37b4798533f8\",\"name\":\"14a6729e-5819-4737-8713-37b4798533f8\",\"type\":\"Microsoft.AzureSphere/catalogs/images\",\"properties\":{\"uri\":\"https://prodptimg.blob.core.windows.net/2962a1e9-91ce-4694-a28c-41c2354493ef/images/14a6729e-5819-4737-8713-37b4798533f8?skoid=07baa84a-7259-40e9-9af7-29600ee6372e\u0026sktid=33e01921-4d64-4f8c-a055-5bdaffd5e33d\u0026skt=2024-04-01T08%3A28%3A13Z\u0026ske=2024-04-01T09%3A33%3A13Z\u0026sks=b\u0026skv=2021-12-02\u0026sv=2021-12-02\u0026spr=https,http\u0026se=2024-04-01T16%3A33%3A13Z\u0026sr=b\u0026sp=r\u0026sig=LUYDrlOv8JxERcaJn69QN03dZc%2BCr6SP8kCSHGrxrLI%3D\",\"image\":\"AzureSphereBlink1\",\"imageId\":\"14a6729e-5819-4737-8713-37b4798533f8\",\"regionalDataBoundary\":\"None\",\"description\":null,\"componentId\":\"42257ad6-382d-405f-b7cc-e110fbda2d0b\",\"imageType\":\"Applications\",\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereImageandDepoymentScenario+[NoContext]+CreateImages+$PUT+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/d1d0ad2a-5054-4c88-897c-36fa01684dd0?api-version=2024-04-01+4": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/d1d0ad2a-5054-4c88-897c-36fa01684dd0?api-version=2024-04-01", + "Content": "{\r\n \"properties\": {\r\n \"image\": \"RT3NKABQAAADAAAAAAAAAENvbXByZXNzZWQgUk9NRlP4N8uWAAAAAAAAAAAEAAAAQ29tcHJlc3NlZAAAAAAAAO1BAAAwAAAAwAQAAKSDAADyAAAABQABAGFwcF9tYW5pZmVzdC5qc29uAAAA7UEAABAAAADBBwAAYmluAO2DAAAoJgAAAQACAGFwcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0WDRNBQAAAElEJAAKAAAA/ycKpjaJSUq3P3CGHbA9Qyqt0NFUUIhMiXw2+gFoTdBTRxgAqNXMaVj0hxAUDXomFg/Bz8MfXfABAAAAREIoAP/8gWIAAAAARXJyb3JSZXBvcnRpbmdTdGFnZTEAAAAAAAAAAAAAAABUUAQAAgAAAE5EDAABAAAADQAAAAMAAACUAAAAkxNeY1PZGZtCfMNiySVtD3tN/W2o1yVJayrkrfgmiLSbGXx5qJFzQNbSSoaAYiZpUrwe6LBFfGKieD7W4+7D5A==\"\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "27637" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "2873ae36-a44a-4688-a375-e9f30f17ffac" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/be3a6629-5e08-4803-84d0-20677d47af31*D463FA83A75E19C84987AF5DE179180C29B5C3F2A8E99484570462E2FB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ZRZOxE2IgkOrAeMYXIUhMoqV7XxTwfpi6zGwrzIeuTWMbNjgzbIZGIMJCbUyNbvEkGqxvBpcwzATT8KQYU2-J2iL5slKYZIACN6THLJn5BI6dAecS1X4PJ5vNAgI8qlsYmnafZSCIrWLUQQUsZeLUaxy3t-hozvyfVe-B-nktPdgNv3-iCsI0AtlvezwfFcJXQHQeNByXg5oxXPIe02On7O1u8swvMta16Va5_kDzD80TS3LYzVk2nzUVxEqPaGhpA-vs_ttjm7hDhYk80OIsQ_YZd286sA58Q\u0026s=Bv5vjtdldK3t-JQjS1BSfR-B46tR4Vy4U9KOgPdcumVKhj3NUOVaMvc92TNPOiw97DKyDHTLJ1iJMIDjAmFJKZIiEmHQQoqwCgJmcbSEI4z-1LRbgDpmHFBx3NL0iMXgKNsG-FFKIYAuXk78HvQvpXx1iDIdxfzn4w57SmsIp0zHZlS0iFsHFRaeEg75e0AvLCKWoTxsdUJ4zWBm_0xX4A5g6DAJf1TiYkfbtdquX8qJ-r6bqSMmjN8CFT3IbnC9h9v0ZyHYY0NexIixsL3gXL_lg4DE3yn9WyAgbfG85VGxKg9rjh3W_js8zbSPy-Q3LPeS5xXK2qCyiL5hkRZL-g\u0026h=u-lbQ7n88o6kuvoZDyeFfTqD-IVyYyUPKbZWFwIiNbY" ], + "x-ms-request-id": [ "be3a6629-5e08-4803-84d0-20677d47af31" ], + "x-ms-correlation-request-id": [ "11e51a8f-0bb5-46e1-871c-d76ad5e3ec4d" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T083319Z:11e51a8f-0bb5-46e1-871c-d76ad5e3ec4d" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 53E0BB46D9B844D08AE750F55D579895 Ref B: MAA201060515051 Ref C: 2024-04-01T08:33:14Z" ], + "Date": [ "Mon, 01 Apr 2024 08:33:18 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "559" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/d1d0ad2a-5054-4c88-897c-36fa01684dd0\",\"name\":\"d1d0ad2a-5054-4c88-897c-36fa01684dd0\",\"type\":\"microsoft.azuresphere/catalogs/images\",\"systemData\":{\"createdBy\":\"v-jiaji@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-01T08:33:15.1822855Z\",\"lastModifiedBy\":\"v-jiaji@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-04-01T08:33:15.1822855Z\"},\"properties\":{\"provisioningState\":\"Accepted\"}}", + "isContentBase64": false + } + }, + "AzSphereImageandDepoymentScenario+[NoContext]+CreateImages+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/be3a6629-5e08-4803-84d0-20677d47af31*D463FA83A75E19C84987AF5DE179180C29B5C3F2A8E99484570462E2FB3DFDE9?api-version=2024-04-01\u0026t=638475571996513079\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMTUwODE5WhcNMjUwMTI0MTUwODE5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK902W8oGHqHsYxfQcAXt6Ljumrh6DLgGihvCAJqh_U0j8R4Jupt1lXUnhMY-cA7JAT9q7SEoTZsk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vpXx1iDIdxfzn4w57SmsIp0zHZlS0iFsHFRaeEg75e0AvLCKWoTxsdUJ4zWBm_0xX4A5g6DAJf1TiYkfbtdquX8qJ-r6bqSMmjN8CFT3IbnC9h9v0ZyHYY0NexIixsL3gXL_lg4DE3yn9WyAgbfG85VGxKg9rjh3W_js8zbSPy-Q3LPeS5xXK2qCyiL5hkRZL-g\u0026h=u-lbQ7n88o6kuvoZDyeFfTqD-IVyYyUPKbZWFwIiNbY+5": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/be3a6629-5e08-4803-84d0-20677d47af31*D463FA83A75E19C84987AF5DE179180C29B5C3F2A8E99484570462E2FB3DFDE9?api-version=2024-04-01\u0026t=638475571996513079\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMTUwODE5WhcNMjUwMTI0MTUwODE5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK902W8oGHqHsYxfQcAXt6Ljumrh6DLgGihvCAJqh_U0j8R4Jupt1lXUnhMY-cA7JAT9q7SEoTZskdrko1uzzlaykxYQUacRB8irTYwbgK6DCIqWuOd2G-W2g3eWAyxRb-Dffjnsz-vBsjd1fyP0MvIXDSDMzp2oK65BSxTbBiStV3YxtKZ3eONvKga4d77iEw0zAZHIFkt0PSHzHO7kk-b_trhadwDxPYnjrQOGmouEj7HuNoC8H7-vKZvgbeplfrHtJO9vq0TOUUqIGlT236cbPe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g\u0026h=u-lbQ7n88o6kuvoZDyeFfTqD-IVyYyUPKbZWFwIiNbY", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "42" ], + "x-ms-client-request-id": [ "81fb6928-8c79-4fb2-b1a3-942c6ffb42e0" ], + "CommandName": [ "New-AzSphereImage" ], + "FullCommandName": [ "New-AzSphereImage_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"680037a5-0000-0600-0000-660a71550000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "ee57970c-d4a4-4736-8714-d29eafd18b88" ], + "x-ms-correlation-request-id": [ "2dee40c5-cd92-43f3-bab4-082695e25d5c" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T083350Z:2dee40c5-cd92-43f3-bab4-082695e25d5c" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 71B28A53912A42659C165A234856FDA5 Ref B: MAA201060515051 Ref C: 2024-04-01T08:33:50Z" ], + "Date": [ "Mon, 01 Apr 2024 08:33:49 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "905" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/be3a6629-5e08-4803-84d0-20677d47af31*D463FA83A75E19C84987AF5DE179180C29B5C3F2A8E99484570462E2FB3DFDE9\",\"name\":\"be3a6629-5e08-4803-84d0-20677d47af31*D463FA83A75E19C84987AF5DE179180C29B5C3F2A8E99484570462E2FB3DFDE9\",\"resourceId\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/d1d0ad2a-5054-4c88-897c-36fa01684dd0\",\"status\":\"Succeeded\",\"startTime\":\"2024-04-01T08:33:16.1164213Z\",\"endTime\":\"2024-04-01T08:33:25.6373841Z\",\"error\":{\"target\":\"ImageUpload\",\"details\":[]},\"properties\":{\"targetResourceId\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/d1d0ad2a-5054-4c88-897c-36fa01684dd0\"}}", + "isContentBase64": false + } + }, + "AzSphereImageandDepoymentScenario+[NoContext]+CreateImages+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/d1d0ad2a-5054-4c88-897c-36fa01684dd0?api-version=2024-04-01+6": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/d1d0ad2a-5054-4c88-897c-36fa01684dd0?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "43" ], + "x-ms-client-request-id": [ "81fb6928-8c79-4fb2-b1a3-942c6ffb42e0" ], + "CommandName": [ "New-AzSphereImage" ], + "FullCommandName": [ "New-AzSphereImage_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "96b85e83-0bdb-4ba8-878e-b79d7a774afe" ], + "x-ms-request-id": [ "60675cb5-fb09-4e5e-947b-cb6be447589f" ], + "x-ms-correlation-request-id": [ "2fd1fbc7-3c9a-44b0-b0f9-de97587639b8" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T083353Z:2fd1fbc7-3c9a-44b0-b0f9-de97587639b8" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: D50CF24B2F16494DA1DCE2327872E619 Ref B: MAA201060515051 Ref C: 2024-04-01T08:33:50Z" ], + "Date": [ "Mon, 01 Apr 2024 08:33:52 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "949" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/d1d0ad2a-5054-4c88-897c-36fa01684dd0\",\"name\":\"d1d0ad2a-5054-4c88-897c-36fa01684dd0\",\"type\":\"Microsoft.AzureSphere/catalogs/images\",\"properties\":{\"uri\":\"https://prodptimg.blob.core.windows.net/2962a1e9-91ce-4694-a28c-41c2354493ef/images/d1d0ad2a-5054-4c88-897c-36fa01684dd0?skoid=e07f16fe-818d-4c68-9349-65d385173d92\u0026sktid=33e01921-4d64-4f8c-a055-5bdaffd5e33d\u0026skt=2024-04-01T08%3A28%3A52Z\u0026ske=2024-04-01T09%3A33%3A52Z\u0026sks=b\u0026skv=2021-12-02\u0026sv=2021-12-02\u0026spr=https,http\u0026se=2024-04-01T16%3A33%3A52Z\u0026sr=b\u0026sp=r\u0026sig=Rn%2BzDeygeOxm864oWXnn2i5z5XoSgeEpHJS0Fd69c9E%3D\",\"image\":\"ErrorReportingStage1\",\"imageId\":\"d1d0ad2a-5054-4c88-897c-36fa01684dd0\",\"regionalDataBoundary\":\"None\",\"description\":null,\"componentId\":\"a60a27ff-8936-4a49-b73f-70861db03d43\",\"imageType\":\"Applications\",\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereImageandDepoymentScenario+[NoContext]+CreateImages+$PUT+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/a04f0a91-b369-4249-a47d-28c118e2cb3b?api-version=2024-04-01+7": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/a04f0a91-b369-4249-a47d-28c118e2cb3b?api-version=2024-04-01", + "Content": "{\r\n \"properties\": {\r\n \"image\": \"RT3NKABQAAADAAAAAAAAAENvbXByZXNzZWQgUk9NRlOoQR3JAAAAAAAAAAAEAAAAQ29tcHJlc3NlZAAAAAAAAO1BAAAwAAAAwAQAAKSDAADnAAAABQABAGFwcF9tYW5pZmVzdC5qc29uAAAA7UEAABAAAADBBwAAYmluAO2DAAAYJgAAAQACAGFwcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "27637" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "679a799b-4dc1-4a59-a734-db849429498d" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/4432898f-3c1f-4443-9baf-c5c2a137a2ed*3C30DB93178E790BD63F658C5E74F313B3C3A55A9B4E30624A191321001C9685?api-version=2024-04-01\u0026t=638475572356531884\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMTUwODE5WhcNMjUwMTI0MTUwODE5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK902W8oGHqHsYxfQcAXt6Ljumrh6DLgGihvCAJqh_U0j8R4Jupt1lXUnhMY-cA7JAT9q7SEoTZskdrko1uzzlaykxYQUacRB8irTYwbgK6DCIqWuOd2G-W2g3eWAyxRb-Dffjnsz-vBsjd1fyP0MvIXDSDMzp2oK65BSxTbBiStV3YxtKZ3eONvKga4d77iEw0zAZHIFkt0PSHzHO7kk-b_trhadwDxPYnjrQOGmouEj7HuNoC8H7-vKZvgb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G9NbbTRgFLjCe23Vw\u0026h=9Hf-5D69A18pR9yXcsaaCdhbOij2fyuBkguE7DJZw4k" ], + "x-ms-request-id": [ "4432898f-3c1f-4443-9baf-c5c2a137a2ed" ], + "x-ms-correlation-request-id": [ "89a8e642-4803-4e23-96c1-ed77b8993ce4" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T083355Z:89a8e642-4803-4e23-96c1-ed77b8993ce4" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: B2E9577B2C7F434BBB19C13D87A1F2AB Ref B: MAA201060515051 Ref C: 2024-04-01T08:33:53Z" ], + "Date": [ "Mon, 01 Apr 2024 08:33:54 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "559" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/a04f0a91-b369-4249-a47d-28c118e2cb3b\",\"name\":\"a04f0a91-b369-4249-a47d-28c118e2cb3b\",\"type\":\"microsoft.azuresphere/catalogs/images\",\"systemData\":{\"createdBy\":\"v-jiaji@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-01T08:33:53.8249462Z\",\"lastModifiedBy\":\"v-jiaji@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-04-01T08:33:53.8249462Z\"},\"properties\":{\"provisioningState\":\"Accepted\"}}", + "isContentBase64": false + } + }, + "AzSphereImageandDepoymentScenario+[NoContext]+CreateImages+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/4432898f-3c1f-4443-9baf-c5c2a137a2ed*3C30DB93178E790BD63F658C5E74F313B3C3A55A9B4E30624A191321001C9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xE2IgkOrAeMYXIUhMoqV7XxTwfpi6zGwrzIeuTWMbNjgzbIZGIMJCbUyNbvEkGqxvBpcwzATT8KQYU2-J2iL5slKYZIACN6THLJn5BI6dAecS1X4PJ5vNAgI8qlsYmnafZSCIrWLUQQUsZeLUaxy3t-hozvyfVe-B-nktPdgNv3-iCsI0AtlvezwfFcJXQHQeNByXg5oxXPIe02On7O1u8swvMta16Va5_kDzD80TS3LYzVk2nzUVxEqPaGhpA-vs_ttjm7hDhYk80OIsQ_YZd286sA58Q\u0026s=VNjV-QrFpDDN9arhKLwLZeUmdn0aSbOgyCYzKig2NQgKIH6j1pQXvgn2L9I4OtyDNqDr24zzjEImrTqp4dk3VbQuqN1TB8GSJLza7EL2ml7V8rIs4VUvJbp823_4R1R9KiX22-IQ6wl_GBJcBEGinAWKpvp3GhtxGvi4uvfuzKI3FmDam1wE9QQdPnCkh72RK88rhEoBuFTsNxb28PtkQe8pkg_CLQSddvJxTTZ3JqP86DCUl4liK0TJq7vJXovQQXTlf6ZIOMXMBD5JXKTrb2nXsCb_nBsq64RSSnqtHz31hM7B2Nt4AFCDl9yzqAcuF89XnG9NbbTRgFLjCe23Vw\u0026h=9Hf-5D69A18pR9yXcsaaCdhbOij2fyuBkguE7DJZw4k+8": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/4432898f-3c1f-4443-9baf-c5c2a137a2ed*3C30DB93178E790BD63F658C5E74F313B3C3A55A9B4E30624A191321001C9685?api-version=2024-04-01\u0026t=638475572356531884\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMTUwODE5WhcN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vMta16Va5_kDzD80TS3LYzVk2nzUVxEqPaGhpA-vs_ttjm7hDhYk80OIsQ_YZd286sA58Q\u0026s=VNjV-QrFpDDN9arhKLwLZeUmdn0aSbOgyCYzKig2NQgKIH6j1pQXvgn2L9I4OtyDNqDr24zzjEImrTqp4dk3VbQuqN1TB8GSJLza7EL2ml7V8rIs4VUvJbp823_4R1R9KiX22-IQ6wl_GBJcBEGinAWKpvp3GhtxGvi4uvfuzKI3FmDam1wE9QQdPnCkh72RK88rhEoBuFTsNxb28PtkQe8pkg_CLQSddvJxTTZ3JqP86DCUl4liK0TJq7vJXovQQXTlf6ZIOMXMBD5JXKTrb2nXsCb_nBsq64RSSnqtHz31hM7B2Nt4AFCDl9yzqAcuF89XnG9NbbTRgFLjCe23Vw\u0026h=9Hf-5D69A18pR9yXcsaaCdhbOij2fyuBkguE7DJZw4k", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "45" ], + "x-ms-client-request-id": [ "c190b000-7eef-43b3-bf83-328a46fe71e4" ], + "CommandName": [ "New-AzSphereImage" ], + "FullCommandName": [ "New-AzSphereImage_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"68006ca6-0000-0600-0000-660a71780000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "04fb37f8-7553-4251-a2ba-877b9e9d07e8" ], + "x-ms-correlation-request-id": [ "9215f169-8729-4b48-aa23-aa5dbbfd8647" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T083426Z:9215f169-8729-4b48-aa23-aa5dbbfd8647" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: A3A998713419425B9CC7C0DAC118F0C8 Ref B: MAA201060515051 Ref C: 2024-04-01T08:34:25Z" ], + "Date": [ "Mon, 01 Apr 2024 08:34:25 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "904" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/4432898f-3c1f-4443-9baf-c5c2a137a2ed*3C30DB93178E790BD63F658C5E74F313B3C3A55A9B4E30624A191321001C9685\",\"name\":\"4432898f-3c1f-4443-9baf-c5c2a137a2ed*3C30DB93178E790BD63F658C5E74F313B3C3A55A9B4E30624A191321001C9685\",\"resourceId\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/a04f0a91-b369-4249-a47d-28c118e2cb3b\",\"status\":\"Succeeded\",\"startTime\":\"2024-04-01T08:33:53.879332Z\",\"endTime\":\"2024-04-01T08:34:00.6062867Z\",\"error\":{\"target\":\"ImageUpload\",\"details\":[]},\"properties\":{\"targetResourceId\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/a04f0a91-b369-4249-a47d-28c118e2cb3b\"}}", + "isContentBase64": false + } + }, + "AzSphereImageandDepoymentScenario+[NoContext]+CreateImages+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/a04f0a91-b369-4249-a47d-28c118e2cb3b?api-version=2024-04-01+9": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/a04f0a91-b369-4249-a47d-28c118e2cb3b?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "46" ], + "x-ms-client-request-id": [ "c190b000-7eef-43b3-bf83-328a46fe71e4" ], + "CommandName": [ "New-AzSphereImage" ], + "FullCommandName": [ "New-AzSphereImage_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "afbf7653-50ee-4661-bc83-acc743dcbe23" ], + "x-ms-request-id": [ "7e17140e-98c2-4ba2-9306-633543cc98af" ], + "x-ms-correlation-request-id": [ "1c615b11-8fe1-4330-9151-e44132a08b7d" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T083428Z:1c615b11-8fe1-4330-9151-e44132a08b7d" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 4941408CE88A4395BBBD31F48FF1D1A1 Ref B: MAA201060515051 Ref C: 2024-04-01T08:34:26Z" ], + "Date": [ "Mon, 01 Apr 2024 08:34:28 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "948" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/a04f0a91-b369-4249-a47d-28c118e2cb3b\",\"name\":\"a04f0a91-b369-4249-a47d-28c118e2cb3b\",\"type\":\"Microsoft.AzureSphere/catalogs/images\",\"properties\":{\"uri\":\"https://prodptimg.blob.core.windows.net/2962a1e9-91ce-4694-a28c-41c2354493ef/images/a04f0a91-b369-4249-a47d-28c118e2cb3b?skoid=07baa84a-7259-40e9-9af7-29600ee6372e\u0026sktid=33e01921-4d64-4f8c-a055-5bdaffd5e33d\u0026skt=2024-04-01T08%3A29%3A28Z\u0026ske=2024-04-01T09%3A34%3A28Z\u0026sks=b\u0026skv=2021-12-02\u0026sv=2021-12-02\u0026spr=https,http\u0026se=2024-04-01T16%3A34%3A28Z\u0026sr=b\u0026sp=r\u0026sig=HEMg7LIvja%2FRQu%2F9RXchkSW2gch8h5fw2OfEXAkkOWU%3D\",\"image\":\"GPIO_HighLevelApp\",\"imageId\":\"a04f0a91-b369-4249-a47d-28c118e2cb3b\",\"regionalDataBoundary\":\"None\",\"description\":null,\"componentId\":\"dc7f135c-6074-4d49-aa3a-160e4eed884f\",\"imageType\":\"Applications\",\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereImageandDepoymentScenario+[NoContext]+CreateImages+$PUT+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/9c6b0d1a-3f78-4382-86dd-371aabc3e006?api-version=2024-04-01+10": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/9c6b0d1a-3f78-4382-86dd-371aabc3e006?api-version=2024-04-01", + "Content": "{\r\n \"properties\": {\r\n \"image\": \"RT3NKABAAAADAAAA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QkAAoAAACy2IkWNcgnLiet6JTW0V+pGg1rnHg/gkOG3Tcaq8PgBlNHGACo1cxpWPSHEBQNeiYWD8HPwx9d8AEAAABEQigArOS6XwAAAABIZWxsb1dvcmxkX0hpZ2hMZXZlbEFwcAAAAAAAAAAAAFRQBAACAAAATkQMAAEAAAAHAAAAAwAAAJQAAACFdS0unTaqRyEBpKWV/rmyo1VEWzthNWLweTyMyeZ6wixMrhws/28EbLCEIScgNilDR2hIu18cwDV6rSzfvo48\"\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "22173" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "da3115f1-cdd6-4184-a9e0-23d63f6a3b37" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/edbd9355-4e69-4e7e-8ccc-322a6cfc21f4*1B47A05F53BA33B769F82AB4CD29D6AA1CE2EB1600828FCD0AB04D5251D07FEB?api-version=2024-04-01\u0026t=638475572720773178\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMTUwODE5WhcNMjUwMTI0MTUwODE5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLm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RFdz8wfP6SENpzwpYys8QdqJvdfolIA6t9AZCv6HB5iPy3w3QXmKlSw5EbNj3MQSgpYZV8edzyI5ubAfNZuhq_Y8eLwmqJKG-_Wkfr4rkZuf_9ebPRyv0vFX84rgCj1ygRPs7W-L3WUbCAymj2va5-x-4IoKgSvsO8ZborMGYIy0TQ4I_tIa-0eRqCVmqy0odcPdLjj_jaGFQFg0Pho9iX_yzhlrHdPkcUCxaBprk289M1s7LTAwRJQPOHYXp56qI0FpczNITf72qF1vPTo66LtnlFIUrSjHFj_QKEgHdeGYlCaYgYhKSsrw\u0026h=_q2V7rjbCJvq70KpIcBKBQmKnEzKME74MRQ4q3fSCW4" ], + "x-ms-request-id": [ "edbd9355-4e69-4e7e-8ccc-322a6cfc21f4" ], + "x-ms-correlation-request-id": [ "b67085ef-ee36-4941-9b21-341d0c948645" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T083432Z:b67085ef-ee36-4941-9b21-341d0c948645" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 0AE018A034714C0BA9E264FE21F6AE80 Ref B: MAA201060515051 Ref C: 2024-04-01T08:34:29Z" ], + "Date": [ "Mon, 01 Apr 2024 08:34:31 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "559" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/9c6b0d1a-3f78-4382-86dd-371aabc3e006\",\"name\":\"9c6b0d1a-3f78-4382-86dd-371aabc3e006\",\"type\":\"microsoft.azuresphere/catalogs/images\",\"systemData\":{\"createdBy\":\"v-jiaji@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-01T08:34:29.3585857Z\",\"lastModifiedBy\":\"v-jiaji@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-04-01T08:34:29.3585857Z\"},\"properties\":{\"provisioningState\":\"Accepted\"}}", + "isContentBase64": false + } + }, + "AzSphereImageandDepoymentScenario+[NoContext]+CreateImages+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/edbd9355-4e69-4e7e-8ccc-322a6cfc21f4*1B47A05F53BA33B769F82AB4CD29D6AA1CE2EB1600828FCD0AB04D5251D07FEB?api-version=2024-04-01\u0026t=638475572720773178\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMTUwODE5WhcNMjUwMTI0MTUwODE5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK902W8oGHqHsYxfQcAXt6Ljumrh6DLgGihvCAJqh_U0j8R4Jupt1lXUnhMY-cA7JAT9q7SEoTZskdrko1uzzlaykxYQUacRB8irTYwbgK6DCIqWuOd2G-W2g3eWAyxRb-Dffjnsz-vBsjd1fyP0MvIXDSDMzp2oK65BSxTbBiStV3YxtKZ3eONvKga4d77iEw0zAZHIFkt0PSHzHO7kk-b_trhadwDxPYnjrQOGmouEj7HuNoC8H7-vKZvgbeplfrHtJO9vq0TOUUqIGlT236cbPe62XQNJRim_aa3chEFUmacjUnjEZtgJjup_tDQ0iV_Oe0ZqRBBGzpjoK23Wch0CAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQU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ybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAGj6QqaLOPa3RZUHMPeeSymifn86nh52yaIojZbdHUiE_o0iWzV-2ZRZOxE2IgkOrAeMYXIUhMoqV7XxTwfpi6zGwrzIeuTWMbNjgzbIZGIMJCbUyNbvEkGqxvBpcwzATT8KQYU2-J2iL5slKYZIACN6THLJn5BI6dAecS1X4PJ5vNAgI8qlsYmnafZSCIrWLUQQUsZeLUaxy3t-hozvyfVe-B-nktPdgNv3-iCsI0AtlvezwfFcJXQHQeNByXg5oxXPIe02On7O1u8swvMta16Va5_kDzD80TS3LYzVk2nzUVxEqPaGhpA-vs_ttjm7hDhYk80OIsQ_YZd286sA58Q\u0026s=hEAGIzI4NSBH8zkCSdL9mSGnjEOGNJRFdz8wfP6SENpzwpYys8QdqJvdfolIA6t9AZCv6HB5iPy3w3QXmKlSw5EbNj3MQSgpYZV8edzyI5ubAfNZuhq_Y8eLwmqJKG-_Wkfr4rkZuf_9ebPRyv0vFX84rgCj1ygRPs7W-L3WUbCAymj2va5-x-4IoKgSvsO8ZborMGYIy0TQ4I_tIa-0eRqCVmqy0odcPdLjj_jaGFQFg0Pho9iX_yzhlrHdPkcUCxaBprk289M1s7LTAwRJQPOHYXp56qI0FpczNITf72qF1vPTo66LtnlFIUrSjHFj_QKEgHdeGYlCaYgYhKSsrw\u0026h=_q2V7rjbCJvq70KpIcBKBQmKnEzKME74MRQ4q3fSCW4+11": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/edbd9355-4e69-4e7e-8ccc-322a6cfc21f4*1B47A05F53BA33B769F82AB4CD29D6AA1CE2EB1600828FCD0AB04D5251D07FEB?api-version=2024-04-01\u0026t=638475572720773178\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMTUwODE5WhcNMjUwMTI0MTUwODE5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK902W8oGHqHsYxfQcAXt6Ljumrh6DLgGihvCAJqh_U0j8R4Jupt1lXUnhMY-cA7JAT9q7SEoTZskdrko1uzzlaykxYQUacRB8irTYwbgK6DCIqWuOd2G-W2g3eWAyxRb-Dffjnsz-vBsjd1fyP0MvIXDSDMzp2oK65BSxTbBiStV3YxtKZ3eONvKga4d77iEw0zAZHIFkt0PSHzHO7kk-b_trhadwDxPYnjrQOGmouEj7HuNoC8H7-vKZvgbeplfrHtJO9vq0TOUUqIGlT236cbPe62XQNJRim_aa3chEFUmacjUnjEZtgJjup_tDQ0iV_Oe0ZqRBBGzpjoK23Wch0CAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQ08xUEtJSU5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BgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAGj6QqaLOPa3RZUHMPeeSymifn86nh52yaIojZbdHUiE_o0iWzV-2ZRZOxE2IgkOrAeMYXIUhMoqV7XxTwfpi6zGwrzIeuTWMbNjgzbIZGIMJCbUyNbvEkGqxvBpcwzATT8KQYU2-J2iL5slKYZIACN6THLJn5BI6dAecS1X4PJ5vNAgI8qlsYmnafZSCIrWLUQQUsZeLUaxy3t-hozvyfVe-B-nktPdgNv3-iCsI0AtlvezwfFcJXQHQeNByXg5oxXPIe02On7O1u8swvMta16Va5_kDzD80TS3LYzVk2nzUVxEqPaGhpA-vs_ttjm7hDhYk80OIsQ_YZd286sA58Q\u0026s=hEAGIzI4NSBH8zkCSdL9mSGnjEOGNJRFdz8wfP6SENpzwpYys8QdqJvdfolIA6t9AZCv6HB5iPy3w3QXmKlSw5EbNj3MQSgpYZV8edzyI5ubAfNZuhq_Y8eLwmqJKG-_Wkfr4rkZuf_9ebPRyv0vFX84rgCj1ygRPs7W-L3WUbCAymj2va5-x-4IoKgSvsO8ZborMGYIy0TQ4I_tIa-0eRqCVmqy0odcPdLjj_jaGFQFg0Pho9iX_yzhlrHdPkcUCxaBprk289M1s7LTAwRJQPOHYXp56qI0FpczNITf72qF1vPTo66LtnlFIUrSjHFj_QKEgHdeGYlCaYgYhKSsrw\u0026h=_q2V7rjbCJvq70KpIcBKBQmKnEzKME74MRQ4q3fSCW4", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "48" ], + "x-ms-client-request-id": [ "ec2bc79c-70f1-4982-ab76-3a2d4fcee3ce" ], + "CommandName": [ "New-AzSphereImage" ], + "FullCommandName": [ "New-AzSphereImage_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"68003fa7-0000-0600-0000-660a719c0000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "0070dd12-3d10-4f76-aa66-c75e7b5084c9" ], + "x-ms-correlation-request-id": [ "8f93bdbe-25ec-4ce1-a446-dfd153f6d2e0" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T083503Z:8f93bdbe-25ec-4ce1-a446-dfd153f6d2e0" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: CE42A441EAE54ED1AAD03E8549AA87DF Ref B: MAA201060515051 Ref C: 2024-04-01T08:35:02Z" ], + "Date": [ "Mon, 01 Apr 2024 08:35:02 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "903" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/edbd9355-4e69-4e7e-8ccc-322a6cfc21f4*1B47A05F53BA33B769F82AB4CD29D6AA1CE2EB1600828FCD0AB04D5251D07FEB\",\"name\":\"edbd9355-4e69-4e7e-8ccc-322a6cfc21f4*1B47A05F53BA33B769F82AB4CD29D6AA1CE2EB1600828FCD0AB04D5251D07FEB\",\"resourceId\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/9c6b0d1a-3f78-4382-86dd-371aabc3e006\",\"status\":\"Succeeded\",\"startTime\":\"2024-04-01T08:34:29.55592Z\",\"endTime\":\"2024-04-01T08:34:36.3724821Z\",\"error\":{\"target\":\"ImageUpload\",\"details\":[]},\"properties\":{\"targetResourceId\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/9c6b0d1a-3f78-4382-86dd-371aabc3e006\"}}", + "isContentBase64": false + } + }, + "AzSphereImageandDepoymentScenario+[NoContext]+CreateImages+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/9c6b0d1a-3f78-4382-86dd-371aabc3e006?api-version=2024-04-01+12": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/9c6b0d1a-3f78-4382-86dd-371aabc3e006?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "49" ], + "x-ms-client-request-id": [ "ec2bc79c-70f1-4982-ab76-3a2d4fcee3ce" ], + "CommandName": [ "New-AzSphereImage" ], + "FullCommandName": [ "New-AzSphereImage_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "0a94e2b2-a899-4fa4-985e-a17607e4713e" ], + "x-ms-request-id": [ "00a32bf0-4124-408f-a47a-7dfdf0ce9f02" ], + "x-ms-correlation-request-id": [ "60c4491f-f991-443c-ae69-8e281b5f1733" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T083506Z:60c4491f-f991-443c-ae69-8e281b5f1733" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 0737EBC1BA2A4B45AE7794772073FFCB Ref B: MAA201060515051 Ref C: 2024-04-01T08:35:03Z" ], + "Date": [ "Mon, 01 Apr 2024 08:35:05 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "950" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/9c6b0d1a-3f78-4382-86dd-371aabc3e006\",\"name\":\"9c6b0d1a-3f78-4382-86dd-371aabc3e006\",\"type\":\"Microsoft.AzureSphere/catalogs/images\",\"properties\":{\"uri\":\"https://prodptimg.blob.core.windows.net/2962a1e9-91ce-4694-a28c-41c2354493ef/images/9c6b0d1a-3f78-4382-86dd-371aabc3e006?skoid=e07f16fe-818d-4c68-9349-65d385173d92\u0026sktid=33e01921-4d64-4f8c-a055-5bdaffd5e33d\u0026skt=2024-04-01T08%3A30%3A05Z\u0026ske=2024-04-01T09%3A35%3A05Z\u0026sks=b\u0026skv=2021-12-02\u0026sv=2021-12-02\u0026spr=https,http\u0026se=2024-04-01T16%3A35%3A05Z\u0026sr=b\u0026sp=r\u0026sig=ZoQFgCDHhkkTzXZFnh1VCavYasGSCCiuyWbCQ2hjZfo%3D\",\"image\":\"HelloWorld_HighLevelApp\",\"imageId\":\"9c6b0d1a-3f78-4382-86dd-371aabc3e006\",\"regionalDataBoundary\":\"None\",\"description\":null,\"componentId\":\"1689d8b2-c835-2e27-27ad-e894d6d15fa9\",\"imageType\":\"Applications\",\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereImageandDepoymentScenario+[NoContext]+CreateGetDeployment+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/14a6729e-5819-4737-8713-37b4798533f8?api-version=2024-04-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/14a6729e-5819-4737-8713-37b4798533f8?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "50" ], + "x-ms-client-request-id": [ "5b3ab141-e3a2-46d0-acc8-de2928cdc261" ], + "CommandName": [ "Get-AzSphereImage" ], + "FullCommandName": [ "Get-AzSphereImage_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "afddc63c-2cad-4841-9fff-1e3f52a1ac3b" ], + "x-ms-request-id": [ "b99f8c52-1331-4016-bcb2-7bd3cfbc6525" ], + "x-ms-correlation-request-id": [ "a0360a31-202e-45ef-8eda-fc02adeec729" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T083507Z:a0360a31-202e-45ef-8eda-fc02adeec729" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 001435C8E0374FE6BADAA53547D49314 Ref B: MAA201060515051 Ref C: 2024-04-01T08:35:06Z" ], + "Date": [ "Mon, 01 Apr 2024 08:35:06 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "950" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/14a6729e-5819-4737-8713-37b4798533f8\",\"name\":\"14a6729e-5819-4737-8713-37b4798533f8\",\"type\":\"Microsoft.AzureSphere/catalogs/images\",\"properties\":{\"uri\":\"https://prodptimg.blob.core.windows.net/2962a1e9-91ce-4694-a28c-41c2354493ef/images/14a6729e-5819-4737-8713-37b4798533f8?skoid=e07f16fe-818d-4c68-9349-65d385173d92\u0026sktid=33e01921-4d64-4f8c-a055-5bdaffd5e33d\u0026skt=2024-04-01T08%3A30%3A07Z\u0026ske=2024-04-01T09%3A35%3A07Z\u0026sks=b\u0026skv=2021-12-02\u0026sv=2021-12-02\u0026spr=https,http\u0026se=2024-04-01T16%3A35%3A07Z\u0026sr=b\u0026sp=r\u0026sig=udC%2FwIFd4WuwQS7%2BRVdVUNdH7j3xxq3Wq8ZEw%2B3D8XU%3D\",\"image\":\"AzureSphereBlink1\",\"imageId\":\"14a6729e-5819-4737-8713-37b4798533f8\",\"regionalDataBoundary\":\"None\",\"description\":null,\"componentId\":\"42257ad6-382d-405f-b7cc-e110fbda2d0b\",\"imageType\":\"Applications\",\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereImageandDepoymentScenario+[NoContext]+CreateGetDeployment+$PUT+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Production/deployments/.default?api-version=2024-04-01+2": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Production/deployments/.default?api-version=2024-04-01", + "Content": "{\r\n \"properties\": {\r\n \"deployedImages\": [\r\n {\r\n \"properties\": {\r\n \"image\": \"AzureSphereBlink1\",\r\n \"imageId\": \"14a6729e-5819-4737-8713-37b4798533f8\",\r\n \"regionalDataBoundary\": \"None\"\r\n }\r\n }\r\n ]\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "259" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "a1300b2d-2e84-410f-9832-b9d75070a029" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/9d88fa8b-23d1-47fb-b9ec-d804afd9387d*DCB8466FB889A5F569C7106FE9A097CBD3B47336886CB95592FDA00C5F942A1D?api-version=2024-04-01\u0026t=638475573103191557\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMTUwODE5WhcNMjUwMTI0MTUwODE5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASI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ufu4cu8GuqebO6n37jJIOk0YseLi0N0gggL99nNZZ8RbSK3D5wMFEDbnb8TeFrrksCqBQTAMVmptJqE-tIMqVvp5YMxH2JxPlCG8yGS3Y5aZKBq459OG2gRrjUCu1iSsY_gIj1_ZZG2Sy1hun8AOm5j_H08ZqIMMxhMEbwq9LEkLCju6Ay00l0FRHOhjbZKI_0vjduSKFvAfJWGENEwapfYlil_Ga65EzcHX7M0N5hMxQE3fIhcnQiBslo7sIzDtLY7Xf1MyYdggPjXvgONuj9bloY1fxEexrpR8jt5m6jg\u0026h=pVBnBXkFYV39t70fziNPfAQdBxVZG1_NSwqDESO9uVE" ], + "x-ms-request-id": [ "9d88fa8b-23d1-47fb-b9ec-d804afd9387d" ], + "x-ms-correlation-request-id": [ "8347b555-4912-411c-96bf-6182a3d437e9" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T083510Z:8347b555-4912-411c-96bf-6182a3d437e9" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 9780AA535A484F6AAB3855BC6754005C Ref B: MAA201060515051 Ref C: 2024-04-01T08:35:07Z" ], + "Date": [ "Mon, 01 Apr 2024 08:35:09 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "577" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Production/deployments/.default\",\"name\":\".default\",\"type\":\"microsoft.azuresphere/catalogs/products/devicegroups/deployments\",\"systemData\":{\"createdBy\":\"v-jiaji@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-01T08:35:08.0220861Z\",\"lastModifiedBy\":\"v-jiaji@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-04-01T08:35:08.0220861Z\"},\"properties\":{\"provisioningState\":\"Accepted\"}}", + "isContentBase64": false + } + }, + "AzSphereImageandDepoymentScenario+[NoContext]+CreateGetDeployment+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/9d88fa8b-23d1-47fb-b9ec-d804afd9387d*DCB8466FB889A5F569C7106FE9A097CBD3B47336886CB95592FDA00C5F942A1D?api-version=2024-04-01\u0026t=638475573103191557\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMTUwODE5WhcNMjUwMTI0MTUwODE5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK902W8oGHqHsYxfQcAXt6Ljumrh6DLgGihvCAJqh_U0j8R4Jupt1lXUnhMY-cA7JAT9q7SEoTZskdrko1uzzlaykxYQUacRB8irTYwbgK6DCIqWuOd2G-W2g3eWAyxRb-Dffjnsz-vBsjd1fyP0MvIXDSDMzp2oK65BSxTbBiStV3YxtKZ3eONvKga4d77iEw0zAZHIFkt0PSHzHO7kk-b_trhadwDxPYnjrQOGmouEj7HuNoC8H7-vKZvgbeplfrHtJO9vq0TOUUqIGlT236cbPe62XQNJRim_aa3chEFUmacjUnjEZtgJjup_tDQ0iV_Oe0ZqRBBGzpjoK23Wch0CAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjD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3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAGj6QqaLOPa3RZUHMPeeSymifn86nh52yaIojZbdHUiE_o0iWzV-2ZRZOxE2IgkOrAeMYXIUhMoqV7XxTwfpi6zGwrzIeuTWMbNjgzbIZGIMJCbUyNbvEkGqxvBpcwzATT8KQYU2-J2iL5slKYZIACN6THLJn5BI6dAecS1X4PJ5vNAgI8qlsYmnafZSCIrWLUQQUsZeLUaxy3t-hozvyfVe-B-nktPdgNv3-iCsI0AtlvezwfFcJXQHQeNByXg5oxXPIe02On7O1u8swvMta16Va5_kDzD80TS3LYzVk2nzUVxEqPaGhpA-vs_ttjm7hDhYk80OIsQ_YZd286sA58Q\u0026s=hXXinMVkyfkIfIUrabopWQh9VIytnzZA547BNJk3Cjmufu4cu8GuqebO6n37jJIOk0YseLi0N0gggL99nNZZ8RbSK3D5wMFEDbnb8TeFrrksCqBQTAMVmptJqE-tIMqVvp5YMxH2JxPlCG8yGS3Y5aZKBq459OG2gRrjUCu1iSsY_gIj1_ZZG2Sy1hun8AOm5j_H08ZqIMMxhMEbwq9LEkLCju6Ay00l0FRHOhjbZKI_0vjduSKFvAfJWGENEwapfYlil_Ga65EzcHX7M0N5hMxQE3fIhcnQiBslo7sIzDtLY7Xf1MyYdggPjXvgONuj9bloY1fxEexrpR8jt5m6jg\u0026h=pVBnBXkFYV39t70fziNPfAQdBxVZG1_NSwqDESO9uVE+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/9d88fa8b-23d1-47fb-b9ec-d804afd9387d*DCB8466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MPeeSymifn86nh52yaIojZbdHUiE_o0iWzV-2ZRZOxE2IgkOrAeMYXIUhMoqV7XxTwfpi6zGwrzIeuTWMbNjgzbIZGIMJCbUyNbvEkGqxvBpcwzATT8KQYU2-J2iL5slKYZIACN6THLJn5BI6dAecS1X4PJ5vNAgI8qlsYmnafZSCIrWLUQQUsZeLUaxy3t-hozvyfVe-B-nktPdgNv3-iCsI0AtlvezwfFcJXQHQeNByXg5oxXPIe02On7O1u8swvMta16Va5_kDzD80TS3LYzVk2nzUVxEqPaGhpA-vs_ttjm7hDhYk80OIsQ_YZd286sA58Q\u0026s=hXXinMVkyfkIfIUrabopWQh9VIytnzZA547BNJk3Cjmufu4cu8GuqebO6n37jJIOk0YseLi0N0gggL99nNZZ8RbSK3D5wMFEDbnb8TeFrrksCqBQTAMVmptJqE-tIMqVvp5YMxH2JxPlCG8yGS3Y5aZKBq459OG2gRrjUCu1iSsY_gIj1_ZZG2Sy1hun8AOm5j_H08ZqIMMxhMEbwq9LEkLCju6Ay00l0FRHOhjbZKI_0vjduSKFvAfJWGENEwapfYlil_Ga65EzcHX7M0N5hMxQE3fIhcnQiBslo7sIzDtLY7Xf1MyYdggPjXvgONuj9bloY1fxEexrpR8jt5m6jg\u0026h=pVBnBXkFYV39t70fziNPfAQdBxVZG1_NSwqDESO9uVE", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "52" ], + "x-ms-client-request-id": [ "9e9a6a9f-0d8f-49ef-8aa5-58c1f99f9605" ], + "CommandName": [ "New-AzSphereDeployment" ], + "FullCommandName": [ "New-AzSphereDeployment_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"6800b3a9-0000-0600-0000-660a71bf0000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "3652929c-3beb-4e1c-9dc2-e3f43137a002" ], + "x-ms-correlation-request-id": [ "1ca74080-fb51-4525-82fa-de5b3f7dca3a" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T083541Z:1ca74080-fb51-4525-82fa-de5b3f7dca3a" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: D8B4AD4B947B4FCB939D081582E2ADCE Ref B: MAA201060515051 Ref C: 2024-04-01T08:35:40Z" ], + "Date": [ "Mon, 01 Apr 2024 08:35:40 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "978" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/9d88fa8b-23d1-47fb-b9ec-d804afd9387d*DCB8466FB889A5F569C7106FE9A097CBD3B47336886CB95592FDA00C5F942A1D\",\"name\":\"9d88fa8b-23d1-47fb-b9ec-d804afd9387d*DCB8466FB889A5F569C7106FE9A097CBD3B47336886CB95592FDA00C5F942A1D\",\"resourceId\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Production/deployments/.default\",\"status\":\"Succeeded\",\"startTime\":\"2024-04-01T08:35:08.1831532Z\",\"endTime\":\"2024-04-01T08:35:11.625519Z\",\"error\":{\"target\":\"DeployToDeviceGroup\",\"details\":[]},\"properties\":{\"targetResourceId\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Production/deployments/4f0d1450-17a1-49ff-af9c-55e094e38899\"}}", + "isContentBase64": false + } + }, + "AzSphereImageandDepoymentScenario+[NoContext]+CreateGetDeployment+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Production/deployments/.default?api-version=2024-04-01+4": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Production/deployments/.default?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "53" ], + "x-ms-client-request-id": [ "9e9a6a9f-0d8f-49ef-8aa5-58c1f99f9605" ], + "CommandName": [ "New-AzSphereDeployment" ], + "FullCommandName": [ "New-AzSphereDeployment_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "2d7cf147-626e-4951-b790-fe97a29bed7d" ], + "x-ms-request-id": [ "c7cb8fee-2dc8-4f8e-8c26-acb56a2defc3" ], + "x-ms-correlation-request-id": [ "5a9a4b44-8911-4f61-bf67-63b4489ecadd" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T083543Z:5a9a4b44-8911-4f61-bf67-63b4489ecadd" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: EDFE33100964417891CB6EF17EE982CD Ref B: MAA201060515051 Ref C: 2024-04-01T08:35:41Z" ], + "Date": [ "Mon, 01 Apr 2024 08:35:42 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1593" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Production/deployments/4f0d1450-17a1-49ff-af9c-55e094e38899\",\"name\":\"4f0d1450-17a1-49ff-af9c-55e094e38899\",\"type\":\"Microsoft.AzureSphere/catalogs/products/deviceGroups/deployments\",\"systemData\":{\"createdAt\":\"2024-04-01T08:35:10.5267943Z\",\"lastModifiedAt\":\"2024-04-01T08:35:10.5267943Z\"},\"properties\":{\"deployedImages\":[{\"properties\":{\"uri\":\"https://prodptimg.blob.core.windows.net/2962a1e9-91ce-4694-a28c-41c2354493ef/images/14a6729e-5819-4737-8713-37b4798533f8?skoid=07baa84a-7259-40e9-9af7-29600ee6372e\u0026sktid=33e01921-4d64-4f8c-a055-5bdaffd5e33d\u0026skt=2024-04-01T08%3A30%3A43Z\u0026ske=2024-04-01T09%3A35%3A43Z\u0026sks=b\u0026skv=2021-12-02\u0026sv=2021-12-02\u0026spr=https,http\u0026se=2024-04-01T16%3A35%3A43Z\u0026sr=b\u0026sp=r\u0026sig=dIFhq5O17vPgWOjQKB6AtF9vt2Ru7CRseWNMMii8hjo%3D\",\"image\":\"AzureSphereBlink1\",\"imageId\":\"14a6729e-5819-4737-8713-37b4798533f8\",\"regionalDataBoundary\":\"None\",\"description\":null,\"componentId\":\"42257ad6-382d-405f-b7cc-e110fbda2d0b\",\"imageType\":\"Applications\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/14a6729e-5819-4737-8713-37b4798533f8\",\"name\":\"14a6729e-5819-4737-8713-37b4798533f8\",\"type\":\"Microsoft.AzureSphere/catalogs/images\",\"systemData\":null}],\"deploymentDateUtc\":\"2024-04-01T08:35:10.5267943Z\",\"deploymentId\":\"4f0d1450-17a1-49ff-af9c-55e094e38899\",\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereImageandDepoymentScenario+[NoContext]+CreateGetDeployment+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Production/deployments/.default?api-version=2024-04-01+5": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Production/deployments/.default?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "54" ], + "x-ms-client-request-id": [ "3e6c894b-3dd4-406d-b910-fbaf8fbefa61" ], + "CommandName": [ "Get-AzSphereDeployment" ], + "FullCommandName": [ "Get-AzSphereDeployment_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "3c2fdb25-d865-428e-9de9-b87513dd080c" ], + "x-ms-request-id": [ "60dbf476-dc2a-4234-9a7b-6d9183b58a74" ], + "x-ms-correlation-request-id": [ "8c1aa7e4-171b-4e61-bfc9-cfa90861f53b" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T083545Z:8c1aa7e4-171b-4e61-bfc9-cfa90861f53b" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 5AECBBE027744E25B492895989B972F4 Ref B: MAA201060515051 Ref C: 2024-04-01T08:35:43Z" ], + "Date": [ "Mon, 01 Apr 2024 08:35:44 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1599" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Production/deployments/4f0d1450-17a1-49ff-af9c-55e094e38899\",\"name\":\"4f0d1450-17a1-49ff-af9c-55e094e38899\",\"type\":\"Microsoft.AzureSphere/catalogs/products/deviceGroups/deployments\",\"systemData\":{\"createdAt\":\"2024-04-01T08:35:10.5267943Z\",\"lastModifiedAt\":\"2024-04-01T08:35:10.5267943Z\"},\"properties\":{\"deployedImages\":[{\"properties\":{\"uri\":\"https://prodptimg.blob.core.windows.net/2962a1e9-91ce-4694-a28c-41c2354493ef/images/14a6729e-5819-4737-8713-37b4798533f8?skoid=07baa84a-7259-40e9-9af7-29600ee6372e\u0026sktid=33e01921-4d64-4f8c-a055-5bdaffd5e33d\u0026skt=2024-04-01T08%3A30%3A45Z\u0026ske=2024-04-01T09%3A35%3A45Z\u0026sks=b\u0026skv=2021-12-02\u0026sv=2021-12-02\u0026spr=https,http\u0026se=2024-04-01T16%3A35%3A45Z\u0026sr=b\u0026sp=r\u0026sig=flCpLRTRwweX9%2B1M%2BbdbdfprpAgdeCgRUOwun%2Fbrh4k%3D\",\"image\":\"AzureSphereBlink1\",\"imageId\":\"14a6729e-5819-4737-8713-37b4798533f8\",\"regionalDataBoundary\":\"None\",\"description\":null,\"componentId\":\"42257ad6-382d-405f-b7cc-e110fbda2d0b\",\"imageType\":\"Applications\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/14a6729e-5819-4737-8713-37b4798533f8\",\"name\":\"14a6729e-5819-4737-8713-37b4798533f8\",\"type\":\"Microsoft.AzureSphere/catalogs/images\",\"systemData\":null}],\"deploymentDateUtc\":\"2024-04-01T08:35:10.5267943Z\",\"deploymentId\":\"4f0d1450-17a1-49ff-af9c-55e094e38899\",\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereImageandDepoymentScenario+[NoContext]+CreateGetDeployment+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Production/deployments/4f0d1450-17a1-49ff-af9c-55e094e38899?api-version=2024-04-01+6": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Production/deployments/4f0d1450-17a1-49ff-af9c-55e094e38899?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "55" ], + "x-ms-client-request-id": [ "fef90220-3820-4936-82be-61f00f6e5e46" ], + "CommandName": [ "Get-AzSphereDeployment" ], + "FullCommandName": [ "Get-AzSphereDeployment_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "4bace018-6e3a-42aa-be60-84859c757a26" ], + "x-ms-request-id": [ "c0e94459-fe39-4a77-b0fe-8c1d990cfca1" ], + "x-ms-correlation-request-id": [ "f8165d86-92e2-4e4e-876b-dfa90ca46f09" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T083546Z:f8165d86-92e2-4e4e-876b-dfa90ca46f09" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: BC33EF2DAC324D40BFACB81BE9CA05E4 Ref B: MAA201060515051 Ref C: 2024-04-01T08:35:45Z" ], + "Date": [ "Mon, 01 Apr 2024 08:35:45 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1595" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Production/deployments/4f0d1450-17a1-49ff-af9c-55e094e38899\",\"name\":\"4f0d1450-17a1-49ff-af9c-55e094e38899\",\"type\":\"Microsoft.AzureSphere/catalogs/products/deviceGroups/deployments\",\"systemData\":{\"createdAt\":\"2024-04-01T08:35:10.5267943Z\",\"lastModifiedAt\":\"2024-04-01T08:35:10.5267943Z\"},\"properties\":{\"deployedImages\":[{\"properties\":{\"uri\":\"https://prodptimg.blob.core.windows.net/2962a1e9-91ce-4694-a28c-41c2354493ef/images/14a6729e-5819-4737-8713-37b4798533f8?skoid=07baa84a-7259-40e9-9af7-29600ee6372e\u0026sktid=33e01921-4d64-4f8c-a055-5bdaffd5e33d\u0026skt=2024-04-01T08%3A30%3A46Z\u0026ske=2024-04-01T09%3A35%3A46Z\u0026sks=b\u0026skv=2021-12-02\u0026sv=2021-12-02\u0026spr=https,http\u0026se=2024-04-01T16%3A35%3A46Z\u0026sr=b\u0026sp=r\u0026sig=S1A5b1qPlTKgWrJy%2BdllWZirQcoaW0sOyPJLns3vzWs%3D\",\"image\":\"AzureSphereBlink1\",\"imageId\":\"14a6729e-5819-4737-8713-37b4798533f8\",\"regionalDataBoundary\":\"None\",\"description\":null,\"componentId\":\"42257ad6-382d-405f-b7cc-e110fbda2d0b\",\"imageType\":\"Applications\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/14a6729e-5819-4737-8713-37b4798533f8\",\"name\":\"14a6729e-5819-4737-8713-37b4798533f8\",\"type\":\"Microsoft.AzureSphere/catalogs/images\",\"systemData\":null}],\"deploymentDateUtc\":\"2024-04-01T08:35:10.5267943Z\",\"deploymentId\":\"4f0d1450-17a1-49ff-af9c-55e094e38899\",\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereImageandDepoymentScenario+[NoContext]+CreateGetDeployment+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/d1d0ad2a-5054-4c88-897c-36fa01684dd0?api-version=2024-04-01+7": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/d1d0ad2a-5054-4c88-897c-36fa01684dd0?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "56" ], + "x-ms-client-request-id": [ "f3ea73f5-ad47-441c-bb00-7fccaa8f8b3f" ], + "CommandName": [ "Get-AzSphereImage" ], + "FullCommandName": [ "Get-AzSphereImage_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "44c5d837-6f65-4425-8fb0-a164cb0696a3" ], + "x-ms-request-id": [ "6b1188f3-bf93-40fa-adf9-4dc8829a31fb" ], + "x-ms-correlation-request-id": [ "da03fe99-214a-44e3-9a05-212fb0b9ce33" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T083548Z:da03fe99-214a-44e3-9a05-212fb0b9ce33" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 1BC54E271E854201AC6FAFC0908C1A56 Ref B: MAA201060515051 Ref C: 2024-04-01T08:35:46Z" ], + "Date": [ "Mon, 01 Apr 2024 08:35:47 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "951" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/d1d0ad2a-5054-4c88-897c-36fa01684dd0\",\"name\":\"d1d0ad2a-5054-4c88-897c-36fa01684dd0\",\"type\":\"Microsoft.AzureSphere/catalogs/images\",\"properties\":{\"uri\":\"https://prodptimg.blob.core.windows.net/2962a1e9-91ce-4694-a28c-41c2354493ef/images/d1d0ad2a-5054-4c88-897c-36fa01684dd0?skoid=e07f16fe-818d-4c68-9349-65d385173d92\u0026sktid=33e01921-4d64-4f8c-a055-5bdaffd5e33d\u0026skt=2024-04-01T08%3A30%3A47Z\u0026ske=2024-04-01T09%3A35%3A47Z\u0026sks=b\u0026skv=2021-12-02\u0026sv=2021-12-02\u0026spr=https,http\u0026se=2024-04-01T16%3A35%3A47Z\u0026sr=b\u0026sp=r\u0026sig=6XPD6%2F1CGHV55aUZjZBItQg2G0x%2F8KykmYFB5mNDIbo%3D\",\"image\":\"ErrorReportingStage1\",\"imageId\":\"d1d0ad2a-5054-4c88-897c-36fa01684dd0\",\"regionalDataBoundary\":\"None\",\"description\":null,\"componentId\":\"a60a27ff-8936-4a49-b73f-70861db03d43\",\"imageType\":\"Applications\",\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereImageandDepoymentScenario+[NoContext]+CreateGetDeployment+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/a04f0a91-b369-4249-a47d-28c118e2cb3b?api-version=2024-04-01+8": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/a04f0a91-b369-4249-a47d-28c118e2cb3b?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "57" ], + "x-ms-client-request-id": [ "27f91392-82d9-4f50-a904-9034d2218536" ], + "CommandName": [ "Get-AzSphereImage" ], + "FullCommandName": [ "Get-AzSphereImage_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "0dd361e2-8e1b-42bd-91db-3a18f4a60c3e" ], + "x-ms-request-id": [ "1c6634a6-5bab-4d3d-8c17-ae56ec411115" ], + "x-ms-correlation-request-id": [ "a4d2ed74-9e26-4c66-9409-67fb86713ec6" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T083549Z:a4d2ed74-9e26-4c66-9409-67fb86713ec6" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: F25A96CF62F0472EAEBA3242469978FF Ref B: MAA201060515051 Ref C: 2024-04-01T08:35:48Z" ], + "Date": [ "Mon, 01 Apr 2024 08:35:48 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "946" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/a04f0a91-b369-4249-a47d-28c118e2cb3b\",\"name\":\"a04f0a91-b369-4249-a47d-28c118e2cb3b\",\"type\":\"Microsoft.AzureSphere/catalogs/images\",\"properties\":{\"uri\":\"https://prodptimg.blob.core.windows.net/2962a1e9-91ce-4694-a28c-41c2354493ef/images/a04f0a91-b369-4249-a47d-28c118e2cb3b?skoid=07baa84a-7259-40e9-9af7-29600ee6372e\u0026sktid=33e01921-4d64-4f8c-a055-5bdaffd5e33d\u0026skt=2024-04-01T08%3A30%3A49Z\u0026ske=2024-04-01T09%3A35%3A49Z\u0026sks=b\u0026skv=2021-12-02\u0026sv=2021-12-02\u0026spr=https,http\u0026se=2024-04-01T16%3A35%3A49Z\u0026sr=b\u0026sp=r\u0026sig=RKjR8iv8CO5eNa3kbYgjEd7T%2B2vZ71Gye6OJ2IwXNxg%3D\",\"image\":\"GPIO_HighLevelApp\",\"imageId\":\"a04f0a91-b369-4249-a47d-28c118e2cb3b\",\"regionalDataBoundary\":\"None\",\"description\":null,\"componentId\":\"dc7f135c-6074-4d49-aa3a-160e4eed884f\",\"imageType\":\"Applications\",\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereImageandDepoymentScenario+[NoContext]+CreateGetDeployment+$PUT+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Production/deployments/.default?api-version=2024-04-01+9": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Production/deployments/.default?api-version=2024-04-01", + "Content": "{\r\n \"properties\": {\r\n \"deployedImages\": [\r\n {\r\n \"properties\": {\r\n \"image\": \"ErrorReportingStage1\",\r\n \"imageId\": \"d1d0ad2a-5054-4c88-897c-36fa01684dd0\",\r\n \"regionalDataBoundary\": \"None\"\r\n }\r\n },\r\n {\r\n \"properties\": {\r\n \"image\": \"GPIO_HighLevelApp\",\r\n \"imageId\": \"a04f0a91-b369-4249-a47d-28c118e2cb3b\",\r\n \"regionalDataBoundary\": \"None\"\r\n }\r\n }\r\n ]\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "462" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "44f9befc-a2f8-42d1-b1f5-7e37c5c26542" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/e03d5a26-a6d0-43a0-a97d-d3c03cec8705*DCB8466FB889A5F569C7106FE9A097CBD3B47336886CB95592FDA00C5F942A1D?api-version=2024-04-01\u0026t=638475573522405600\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMTUwODE5WhcNMjUwMTI0MTUwODE5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK902W8oGHqHsYxfQcAXt6Ljumrh6DLgGihvCAJqh_U0j8R4Jupt1lXUnhMY-cA7JAT9q7SEoTZskdrko1uzzlaykxYQUacRB8irTYwbgK6DCIqWuOd2G-W2g3eWAyxRb-Dffjnsz-vBsjd1fyP0MvIXDSDMzp2oK65BSxTbBiStV3YxtKZ3eONvKga4d77iEw0zAZHIFkt0PSHzHO7kk-b_trhadwDxPYnjrQOGmouEj7HuNoC8H7-vKZv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RsKVhGJuSwdw128sI3iS336GqQ\u0026h=me-Ce5SIDm2YiidB_Prv72bjNnOSw2n_qWObRPxvmsc" ], + "x-ms-request-id": [ "e03d5a26-a6d0-43a0-a97d-d3c03cec8705" ], + "x-ms-correlation-request-id": [ "a82fdb76-5e2b-4fc9-9b61-6967782b2f42" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T083552Z:a82fdb76-5e2b-4fc9-9b61-6967782b2f42" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: B15CA86787A84200BDDDD265F2348BCC Ref B: MAA201060515051 Ref C: 2024-04-01T08:35:49Z" ], + "Date": [ "Mon, 01 Apr 2024 08:35:51 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "577" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Production/deployments/.default\",\"name\":\".default\",\"type\":\"microsoft.azuresphere/catalogs/products/devicegroups/deployments\",\"systemData\":{\"createdBy\":\"v-jiaji@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-01T08:35:49.9749265Z\",\"lastModifiedBy\":\"v-jiaji@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-04-01T08:35:49.9749265Z\"},\"properties\":{\"provisioningState\":\"Accepted\"}}", + "isContentBase64": false + } + }, + "AzSphereImageandDepoymentScenario+[NoContext]+CreateGetDeployment+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/e03d5a26-a6d0-43a0-a97d-d3c03cec8705*DCB8466FB889A5F569C7106FE9A097CBD3B47336886CB95592FDA00C5F942A1D?api-version=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OrAeMYXIUhMoqV7XxTwfpi6zGwrzIeuTWMbNjgzbIZGIMJCbUyNbvEkGqxvBpcwzATT8KQYU2-J2iL5slKYZIACN6THLJn5BI6dAecS1X4PJ5vNAgI8qlsYmnafZSCIrWLUQQUsZeLUaxy3t-hozvyfVe-B-nktPdgNv3-iCsI0AtlvezwfFcJXQHQeNByXg5oxXPIe02On7O1u8swvMta16Va5_kDzD80TS3LYzVk2nzUVxEqPaGhpA-vs_ttjm7hDhYk80OIsQ_YZd286sA58Q\u0026s=CoHeUGlHkD5f7Esn0zlAe_dH2CxVh7Z6JSlcX7Tp9q2W2kHeHIg7Gl6q1AAy2i_Q5vOZlhepU8LZcvr-GanPs5mcPr3hcX33sMSuuZQYIdHS9N8StnZxAq1yMzmG-znLceGbEzYRMhFuL0g61N2o5nTXuHGMTJe2z6vBIBfvQDw-AUaEnrbUyVEMiFEXcI4kgLBEogDdulfd10WT6Pcf7txeRu2dbZLLfQiM2MoVBkwaptMJcnHg2IRgiQEgos-4fnmy_Z5aE-rVxF6oHjoPIG1t-K7wy8Raw2dgqG33YToJRgUOuYvMq4kEG_c5RsKVhGJuSwdw128sI3iS336GqQ\u0026h=me-Ce5SIDm2YiidB_Prv72bjNnOSw2n_qWObRPxvmsc+10": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/e03d5a26-a6d0-43a0-a97d-d3c03cec8705*DCB8466FB889A5F569C7106FE9A097CBD3B47336886CB95592FDA00C5F942A1D?api-version=2024-04-01\u0026t=638475573522405600\u0026c=MIIHADCCBeigAwIBAgITfARk1TE_ZglsTRafPwAABGTVMTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMTUwODE5Wh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8swvMta16Va5_kDzD80TS3LYzVk2nzUVxEqPaGhpA-vs_ttjm7hDhYk80OIsQ_YZd286sA58Q\u0026s=CoHeUGlHkD5f7Esn0zlAe_dH2CxVh7Z6JSlcX7Tp9q2W2kHeHIg7Gl6q1AAy2i_Q5vOZlhepU8LZcvr-GanPs5mcPr3hcX33sMSuuZQYIdHS9N8StnZxAq1yMzmG-znLceGbEzYRMhFuL0g61N2o5nTXuHGMTJe2z6vBIBfvQDw-AUaEnrbUyVEMiFEXcI4kgLBEogDdulfd10WT6Pcf7txeRu2dbZLLfQiM2MoVBkwaptMJcnHg2IRgiQEgos-4fnmy_Z5aE-rVxF6oHjoPIG1t-K7wy8Raw2dgqG33YToJRgUOuYvMq4kEG_c5RsKVhGJuSwdw128sI3iS336GqQ\u0026h=me-Ce5SIDm2YiidB_Prv72bjNnOSw2n_qWObRPxvmsc", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "59" ], + "x-ms-client-request-id": [ "aeb6901b-90d2-4f73-9667-4587dadc0076" ], + "CommandName": [ "New-AzSphereDeployment" ], + "FullCommandName": [ "New-AzSphereDeployment_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"680084ac-0000-0600-0000-660a71e90000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "1f0f9cc9-ab77-414a-b902-bd83c3c22ab2" ], + "x-ms-correlation-request-id": [ "3c3c0a5a-0df3-485f-9ced-5ad3f9306388" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T083623Z:3c3c0a5a-0df3-485f-9ced-5ad3f9306388" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 1E09F668C03745AD8C932DDF2E796EA5 Ref B: MAA201060515051 Ref C: 2024-04-01T08:36:22Z" ], + "Date": [ "Mon, 01 Apr 2024 08:36:22 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "979" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/e03d5a26-a6d0-43a0-a97d-d3c03cec8705*DCB8466FB889A5F569C7106FE9A097CBD3B47336886CB95592FDA00C5F942A1D\",\"name\":\"e03d5a26-a6d0-43a0-a97d-d3c03cec8705*DCB8466FB889A5F569C7106FE9A097CBD3B47336886CB95592FDA00C5F942A1D\",\"resourceId\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Production/deployments/.default\",\"status\":\"Succeeded\",\"startTime\":\"2024-04-01T08:35:50.0926079Z\",\"endTime\":\"2024-04-01T08:35:53.1936799Z\",\"error\":{\"target\":\"DeployToDeviceGroup\",\"details\":[]},\"properties\":{\"targetResourceId\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Production/deployments/3d527ce1-11b8-4db0-8cdf-56bf62c935d0\"}}", + "isContentBase64": false + } + }, + "AzSphereImageandDepoymentScenario+[NoContext]+CreateGetDeployment+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Production/deployments/.default?api-version=2024-04-01+11": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Production/deployments/.default?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "60" ], + "x-ms-client-request-id": [ "aeb6901b-90d2-4f73-9667-4587dadc0076" ], + "CommandName": [ "New-AzSphereDeployment" ], + "FullCommandName": [ "New-AzSphereDeployment_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "5bdfafb1-4a9b-4153-b497-21196125bc47" ], + "x-ms-request-id": [ "efb9c6f7-845b-4d81-9e99-b5620f26998b" ], + "x-ms-correlation-request-id": [ "c4b72b00-938d-48c0-9ab1-876910b308ec" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T083625Z:c4b72b00-938d-48c0-9ab1-876910b308ec" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 6A891AE53D4C439FAC727A7FE53F7B39 Ref B: MAA201060515051 Ref C: 2024-04-01T08:36:23Z" ], + "Date": [ "Mon, 01 Apr 2024 08:36:24 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "2569" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Production/deployments/3d527ce1-11b8-4db0-8cdf-56bf62c935d0\",\"name\":\"3d527ce1-11b8-4db0-8cdf-56bf62c935d0\",\"type\":\"Microsoft.AzureSphere/catalogs/products/deviceGroups/deployments\",\"systemData\":{\"createdAt\":\"2024-04-01T08:35:52.3577777Z\",\"lastModifiedAt\":\"2024-04-01T08:35:52.3577777Z\"},\"properties\":{\"deployedImages\":[{\"properties\":{\"uri\":\"https://prodptimg.blob.core.windows.net/2962a1e9-91ce-4694-a28c-41c2354493ef/images/d1d0ad2a-5054-4c88-897c-36fa01684dd0?skoid=07baa84a-7259-40e9-9af7-29600ee6372e\u0026sktid=33e01921-4d64-4f8c-a055-5bdaffd5e33d\u0026skt=2024-04-01T08%3A31%3A25Z\u0026ske=2024-04-01T09%3A36%3A25Z\u0026sks=b\u0026skv=2021-12-02\u0026sv=2021-12-02\u0026spr=https,http\u0026se=2024-04-01T16%3A36%3A25Z\u0026sr=b\u0026sp=r\u0026sig=rNYp%2B%2B%2FHWcypwGpmA6Gt3McZr1FSJ%2BlPPO28MDexz14%3D\",\"image\":\"ErrorReportingStage1\",\"imageId\":\"d1d0ad2a-5054-4c88-897c-36fa01684dd0\",\"regionalDataBoundary\":\"None\",\"description\":null,\"componentId\":\"a60a27ff-8936-4a49-b73f-70861db03d43\",\"imageType\":\"Applications\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/d1d0ad2a-5054-4c88-897c-36fa01684dd0\",\"name\":\"d1d0ad2a-5054-4c88-897c-36fa01684dd0\",\"type\":\"Microsoft.AzureSphere/catalogs/images\",\"systemData\":null},{\"properties\":{\"uri\":\"https://prodptimg.blob.core.windows.net/2962a1e9-91ce-4694-a28c-41c2354493ef/images/a04f0a91-b369-4249-a47d-28c118e2cb3b?skoid=07baa84a-7259-40e9-9af7-29600ee6372e\u0026sktid=33e01921-4d64-4f8c-a055-5bdaffd5e33d\u0026skt=2024-04-01T08%3A31%3A25Z\u0026ske=2024-04-01T09%3A36%3A25Z\u0026sks=b\u0026skv=2021-12-02\u0026sv=2021-12-02\u0026spr=https,http\u0026se=2024-04-01T16%3A36%3A25Z\u0026sr=b\u0026sp=r\u0026sig=l0csyHRutPVmiEJMRoLwGhWFpZGJeha6Jk8hCr%2Bw0PQ%3D\",\"image\":\"GPIO_HighLevelApp\",\"imageId\":\"a04f0a91-b369-4249-a47d-28c118e2cb3b\",\"regionalDataBoundary\":\"None\",\"description\":null,\"componentId\":\"dc7f135c-6074-4d49-aa3a-160e4eed884f\",\"imageType\":\"Applications\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/a04f0a91-b369-4249-a47d-28c118e2cb3b\",\"name\":\"a04f0a91-b369-4249-a47d-28c118e2cb3b\",\"type\":\"Microsoft.AzureSphere/catalogs/images\",\"systemData\":null}],\"deploymentDateUtc\":\"2024-04-01T08:35:52.3577777Z\",\"deploymentId\":\"3d527ce1-11b8-4db0-8cdf-56bf62c935d0\",\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereImageandDepoymentScenario+[NoContext]+CreateGetDeployment+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Production/deployments/3d527ce1-11b8-4db0-8cdf-56bf62c935d0?api-version=2024-04-01+12": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Production/deployments/3d527ce1-11b8-4db0-8cdf-56bf62c935d0?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "61" ], + "x-ms-client-request-id": [ "6463efc6-3607-4eda-b8cc-c9f15ff90116" ], + "CommandName": [ "Get-AzSphereDeployment" ], + "FullCommandName": [ "Get-AzSphereDeployment_GetViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "1c580b90-4c22-4285-9a2b-d34fd75bf9a2" ], + "x-ms-request-id": [ "5b62ba53-3f69-4485-98e7-15236dd70f16" ], + "x-ms-correlation-request-id": [ "ae7a7adf-9d28-4e9d-986c-58b9e114b5a5" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T083626Z:ae7a7adf-9d28-4e9d-986c-58b9e114b5a5" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: EAF2B84BB2FF416A815B81263D65BB77 Ref B: MAA201060515051 Ref C: 2024-04-01T08:36:25Z" ], + "Date": [ "Mon, 01 Apr 2024 08:36:25 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "2563" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Production/deployments/3d527ce1-11b8-4db0-8cdf-56bf62c935d0\",\"name\":\"3d527ce1-11b8-4db0-8cdf-56bf62c935d0\",\"type\":\"Microsoft.AzureSphere/catalogs/products/deviceGroups/deployments\",\"systemData\":{\"createdAt\":\"2024-04-01T08:35:52.3577777Z\",\"lastModifiedAt\":\"2024-04-01T08:35:52.3577777Z\"},\"properties\":{\"deployedImages\":[{\"properties\":{\"uri\":\"https://prodptimg.blob.core.windows.net/2962a1e9-91ce-4694-a28c-41c2354493ef/images/d1d0ad2a-5054-4c88-897c-36fa01684dd0?skoid=07baa84a-7259-40e9-9af7-29600ee6372e\u0026sktid=33e01921-4d64-4f8c-a055-5bdaffd5e33d\u0026skt=2024-04-01T08%3A31%3A26Z\u0026ske=2024-04-01T09%3A36%3A26Z\u0026sks=b\u0026skv=2021-12-02\u0026sv=2021-12-02\u0026spr=https,http\u0026se=2024-04-01T16%3A36%3A26Z\u0026sr=b\u0026sp=r\u0026sig=7SAPzytyUYnoQvD0aHH3umei%2FM9gRW%2FHIadHvlNFLog%3D\",\"image\":\"ErrorReportingStage1\",\"imageId\":\"d1d0ad2a-5054-4c88-897c-36fa01684dd0\",\"regionalDataBoundary\":\"None\",\"description\":null,\"componentId\":\"a60a27ff-8936-4a49-b73f-70861db03d43\",\"imageType\":\"Applications\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/d1d0ad2a-5054-4c88-897c-36fa01684dd0\",\"name\":\"d1d0ad2a-5054-4c88-897c-36fa01684dd0\",\"type\":\"Microsoft.AzureSphere/catalogs/images\",\"systemData\":null},{\"properties\":{\"uri\":\"https://prodptimg.blob.core.windows.net/2962a1e9-91ce-4694-a28c-41c2354493ef/images/a04f0a91-b369-4249-a47d-28c118e2cb3b?skoid=07baa84a-7259-40e9-9af7-29600ee6372e\u0026sktid=33e01921-4d64-4f8c-a055-5bdaffd5e33d\u0026skt=2024-04-01T08%3A31%3A26Z\u0026ske=2024-04-01T09%3A36%3A26Z\u0026sks=b\u0026skv=2021-12-02\u0026sv=2021-12-02\u0026spr=https,http\u0026se=2024-04-01T16%3A36%3A26Z\u0026sr=b\u0026sp=r\u0026sig=34iBeqISTaMBXyjqWIWSJJKXZt23sHLWF4VVZIy5Kj8%3D\",\"image\":\"GPIO_HighLevelApp\",\"imageId\":\"a04f0a91-b369-4249-a47d-28c118e2cb3b\",\"regionalDataBoundary\":\"None\",\"description\":null,\"componentId\":\"dc7f135c-6074-4d49-aa3a-160e4eed884f\",\"imageType\":\"Applications\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/a04f0a91-b369-4249-a47d-28c118e2cb3b\",\"name\":\"a04f0a91-b369-4249-a47d-28c118e2cb3b\",\"type\":\"Microsoft.AzureSphere/catalogs/images\",\"systemData\":null}],\"deploymentDateUtc\":\"2024-04-01T08:35:52.3577777Z\",\"deploymentId\":\"3d527ce1-11b8-4db0-8cdf-56bf62c935d0\",\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereImageandDepoymentScenario+[NoContext]+ListImage+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images?api-version=2024-04-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "62" ], + "x-ms-client-request-id": [ "dc10927c-c48f-4d30-b6ee-b62ec81697e8" ], + "CommandName": [ "Get-AzSphereImage" ], + "FullCommandName": [ "Get-AzSphereImage_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "9feb1e23-5ece-46d0-b455-66b0d3c434bf" ], + "x-ms-request-id": [ "9a0f0acd-6190-4475-80a8-233aa8600c20" ], + "x-ms-correlation-request-id": [ "b7a407ba-b13a-41f2-ae93-e6bb5daeeff7" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T083628Z:b7a407ba-b13a-41f2-ae93-e6bb5daeeff7" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 526056C76E0E4EC399918FBB0D9CE307 Ref B: MAA201060515051 Ref C: 2024-04-01T08:36:26Z" ], + "Date": [ "Mon, 01 Apr 2024 08:36:27 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "3812" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/9c6b0d1a-3f78-4382-86dd-371aabc3e006\",\"name\":\"9c6b0d1a-3f78-4382-86dd-371aabc3e006\",\"type\":\"Microsoft.AzureSphere/catalogs/images\",\"properties\":{\"uri\":\"https://prodptimg.blob.core.windows.net/2962a1e9-91ce-4694-a28c-41c2354493ef/images/9c6b0d1a-3f78-4382-86dd-371aabc3e006?skoid=07baa84a-7259-40e9-9af7-29600ee6372e\u0026sktid=33e01921-4d64-4f8c-a055-5bdaffd5e33d\u0026skt=2024-04-01T08%3A31%3A28Z\u0026ske=2024-04-01T09%3A36%3A28Z\u0026sks=b\u0026skv=2021-12-02\u0026sv=2021-12-02\u0026spr=https,http\u0026se=2024-04-01T16%3A36%3A28Z\u0026sr=b\u0026sp=r\u0026sig=Ts09af8Qs5edEjlrdrF7TntG1TdGp4aAgrI9s%2FjcmLc%3D\",\"image\":\"HelloWorld_HighLevelApp\",\"imageId\":\"9c6b0d1a-3f78-4382-86dd-371aabc3e006\",\"regionalDataBoundary\":\"None\",\"description\":null,\"componentId\":\"1689d8b2-c835-2e27-27ad-e894d6d15fa9\",\"imageType\":\"Applications\",\"provisioningState\":\"Succeeded\"}},{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/a04f0a91-b369-4249-a47d-28c118e2cb3b\",\"name\":\"a04f0a91-b369-4249-a47d-28c118e2cb3b\",\"type\":\"Microsoft.AzureSphere/catalogs/images\",\"properties\":{\"uri\":\"https://prodptimg.blob.core.windows.net/2962a1e9-91ce-4694-a28c-41c2354493ef/images/a04f0a91-b369-4249-a47d-28c118e2cb3b?skoid=07baa84a-7259-40e9-9af7-29600ee6372e\u0026sktid=33e01921-4d64-4f8c-a055-5bdaffd5e33d\u0026skt=2024-04-01T08%3A31%3A28Z\u0026ske=2024-04-01T09%3A36%3A28Z\u0026sks=b\u0026skv=2021-12-02\u0026sv=2021-12-02\u0026spr=https,http\u0026se=2024-04-01T16%3A36%3A28Z\u0026sr=b\u0026sp=r\u0026sig=zZyR3kYZd1gm3OB%2FBRq7AJmJLZAxJfAlT6uGf%2BCoZuQ%3D\",\"image\":\"GPIO_HighLevelApp\",\"imageId\":\"a04f0a91-b369-4249-a47d-28c118e2cb3b\",\"regionalDataBoundary\":\"None\",\"description\":null,\"componentId\":\"dc7f135c-6074-4d49-aa3a-160e4eed884f\",\"imageType\":\"Applications\",\"provisioningState\":\"Succeeded\"}},{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/d1d0ad2a-5054-4c88-897c-36fa01684dd0\",\"name\":\"d1d0ad2a-5054-4c88-897c-36fa01684dd0\",\"type\":\"Microsoft.AzureSphere/catalogs/images\",\"properties\":{\"uri\":\"https://prodptimg.blob.core.windows.net/2962a1e9-91ce-4694-a28c-41c2354493ef/images/d1d0ad2a-5054-4c88-897c-36fa01684dd0?skoid=07baa84a-7259-40e9-9af7-29600ee6372e\u0026sktid=33e01921-4d64-4f8c-a055-5bdaffd5e33d\u0026skt=2024-04-01T08%3A31%3A28Z\u0026ske=2024-04-01T09%3A36%3A28Z\u0026sks=b\u0026skv=2021-12-02\u0026sv=2021-12-02\u0026spr=https,http\u0026se=2024-04-01T16%3A36%3A28Z\u0026sr=b\u0026sp=r\u0026sig=10lu6xh8LkRrbyJc%2BL7cVJ%2FwtAHH2Xq9yatm92%2FQZpI%3D\",\"image\":\"ErrorReportingStage1\",\"imageId\":\"d1d0ad2a-5054-4c88-897c-36fa01684dd0\",\"regionalDataBoundary\":\"None\",\"description\":null,\"componentId\":\"a60a27ff-8936-4a49-b73f-70861db03d43\",\"imageType\":\"Applications\",\"provisioningState\":\"Succeeded\"}},{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/14a6729e-5819-4737-8713-37b4798533f8\",\"name\":\"14a6729e-5819-4737-8713-37b4798533f8\",\"type\":\"Microsoft.AzureSphere/catalogs/images\",\"properties\":{\"uri\":\"https://prodptimg.blob.core.windows.net/2962a1e9-91ce-4694-a28c-41c2354493ef/images/14a6729e-5819-4737-8713-37b4798533f8?skoid=07baa84a-7259-40e9-9af7-29600ee6372e\u0026sktid=33e01921-4d64-4f8c-a055-5bdaffd5e33d\u0026skt=2024-04-01T08%3A31%3A28Z\u0026ske=2024-04-01T09%3A36%3A28Z\u0026sks=b\u0026skv=2021-12-02\u0026sv=2021-12-02\u0026spr=https,http\u0026se=2024-04-01T16%3A36%3A28Z\u0026sr=b\u0026sp=r\u0026sig=aMcnSzfGubVg09iJF3tLzMkgSPRUimDIR8g9FOVaaRc%3D\",\"image\":\"AzureSphereBlink1\",\"imageId\":\"14a6729e-5819-4737-8713-37b4798533f8\",\"regionalDataBoundary\":\"None\",\"description\":null,\"componentId\":\"42257ad6-382d-405f-b7cc-e110fbda2d0b\",\"imageType\":\"Applications\",\"provisioningState\":\"Succeeded\"}}]}", + "isContentBase64": false + } + }, + "AzSphereImageandDepoymentScenario+[NoContext]+GetImage+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/14a6729e-5819-4737-8713-37b4798533f8?api-version=2024-04-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/14a6729e-5819-4737-8713-37b4798533f8?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "63" ], + "x-ms-client-request-id": [ "7f65154f-5805-457b-bcc3-93d3bfc8ca6e" ], + "CommandName": [ "Get-AzSphereImage" ], + "FullCommandName": [ "Get-AzSphereImage_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "d4c0ced4-e71c-4db1-94f0-bf819e667619" ], + "x-ms-request-id": [ "1b73eb91-801a-4821-963b-d526b14fbc7e" ], + "x-ms-correlation-request-id": [ "2bbd52b6-9cc0-476e-9496-b3eeb832b8db" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T083630Z:2bbd52b6-9cc0-476e-9496-b3eeb832b8db" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 0EBE0D7FE61241CA8D55DA4E808979ED Ref B: MAA201060515051 Ref C: 2024-04-01T08:36:28Z" ], + "Date": [ "Mon, 01 Apr 2024 08:36:29 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "946" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/14a6729e-5819-4737-8713-37b4798533f8\",\"name\":\"14a6729e-5819-4737-8713-37b4798533f8\",\"type\":\"Microsoft.AzureSphere/catalogs/images\",\"properties\":{\"uri\":\"https://prodptimg.blob.core.windows.net/2962a1e9-91ce-4694-a28c-41c2354493ef/images/14a6729e-5819-4737-8713-37b4798533f8?skoid=e07f16fe-818d-4c68-9349-65d385173d92\u0026sktid=33e01921-4d64-4f8c-a055-5bdaffd5e33d\u0026skt=2024-04-01T08%3A31%3A30Z\u0026ske=2024-04-01T09%3A36%3A30Z\u0026sks=b\u0026skv=2021-12-02\u0026sv=2021-12-02\u0026spr=https,http\u0026se=2024-04-01T16%3A36%3A30Z\u0026sr=b\u0026sp=r\u0026sig=%2FYUp1LKTNhQNtJh4hiw4fNN8K1W1xraPbUSiXLoH8XE%3D\",\"image\":\"AzureSphereBlink1\",\"imageId\":\"14a6729e-5819-4737-8713-37b4798533f8\",\"regionalDataBoundary\":\"None\",\"description\":null,\"componentId\":\"42257ad6-382d-405f-b7cc-e110fbda2d0b\",\"imageType\":\"Applications\",\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereImageandDepoymentScenario+[NoContext]+ListDeployment+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Production/deployments?api-version=2024-04-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Production/deployments?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "64" ], + "x-ms-client-request-id": [ "cdd51427-a68b-4ae2-be21-0c98c79c89ec" ], + "CommandName": [ "Get-AzSphereDeployment" ], + "FullCommandName": [ "Get-AzSphereDeployment_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "b97346b1-300d-4162-a1f1-60b5f1245a3e" ], + "x-ms-request-id": [ "d03cdace-7587-4c93-b6f6-f9c4a2ebd405" ], + "x-ms-correlation-request-id": [ "4e34cda6-9aa4-4f68-bbcb-dd56c440c504" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T083632Z:4e34cda6-9aa4-4f68-bbcb-dd56c440c504" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 46D0554E73C044539920DB494223B85B Ref B: MAA201060515051 Ref C: 2024-04-01T08:36:30Z" ], + "Date": [ "Mon, 01 Apr 2024 08:36:31 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "4171" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Production/deployments/4f0d1450-17a1-49ff-af9c-55e094e38899\",\"name\":\"4f0d1450-17a1-49ff-af9c-55e094e38899\",\"type\":\"Microsoft.AzureSphere/catalogs/products/deviceGroups/deployments\",\"systemData\":{\"createdAt\":\"2024-04-01T08:35:10.5267943Z\",\"lastModifiedAt\":\"2024-04-01T08:35:10.5267943Z\"},\"properties\":{\"deployedImages\":[{\"properties\":{\"uri\":\"https://prodptimg.blob.core.windows.net/2962a1e9-91ce-4694-a28c-41c2354493ef/images/14a6729e-5819-4737-8713-37b4798533f8?skoid=e07f16fe-818d-4c68-9349-65d385173d92\u0026sktid=33e01921-4d64-4f8c-a055-5bdaffd5e33d\u0026skt=2024-04-01T08%3A31%3A31Z\u0026ske=2024-04-01T09%3A36%3A31Z\u0026sks=b\u0026skv=2021-12-02\u0026sv=2021-12-02\u0026spr=https,http\u0026se=2024-04-01T16%3A36%3A31Z\u0026sr=b\u0026sp=r\u0026sig=39tjbplt4%2FVI1X6EWIJ2jyFoG4DnYF%2BALXHj10BGkvo%3D\",\"image\":\"AzureSphereBlink1\",\"imageId\":\"14a6729e-5819-4737-8713-37b4798533f8\",\"regionalDataBoundary\":\"None\",\"description\":null,\"componentId\":\"42257ad6-382d-405f-b7cc-e110fbda2d0b\",\"imageType\":\"Applications\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/14a6729e-5819-4737-8713-37b4798533f8\",\"name\":\"14a6729e-5819-4737-8713-37b4798533f8\",\"type\":\"Microsoft.AzureSphere/catalogs/images\",\"systemData\":null}],\"deploymentDateUtc\":\"2024-04-01T08:35:10.5267943Z\",\"deploymentId\":\"4f0d1450-17a1-49ff-af9c-55e094e38899\",\"provisioningState\":\"Succeeded\"}},{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/products/Product1/deviceGroups/Production/deployments/3d527ce1-11b8-4db0-8cdf-56bf62c935d0\",\"name\":\"3d527ce1-11b8-4db0-8cdf-56bf62c935d0\",\"type\":\"Microsoft.AzureSphere/catalogs/products/deviceGroups/deployments\",\"systemData\":{\"createdAt\":\"2024-04-01T08:35:52.3577777Z\",\"lastModifiedAt\":\"2024-04-01T08:35:52.3577777Z\"},\"properties\":{\"deployedImages\":[{\"properties\":{\"uri\":\"https://prodptimg.blob.core.windows.net/2962a1e9-91ce-4694-a28c-41c2354493ef/images/d1d0ad2a-5054-4c88-897c-36fa01684dd0?skoid=e07f16fe-818d-4c68-9349-65d385173d92\u0026sktid=33e01921-4d64-4f8c-a055-5bdaffd5e33d\u0026skt=2024-04-01T08%3A31%3A32Z\u0026ske=2024-04-01T09%3A36%3A32Z\u0026sks=b\u0026skv=2021-12-02\u0026sv=2021-12-02\u0026spr=https,http\u0026se=2024-04-01T16%3A36%3A32Z\u0026sr=b\u0026sp=r\u0026sig=yxazGXUmh16GNYIsCv2t772Cvomozw4aSTjvyfmvpcA%3D\",\"image\":\"ErrorReportingStage1\",\"imageId\":\"d1d0ad2a-5054-4c88-897c-36fa01684dd0\",\"regionalDataBoundary\":\"None\",\"description\":null,\"componentId\":\"a60a27ff-8936-4a49-b73f-70861db03d43\",\"imageType\":\"Applications\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/d1d0ad2a-5054-4c88-897c-36fa01684dd0\",\"name\":\"d1d0ad2a-5054-4c88-897c-36fa01684dd0\",\"type\":\"Microsoft.AzureSphere/catalogs/images\",\"systemData\":null},{\"properties\":{\"uri\":\"https://prodptimg.blob.core.windows.net/2962a1e9-91ce-4694-a28c-41c2354493ef/images/a04f0a91-b369-4249-a47d-28c118e2cb3b?skoid=e07f16fe-818d-4c68-9349-65d385173d92\u0026sktid=33e01921-4d64-4f8c-a055-5bdaffd5e33d\u0026skt=2024-04-01T08%3A31%3A32Z\u0026ske=2024-04-01T09%3A36%3A32Z\u0026sks=b\u0026skv=2021-12-02\u0026sv=2021-12-02\u0026spr=https,http\u0026se=2024-04-01T16%3A36%3A32Z\u0026sr=b\u0026sp=r\u0026sig=jvbTgRcx%2FDLo0JTOU3TujNo8wImN8DqbFrIyPXEJvwQ%3D\",\"image\":\"GPIO_HighLevelApp\",\"imageId\":\"a04f0a91-b369-4249-a47d-28c118e2cb3b\",\"regionalDataBoundary\":\"None\",\"description\":null,\"componentId\":\"dc7f135c-6074-4d49-aa3a-160e4eed884f\",\"imageType\":\"Applications\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog/images/a04f0a91-b369-4249-a47d-28c118e2cb3b\",\"name\":\"a04f0a91-b369-4249-a47d-28c118e2cb3b\",\"type\":\"Microsoft.AzureSphere/catalogs/images\",\"systemData\":null}],\"deploymentDateUtc\":\"2024-04-01T08:35:52.3577777Z\",\"deploymentId\":\"3d527ce1-11b8-4db0-8cdf-56bf62c935d0\",\"provisioningState\":\"Succeeded\"}}]}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/test/AzSphereImageandDeploymentScenario.Tests.ps1 b/src/Sphere/Sphere.Autorest/test/AzSphereImageandDeploymentScenario.Tests.ps1 new file mode 100644 index 000000000000..f89ab4a20fe8 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/test/AzSphereImageandDeploymentScenario.Tests.ps1 @@ -0,0 +1,80 @@ +if(($null -eq $TestName) -or ($TestName -contains 'AzSphereImageandDeploymentScenario')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'AzSphereImageandDeploymentScenario.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} +### This test is running with image and deployment. +### Please record this scenario wih first product and prod device group. +Describe 'AzSphereImageandDepoymentScenario' { + It 'CreateImages' { + { + Write-Host 'Create first image' $env.imageID1 + $base64str1 = [system.convert]::ToBase64String($env.imagecontext1) + New-AzSphereImage -CatalogName $env.firstCatalog -ResourceGroupName $env.resourceGroup -Name $env.imageID1 -Image $base64str1 + + Write-Host 'Create second image' $env.imageID2 + $base64str2 = [system.convert]::ToBase64String($env.imagecontext2) + New-AzSphereImage -CatalogName $env.firstCatalog -ResourceGroupName $env.resourceGroup -Name $env.imageID2 -Image $base64str2 + + Write-Host 'Create third image' $env.imageID3 + $base64str3 = [system.convert]::ToBase64String($env.imagecontext3) + New-AzSphereImage -CatalogName $env.firstCatalog -ResourceGroupName $env.resourceGroup -Name $env.imageID3 -Image $base64str3 + + Write-Host 'Create forth image' $env.imageID4 + $base64str4 = [system.convert]::ToBase64String($env.imagecontext4) + New-AzSphereImage -CatalogName $env.firstCatalog -ResourceGroupName $env.resourceGroup -Name $env.imageID4 -Image $base64str4 + } | Should -Not -Throw + } + + It 'CreateGetDeployment' { + { + $image1 = Get-AzSphereImage -ResourceGroupName $env.resourceGroup -CatalogName $env.firstCatalog -Name $env.imageID1 + + $deployment1 = New-AzSphereDeployment -ResourceGroupName $env.resourceGroup -CatalogName $env.firstCatalog -ProductName $env.firstProduct -DeviceGroupName $env.ProdDeviceGroup -DeployedImage $image1 -Name .default + $deploymentNameFirst = $deployment1.Name + + $resultDefault = Get-AzSphereDeployment -ResourceGroupName $env.resourceGroup -CatalogName $env.firstCatalog -ProductName $env.firstProduct -DeviceGroupName $env.ProdDeviceGroup -Name .default + $resultDefault.Name | Should -Be $deploymentNameFirst + + Get-AzSphereDeployment -ResourceGroupName $env.resourceGroup -CatalogName $env.firstCatalog -ProductName $env.firstProduct -DeviceGroupName $env.ProdDeviceGroup -Name $deploymentNameFirst + + $image2 = Get-AzSphereImage -ResourceGroupName $env.resourceGroup -CatalogName $env.firstCatalog -Name $env.imageID2 + $image3 = Get-AzSphereImage -ResourceGroupName $env.resourceGroup -CatalogName $env.firstCatalog -Name $env.imageID3 + $deployment2 = New-AzSphereDeployment -ResourceGroupName $env.resourceGroup -CatalogName $env.firstCatalog -ProductName $env.firstProduct -DeviceGroupName $env.ProdDeviceGroup -DeployedImage $image2,$image3 -Name .default + + $result = Get-AzSphereDeployment -InputObject $deployment2 + $result.Name | Should -Be $deployment2.Name + } | Should -Not -Throw + } + + It 'ListImage' { + { + $listImage = Get-AzSphereImage -ResourceGroupName $env.resourceGroup -CatalogName $env.firstCatalog + $listImage.Count | Should -Be 4 + } | Should -Not -Throw + } + + It 'GetImage' { + { + $image = Get-AzSphereImage -ResourceGroupName $env.resourceGroup -CatalogName $env.firstCatalog -Name $env.imageID1 + $image.Name | Should -Be $env.imageID1 + } | Should -Not -Throw + } + + It 'ListDeployment' { + { + $deploymentList = Get-AzSphereDeployment -ResourceGroupName $env.resourceGroup -CatalogName $env.firstCatalog -ProductName $env.firstProduct -DeviceGroupName $env.ProdDeviceGroup + $deploymentList.Count | Should -Be 2 + } | Should -Not -Throw + } +} diff --git a/src/Sphere/Sphere.Autorest/test/AzSphereMainScenario.Recording.json b/src/Sphere/Sphere.Autorest/test/AzSphereMainScenario.Recording.json new file mode 100644 index 000000000000..a44409308b85 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/test/AzSphereMainScenario.Recording.json @@ -0,0 +1,1174 @@ +{ + "AzSphereMainScenario+[NoContext]+CreateUpdateCatalog+$PUT+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog?api-version=2024-04-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog?api-version=2024-04-01", + "Content": "{\r\n \"location\": \"Global\"\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "28" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"40023332-0000-0400-0000-660a73b60000\"" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "9a179675-1a5d-4ee5-b662-fe55cc18d7c9" ], + "x-ms-request-id": [ "f3a50506-9364-4357-8d0c-fc49756bd463" ], + "x-ms-correlation-request-id": [ "f8cf7b38-dd3e-45d6-95a9-1827046f37c7" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T084335Z:f8cf7b38-dd3e-45d6-95a9-1827046f37c7" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 19E230A6E0D243E7AF0D64CB2D1DD533 Ref B: MAA201060513025 Ref C: 2024-04-01T08:43:23Z" ], + "Date": [ "Mon, 01 Apr 2024 08:43:34 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "523" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog\",\"name\":\"secondCatalog\",\"type\":\"microsoft.azuresphere/catalogs\",\"location\":\"Global\",\"systemData\":{\"createdBy\":\"v-jiaji@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-01T08:43:23.8903293Z\",\"lastModifiedBy\":\"v-jiaji@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-04-01T08:43:23.8903293Z\"},\"properties\":{\"tenantId\":null,\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereMainScenario+[NoContext]+CreateUpdateCatalog+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog?api-version=2024-04-01+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "4" ], + "x-ms-client-request-id": [ "c50f3535-5fb4-4241-a01a-25e546b0abd6" ], + "CommandName": [ "New-AzSphereCatalog" ], + "FullCommandName": [ "New-AzSphereCatalog_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"40023332-0000-0400-0000-660a73b60000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "224e49ed-0fd0-473d-96a5-d453e9d7a98f" ], + "x-ms-request-id": [ "353b2361-fd53-4e6a-bb9b-7ca9b0a9b04f" ], + "x-ms-correlation-request-id": [ "5ab5ffaa-b59e-4fd1-94fa-ae1272eda047" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T084407Z:5ab5ffaa-b59e-4fd1-94fa-ae1272eda047" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: C5DAD57C9817455C8454824057BE7C6A Ref B: MAA201060513025 Ref C: 2024-04-01T08:44:05Z" ], + "Date": [ "Mon, 01 Apr 2024 08:44:07 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "557" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog\",\"name\":\"secondCatalog\",\"type\":\"microsoft.azuresphere/catalogs\",\"location\":\"Global\",\"systemData\":{\"createdBy\":\"v-jiaji@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-01T08:43:23.8903293Z\",\"lastModifiedBy\":\"v-jiaji@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-04-01T08:43:23.8903293Z\"},\"properties\":{\"tenantId\":\"6cb5627c-4d5a-46a2-b2cd-9f5c01912220\",\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereMainScenario+[NoContext]+CreateUpdateCatalog+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog?api-version=2024-04-01+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "5" ], + "x-ms-client-request-id": [ "c50f3535-5fb4-4241-a01a-25e546b0abd6" ], + "CommandName": [ "New-AzSphereCatalog" ], + "FullCommandName": [ "New-AzSphereCatalog_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"40023332-0000-0400-0000-660a73b60000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "180ead54-4e21-4c98-967d-aa3f35c10d7c" ], + "x-ms-request-id": [ "20252404-c716-4912-b9f6-9b5a602980dc" ], + "x-ms-correlation-request-id": [ "42fcb813-61c5-4757-99af-400dc78b5cc3" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T084409Z:42fcb813-61c5-4757-99af-400dc78b5cc3" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: ADC8B2CE80E4405696CFCF4EFEF8625F Ref B: MAA201060513025 Ref C: 2024-04-01T08:44:07Z" ], + "Date": [ "Mon, 01 Apr 2024 08:44:09 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "557" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog\",\"name\":\"secondCatalog\",\"type\":\"microsoft.azuresphere/catalogs\",\"location\":\"Global\",\"systemData\":{\"createdBy\":\"v-jiaji@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-01T08:43:23.8903293Z\",\"lastModifiedBy\":\"v-jiaji@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-04-01T08:43:23.8903293Z\"},\"properties\":{\"tenantId\":\"6cb5627c-4d5a-46a2-b2cd-9f5c01912220\",\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereMainScenario+[NoContext]+CreateUpdateCatalog+$PATCH+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog?api-version=2024-04-01+4": { + "Request": { + "Method": "PATCH", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog?api-version=2024-04-01", + "Content": "{\r\n \"tags\": {\r\n \"abc\": \"123\"\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "40" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"40021238-0000-0400-0000-660a73dc0000\"" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "34eb1c63-993e-42da-8125-ec9c87b59200" ], + "x-ms-request-id": [ "dc278aa3-eaa2-445b-ad01-bd9754de1974" ], + "x-ms-correlation-request-id": [ "70a6646e-ed24-42c5-ab06-081cef8b323f" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T084414Z:70a6646e-ed24-42c5-ab06-081cef8b323f" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 16763CBD6813449C9CDFE0370D4F2AAF Ref B: MAA201060513025 Ref C: 2024-04-01T08:44:09Z" ], + "Date": [ "Mon, 01 Apr 2024 08:44:14 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "528" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog\",\"name\":\"secondCatalog\",\"type\":\"microsoft.azuresphere/catalogs\",\"location\":\"Global\",\"tags\":{\"abc\":\"123\"},\"systemData\":{\"createdBy\":\"v-jiaji@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-01T08:43:23.8903293Z\",\"lastModifiedBy\":\"v-jiaji@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-04-01T08:44:10.0635333Z\"},\"properties\":{\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereMainScenario+[NoContext]+UpdateCatalog+$PATCH+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog?api-version=2024-04-01+1": { + "Request": { + "Method": "PATCH", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog?api-version=2024-04-01", + "Content": "{\r\n \"tags\": {\r\n \"123\": \"abc\"\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "40" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"40020a39-0000-0400-0000-660a73e30000\"" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "299bccbb-d4d0-4e7e-b5a1-ba4cccb7a377" ], + "x-ms-request-id": [ "8b24637a-a7bc-49fe-aec7-d754dba501fd" ], + "x-ms-correlation-request-id": [ "67ce5f38-ce15-43ff-b3b1-4cba5ec7e898" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T084421Z:67ce5f38-ce15-43ff-b3b1-4cba5ec7e898" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: D82A21EB8A4741099841C802816E1823 Ref B: MAA201060513025 Ref C: 2024-04-01T08:44:14Z" ], + "Date": [ "Mon, 01 Apr 2024 08:44:21 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "528" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog\",\"name\":\"secondCatalog\",\"type\":\"microsoft.azuresphere/catalogs\",\"location\":\"Global\",\"tags\":{\"123\":\"abc\"},\"systemData\":{\"createdBy\":\"v-jiaji@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-01T08:43:23.8903293Z\",\"lastModifiedBy\":\"v-jiaji@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-04-01T08:44:15.2482731Z\"},\"properties\":{\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereMainScenario+[NoContext]+ListCatalogBySub+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/catalogs?api-version=2024-04-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/providers/Microsoft.AzureSphere/catalogs?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "8" ], + "x-ms-client-request-id": [ "9077b32d-d17f-40e3-b9a2-8d1f267df090" ], + "CommandName": [ "Get-AzSphereCatalog" ], + "FullCommandName": [ "Get-AzSphereCatalog_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-request-id": [ "a503e414-00f4-4262-bdce-52c2e7f53550" ], + "x-ms-correlation-request-id": [ "a503e414-00f4-4262-bdce-52c2e7f53550" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T084425Z:a503e414-00f4-4262-bdce-52c2e7f53550" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 12E1827F5C914D17999CBABABEEB9C16 Ref B: MAA201060513025 Ref C: 2024-04-01T08:44:21Z" ], + "Date": [ "Mon, 01 Apr 2024 08:44:25 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1214" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog\",\"name\":\"firstCatalog\",\"type\":\"microsoft.azuresphere/catalogs\",\"location\":\"global\",\"tags\":{\"MigratedCatalogId\":\"2962a1e9-91ce-4694-a28c-41c2354493ef\"},\"systemData\":{\"createdBy\":\"v-jiaji@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-01T07:16:51.3770137Z\",\"lastModifiedBy\":\"v-jiaji@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-04-01T07:16:51.3770137Z\"},\"properties\":{\"tenantId\":\"2962a1e9-91ce-4694-a28c-41c2354493ef\",\"provisioningState\":\"Succeeded\"}},{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog\",\"name\":\"secondCatalog\",\"type\":\"microsoft.azuresphere/catalogs\",\"location\":\"Global\",\"tags\":{\"123\":\"abc\"},\"systemData\":{\"createdBy\":\"v-jiaji@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-01T08:43:23.8903293Z\",\"lastModifiedBy\":\"v-jiaji@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-04-01T08:44:15.2482731Z\"},\"properties\":{\"tenantId\":\"6cb5627c-4d5a-46a2-b2cd-9f5c01912220\",\"provisioningState\":\"Succeeded\"}}]}", + "isContentBase64": false + } + }, + "AzSphereMainScenario+[NoContext]+GetCatalog+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog?api-version=2024-04-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "9" ], + "x-ms-client-request-id": [ "bfde21aa-9aa8-4ea9-b8a9-6f3417325398" ], + "CommandName": [ "Get-AzSphereCatalog" ], + "FullCommandName": [ "Get-AzSphereCatalog_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"40020a39-0000-0400-0000-660a73e30000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "09a6b8f4-8bbf-4ece-a2ec-ecf0f2d7b257" ], + "x-ms-request-id": [ "5f2a0286-9d8a-4acb-b9eb-3dbb5e943b93" ], + "x-ms-correlation-request-id": [ "2d948126-4cf4-4d83-8898-b7f741000d34" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T084426Z:2d948126-4cf4-4d83-8898-b7f741000d34" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 1732455ADBF8441DB5D19E98557C8FEB Ref B: MAA201060513025 Ref C: 2024-04-01T08:44:26Z" ], + "Date": [ "Mon, 01 Apr 2024 08:44:26 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "578" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog\",\"name\":\"secondCatalog\",\"type\":\"microsoft.azuresphere/catalogs\",\"location\":\"Global\",\"tags\":{\"123\":\"abc\"},\"systemData\":{\"createdBy\":\"v-jiaji@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-01T08:43:23.8903293Z\",\"lastModifiedBy\":\"v-jiaji@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-04-01T08:44:15.2482731Z\"},\"properties\":{\"tenantId\":\"6cb5627c-4d5a-46a2-b2cd-9f5c01912220\",\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereMainScenario+[NoContext]+ListCatalogByGroup+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs?api-version=2024-04-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "10" ], + "x-ms-client-request-id": [ "ca4af329-f0e2-4189-9f75-6c5069a87f69" ], + "CommandName": [ "Get-AzSphereCatalog" ], + "FullCommandName": [ "Get-AzSphereCatalog_List1" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "fa1fbbb2-8734-4621-acef-31e1e9d3565e" ], + "x-ms-request-id": [ "33c16d84-69dc-4615-8dd0-ad79801f842b" ], + "x-ms-correlation-request-id": [ "c2cec5ae-09b7-4205-bc3e-e7d97714e044" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T084429Z:c2cec5ae-09b7-4205-bc3e-e7d97714e044" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 1F84900E49AD4A499CC0A4EED0359FE9 Ref B: MAA201060513025 Ref C: 2024-04-01T08:44:27Z" ], + "Date": [ "Mon, 01 Apr 2024 08:44:29 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1214" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/firstCatalog\",\"name\":\"firstCatalog\",\"type\":\"microsoft.azuresphere/catalogs\",\"location\":\"global\",\"tags\":{\"MigratedCatalogId\":\"2962a1e9-91ce-4694-a28c-41c2354493ef\"},\"systemData\":{\"createdBy\":\"v-jiaji@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-01T07:16:51.3770137Z\",\"lastModifiedBy\":\"v-jiaji@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-04-01T07:16:51.3770137Z\"},\"properties\":{\"tenantId\":\"2962a1e9-91ce-4694-a28c-41c2354493ef\",\"provisioningState\":\"Succeeded\"}},{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog\",\"name\":\"secondCatalog\",\"type\":\"microsoft.azuresphere/catalogs\",\"location\":\"Global\",\"tags\":{\"123\":\"abc\"},\"systemData\":{\"createdBy\":\"v-jiaji@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-01T08:43:23.8903293Z\",\"lastModifiedBy\":\"v-jiaji@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-04-01T08:44:15.2482731Z\"},\"properties\":{\"tenantId\":\"6cb5627c-4d5a-46a2-b2cd-9f5c01912220\",\"provisioningState\":\"Succeeded\"}}]}", + "isContentBase64": false + } + }, + "AzSphereMainScenario+[NoContext]+GetCertificate+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog/certificates?api-version=2024-04-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog/certificates?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "11" ], + "x-ms-client-request-id": [ "38fad662-d7bc-4e66-befa-f2f534f909d1" ], + "CommandName": [ "Get-AzSphereCertificate" ], + "FullCommandName": [ "Get-AzSphereCertificate_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "cc52d98e-3cd2-4dcd-9c3a-453a16d96e48" ], + "x-ms-request-id": [ "93caf4ae-bcf2-4c77-8809-c8dcf9b63b29" ], + "x-ms-correlation-request-id": [ "b02e509a-bfb4-435e-b04a-4bcd4cff1b1d" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T084431Z:b02e509a-bfb4-435e-b04a-4bcd4cff1b1d" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 22E94C70A8CD4BE1B1FCF19C9E4B327A Ref B: MAA201060513025 Ref C: 2024-04-01T08:44:29Z" ], + "Date": [ "Mon, 01 Apr 2024 08:44:31 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1690" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog/certificates/0086BF0280BC7C845728D9347A5CADBF31\",\"name\":\"0086BF0280BC7C845728D9347A5CADBF31\",\"type\":\"Microsoft.AzureSphere/catalogs/certificates\",\"properties\":{\"certificate\":\"MIIDDDCCApKgAwIBAgIRAIa/AoC8fIRXKNk0elytvzEwCg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2-b2cd-9f5c01912220, O=Microsoft Corporation, L=Redmond, S=Washington, C=US\",\"thumbprint\":\"54D2E787F1B3B3DFE33A20611A951717B60E956A\",\"expiryUtc\":\"2026-04-01T05:43:31Z\",\"notBeforeUtc\":\"2024-04-01T05:43:31Z\",\"provisioningState\":\"Succeeded\"}}]}", + "isContentBase64": false + } + }, + "AzSphereMainScenario+[NoContext]+GetCertificate+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog/certificates/0086BF0280BC7C845728D9347A5CADBF31?api-version=2024-04-01+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog/certificates/0086BF0280BC7C845728D9347A5CADBF31?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "12" ], + "x-ms-client-request-id": [ "22af9f15-72b6-4e55-a6a4-c3cb3aff4ec4" ], + "CommandName": [ "Get-AzSphereCertificate" ], + "FullCommandName": [ "Get-AzSphereCertificate_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "4f3483ea-edcb-4a90-a0bb-162b246ffefc" ], + "x-ms-request-id": [ "8647295c-eb30-4ec5-9252-8913b6b644c1" ], + "x-ms-correlation-request-id": [ "9b0891b6-a955-4f77-a51d-91e08dfd2a5c" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T084432Z:9b0891b6-a955-4f77-a51d-91e08dfd2a5c" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 86EDECC43C914AF092DD7D9EBB19DA0A Ref B: MAA201060513025 Ref C: 2024-04-01T08:44:31Z" ], + "Date": [ "Mon, 01 Apr 2024 08:44:32 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1678" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog/certificates/0086BF0280BC7C845728D9347A5CADBF31\",\"name\":\"0086BF0280BC7C845728D9347A5CADBF31\",\"type\":\"Microsoft.AzureSphere/catalogs/certificates\",\"properties\":{\"certificate\":\"MIIDDDCCApKgAwIBAgIRAIa/AoC8fIRXKNk0elytvzEwCgYIKoZIzj0EAwMwUzELMAkGA1UEBhMCVVMxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEkMCIGA1UEAxMbQXp1cmUgU3BoZXJlIFBvbGljeSBDQSAyMDIyMB4XDTI0MDQwMTA1NDMzMVoXDTI2MDQwMTA1NDMzMVowgZoxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xRDBCBgNVBAMTO01pY3Jvc29mdCBBenVyZSBTcGhlcmUgNmNiNTYyN2MtNGQ1YS00NmEyLWIyY2QtOWY1YzAxOTEyMjIwMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEaVDx8YSnz3Ah0PPjzdHWjcvy6vaejtnLf0ADhdAOVI7ijvrpfpV2hgsKW2xoAhcAknQOFc76AZ2oymNGTmVX2+QZoAahJtiVfRQtHzRS3nYm4weRHO6hfUgbLbiT9DHQo4HhMIHeMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MFIGA1UdHwRLMEkwR6BFoEOGQWh0dHA6Ly9jcmwuc3BoZXJlLmF6dXJlLm5ldC9NaWNyb3NvZnQgQXp1cmUgU3BoZXJlIFBvbGljeTIwMjIuY3JsMGcGCCsGAQUFBwEBBFswWTBXBggrBgEFBQcwAoZLaHR0cDovL3BraS5zcGhlcmUuYXp1cmUubmV0L2NlcnRpZmljYXRlcy9NaWNyb3NvZnRBenVyZVNwaGVyZVBvbGljeTIwMjIuY2VyMAoGCCqGSM49BAMDA2gAMGUCMQDYcuOGcpLE5U+98xPH3gbS4IXKiDJKY+lJ8md6Ioid/YtU87mDbd3bF52V6ujPhKcCMB/6xtSOOunPjlKgwSlsJxQ2LVOINHFMqk3AUjM5JydTYQm7zqphuuoTdhJaNi/18Q==\",\"status\":\"Active\",\"subject\":\"CN=Microsoft Azure Sphere 6cb5627c-4d5a-46a2-b2cd-9f5c01912220, O=Microsoft Corporation, L=Redmond, S=Washington, C=US\",\"thumbprint\":\"54D2E787F1B3B3DFE33A20611A951717B60E956A\",\"expiryUtc\":\"2026-04-01T05:43:31Z\",\"notBeforeUtc\":\"2024-04-01T05:43:31Z\",\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereMainScenario+[NoContext]+GetCertificate+$POST+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog/certificates/0086BF0280BC7C845728D9347A5CADBF31/retrieveCertChain?api-version=2024-04-01+3": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog/certificates/0086BF0280BC7C845728D9347A5CADBF31/retrieveCertChain?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "13" ], + "x-ms-client-request-id": [ "a95b3c5a-ff50-4d99-bfc9-2169700582e5" ], + "CommandName": [ "Get-AzSphereCertificateCertChain" ], + "FullCommandName": [ "Get-AzSphereCertificateCertChain_Retrieve" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1197" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "b329b7af-30e6-49e6-a8cc-1a92dfcc8f49" ], + "x-ms-request-id": [ "37faffd9-7833-46bf-9976-5a7d1a41f48c" ], + "x-ms-correlation-request-id": [ "b13d687e-91be-406a-92e8-cc5b8c13cb75" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T084434Z:b13d687e-91be-406a-92e8-cc5b8c13cb75" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: AD2179FA415D48EE8A1E652D4CA58E5B Ref B: MAA201060513025 Ref C: 2024-04-01T08:44:32Z" ], + "Date": [ "Mon, 01 Apr 2024 08:44:34 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "3103" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"certificateChain\":\"MIIJAQYJKoZIhvcNAQcCoIII8jCCCO4CAQExADAPBgkqhkiG9w0BBwGgAgQAoIII0jCC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ENBIDIwMjIwHhcNMjQwNDAxMDU0MzMxWhcNMjYwNDAxMDU0MzMxWjCBmjELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjFEMEIGA1UEAxM7TWljcm9zb2Z0IEF6dXJlIFNwaGVyZSA2Y2I1NjI3Yy00ZDVhLTQ2YTItYjJjZC05ZjVjMDE5MTIyMjAwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAARpUPHxhKfPcCHQ8+PN0daNy/Lq9p6O2ct/QAOF0A5UjuKO+ul+lXaGCwpbbGgCFwCSdA4VzvoBnajKY0ZOZVfb5BmgBqEm2JV9FC0fNFLedibjB5Ec7qF9SBstuJP0MdCjgeEwgd4wDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQFMAMBAf8wUgYDVR0fBEswSTBHoEWgQ4ZBaHR0cDovL2NybC5zcGhlcmUuYXp1cmUubmV0L01pY3Jvc29mdCBBenVyZSBTcGhlcmUgUG9saWN5MjAyMi5jcmwwZwYIKwYBBQUHAQEEWzBZMFcGCCsGAQUFBzAChktodHRwOi8vcGtpLnNwaGVyZS5henVyZS5uZXQvY2VydGlmaWNhdGVzL01pY3Jvc29mdEF6dXJlU3BoZXJlUG9saWN5MjAyMi5jZXIwCgYIKoZIzj0EAwMDaAAwZQIxANhy44ZyksTlT73zE8feBtLghcqIMkpj6UnyZ3oiiJ39i1TzuYNt3dsXnZXq6M+EpwIwH/rG1I466c+OUqDBKWwnFDYtU4g0cUyqTcBSMzknJ1NhCbvOqmG66hN2Elo2L/XxMQA=\"}", + "isContentBase64": false + } + }, + "AzSphereMainScenario+[NoContext]+GetCertificate+$POST+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog/certificates/0086BF0280BC7C845728D9347A5CADBF31/retrieveProofOfPossessionNonce?api-version=2024-04-01+4": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog/certificates/0086BF0280BC7C845728D9347A5CADBF31/retrieveProofOfPossessionNonce?api-version=2024-04-01", + "Content": "{\r\n \"proofOfPossessionNonce\": \"proofOfPossessionNonce\"\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "58" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1196" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "0aede131-7b7a-4d2b-95ac-214dc18493c6" ], + "x-ms-request-id": [ "5ab260c5-14e4-41fb-9a5a-42a10e19e39a" ], + "x-ms-correlation-request-id": [ "bddc5fa6-ae7c-4fab-98dc-a4f2ac4e1082" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T084435Z:bddc5fa6-ae7c-4fab-98dc-a4f2ac4e1082" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 129C121DB8244A3E81BA30B00F43C464 Ref B: MAA201060513025 Ref C: 2024-04-01T08:44:34Z" ], + "Date": [ "Mon, 01 Apr 2024 08:44:35 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "738" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"certificate\":\"MIICFzCCAZ2gAwIBAgIQThK3R/JQ3yDxJEY+thDO9TAKBggqhkjOPQQDAzCBmjELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjFEMEIGA1UEAxM7TWljcm9zb2Z0IEF6dXJlIFNwaGVyZSA2Y2I1NjI3Yy00ZDVhLTQ2YTItYjJjZC05ZjVjMDE5MTIyMjAwHhcNMjQwNDAxMDgzOTM1WhcNMjQwNDAxMDk0NDM1WjAhMR8wHQYDVQQDExZwcm9vZk9mUG9zc2Vzc2lvbk5vbmNlMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE+bniHiY+ORr7Njj4uBKQCjeUJx+G0tZ/niTGYzNOzVhpPdb3SNOFJH2IimHfo1Dm7MAyjaqBMchks9RH/7dzAcWMGVs2SM43bBN6DPpLh/z2IqrK4zCvIChQIN68UyUsoyAwHjAOBgNVHQ8BAf8EBAMCAAEwDAYDVR0lAQH/BAIwADAKBggqhkjOPQQDAwNoADBlAjEA94xBRNOosq9I5djBVpmAT54HuljPgNrLByuUXAr78dkPJMDB4EswIk2h5meeo1UMAjB51sw6wYODcmaUsefDR4xducuRus+o/mM15GS+wU87hYzM1sYbf/V9ENlg6gz3lm0=\"}", + "isContentBase64": false + } + }, + "AzSphereMainScenario+[NoContext]+CreateProduct+$PUT+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog/products/Product3?api-version=2024-04-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog/products/Product3?api-version=2024-04-01", + "Content": "{\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "4" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1197" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "d18e9966-f34f-47ec-8da5-72f712bc03d1" ], + "x-ms-request-id": [ "82d611cf-e2c1-400e-8edd-5bedde477f3c" ], + "x-ms-correlation-request-id": [ "53e8a4d8-b69c-415b-9fe2-d8b1c4e0423f" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T084441Z:53e8a4d8-b69c-415b-9fe2-d8b1c4e0423f" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: F6DDE6D2D9FC47939A598E2151E775E2 Ref B: MAA201060513025 Ref C: 2024-04-01T08:44:35Z" ], + "Date": [ "Mon, 01 Apr 2024 08:44:40 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "528" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog/products/Product3\",\"name\":\"Product3\",\"type\":\"microsoft.azuresphere/catalogs/products\",\"systemData\":{\"createdBy\":\"v-jiaji@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-01T08:44:36.0695574Z\",\"lastModifiedBy\":\"v-jiaji@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-04-01T08:44:36.0695574Z\"},\"properties\":{\"description\":null,\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereMainScenario+[NoContext]+CreateProduct+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog/products/Product3?api-version=2024-04-01+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog/products/Product3?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "16" ], + "x-ms-client-request-id": [ "07831be9-94a8-4219-9024-35560ae6a379" ], + "CommandName": [ "New-AzSphereProduct" ], + "FullCommandName": [ "New-AzSphereProduct_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "7570f2e0-0b76-423b-b177-bfa44016e387" ], + "x-ms-request-id": [ "89a542de-fe5e-4551-872f-ae7a732714cb" ], + "x-ms-correlation-request-id": [ "2aaadc6c-a03a-4ca2-8054-a386240be957" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T084513Z:2aaadc6c-a03a-4ca2-8054-a386240be957" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: F8AA2FD9D45E482E8BD6FA66D901C57C Ref B: MAA201060513025 Ref C: 2024-04-01T08:45:11Z" ], + "Date": [ "Mon, 01 Apr 2024 08:45:13 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "294" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog/products/Product3\",\"name\":\"Product3\",\"type\":\"Microsoft.AzureSphere/catalogs/products\",\"properties\":{\"description\":null,\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereMainScenario+[NoContext]+CreateProduct+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog/products/Product3?api-version=2024-04-01+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog/products/Product3?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "17" ], + "x-ms-client-request-id": [ "07831be9-94a8-4219-9024-35560ae6a379" ], + "CommandName": [ "New-AzSphereProduct" ], + "FullCommandName": [ "New-AzSphereProduct_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "f770398e-e941-4c5b-9345-959815a852cf" ], + "x-ms-request-id": [ "267662f2-965b-460a-b0ef-83a2e3e4a09a" ], + "x-ms-correlation-request-id": [ "b1b9654d-2fb8-4ff9-aefe-f61ebe50fde4" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T084515Z:b1b9654d-2fb8-4ff9-aefe-f61ebe50fde4" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 07E09D7D538344FDA85410FDE7BC47D9 Ref B: MAA201060513025 Ref C: 2024-04-01T08:45:13Z" ], + "Date": [ "Mon, 01 Apr 2024 08:45:15 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "294" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog/products/Product3\",\"name\":\"Product3\",\"type\":\"Microsoft.AzureSphere/catalogs/products\",\"properties\":{\"description\":null,\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereMainScenario+[NoContext]+GetProduct+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog/products/Product3?api-version=2024-04-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog/products/Product3?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "18" ], + "x-ms-client-request-id": [ "f6e17fae-e437-4d89-a839-0e0587b13765" ], + "CommandName": [ "Get-AzSphereProduct" ], + "FullCommandName": [ "Get-AzSphereProduct_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "e8f36102-7ef8-4a93-8e02-39237ee05d0a" ], + "x-ms-request-id": [ "16623ac6-f3ca-42a6-8af0-2beaa4ea052b" ], + "x-ms-correlation-request-id": [ "a9107d13-9249-4ce9-a75f-c1a02b023a11" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T084517Z:a9107d13-9249-4ce9-a75f-c1a02b023a11" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: F59C2FBB3C26454B8AECA01F76B35E97 Ref B: MAA201060513025 Ref C: 2024-04-01T08:45:15Z" ], + "Date": [ "Mon, 01 Apr 2024 08:45:17 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "294" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog/products/Product3\",\"name\":\"Product3\",\"type\":\"Microsoft.AzureSphere/catalogs/products\",\"properties\":{\"description\":null,\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereMainScenario+[NoContext]+UpdateProduct+$PATCH+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog/products/Product3?api-version=2024-04-01+1": { + "Request": { + "Method": "PATCH", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog/products/Product3?api-version=2024-04-01", + "Content": "{\r\n \"properties\": {\r\n \"description\": \"Test product\"\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "63" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "9e8b6ff2-67e9-4a01-b036-dfba112f09ae" ], + "x-ms-request-id": [ "a0f84ae1-c1b1-4ec1-8a29-4db3fa50529e" ], + "x-ms-correlation-request-id": [ "e225ee98-4184-407f-98cc-acc0844b2ab9" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T084519Z:e225ee98-4184-407f-98cc-acc0844b2ab9" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 43F5A9330D3A4954B80FD082FD718086 Ref B: MAA201060513025 Ref C: 2024-04-01T08:45:17Z" ], + "Date": [ "Mon, 01 Apr 2024 08:45:19 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "304" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog/products/Product3\",\"name\":\"Product3\",\"type\":\"Microsoft.AzureSphere/catalogs/products\",\"properties\":{\"description\":\"Test product\",\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereMainScenario+[NoContext]+CreateGetUpdateDeviceGroup+$PUT+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog/products/Product3/deviceGroups/DeviceGroupTrans?api-version=2024-04-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog/products/Product3/deviceGroups/DeviceGroupTrans?api-version=2024-04-01", + "Content": "{\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "4" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "9ddba773-614c-4417-be94-a83f57b3ea97" ], + "x-ms-request-id": [ "df902169-952a-4a27-8501-a7a6f23eba37" ], + "x-ms-correlation-request-id": [ "5304d91c-a813-47a6-82ca-4cbda2339ee6" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T084521Z:5304d91c-a813-47a6-82ca-4cbda2339ee6" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 256372B4C4B64909B7CF706F7D81FA92 Ref B: MAA201060513025 Ref C: 2024-04-01T08:45:19Z" ], + "Date": [ "Mon, 01 Apr 2024 08:45:21 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "719" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog/products/Product3/deviceGroups/DeviceGroupTrans\",\"name\":\"DeviceGroupTrans\",\"type\":\"microsoft.azuresphere/catalogs/products/devicegroups\",\"systemData\":{\"createdBy\":\"v-jiaji@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-01T08:45:19.8631715Z\",\"lastModifiedBy\":\"v-jiaji@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-04-01T08:45:19.8631715Z\"},\"properties\":{\"description\":null,\"osFeedType\":\"Retail\",\"updatePolicy\":\"UpdateAll\",\"allowCrashDumpsCollection\":\"Disabled\",\"regionalDataBoundary\":\"None\",\"hasDeployment\":false,\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereMainScenario+[NoContext]+CreateGetUpdateDeviceGroup+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog/products/Product3/deviceGroups/DeviceGroupTrans?api-version=2024-04-01+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog/products/Product3/deviceGroups/DeviceGroupTrans?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "21" ], + "x-ms-client-request-id": [ "d040be29-84b2-45af-a7ac-ec9fdbf16f05" ], + "CommandName": [ "New-AzSphereDeviceGroup" ], + "FullCommandName": [ "New-AzSphereDeviceGroup_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "05d541ad-d320-4a6d-9e7c-539b62b900b1" ], + "x-ms-request-id": [ "3d63af7d-6309-477f-930c-7447f74462ca" ], + "x-ms-correlation-request-id": [ "49e37b19-3dcb-4fb1-a814-cf627e93adfe" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T084553Z:49e37b19-3dcb-4fb1-a814-cf627e93adfe" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: F75D5F7BDF314854BCBC456B5ACDC431 Ref B: MAA201060513025 Ref C: 2024-04-01T08:45:51Z" ], + "Date": [ "Mon, 01 Apr 2024 08:45:53 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "484" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog/products/Product3/deviceGroups/DeviceGroupTrans\",\"name\":\"DeviceGroupTrans\",\"type\":\"Microsoft.AzureSphere/catalogs/products/deviceGroups\",\"properties\":{\"description\":null,\"osFeedType\":\"Retail\",\"updatePolicy\":\"UpdateAll\",\"allowCrashDumpsCollection\":\"Disabled\",\"regionalDataBoundary\":\"None\",\"hasDeployment\":null,\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereMainScenario+[NoContext]+CreateGetUpdateDeviceGroup+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog/products/Product3/deviceGroups/DeviceGroupTrans?api-version=2024-04-01+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog/products/Product3/deviceGroups/DeviceGroupTrans?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "22" ], + "x-ms-client-request-id": [ "d040be29-84b2-45af-a7ac-ec9fdbf16f05" ], + "CommandName": [ "New-AzSphereDeviceGroup" ], + "FullCommandName": [ "New-AzSphereDeviceGroup_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "84a37a40-7ac5-41d2-878f-f15d005f1e48" ], + "x-ms-request-id": [ "6f03f0b0-af9f-4aa3-82f7-6890d3bd403f" ], + "x-ms-correlation-request-id": [ "65f7f8a0-3b89-4dde-a753-bff5bf753024" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T084555Z:65f7f8a0-3b89-4dde-a753-bff5bf753024" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: BE9063DA7C6F416DA0E6A7B452ACCB88 Ref B: MAA201060513025 Ref C: 2024-04-01T08:45:53Z" ], + "Date": [ "Mon, 01 Apr 2024 08:45:55 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "484" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog/products/Product3/deviceGroups/DeviceGroupTrans\",\"name\":\"DeviceGroupTrans\",\"type\":\"Microsoft.AzureSphere/catalogs/products/deviceGroups\",\"properties\":{\"description\":null,\"osFeedType\":\"Retail\",\"updatePolicy\":\"UpdateAll\",\"allowCrashDumpsCollection\":\"Disabled\",\"regionalDataBoundary\":\"None\",\"hasDeployment\":null,\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereMainScenario+[NoContext]+CreateGetUpdateDeviceGroup+$PATCH+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog/products/Product3/deviceGroups/DeviceGroupTrans?api-version=2024-04-01+4": { + "Request": { + "Method": "PATCH", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog/products/Product3/deviceGroups/DeviceGroupTrans?api-version=2024-04-01", + "Content": "{\r\n \"properties\": {\r\n \"description\": \"Test device group\"\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "68" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "1597d3d4-edf2-4164-99ca-5fffd5fa4498" ], + "x-ms-request-id": [ "5e6c04a9-7309-4384-8957-ef94dd09cc23" ], + "x-ms-correlation-request-id": [ "2d2f3939-6374-4cd0-b700-860a97734c89" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T084601Z:2d2f3939-6374-4cd0-b700-860a97734c89" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: B974DD910A2A4E119886102B1D096EA0 Ref B: MAA201060513025 Ref C: 2024-04-01T08:45:55Z" ], + "Date": [ "Mon, 01 Apr 2024 08:46:00 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "500" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog/products/Product3/deviceGroups/DeviceGroupTrans\",\"name\":\"DeviceGroupTrans\",\"type\":\"Microsoft.AzureSphere/catalogs/products/deviceGroups\",\"properties\":{\"description\":\"Test device group\",\"osFeedType\":\"Retail\",\"updatePolicy\":\"UpdateAll\",\"allowCrashDumpsCollection\":\"Disabled\",\"regionalDataBoundary\":\"None\",\"hasDeployment\":false,\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereMainScenario+[NoContext]+CreateGetUpdateDeviceGroup+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog/products/Product3/deviceGroups/DeviceGroupTrans?api-version=2024-04-01+5": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog/products/Product3/deviceGroups/DeviceGroupTrans?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "24" ], + "x-ms-client-request-id": [ "418b783f-80f0-48e2-bceb-f2ac1e35e885" ], + "CommandName": [ "Get-AzSphereDeviceGroup" ], + "FullCommandName": [ "Get-AzSphereDeviceGroup_GetViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "9305c1c5-cc25-41e8-8ff6-279558ca16d9" ], + "x-ms-request-id": [ "6af2be23-567b-45d9-ad5f-1caad83f11fb" ], + "x-ms-correlation-request-id": [ "7ecc7341-7a26-4833-89ff-31a60422b9c9" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T084602Z:7ecc7341-7a26-4833-89ff-31a60422b9c9" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: F11DBC12BD3942F6892C8A2C74FF9C89 Ref B: MAA201060513025 Ref C: 2024-04-01T08:46:01Z" ], + "Date": [ "Mon, 01 Apr 2024 08:46:02 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "499" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog/products/Product3/deviceGroups/DeviceGroupTrans\",\"name\":\"DeviceGroupTrans\",\"type\":\"Microsoft.AzureSphere/catalogs/products/deviceGroups\",\"properties\":{\"description\":\"Test device group\",\"osFeedType\":\"Retail\",\"updatePolicy\":\"UpdateAll\",\"allowCrashDumpsCollection\":\"Disabled\",\"regionalDataBoundary\":\"None\",\"hasDeployment\":null,\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereMainScenario+[NoContext]+ListGroupInCatalog+$POST+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog/listDeviceGroups?api-version=2024-04-01+1": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog/listDeviceGroups?api-version=2024-04-01", + "Content": "{\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "4" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "ba485727-a0da-4cb2-bd50-569fa7fa6786" ], + "x-ms-request-id": [ "f40df621-5c1f-4697-9412-5180eaebb3ee" ], + "x-ms-correlation-request-id": [ "fdf61f6c-9f8e-49f9-b0a5-4cc6e6fd4080" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T084604Z:fdf61f6c-9f8e-49f9-b0a5-4cc6e6fd4080" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 781AF602FEEB46CE9DBDE3E8D8E9F34F Ref B: MAA201060513025 Ref C: 2024-04-01T08:46:03Z" ], + "Date": [ "Mon, 01 Apr 2024 08:46:04 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "546" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"properties\":{\"description\":\"Test device group\",\"osFeedType\":\"Retail\",\"updatePolicy\":\"UpdateAll\",\"allowCrashDumpsCollection\":\"Disabled\",\"regionalDataBoundary\":\"None\",\"hasDeployment\":false,\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog/products/Product3/deviceGroups/DeviceGroupTrans\",\"name\":\"DeviceGroupTrans\",\"type\":\"Microsoft.AzureSphere/catalogs/products/deviceGroups\",\"systemData\":null}],\"nextLink\":null}", + "isContentBase64": false + } + }, + "AzSphereMainScenario+[NoContext]+DeleteDeviceGroup+$DELETE+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog/products/Product3/deviceGroups/DeviceGroupTrans?api-version=2024-04-01+1": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog/products/Product3/deviceGroups/DeviceGroupTrans?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "26" ], + "x-ms-client-request-id": [ "4797d507-5430-4055-8077-0a04090c0350" ], + "CommandName": [ "Remove-AzSphereDeviceGroup" ], + "FullCommandName": [ "Remove-AzSphereDeviceGroup_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "e16423ff-3992-4e9e-9c86-bd93c84aef6b" ], + "x-ms-request-id": [ "bb9553bc-334d-4cfc-88bf-e0d9bbc7fc61" ], + "x-ms-correlation-request-id": [ "04127ea5-2e7a-4691-a9d3-ccd89b60ed3d" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T084606Z:04127ea5-2e7a-4691-a9d3-ccd89b60ed3d" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: DCD8D3F1A8EE420A9BE3F25827358EF6 Ref B: MAA201060513025 Ref C: 2024-04-01T08:46:04Z" ], + "Date": [ "Mon, 01 Apr 2024 08:46:06 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "4" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "bnVsbA==", + "isContentBase64": false + } + }, + "AzSphereMainScenario+[NoContext]+DeleteProduct+$DELETE+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog/products/Product3?api-version=2024-04-01+1": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog/products/Product3?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "27" ], + "x-ms-client-request-id": [ "72f53e30-8d4c-441f-8ad6-7262588e2d92" ], + "CommandName": [ "Remove-AzSphereProduct" ], + "FullCommandName": [ "Remove-AzSphereProduct_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "9c576ebb-b118-4255-a18b-479ad3733f64" ], + "x-ms-request-id": [ "7cde5e8d-b2e8-4d06-afd4-98f1cc37b21e" ], + "x-ms-correlation-request-id": [ "f9dbe807-94df-4a38-ab8c-2eec3285802e" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T084609Z:f9dbe807-94df-4a38-ab8c-2eec3285802e" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 64C681D3185E432B97CBF04BCC9BDFE5 Ref B: MAA201060513025 Ref C: 2024-04-01T08:46:06Z" ], + "Date": [ "Mon, 01 Apr 2024 08:46:09 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "4" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "bnVsbA==", + "isContentBase64": false + } + }, + "AzSphereMainScenario+[NoContext]+DeleteViaIdentityCatalog+$GET+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog?api-version=2024-04-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "28" ], + "x-ms-client-request-id": [ "805f29f7-793c-4d6d-8c66-25545556cc55" ], + "CommandName": [ "Get-AzSphereCatalog" ], + "FullCommandName": [ "Get-AzSphereCatalog_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"40020a39-0000-0400-0000-660a73e30000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "3c5c2f18-c438-4b7d-9808-a4ced39e9019" ], + "x-ms-request-id": [ "6e0c1140-2e40-45f4-ae4a-02bc9a31cff3" ], + "x-ms-correlation-request-id": [ "8d914a48-3182-4307-b9a2-1a418e9ab8bc" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T084610Z:8d914a48-3182-4307-b9a2-1a418e9ab8bc" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 94BB72AE2AA2401BB54511D6520586D2 Ref B: MAA201060513025 Ref C: 2024-04-01T08:46:09Z" ], + "Date": [ "Mon, 01 Apr 2024 08:46:10 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "578" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog\",\"name\":\"secondCatalog\",\"type\":\"microsoft.azuresphere/catalogs\",\"location\":\"Global\",\"tags\":{\"123\":\"abc\"},\"systemData\":{\"createdBy\":\"v-jiaji@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-01T08:43:23.8903293Z\",\"lastModifiedBy\":\"v-jiaji@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-04-01T08:44:15.2482731Z\"},\"properties\":{\"tenantId\":\"6cb5627c-4d5a-46a2-b2cd-9f5c01912220\",\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzSphereMainScenario+[NoContext]+DeleteViaIdentityCatalog+$DELETE+https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog?api-version=2024-04-01+2": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/v-jiajiCEVRG/providers/Microsoft.AzureSphere/catalogs/secondCatalog?api-version=2024-04-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "29" ], + "x-ms-client-request-id": [ "b78198fa-8878-449b-92f7-e4d285630a34" ], + "CommandName": [ "Remove-AzSphereCatalog" ], + "FullCommandName": [ "Remove-AzSphereCatalog_DeleteViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v10.1.0", "PSVersion/v7.4.1", "Az.Sphere/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-providerhub-traffic": [ "True" ], + "Request-Context": [ "appId=" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "mise-correlation-id": [ "0392a004-e11c-4e4a-b631-1ad939c43d3c" ], + "x-ms-request-id": [ "00000000-0000-0000-0000-000000000000" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-correlation-request-id": [ "0049eb41-85cd-4c4a-be0d-42f07a9010d2" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20240401T084618Z:0049eb41-85cd-4c4a-be0d-42f07a9010d2" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 415AAB1FCD5141BF9AE7B6F92AE639DA Ref B: MAA201060513025 Ref C: 2024-04-01T08:46:10Z" ], + "Date": [ "Mon, 01 Apr 2024 08:46:18 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ], + "Content-Length": [ "0" ] + }, + "Content": null, + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/test/AzSphereMainScenario.Tests.ps1 b/src/Sphere/Sphere.Autorest/test/AzSphereMainScenario.Tests.ps1 new file mode 100644 index 000000000000..0afd79f9248d --- /dev/null +++ b/src/Sphere/Sphere.Autorest/test/AzSphereMainScenario.Tests.ps1 @@ -0,0 +1,145 @@ +if(($null -eq $TestName) -or ($TestName -contains 'AzSphereMainScenario')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'AzSphereMainScenario.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'AzSphereMainScenario' { + It 'CreateUpdateCatalog' { + { + Write-Host 'Start to create test catalog' $env.secondCatalog + $catalogB = New-AzSphereCatalog -Name $env.secondCatalog -ResourceGroupName $env.resourceGroup -Location $env.globalLocation + $catalogB.Name | Should -Be $env.secondCatalog + + $key = "abc" + $value = "123" + $tag = @{$key=$value} + Write-Host 'Update test catalog identity' $env.secondCatalog + $catalog = Update-AzSphereCatalog -InputObject $catalogB -Tag $tag + $catalog.Tag["$key"] | Should -Be $value + } | Should -Not -Throw + } + + It 'UpdateCatalog' { + { + $key = "123" + $value = "abc" + $tag = @{$key=$value} + $catalog = Update-AzSphereCatalog -Name $env.secondCatalog -ResourceGroupName $env.resourceGroup -Tag $tag + $catalog.Tag["$key"] | Should -Be $value + } | Should -Not -Throw + } + + It 'ListCatalogBySub' { + { + $listSub = Get-AzSphereCatalog + $listSub.Count | Should -BeGreaterOrEqual 2 + } | Should -Not -Throw + } + + It 'GetCatalog' { + { + $catalog = Get-AzSphereCatalog -Name $env.secondCatalog -ResourceGroupName $env.resourceGroup + $catalog.Name | Should -Be $env.secondCatalog + } | Should -Not -Throw + } + + It 'ListCatalogByGroup' { + { + $listGroup = Get-AzSphereCatalog -ResourceGroupName $env.resourceGroup + $listGroup.Count | Should -BeGreaterOrEqual 1 + } | Should -Not -Throw + } + + It 'GetCertificate' { + { + Write-Host 'List certificate for first catalog' $env.secondCatalog + $certSerial = Get-AzSphereCertificate -ResourceGroupName $env.resourceGroup -CatalogName $env.secondCatalog + $certSerial.ResourceGroupName | Should -Be $env.resourceGroup + + $serialNumberFirst = $certSerial.Name + Write-Host 'Get certificate for first catalog' $env.secondCatalog + $cert = Get-AzSphereCertificate -ResourceGroupName $env.resourceGroup -CatalogName $env.secondCatalog -SerialNumber $serialNumberFirst + $cert | Should -Not -BeNullOrEmpty + + Write-Host 'Get certificate cert chain for first catalog' $env.secondCatalog + $chain = Get-AzSphereCertificateCertChain -ResourceGroupName $env.resourceGroup -CatalogName $env.secondCatalog -SerialNumber $serialNumberFirst + $chain | Should -Not -BeNullOrEmpty + + Write-Host 'Get certificate proof for first catalog' $env.secondCatalog + $proof = Get-AzSphereCertificateProof -ResourceGroupName $env.resourceGroup -CatalogName $env.secondCatalog -SerialNumber $serialNumberFirst -ProofOfPossessionNonce proofOfPossessionNonce + $proof | Should -Not -BeNullOrEmpty + } | Should -Not -Throw + } + + It 'CreateProduct' { + { + New-AzSphereProduct -CatalogName $env.secondCatalog -Name $env.anotherProduct -ResourceGroupName $env.resourceGroup + } | Should -Not -Throw + } + + It 'GetProduct' { + { + $prod1 = Get-AzSphereProduct -CatalogName $env.secondCatalog -Name $env.anotherProduct -ResourceGroupName $env.resourceGroup + $prod1.Name | Should -Be $env.anotherProduct + } | Should -Not -Throw + } + + It 'UpdateProduct' { + { + $description = 'Test product' + $prod1 = Update-AzSphereProduct -CatalogName $env.secondCatalog -Name $env.anotherProduct -ResourceGroupName $env.resourceGroup -Description $description + $prod1.Description | Should -Be $description + } | Should -Not -Throw + } + + It 'CreateGetUpdateDeviceGroup' { + { + $deviceGroup = New-AzSphereDeviceGroup -Name $env.anotherDeviceGroup -ProductName $env.anotherProduct -CatalogName $env.secondCatalog -ResourceGroupName $env.resourceGroup + + $description = 'Test device group' + $update = Update-AzSphereDeviceGroup -CatalogName $env.secondCatalog -Name $env.anotherDeviceGroup -ProductName $env.anotherProduct -ResourceGroupName $env.resourceGroup -Description $description + $update.Description | Should -Be $description + + $result = Get-AzSphereDeviceGroup -InputObject $deviceGroup + $result.Description | Should -Be $description + $result.Name | Should -Be $env.anotherDeviceGroup + } | Should -Not -Throw + } + + It 'ListGroupInCatalog' { + { + $listDeviceGroup = Get-AzSphereCatalogDeviceGroup -ResourceGroupName $env.resourceGroup -CatalogName $env.secondCatalog + $listDeviceGroup.Count | Should -BeGreaterOrEqual 1 + } | Should -Not -Throw + } + + It 'DeleteDeviceGroup' { + { + Remove-AzSphereDeviceGroup -CatalogName $env.secondCatalog -Name $env.anotherDeviceGroup -ProductName $env.anotherProduct -ResourceGroupName $env.resourceGroup + } | Should -Not -Throw + } + + It 'DeleteProduct' { + { + Remove-AzSphereProduct -CatalogName $env.secondCatalog -Name $env.anotherProduct -ResourceGroupName $env.resourceGroup + } | Should -Not -Throw + } + + It 'DeleteViaIdentityCatalog' { + { + $catalog = Get-AzSphereCatalog -Name $env.secondCatalog -ResourceGroupName $env.resourceGroup + Remove-AzSphereCatalog -InputObject $catalog + } | Should -Not -Throw + } +} diff --git a/src/Sphere/Sphere.Autorest/test/Get-AzSphereCatalog.Tests.ps1 b/src/Sphere/Sphere.Autorest/test/Get-AzSphereCatalog.Tests.ps1 new file mode 100644 index 000000000000..ee76f15a5dd8 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/test/Get-AzSphereCatalog.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzSphereCatalog')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzSphereCatalog.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzSphereCatalog' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'List1' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Sphere/Sphere.Autorest/test/Get-AzSphereCatalogDevice.Tests.ps1 b/src/Sphere/Sphere.Autorest/test/Get-AzSphereCatalogDevice.Tests.ps1 new file mode 100644 index 000000000000..06dace160e72 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/test/Get-AzSphereCatalogDevice.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzSphereCatalogDevice')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzSphereCatalogDevice.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzSphereCatalogDevice' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Sphere/Sphere.Autorest/test/Get-AzSphereCatalogDeviceGroup.Tests.ps1 b/src/Sphere/Sphere.Autorest/test/Get-AzSphereCatalogDeviceGroup.Tests.ps1 new file mode 100644 index 000000000000..2a7fadffb0ef --- /dev/null +++ b/src/Sphere/Sphere.Autorest/test/Get-AzSphereCatalogDeviceGroup.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzSphereCatalogDeviceGroup')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzSphereCatalogDeviceGroup.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzSphereCatalogDeviceGroup' { + It 'ListExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Sphere/Sphere.Autorest/test/Get-AzSphereCatalogDeviceInsight.Tests.ps1 b/src/Sphere/Sphere.Autorest/test/Get-AzSphereCatalogDeviceInsight.Tests.ps1 new file mode 100644 index 000000000000..d80917957869 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/test/Get-AzSphereCatalogDeviceInsight.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzSphereCatalogDeviceInsight')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzSphereCatalogDeviceInsight.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzSphereCatalogDeviceInsight' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Sphere/Sphere.Autorest/test/Get-AzSphereCertificate.Tests.ps1 b/src/Sphere/Sphere.Autorest/test/Get-AzSphereCertificate.Tests.ps1 new file mode 100644 index 000000000000..168f0193e70a --- /dev/null +++ b/src/Sphere/Sphere.Autorest/test/Get-AzSphereCertificate.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzSphereCertificate')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzSphereCertificate.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzSphereCertificate' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentityCatalog' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Sphere/Sphere.Autorest/test/Get-AzSphereCertificateCertChain.Tests.ps1 b/src/Sphere/Sphere.Autorest/test/Get-AzSphereCertificateCertChain.Tests.ps1 new file mode 100644 index 000000000000..e711d97489f5 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/test/Get-AzSphereCertificateCertChain.Tests.ps1 @@ -0,0 +1,29 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzSphereCertificateCertChain')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzSphereCertificateCertChain.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzSphereCertificateCertChain' { + It 'Retrieve' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'RetrieveViaIdentityCatalog' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'RetrieveViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Sphere/Sphere.Autorest/test/Get-AzSphereCertificateProof.Tests.ps1 b/src/Sphere/Sphere.Autorest/test/Get-AzSphereCertificateProof.Tests.ps1 new file mode 100644 index 000000000000..4516ba05d65a --- /dev/null +++ b/src/Sphere/Sphere.Autorest/test/Get-AzSphereCertificateProof.Tests.ps1 @@ -0,0 +1,29 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzSphereCertificateProof')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzSphereCertificateProof.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzSphereCertificateProof' { + It 'RetrieveExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'RetrieveViaIdentityCatalogExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'RetrieveViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Sphere/Sphere.Autorest/test/Get-AzSphereDeployment.Tests.ps1 b/src/Sphere/Sphere.Autorest/test/Get-AzSphereDeployment.Tests.ps1 new file mode 100644 index 000000000000..2e069237de34 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/test/Get-AzSphereDeployment.Tests.ps1 @@ -0,0 +1,41 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzSphereDeployment')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzSphereDeployment.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzSphereDeployment' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentityProduct' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentityCatalog' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentityDeviceGroup' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Sphere/Sphere.Autorest/test/Get-AzSphereDevice.Tests.ps1 b/src/Sphere/Sphere.Autorest/test/Get-AzSphereDevice.Tests.ps1 new file mode 100644 index 000000000000..5dde7a4b01d0 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/test/Get-AzSphereDevice.Tests.ps1 @@ -0,0 +1,41 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzSphereDevice')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzSphereDevice.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzSphereDevice' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentityProduct' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentityCatalog' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentityDeviceGroup' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Sphere/Sphere.Autorest/test/Get-AzSphereDeviceGroup.Tests.ps1 b/src/Sphere/Sphere.Autorest/test/Get-AzSphereDeviceGroup.Tests.ps1 new file mode 100644 index 000000000000..30febcd6c500 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/test/Get-AzSphereDeviceGroup.Tests.ps1 @@ -0,0 +1,37 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzSphereDeviceGroup')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzSphereDeviceGroup.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzSphereDeviceGroup' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentityProduct' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentityCatalog' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Sphere/Sphere.Autorest/test/Get-AzSphereImage.Tests.ps1 b/src/Sphere/Sphere.Autorest/test/Get-AzSphereImage.Tests.ps1 new file mode 100644 index 000000000000..2f57b4423d31 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/test/Get-AzSphereImage.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzSphereImage')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzSphereImage.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzSphereImage' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentityCatalog' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Sphere/Sphere.Autorest/test/Get-AzSphereProduct.Tests.ps1 b/src/Sphere/Sphere.Autorest/test/Get-AzSphereProduct.Tests.ps1 new file mode 100644 index 000000000000..88813c012306 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/test/Get-AzSphereProduct.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzSphereProduct')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzSphereProduct.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzSphereProduct' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentityCatalog' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Sphere/Sphere.Autorest/test/Invoke-AzSphereClaimDeviceGroupDevice.Tests.ps1 b/src/Sphere/Sphere.Autorest/test/Invoke-AzSphereClaimDeviceGroupDevice.Tests.ps1 new file mode 100644 index 000000000000..28c46e9cf2d3 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/test/Invoke-AzSphereClaimDeviceGroupDevice.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Invoke-AzSphereClaimDeviceGroupDevice')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Invoke-AzSphereClaimDeviceGroupDevice.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Invoke-AzSphereClaimDeviceGroupDevice' { + It 'ClaimExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'ClaimViaIdentityProductExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'ClaimViaIdentityCatalogExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'ClaimViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Sphere/Sphere.Autorest/test/Invoke-AzSphereCountCatalogDevice.Tests.ps1 b/src/Sphere/Sphere.Autorest/test/Invoke-AzSphereCountCatalogDevice.Tests.ps1 new file mode 100644 index 000000000000..f42142286fbf --- /dev/null +++ b/src/Sphere/Sphere.Autorest/test/Invoke-AzSphereCountCatalogDevice.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Invoke-AzSphereCountCatalogDevice')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Invoke-AzSphereCountCatalogDevice.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Invoke-AzSphereCountCatalogDevice' { + It 'Count' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'CountViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Sphere/Sphere.Autorest/test/Invoke-AzSphereCountDeviceGroupDevice.Tests.ps1 b/src/Sphere/Sphere.Autorest/test/Invoke-AzSphereCountDeviceGroupDevice.Tests.ps1 new file mode 100644 index 000000000000..1df671e696d4 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/test/Invoke-AzSphereCountDeviceGroupDevice.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Invoke-AzSphereCountDeviceGroupDevice')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Invoke-AzSphereCountDeviceGroupDevice.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Invoke-AzSphereCountDeviceGroupDevice' { + It 'Count' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'CountViaIdentityProduct' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'CountViaIdentityCatalog' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'CountViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Sphere/Sphere.Autorest/test/Invoke-AzSphereCountProductDevice.Tests.ps1 b/src/Sphere/Sphere.Autorest/test/Invoke-AzSphereCountProductDevice.Tests.ps1 new file mode 100644 index 000000000000..728aeb99047a --- /dev/null +++ b/src/Sphere/Sphere.Autorest/test/Invoke-AzSphereCountProductDevice.Tests.ps1 @@ -0,0 +1,29 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Invoke-AzSphereCountProductDevice')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Invoke-AzSphereCountProductDevice.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Invoke-AzSphereCountProductDevice' { + It 'Count' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'CountViaIdentityCatalog' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'CountViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Sphere/Sphere.Autorest/test/New-AzSphereCatalog.Tests.ps1 b/src/Sphere/Sphere.Autorest/test/New-AzSphereCatalog.Tests.ps1 new file mode 100644 index 000000000000..7a2c1e7880cb --- /dev/null +++ b/src/Sphere/Sphere.Autorest/test/New-AzSphereCatalog.Tests.ps1 @@ -0,0 +1,29 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzSphereCatalog')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzSphereCatalog.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzSphereCatalog' { + It 'CreateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'CreateViaJsonFilePath' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'CreateViaJsonString' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Sphere/Sphere.Autorest/test/New-AzSphereDeployment.Tests.ps1 b/src/Sphere/Sphere.Autorest/test/New-AzSphereDeployment.Tests.ps1 new file mode 100644 index 000000000000..28175b0ff82a --- /dev/null +++ b/src/Sphere/Sphere.Autorest/test/New-AzSphereDeployment.Tests.ps1 @@ -0,0 +1,29 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzSphereDeployment')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzSphereDeployment.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzSphereDeployment' { + It 'CreateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'CreateViaJsonFilePath' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'CreateViaJsonString' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Sphere/Sphere.Autorest/test/New-AzSphereDevice.Tests.ps1 b/src/Sphere/Sphere.Autorest/test/New-AzSphereDevice.Tests.ps1 new file mode 100644 index 000000000000..521f2cd5a8c5 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/test/New-AzSphereDevice.Tests.ps1 @@ -0,0 +1,29 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzSphereDevice')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzSphereDevice.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzSphereDevice' { + It 'CreateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'CreateViaJsonFilePath' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'CreateViaJsonString' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Sphere/Sphere.Autorest/test/New-AzSphereDeviceCapabilityImage.Tests.ps1 b/src/Sphere/Sphere.Autorest/test/New-AzSphereDeviceCapabilityImage.Tests.ps1 new file mode 100644 index 000000000000..fad7a8cf1b06 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/test/New-AzSphereDeviceCapabilityImage.Tests.ps1 @@ -0,0 +1,41 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzSphereDeviceCapabilityImage')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzSphereDeviceCapabilityImage.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzSphereDeviceCapabilityImage' { + It 'GenerateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GenerateViaJsonString' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GenerateViaJsonFilePath' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GenerateViaIdentityProductExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GenerateViaIdentityCatalogExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GenerateViaIdentityDeviceGroupExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Sphere/Sphere.Autorest/test/New-AzSphereDeviceGroup.Tests.ps1 b/src/Sphere/Sphere.Autorest/test/New-AzSphereDeviceGroup.Tests.ps1 new file mode 100644 index 000000000000..8f6ecb84bca7 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/test/New-AzSphereDeviceGroup.Tests.ps1 @@ -0,0 +1,29 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzSphereDeviceGroup')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzSphereDeviceGroup.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzSphereDeviceGroup' { + It 'CreateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'CreateViaJsonFilePath' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'CreateViaJsonString' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Sphere/Sphere.Autorest/test/New-AzSphereImage.Tests.ps1 b/src/Sphere/Sphere.Autorest/test/New-AzSphereImage.Tests.ps1 new file mode 100644 index 000000000000..484f29267bb6 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/test/New-AzSphereImage.Tests.ps1 @@ -0,0 +1,29 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzSphereImage')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzSphereImage.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzSphereImage' { + It 'CreateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'CreateViaJsonFilePath' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'CreateViaJsonString' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Sphere/Sphere.Autorest/test/New-AzSphereProduct.Tests.ps1 b/src/Sphere/Sphere.Autorest/test/New-AzSphereProduct.Tests.ps1 new file mode 100644 index 000000000000..9a7d525abd58 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/test/New-AzSphereProduct.Tests.ps1 @@ -0,0 +1,29 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzSphereProduct')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzSphereProduct.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzSphereProduct' { + It 'CreateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'CreateViaJsonFilePath' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'CreateViaJsonString' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Sphere/Sphere.Autorest/test/New-AzSphereProductDefaultDeviceGroup.Tests.ps1 b/src/Sphere/Sphere.Autorest/test/New-AzSphereProductDefaultDeviceGroup.Tests.ps1 new file mode 100644 index 000000000000..b4f8424f77c6 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/test/New-AzSphereProductDefaultDeviceGroup.Tests.ps1 @@ -0,0 +1,29 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzSphereProductDefaultDeviceGroup')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzSphereProductDefaultDeviceGroup.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzSphereProductDefaultDeviceGroup' { + It 'Generate' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GenerateViaIdentityCatalog' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GenerateViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Sphere/Sphere.Autorest/test/README.md b/src/Sphere/Sphere.Autorest/test/README.md new file mode 100644 index 000000000000..7c752b4c8c43 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/test/README.md @@ -0,0 +1,17 @@ +# Test +This directory contains the [Pester](https://www.powershellgallery.com/packages/Pester) tests to run for the module. We use Pester as it is the unofficial standard for PowerShell unit testing. Test stubs for custom cmdlets (created in `..\custom`) will be generated into this folder when `build-module.ps1` is ran. These test stubs will fail automatically, to indicate that tests should be written for custom cmdlets. + +## Info +- Modifiable: yes +- Generated: partial +- Committed: yes +- Packaged: no + +## Details +We allow three testing modes: *live*, *record*, and *playback*. These can be selected using the `-Live`, `-Record`, and `-Playback` switches respectively on the `test-module.ps1` script. This script will run through any `.Tests.ps1` scripts in the `test` folder. If you choose the *record* mode, it will create a `.Recording.json` file of the REST calls between the client and server. Then, when you choose *playback* mode, it will use the `.Recording.json` file to mock the communication between server and client. The *live* mode runs the same as the *record* mode; however, it doesn't create the `.Recording.json` file. + +## Purpose +Custom cmdlets generally encompass additional functionality not described in the REST specification, or combines functionality generated from the REST spec. To validate this functionality continues to operate as intended, creating tests that can be ran and re-ran against custom cmdlets is part of the framework. + +## Usage +To execute tests, run the `test-module.ps1`. To write tests, [this example](https://github.com/pester/Pester/blob/8b9cf4248315e44f1ac6673be149f7e0d7f10466/Examples/Planets/Get-Planet.Tests.ps1#L1) from the Pester repository is very useful for getting started. \ No newline at end of file diff --git a/src/Sphere/Sphere.Autorest/test/Remove-AzSphereCatalog.Tests.ps1 b/src/Sphere/Sphere.Autorest/test/Remove-AzSphereCatalog.Tests.ps1 new file mode 100644 index 000000000000..0d447971bc33 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/test/Remove-AzSphereCatalog.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzSphereCatalog')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzSphereCatalog.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Remove-AzSphereCatalog' { + It 'Delete' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'DeleteViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Sphere/Sphere.Autorest/test/Remove-AzSphereDeviceGroup.Tests.ps1 b/src/Sphere/Sphere.Autorest/test/Remove-AzSphereDeviceGroup.Tests.ps1 new file mode 100644 index 000000000000..d60ba8085078 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/test/Remove-AzSphereDeviceGroup.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzSphereDeviceGroup')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzSphereDeviceGroup.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Remove-AzSphereDeviceGroup' { + It 'Delete' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'DeleteViaIdentityProduct' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'DeleteViaIdentityCatalog' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'DeleteViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Sphere/Sphere.Autorest/test/Remove-AzSphereProduct.Tests.ps1 b/src/Sphere/Sphere.Autorest/test/Remove-AzSphereProduct.Tests.ps1 new file mode 100644 index 000000000000..1dfa5ef8645f --- /dev/null +++ b/src/Sphere/Sphere.Autorest/test/Remove-AzSphereProduct.Tests.ps1 @@ -0,0 +1,29 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzSphereProduct')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzSphereProduct.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Remove-AzSphereProduct' { + It 'Delete' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'DeleteViaIdentityCatalog' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'DeleteViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Sphere/Sphere.Autorest/test/Update-AzSphereCatalog.Tests.ps1 b/src/Sphere/Sphere.Autorest/test/Update-AzSphereCatalog.Tests.ps1 new file mode 100644 index 000000000000..945555181fd0 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/test/Update-AzSphereCatalog.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Update-AzSphereCatalog')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzSphereCatalog.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Update-AzSphereCatalog' { + It 'UpdateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UpdateViaJsonString' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UpdateViaJsonFilePath' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UpdateViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Sphere/Sphere.Autorest/test/Update-AzSphereDevice.Tests.ps1 b/src/Sphere/Sphere.Autorest/test/Update-AzSphereDevice.Tests.ps1 new file mode 100644 index 000000000000..9ce7d828c695 --- /dev/null +++ b/src/Sphere/Sphere.Autorest/test/Update-AzSphereDevice.Tests.ps1 @@ -0,0 +1,45 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Update-AzSphereDevice')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzSphereDevice.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Update-AzSphereDevice' { + It 'UpdateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UpdateViaJsonString' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UpdateViaJsonFilePath' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UpdateViaIdentityProductExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UpdateViaIdentityCatalogExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UpdateViaIdentityDeviceGroupExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UpdateViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Sphere/Sphere.Autorest/test/Update-AzSphereDeviceGroup.Tests.ps1 b/src/Sphere/Sphere.Autorest/test/Update-AzSphereDeviceGroup.Tests.ps1 new file mode 100644 index 000000000000..dd6d9243d53a --- /dev/null +++ b/src/Sphere/Sphere.Autorest/test/Update-AzSphereDeviceGroup.Tests.ps1 @@ -0,0 +1,41 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Update-AzSphereDeviceGroup')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzSphereDeviceGroup.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Update-AzSphereDeviceGroup' { + It 'UpdateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UpdateViaJsonString' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UpdateViaJsonFilePath' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UpdateViaIdentityProductExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UpdateViaIdentityCatalogExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UpdateViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Sphere/Sphere.Autorest/test/Update-AzSphereProduct.Tests.ps1 b/src/Sphere/Sphere.Autorest/test/Update-AzSphereProduct.Tests.ps1 new file mode 100644 index 000000000000..f4c646af1c7b --- /dev/null +++ b/src/Sphere/Sphere.Autorest/test/Update-AzSphereProduct.Tests.ps1 @@ -0,0 +1,37 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Update-AzSphereProduct')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzSphereProduct.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Update-AzSphereProduct' { + It 'UpdateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UpdateViaJsonString' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UpdateViaJsonFilePath' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UpdateViaIdentityCatalogExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UpdateViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Sphere/Sphere.Autorest/test/env.json b/src/Sphere/Sphere.Autorest/test/env.json new file mode 100644 index 000000000000..68c85fa419ce --- /dev/null +++ b/src/Sphere/Sphere.Autorest/test/env.json @@ -0,0 +1,74612 @@ +{ + "secondCatalog": "secondCatalog", + "deviceID": "0B3703164F0F4F20AAD0A2CEE26E2CBE0095B423A67C999B288410A2159EB7138FD6813438D765B5DE1C3F4C314E49B74A1D82714DDD7B8BA6F369C8D89A2BB2", + "imageID1": "14a6729e-5819-4737-8713-37b4798533f8", + "ProdDeviceGroup": "Production", + "imagecontext2": [ + 69, + 61, + 205, + 40, + 0, + 80, + 0, + 0, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 67, + 111, + 109, + 112, + 114, + 101, + 115, + 115, + 101, + 100, + 32, + 82, + 79, + 77, + 70, + 83, + 248, + 55, + 203, + 150, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 67, + 111, + 109, + 112, + 114, + 101, + 115, + 115, + 101, + 100, + 0, + 0, + 0, + 0, + 0, + 0, + 237, + 65, + 0, + 0, + 48, + 0, + 0, + 0, + 192, + 4, + 0, + 0, + 164, + 131, + 0, + 0, + 242, + 0, + 0, + 0, + 5, + 0, + 1, + 0, + 97, + 112, + 112, + 95, + 109, + 97, + 110, + 105, + 102, + 101, + 115, + 116, + 46, + 106, + 115, + 111, + 110, + 0, + 0, + 0, + 237, + 65, + 0, + 0, + 16, + 0, + 0, + 0, + 193, + 7, + 0, + 0, + 98, + 105, + 110, + 0, + 237, + 131, + 0, + 0, + 40, + 38, + 0, + 0, + 1, + 0, + 2, + 0, + 97, + 112, + 112, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 123, + 34, + 83, + 99, + 104, + 101, + 109, + 97, + 86, + 101, + 114, + 115, + 105, + 111, + 110, + 34, + 58, + 49, + 44, + 34, + 78, + 97, + 109, + 101, + 34, + 58, + 34, + 69, + 114, + 114, + 111, + 114, + 82, + 101, + 112, + 111, + 114, + 116, + 105, + 110, + 103, + 83, + 116, + 97, + 103, + 101, + 49, + 34, + 44, + 34, + 67, + 111, + 109, + 112, + 111, + 110, + 101, + 110, + 116, + 73, + 100, + 34, + 58, + 34, + 97, + 54, + 48, + 97, + 50, + 55, + 102, + 102, + 45, + 56, + 57, + 51, + 54, + 45, + 52, + 97, + 52, + 57, + 45, + 98, + 55, + 51, + 102, + 45, + 55, + 48, + 56, + 54, + 49, + 100, + 98, + 48, + 51, + 100, + 52, + 51, + 34, + 44, + 34, + 69, + 110, + 116, + 114, + 121, + 80, + 111, + 105, + 110, + 116, + 34, + 58, + 34, + 47, + 98, + 105, + 110, + 47, + 97, + 112, + 112, + 34, + 44, + 34, + 67, + 109, + 100, + 65, + 114, + 103, + 115, + 34, + 58, + 91, + 93, + 44, + 34, + 67, + 97, + 112, + 97, + 98, + 105, + 108, + 105, + 116, + 105, + 101, + 115, + 34, + 58, + 123, + 34, + 71, + 112, + 105, + 111, + 34, + 58, + 91, + 49, + 50, + 44, + 49, + 51, + 44, + 49, + 55, + 44, + 49, + 54, + 93, + 125, + 44, + 34, + 65, + 112, + 112, + 108, + 105, + 99, + 97, + 116, + 105, + 111, + 110, + 84, + 121, + 112, + 101, + 34, + 58, + 34, + 68, + 101, + 102, + 97, + 117, + 108, + 116, + 34, + 44, + 34, + 84, + 97, + 114, + 103, + 101, + 116, + 65, + 112, + 112, + 108, + 105, + 99, + 97, + 116, + 105, + 111, + 110, + 82, + 117, + 110, + 116, + 105, + 109, + 101, + 86, + 101, + 114, + 115, + 105, + 111, + 110, + 34, + 58, + 49, + 51, + 125, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 127, + 69, + 76, + 70, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 3, + 0, + 40, + 0, + 1, + 0, + 0, + 0, + 29, + 9, + 0, + 0, + 52, + 0, + 0, + 0, + 240, + 33, + 0, + 0, + 0, + 4, + 0, + 5, + 52, + 0, + 32, + 0, + 9, + 0, + 40, + 0, + 27, + 0, + 26, + 0, + 1, + 0, + 0, + 112, + 164, + 26, + 0, + 0, + 164, + 26, + 0, + 0, + 164, + 26, + 0, + 0, + 40, + 0, + 0, + 0, + 40, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 6, + 0, + 0, + 0, + 52, + 0, + 0, + 0, + 52, + 0, + 0, + 0, + 52, + 0, + 0, + 0, + 32, + 1, + 0, + 0, + 32, + 1, + 0, + 0, + 4, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 84, + 1, + 0, + 0, + 84, + 1, + 0, + 0, + 84, + 1, + 0, + 0, + 24, + 0, + 0, + 0, + 24, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 208, + 26, + 0, + 0, + 208, + 26, + 0, + 0, + 5, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 248, + 30, + 0, + 0, + 248, + 30, + 1, + 0, + 248, + 30, + 1, + 0, + 184, + 1, + 0, + 0, + 232, + 1, + 0, + 0, + 6, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 2, + 0, + 0, + 0, + 0, + 31, + 0, + 0, + 0, + 31, + 1, + 0, + 0, + 31, + 1, + 0, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 6, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 108, + 1, + 0, + 0, + 108, + 1, + 0, + 0, + 108, + 1, + 0, + 0, + 36, + 0, + 0, + 0, + 36, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 81, + 229, + 116, + 100, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 6, + 0, + 0, + 0, + 16, + 0, + 0, + 0, + 82, + 229, + 116, + 100, + 248, + 30, + 0, + 0, + 248, + 30, + 1, + 0, + 248, + 30, + 1, + 0, + 8, + 1, + 0, + 0, + 8, + 1, + 0, + 0, + 4, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 47, + 108, + 105, + 98, + 47, + 108, + 100, + 45, + 109, + 117, + 115, + 108, + 45, + 97, + 114, + 109, + 104, + 102, + 46, + 115, + 111, + 46, + 49, + 0, + 4, + 0, + 0, + 0, + 20, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 71, + 78, + 85, + 0, + 38, + 219, + 118, + 245, + 211, + 60, + 76, + 128, + 116, + 173, + 175, + 28, + 159, + 101, + 109, + 171, + 32, + 216, + 249, + 153, + 2, + 0, + 0, + 0, + 34, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 5, + 0, + 0, + 0, + 0, + 36, + 0, + 129, + 34, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 234, + 211, + 239, + 14, + 185, + 141, + 241, + 14, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 200, + 7, + 0, + 0, + 0, + 0, + 0, + 0, + 3, + 0, + 10, + 0, + 0, + 0, + 0, + 0, + 152, + 32, + 1, + 0, + 0, + 0, + 0, + 0, + 3, + 0, + 22, + 0, + 40, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 8, + 2, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 87, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 32, + 0, + 0, + 0, + 3, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 52, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 59, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 32, + 0, + 0, + 0, + 98, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 214, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 17, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 246, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 159, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 170, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 17, + 0, + 0, + 0, + 37, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 34, + 0, + 0, + 0, + 84, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 10, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 32, + 0, + 0, + 0, + 130, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 137, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 188, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 111, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 32, + 0, + 0, + 0, + 197, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 204, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 63, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 177, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 209, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 229, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 32, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 231, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 23, + 2, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 120, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 194, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 32, + 2, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 191, + 0, + 0, + 0, + 93, + 22, + 0, + 0, + 2, + 0, + 0, + 0, + 18, + 0, + 13, + 0, + 114, + 0, + 0, + 0, + 201, + 7, + 0, + 0, + 2, + 0, + 0, + 0, + 18, + 0, + 10, + 0, + 0, + 108, + 105, + 98, + 97, + 112, + 112, + 108, + 105, + 98, + 115, + 46, + 115, + 111, + 46, + 48, + 0, + 95, + 95, + 97, + 101, + 97, + 98, + 105, + 95, + 117, + 110, + 119, + 105, + 110, + 100, + 95, + 99, + 112, + 112, + 95, + 112, + 114, + 48, + 0, + 69, + 118, + 101, + 110, + 116, + 76, + 111, + 111, + 112, + 95, + 85, + 110, + 114, + 101, + 103, + 105, + 115, + 116, + 101, + 114, + 73, + 111, + 0, + 69, + 118, + 101, + 110, + 116, + 76, + 111, + 111, + 112, + 95, + 82, + 101, + 103, + 105, + 115, + 116, + 101, + 114, + 73, + 111, + 0, + 71, + 80, + 73, + 79, + 95, + 83, + 101, + 116, + 86, + 97, + 108, + 117, + 101, + 0, + 69, + 118, + 101, + 110, + 116, + 76, + 111, + 111, + 112, + 95, + 67, + 108, + 111, + 115, + 101, + 0, + 95, + 105, + 110, + 105, + 116, + 0, + 76, + 111, + 103, + 95, + 68, + 101, + 98, + 117, + 103, + 0, + 78, + 101, + 116, + 119, + 111, + 114, + 107, + 105, + 110, + 103, + 95, + 73, + 115, + 78, + 101, + 116, + 119, + 111, + 114, + 107, + 105, + 110, + 103, + 82, + 101, + 97, + 100, + 121, + 0, + 71, + 80, + 73, + 79, + 95, + 79, + 112, + 101, + 110, + 65, + 115, + 79, + 117, + 116, + 112, + 117, + 116, + 0, + 69, + 118, + 101, + 110, + 116, + 76, + 111, + 111, + 112, + 95, + 82, + 117, + 110, + 0, + 95, + 102, + 105, + 110, + 105, + 0, + 69, + 118, + 101, + 110, + 116, + 76, + 111, + 111, + 112, + 95, + 67, + 114, + 101, + 97, + 116, + 101, + 0, + 71, + 80, + 73, + 79, + 95, + 79, + 112, + 101, + 110, + 65, + 115, + 73, + 110, + 112, + 117, + 116, + 0, + 71, + 80, + 73, + 79, + 95, + 71, + 101, + 116, + 86, + 97, + 108, + 117, + 101, + 0, + 108, + 105, + 98, + 103, + 99, + 99, + 95, + 115, + 46, + 115, + 111, + 46, + 49, + 0, + 109, + 101, + 109, + 115, + 101, + 116, + 0, + 95, + 95, + 114, + 101, + 103, + 105, + 115, + 116, + 101, + 114, + 95, + 102, + 114, + 97, + 109, + 101, + 95, + 105, + 110, + 102, + 111, + 0, + 102, + 114, + 101, + 101, + 0, + 95, + 95, + 99, + 120, + 97, + 95, + 102, + 105, + 110, + 97, + 108, + 105, + 122, + 101, + 0, + 109, + 97, + 108, + 108, + 111, + 99, + 0, + 95, + 73, + 84, + 77, + 95, + 100, + 101, + 114, + 101, + 103, + 105, + 115, + 116, + 101, + 114, + 84, + 77, + 67, + 108, + 111, + 110, + 101, + 84, + 97, + 98, + 108, + 101, + 0, + 95, + 95, + 100, + 101, + 114, + 101, + 103, + 105, + 115, + 116, + 101, + 114, + 95, + 102, + 114, + 97, + 109, + 101, + 95, + 105, + 110, + 102, + 111, + 0, + 95, + 73, + 84, + 77, + 95, + 114, + 101, + 103, + 105, + 115, + 116, + 101, + 114, + 84, + 77, + 67, + 108, + 111, + 110, + 101, + 84, + 97, + 98, + 108, + 101, + 0, + 95, + 95, + 97, + 101, + 97, + 98, + 105, + 95, + 117, + 110, + 119, + 105, + 110, + 100, + 95, + 99, + 112, + 112, + 95, + 112, + 114, + 49, + 0, + 108, + 105, + 98, + 99, + 46, + 115, + 111, + 46, + 49, + 0, + 95, + 95, + 115, + 116, + 97, + 99, + 107, + 95, + 99, + 104, + 107, + 95, + 103, + 117, + 97, + 114, + 100, + 0, + 99, + 108, + 111, + 115, + 101, + 0, + 115, + 105, + 103, + 97, + 99, + 116, + 105, + 111, + 110, + 0, + 114, + 101, + 97, + 100, + 0, + 95, + 95, + 116, + 105, + 109, + 101, + 114, + 102, + 100, + 95, + 115, + 101, + 116, + 116, + 105, + 109, + 101, + 54, + 52, + 0, + 95, + 95, + 101, + 114, + 114, + 110, + 111, + 95, + 108, + 111, + 99, + 97, + 116, + 105, + 111, + 110, + 0, + 95, + 95, + 108, + 105, + 98, + 99, + 95, + 115, + 116, + 97, + 114, + 116, + 95, + 109, + 97, + 105, + 110, + 0, + 116, + 105, + 109, + 101, + 114, + 102, + 100, + 95, + 99, + 114, + 101, + 97, + 116, + 101, + 0, + 115, + 116, + 114, + 101, + 114, + 114, + 111, + 114, + 0, + 95, + 95, + 115, + 116, + 97, + 99, + 107, + 95, + 99, + 104, + 107, + 95, + 102, + 97, + 105, + 108, + 0, + 71, + 67, + 67, + 95, + 51, + 46, + 53, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 245, + 0, + 0, + 0, + 16, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 85, + 38, + 121, + 11, + 0, + 0, + 2, + 0, + 49, + 2, + 0, + 0, + 0, + 0, + 0, + 0, + 248, + 30, + 1, + 0, + 23, + 0, + 0, + 0, + 252, + 30, + 1, + 0, + 23, + 0, + 0, + 0, + 116, + 32, + 1, + 0, + 23, + 0, + 0, + 0, + 120, + 32, + 1, + 0, + 23, + 0, + 0, + 0, + 132, + 32, + 1, + 0, + 23, + 0, + 0, + 0, + 152, + 32, + 1, + 0, + 23, + 0, + 0, + 0, + 124, + 32, + 1, + 0, + 21, + 5, + 0, + 0, + 128, + 32, + 1, + 0, + 21, + 8, + 0, + 0, + 136, + 32, + 1, + 0, + 21, + 14, + 0, + 0, + 140, + 32, + 1, + 0, + 21, + 15, + 0, + 0, + 144, + 32, + 1, + 0, + 21, + 17, + 0, + 0, + 148, + 32, + 1, + 0, + 21, + 21, + 0, + 0, + 12, + 32, + 1, + 0, + 22, + 3, + 0, + 0, + 16, + 32, + 1, + 0, + 22, + 4, + 0, + 0, + 20, + 32, + 1, + 0, + 22, + 5, + 0, + 0, + 24, + 32, + 1, + 0, + 22, + 6, + 0, + 0, + 28, + 32, + 1, + 0, + 22, + 7, + 0, + 0, + 32, + 32, + 1, + 0, + 22, + 9, + 0, + 0, + 36, + 32, + 1, + 0, + 22, + 10, + 0, + 0, + 40, + 32, + 1, + 0, + 22, + 12, + 0, + 0, + 44, + 32, + 1, + 0, + 22, + 13, + 0, + 0, + 48, + 32, + 1, + 0, + 22, + 15, + 0, + 0, + 52, + 32, + 1, + 0, + 22, + 16, + 0, + 0, + 56, + 32, + 1, + 0, + 22, + 17, + 0, + 0, + 60, + 32, + 1, + 0, + 22, + 18, + 0, + 0, + 64, + 32, + 1, + 0, + 22, + 20, + 0, + 0, + 68, + 32, + 1, + 0, + 22, + 22, + 0, + 0, + 72, + 32, + 1, + 0, + 22, + 23, + 0, + 0, + 76, + 32, + 1, + 0, + 22, + 24, + 0, + 0, + 80, + 32, + 1, + 0, + 22, + 25, + 0, + 0, + 84, + 32, + 1, + 0, + 22, + 26, + 0, + 0, + 88, + 32, + 1, + 0, + 22, + 27, + 0, + 0, + 92, + 32, + 1, + 0, + 22, + 28, + 0, + 0, + 96, + 32, + 1, + 0, + 22, + 29, + 0, + 0, + 100, + 32, + 1, + 0, + 22, + 30, + 0, + 0, + 104, + 32, + 1, + 0, + 22, + 31, + 0, + 0, + 108, + 32, + 1, + 0, + 22, + 32, + 0, + 0, + 112, + 32, + 1, + 0, + 22, + 33, + 0, + 0, + 1, + 181, + 189, + 232, + 1, + 64, + 112, + 71, + 4, + 224, + 45, + 229, + 4, + 224, + 159, + 229, + 14, + 224, + 143, + 224, + 8, + 240, + 190, + 229, + 32, + 24, + 1, + 0, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 32, + 248, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 24, + 248, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 16, + 248, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 8, + 248, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 0, + 248, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 248, + 247, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 240, + 247, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 232, + 247, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 224, + 247, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 216, + 247, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 208, + 247, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 200, + 247, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 192, + 247, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 184, + 247, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 176, + 247, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 168, + 247, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 160, + 247, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 152, + 247, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 144, + 247, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 136, + 247, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 128, + 247, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 120, + 247, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 112, + 247, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 104, + 247, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 96, + 247, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 88, + 247, + 188, + 229, + 79, + 240, + 0, + 11, + 79, + 240, + 0, + 14, + 3, + 73, + 121, + 68, + 104, + 70, + 32, + 240, + 15, + 12, + 229, + 70, + 0, + 240, + 2, + 248, + 214, + 21, + 1, + 0, + 31, + 181, + 11, + 75, + 11, + 74, + 123, + 68, + 154, + 88, + 2, + 146, + 10, + 74, + 154, + 88, + 3, + 146, + 0, + 34, + 1, + 146, + 9, + 74, + 155, + 88, + 2, + 29, + 0, + 147, + 2, + 155, + 1, + 104, + 3, + 152, + 255, + 247, + 108, + 239, + 5, + 176, + 93, + 248, + 4, + 251, + 0, + 191, + 190, + 22, + 1, + 0, + 132, + 0, + 0, + 0, + 116, + 0, + 0, + 0, + 120, + 0, + 0, + 0, + 6, + 72, + 7, + 75, + 120, + 68, + 123, + 68, + 6, + 74, + 131, + 66, + 122, + 68, + 3, + 208, + 5, + 75, + 211, + 88, + 3, + 177, + 24, + 71, + 112, + 71, + 0, + 191, + 48, + 23, + 1, + 0, + 46, + 23, + 1, + 0, + 120, + 22, + 1, + 0, + 128, + 0, + 0, + 0, + 8, + 72, + 9, + 73, + 120, + 68, + 121, + 68, + 9, + 26, + 8, + 74, + 203, + 15, + 3, + 235, + 161, + 1, + 122, + 68, + 73, + 16, + 3, + 208, + 5, + 75, + 211, + 88, + 3, + 177, + 24, + 71, + 112, + 71, + 0, + 191, + 4, + 23, + 1, + 0, + 2, + 23, + 1, + 0, + 70, + 22, + 1, + 0, + 148, + 0, + 0, + 0, + 14, + 75, + 16, + 181, + 123, + 68, + 14, + 76, + 27, + 120, + 124, + 68, + 163, + 185, + 13, + 75, + 227, + 88, + 35, + 177, + 12, + 75, + 123, + 68, + 24, + 104, + 255, + 247, + 46, + 239, + 255, + 247, + 191, + 255, + 10, + 75, + 227, + 88, + 27, + 177, + 9, + 72, + 120, + 68, + 255, + 247, + 250, + 238, + 8, + 75, + 1, + 34, + 123, + 68, + 26, + 112, + 16, + 189, + 0, + 191, + 208, + 22, + 1, + 0, + 26, + 22, + 1, + 0, + 140, + 0, + 0, + 0, + 166, + 22, + 1, + 0, + 124, + 0, + 0, + 0, + 198, + 16, + 0, + 0, + 160, + 22, + 1, + 0, + 8, + 181, + 7, + 75, + 7, + 74, + 123, + 68, + 155, + 88, + 43, + 177, + 6, + 73, + 7, + 72, + 121, + 68, + 120, + 68, + 255, + 247, + 16, + 239, + 189, + 232, + 8, + 64, + 170, + 231, + 0, + 191, + 198, + 21, + 1, + 0, + 144, + 0, + 0, + 0, + 112, + 22, + 1, + 0, + 134, + 16, + 0, + 0, + 128, + 180, + 131, + 176, + 0, + 175, + 120, + 96, + 5, + 75, + 123, + 68, + 26, + 70, + 1, + 35, + 19, + 96, + 0, + 191, + 12, + 55, + 189, + 70, + 93, + 248, + 4, + 123, + 112, + 71, + 0, + 191, + 110, + 22, + 1, + 0, + 144, + 181, + 133, + 176, + 0, + 175, + 120, + 96, + 120, + 104, + 0, + 240, + 139, + 253, + 3, + 70, + 0, + 43, + 5, + 208, + 34, + 75, + 123, + 68, + 26, + 70, + 2, + 35, + 19, + 96, + 59, + 224, + 32, + 75, + 123, + 68, + 27, + 120, + 0, + 43, + 12, + 191, + 1, + 35, + 0, + 35, + 219, + 178, + 26, + 70, + 29, + 75, + 123, + 68, + 26, + 112, + 28, + 75, + 123, + 68, + 27, + 120, + 0, + 43, + 3, + 208, + 27, + 75, + 123, + 68, + 27, + 104, + 2, + 224, + 26, + 75, + 123, + 68, + 27, + 104, + 25, + 74, + 122, + 68, + 18, + 120, + 17, + 70, + 24, + 70, + 255, + 247, + 190, + 238, + 248, + 96, + 251, + 104, + 0, + 43, + 24, + 208, + 255, + 247, + 238, + 238, + 3, + 70, + 27, + 104, + 24, + 70, + 255, + 247, + 250, + 238, + 4, + 70, + 255, + 247, + 230, + 238, + 3, + 70, + 27, + 104, + 26, + 70, + 33, + 70, + 14, + 75, + 123, + 68, + 24, + 70, + 255, + 247, + 244, + 238, + 12, + 75, + 123, + 68, + 26, + 70, + 3, + 35, + 19, + 96, + 0, + 191, + 20, + 55, + 189, + 70, + 144, + 189, + 0, + 191, + 62, + 22, + 1, + 0, + 4, + 22, + 1, + 0, + 242, + 21, + 1, + 0, + 237, + 21, + 1, + 0, + 216, + 21, + 1, + 0, + 212, + 21, + 1, + 0, + 212, + 21, + 1, + 0, + 92, + 11, + 0, + 0, + 198, + 21, + 1, + 0, + 128, + 181, + 130, + 176, + 0, + 175, + 120, + 96, + 120, + 104, + 0, + 240, + 41, + 253, + 3, + 70, + 0, + 43, + 5, + 208, + 6, + 75, + 123, + 68, + 26, + 70, + 4, + 35, + 19, + 96, + 3, + 224, + 0, + 240, + 8, + 248, + 0, + 240, + 114, + 248, + 8, + 55, + 189, + 70, + 128, + 189, + 0, + 191, + 122, + 21, + 1, + 0, + 144, + 181, + 131, + 176, + 0, + 175, + 42, + 75, + 123, + 68, + 27, + 104, + 41, + 74, + 122, + 68, + 17, + 70, + 24, + 70, + 0, + 240, + 150, + 248, + 3, + 70, + 0, + 43, + 68, + 208, + 0, + 240, + 125, + 248, + 37, + 75, + 123, + 68, + 27, + 120, + 0, + 43, + 61, + 209, + 35, + 75, + 123, + 68, + 27, + 120, + 0, + 43, + 3, + 208, + 34, + 75, + 123, + 68, + 27, + 104, + 2, + 224, + 33, + 75, + 123, + 68, + 27, + 104, + 1, + 33, + 24, + 70, + 255, + 247, + 74, + 238, + 120, + 96, + 123, + 104, + 0, + 43, + 24, + 208, + 255, + 247, + 122, + 238, + 3, + 70, + 27, + 104, + 24, + 70, + 255, + 247, + 136, + 238, + 4, + 70, + 255, + 247, + 114, + 238, + 3, + 70, + 27, + 104, + 26, + 70, + 33, + 70, + 21, + 75, + 123, + 68, + 24, + 70, + 255, + 247, + 130, + 238, + 20, + 75, + 123, + 68, + 26, + 70, + 6, + 35, + 19, + 96, + 16, + 224, + 18, + 75, + 123, + 68, + 27, + 120, + 0, + 43, + 20, + 191, + 1, + 35, + 0, + 35, + 219, + 178, + 131, + 240, + 1, + 3, + 219, + 178, + 3, + 240, + 1, + 3, + 218, + 178, + 12, + 75, + 123, + 68, + 26, + 112, + 12, + 55, + 189, + 70, + 144, + 189, + 0, + 191, + 20, + 21, + 1, + 0, + 30, + 21, + 1, + 0, + 8, + 21, + 1, + 0, + 1, + 21, + 1, + 0, + 236, + 20, + 1, + 0, + 232, + 20, + 1, + 0, + 118, + 10, + 0, + 0, + 224, + 20, + 1, + 0, + 167, + 20, + 1, + 0, + 139, + 20, + 1, + 0, + 128, + 181, + 0, + 175, + 11, + 75, + 123, + 68, + 27, + 104, + 11, + 74, + 122, + 68, + 17, + 70, + 24, + 70, + 0, + 240, + 43, + 248, + 3, + 70, + 0, + 43, + 9, + 208, + 7, + 75, + 123, + 68, + 27, + 120, + 0, + 43, + 4, + 209, + 6, + 75, + 123, + 68, + 26, + 70, + 7, + 35, + 19, + 96, + 0, + 191, + 128, + 189, + 66, + 20, + 1, + 0, + 73, + 20, + 1, + 0, + 55, + 20, + 1, + 0, + 92, + 20, + 1, + 0, + 128, + 181, + 130, + 176, + 0, + 175, + 7, + 75, + 123, + 68, + 27, + 104, + 1, + 33, + 24, + 70, + 255, + 247, + 216, + 237, + 0, + 35, + 123, + 96, + 123, + 104, + 27, + 104, + 0, + 191, + 8, + 55, + 189, + 70, + 128, + 189, + 0, + 20, + 1, + 0, + 144, + 181, + 135, + 176, + 0, + 175, + 120, + 96, + 57, + 96, + 39, + 74, + 122, + 68, + 39, + 75, + 211, + 88, + 27, + 104, + 123, + 97, + 79, + 240, + 0, + 3, + 0, + 35, + 251, + 115, + 7, + 241, + 14, + 3, + 25, + 70, + 120, + 104, + 255, + 247, + 252, + 237, + 56, + 97, + 59, + 105, + 0, + 43, + 24, + 208, + 255, + 247, + 234, + 237, + 3, + 70, + 27, + 104, + 24, + 70, + 255, + 247, + 246, + 237, + 4, + 70, + 255, + 247, + 226, + 237, + 3, + 70, + 27, + 104, + 26, + 70, + 33, + 70, + 24, + 75, + 123, + 68, + 24, + 70, + 255, + 247, + 240, + 237, + 22, + 75, + 123, + 68, + 26, + 70, + 5, + 35, + 19, + 96, + 18, + 224, + 59, + 104, + 26, + 120, + 187, + 123, + 154, + 66, + 4, + 208, + 187, + 123, + 0, + 43, + 1, + 209, + 1, + 35, + 0, + 224, + 0, + 35, + 251, + 115, + 251, + 123, + 3, + 240, + 1, + 3, + 251, + 115, + 186, + 123, + 59, + 104, + 26, + 112, + 251, + 123, + 10, + 73, + 121, + 68, + 6, + 74, + 138, + 88, + 17, + 104, + 122, + 105, + 81, + 64, + 1, + 208, + 255, + 247, + 216, + 237, + 24, + 70, + 28, + 55, + 189, + 70, + 144, + 189, + 48, + 19, + 1, + 0, + 136, + 0, + 0, + 0, + 136, + 9, + 0, + 0, + 190, + 19, + 1, + 0, + 174, + 18, + 1, + 0, + 144, + 181, + 131, + 176, + 0, + 175, + 35, + 74, + 122, + 68, + 35, + 75, + 211, + 88, + 27, + 104, + 123, + 96, + 79, + 240, + 0, + 3, + 0, + 35, + 251, + 112, + 251, + 28, + 24, + 70, + 255, + 247, + 108, + 237, + 3, + 70, + 179, + 241, + 255, + 63, + 25, + 209, + 255, + 247, + 144, + 237, + 3, + 70, + 28, + 104, + 255, + 247, + 140, + 237, + 3, + 70, + 27, + 104, + 24, + 70, + 255, + 247, + 152, + 237, + 3, + 70, + 26, + 70, + 33, + 70, + 21, + 75, + 123, + 68, + 24, + 70, + 255, + 247, + 150, + 237, + 19, + 75, + 123, + 68, + 26, + 70, + 17, + 35, + 19, + 96, + 0, + 35, + 11, + 224, + 251, + 120, + 131, + 240, + 1, + 3, + 219, + 178, + 0, + 43, + 4, + 208, + 14, + 75, + 123, + 68, + 24, + 70, + 255, + 247, + 132, + 237, + 251, + 120, + 12, + 73, + 121, + 68, + 7, + 74, + 138, + 88, + 17, + 104, + 122, + 104, + 81, + 64, + 1, + 208, + 255, + 247, + 134, + 237, + 24, + 70, + 12, + 55, + 189, + 70, + 144, + 189, + 0, + 191, + 120, + 18, + 1, + 0, + 136, + 0, + 0, + 0, + 4, + 9, + 0, + 0, + 10, + 19, + 1, + 0, + 16, + 9, + 0, + 0, + 8, + 18, + 1, + 0, + 128, + 181, + 132, + 176, + 0, + 175, + 120, + 96, + 120, + 104, + 0, + 240, + 185, + 251, + 3, + 70, + 0, + 43, + 5, + 208, + 11, + 75, + 123, + 68, + 26, + 70, + 18, + 35, + 19, + 96, + 14, + 224, + 255, + 247, + 152, + 255, + 3, + 70, + 251, + 115, + 251, + 123, + 0, + 43, + 7, + 208, + 120, + 104, + 0, + 240, + 240, + 251, + 4, + 75, + 123, + 68, + 24, + 70, + 255, + 247, + 74, + 237, + 16, + 55, + 189, + 70, + 128, + 189, + 154, + 18, + 1, + 0, + 226, + 8, + 0, + 0, + 144, + 181, + 173, + 176, + 0, + 175, + 151, + 74, + 122, + 68, + 151, + 75, + 211, + 88, + 27, + 104, + 199, + 248, + 172, + 48, + 79, + 240, + 0, + 3, + 7, + 241, + 32, + 3, + 140, + 34, + 0, + 33, + 24, + 70, + 255, + 247, + 184, + 236, + 145, + 75, + 123, + 68, + 59, + 98, + 7, + 241, + 32, + 3, + 0, + 34, + 25, + 70, + 15, + 32, + 255, + 247, + 44, + 237, + 255, + 247, + 238, + 236, + 3, + 70, + 139, + 74, + 122, + 68, + 19, + 96, + 139, + 75, + 123, + 68, + 27, + 104, + 0, + 43, + 6, + 209, + 137, + 75, + 123, + 68, + 24, + 70, + 255, + 247, + 22, + 237, + 9, + 35, + 243, + 224, + 135, + 75, + 123, + 68, + 24, + 70, + 255, + 247, + 14, + 237, + 12, + 32, + 255, + 247, + 166, + 236, + 3, + 70, + 131, + 74, + 122, + 68, + 19, + 96, + 131, + 75, + 123, + 68, + 27, + 104, + 179, + 241, + 255, + 63, + 20, + 209, + 255, + 247, + 232, + 236, + 3, + 70, + 27, + 104, + 24, + 70, + 255, + 247, + 244, + 236, + 4, + 70, + 255, + 247, + 224, + 236, + 3, + 70, + 27, + 104, + 26, + 70, + 33, + 70, + 122, + 75, + 123, + 68, + 24, + 70, + 255, + 247, + 238, + 236, + 10, + 35, + 204, + 224, + 119, + 75, + 123, + 68, + 24, + 70, + 255, + 247, + 232, + 236, + 13, + 32, + 255, + 247, + 126, + 236, + 3, + 70, + 116, + 74, + 122, + 68, + 19, + 96, + 115, + 75, + 123, + 68, + 27, + 104, + 179, + 241, + 255, + 63, + 20, + 209, + 255, + 247, + 192, + 236, + 3, + 70, + 27, + 104, + 24, + 70, + 255, + 247, + 206, + 236, + 4, + 70, + 255, + 247, + 184, + 236, + 3, + 70, + 27, + 104, + 26, + 70, + 33, + 70, + 106, + 75, + 123, + 68, + 24, + 70, + 255, + 247, + 200, + 236, + 11, + 35, + 165, + 224, + 59, + 70, + 192, + 239, + 80, + 0, + 67, + 249, + 31, + 10, + 68, + 242, + 64, + 35, + 192, + 242, + 15, + 3, + 187, + 96, + 99, + 75, + 123, + 68, + 27, + 104, + 58, + 70, + 98, + 73, + 121, + 68, + 24, + 70, + 0, + 240, + 94, + 250, + 3, + 70, + 96, + 74, + 122, + 68, + 19, + 96, + 95, + 75, + 123, + 68, + 27, + 104, + 0, + 43, + 1, + 209, + 12, + 35, + 135, + 224, + 93, + 75, + 123, + 68, + 24, + 70, + 255, + 247, + 162, + 236, + 1, + 34, + 0, + 33, + 17, + 32, + 255, + 247, + 68, + 236, + 3, + 70, + 88, + 74, + 122, + 68, + 19, + 96, + 88, + 75, + 123, + 68, + 27, + 104, + 179, + 241, + 255, + 63, + 20, + 209, + 255, + 247, + 122, + 236, + 3, + 70, + 27, + 104, + 24, + 70, + 255, + 247, + 134, + 236, + 4, + 70, + 255, + 247, + 114, + 236, + 3, + 70, + 27, + 104, + 26, + 70, + 33, + 70, + 79, + 75, + 123, + 68, + 24, + 70, + 255, + 247, + 128, + 236, + 13, + 35, + 94, + 224, + 7, + 241, + 16, + 3, + 192, + 239, + 80, + 0, + 67, + 249, + 31, + 10, + 79, + 244, + 202, + 67, + 193, + 246, + 205, + 83, + 187, + 97, + 71, + 75, + 123, + 68, + 27, + 104, + 7, + 241, + 16, + 2, + 69, + 73, + 121, + 68, + 24, + 70, + 0, + 240, + 21, + 250, + 3, + 70, + 67, + 74, + 122, + 68, + 19, + 96, + 67, + 75, + 123, + 68, + 27, + 104, + 0, + 43, + 1, + 209, + 14, + 35, + 62, + 224, + 64, + 75, + 123, + 68, + 24, + 70, + 255, + 247, + 90, + 236, + 1, + 34, + 0, + 33, + 16, + 32, + 255, + 247, + 250, + 235, + 3, + 70, + 60, + 74, + 122, + 68, + 19, + 96, + 59, + 75, + 123, + 68, + 27, + 104, + 179, + 241, + 255, + 63, + 20, + 209, + 255, + 247, + 48, + 236, + 3, + 70, + 27, + 104, + 24, + 70, + 255, + 247, + 62, + 236, + 4, + 70, + 255, + 247, + 40, + 236, + 3, + 70, + 27, + 104, + 26, + 70, + 33, + 70, + 50, + 75, + 123, + 68, + 24, + 70, + 255, + 247, + 56, + 236, + 15, + 35, + 21, + 224, + 48, + 75, + 123, + 68, + 27, + 104, + 47, + 74, + 122, + 68, + 47, + 73, + 121, + 68, + 24, + 70, + 0, + 240, + 215, + 249, + 3, + 70, + 45, + 74, + 122, + 68, + 19, + 96, + 45, + 75, + 123, + 68, + 27, + 104, + 0, + 43, + 1, + 209, + 19, + 35, + 0, + 224, + 0, + 35, + 42, + 73, + 121, + 68, + 7, + 74, + 138, + 88, + 17, + 104, + 215, + 248, + 172, + 32, + 81, + 64, + 1, + 208, + 255, + 247, + 32, + 236, + 24, + 70, + 180, + 55, + 189, + 70, + 144, + 189, + 128, + 17, + 1, + 0, + 136, + 0, + 0, + 0, + 193, + 251, + 255, + 255, + 18, + 18, + 1, + 0, + 12, + 18, + 1, + 0, + 146, + 8, + 0, + 0, + 164, + 8, + 0, + 0, + 178, + 17, + 1, + 0, + 172, + 17, + 1, + 0, + 136, + 8, + 0, + 0, + 174, + 8, + 0, + 0, + 104, + 17, + 1, + 0, + 98, + 17, + 1, + 0, + 146, + 8, + 0, + 0, + 68, + 17, + 1, + 0, + 185, + 251, + 255, + 255, + 52, + 17, + 1, + 0, + 46, + 17, + 1, + 0, + 124, + 8, + 0, + 0, + 222, + 16, + 1, + 0, + 216, + 16, + 1, + 0, + 96, + 8, + 0, + 0, + 180, + 16, + 1, + 0, + 99, + 250, + 255, + 255, + 166, + 16, + 1, + 0, + 160, + 16, + 1, + 0, + 78, + 8, + 0, + 0, + 80, + 16, + 1, + 0, + 74, + 16, + 1, + 0, + 50, + 8, + 0, + 0, + 56, + 16, + 1, + 0, + 54, + 9, + 0, + 0, + 139, + 253, + 255, + 255, + 46, + 16, + 1, + 0, + 40, + 16, + 1, + 0, + 64, + 15, + 1, + 0, + 144, + 181, + 133, + 176, + 0, + 175, + 120, + 96, + 57, + 96, + 123, + 104, + 0, + 43, + 24, + 219, + 120, + 104, + 255, + 247, + 130, + 235, + 248, + 96, + 251, + 104, + 0, + 43, + 17, + 208, + 255, + 247, + 160, + 235, + 3, + 70, + 27, + 104, + 24, + 70, + 255, + 247, + 172, + 235, + 4, + 70, + 255, + 247, + 152, + 235, + 3, + 70, + 27, + 104, + 34, + 70, + 57, + 104, + 4, + 72, + 120, + 68, + 255, + 247, + 168, + 235, + 0, + 191, + 20, + 55, + 189, + 70, + 144, + 189, + 0, + 191, + 76, + 7, + 0, + 0, + 128, + 181, + 0, + 175, + 43, + 75, + 123, + 68, + 27, + 104, + 179, + 241, + 255, + 63, + 6, + 208, + 41, + 75, + 123, + 68, + 27, + 104, + 1, + 33, + 24, + 70, + 255, + 247, + 68, + 235, + 39, + 75, + 123, + 68, + 27, + 104, + 179, + 241, + 255, + 63, + 6, + 208, + 37, + 75, + 123, + 68, + 27, + 104, + 1, + 33, + 24, + 70, + 255, + 247, + 54, + 235, + 34, + 75, + 123, + 68, + 27, + 104, + 24, + 70, + 0, + 240, + 180, + 249, + 32, + 75, + 123, + 68, + 27, + 104, + 24, + 70, + 0, + 240, + 174, + 249, + 30, + 75, + 123, + 68, + 27, + 104, + 24, + 70, + 255, + 247, + 6, + 235, + 28, + 75, + 123, + 68, + 24, + 70, + 255, + 247, + 110, + 235, + 27, + 75, + 123, + 68, + 27, + 104, + 26, + 74, + 122, + 68, + 17, + 70, + 24, + 70, + 255, + 247, + 156, + 255, + 24, + 75, + 123, + 68, + 27, + 104, + 24, + 74, + 122, + 68, + 17, + 70, + 24, + 70, + 255, + 247, + 147, + 255, + 22, + 75, + 123, + 68, + 27, + 104, + 21, + 74, + 122, + 68, + 17, + 70, + 24, + 70, + 255, + 247, + 138, + 255, + 19, + 75, + 123, + 68, + 27, + 104, + 19, + 74, + 122, + 68, + 17, + 70, + 24, + 70, + 255, + 247, + 129, + 255, + 0, + 191, + 128, + 189, + 0, + 191, + 226, + 14, + 1, + 0, + 214, + 14, + 1, + 0, + 204, + 14, + 1, + 0, + 192, + 14, + 1, + 0, + 218, + 14, + 1, + 0, + 210, + 14, + 1, + 0, + 190, + 14, + 1, + 0, + 2, + 7, + 0, + 0, + 128, + 14, + 1, + 0, + 14, + 7, + 0, + 0, + 114, + 14, + 1, + 0, + 16, + 7, + 0, + 0, + 84, + 14, + 1, + 0, + 22, + 7, + 0, + 0, + 70, + 14, + 1, + 0, + 24, + 7, + 0, + 0, + 128, + 181, + 132, + 176, + 0, + 175, + 120, + 96, + 57, + 96, + 33, + 75, + 123, + 68, + 24, + 70, + 255, + 247, + 28, + 235, + 255, + 247, + 216, + 253, + 3, + 70, + 26, + 70, + 29, + 75, + 123, + 68, + 26, + 96, + 24, + 224, + 28, + 75, + 123, + 68, + 27, + 104, + 1, + 34, + 79, + 240, + 255, + 49, + 24, + 70, + 255, + 247, + 232, + 234, + 248, + 96, + 251, + 104, + 179, + 241, + 255, + 63, + 10, + 209, + 255, + 247, + 236, + 234, + 3, + 70, + 27, + 104, + 4, + 43, + 4, + 208, + 19, + 75, + 123, + 68, + 26, + 70, + 16, + 35, + 19, + 96, + 18, + 75, + 123, + 68, + 27, + 104, + 0, + 43, + 225, + 208, + 16, + 75, + 123, + 68, + 27, + 104, + 7, + 43, + 4, + 209, + 15, + 75, + 123, + 68, + 26, + 70, + 0, + 35, + 19, + 96, + 255, + 247, + 74, + 255, + 12, + 75, + 123, + 68, + 24, + 70, + 255, + 247, + 230, + 234, + 11, + 75, + 123, + 68, + 27, + 104, + 24, + 70, + 16, + 55, + 189, + 70, + 128, + 189, + 208, + 6, + 0, + 0, + 14, + 14, + 1, + 0, + 246, + 13, + 1, + 0, + 222, + 13, + 1, + 0, + 212, + 13, + 1, + 0, + 202, + 13, + 1, + 0, + 192, + 13, + 1, + 0, + 138, + 6, + 0, + 0, + 168, + 13, + 1, + 0, + 144, + 181, + 143, + 176, + 0, + 175, + 248, + 96, + 185, + 96, + 122, + 96, + 43, + 74, + 122, + 68, + 43, + 75, + 211, + 88, + 27, + 104, + 123, + 99, + 79, + 240, + 0, + 3, + 123, + 104, + 0, + 43, + 6, + 208, + 123, + 104, + 7, + 241, + 16, + 4, + 15, + 203, + 132, + 232, + 15, + 0, + 5, + 224, + 7, + 241, + 16, + 3, + 192, + 239, + 80, + 0, + 67, + 249, + 31, + 10, + 187, + 104, + 0, + 43, + 6, + 208, + 187, + 104, + 7, + 241, + 32, + 4, + 15, + 203, + 132, + 232, + 15, + 0, + 5, + 224, + 7, + 241, + 32, + 3, + 192, + 239, + 80, + 0, + 67, + 249, + 31, + 10, + 7, + 241, + 16, + 2, + 0, + 35, + 0, + 33, + 248, + 104, + 255, + 247, + 122, + 234, + 3, + 70, + 179, + 241, + 255, + 63, + 21, + 209, + 255, + 247, + 122, + 234, + 3, + 70, + 27, + 104, + 24, + 70, + 255, + 247, + 134, + 234, + 4, + 70, + 255, + 247, + 114, + 234, + 3, + 70, + 27, + 104, + 26, + 70, + 33, + 70, + 13, + 75, + 123, + 68, + 24, + 70, + 255, + 247, + 128, + 234, + 79, + 240, + 255, + 51, + 0, + 224, + 0, + 35, + 9, + 73, + 121, + 68, + 6, + 74, + 138, + 88, + 17, + 104, + 122, + 107, + 81, + 64, + 1, + 208, + 255, + 247, + 126, + 234, + 24, + 70, + 60, + 55, + 189, + 70, + 144, + 189, + 142, + 12, + 1, + 0, + 136, + 0, + 0, + 0, + 236, + 5, + 0, + 0, + 250, + 11, + 1, + 0, + 128, + 181, + 134, + 176, + 0, + 175, + 248, + 96, + 185, + 96, + 122, + 96, + 59, + 96, + 59, + 104, + 123, + 97, + 123, + 105, + 91, + 104, + 120, + 105, + 152, + 71, + 0, + 191, + 24, + 55, + 189, + 70, + 128, + 189, + 0, + 0, + 144, + 181, + 137, + 176, + 2, + 175, + 248, + 96, + 185, + 96, + 122, + 96, + 187, + 104, + 0, + 43, + 6, + 209, + 255, + 247, + 50, + 234, + 3, + 70, + 22, + 34, + 26, + 96, + 0, + 35, + 110, + 224, + 16, + 32, + 255, + 247, + 208, + 233, + 3, + 70, + 123, + 97, + 123, + 105, + 0, + 43, + 1, + 209, + 0, + 35, + 100, + 224, + 123, + 105, + 250, + 104, + 26, + 96, + 123, + 105, + 186, + 104, + 90, + 96, + 123, + 105, + 79, + 240, + 255, + 50, + 154, + 96, + 123, + 105, + 0, + 34, + 218, + 96, + 79, + 244, + 0, + 97, + 1, + 32, + 255, + 247, + 164, + 233, + 2, + 70, + 123, + 105, + 154, + 96, + 123, + 105, + 155, + 104, + 179, + 241, + 255, + 63, + 19, + 209, + 255, + 247, + 6, + 234, + 3, + 70, + 27, + 104, + 24, + 70, + 255, + 247, + 20, + 234, + 4, + 70, + 255, + 247, + 254, + 233, + 3, + 70, + 27, + 104, + 26, + 70, + 33, + 70, + 32, + 75, + 123, + 68, + 24, + 70, + 255, + 247, + 14, + 234, + 50, + 224, + 123, + 105, + 155, + 104, + 122, + 104, + 121, + 104, + 24, + 70, + 255, + 247, + 57, + 255, + 3, + 70, + 179, + 241, + 255, + 63, + 38, + 208, + 123, + 105, + 153, + 104, + 123, + 105, + 0, + 147, + 23, + 75, + 123, + 68, + 1, + 34, + 248, + 104, + 255, + 247, + 206, + 233, + 2, + 70, + 123, + 105, + 218, + 96, + 123, + 105, + 219, + 104, + 0, + 43, + 19, + 209, + 255, + 247, + 214, + 233, + 3, + 70, + 27, + 104, + 24, + 70, + 255, + 247, + 228, + 233, + 4, + 70, + 255, + 247, + 206, + 233, + 3, + 70, + 27, + 104, + 26, + 70, + 33, + 70, + 10, + 75, + 123, + 68, + 24, + 70, + 255, + 247, + 222, + 233, + 2, + 224, + 123, + 105, + 4, + 224, + 0, + 191, + 120, + 105, + 0, + 240, + 12, + 248, + 0, + 35, + 24, + 70, + 28, + 55, + 189, + 70, + 144, + 189, + 0, + 191, + 54, + 5, + 0, + 0, + 41, + 255, + 255, + 255, + 2, + 5, + 0, + 0, + 128, + 181, + 130, + 176, + 0, + 175, + 120, + 96, + 123, + 104, + 0, + 43, + 21, + 208, + 123, + 104, + 26, + 104, + 123, + 104, + 219, + 104, + 25, + 70, + 16, + 70, + 255, + 247, + 50, + 233, + 123, + 104, + 155, + 104, + 179, + 241, + 255, + 63, + 4, + 208, + 123, + 104, + 155, + 104, + 24, + 70, + 255, + 247, + 118, + 233, + 120, + 104, + 255, + 247, + 156, + 233, + 0, + 224, + 0, + 191, + 8, + 55, + 189, + 70, + 128, + 189, + 0, + 0, + 144, + 181, + 135, + 176, + 0, + 175, + 120, + 96, + 30, + 74, + 122, + 68, + 30, + 75, + 211, + 88, + 27, + 104, + 123, + 97, + 79, + 240, + 0, + 3, + 192, + 239, + 16, + 0, + 199, + 237, + 2, + 11, + 123, + 104, + 155, + 104, + 7, + 241, + 8, + 1, + 8, + 34, + 24, + 70, + 255, + 247, + 96, + 233, + 3, + 70, + 179, + 241, + 255, + 63, + 21, + 209, + 255, + 247, + 114, + 233, + 3, + 70, + 27, + 104, + 24, + 70, + 255, + 247, + 128, + 233, + 4, + 70, + 255, + 247, + 106, + 233, + 3, + 70, + 27, + 104, + 26, + 70, + 33, + 70, + 13, + 75, + 123, + 68, + 24, + 70, + 255, + 247, + 122, + 233, + 79, + 240, + 255, + 51, + 0, + 224, + 0, + 35, + 10, + 73, + 121, + 68, + 7, + 74, + 138, + 88, + 17, + 104, + 122, + 105, + 81, + 64, + 1, + 208, + 255, + 247, + 120, + 233, + 24, + 70, + 28, + 55, + 189, + 70, + 144, + 189, + 0, + 191, + 74, + 10, + 1, + 0, + 136, + 0, + 0, + 0, + 110, + 4, + 0, + 0, + 236, + 9, + 1, + 0, + 128, + 181, + 130, + 176, + 0, + 175, + 120, + 96, + 123, + 104, + 155, + 104, + 0, + 34, + 0, + 33, + 24, + 70, + 255, + 247, + 135, + 254, + 3, + 70, + 24, + 70, + 8, + 55, + 189, + 70, + 128, + 189, + 1, + 181, + 189, + 232, + 1, + 64, + 112, + 71, + 0, + 0, + 0, + 0, + 69, + 82, + 82, + 79, + 82, + 58, + 32, + 67, + 111, + 117, + 108, + 100, + 32, + 110, + 111, + 116, + 32, + 115, + 101, + 116, + 32, + 76, + 69, + 68, + 32, + 111, + 117, + 116, + 112, + 117, + 116, + 32, + 118, + 97, + 108, + 117, + 101, + 58, + 32, + 37, + 115, + 32, + 40, + 37, + 100, + 41, + 46, + 10, + 0, + 0, + 0, + 0, + 69, + 82, + 82, + 79, + 82, + 58, + 32, + 67, + 111, + 117, + 108, + 100, + 32, + 110, + 111, + 116, + 32, + 114, + 101, + 97, + 100, + 32, + 98, + 117, + 116, + 116, + 111, + 110, + 32, + 71, + 80, + 73, + 79, + 58, + 32, + 37, + 115, + 32, + 40, + 37, + 100, + 41, + 46, + 10, + 0, + 0, + 0, + 0, + 69, + 82, + 82, + 79, + 82, + 58, + 32, + 78, + 101, + 116, + 119, + 111, + 114, + 107, + 105, + 110, + 103, + 95, + 73, + 115, + 78, + 101, + 116, + 119, + 111, + 114, + 107, + 105, + 110, + 103, + 82, + 101, + 97, + 100, + 121, + 58, + 32, + 37, + 100, + 32, + 40, + 37, + 115, + 41, + 10, + 0, + 0, + 0, + 69, + 114, + 114, + 111, + 114, + 58, + 32, + 77, + 97, + 107, + 101, + 32, + 115, + 117, + 114, + 101, + 32, + 116, + 104, + 97, + 116, + 32, + 110, + 101, + 116, + 119, + 111, + 114, + 107, + 32, + 105, + 115, + 32, + 114, + 101, + 97, + 100, + 121, + 32, + 98, + 101, + 102, + 111, + 114, + 101, + 32, + 115, + 116, + 97, + 114, + 116, + 105, + 110, + 103, + 32, + 116, + 104, + 101, + 32, + 116, + 117, + 116, + 111, + 114, + 105, + 97, + 108, + 46, + 10, + 0, + 0, + 0, + 73, + 78, + 70, + 79, + 58, + 32, + 78, + 101, + 116, + 119, + 111, + 114, + 107, + 32, + 105, + 115, + 32, + 114, + 101, + 97, + 100, + 121, + 10, + 0, + 67, + 111, + 117, + 108, + 100, + 32, + 110, + 111, + 116, + 32, + 99, + 114, + 101, + 97, + 116, + 101, + 32, + 101, + 118, + 101, + 110, + 116, + 32, + 108, + 111, + 111, + 112, + 46, + 10, + 0, + 0, + 0, + 79, + 112, + 101, + 110, + 105, + 110, + 103, + 32, + 83, + 65, + 77, + 80, + 76, + 69, + 95, + 66, + 85, + 84, + 84, + 79, + 78, + 95, + 49, + 32, + 97, + 115, + 32, + 105, + 110, + 112, + 117, + 116, + 46, + 10, + 0, + 0, + 69, + 82, + 82, + 79, + 82, + 58, + 32, + 67, + 111, + 117, + 108, + 100, + 32, + 110, + 111, + 116, + 32, + 111, + 112, + 101, + 110, + 32, + 83, + 65, + 77, + 80, + 76, + 69, + 95, + 66, + 85, + 84, + 84, + 79, + 78, + 95, + 49, + 58, + 32, + 37, + 115, + 32, + 40, + 37, + 100, + 41, + 46, + 10, + 0, + 0, + 0, + 0, + 79, + 112, + 101, + 110, + 105, + 110, + 103, + 32, + 83, + 65, + 77, + 80, + 76, + 69, + 95, + 66, + 85, + 84, + 84, + 79, + 78, + 95, + 50, + 32, + 97, + 115, + 32, + 105, + 110, + 112, + 117, + 116, + 46, + 10, + 0, + 0, + 69, + 82, + 82, + 79, + 82, + 58, + 32, + 67, + 111, + 117, + 108, + 100, + 32, + 110, + 111, + 116, + 32, + 111, + 112, + 101, + 110, + 32, + 83, + 65, + 77, + 80, + 76, + 69, + 95, + 66, + 85, + 84, + 84, + 79, + 78, + 95, + 50, + 58, + 32, + 37, + 115, + 32, + 40, + 37, + 100, + 41, + 46, + 10, + 0, + 0, + 0, + 0, + 79, + 112, + 101, + 110, + 105, + 110, + 103, + 32, + 83, + 65, + 77, + 80, + 76, + 69, + 95, + 82, + 71, + 66, + 76, + 69, + 68, + 95, + 66, + 76, + 85, + 69, + 32, + 97, + 115, + 32, + 111, + 117, + 116, + 112, + 117, + 116, + 46, + 10, + 0, + 0, + 69, + 82, + 82, + 79, + 82, + 58, + 32, + 67, + 111, + 117, + 108, + 100, + 32, + 110, + 111, + 116, + 32, + 111, + 112, + 101, + 110, + 32, + 83, + 65, + 77, + 80, + 76, + 69, + 95, + 82, + 71, + 66, + 76, + 69, + 68, + 95, + 66, + 76, + 85, + 69, + 32, + 71, + 80, + 73, + 79, + 58, + 32, + 37, + 115, + 32, + 40, + 37, + 100, + 41, + 46, + 10, + 0, + 0, + 0, + 0, + 79, + 112, + 101, + 110, + 105, + 110, + 103, + 32, + 83, + 65, + 77, + 80, + 76, + 69, + 95, + 82, + 71, + 66, + 76, + 69, + 68, + 95, + 71, + 82, + 69, + 69, + 78, + 32, + 97, + 115, + 32, + 111, + 117, + 116, + 112, + 117, + 116, + 46, + 10, + 0, + 69, + 82, + 82, + 79, + 82, + 58, + 32, + 67, + 111, + 117, + 108, + 100, + 32, + 110, + 111, + 116, + 32, + 111, + 112, + 101, + 110, + 32, + 83, + 65, + 77, + 80, + 76, + 69, + 95, + 82, + 71, + 66, + 76, + 69, + 68, + 95, + 71, + 82, + 69, + 69, + 78, + 32, + 71, + 80, + 73, + 79, + 58, + 32, + 37, + 115, + 32, + 40, + 37, + 100, + 41, + 46, + 10, + 0, + 0, + 0, + 69, + 82, + 82, + 79, + 82, + 58, + 32, + 67, + 111, + 117, + 108, + 100, + 32, + 110, + 111, + 116, + 32, + 99, + 108, + 111, + 115, + 101, + 32, + 102, + 100, + 32, + 37, + 115, + 58, + 32, + 37, + 115, + 32, + 40, + 37, + 100, + 41, + 46, + 10, + 0, + 67, + 108, + 111, + 115, + 105, + 110, + 103, + 32, + 102, + 105, + 108, + 101, + 32, + 100, + 101, + 115, + 99, + 114, + 105, + 112, + 116, + 111, + 114, + 115, + 46, + 10, + 0, + 0, + 66, + 108, + 105, + 110, + 107, + 105, + 110, + 103, + 76, + 101, + 100, + 66, + 108, + 117, + 101, + 71, + 112, + 105, + 111, + 0, + 66, + 108, + 105, + 110, + 107, + 105, + 110, + 103, + 76, + 101, + 100, + 71, + 114, + 101, + 101, + 110, + 71, + 112, + 105, + 111, + 0, + 0, + 0, + 0, + 76, + 101, + 100, + 66, + 108, + 105, + 110, + 107, + 66, + 117, + 116, + 116, + 111, + 110, + 49, + 71, + 112, + 105, + 111, + 0, + 76, + 101, + 100, + 66, + 108, + 105, + 110, + 107, + 66, + 117, + 116, + 116, + 111, + 110, + 50, + 71, + 112, + 105, + 111, + 0, + 69, + 114, + 114, + 111, + 114, + 32, + 82, + 101, + 112, + 111, + 114, + 116, + 105, + 110, + 103, + 32, + 97, + 112, + 112, + 108, + 105, + 99, + 97, + 116, + 105, + 111, + 110, + 32, + 115, + 116, + 97, + 114, + 116, + 105, + 110, + 103, + 46, + 10, + 0, + 0, + 65, + 112, + 112, + 108, + 105, + 99, + 97, + 116, + 105, + 111, + 110, + 32, + 101, + 120, + 105, + 116, + 105, + 110, + 103, + 46, + 10, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 69, + 82, + 82, + 79, + 82, + 58, + 32, + 67, + 111, + 117, + 108, + 100, + 32, + 110, + 111, + 116, + 32, + 115, + 101, + 116, + 32, + 116, + 105, + 109, + 101, + 114, + 32, + 112, + 101, + 114, + 105, + 111, + 100, + 58, + 32, + 37, + 115, + 32, + 40, + 37, + 100, + 41, + 46, + 10, + 0, + 0, + 0, + 0, + 69, + 82, + 82, + 79, + 82, + 58, + 32, + 85, + 110, + 97, + 98, + 108, + 101, + 32, + 116, + 111, + 32, + 99, + 114, + 101, + 97, + 116, + 101, + 32, + 116, + 105, + 109, + 101, + 114, + 58, + 32, + 37, + 115, + 32, + 40, + 37, + 100, + 41, + 46, + 10, + 0, + 0, + 0, + 0, + 69, + 82, + 82, + 79, + 82, + 58, + 32, + 85, + 110, + 97, + 98, + 108, + 101, + 32, + 116, + 111, + 32, + 114, + 101, + 103, + 105, + 115, + 116, + 101, + 114, + 32, + 116, + 105, + 109, + 101, + 114, + 32, + 101, + 118, + 101, + 110, + 116, + 58, + 32, + 37, + 115, + 32, + 40, + 37, + 100, + 41, + 46, + 10, + 0, + 0, + 0, + 0, + 69, + 82, + 82, + 79, + 82, + 58, + 32, + 67, + 111, + 117, + 108, + 100, + 32, + 110, + 111, + 116, + 32, + 114, + 101, + 97, + 100, + 32, + 116, + 105, + 109, + 101, + 114, + 102, + 100, + 32, + 37, + 115, + 32, + 40, + 37, + 100, + 41, + 46, + 10, + 0, + 8, + 177, + 1, + 129, + 176, + 176, + 0, + 132, + 0, + 0, + 0, + 0, + 148, + 238, + 255, + 127, + 0, + 132, + 4, + 128, + 204, + 238, + 255, + 127, + 176, + 176, + 176, + 128, + 36, + 239, + 255, + 127, + 176, + 176, + 168, + 128, + 116, + 239, + 255, + 127, + 216, + 255, + 255, + 127, + 156, + 239, + 255, + 127, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 49, + 10, + 0, + 0, + 217, + 9, + 0, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 245, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 160, + 1, + 0, + 0, + 12, + 0, + 0, + 0, + 201, + 7, + 0, + 0, + 13, + 0, + 0, + 0, + 93, + 22, + 0, + 0, + 25, + 0, + 0, + 0, + 248, + 30, + 1, + 0, + 27, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 26, + 0, + 0, + 0, + 252, + 30, + 1, + 0, + 28, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 245, + 254, + 255, + 111, + 144, + 1, + 0, + 0, + 5, + 0, + 0, + 0, + 244, + 3, + 0, + 0, + 6, + 0, + 0, + 0, + 180, + 1, + 0, + 0, + 10, + 0, + 0, + 0, + 57, + 2, + 0, + 0, + 11, + 0, + 0, + 0, + 16, + 0, + 0, + 0, + 21, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 0, + 32, + 1, + 0, + 2, + 0, + 0, + 0, + 208, + 0, + 0, + 0, + 20, + 0, + 0, + 0, + 17, + 0, + 0, + 0, + 23, + 0, + 0, + 0, + 248, + 6, + 0, + 0, + 17, + 0, + 0, + 0, + 152, + 6, + 0, + 0, + 18, + 0, + 0, + 0, + 96, + 0, + 0, + 0, + 19, + 0, + 0, + 0, + 8, + 0, + 0, + 0, + 251, + 255, + 255, + 111, + 0, + 0, + 0, + 8, + 254, + 255, + 255, + 111, + 120, + 6, + 0, + 0, + 255, + 255, + 255, + 111, + 1, + 0, + 0, + 0, + 240, + 255, + 255, + 111, + 46, + 6, + 0, + 0, + 250, + 255, + 255, + 111, + 6, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 31, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 208, + 7, + 0, + 0, + 208, + 7, + 0, + 0, + 208, + 7, + 0, + 0, + 208, + 7, + 0, + 0, + 208, + 7, + 0, + 0, + 208, + 7, + 0, + 0, + 208, + 7, + 0, + 0, + 208, + 7, + 0, + 0, + 208, + 7, + 0, + 0, + 208, + 7, + 0, + 0, + 208, + 7, + 0, + 0, + 208, + 7, + 0, + 0, + 208, + 7, + 0, + 0, + 208, + 7, + 0, + 0, + 208, + 7, + 0, + 0, + 208, + 7, + 0, + 0, + 208, + 7, + 0, + 0, + 208, + 7, + 0, + 0, + 208, + 7, + 0, + 0, + 208, + 7, + 0, + 0, + 208, + 7, + 0, + 0, + 208, + 7, + 0, + 0, + 208, + 7, + 0, + 0, + 208, + 7, + 0, + 0, + 208, + 7, + 0, + 0, + 208, + 7, + 0, + 0, + 173, + 18, + 0, + 0, + 93, + 22, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 201, + 7, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 152, + 32, + 1, + 0, + 255, + 255, + 255, + 255, + 255, + 255, + 255, + 255, + 255, + 255, + 255, + 255, + 255, + 255, + 255, + 255, + 1, + 1, + 1, + 1, + 71, + 67, + 67, + 58, + 32, + 40, + 71, + 78, + 85, + 41, + 32, + 57, + 46, + 51, + 46, + 48, + 0, + 65, + 58, + 0, + 0, + 0, + 97, + 101, + 97, + 98, + 105, + 0, + 1, + 48, + 0, + 0, + 0, + 5, + 55, + 86, + 69, + 0, + 6, + 10, + 7, + 65, + 8, + 1, + 9, + 2, + 10, + 5, + 12, + 2, + 18, + 4, + 19, + 1, + 20, + 1, + 21, + 1, + 23, + 3, + 24, + 1, + 26, + 2, + 28, + 1, + 30, + 4, + 34, + 1, + 42, + 1, + 44, + 2, + 68, + 3, + 0, + 46, + 115, + 104, + 115, + 116, + 114, + 116, + 97, + 98, + 0, + 46, + 105, + 110, + 116, + 101, + 114, + 112, + 0, + 46, + 110, + 111, + 116, + 101, + 46, + 103, + 110, + 117, + 46, + 98, + 117, + 105, + 108, + 100, + 45, + 105, + 100, + 0, + 46, + 103, + 110, + 117, + 46, + 104, + 97, + 115, + 104, + 0, + 46, + 100, + 121, + 110, + 115, + 121, + 109, + 0, + 46, + 100, + 121, + 110, + 115, + 116, + 114, + 0, + 46, + 103, + 110, + 117, + 46, + 118, + 101, + 114, + 115, + 105, + 111, + 110, + 0, + 46, + 103, + 110, + 117, + 46, + 118, + 101, + 114, + 115, + 105, + 111, + 110, + 95, + 114, + 0, + 46, + 114, + 101, + 108, + 46, + 100, + 121, + 110, + 0, + 46, + 114, + 101, + 108, + 46, + 112, + 108, + 116, + 0, + 46, + 105, + 110, + 105, + 116, + 0, + 46, + 116, + 101, + 120, + 116, + 0, + 46, + 102, + 105, + 110, + 105, + 0, + 46, + 114, + 111, + 100, + 97, + 116, + 97, + 0, + 46, + 65, + 82, + 77, + 46, + 101, + 120, + 116, + 97, + 98, + 0, + 46, + 65, + 82, + 77, + 46, + 101, + 120, + 105, + 100, + 120, + 0, + 46, + 101, + 104, + 95, + 102, + 114, + 97, + 109, + 101, + 0, + 46, + 105, + 110, + 105, + 116, + 95, + 97, + 114, + 114, + 97, + 121, + 0, + 46, + 102, + 105, + 110, + 105, + 95, + 97, + 114, + 114, + 97, + 121, + 0, + 46, + 100, + 121, + 110, + 97, + 109, + 105, + 99, + 0, + 46, + 103, + 111, + 116, + 0, + 46, + 100, + 97, + 116, + 97, + 0, + 46, + 98, + 115, + 115, + 0, + 46, + 99, + 111, + 109, + 109, + 101, + 110, + 116, + 0, + 46, + 65, + 82, + 77, + 46, + 97, + 116, + 116, + 114, + 105, + 98, + 117, + 116, + 101, + 115, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 11, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 84, + 1, + 0, + 0, + 84, + 1, + 0, + 0, + 24, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 19, + 0, + 0, + 0, + 7, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 108, + 1, + 0, + 0, + 108, + 1, + 0, + 0, + 36, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 38, + 0, + 0, + 0, + 246, + 255, + 255, + 111, + 2, + 0, + 0, + 0, + 144, + 1, + 0, + 0, + 144, + 1, + 0, + 0, + 36, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 48, + 0, + 0, + 0, + 11, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 180, + 1, + 0, + 0, + 180, + 1, + 0, + 0, + 64, + 2, + 0, + 0, + 5, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 16, + 0, + 0, + 0, + 56, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 244, + 3, + 0, + 0, + 244, + 3, + 0, + 0, + 57, + 2, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 64, + 0, + 0, + 0, + 255, + 255, + 255, + 111, + 2, + 0, + 0, + 0, + 46, + 6, + 0, + 0, + 46, + 6, + 0, + 0, + 72, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 77, + 0, + 0, + 0, + 254, + 255, + 255, + 111, + 2, + 0, + 0, + 0, + 120, + 6, + 0, + 0, + 120, + 6, + 0, + 0, + 32, + 0, + 0, + 0, + 5, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 92, + 0, + 0, + 0, + 9, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 152, + 6, + 0, + 0, + 152, + 6, + 0, + 0, + 96, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 8, + 0, + 0, + 0, + 101, + 0, + 0, + 0, + 9, + 0, + 0, + 0, + 66, + 0, + 0, + 0, + 248, + 6, + 0, + 0, + 248, + 6, + 0, + 0, + 208, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 21, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 8, + 0, + 0, + 0, + 110, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 6, + 0, + 0, + 0, + 200, + 7, + 0, + 0, + 200, + 7, + 0, + 0, + 8, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 105, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 6, + 0, + 0, + 0, + 208, + 7, + 0, + 0, + 208, + 7, + 0, + 0, + 76, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 116, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 6, + 0, + 0, + 0, + 28, + 9, + 0, + 0, + 28, + 9, + 0, + 0, + 64, + 13, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 122, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 6, + 0, + 0, + 0, + 92, + 22, + 0, + 0, + 92, + 22, + 0, + 0, + 8, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 128, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 104, + 22, + 0, + 0, + 104, + 22, + 0, + 0, + 48, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 8, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 136, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 152, + 26, + 0, + 0, + 152, + 26, + 0, + 0, + 12, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 147, + 0, + 0, + 0, + 1, + 0, + 0, + 112, + 130, + 0, + 0, + 0, + 164, + 26, + 0, + 0, + 164, + 26, + 0, + 0, + 40, + 0, + 0, + 0, + 12, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 158, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 204, + 26, + 0, + 0, + 204, + 26, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 168, + 0, + 0, + 0, + 14, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 248, + 30, + 1, + 0, + 248, + 30, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 180, + 0, + 0, + 0, + 15, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 252, + 30, + 1, + 0, + 252, + 30, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 192, + 0, + 0, + 0, + 6, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 0, + 31, + 1, + 0, + 0, + 31, + 0, + 0, + 0, + 1, + 0, + 0, + 5, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 8, + 0, + 0, + 0, + 201, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 0, + 32, + 1, + 0, + 0, + 32, + 0, + 0, + 152, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 206, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 152, + 32, + 1, + 0, + 152, + 32, + 0, + 0, + 24, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 212, + 0, + 0, + 0, + 8, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 176, + 32, + 1, + 0, + 176, + 32, + 0, + 0, + 48, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 217, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 48, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 176, + 32, + 0, + 0, + 17, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 226, + 0, + 0, + 0, + 3, + 0, + 0, + 112, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 193, + 32, + 0, + 0, + 59, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 252, + 32, + 0, + 0, + 242, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 52, + 88, + 52, + 77, + 5, + 0, + 0, + 0, + 73, + 68, + 36, + 0, + 10, + 0, + 0, + 0, + 255, + 39, + 10, + 166, + 54, + 137, + 73, + 74, + 183, + 63, + 112, + 134, + 29, + 176, + 61, + 67, + 42, + 173, + 208, + 209, + 84, + 80, + 136, + 76, + 137, + 124, + 54, + 250, + 1, + 104, + 77, + 208, + 83, + 71, + 24, + 0, + 168, + 213, + 204, + 105, + 88, + 244, + 135, + 16, + 20, + 13, + 122, + 38, + 22, + 15, + 193, + 207, + 195, + 31, + 93, + 240, + 1, + 0, + 0, + 0, + 68, + 66, + 40, + 0, + 255, + 252, + 129, + 98, + 0, + 0, + 0, + 0, + 69, + 114, + 114, + 111, + 114, + 82, + 101, + 112, + 111, + 114, + 116, + 105, + 110, + 103, + 83, + 116, + 97, + 103, + 101, + 49, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 84, + 80, + 4, + 0, + 2, + 0, + 0, + 0, + 78, + 68, + 12, + 0, + 1, + 0, + 0, + 0, + 13, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 148, + 0, + 0, + 0, + 147, + 19, + 94, + 99, + 83, + 217, + 25, + 155, + 66, + 124, + 195, + 98, + 201, + 37, + 109, + 15, + 123, + 77, + 253, + 109, + 168, + 215, + 37, + 73, + 107, + 42, + 228, + 173, + 248, + 38, + 136, + 180, + 155, + 25, + 124, + 121, + 168, + 145, + 115, + 64, + 214, + 210, + 74, + 134, + 128, + 98, + 38, + 105, + 82, + 188, + 30, + 232, + 176, + 69, + 124, + 98, + 162, + 120, + 62, + 214, + 227, + 238, + 195, + 228 + ], + "deviceID5": "F226406C4BC3C2B3703ABEA7476BC31388D6209BDD506871D9668688B8528E3DAF7318B60351B20243188BAAAEBFBE5B4F61C92AB2F1DBD648309B6C5E27BC86", + "imageID3": "a04f0a91-b369-4249-a47d-28c118e2cb3b", + "imageID4": "9c6b0d1a-3f78-4382-86dd-371aabc3e006", + "deviceID4": "5D257FBCF76A5853832122D9B0E2410DAA1438E3C1CDE005162A837A7535C08973CC819A50CF8EB724FFC88DADA06B40BEE6010E82A8F84D2FEF0FC263061D67", + "secondProduct": "Product2", + "imagecontext1": [ + 69, + 61, + 205, + 40, + 0, + 64, + 0, + 0, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 67, + 111, + 109, + 112, + 114, + 101, + 115, + 115, + 101, + 100, + 32, + 82, + 79, + 77, + 70, + 83, + 148, + 124, + 229, + 116, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 67, + 111, + 109, + 112, + 114, + 101, + 115, + 115, + 101, + 100, + 0, + 0, + 0, + 0, + 0, + 0, + 237, + 65, + 0, + 0, + 48, + 0, + 0, + 0, + 192, + 4, + 0, + 0, + 164, + 131, + 0, + 0, + 8, + 1, + 0, + 0, + 5, + 0, + 1, + 0, + 97, + 112, + 112, + 95, + 109, + 97, + 110, + 105, + 102, + 101, + 115, + 116, + 46, + 106, + 115, + 111, + 110, + 0, + 0, + 0, + 237, + 65, + 0, + 0, + 16, + 0, + 0, + 0, + 193, + 7, + 0, + 0, + 98, + 105, + 110, + 0, + 237, + 131, + 0, + 0, + 216, + 21, + 0, + 0, + 1, + 0, + 2, + 0, + 97, + 112, + 112, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 123, + 34, + 83, + 99, + 104, + 101, + 109, + 97, + 86, + 101, + 114, + 115, + 105, + 111, + 110, + 34, + 58, + 49, + 44, + 34, + 78, + 97, + 109, + 101, + 34, + 58, + 34, + 65, + 122, + 117, + 114, + 101, + 83, + 112, + 104, + 101, + 114, + 101, + 66, + 108, + 105, + 110, + 107, + 49, + 34, + 44, + 34, + 67, + 111, + 109, + 112, + 111, + 110, + 101, + 110, + 116, + 73, + 100, + 34, + 58, + 34, + 52, + 50, + 50, + 53, + 55, + 97, + 100, + 54, + 45, + 51, + 56, + 50, + 100, + 45, + 52, + 48, + 53, + 102, + 45, + 98, + 55, + 99, + 99, + 45, + 101, + 49, + 49, + 48, + 102, + 98, + 100, + 97, + 50, + 100, + 48, + 98, + 34, + 44, + 34, + 69, + 110, + 116, + 114, + 121, + 80, + 111, + 105, + 110, + 116, + 34, + 58, + 34, + 47, + 98, + 105, + 110, + 47, + 97, + 112, + 112, + 34, + 44, + 34, + 67, + 109, + 100, + 65, + 114, + 103, + 115, + 34, + 58, + 91, + 93, + 44, + 34, + 67, + 97, + 112, + 97, + 98, + 105, + 108, + 105, + 116, + 105, + 101, + 115, + 34, + 58, + 123, + 34, + 71, + 112, + 105, + 111, + 34, + 58, + 91, + 56, + 93, + 44, + 34, + 65, + 108, + 108, + 111, + 119, + 101, + 100, + 65, + 112, + 112, + 108, + 105, + 99, + 97, + 116, + 105, + 111, + 110, + 67, + 111, + 110, + 110, + 101, + 99, + 116, + 105, + 111, + 110, + 115, + 34, + 58, + 91, + 93, + 125, + 44, + 34, + 65, + 112, + 112, + 108, + 105, + 99, + 97, + 116, + 105, + 111, + 110, + 84, + 121, + 112, + 101, + 34, + 58, + 34, + 68, + 101, + 102, + 97, + 117, + 108, + 116, + 34, + 44, + 34, + 84, + 97, + 114, + 103, + 101, + 116, + 65, + 112, + 112, + 108, + 105, + 99, + 97, + 116, + 105, + 111, + 110, + 82, + 117, + 110, + 116, + 105, + 109, + 101, + 86, + 101, + 114, + 115, + 105, + 111, + 110, + 34, + 58, + 49, + 50, + 125, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 127, + 69, + 76, + 70, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 3, + 0, + 40, + 0, + 1, + 0, + 0, + 0, + 17, + 6, + 0, + 0, + 52, + 0, + 0, + 0, + 160, + 17, + 0, + 0, + 0, + 4, + 0, + 5, + 52, + 0, + 32, + 0, + 9, + 0, + 40, + 0, + 27, + 0, + 26, + 0, + 1, + 0, + 0, + 112, + 4, + 9, + 0, + 0, + 4, + 9, + 0, + 0, + 4, + 9, + 0, + 0, + 40, + 0, + 0, + 0, + 40, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 6, + 0, + 0, + 0, + 52, + 0, + 0, + 0, + 52, + 0, + 0, + 0, + 52, + 0, + 0, + 0, + 32, + 1, + 0, + 0, + 32, + 1, + 0, + 0, + 4, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 84, + 1, + 0, + 0, + 84, + 1, + 0, + 0, + 84, + 1, + 0, + 0, + 24, + 0, + 0, + 0, + 24, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 48, + 9, + 0, + 0, + 48, + 9, + 0, + 0, + 5, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 248, + 14, + 0, + 0, + 248, + 14, + 1, + 0, + 248, + 14, + 1, + 0, + 104, + 1, + 0, + 0, + 132, + 1, + 0, + 0, + 6, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 2, + 0, + 0, + 0, + 0, + 15, + 0, + 0, + 0, + 15, + 1, + 0, + 0, + 15, + 1, + 0, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 6, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 108, + 1, + 0, + 0, + 108, + 1, + 0, + 0, + 108, + 1, + 0, + 0, + 36, + 0, + 0, + 0, + 36, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 81, + 229, + 116, + 100, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 6, + 0, + 0, + 0, + 16, + 0, + 0, + 0, + 82, + 229, + 116, + 100, + 248, + 14, + 0, + 0, + 248, + 14, + 1, + 0, + 248, + 14, + 1, + 0, + 8, + 1, + 0, + 0, + 8, + 1, + 0, + 0, + 4, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 47, + 108, + 105, + 98, + 47, + 108, + 100, + 45, + 109, + 117, + 115, + 108, + 45, + 97, + 114, + 109, + 104, + 102, + 46, + 115, + 111, + 46, + 49, + 0, + 4, + 0, + 0, + 0, + 20, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 71, + 78, + 85, + 0, + 164, + 28, + 70, + 62, + 101, + 50, + 76, + 114, + 195, + 93, + 151, + 121, + 143, + 95, + 245, + 232, + 202, + 64, + 89, + 121, + 2, + 0, + 0, + 0, + 19, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 5, + 0, + 0, + 0, + 0, + 36, + 0, + 129, + 19, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 234, + 211, + 239, + 14, + 185, + 141, + 241, + 14, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 112, + 5, + 0, + 0, + 0, + 0, + 0, + 0, + 3, + 0, + 10, + 0, + 0, + 0, + 0, + 0, + 92, + 16, + 1, + 0, + 0, + 0, + 0, + 0, + 3, + 0, + 22, + 0, + 25, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 32, + 0, + 0, + 0, + 253, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 32, + 0, + 0, + 0, + 17, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 173, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 70, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 104, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 17, + 0, + 0, + 0, + 122, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 34, + 0, + 0, + 0, + 40, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 231, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 32, + 0, + 0, + 0, + 75, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 49, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 32, + 0, + 0, + 0, + 156, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 137, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 191, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 60, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 200, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 88, + 0, + 0, + 0, + 29, + 8, + 0, + 0, + 2, + 0, + 0, + 0, + 18, + 0, + 13, + 0, + 54, + 0, + 0, + 0, + 113, + 5, + 0, + 0, + 2, + 0, + 0, + 0, + 18, + 0, + 10, + 0, + 0, + 108, + 105, + 98, + 97, + 112, + 112, + 108, + 105, + 98, + 115, + 46, + 115, + 111, + 46, + 48, + 0, + 95, + 95, + 97, + 101, + 97, + 98, + 105, + 95, + 117, + 110, + 119, + 105, + 110, + 100, + 95, + 99, + 112, + 112, + 95, + 112, + 114, + 48, + 0, + 71, + 80, + 73, + 79, + 95, + 83, + 101, + 116, + 86, + 97, + 108, + 117, + 101, + 0, + 95, + 105, + 110, + 105, + 116, + 0, + 76, + 111, + 103, + 95, + 68, + 101, + 98, + 117, + 103, + 0, + 71, + 80, + 73, + 79, + 95, + 79, + 112, + 101, + 110, + 65, + 115, + 79, + 117, + 116, + 112, + 117, + 116, + 0, + 95, + 102, + 105, + 110, + 105, + 0, + 108, + 105, + 98, + 99, + 46, + 115, + 111, + 46, + 49, + 0, + 95, + 95, + 115, + 116, + 97, + 99, + 107, + 95, + 99, + 104, + 107, + 95, + 103, + 117, + 97, + 114, + 100, + 0, + 95, + 95, + 99, + 120, + 97, + 95, + 102, + 105, + 110, + 97, + 108, + 105, + 122, + 101, + 0, + 95, + 95, + 110, + 97, + 110, + 111, + 115, + 108, + 101, + 101, + 112, + 95, + 116, + 105, + 109, + 101, + 54, + 52, + 0, + 95, + 95, + 101, + 114, + 114, + 110, + 111, + 95, + 108, + 111, + 99, + 97, + 116, + 105, + 111, + 110, + 0, + 95, + 95, + 108, + 105, + 98, + 99, + 95, + 115, + 116, + 97, + 114, + 116, + 95, + 109, + 97, + 105, + 110, + 0, + 115, + 116, + 114, + 101, + 114, + 114, + 111, + 114, + 0, + 95, + 95, + 115, + 116, + 97, + 99, + 107, + 95, + 99, + 104, + 107, + 95, + 102, + 97, + 105, + 108, + 0, + 108, + 105, + 98, + 103, + 99, + 99, + 95, + 115, + 46, + 115, + 111, + 46, + 49, + 0, + 95, + 95, + 114, + 101, + 103, + 105, + 115, + 116, + 101, + 114, + 95, + 102, + 114, + 97, + 109, + 101, + 95, + 105, + 110, + 102, + 111, + 0, + 95, + 73, + 84, + 77, + 95, + 100, + 101, + 114, + 101, + 103, + 105, + 115, + 116, + 101, + 114, + 84, + 77, + 67, + 108, + 111, + 110, + 101, + 84, + 97, + 98, + 108, + 101, + 0, + 95, + 95, + 100, + 101, + 114, + 101, + 103, + 105, + 115, + 116, + 101, + 114, + 95, + 102, + 114, + 97, + 109, + 101, + 95, + 105, + 110, + 102, + 111, + 0, + 95, + 73, + 84, + 77, + 95, + 114, + 101, + 103, + 105, + 115, + 116, + 101, + 114, + 84, + 77, + 67, + 108, + 111, + 110, + 101, + 84, + 97, + 98, + 108, + 101, + 0, + 95, + 95, + 97, + 101, + 97, + 98, + 105, + 95, + 117, + 110, + 119, + 105, + 110, + 100, + 95, + 99, + 112, + 112, + 95, + 112, + 114, + 49, + 0, + 71, + 67, + 67, + 95, + 51, + 46, + 53, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 217, + 0, + 0, + 0, + 16, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 85, + 38, + 121, + 11, + 0, + 0, + 2, + 0, + 98, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 248, + 14, + 1, + 0, + 23, + 0, + 0, + 0, + 252, + 14, + 1, + 0, + 23, + 0, + 0, + 0, + 56, + 16, + 1, + 0, + 23, + 0, + 0, + 0, + 60, + 16, + 1, + 0, + 23, + 0, + 0, + 0, + 72, + 16, + 1, + 0, + 23, + 0, + 0, + 0, + 92, + 16, + 1, + 0, + 23, + 0, + 0, + 0, + 64, + 16, + 1, + 0, + 21, + 3, + 0, + 0, + 68, + 16, + 1, + 0, + 21, + 4, + 0, + 0, + 76, + 16, + 1, + 0, + 21, + 8, + 0, + 0, + 80, + 16, + 1, + 0, + 21, + 9, + 0, + 0, + 84, + 16, + 1, + 0, + 21, + 11, + 0, + 0, + 88, + 16, + 1, + 0, + 21, + 13, + 0, + 0, + 12, + 16, + 1, + 0, + 22, + 3, + 0, + 0, + 16, + 16, + 1, + 0, + 22, + 6, + 0, + 0, + 20, + 16, + 1, + 0, + 22, + 7, + 0, + 0, + 24, + 16, + 1, + 0, + 22, + 9, + 0, + 0, + 28, + 16, + 1, + 0, + 22, + 10, + 0, + 0, + 32, + 16, + 1, + 0, + 22, + 11, + 0, + 0, + 36, + 16, + 1, + 0, + 22, + 14, + 0, + 0, + 40, + 16, + 1, + 0, + 22, + 15, + 0, + 0, + 44, + 16, + 1, + 0, + 22, + 16, + 0, + 0, + 48, + 16, + 1, + 0, + 22, + 17, + 0, + 0, + 52, + 16, + 1, + 0, + 22, + 18, + 0, + 0, + 1, + 181, + 189, + 232, + 1, + 64, + 112, + 71, + 4, + 224, + 45, + 229, + 4, + 224, + 159, + 229, + 14, + 224, + 143, + 224, + 8, + 240, + 190, + 229, + 120, + 10, + 1, + 0, + 0, + 198, + 143, + 226, + 16, + 202, + 140, + 226, + 120, + 250, + 188, + 229, + 0, + 198, + 143, + 226, + 16, + 202, + 140, + 226, + 112, + 250, + 188, + 229, + 0, + 198, + 143, + 226, + 16, + 202, + 140, + 226, + 104, + 250, + 188, + 229, + 0, + 198, + 143, + 226, + 16, + 202, + 140, + 226, + 96, + 250, + 188, + 229, + 0, + 198, + 143, + 226, + 16, + 202, + 140, + 226, + 88, + 250, + 188, + 229, + 0, + 198, + 143, + 226, + 16, + 202, + 140, + 226, + 80, + 250, + 188, + 229, + 0, + 198, + 143, + 226, + 16, + 202, + 140, + 226, + 72, + 250, + 188, + 229, + 0, + 198, + 143, + 226, + 16, + 202, + 140, + 226, + 64, + 250, + 188, + 229, + 0, + 198, + 143, + 226, + 16, + 202, + 140, + 226, + 56, + 250, + 188, + 229, + 0, + 198, + 143, + 226, + 16, + 202, + 140, + 226, + 48, + 250, + 188, + 229, + 0, + 198, + 143, + 226, + 16, + 202, + 140, + 226, + 40, + 250, + 188, + 229, + 79, + 240, + 0, + 11, + 79, + 240, + 0, + 14, + 3, + 73, + 121, + 68, + 104, + 70, + 32, + 240, + 15, + 12, + 229, + 70, + 0, + 240, + 2, + 248, + 226, + 8, + 1, + 0, + 31, + 181, + 11, + 75, + 11, + 74, + 123, + 68, + 154, + 88, + 2, + 146, + 10, + 74, + 154, + 88, + 3, + 146, + 0, + 34, + 1, + 146, + 9, + 74, + 155, + 88, + 2, + 29, + 0, + 147, + 2, + 155, + 1, + 104, + 3, + 152, + 255, + 247, + 162, + 239, + 5, + 176, + 93, + 248, + 4, + 251, + 0, + 191, + 202, + 9, + 1, + 0, + 72, + 0, + 0, + 0, + 56, + 0, + 0, + 0, + 60, + 0, + 0, + 0, + 6, + 72, + 7, + 75, + 120, + 68, + 123, + 68, + 6, + 74, + 131, + 66, + 122, + 68, + 3, + 208, + 5, + 75, + 211, + 88, + 3, + 177, + 24, + 71, + 112, + 71, + 0, + 191, + 236, + 9, + 1, + 0, + 234, + 9, + 1, + 0, + 132, + 9, + 1, + 0, + 68, + 0, + 0, + 0, + 8, + 72, + 9, + 73, + 120, + 68, + 121, + 68, + 9, + 26, + 8, + 74, + 203, + 15, + 3, + 235, + 161, + 1, + 122, + 68, + 73, + 16, + 3, + 208, + 5, + 75, + 211, + 88, + 3, + 177, + 24, + 71, + 112, + 71, + 0, + 191, + 192, + 9, + 1, + 0, + 190, + 9, + 1, + 0, + 82, + 9, + 1, + 0, + 88, + 0, + 0, + 0, + 14, + 75, + 16, + 181, + 123, + 68, + 14, + 76, + 27, + 120, + 124, + 68, + 163, + 185, + 13, + 75, + 227, + 88, + 35, + 177, + 12, + 75, + 123, + 68, + 24, + 104, + 255, + 247, + 100, + 239, + 255, + 247, + 191, + 255, + 10, + 75, + 227, + 88, + 27, + 177, + 9, + 72, + 120, + 68, + 255, + 247, + 72, + 239, + 8, + 75, + 1, + 34, + 123, + 68, + 26, + 112, + 16, + 189, + 0, + 191, + 140, + 9, + 1, + 0, + 38, + 9, + 1, + 0, + 80, + 0, + 0, + 0, + 118, + 9, + 1, + 0, + 64, + 0, + 0, + 0, + 50, + 2, + 0, + 0, + 92, + 9, + 1, + 0, + 8, + 181, + 7, + 75, + 7, + 74, + 123, + 68, + 155, + 88, + 43, + 177, + 6, + 73, + 7, + 72, + 121, + 68, + 120, + 68, + 255, + 247, + 70, + 239, + 189, + 232, + 8, + 64, + 170, + 231, + 0, + 191, + 210, + 8, + 1, + 0, + 84, + 0, + 0, + 0, + 44, + 9, + 1, + 0, + 242, + 1, + 0, + 0, + 144, + 181, + 137, + 176, + 0, + 175, + 43, + 74, + 122, + 68, + 43, + 75, + 211, + 88, + 27, + 104, + 251, + 97, + 79, + 240, + 0, + 3, + 41, + 75, + 123, + 68, + 24, + 70, + 255, + 247, + 66, + 239, + 1, + 34, + 0, + 33, + 8, + 32, + 255, + 247, + 20, + 239, + 120, + 96, + 123, + 104, + 0, + 43, + 28, + 218, + 255, + 247, + 38, + 239, + 3, + 70, + 27, + 104, + 24, + 70, + 255, + 247, + 44, + 239, + 4, + 70, + 255, + 247, + 30, + 239, + 3, + 70, + 27, + 104, + 26, + 70, + 33, + 70, + 28, + 75, + 123, + 68, + 24, + 70, + 255, + 247, + 38, + 239, + 1, + 35, + 26, + 73, + 121, + 68, + 22, + 74, + 138, + 88, + 17, + 104, + 250, + 105, + 81, + 64, + 31, + 208, + 28, + 224, + 79, + 240, + 1, + 2, + 79, + 240, + 0, + 3, + 199, + 233, + 2, + 35, + 0, + 35, + 59, + 97, + 0, + 33, + 120, + 104, + 255, + 247, + 242, + 238, + 7, + 241, + 8, + 3, + 0, + 33, + 24, + 70, + 255, + 247, + 254, + 238, + 1, + 33, + 120, + 104, + 255, + 247, + 232, + 238, + 7, + 241, + 8, + 3, + 0, + 33, + 24, + 70, + 255, + 247, + 244, + 238, + 234, + 231, + 255, + 247, + 4, + 239, + 24, + 70, + 36, + 55, + 189, + 70, + 144, + 189, + 0, + 191, + 160, + 8, + 1, + 0, + 76, + 0, + 0, + 0, + 180, + 0, + 0, + 0, + 252, + 0, + 0, + 0, + 76, + 8, + 1, + 0, + 1, + 181, + 189, + 232, + 1, + 64, + 112, + 71, + 10, + 86, + 105, + 115, + 105, + 116, + 32, + 104, + 116, + 116, + 112, + 115, + 58, + 47, + 47, + 103, + 105, + 116, + 104, + 117, + 98, + 46, + 99, + 111, + 109, + 47, + 65, + 122, + 117, + 114, + 101, + 47, + 97, + 122, + 117, + 114, + 101, + 45, + 115, + 112, + 104, + 101, + 114, + 101, + 45, + 115, + 97, + 109, + 112, + 108, + 101, + 115, + 32, + 102, + 111, + 114, + 32, + 101, + 120, + 116, + 101, + 110, + 115, + 105, + 98, + 108, + 101, + 32, + 115, + 97, + 109, + 112, + 108, + 101, + 115, + 32, + 116, + 111, + 32, + 117, + 115, + 101, + 32, + 97, + 115, + 32, + 97, + 32, + 115, + 116, + 97, + 114, + 116, + 105, + 110, + 103, + 32, + 112, + 111, + 105, + 110, + 116, + 32, + 102, + 111, + 114, + 32, + 102, + 117, + 108, + 108, + 32, + 97, + 112, + 112, + 108, + 105, + 99, + 97, + 116, + 105, + 111, + 110, + 115, + 46, + 10, + 0, + 0, + 69, + 114, + 114, + 111, + 114, + 32, + 111, + 112, + 101, + 110, + 105, + 110, + 103, + 32, + 71, + 80, + 73, + 79, + 58, + 32, + 37, + 115, + 32, + 40, + 37, + 100, + 41, + 46, + 32, + 67, + 104, + 101, + 99, + 107, + 32, + 116, + 104, + 97, + 116, + 32, + 97, + 112, + 112, + 95, + 109, + 97, + 110, + 105, + 102, + 101, + 115, + 116, + 46, + 106, + 115, + 111, + 110, + 32, + 105, + 110, + 99, + 108, + 117, + 100, + 101, + 115, + 32, + 116, + 104, + 101, + 32, + 71, + 80, + 73, + 79, + 32, + 117, + 115, + 101, + 100, + 46, + 10, + 0, + 0, + 8, + 177, + 1, + 129, + 176, + 176, + 0, + 132, + 0, + 0, + 0, + 0, + 40, + 253, + 255, + 127, + 0, + 132, + 4, + 128, + 96, + 253, + 255, + 127, + 176, + 176, + 176, + 128, + 184, + 253, + 255, + 127, + 176, + 176, + 168, + 128, + 8, + 254, + 255, + 127, + 216, + 255, + 255, + 127, + 48, + 254, + 255, + 127, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 37, + 7, + 0, + 0, + 205, + 6, + 0, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 94, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 217, + 0, + 0, + 0, + 12, + 0, + 0, + 0, + 113, + 5, + 0, + 0, + 13, + 0, + 0, + 0, + 29, + 8, + 0, + 0, + 25, + 0, + 0, + 0, + 248, + 14, + 1, + 0, + 27, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 26, + 0, + 0, + 0, + 252, + 14, + 1, + 0, + 28, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 245, + 254, + 255, + 111, + 144, + 1, + 0, + 0, + 5, + 0, + 0, + 0, + 4, + 3, + 0, + 0, + 6, + 0, + 0, + 0, + 180, + 1, + 0, + 0, + 10, + 0, + 0, + 0, + 106, + 1, + 0, + 0, + 11, + 0, + 0, + 0, + 16, + 0, + 0, + 0, + 21, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 0, + 16, + 1, + 0, + 2, + 0, + 0, + 0, + 88, + 0, + 0, + 0, + 20, + 0, + 0, + 0, + 17, + 0, + 0, + 0, + 23, + 0, + 0, + 0, + 24, + 5, + 0, + 0, + 17, + 0, + 0, + 0, + 184, + 4, + 0, + 0, + 18, + 0, + 0, + 0, + 96, + 0, + 0, + 0, + 19, + 0, + 0, + 0, + 8, + 0, + 0, + 0, + 251, + 255, + 255, + 111, + 0, + 0, + 0, + 8, + 254, + 255, + 255, + 111, + 152, + 4, + 0, + 0, + 255, + 255, + 255, + 111, + 1, + 0, + 0, + 0, + 240, + 255, + 255, + 111, + 110, + 4, + 0, + 0, + 250, + 255, + 255, + 111, + 6, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 15, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 120, + 5, + 0, + 0, + 120, + 5, + 0, + 0, + 120, + 5, + 0, + 0, + 120, + 5, + 0, + 0, + 120, + 5, + 0, + 0, + 120, + 5, + 0, + 0, + 120, + 5, + 0, + 0, + 120, + 5, + 0, + 0, + 120, + 5, + 0, + 0, + 120, + 5, + 0, + 0, + 120, + 5, + 0, + 0, + 85, + 7, + 0, + 0, + 29, + 8, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 113, + 5, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 92, + 16, + 1, + 0, + 71, + 67, + 67, + 58, + 32, + 40, + 71, + 78, + 85, + 41, + 32, + 57, + 46, + 51, + 46, + 48, + 0, + 65, + 58, + 0, + 0, + 0, + 97, + 101, + 97, + 98, + 105, + 0, + 1, + 48, + 0, + 0, + 0, + 5, + 55, + 86, + 69, + 0, + 6, + 10, + 7, + 65, + 8, + 1, + 9, + 2, + 10, + 5, + 12, + 2, + 18, + 4, + 19, + 1, + 20, + 1, + 21, + 1, + 23, + 3, + 24, + 1, + 26, + 2, + 28, + 1, + 30, + 4, + 34, + 1, + 42, + 1, + 44, + 2, + 68, + 3, + 0, + 46, + 115, + 104, + 115, + 116, + 114, + 116, + 97, + 98, + 0, + 46, + 105, + 110, + 116, + 101, + 114, + 112, + 0, + 46, + 110, + 111, + 116, + 101, + 46, + 103, + 110, + 117, + 46, + 98, + 117, + 105, + 108, + 100, + 45, + 105, + 100, + 0, + 46, + 103, + 110, + 117, + 46, + 104, + 97, + 115, + 104, + 0, + 46, + 100, + 121, + 110, + 115, + 121, + 109, + 0, + 46, + 100, + 121, + 110, + 115, + 116, + 114, + 0, + 46, + 103, + 110, + 117, + 46, + 118, + 101, + 114, + 115, + 105, + 111, + 110, + 0, + 46, + 103, + 110, + 117, + 46, + 118, + 101, + 114, + 115, + 105, + 111, + 110, + 95, + 114, + 0, + 46, + 114, + 101, + 108, + 46, + 100, + 121, + 110, + 0, + 46, + 114, + 101, + 108, + 46, + 112, + 108, + 116, + 0, + 46, + 105, + 110, + 105, + 116, + 0, + 46, + 116, + 101, + 120, + 116, + 0, + 46, + 102, + 105, + 110, + 105, + 0, + 46, + 114, + 111, + 100, + 97, + 116, + 97, + 0, + 46, + 65, + 82, + 77, + 46, + 101, + 120, + 116, + 97, + 98, + 0, + 46, + 65, + 82, + 77, + 46, + 101, + 120, + 105, + 100, + 120, + 0, + 46, + 101, + 104, + 95, + 102, + 114, + 97, + 109, + 101, + 0, + 46, + 105, + 110, + 105, + 116, + 95, + 97, + 114, + 114, + 97, + 121, + 0, + 46, + 102, + 105, + 110, + 105, + 95, + 97, + 114, + 114, + 97, + 121, + 0, + 46, + 100, + 121, + 110, + 97, + 109, + 105, + 99, + 0, + 46, + 103, + 111, + 116, + 0, + 46, + 100, + 97, + 116, + 97, + 0, + 46, + 98, + 115, + 115, + 0, + 46, + 99, + 111, + 109, + 109, + 101, + 110, + 116, + 0, + 46, + 65, + 82, + 77, + 46, + 97, + 116, + 116, + 114, + 105, + 98, + 117, + 116, + 101, + 115, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 11, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 84, + 1, + 0, + 0, + 84, + 1, + 0, + 0, + 24, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 19, + 0, + 0, + 0, + 7, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 108, + 1, + 0, + 0, + 108, + 1, + 0, + 0, + 36, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 38, + 0, + 0, + 0, + 246, + 255, + 255, + 111, + 2, + 0, + 0, + 0, + 144, + 1, + 0, + 0, + 144, + 1, + 0, + 0, + 36, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 48, + 0, + 0, + 0, + 11, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 180, + 1, + 0, + 0, + 180, + 1, + 0, + 0, + 80, + 1, + 0, + 0, + 5, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 16, + 0, + 0, + 0, + 56, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 4, + 3, + 0, + 0, + 4, + 3, + 0, + 0, + 106, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 64, + 0, + 0, + 0, + 255, + 255, + 255, + 111, + 2, + 0, + 0, + 0, + 110, + 4, + 0, + 0, + 110, + 4, + 0, + 0, + 42, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 77, + 0, + 0, + 0, + 254, + 255, + 255, + 111, + 2, + 0, + 0, + 0, + 152, + 4, + 0, + 0, + 152, + 4, + 0, + 0, + 32, + 0, + 0, + 0, + 5, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 92, + 0, + 0, + 0, + 9, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 184, + 4, + 0, + 0, + 184, + 4, + 0, + 0, + 96, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 8, + 0, + 0, + 0, + 101, + 0, + 0, + 0, + 9, + 0, + 0, + 0, + 66, + 0, + 0, + 0, + 24, + 5, + 0, + 0, + 24, + 5, + 0, + 0, + 88, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 21, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 8, + 0, + 0, + 0, + 110, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 6, + 0, + 0, + 0, + 112, + 5, + 0, + 0, + 112, + 5, + 0, + 0, + 8, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 105, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 6, + 0, + 0, + 0, + 120, + 5, + 0, + 0, + 120, + 5, + 0, + 0, + 152, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 116, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 6, + 0, + 0, + 0, + 16, + 6, + 0, + 0, + 16, + 6, + 0, + 0, + 12, + 2, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 122, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 6, + 0, + 0, + 0, + 28, + 8, + 0, + 0, + 28, + 8, + 0, + 0, + 8, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 128, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 36, + 8, + 0, + 0, + 36, + 8, + 0, + 0, + 211, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 136, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 248, + 8, + 0, + 0, + 248, + 8, + 0, + 0, + 12, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 147, + 0, + 0, + 0, + 1, + 0, + 0, + 112, + 130, + 0, + 0, + 0, + 4, + 9, + 0, + 0, + 4, + 9, + 0, + 0, + 40, + 0, + 0, + 0, + 12, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 158, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 44, + 9, + 0, + 0, + 44, + 9, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 168, + 0, + 0, + 0, + 14, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 248, + 14, + 1, + 0, + 248, + 14, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 180, + 0, + 0, + 0, + 15, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 252, + 14, + 1, + 0, + 252, + 14, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 192, + 0, + 0, + 0, + 6, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 0, + 15, + 1, + 0, + 0, + 15, + 0, + 0, + 0, + 1, + 0, + 0, + 5, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 8, + 0, + 0, + 0, + 201, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 0, + 16, + 1, + 0, + 0, + 16, + 0, + 0, + 92, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 206, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 92, + 16, + 1, + 0, + 92, + 16, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 212, + 0, + 0, + 0, + 8, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 96, + 16, + 1, + 0, + 96, + 16, + 0, + 0, + 28, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 217, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 48, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 96, + 16, + 0, + 0, + 17, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 226, + 0, + 0, + 0, + 3, + 0, + 0, + 112, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 113, + 16, + 0, + 0, + 59, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 172, + 16, + 0, + 0, + 242, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 52, + 88, + 52, + 77, + 5, + 0, + 0, + 0, + 73, + 68, + 36, + 0, + 10, + 0, + 0, + 0, + 214, + 122, + 37, + 66, + 45, + 56, + 95, + 64, + 183, + 204, + 225, + 16, + 251, + 218, + 45, + 11, + 158, + 114, + 166, + 20, + 25, + 88, + 55, + 71, + 135, + 19, + 55, + 180, + 121, + 133, + 51, + 248, + 83, + 71, + 24, + 0, + 168, + 213, + 204, + 105, + 88, + 244, + 135, + 16, + 20, + 13, + 122, + 38, + 22, + 15, + 193, + 207, + 195, + 31, + 93, + 240, + 1, + 0, + 0, + 0, + 68, + 66, + 40, + 0, + 22, + 126, + 22, + 98, + 0, + 0, + 0, + 0, + 65, + 122, + 117, + 114, + 101, + 83, + 112, + 104, + 101, + 114, + 101, + 66, + 108, + 105, + 110, + 107, + 49, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 84, + 80, + 4, + 0, + 2, + 0, + 0, + 0, + 78, + 68, + 12, + 0, + 1, + 0, + 0, + 0, + 12, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 148, + 0, + 0, + 0, + 251, + 225, + 85, + 169, + 141, + 137, + 136, + 139, + 192, + 90, + 128, + 85, + 114, + 25, + 120, + 190, + 176, + 146, + 132, + 216, + 52, + 213, + 69, + 73, + 113, + 4, + 95, + 7, + 111, + 146, + 232, + 154, + 57, + 218, + 110, + 183, + 4, + 97, + 154, + 131, + 213, + 182, + 58, + 75, + 196, + 11, + 49, + 173, + 203, + 192, + 191, + 36, + 191, + 98, + 161, + 83, + 57, + 219, + 117, + 148, + 185, + 14, + 156, + 89 + ], + "globalLocation": "Global", + "deviceID1": "9821102AB4BD238196247124795853BCEC5F1150CD6F802A22EB3713C5B945EAD6DFC4C2354CF89E20842769DBDEB013F6F5F94D604399A0D03ADE424207234B", + "TestDeviceGroup": "Field Test", + "imagecontext3": [ + 69, + 61, + 205, + 40, + 0, + 80, + 0, + 0, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 67, + 111, + 109, + 112, + 114, + 101, + 115, + 115, + 101, + 100, + 32, + 82, + 79, + 77, + 70, + 83, + 168, + 65, + 29, + 201, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 67, + 111, + 109, + 112, + 114, + 101, + 115, + 115, + 101, + 100, + 0, + 0, + 0, + 0, + 0, + 0, + 237, + 65, + 0, + 0, + 48, + 0, + 0, + 0, + 192, + 4, + 0, + 0, + 164, + 131, + 0, + 0, + 231, + 0, + 0, + 0, + 5, + 0, + 1, + 0, + 97, + 112, + 112, + 95, + 109, + 97, + 110, + 105, + 102, + 101, + 115, + 116, + 46, + 106, + 115, + 111, + 110, + 0, + 0, + 0, + 237, + 65, + 0, + 0, + 16, + 0, + 0, + 0, + 193, + 7, + 0, + 0, + 98, + 105, + 110, + 0, + 237, + 131, + 0, + 0, + 24, + 38, + 0, + 0, + 1, + 0, + 2, + 0, + 97, + 112, + 112, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 123, + 34, + 83, + 99, + 104, + 101, + 109, + 97, + 86, + 101, + 114, + 115, + 105, + 111, + 110, + 34, + 58, + 49, + 44, + 34, + 78, + 97, + 109, + 101, + 34, + 58, + 34, + 71, + 80, + 73, + 79, + 95, + 72, + 105, + 103, + 104, + 76, + 101, + 118, + 101, + 108, + 65, + 112, + 112, + 34, + 44, + 34, + 67, + 111, + 109, + 112, + 111, + 110, + 101, + 110, + 116, + 73, + 100, + 34, + 58, + 34, + 100, + 99, + 55, + 102, + 49, + 51, + 53, + 99, + 45, + 54, + 48, + 55, + 52, + 45, + 52, + 100, + 52, + 57, + 45, + 97, + 97, + 51, + 97, + 45, + 49, + 54, + 48, + 101, + 52, + 101, + 101, + 100, + 56, + 56, + 52, + 102, + 34, + 44, + 34, + 69, + 110, + 116, + 114, + 121, + 80, + 111, + 105, + 110, + 116, + 34, + 58, + 34, + 47, + 98, + 105, + 110, + 47, + 97, + 112, + 112, + 34, + 44, + 34, + 67, + 109, + 100, + 65, + 114, + 103, + 115, + 34, + 58, + 91, + 93, + 44, + 34, + 67, + 97, + 112, + 97, + 98, + 105, + 108, + 105, + 116, + 105, + 101, + 115, + 34, + 58, + 123, + 34, + 71, + 112, + 105, + 111, + 34, + 58, + 91, + 49, + 50, + 44, + 56, + 93, + 125, + 44, + 34, + 65, + 112, + 112, + 108, + 105, + 99, + 97, + 116, + 105, + 111, + 110, + 84, + 121, + 112, + 101, + 34, + 58, + 34, + 68, + 101, + 102, + 97, + 117, + 108, + 116, + 34, + 44, + 34, + 84, + 97, + 114, + 103, + 101, + 116, + 65, + 112, + 112, + 108, + 105, + 99, + 97, + 116, + 105, + 111, + 110, + 82, + 117, + 110, + 116, + 105, + 109, + 101, + 86, + 101, + 114, + 115, + 105, + 111, + 110, + 34, + 58, + 55, + 125, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 127, + 69, + 76, + 70, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 3, + 0, + 40, + 0, + 1, + 0, + 0, + 0, + 213, + 8, + 0, + 0, + 52, + 0, + 0, + 0, + 224, + 33, + 0, + 0, + 0, + 4, + 0, + 5, + 52, + 0, + 32, + 0, + 9, + 0, + 40, + 0, + 27, + 0, + 26, + 0, + 1, + 0, + 0, + 112, + 60, + 21, + 0, + 0, + 60, + 21, + 0, + 0, + 60, + 21, + 0, + 0, + 40, + 0, + 0, + 0, + 40, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 6, + 0, + 0, + 0, + 52, + 0, + 0, + 0, + 52, + 0, + 0, + 0, + 52, + 0, + 0, + 0, + 32, + 1, + 0, + 0, + 32, + 1, + 0, + 0, + 4, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 84, + 1, + 0, + 0, + 84, + 1, + 0, + 0, + 84, + 1, + 0, + 0, + 24, + 0, + 0, + 0, + 24, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 104, + 21, + 0, + 0, + 104, + 21, + 0, + 0, + 5, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 248, + 30, + 0, + 0, + 248, + 30, + 1, + 0, + 248, + 30, + 1, + 0, + 170, + 1, + 0, + 0, + 220, + 1, + 0, + 0, + 6, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 2, + 0, + 0, + 0, + 0, + 31, + 0, + 0, + 0, + 31, + 1, + 0, + 0, + 31, + 1, + 0, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 6, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 108, + 1, + 0, + 0, + 108, + 1, + 0, + 0, + 108, + 1, + 0, + 0, + 36, + 0, + 0, + 0, + 36, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 81, + 229, + 116, + 100, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 6, + 0, + 0, + 0, + 16, + 0, + 0, + 0, + 82, + 229, + 116, + 100, + 248, + 30, + 0, + 0, + 248, + 30, + 1, + 0, + 248, + 30, + 1, + 0, + 8, + 1, + 0, + 0, + 8, + 1, + 0, + 0, + 4, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 47, + 108, + 105, + 98, + 47, + 108, + 100, + 45, + 109, + 117, + 115, + 108, + 45, + 97, + 114, + 109, + 104, + 102, + 46, + 115, + 111, + 46, + 49, + 0, + 4, + 0, + 0, + 0, + 20, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 71, + 78, + 85, + 0, + 135, + 49, + 152, + 18, + 165, + 172, + 141, + 13, + 52, + 68, + 236, + 245, + 143, + 118, + 230, + 113, + 252, + 187, + 110, + 48, + 2, + 0, + 0, + 0, + 33, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 5, + 0, + 0, + 0, + 0, + 36, + 0, + 129, + 33, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 234, + 211, + 239, + 14, + 185, + 141, + 241, + 14, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 140, + 7, + 0, + 0, + 0, + 0, + 0, + 0, + 3, + 0, + 10, + 0, + 0, + 0, + 0, + 0, + 148, + 32, + 1, + 0, + 0, + 0, + 0, + 0, + 3, + 0, + 22, + 0, + 58, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 231, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 58, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 32, + 0, + 0, + 0, + 230, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 23, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 30, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 32, + 0, + 0, + 0, + 142, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 180, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 199, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 17, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 213, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 40, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 141, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 17, + 0, + 0, + 0, + 8, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 34, + 0, + 0, + 0, + 114, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 237, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 32, + 0, + 0, + 0, + 108, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 159, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 82, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 32, + 0, + 0, + 0, + 158, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 175, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 93, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 128, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 196, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 3, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 175, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 246, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 189, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 165, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 255, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 81, + 0, + 0, + 0, + 135, + 18, + 0, + 0, + 2, + 0, + 0, + 0, + 18, + 0, + 13, + 0, + 87, + 0, + 0, + 0, + 141, + 7, + 0, + 0, + 2, + 0, + 0, + 0, + 18, + 0, + 10, + 0, + 0, + 108, + 105, + 98, + 97, + 112, + 112, + 108, + 105, + 98, + 115, + 46, + 115, + 111, + 46, + 48, + 0, + 95, + 95, + 97, + 101, + 97, + 98, + 105, + 95, + 117, + 110, + 119, + 105, + 110, + 100, + 95, + 99, + 112, + 112, + 95, + 112, + 114, + 48, + 0, + 71, + 80, + 73, + 79, + 95, + 79, + 112, + 101, + 110, + 65, + 115, + 79, + 117, + 116, + 112, + 117, + 116, + 0, + 69, + 118, + 101, + 110, + 116, + 76, + 111, + 111, + 112, + 95, + 85, + 110, + 114, + 101, + 103, + 105, + 115, + 116, + 101, + 114, + 73, + 111, + 0, + 95, + 102, + 105, + 110, + 105, + 0, + 95, + 105, + 110, + 105, + 116, + 0, + 69, + 118, + 101, + 110, + 116, + 76, + 111, + 111, + 112, + 95, + 82, + 101, + 103, + 105, + 115, + 116, + 101, + 114, + 73, + 111, + 0, + 71, + 80, + 73, + 79, + 95, + 83, + 101, + 116, + 86, + 97, + 108, + 117, + 101, + 0, + 69, + 118, + 101, + 110, + 116, + 76, + 111, + 111, + 112, + 95, + 82, + 117, + 110, + 0, + 69, + 118, + 101, + 110, + 116, + 76, + 111, + 111, + 112, + 95, + 67, + 108, + 111, + 115, + 101, + 0, + 69, + 118, + 101, + 110, + 116, + 76, + 111, + 111, + 112, + 95, + 67, + 114, + 101, + 97, + 116, + 101, + 0, + 71, + 80, + 73, + 79, + 95, + 71, + 101, + 116, + 86, + 97, + 108, + 117, + 101, + 0, + 76, + 111, + 103, + 95, + 68, + 101, + 98, + 117, + 103, + 0, + 71, + 80, + 73, + 79, + 95, + 79, + 112, + 101, + 110, + 65, + 115, + 73, + 110, + 112, + 117, + 116, + 0, + 108, + 105, + 98, + 103, + 99, + 99, + 95, + 115, + 46, + 115, + 111, + 46, + 49, + 0, + 109, + 101, + 109, + 115, + 101, + 116, + 0, + 95, + 95, + 114, + 101, + 103, + 105, + 115, + 116, + 101, + 114, + 95, + 102, + 114, + 97, + 109, + 101, + 95, + 105, + 110, + 102, + 111, + 0, + 102, + 114, + 101, + 101, + 0, + 95, + 95, + 99, + 120, + 97, + 95, + 102, + 105, + 110, + 97, + 108, + 105, + 122, + 101, + 0, + 109, + 97, + 108, + 108, + 111, + 99, + 0, + 95, + 73, + 84, + 77, + 95, + 100, + 101, + 114, + 101, + 103, + 105, + 115, + 116, + 101, + 114, + 84, + 77, + 67, + 108, + 111, + 110, + 101, + 84, + 97, + 98, + 108, + 101, + 0, + 95, + 95, + 100, + 101, + 114, + 101, + 103, + 105, + 115, + 116, + 101, + 114, + 95, + 102, + 114, + 97, + 109, + 101, + 95, + 105, + 110, + 102, + 111, + 0, + 95, + 73, + 84, + 77, + 95, + 114, + 101, + 103, + 105, + 115, + 116, + 101, + 114, + 84, + 77, + 67, + 108, + 111, + 110, + 101, + 84, + 97, + 98, + 108, + 101, + 0, + 95, + 95, + 97, + 101, + 97, + 98, + 105, + 95, + 117, + 110, + 119, + 105, + 110, + 100, + 95, + 99, + 112, + 112, + 95, + 112, + 114, + 49, + 0, + 108, + 105, + 98, + 99, + 46, + 115, + 111, + 46, + 49, + 0, + 95, + 95, + 115, + 116, + 97, + 99, + 107, + 95, + 99, + 104, + 107, + 95, + 103, + 117, + 97, + 114, + 100, + 0, + 99, + 108, + 111, + 115, + 101, + 0, + 115, + 105, + 103, + 97, + 99, + 116, + 105, + 111, + 110, + 0, + 114, + 101, + 97, + 100, + 0, + 116, + 105, + 109, + 101, + 114, + 102, + 100, + 95, + 115, + 101, + 116, + 116, + 105, + 109, + 101, + 0, + 95, + 95, + 101, + 114, + 114, + 110, + 111, + 95, + 108, + 111, + 99, + 97, + 116, + 105, + 111, + 110, + 0, + 95, + 95, + 108, + 105, + 98, + 99, + 95, + 115, + 116, + 97, + 114, + 116, + 95, + 109, + 97, + 105, + 110, + 0, + 116, + 105, + 109, + 101, + 114, + 102, + 100, + 95, + 99, + 114, + 101, + 97, + 116, + 101, + 0, + 115, + 116, + 114, + 101, + 114, + 114, + 111, + 114, + 0, + 95, + 95, + 115, + 116, + 97, + 99, + 107, + 95, + 99, + 104, + 107, + 95, + 102, + 97, + 105, + 108, + 0, + 71, + 67, + 67, + 95, + 51, + 46, + 53, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 216, + 0, + 0, + 0, + 16, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 85, + 38, + 121, + 11, + 0, + 0, + 2, + 0, + 16, + 2, + 0, + 0, + 0, + 0, + 0, + 0, + 248, + 30, + 1, + 0, + 23, + 0, + 0, + 0, + 252, + 30, + 1, + 0, + 23, + 0, + 0, + 0, + 112, + 32, + 1, + 0, + 23, + 0, + 0, + 0, + 116, + 32, + 1, + 0, + 23, + 0, + 0, + 0, + 128, + 32, + 1, + 0, + 23, + 0, + 0, + 0, + 148, + 32, + 1, + 0, + 23, + 0, + 0, + 0, + 120, + 32, + 1, + 0, + 21, + 5, + 0, + 0, + 124, + 32, + 1, + 0, + 21, + 8, + 0, + 0, + 132, + 32, + 1, + 0, + 21, + 15, + 0, + 0, + 136, + 32, + 1, + 0, + 21, + 16, + 0, + 0, + 140, + 32, + 1, + 0, + 21, + 18, + 0, + 0, + 144, + 32, + 1, + 0, + 21, + 21, + 0, + 0, + 12, + 32, + 1, + 0, + 22, + 3, + 0, + 0, + 16, + 32, + 1, + 0, + 22, + 4, + 0, + 0, + 20, + 32, + 1, + 0, + 22, + 5, + 0, + 0, + 24, + 32, + 1, + 0, + 22, + 6, + 0, + 0, + 28, + 32, + 1, + 0, + 22, + 7, + 0, + 0, + 32, + 32, + 1, + 0, + 22, + 9, + 0, + 0, + 36, + 32, + 1, + 0, + 22, + 10, + 0, + 0, + 40, + 32, + 1, + 0, + 22, + 11, + 0, + 0, + 44, + 32, + 1, + 0, + 22, + 13, + 0, + 0, + 48, + 32, + 1, + 0, + 22, + 14, + 0, + 0, + 52, + 32, + 1, + 0, + 22, + 16, + 0, + 0, + 56, + 32, + 1, + 0, + 22, + 17, + 0, + 0, + 60, + 32, + 1, + 0, + 22, + 18, + 0, + 0, + 64, + 32, + 1, + 0, + 22, + 20, + 0, + 0, + 68, + 32, + 1, + 0, + 22, + 22, + 0, + 0, + 72, + 32, + 1, + 0, + 22, + 23, + 0, + 0, + 76, + 32, + 1, + 0, + 22, + 24, + 0, + 0, + 80, + 32, + 1, + 0, + 22, + 25, + 0, + 0, + 84, + 32, + 1, + 0, + 22, + 26, + 0, + 0, + 88, + 32, + 1, + 0, + 22, + 27, + 0, + 0, + 92, + 32, + 1, + 0, + 22, + 28, + 0, + 0, + 96, + 32, + 1, + 0, + 22, + 29, + 0, + 0, + 100, + 32, + 1, + 0, + 22, + 30, + 0, + 0, + 104, + 32, + 1, + 0, + 22, + 31, + 0, + 0, + 108, + 32, + 1, + 0, + 22, + 32, + 0, + 0, + 1, + 181, + 189, + 232, + 1, + 64, + 112, + 71, + 4, + 224, + 45, + 229, + 4, + 224, + 159, + 229, + 14, + 224, + 143, + 224, + 8, + 240, + 190, + 229, + 92, + 24, + 1, + 0, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 92, + 248, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 84, + 248, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 76, + 248, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 68, + 248, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 60, + 248, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 52, + 248, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 44, + 248, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 36, + 248, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 28, + 248, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 20, + 248, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 12, + 248, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 4, + 248, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 252, + 247, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 244, + 247, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 236, + 247, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 228, + 247, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 220, + 247, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 212, + 247, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 204, + 247, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 196, + 247, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 188, + 247, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 180, + 247, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 172, + 247, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 164, + 247, + 188, + 229, + 0, + 198, + 143, + 226, + 17, + 202, + 140, + 226, + 156, + 247, + 188, + 229, + 79, + 240, + 0, + 11, + 79, + 240, + 0, + 14, + 3, + 73, + 121, + 68, + 104, + 70, + 32, + 240, + 15, + 12, + 229, + 70, + 0, + 240, + 2, + 248, + 30, + 22, + 1, + 0, + 31, + 181, + 11, + 75, + 11, + 74, + 123, + 68, + 154, + 88, + 2, + 146, + 10, + 74, + 154, + 88, + 3, + 146, + 0, + 34, + 1, + 146, + 9, + 74, + 155, + 88, + 2, + 29, + 0, + 147, + 2, + 155, + 1, + 104, + 3, + 152, + 255, + 247, + 120, + 239, + 5, + 176, + 93, + 248, + 4, + 251, + 0, + 191, + 6, + 23, + 1, + 0, + 128, + 0, + 0, + 0, + 112, + 0, + 0, + 0, + 116, + 0, + 0, + 0, + 6, + 72, + 7, + 75, + 120, + 68, + 123, + 68, + 6, + 74, + 131, + 66, + 122, + 68, + 3, + 208, + 5, + 75, + 211, + 88, + 3, + 177, + 24, + 71, + 112, + 71, + 0, + 191, + 108, + 23, + 1, + 0, + 106, + 23, + 1, + 0, + 192, + 22, + 1, + 0, + 124, + 0, + 0, + 0, + 8, + 72, + 9, + 73, + 120, + 68, + 121, + 68, + 9, + 26, + 8, + 74, + 203, + 15, + 3, + 235, + 161, + 1, + 122, + 68, + 73, + 16, + 3, + 208, + 5, + 75, + 211, + 88, + 3, + 177, + 24, + 71, + 112, + 71, + 0, + 191, + 64, + 23, + 1, + 0, + 62, + 23, + 1, + 0, + 142, + 22, + 1, + 0, + 144, + 0, + 0, + 0, + 14, + 75, + 16, + 181, + 123, + 68, + 14, + 76, + 27, + 120, + 124, + 68, + 163, + 185, + 13, + 75, + 227, + 88, + 35, + 177, + 12, + 75, + 123, + 68, + 24, + 104, + 255, + 247, + 58, + 239, + 255, + 247, + 191, + 255, + 10, + 75, + 227, + 88, + 27, + 177, + 9, + 72, + 120, + 68, + 255, + 247, + 0, + 239, + 8, + 75, + 1, + 34, + 123, + 68, + 26, + 112, + 16, + 189, + 0, + 191, + 12, + 23, + 1, + 0, + 98, + 22, + 1, + 0, + 136, + 0, + 0, + 0, + 234, + 22, + 1, + 0, + 120, + 0, + 0, + 0, + 166, + 11, + 0, + 0, + 220, + 22, + 1, + 0, + 8, + 181, + 7, + 75, + 7, + 74, + 123, + 68, + 155, + 88, + 43, + 177, + 6, + 73, + 7, + 72, + 121, + 68, + 120, + 68, + 255, + 247, + 28, + 239, + 189, + 232, + 8, + 64, + 170, + 231, + 0, + 191, + 14, + 22, + 1, + 0, + 140, + 0, + 0, + 0, + 172, + 22, + 1, + 0, + 102, + 11, + 0, + 0, + 128, + 180, + 131, + 176, + 0, + 175, + 120, + 96, + 5, + 75, + 123, + 68, + 26, + 70, + 1, + 35, + 19, + 96, + 0, + 191, + 12, + 55, + 189, + 70, + 93, + 248, + 4, + 123, + 112, + 71, + 0, + 191, + 170, + 22, + 1, + 0, + 144, + 181, + 133, + 176, + 0, + 175, + 120, + 96, + 120, + 104, + 0, + 240, + 195, + 251, + 3, + 70, + 0, + 43, + 5, + 208, + 29, + 75, + 123, + 68, + 26, + 70, + 2, + 35, + 19, + 96, + 50, + 224, + 27, + 75, + 123, + 68, + 27, + 120, + 0, + 43, + 12, + 191, + 1, + 35, + 0, + 35, + 219, + 178, + 26, + 70, + 24, + 75, + 123, + 68, + 26, + 112, + 23, + 75, + 123, + 68, + 27, + 104, + 23, + 74, + 122, + 68, + 18, + 120, + 17, + 70, + 24, + 70, + 255, + 247, + 210, + 238, + 248, + 96, + 251, + 104, + 0, + 43, + 24, + 208, + 255, + 247, + 246, + 238, + 3, + 70, + 27, + 104, + 24, + 70, + 255, + 247, + 4, + 239, + 4, + 70, + 255, + 247, + 238, + 238, + 3, + 70, + 27, + 104, + 26, + 70, + 33, + 70, + 11, + 75, + 123, + 68, + 24, + 70, + 255, + 247, + 254, + 238, + 10, + 75, + 123, + 68, + 26, + 70, + 3, + 35, + 19, + 96, + 0, + 191, + 20, + 55, + 189, + 70, + 144, + 189, + 122, + 22, + 1, + 0, + 63, + 22, + 1, + 0, + 45, + 22, + 1, + 0, + 34, + 22, + 1, + 0, + 33, + 22, + 1, + 0, + 246, + 7, + 0, + 0, + 20, + 22, + 1, + 0, + 144, + 181, + 135, + 176, + 0, + 175, + 120, + 96, + 59, + 74, + 122, + 68, + 59, + 75, + 211, + 88, + 27, + 104, + 123, + 97, + 79, + 240, + 0, + 3, + 120, + 104, + 0, + 240, + 103, + 251, + 3, + 70, + 0, + 43, + 5, + 208, + 54, + 75, + 123, + 68, + 26, + 70, + 4, + 35, + 19, + 96, + 85, + 224, + 52, + 75, + 123, + 68, + 27, + 104, + 7, + 241, + 15, + 2, + 17, + 70, + 24, + 70, + 255, + 247, + 186, + 238, + 56, + 97, + 59, + 105, + 0, + 43, + 24, + 208, + 255, + 247, + 168, + 238, + 3, + 70, + 27, + 104, + 24, + 70, + 255, + 247, + 180, + 238, + 4, + 70, + 255, + 247, + 160, + 238, + 3, + 70, + 27, + 104, + 26, + 70, + 33, + 70, + 40, + 75, + 123, + 68, + 24, + 70, + 255, + 247, + 174, + 238, + 38, + 75, + 123, + 68, + 26, + 70, + 5, + 35, + 19, + 96, + 47, + 224, + 250, + 123, + 36, + 75, + 123, + 68, + 27, + 120, + 154, + 66, + 41, + 208, + 251, + 123, + 0, + 43, + 34, + 209, + 33, + 75, + 123, + 68, + 27, + 104, + 1, + 51, + 3, + 34, + 147, + 251, + 242, + 241, + 2, + 251, + 1, + 242, + 155, + 26, + 29, + 74, + 122, + 68, + 19, + 96, + 28, + 75, + 123, + 68, + 26, + 104, + 28, + 75, + 123, + 68, + 27, + 104, + 219, + 0, + 27, + 73, + 121, + 68, + 11, + 68, + 25, + 70, + 16, + 70, + 0, + 240, + 94, + 251, + 3, + 70, + 0, + 43, + 4, + 208, + 23, + 75, + 123, + 68, + 26, + 70, + 6, + 35, + 19, + 96, + 250, + 123, + 21, + 75, + 123, + 68, + 26, + 112, + 20, + 74, + 122, + 68, + 6, + 75, + 211, + 88, + 26, + 104, + 123, + 105, + 90, + 64, + 1, + 208, + 255, + 247, + 122, + 238, + 28, + 55, + 189, + 70, + 144, + 189, + 0, + 191, + 14, + 21, + 1, + 0, + 132, + 0, + 0, + 0, + 194, + 21, + 1, + 0, + 126, + 21, + 1, + 0, + 140, + 7, + 0, + 0, + 118, + 21, + 1, + 0, + 56, + 21, + 1, + 0, + 84, + 21, + 1, + 0, + 64, + 21, + 1, + 0, + 54, + 21, + 1, + 0, + 52, + 21, + 1, + 0, + 240, + 6, + 0, + 0, + 28, + 21, + 1, + 0, + 224, + 20, + 1, + 0, + 58, + 20, + 1, + 0, + 144, + 181, + 167, + 176, + 0, + 175, + 97, + 74, + 122, + 68, + 97, + 75, + 211, + 88, + 27, + 104, + 199, + 248, + 148, + 48, + 79, + 240, + 0, + 3, + 7, + 241, + 8, + 3, + 140, + 34, + 0, + 33, + 24, + 70, + 255, + 247, + 200, + 237, + 91, + 75, + 123, + 68, + 187, + 96, + 7, + 241, + 8, + 3, + 0, + 34, + 25, + 70, + 15, + 32, + 255, + 247, + 54, + 238, + 255, + 247, + 254, + 237, + 3, + 70, + 85, + 74, + 122, + 68, + 19, + 96, + 85, + 75, + 123, + 68, + 27, + 104, + 0, + 43, + 6, + 209, + 83, + 75, + 123, + 68, + 24, + 70, + 255, + 247, + 32, + 238, + 7, + 35, + 134, + 224, + 81, + 75, + 123, + 68, + 24, + 70, + 255, + 247, + 24, + 238, + 12, + 32, + 255, + 247, + 188, + 237, + 3, + 70, + 77, + 74, + 122, + 68, + 19, + 96, + 77, + 75, + 123, + 68, + 27, + 104, + 179, + 241, + 255, + 63, + 20, + 209, + 255, + 247, + 242, + 237, + 3, + 70, + 27, + 104, + 24, + 70, + 255, + 247, + 254, + 237, + 4, + 70, + 255, + 247, + 234, + 237, + 3, + 70, + 27, + 104, + 26, + 70, + 33, + 70, + 68, + 75, + 123, + 68, + 24, + 70, + 255, + 247, + 248, + 237, + 8, + 35, + 95, + 224, + 0, + 35, + 59, + 96, + 68, + 242, + 64, + 35, + 192, + 242, + 15, + 3, + 123, + 96, + 62, + 75, + 123, + 68, + 27, + 104, + 58, + 70, + 61, + 73, + 121, + 68, + 24, + 70, + 0, + 240, + 202, + 249, + 3, + 70, + 59, + 74, + 122, + 68, + 19, + 96, + 58, + 75, + 123, + 68, + 27, + 104, + 0, + 43, + 1, + 209, + 9, + 35, + 68, + 224, + 56, + 75, + 123, + 68, + 24, + 70, + 255, + 247, + 214, + 237, + 1, + 34, + 0, + 33, + 8, + 32, + 255, + 247, + 132, + 237, + 3, + 70, + 51, + 74, + 122, + 68, + 19, + 96, + 51, + 75, + 123, + 68, + 27, + 104, + 179, + 241, + 255, + 63, + 20, + 209, + 255, + 247, + 174, + 237, + 3, + 70, + 27, + 104, + 24, + 70, + 255, + 247, + 186, + 237, + 4, + 70, + 255, + 247, + 166, + 237, + 3, + 70, + 27, + 104, + 26, + 70, + 33, + 70, + 42, + 75, + 123, + 68, + 24, + 70, + 255, + 247, + 180, + 237, + 10, + 35, + 27, + 224, + 39, + 75, + 123, + 68, + 24, + 104, + 39, + 75, + 123, + 68, + 27, + 104, + 219, + 0, + 38, + 74, + 122, + 68, + 19, + 68, + 26, + 70, + 37, + 75, + 123, + 68, + 25, + 70, + 0, + 240, + 134, + 249, + 3, + 70, + 35, + 74, + 122, + 68, + 19, + 96, + 34, + 75, + 123, + 68, + 27, + 104, + 0, + 43, + 1, + 209, + 11, + 35, + 0, + 224, + 0, + 35, + 31, + 73, + 121, + 68, + 7, + 74, + 138, + 88, + 17, + 104, + 215, + 248, + 148, + 32, + 81, + 64, + 1, + 208, + 255, + 247, + 152, + 237, + 24, + 70, + 156, + 55, + 189, + 70, + 144, + 189, + 0, + 191, + 220, + 19, + 1, + 0, + 132, + 0, + 0, + 0, + 213, + 253, + 255, + 255, + 98, + 20, + 1, + 0, + 92, + 20, + 1, + 0, + 158, + 6, + 0, + 0, + 176, + 6, + 0, + 0, + 10, + 20, + 1, + 0, + 4, + 20, + 1, + 0, + 148, + 6, + 0, + 0, + 232, + 19, + 1, + 0, + 5, + 254, + 255, + 255, + 216, + 19, + 1, + 0, + 210, + 19, + 1, + 0, + 132, + 6, + 0, + 0, + 134, + 19, + 1, + 0, + 128, + 19, + 1, + 0, + 96, + 6, + 0, + 0, + 110, + 19, + 1, + 0, + 116, + 19, + 1, + 0, + 48, + 5, + 0, + 0, + 213, + 252, + 255, + 255, + 84, + 19, + 1, + 0, + 78, + 19, + 1, + 0, + 118, + 18, + 1, + 0, + 144, + 181, + 133, + 176, + 0, + 175, + 120, + 96, + 57, + 96, + 123, + 104, + 0, + 43, + 24, + 219, + 120, + 104, + 255, + 247, + 20, + 237, + 248, + 96, + 251, + 104, + 0, + 43, + 17, + 208, + 255, + 247, + 44, + 237, + 3, + 70, + 27, + 104, + 24, + 70, + 255, + 247, + 56, + 237, + 4, + 70, + 255, + 247, + 36, + 237, + 3, + 70, + 27, + 104, + 34, + 70, + 57, + 104, + 4, + 72, + 120, + 68, + 255, + 247, + 52, + 237, + 0, + 191, + 20, + 55, + 189, + 70, + 144, + 189, + 0, + 191, + 144, + 5, + 0, + 0, + 128, + 181, + 0, + 175, + 27, + 75, + 123, + 68, + 27, + 104, + 0, + 43, + 6, + 219, + 26, + 75, + 123, + 68, + 27, + 104, + 1, + 33, + 24, + 70, + 255, + 247, + 220, + 236, + 23, + 75, + 123, + 68, + 27, + 104, + 24, + 70, + 0, + 240, + 134, + 249, + 21, + 75, + 123, + 68, + 27, + 104, + 24, + 70, + 0, + 240, + 128, + 249, + 19, + 75, + 123, + 68, + 27, + 104, + 24, + 70, + 255, + 247, + 166, + 236, + 17, + 75, + 123, + 68, + 24, + 70, + 255, + 247, + 8, + 237, + 16, + 75, + 123, + 68, + 27, + 104, + 15, + 74, + 122, + 68, + 17, + 70, + 24, + 70, + 255, + 247, + 170, + 255, + 13, + 75, + 123, + 68, + 27, + 104, + 13, + 74, + 122, + 68, + 17, + 70, + 24, + 70, + 255, + 247, + 161, + 255, + 0, + 191, + 128, + 189, + 0, + 191, + 58, + 18, + 1, + 0, + 48, + 18, + 1, + 0, + 74, + 18, + 1, + 0, + 66, + 18, + 1, + 0, + 46, + 18, + 1, + 0, + 98, + 5, + 0, + 0, + 244, + 17, + 1, + 0, + 110, + 5, + 0, + 0, + 222, + 17, + 1, + 0, + 108, + 5, + 0, + 0, + 128, + 181, + 132, + 176, + 0, + 175, + 120, + 96, + 57, + 96, + 28, + 75, + 123, + 68, + 24, + 70, + 255, + 247, + 212, + 236, + 255, + 247, + 134, + 254, + 3, + 70, + 26, + 70, + 24, + 75, + 123, + 68, + 26, + 96, + 24, + 224, + 23, + 75, + 123, + 68, + 27, + 104, + 1, + 34, + 79, + 240, + 255, + 49, + 24, + 70, + 255, + 247, + 166, + 236, + 248, + 96, + 251, + 104, + 179, + 241, + 255, + 63, + 10, + 209, + 255, + 247, + 164, + 236, + 3, + 70, + 27, + 104, + 4, + 43, + 4, + 208, + 14, + 75, + 123, + 68, + 26, + 70, + 12, + 35, + 19, + 96, + 13, + 75, + 123, + 68, + 27, + 104, + 0, + 43, + 225, + 208, + 255, + 247, + 128, + 255, + 10, + 75, + 123, + 68, + 24, + 70, + 255, + 247, + 168, + 236, + 9, + 75, + 123, + 68, + 27, + 104, + 24, + 70, + 16, + 55, + 189, + 70, + 128, + 189, + 64, + 5, + 0, + 0, + 186, + 17, + 1, + 0, + 162, + 17, + 1, + 0, + 138, + 17, + 1, + 0, + 128, + 17, + 1, + 0, + 2, + 5, + 0, + 0, + 104, + 17, + 1, + 0, + 144, + 181, + 139, + 176, + 0, + 175, + 248, + 96, + 185, + 96, + 122, + 96, + 42, + 74, + 122, + 68, + 42, + 75, + 211, + 88, + 27, + 104, + 123, + 98, + 79, + 240, + 0, + 3, + 123, + 104, + 0, + 43, + 7, + 208, + 122, + 104, + 7, + 241, + 20, + 3, + 146, + 232, + 3, + 0, + 131, + 232, + 3, + 0, + 3, + 224, + 0, + 35, + 123, + 97, + 0, + 35, + 187, + 97, + 187, + 104, + 0, + 43, + 7, + 208, + 186, + 104, + 7, + 241, + 28, + 3, + 146, + 232, + 3, + 0, + 131, + 232, + 3, + 0, + 3, + 224, + 0, + 35, + 251, + 97, + 0, + 35, + 59, + 98, + 7, + 241, + 20, + 2, + 0, + 35, + 0, + 33, + 248, + 104, + 255, + 247, + 0, + 236, + 3, + 70, + 179, + 241, + 255, + 63, + 21, + 209, + 255, + 247, + 66, + 236, + 3, + 70, + 27, + 104, + 24, + 70, + 255, + 247, + 78, + 236, + 4, + 70, + 255, + 247, + 58, + 236, + 3, + 70, + 27, + 104, + 26, + 70, + 33, + 70, + 13, + 75, + 123, + 68, + 24, + 70, + 255, + 247, + 72, + 236, + 79, + 240, + 255, + 51, + 0, + 224, + 0, + 35, + 9, + 73, + 121, + 68, + 6, + 74, + 138, + 88, + 17, + 104, + 122, + 106, + 81, + 64, + 1, + 208, + 255, + 247, + 70, + 236, + 24, + 70, + 44, + 55, + 189, + 70, + 144, + 189, + 98, + 16, + 1, + 0, + 132, + 0, + 0, + 0, + 92, + 4, + 0, + 0, + 210, + 15, + 1, + 0, + 128, + 181, + 134, + 176, + 0, + 175, + 248, + 96, + 185, + 96, + 122, + 96, + 59, + 96, + 59, + 104, + 123, + 97, + 123, + 105, + 91, + 104, + 120, + 105, + 152, + 71, + 0, + 191, + 24, + 55, + 189, + 70, + 128, + 189, + 0, + 0, + 144, + 181, + 137, + 176, + 2, + 175, + 248, + 96, + 185, + 96, + 122, + 96, + 187, + 104, + 0, + 43, + 6, + 209, + 255, + 247, + 250, + 235, + 3, + 70, + 22, + 34, + 26, + 96, + 0, + 35, + 110, + 224, + 16, + 32, + 255, + 247, + 158, + 235, + 3, + 70, + 123, + 97, + 123, + 105, + 0, + 43, + 1, + 209, + 0, + 35, + 100, + 224, + 123, + 105, + 250, + 104, + 26, + 96, + 123, + 105, + 186, + 104, + 90, + 96, + 123, + 105, + 79, + 240, + 255, + 50, + 154, + 96, + 123, + 105, + 0, + 34, + 218, + 96, + 79, + 244, + 0, + 97, + 1, + 32, + 255, + 247, + 114, + 235, + 2, + 70, + 123, + 105, + 154, + 96, + 123, + 105, + 155, + 104, + 179, + 241, + 255, + 63, + 19, + 209, + 255, + 247, + 206, + 235, + 3, + 70, + 27, + 104, + 24, + 70, + 255, + 247, + 220, + 235, + 4, + 70, + 255, + 247, + 198, + 235, + 3, + 70, + 27, + 104, + 26, + 70, + 33, + 70, + 32, + 75, + 123, + 68, + 24, + 70, + 255, + 247, + 214, + 235, + 50, + 224, + 123, + 105, + 155, + 104, + 122, + 104, + 121, + 104, + 24, + 70, + 255, + 247, + 59, + 255, + 3, + 70, + 179, + 241, + 255, + 63, + 38, + 208, + 123, + 105, + 153, + 104, + 123, + 105, + 0, + 147, + 23, + 75, + 123, + 68, + 1, + 34, + 248, + 104, + 255, + 247, + 156, + 235, + 2, + 70, + 123, + 105, + 218, + 96, + 123, + 105, + 219, + 104, + 0, + 43, + 19, + 209, + 255, + 247, + 158, + 235, + 3, + 70, + 27, + 104, + 24, + 70, + 255, + 247, + 172, + 235, + 4, + 70, + 255, + 247, + 150, + 235, + 3, + 70, + 27, + 104, + 26, + 70, + 33, + 70, + 10, + 75, + 123, + 68, + 24, + 70, + 255, + 247, + 166, + 235, + 2, + 224, + 123, + 105, + 4, + 224, + 0, + 191, + 120, + 105, + 0, + 240, + 12, + 248, + 0, + 35, + 24, + 70, + 28, + 55, + 189, + 70, + 144, + 189, + 0, + 191, + 166, + 3, + 0, + 0, + 41, + 255, + 255, + 255, + 114, + 3, + 0, + 0, + 128, + 181, + 130, + 176, + 0, + 175, + 120, + 96, + 123, + 104, + 0, + 43, + 21, + 208, + 123, + 104, + 26, + 104, + 123, + 104, + 219, + 104, + 25, + 70, + 16, + 70, + 255, + 247, + 0, + 235, + 123, + 104, + 155, + 104, + 179, + 241, + 255, + 63, + 4, + 208, + 123, + 104, + 155, + 104, + 24, + 70, + 255, + 247, + 68, + 235, + 120, + 104, + 255, + 247, + 100, + 235, + 0, + 224, + 0, + 191, + 8, + 55, + 189, + 70, + 128, + 189, + 0, + 0, + 144, + 181, + 135, + 176, + 0, + 175, + 120, + 96, + 30, + 74, + 122, + 68, + 30, + 75, + 211, + 88, + 27, + 104, + 123, + 97, + 79, + 240, + 0, + 3, + 192, + 239, + 16, + 0, + 199, + 237, + 2, + 11, + 123, + 104, + 155, + 104, + 7, + 241, + 8, + 1, + 8, + 34, + 24, + 70, + 255, + 247, + 46, + 235, + 3, + 70, + 179, + 241, + 255, + 63, + 21, + 209, + 255, + 247, + 58, + 235, + 3, + 70, + 27, + 104, + 24, + 70, + 255, + 247, + 72, + 235, + 4, + 70, + 255, + 247, + 50, + 235, + 3, + 70, + 27, + 104, + 26, + 70, + 33, + 70, + 13, + 75, + 123, + 68, + 24, + 70, + 255, + 247, + 66, + 235, + 79, + 240, + 255, + 51, + 0, + 224, + 0, + 35, + 10, + 73, + 121, + 68, + 7, + 74, + 138, + 88, + 17, + 104, + 122, + 105, + 81, + 64, + 1, + 208, + 255, + 247, + 64, + 235, + 24, + 70, + 28, + 55, + 189, + 70, + 144, + 189, + 0, + 191, + 34, + 14, + 1, + 0, + 132, + 0, + 0, + 0, + 222, + 2, + 0, + 0, + 196, + 13, + 1, + 0, + 128, + 181, + 130, + 176, + 0, + 175, + 120, + 96, + 57, + 96, + 123, + 104, + 155, + 104, + 58, + 104, + 57, + 104, + 24, + 70, + 255, + 247, + 136, + 254, + 3, + 70, + 24, + 70, + 8, + 55, + 189, + 70, + 128, + 189, + 1, + 181, + 189, + 232, + 1, + 64, + 112, + 71, + 0, + 0, + 0, + 0, + 0, + 0, + 64, + 89, + 115, + 7, + 0, + 0, + 0, + 0, + 128, + 178, + 230, + 14, + 0, + 0, + 0, + 0, + 0, + 101, + 205, + 29, + 69, + 82, + 82, + 79, + 82, + 58, + 32, + 67, + 111, + 117, + 108, + 100, + 32, + 110, + 111, + 116, + 32, + 115, + 101, + 116, + 32, + 76, + 69, + 68, + 32, + 111, + 117, + 116, + 112, + 117, + 116, + 32, + 118, + 97, + 108, + 117, + 101, + 58, + 32, + 37, + 115, + 32, + 40, + 37, + 100, + 41, + 46, + 10, + 0, + 0, + 0, + 0, + 69, + 82, + 82, + 79, + 82, + 58, + 32, + 67, + 111, + 117, + 108, + 100, + 32, + 110, + 111, + 116, + 32, + 114, + 101, + 97, + 100, + 32, + 98, + 117, + 116, + 116, + 111, + 110, + 32, + 71, + 80, + 73, + 79, + 58, + 32, + 37, + 115, + 32, + 40, + 37, + 100, + 41, + 46, + 10, + 0, + 0, + 0, + 0, + 67, + 111, + 117, + 108, + 100, + 32, + 110, + 111, + 116, + 32, + 99, + 114, + 101, + 97, + 116, + 101, + 32, + 101, + 118, + 101, + 110, + 116, + 32, + 108, + 111, + 111, + 112, + 46, + 10, + 0, + 0, + 0, + 79, + 112, + 101, + 110, + 105, + 110, + 103, + 32, + 83, + 65, + 77, + 80, + 76, + 69, + 95, + 66, + 85, + 84, + 84, + 79, + 78, + 95, + 49, + 32, + 97, + 115, + 32, + 105, + 110, + 112, + 117, + 116, + 46, + 10, + 0, + 0, + 69, + 82, + 82, + 79, + 82, + 58, + 32, + 67, + 111, + 117, + 108, + 100, + 32, + 110, + 111, + 116, + 32, + 111, + 112, + 101, + 110, + 32, + 83, + 65, + 77, + 80, + 76, + 69, + 95, + 66, + 85, + 84, + 84, + 79, + 78, + 95, + 49, + 58, + 32, + 37, + 115, + 32, + 40, + 37, + 100, + 41, + 46, + 10, + 0, + 0, + 0, + 0, + 79, + 112, + 101, + 110, + 105, + 110, + 103, + 32, + 83, + 65, + 77, + 80, + 76, + 69, + 95, + 76, + 69, + 68, + 32, + 97, + 115, + 32, + 111, + 117, + 116, + 112, + 117, + 116, + 46, + 10, + 0, + 0, + 69, + 82, + 82, + 79, + 82, + 58, + 32, + 67, + 111, + 117, + 108, + 100, + 32, + 110, + 111, + 116, + 32, + 111, + 112, + 101, + 110, + 32, + 83, + 65, + 77, + 80, + 76, + 69, + 95, + 76, + 69, + 68, + 32, + 71, + 80, + 73, + 79, + 58, + 32, + 37, + 115, + 32, + 40, + 37, + 100, + 41, + 46, + 10, + 0, + 0, + 0, + 0, + 69, + 82, + 82, + 79, + 82, + 58, + 32, + 67, + 111, + 117, + 108, + 100, + 32, + 110, + 111, + 116, + 32, + 99, + 108, + 111, + 115, + 101, + 32, + 102, + 100, + 32, + 37, + 115, + 58, + 32, + 37, + 115, + 32, + 40, + 37, + 100, + 41, + 46, + 10, + 0, + 67, + 108, + 111, + 115, + 105, + 110, + 103, + 32, + 102, + 105, + 108, + 101, + 32, + 100, + 101, + 115, + 99, + 114, + 105, + 112, + 116, + 111, + 114, + 115, + 46, + 10, + 0, + 0, + 66, + 108, + 105, + 110, + 107, + 105, + 110, + 103, + 76, + 101, + 100, + 71, + 112, + 105, + 111, + 0, + 76, + 101, + 100, + 66, + 108, + 105, + 110, + 107, + 82, + 97, + 116, + 101, + 66, + 117, + 116, + 116, + 111, + 110, + 71, + 112, + 105, + 111, + 0, + 0, + 71, + 80, + 73, + 79, + 32, + 97, + 112, + 112, + 108, + 105, + 99, + 97, + 116, + 105, + 111, + 110, + 32, + 115, + 116, + 97, + 114, + 116, + 105, + 110, + 103, + 46, + 10, + 0, + 65, + 112, + 112, + 108, + 105, + 99, + 97, + 116, + 105, + 111, + 110, + 32, + 101, + 120, + 105, + 116, + 105, + 110, + 103, + 46, + 10, + 0, + 0, + 0, + 69, + 82, + 82, + 79, + 82, + 58, + 32, + 67, + 111, + 117, + 108, + 100, + 32, + 110, + 111, + 116, + 32, + 115, + 101, + 116, + 32, + 116, + 105, + 109, + 101, + 114, + 32, + 112, + 101, + 114, + 105, + 111, + 100, + 58, + 32, + 37, + 115, + 32, + 40, + 37, + 100, + 41, + 46, + 10, + 0, + 0, + 0, + 0, + 69, + 82, + 82, + 79, + 82, + 58, + 32, + 85, + 110, + 97, + 98, + 108, + 101, + 32, + 116, + 111, + 32, + 99, + 114, + 101, + 97, + 116, + 101, + 32, + 116, + 105, + 109, + 101, + 114, + 58, + 32, + 37, + 115, + 32, + 40, + 37, + 100, + 41, + 46, + 10, + 0, + 0, + 0, + 0, + 69, + 82, + 82, + 79, + 82, + 58, + 32, + 85, + 110, + 97, + 98, + 108, + 101, + 32, + 116, + 111, + 32, + 114, + 101, + 103, + 105, + 115, + 116, + 101, + 114, + 32, + 116, + 105, + 109, + 101, + 114, + 32, + 101, + 118, + 101, + 110, + 116, + 58, + 32, + 37, + 115, + 32, + 40, + 37, + 100, + 41, + 46, + 10, + 0, + 0, + 0, + 0, + 69, + 82, + 82, + 79, + 82, + 58, + 32, + 67, + 111, + 117, + 108, + 100, + 32, + 110, + 111, + 116, + 32, + 114, + 101, + 97, + 100, + 32, + 116, + 105, + 109, + 101, + 114, + 102, + 100, + 32, + 37, + 115, + 32, + 40, + 37, + 100, + 41, + 46, + 10, + 0, + 8, + 177, + 1, + 129, + 176, + 176, + 0, + 132, + 0, + 0, + 0, + 0, + 180, + 243, + 255, + 127, + 0, + 132, + 4, + 128, + 236, + 243, + 255, + 127, + 176, + 176, + 176, + 128, + 68, + 244, + 255, + 127, + 176, + 176, + 168, + 128, + 148, + 244, + 255, + 127, + 216, + 255, + 255, + 127, + 188, + 244, + 255, + 127, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 233, + 9, + 0, + 0, + 145, + 9, + 0, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 216, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 131, + 1, + 0, + 0, + 12, + 0, + 0, + 0, + 141, + 7, + 0, + 0, + 13, + 0, + 0, + 0, + 135, + 18, + 0, + 0, + 25, + 0, + 0, + 0, + 248, + 30, + 1, + 0, + 27, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 26, + 0, + 0, + 0, + 252, + 30, + 1, + 0, + 28, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 245, + 254, + 255, + 111, + 144, + 1, + 0, + 0, + 5, + 0, + 0, + 0, + 228, + 3, + 0, + 0, + 6, + 0, + 0, + 0, + 180, + 1, + 0, + 0, + 10, + 0, + 0, + 0, + 24, + 2, + 0, + 0, + 11, + 0, + 0, + 0, + 16, + 0, + 0, + 0, + 21, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 0, + 32, + 1, + 0, + 2, + 0, + 0, + 0, + 200, + 0, + 0, + 0, + 20, + 0, + 0, + 0, + 17, + 0, + 0, + 0, + 23, + 0, + 0, + 0, + 196, + 6, + 0, + 0, + 17, + 0, + 0, + 0, + 100, + 6, + 0, + 0, + 18, + 0, + 0, + 0, + 96, + 0, + 0, + 0, + 19, + 0, + 0, + 0, + 8, + 0, + 0, + 0, + 251, + 255, + 255, + 111, + 0, + 0, + 0, + 8, + 254, + 255, + 255, + 111, + 68, + 6, + 0, + 0, + 255, + 255, + 255, + 111, + 1, + 0, + 0, + 0, + 240, + 255, + 255, + 111, + 252, + 5, + 0, + 0, + 250, + 255, + 255, + 111, + 6, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 31, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 148, + 7, + 0, + 0, + 148, + 7, + 0, + 0, + 148, + 7, + 0, + 0, + 148, + 7, + 0, + 0, + 148, + 7, + 0, + 0, + 148, + 7, + 0, + 0, + 148, + 7, + 0, + 0, + 148, + 7, + 0, + 0, + 148, + 7, + 0, + 0, + 148, + 7, + 0, + 0, + 148, + 7, + 0, + 0, + 148, + 7, + 0, + 0, + 148, + 7, + 0, + 0, + 148, + 7, + 0, + 0, + 148, + 7, + 0, + 0, + 148, + 7, + 0, + 0, + 148, + 7, + 0, + 0, + 148, + 7, + 0, + 0, + 148, + 7, + 0, + 0, + 148, + 7, + 0, + 0, + 148, + 7, + 0, + 0, + 148, + 7, + 0, + 0, + 148, + 7, + 0, + 0, + 148, + 7, + 0, + 0, + 148, + 7, + 0, + 0, + 245, + 14, + 0, + 0, + 135, + 18, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 141, + 7, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 148, + 32, + 1, + 0, + 255, + 255, + 255, + 255, + 255, + 255, + 255, + 255, + 1, + 1, + 71, + 67, + 67, + 58, + 32, + 40, + 71, + 78, + 85, + 41, + 32, + 57, + 46, + 51, + 46, + 48, + 0, + 65, + 58, + 0, + 0, + 0, + 97, + 101, + 97, + 98, + 105, + 0, + 1, + 48, + 0, + 0, + 0, + 5, + 55, + 86, + 69, + 0, + 6, + 10, + 7, + 65, + 8, + 1, + 9, + 2, + 10, + 5, + 12, + 2, + 18, + 4, + 19, + 1, + 20, + 1, + 21, + 1, + 23, + 3, + 24, + 1, + 26, + 2, + 28, + 1, + 30, + 4, + 34, + 1, + 42, + 1, + 44, + 2, + 68, + 3, + 0, + 46, + 115, + 104, + 115, + 116, + 114, + 116, + 97, + 98, + 0, + 46, + 105, + 110, + 116, + 101, + 114, + 112, + 0, + 46, + 110, + 111, + 116, + 101, + 46, + 103, + 110, + 117, + 46, + 98, + 117, + 105, + 108, + 100, + 45, + 105, + 100, + 0, + 46, + 103, + 110, + 117, + 46, + 104, + 97, + 115, + 104, + 0, + 46, + 100, + 121, + 110, + 115, + 121, + 109, + 0, + 46, + 100, + 121, + 110, + 115, + 116, + 114, + 0, + 46, + 103, + 110, + 117, + 46, + 118, + 101, + 114, + 115, + 105, + 111, + 110, + 0, + 46, + 103, + 110, + 117, + 46, + 118, + 101, + 114, + 115, + 105, + 111, + 110, + 95, + 114, + 0, + 46, + 114, + 101, + 108, + 46, + 100, + 121, + 110, + 0, + 46, + 114, + 101, + 108, + 46, + 112, + 108, + 116, + 0, + 46, + 105, + 110, + 105, + 116, + 0, + 46, + 116, + 101, + 120, + 116, + 0, + 46, + 102, + 105, + 110, + 105, + 0, + 46, + 114, + 111, + 100, + 97, + 116, + 97, + 0, + 46, + 65, + 82, + 77, + 46, + 101, + 120, + 116, + 97, + 98, + 0, + 46, + 65, + 82, + 77, + 46, + 101, + 120, + 105, + 100, + 120, + 0, + 46, + 101, + 104, + 95, + 102, + 114, + 97, + 109, + 101, + 0, + 46, + 105, + 110, + 105, + 116, + 95, + 97, + 114, + 114, + 97, + 121, + 0, + 46, + 102, + 105, + 110, + 105, + 95, + 97, + 114, + 114, + 97, + 121, + 0, + 46, + 100, + 121, + 110, + 97, + 109, + 105, + 99, + 0, + 46, + 103, + 111, + 116, + 0, + 46, + 100, + 97, + 116, + 97, + 0, + 46, + 98, + 115, + 115, + 0, + 46, + 99, + 111, + 109, + 109, + 101, + 110, + 116, + 0, + 46, + 65, + 82, + 77, + 46, + 97, + 116, + 116, + 114, + 105, + 98, + 117, + 116, + 101, + 115, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 11, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 84, + 1, + 0, + 0, + 84, + 1, + 0, + 0, + 24, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 19, + 0, + 0, + 0, + 7, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 108, + 1, + 0, + 0, + 108, + 1, + 0, + 0, + 36, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 38, + 0, + 0, + 0, + 246, + 255, + 255, + 111, + 2, + 0, + 0, + 0, + 144, + 1, + 0, + 0, + 144, + 1, + 0, + 0, + 36, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 48, + 0, + 0, + 0, + 11, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 180, + 1, + 0, + 0, + 180, + 1, + 0, + 0, + 48, + 2, + 0, + 0, + 5, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 16, + 0, + 0, + 0, + 56, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 228, + 3, + 0, + 0, + 228, + 3, + 0, + 0, + 24, + 2, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 64, + 0, + 0, + 0, + 255, + 255, + 255, + 111, + 2, + 0, + 0, + 0, + 252, + 5, + 0, + 0, + 252, + 5, + 0, + 0, + 70, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 77, + 0, + 0, + 0, + 254, + 255, + 255, + 111, + 2, + 0, + 0, + 0, + 68, + 6, + 0, + 0, + 68, + 6, + 0, + 0, + 32, + 0, + 0, + 0, + 5, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 92, + 0, + 0, + 0, + 9, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 100, + 6, + 0, + 0, + 100, + 6, + 0, + 0, + 96, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 8, + 0, + 0, + 0, + 101, + 0, + 0, + 0, + 9, + 0, + 0, + 0, + 66, + 0, + 0, + 0, + 196, + 6, + 0, + 0, + 196, + 6, + 0, + 0, + 200, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 21, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 8, + 0, + 0, + 0, + 110, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 6, + 0, + 0, + 0, + 140, + 7, + 0, + 0, + 140, + 7, + 0, + 0, + 8, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 105, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 6, + 0, + 0, + 0, + 148, + 7, + 0, + 0, + 148, + 7, + 0, + 0, + 64, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 116, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 6, + 0, + 0, + 0, + 212, + 8, + 0, + 0, + 212, + 8, + 0, + 0, + 178, + 9, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 122, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 6, + 0, + 0, + 0, + 134, + 18, + 0, + 0, + 134, + 18, + 0, + 0, + 8, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 128, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 144, + 18, + 0, + 0, + 144, + 18, + 0, + 0, + 160, + 2, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 136, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 48, + 21, + 0, + 0, + 48, + 21, + 0, + 0, + 12, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 147, + 0, + 0, + 0, + 1, + 0, + 0, + 112, + 130, + 0, + 0, + 0, + 60, + 21, + 0, + 0, + 60, + 21, + 0, + 0, + 40, + 0, + 0, + 0, + 12, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 158, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 100, + 21, + 0, + 0, + 100, + 21, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 168, + 0, + 0, + 0, + 14, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 248, + 30, + 1, + 0, + 248, + 30, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 180, + 0, + 0, + 0, + 15, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 252, + 30, + 1, + 0, + 252, + 30, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 192, + 0, + 0, + 0, + 6, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 0, + 31, + 1, + 0, + 0, + 31, + 0, + 0, + 0, + 1, + 0, + 0, + 5, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 8, + 0, + 0, + 0, + 201, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 0, + 32, + 1, + 0, + 0, + 32, + 0, + 0, + 148, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 206, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 148, + 32, + 1, + 0, + 148, + 32, + 0, + 0, + 14, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 212, + 0, + 0, + 0, + 8, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 164, + 32, + 1, + 0, + 162, + 32, + 0, + 0, + 48, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 217, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 48, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 162, + 32, + 0, + 0, + 17, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 226, + 0, + 0, + 0, + 3, + 0, + 0, + 112, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 179, + 32, + 0, + 0, + 59, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 238, + 32, + 0, + 0, + 242, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 52, + 88, + 52, + 77, + 5, + 0, + 0, + 0, + 73, + 68, + 36, + 0, + 10, + 0, + 0, + 0, + 92, + 19, + 127, + 220, + 116, + 96, + 73, + 77, + 170, + 58, + 22, + 14, + 78, + 237, + 136, + 79, + 145, + 10, + 79, + 160, + 105, + 179, + 73, + 66, + 164, + 125, + 40, + 193, + 24, + 226, + 203, + 59, + 83, + 71, + 24, + 0, + 168, + 213, + 204, + 105, + 88, + 244, + 135, + 16, + 20, + 13, + 122, + 38, + 22, + 15, + 193, + 207, + 195, + 31, + 93, + 240, + 1, + 0, + 0, + 0, + 68, + 66, + 40, + 0, + 12, + 28, + 187, + 95, + 0, + 0, + 0, + 0, + 71, + 80, + 73, + 79, + 95, + 72, + 105, + 103, + 104, + 76, + 101, + 118, + 101, + 108, + 65, + 112, + 112, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 84, + 80, + 4, + 0, + 2, + 0, + 0, + 0, + 78, + 68, + 12, + 0, + 1, + 0, + 0, + 0, + 7, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 148, + 0, + 0, + 0, + 66, + 189, + 155, + 231, + 70, + 176, + 24, + 216, + 234, + 70, + 209, + 156, + 96, + 63, + 33, + 17, + 173, + 51, + 233, + 224, + 160, + 219, + 134, + 166, + 43, + 119, + 21, + 41, + 75, + 69, + 118, + 183, + 175, + 191, + 161, + 36, + 38, + 45, + 80, + 57, + 230, + 2, + 92, + 63, + 165, + 232, + 73, + 11, + 194, + 83, + 30, + 69, + 189, + 21, + 11, + 152, + 238, + 8, + 109, + 244, + 15, + 40, + 93, + 22 + ], + "Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "imagecontext4": [ + 69, + 61, + 205, + 40, + 0, + 64, + 0, + 0, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 67, + 111, + 109, + 112, + 114, + 101, + 115, + 115, + 101, + 100, + 32, + 82, + 79, + 77, + 70, + 83, + 169, + 213, + 86, + 196, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 67, + 111, + 109, + 112, + 114, + 101, + 115, + 115, + 101, + 100, + 0, + 0, + 0, + 0, + 0, + 0, + 237, + 65, + 0, + 0, + 48, + 0, + 0, + 0, + 192, + 4, + 0, + 0, + 164, + 131, + 0, + 0, + 234, + 0, + 0, + 0, + 5, + 0, + 1, + 0, + 97, + 112, + 112, + 95, + 109, + 97, + 110, + 105, + 102, + 101, + 115, + 116, + 46, + 106, + 115, + 111, + 110, + 0, + 0, + 0, + 237, + 65, + 0, + 0, + 16, + 0, + 0, + 0, + 193, + 7, + 0, + 0, + 98, + 105, + 110, + 0, + 237, + 131, + 0, + 0, + 216, + 21, + 0, + 0, + 1, + 0, + 2, + 0, + 97, + 112, + 112, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 123, + 34, + 83, + 99, + 104, + 101, + 109, + 97, + 86, + 101, + 114, + 115, + 105, + 111, + 110, + 34, + 58, + 49, + 44, + 34, + 78, + 97, + 109, + 101, + 34, + 58, + 34, + 72, + 101, + 108, + 108, + 111, + 87, + 111, + 114, + 108, + 100, + 95, + 72, + 105, + 103, + 104, + 76, + 101, + 118, + 101, + 108, + 65, + 112, + 112, + 34, + 44, + 34, + 67, + 111, + 109, + 112, + 111, + 110, + 101, + 110, + 116, + 73, + 100, + 34, + 58, + 34, + 49, + 54, + 56, + 57, + 100, + 56, + 98, + 50, + 45, + 99, + 56, + 51, + 53, + 45, + 50, + 101, + 50, + 55, + 45, + 50, + 55, + 97, + 100, + 45, + 101, + 56, + 57, + 52, + 100, + 54, + 100, + 49, + 53, + 102, + 97, + 57, + 34, + 44, + 34, + 69, + 110, + 116, + 114, + 121, + 80, + 111, + 105, + 110, + 116, + 34, + 58, + 34, + 47, + 98, + 105, + 110, + 47, + 97, + 112, + 112, + 34, + 44, + 34, + 67, + 109, + 100, + 65, + 114, + 103, + 115, + 34, + 58, + 91, + 93, + 44, + 34, + 67, + 97, + 112, + 97, + 98, + 105, + 108, + 105, + 116, + 105, + 101, + 115, + 34, + 58, + 123, + 34, + 71, + 112, + 105, + 111, + 34, + 58, + 91, + 56, + 93, + 125, + 44, + 34, + 65, + 112, + 112, + 108, + 105, + 99, + 97, + 116, + 105, + 111, + 110, + 84, + 121, + 112, + 101, + 34, + 58, + 34, + 68, + 101, + 102, + 97, + 117, + 108, + 116, + 34, + 44, + 34, + 84, + 97, + 114, + 103, + 101, + 116, + 65, + 112, + 112, + 108, + 105, + 99, + 97, + 116, + 105, + 111, + 110, + 82, + 117, + 110, + 116, + 105, + 109, + 101, + 86, + 101, + 114, + 115, + 105, + 111, + 110, + 34, + 58, + 55, + 125, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 127, + 69, + 76, + 70, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 3, + 0, + 40, + 0, + 1, + 0, + 0, + 0, + 9, + 6, + 0, + 0, + 52, + 0, + 0, + 0, + 160, + 17, + 0, + 0, + 0, + 4, + 0, + 5, + 52, + 0, + 32, + 0, + 9, + 0, + 40, + 0, + 27, + 0, + 26, + 0, + 1, + 0, + 0, + 112, + 156, + 8, + 0, + 0, + 156, + 8, + 0, + 0, + 156, + 8, + 0, + 0, + 40, + 0, + 0, + 0, + 40, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 6, + 0, + 0, + 0, + 52, + 0, + 0, + 0, + 52, + 0, + 0, + 0, + 52, + 0, + 0, + 0, + 32, + 1, + 0, + 0, + 32, + 1, + 0, + 0, + 4, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 84, + 1, + 0, + 0, + 84, + 1, + 0, + 0, + 84, + 1, + 0, + 0, + 24, + 0, + 0, + 0, + 24, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 200, + 8, + 0, + 0, + 200, + 8, + 0, + 0, + 5, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 248, + 14, + 0, + 0, + 248, + 14, + 1, + 0, + 248, + 14, + 1, + 0, + 104, + 1, + 0, + 0, + 132, + 1, + 0, + 0, + 6, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 2, + 0, + 0, + 0, + 0, + 15, + 0, + 0, + 0, + 15, + 1, + 0, + 0, + 15, + 1, + 0, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 6, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 108, + 1, + 0, + 0, + 108, + 1, + 0, + 0, + 108, + 1, + 0, + 0, + 36, + 0, + 0, + 0, + 36, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 81, + 229, + 116, + 100, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 6, + 0, + 0, + 0, + 16, + 0, + 0, + 0, + 82, + 229, + 116, + 100, + 248, + 14, + 0, + 0, + 248, + 14, + 1, + 0, + 248, + 14, + 1, + 0, + 8, + 1, + 0, + 0, + 8, + 1, + 0, + 0, + 4, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 47, + 108, + 105, + 98, + 47, + 108, + 100, + 45, + 109, + 117, + 115, + 108, + 45, + 97, + 114, + 109, + 104, + 102, + 46, + 115, + 111, + 46, + 49, + 0, + 4, + 0, + 0, + 0, + 20, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 71, + 78, + 85, + 0, + 80, + 14, + 155, + 83, + 0, + 35, + 184, + 63, + 43, + 169, + 216, + 79, + 231, + 255, + 216, + 209, + 216, + 161, + 48, + 193, + 2, + 0, + 0, + 0, + 19, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 5, + 0, + 0, + 0, + 0, + 36, + 0, + 129, + 19, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 234, + 211, + 239, + 14, + 185, + 141, + 241, + 14, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 104, + 5, + 0, + 0, + 0, + 0, + 0, + 0, + 3, + 0, + 10, + 0, + 0, + 0, + 0, + 0, + 92, + 16, + 1, + 0, + 0, + 0, + 0, + 0, + 3, + 0, + 22, + 0, + 173, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 32, + 0, + 0, + 0, + 145, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 32, + 0, + 0, + 0, + 17, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 45, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 40, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 17, + 0, + 0, + 0, + 130, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 34, + 0, + 0, + 0, + 70, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 108, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 32, + 0, + 0, + 0, + 223, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 197, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 32, + 0, + 0, + 0, + 28, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 18, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 63, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 84, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 72, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 0, + 0, + 0, + 58, + 0, + 0, + 0, + 9, + 8, + 0, + 0, + 2, + 0, + 0, + 0, + 18, + 0, + 13, + 0, + 64, + 0, + 0, + 0, + 105, + 5, + 0, + 0, + 2, + 0, + 0, + 0, + 18, + 0, + 10, + 0, + 0, + 108, + 105, + 98, + 97, + 112, + 112, + 108, + 105, + 98, + 115, + 46, + 115, + 111, + 46, + 48, + 0, + 95, + 95, + 97, + 101, + 97, + 98, + 105, + 95, + 117, + 110, + 119, + 105, + 110, + 100, + 95, + 99, + 112, + 112, + 95, + 112, + 114, + 48, + 0, + 71, + 80, + 73, + 79, + 95, + 79, + 112, + 101, + 110, + 65, + 115, + 79, + 117, + 116, + 112, + 117, + 116, + 0, + 95, + 102, + 105, + 110, + 105, + 0, + 95, + 105, + 110, + 105, + 116, + 0, + 71, + 80, + 73, + 79, + 95, + 83, + 101, + 116, + 86, + 97, + 108, + 117, + 101, + 0, + 76, + 111, + 103, + 95, + 68, + 101, + 98, + 117, + 103, + 0, + 108, + 105, + 98, + 103, + 99, + 99, + 95, + 115, + 46, + 115, + 111, + 46, + 49, + 0, + 95, + 95, + 114, + 101, + 103, + 105, + 115, + 116, + 101, + 114, + 95, + 102, + 114, + 97, + 109, + 101, + 95, + 105, + 110, + 102, + 111, + 0, + 95, + 95, + 99, + 120, + 97, + 95, + 102, + 105, + 110, + 97, + 108, + 105, + 122, + 101, + 0, + 95, + 73, + 84, + 77, + 95, + 100, + 101, + 114, + 101, + 103, + 105, + 115, + 116, + 101, + 114, + 84, + 77, + 67, + 108, + 111, + 110, + 101, + 84, + 97, + 98, + 108, + 101, + 0, + 95, + 95, + 100, + 101, + 114, + 101, + 103, + 105, + 115, + 116, + 101, + 114, + 95, + 102, + 114, + 97, + 109, + 101, + 95, + 105, + 110, + 102, + 111, + 0, + 95, + 73, + 84, + 77, + 95, + 114, + 101, + 103, + 105, + 115, + 116, + 101, + 114, + 84, + 77, + 67, + 108, + 111, + 110, + 101, + 84, + 97, + 98, + 108, + 101, + 0, + 95, + 95, + 97, + 101, + 97, + 98, + 105, + 95, + 117, + 110, + 119, + 105, + 110, + 100, + 95, + 99, + 112, + 112, + 95, + 112, + 114, + 49, + 0, + 108, + 105, + 98, + 99, + 46, + 115, + 111, + 46, + 49, + 0, + 95, + 95, + 115, + 116, + 97, + 99, + 107, + 95, + 99, + 104, + 107, + 95, + 103, + 117, + 97, + 114, + 100, + 0, + 110, + 97, + 110, + 111, + 115, + 108, + 101, + 101, + 112, + 0, + 95, + 95, + 101, + 114, + 114, + 110, + 111, + 95, + 108, + 111, + 99, + 97, + 116, + 105, + 111, + 110, + 0, + 95, + 95, + 108, + 105, + 98, + 99, + 95, + 115, + 116, + 97, + 114, + 116, + 95, + 109, + 97, + 105, + 110, + 0, + 115, + 116, + 114, + 101, + 114, + 114, + 111, + 114, + 0, + 95, + 95, + 115, + 116, + 97, + 99, + 107, + 95, + 99, + 104, + 107, + 95, + 102, + 97, + 105, + 108, + 0, + 71, + 67, + 67, + 95, + 51, + 46, + 53, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 94, + 0, + 0, + 0, + 16, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 85, + 38, + 121, + 11, + 0, + 0, + 2, + 0, + 89, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 248, + 14, + 1, + 0, + 23, + 0, + 0, + 0, + 252, + 14, + 1, + 0, + 23, + 0, + 0, + 0, + 56, + 16, + 1, + 0, + 23, + 0, + 0, + 0, + 60, + 16, + 1, + 0, + 23, + 0, + 0, + 0, + 72, + 16, + 1, + 0, + 23, + 0, + 0, + 0, + 92, + 16, + 1, + 0, + 23, + 0, + 0, + 0, + 64, + 16, + 1, + 0, + 21, + 3, + 0, + 0, + 68, + 16, + 1, + 0, + 21, + 4, + 0, + 0, + 76, + 16, + 1, + 0, + 21, + 8, + 0, + 0, + 80, + 16, + 1, + 0, + 21, + 9, + 0, + 0, + 84, + 16, + 1, + 0, + 21, + 11, + 0, + 0, + 88, + 16, + 1, + 0, + 21, + 13, + 0, + 0, + 12, + 16, + 1, + 0, + 22, + 3, + 0, + 0, + 16, + 16, + 1, + 0, + 22, + 6, + 0, + 0, + 20, + 16, + 1, + 0, + 22, + 7, + 0, + 0, + 24, + 16, + 1, + 0, + 22, + 9, + 0, + 0, + 28, + 16, + 1, + 0, + 22, + 10, + 0, + 0, + 32, + 16, + 1, + 0, + 22, + 11, + 0, + 0, + 36, + 16, + 1, + 0, + 22, + 14, + 0, + 0, + 40, + 16, + 1, + 0, + 22, + 15, + 0, + 0, + 44, + 16, + 1, + 0, + 22, + 16, + 0, + 0, + 48, + 16, + 1, + 0, + 22, + 17, + 0, + 0, + 52, + 16, + 1, + 0, + 22, + 18, + 0, + 0, + 1, + 181, + 189, + 232, + 1, + 64, + 112, + 71, + 4, + 224, + 45, + 229, + 4, + 224, + 159, + 229, + 14, + 224, + 143, + 224, + 8, + 240, + 190, + 229, + 128, + 10, + 1, + 0, + 0, + 198, + 143, + 226, + 16, + 202, + 140, + 226, + 128, + 250, + 188, + 229, + 0, + 198, + 143, + 226, + 16, + 202, + 140, + 226, + 120, + 250, + 188, + 229, + 0, + 198, + 143, + 226, + 16, + 202, + 140, + 226, + 112, + 250, + 188, + 229, + 0, + 198, + 143, + 226, + 16, + 202, + 140, + 226, + 104, + 250, + 188, + 229, + 0, + 198, + 143, + 226, + 16, + 202, + 140, + 226, + 96, + 250, + 188, + 229, + 0, + 198, + 143, + 226, + 16, + 202, + 140, + 226, + 88, + 250, + 188, + 229, + 0, + 198, + 143, + 226, + 16, + 202, + 140, + 226, + 80, + 250, + 188, + 229, + 0, + 198, + 143, + 226, + 16, + 202, + 140, + 226, + 72, + 250, + 188, + 229, + 0, + 198, + 143, + 226, + 16, + 202, + 140, + 226, + 64, + 250, + 188, + 229, + 0, + 198, + 143, + 226, + 16, + 202, + 140, + 226, + 56, + 250, + 188, + 229, + 0, + 198, + 143, + 226, + 16, + 202, + 140, + 226, + 48, + 250, + 188, + 229, + 79, + 240, + 0, + 11, + 79, + 240, + 0, + 14, + 3, + 73, + 121, + 68, + 104, + 70, + 32, + 240, + 15, + 12, + 229, + 70, + 0, + 240, + 2, + 248, + 234, + 8, + 1, + 0, + 31, + 181, + 11, + 75, + 11, + 74, + 123, + 68, + 154, + 88, + 2, + 146, + 10, + 74, + 154, + 88, + 3, + 146, + 0, + 34, + 1, + 146, + 9, + 74, + 155, + 88, + 2, + 29, + 0, + 147, + 2, + 155, + 1, + 104, + 3, + 152, + 255, + 247, + 162, + 239, + 5, + 176, + 93, + 248, + 4, + 251, + 0, + 191, + 210, + 9, + 1, + 0, + 72, + 0, + 0, + 0, + 56, + 0, + 0, + 0, + 60, + 0, + 0, + 0, + 6, + 72, + 7, + 75, + 120, + 68, + 123, + 68, + 6, + 74, + 131, + 66, + 122, + 68, + 3, + 208, + 5, + 75, + 211, + 88, + 3, + 177, + 24, + 71, + 112, + 71, + 0, + 191, + 244, + 9, + 1, + 0, + 242, + 9, + 1, + 0, + 140, + 9, + 1, + 0, + 68, + 0, + 0, + 0, + 8, + 72, + 9, + 73, + 120, + 68, + 121, + 68, + 9, + 26, + 8, + 74, + 203, + 15, + 3, + 235, + 161, + 1, + 122, + 68, + 73, + 16, + 3, + 208, + 5, + 75, + 211, + 88, + 3, + 177, + 24, + 71, + 112, + 71, + 0, + 191, + 200, + 9, + 1, + 0, + 198, + 9, + 1, + 0, + 90, + 9, + 1, + 0, + 88, + 0, + 0, + 0, + 14, + 75, + 16, + 181, + 123, + 68, + 14, + 76, + 27, + 120, + 124, + 68, + 163, + 185, + 13, + 75, + 227, + 88, + 35, + 177, + 12, + 75, + 123, + 68, + 24, + 104, + 255, + 247, + 100, + 239, + 255, + 247, + 191, + 255, + 10, + 75, + 227, + 88, + 27, + 177, + 9, + 72, + 120, + 68, + 255, + 247, + 72, + 239, + 8, + 75, + 1, + 34, + 123, + 68, + 26, + 112, + 16, + 189, + 0, + 191, + 148, + 9, + 1, + 0, + 46, + 9, + 1, + 0, + 80, + 0, + 0, + 0, + 126, + 9, + 1, + 0, + 64, + 0, + 0, + 0, + 210, + 1, + 0, + 0, + 100, + 9, + 1, + 0, + 8, + 181, + 7, + 75, + 7, + 74, + 123, + 68, + 155, + 88, + 43, + 177, + 6, + 73, + 7, + 72, + 121, + 68, + 120, + 68, + 255, + 247, + 70, + 239, + 189, + 232, + 8, + 64, + 170, + 231, + 0, + 191, + 218, + 8, + 1, + 0, + 84, + 0, + 0, + 0, + 52, + 9, + 1, + 0, + 146, + 1, + 0, + 0, + 144, + 181, + 133, + 176, + 0, + 175, + 40, + 74, + 122, + 68, + 40, + 75, + 211, + 88, + 27, + 104, + 251, + 96, + 79, + 240, + 0, + 3, + 38, + 75, + 123, + 68, + 24, + 70, + 255, + 247, + 66, + 239, + 1, + 34, + 0, + 33, + 8, + 32, + 255, + 247, + 20, + 239, + 56, + 96, + 59, + 104, + 179, + 241, + 255, + 63, + 28, + 209, + 255, + 247, + 36, + 239, + 3, + 70, + 27, + 104, + 24, + 70, + 255, + 247, + 44, + 239, + 4, + 70, + 255, + 247, + 28, + 239, + 3, + 70, + 27, + 104, + 26, + 70, + 33, + 70, + 24, + 75, + 123, + 68, + 24, + 70, + 255, + 247, + 38, + 239, + 1, + 35, + 22, + 73, + 121, + 68, + 18, + 74, + 138, + 88, + 17, + 104, + 250, + 104, + 81, + 64, + 25, + 208, + 22, + 224, + 1, + 35, + 123, + 96, + 0, + 35, + 187, + 96, + 0, + 33, + 56, + 104, + 255, + 247, + 246, + 238, + 59, + 29, + 0, + 33, + 24, + 70, + 255, + 247, + 2, + 239, + 1, + 33, + 56, + 104, + 255, + 247, + 236, + 238, + 59, + 29, + 0, + 33, + 24, + 70, + 255, + 247, + 250, + 238, + 236, + 231, + 255, + 247, + 8, + 239, + 24, + 70, + 20, + 55, + 189, + 70, + 144, + 189, + 168, + 8, + 1, + 0, + 76, + 0, + 0, + 0, + 168, + 0, + 0, + 0, + 154, + 0, + 0, + 0, + 82, + 8, + 1, + 0, + 1, + 181, + 189, + 232, + 1, + 64, + 112, + 71, + 83, + 116, + 97, + 114, + 116, + 105, + 110, + 103, + 32, + 67, + 77, + 97, + 107, + 101, + 32, + 72, + 101, + 108, + 108, + 111, + 32, + 87, + 111, + 114, + 108, + 100, + 32, + 97, + 112, + 112, + 108, + 105, + 99, + 97, + 116, + 105, + 111, + 110, + 46, + 46, + 46, + 10, + 0, + 0, + 69, + 114, + 114, + 111, + 114, + 32, + 111, + 112, + 101, + 110, + 105, + 110, + 103, + 32, + 71, + 80, + 73, + 79, + 58, + 32, + 37, + 115, + 32, + 40, + 37, + 100, + 41, + 46, + 32, + 67, + 104, + 101, + 99, + 107, + 32, + 116, + 104, + 97, + 116, + 32, + 97, + 112, + 112, + 95, + 109, + 97, + 110, + 105, + 102, + 101, + 115, + 116, + 46, + 106, + 115, + 111, + 110, + 32, + 105, + 110, + 99, + 108, + 117, + 100, + 101, + 115, + 32, + 116, + 104, + 101, + 32, + 71, + 80, + 73, + 79, + 32, + 117, + 115, + 101, + 100, + 46, + 10, + 0, + 0, + 8, + 177, + 1, + 129, + 176, + 176, + 0, + 132, + 0, + 0, + 0, + 0, + 136, + 253, + 255, + 127, + 0, + 132, + 4, + 128, + 192, + 253, + 255, + 127, + 176, + 176, + 176, + 128, + 24, + 254, + 255, + 127, + 176, + 176, + 168, + 128, + 104, + 254, + 255, + 127, + 216, + 255, + 255, + 127, + 144, + 254, + 255, + 127, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 29, + 7, + 0, + 0, + 197, + 6, + 0, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 94, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 246, + 0, + 0, + 0, + 12, + 0, + 0, + 0, + 105, + 5, + 0, + 0, + 13, + 0, + 0, + 0, + 9, + 8, + 0, + 0, + 25, + 0, + 0, + 0, + 248, + 14, + 1, + 0, + 27, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 26, + 0, + 0, + 0, + 252, + 14, + 1, + 0, + 28, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 245, + 254, + 255, + 111, + 144, + 1, + 0, + 0, + 5, + 0, + 0, + 0, + 4, + 3, + 0, + 0, + 6, + 0, + 0, + 0, + 180, + 1, + 0, + 0, + 10, + 0, + 0, + 0, + 97, + 1, + 0, + 0, + 11, + 0, + 0, + 0, + 16, + 0, + 0, + 0, + 21, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 0, + 16, + 1, + 0, + 2, + 0, + 0, + 0, + 88, + 0, + 0, + 0, + 20, + 0, + 0, + 0, + 17, + 0, + 0, + 0, + 23, + 0, + 0, + 0, + 16, + 5, + 0, + 0, + 17, + 0, + 0, + 0, + 176, + 4, + 0, + 0, + 18, + 0, + 0, + 0, + 96, + 0, + 0, + 0, + 19, + 0, + 0, + 0, + 8, + 0, + 0, + 0, + 251, + 255, + 255, + 111, + 0, + 0, + 0, + 8, + 254, + 255, + 255, + 111, + 144, + 4, + 0, + 0, + 255, + 255, + 255, + 111, + 1, + 0, + 0, + 0, + 240, + 255, + 255, + 111, + 102, + 4, + 0, + 0, + 250, + 255, + 255, + 111, + 6, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 15, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 112, + 5, + 0, + 0, + 112, + 5, + 0, + 0, + 112, + 5, + 0, + 0, + 112, + 5, + 0, + 0, + 112, + 5, + 0, + 0, + 112, + 5, + 0, + 0, + 112, + 5, + 0, + 0, + 112, + 5, + 0, + 0, + 112, + 5, + 0, + 0, + 112, + 5, + 0, + 0, + 112, + 5, + 0, + 0, + 77, + 7, + 0, + 0, + 9, + 8, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 105, + 5, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 92, + 16, + 1, + 0, + 71, + 67, + 67, + 58, + 32, + 40, + 71, + 78, + 85, + 41, + 32, + 57, + 46, + 51, + 46, + 48, + 0, + 65, + 58, + 0, + 0, + 0, + 97, + 101, + 97, + 98, + 105, + 0, + 1, + 48, + 0, + 0, + 0, + 5, + 55, + 86, + 69, + 0, + 6, + 10, + 7, + 65, + 8, + 1, + 9, + 2, + 10, + 5, + 12, + 2, + 18, + 4, + 19, + 1, + 20, + 1, + 21, + 1, + 23, + 3, + 24, + 1, + 26, + 2, + 28, + 1, + 30, + 4, + 34, + 1, + 42, + 1, + 44, + 2, + 68, + 3, + 0, + 46, + 115, + 104, + 115, + 116, + 114, + 116, + 97, + 98, + 0, + 46, + 105, + 110, + 116, + 101, + 114, + 112, + 0, + 46, + 110, + 111, + 116, + 101, + 46, + 103, + 110, + 117, + 46, + 98, + 117, + 105, + 108, + 100, + 45, + 105, + 100, + 0, + 46, + 103, + 110, + 117, + 46, + 104, + 97, + 115, + 104, + 0, + 46, + 100, + 121, + 110, + 115, + 121, + 109, + 0, + 46, + 100, + 121, + 110, + 115, + 116, + 114, + 0, + 46, + 103, + 110, + 117, + 46, + 118, + 101, + 114, + 115, + 105, + 111, + 110, + 0, + 46, + 103, + 110, + 117, + 46, + 118, + 101, + 114, + 115, + 105, + 111, + 110, + 95, + 114, + 0, + 46, + 114, + 101, + 108, + 46, + 100, + 121, + 110, + 0, + 46, + 114, + 101, + 108, + 46, + 112, + 108, + 116, + 0, + 46, + 105, + 110, + 105, + 116, + 0, + 46, + 116, + 101, + 120, + 116, + 0, + 46, + 102, + 105, + 110, + 105, + 0, + 46, + 114, + 111, + 100, + 97, + 116, + 97, + 0, + 46, + 65, + 82, + 77, + 46, + 101, + 120, + 116, + 97, + 98, + 0, + 46, + 65, + 82, + 77, + 46, + 101, + 120, + 105, + 100, + 120, + 0, + 46, + 101, + 104, + 95, + 102, + 114, + 97, + 109, + 101, + 0, + 46, + 105, + 110, + 105, + 116, + 95, + 97, + 114, + 114, + 97, + 121, + 0, + 46, + 102, + 105, + 110, + 105, + 95, + 97, + 114, + 114, + 97, + 121, + 0, + 46, + 100, + 121, + 110, + 97, + 109, + 105, + 99, + 0, + 46, + 103, + 111, + 116, + 0, + 46, + 100, + 97, + 116, + 97, + 0, + 46, + 98, + 115, + 115, + 0, + 46, + 99, + 111, + 109, + 109, + 101, + 110, + 116, + 0, + 46, + 65, + 82, + 77, + 46, + 97, + 116, + 116, + 114, + 105, + 98, + 117, + 116, + 101, + 115, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 11, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 84, + 1, + 0, + 0, + 84, + 1, + 0, + 0, + 24, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 19, + 0, + 0, + 0, + 7, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 108, + 1, + 0, + 0, + 108, + 1, + 0, + 0, + 36, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 38, + 0, + 0, + 0, + 246, + 255, + 255, + 111, + 2, + 0, + 0, + 0, + 144, + 1, + 0, + 0, + 144, + 1, + 0, + 0, + 36, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 48, + 0, + 0, + 0, + 11, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 180, + 1, + 0, + 0, + 180, + 1, + 0, + 0, + 80, + 1, + 0, + 0, + 5, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 16, + 0, + 0, + 0, + 56, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 4, + 3, + 0, + 0, + 4, + 3, + 0, + 0, + 97, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 64, + 0, + 0, + 0, + 255, + 255, + 255, + 111, + 2, + 0, + 0, + 0, + 102, + 4, + 0, + 0, + 102, + 4, + 0, + 0, + 42, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 77, + 0, + 0, + 0, + 254, + 255, + 255, + 111, + 2, + 0, + 0, + 0, + 144, + 4, + 0, + 0, + 144, + 4, + 0, + 0, + 32, + 0, + 0, + 0, + 5, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 92, + 0, + 0, + 0, + 9, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 176, + 4, + 0, + 0, + 176, + 4, + 0, + 0, + 96, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 8, + 0, + 0, + 0, + 101, + 0, + 0, + 0, + 9, + 0, + 0, + 0, + 66, + 0, + 0, + 0, + 16, + 5, + 0, + 0, + 16, + 5, + 0, + 0, + 88, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 21, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 8, + 0, + 0, + 0, + 110, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 6, + 0, + 0, + 0, + 104, + 5, + 0, + 0, + 104, + 5, + 0, + 0, + 8, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 105, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 6, + 0, + 0, + 0, + 112, + 5, + 0, + 0, + 112, + 5, + 0, + 0, + 152, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 116, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 6, + 0, + 0, + 0, + 8, + 6, + 0, + 0, + 8, + 6, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 122, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 6, + 0, + 0, + 0, + 8, + 8, + 0, + 0, + 8, + 8, + 0, + 0, + 8, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 128, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 16, + 8, + 0, + 0, + 16, + 8, + 0, + 0, + 127, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 136, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 144, + 8, + 0, + 0, + 144, + 8, + 0, + 0, + 12, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 147, + 0, + 0, + 0, + 1, + 0, + 0, + 112, + 130, + 0, + 0, + 0, + 156, + 8, + 0, + 0, + 156, + 8, + 0, + 0, + 40, + 0, + 0, + 0, + 12, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 158, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 196, + 8, + 0, + 0, + 196, + 8, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 168, + 0, + 0, + 0, + 14, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 248, + 14, + 1, + 0, + 248, + 14, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 180, + 0, + 0, + 0, + 15, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 252, + 14, + 1, + 0, + 252, + 14, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 192, + 0, + 0, + 0, + 6, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 0, + 15, + 1, + 0, + 0, + 15, + 0, + 0, + 0, + 1, + 0, + 0, + 5, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 8, + 0, + 0, + 0, + 201, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 0, + 16, + 1, + 0, + 0, + 16, + 0, + 0, + 92, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 206, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 92, + 16, + 1, + 0, + 92, + 16, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 212, + 0, + 0, + 0, + 8, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 96, + 16, + 1, + 0, + 96, + 16, + 0, + 0, + 28, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 217, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 48, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 96, + 16, + 0, + 0, + 17, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 226, + 0, + 0, + 0, + 3, + 0, + 0, + 112, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 113, + 16, + 0, + 0, + 59, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 172, + 16, + 0, + 0, + 242, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 52, + 88, + 52, + 77, + 5, + 0, + 0, + 0, + 73, + 68, + 36, + 0, + 10, + 0, + 0, + 0, + 178, + 216, + 137, + 22, + 53, + 200, + 39, + 46, + 39, + 173, + 232, + 148, + 214, + 209, + 95, + 169, + 26, + 13, + 107, + 156, + 120, + 63, + 130, + 67, + 134, + 221, + 55, + 26, + 171, + 195, + 224, + 6, + 83, + 71, + 24, + 0, + 168, + 213, + 204, + 105, + 88, + 244, + 135, + 16, + 20, + 13, + 122, + 38, + 22, + 15, + 193, + 207, + 195, + 31, + 93, + 240, + 1, + 0, + 0, + 0, + 68, + 66, + 40, + 0, + 172, + 228, + 186, + 95, + 0, + 0, + 0, + 0, + 72, + 101, + 108, + 108, + 111, + 87, + 111, + 114, + 108, + 100, + 95, + 72, + 105, + 103, + 104, + 76, + 101, + 118, + 101, + 108, + 65, + 112, + 112, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 84, + 80, + 4, + 0, + 2, + 0, + 0, + 0, + 78, + 68, + 12, + 0, + 1, + 0, + 0, + 0, + 7, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 148, + 0, + 0, + 0, + 133, + 117, + 45, + 46, + 157, + 54, + 170, + 71, + 33, + 1, + 164, + 165, + 149, + 254, + 185, + 178, + 163, + 85, + 68, + 91, + 59, + 97, + 53, + 98, + 240, + 121, + 60, + 140, + 201, + 230, + 122, + 194, + 44, + 76, + 174, + 28, + 44, + 255, + 111, + 4, + 108, + 176, + 132, + 33, + 39, + 32, + 54, + 41, + 67, + 71, + 104, + 72, + 187, + 95, + 28, + 192, + 53, + 122, + 173, + 44, + 223, + 190, + 142, + 60 + ], + "SubscriptionId": "82f138e0-1c79-4708-bda1-5e224cd688b2", + "resourceGroup": "v-jiajiCEVRG", + "deviceID3": "DBB0E0CB8BD961A6129096E1E8A1375AC1FA274F030C08161B37AE3BC5A94F443BDB628CF257BC5BC810D8768C03B6F5CA301A35CD0169F56A49624255964560", + "DevDeviceGroup": "Development", + "firstCatalog": "firstCatalog", + "anotherDeviceGroup": "DeviceGroupTrans", + "defaultLocation": ".default", + "deviceID2": "B15332603BA55FB52B00FEC8549FDAA46B7FB6BA35694BC8943131CCB4B302846D224580A27880A2996B9FD4F1B2699400B1627059B6A90D67DD29E2984EE147", + "deviceID6": "1D318B77308F859C1D35CC88EC8599F4B6FA1BD27DDF28312B6CBAE5F04B6FA329B7139C82AE33D6D4C507DB317D36A8A8139BFBB4FE6ECB20DEAB4CEEC0FC87", + "imageID2": "d1d0ad2a-5054-4c88-897c-36fa01684dd0", + "region": "WestUS3", + "firstProduct": "Product1", + "anotherProduct": "Product3" +} diff --git a/src/Sphere/Sphere.Autorest/test/imagefile/AzureSphereBlink1.imagepackage b/src/Sphere/Sphere.Autorest/test/imagefile/AzureSphereBlink1.imagepackage new file mode 100644 index 0000000000000000000000000000000000000000..7f6d5d47b1568644d70dbb00a7e17dc9ca6a8769 GIT binary patch literal 16596 zcmeHOYiu0V6~1Gy)B;y z7S=X20a5`i2o#VSC5S?cDq0oQkw^il!9i4g@Muvf6{UYdDvOjBY!K8Dfo#8TW(RK^ zTJeJ)tu#0J_MCIi?WqEI+xQ*tC_sHUmLbe>wXM5icn>l6w zXo{B~Qiqgu!a_U!iZQHOc^2E!x}}Y%bA4{Q{VPwb7tqUqmjN#WUIx4jcp30A;AOze zfR_O;16~Ha4EzseVDIMMc1gmI_PJ6hYVdo!5Em>Eq8aqD3-I9+Ma@DMCD5%9%c)QK zN>H6c4NM5WA3(s>_N6}|!+~)1eAl2KvWrT{1of!40rGiiKs!W{T_f50)8#^(E|+Y? z;j|xMyUyDLAd3l968KM0?_NU!vWsfe6Rz%tDJur?yh4AzzpxGZ{Py|I13`ZfQJ>Hv z^@&*BNZL%)DaJ^AC}<{wjkbOX^z47f^*h89RqbC_n|h5GcYlBMf$+ztUTVE@v;ew` z0LHQVTP^OO%<}H*)8)_I{{eb_en~mWLF`gnxvPQ^*w#|9%wcU=#^+}?=X_A+Eq2R= zV4iXXP|EG|2y41#iQeRJIHX3>!;W@qO4ZxUt!XQjwnTUcCJY{R?teIJT1s?J zI2zv*9!@Jp3=Ksy3eA*+HinR4UD1h;V5j~<_&dNGcDB!4;eV(LkEVEBHY!#B^<*UpQGyEvMGTB zzJ4W=;PuQY&hz;X9$%2TM$xfpQ+QqQs=WKc+|QMBCC+gE`wI*>-&l668C}Rb7Rikj z&izYJ|7nhHz<8&8U5<9gesp2a!tU|Vp@D(}rQL@H3J-{YbfBdB z@Ib+(;-P}WQoQhBcJ_zUMH9PE`_72Tmr5kjiQI4CeE}A97WZUAwgH^u zAo*e)Qa;p1%#OI#Sj%9;%FIXJgaZ*~x4v>Q)>n>CA+(vz^oa9w{&$ zTAr#nCMNGgj5R}z5BA#US?NAH~wKVRED7FvrQu85yekkP^`cqQ%G*^SduK&crL= zsesXc^Y?;PV%4>ZSeZd@KYYLV1An1d$#`eqm+ZPzd37JX|L!~4S>JSJd-eKb?GK{= zkD(8}=)=>%r$8@ccdVA~)J)Bi$4 z|1<-uv6g!k>pDKyU3@FYbKO}6aF2kcpuKlk2Ff+(3Q#N`u?u$Ao>e*d9ZQLbAQlX&krF{YX{o_sJspgsHEg-Hn6Ra|V#Y-BNedrr=s?1TR%M;S|dafIQ~`A%kbTjOE(z0*~#Q?Zf#* z4Cd)+$6>4jwA%=9{t=v))N{_dcKkaQ#^)U4nG2CO4eWNH5*pyzxpV3u6}iHAgax>E z6$na{u~WH18y23ixOP=&kocl@_vP#uq8bLo>)_qu#=8dW3ewQ#_Lry_EKHJ?w9dQystdv`SGwiN)1yI_sklKB)B_VzWyAN|b ziEEcv<*{A{ybO35@G{_Kz{`M_0WSky20qU~^FZ?!u9dq&)%ID%pT|~jtlJQ7edd+7 zE6%)CxA0Np$4izCtnaw{qV-RYerMh3?H!fk$v0ln20psGV#%VhHA@%2@P`*K-#x>1 zXJ})MSo-ay5e7f+j|W(pSNi*W_Fm!oP?^1E<$i+e+J}KNZ}0fY{rBGUz2o25x5HSL zd4A%+{x_T7*xYrqFI=2FaO%)CZ|TqYltXvD@r#z8UoC8W>gD5;)svCOw_o$u^uy1U IKXT*00X<2ulmGw# literal 0 HcmV?d00001 diff --git a/src/Sphere/Sphere.Autorest/test/imagefile/ErrorReporting.imagepackage b/src/Sphere/Sphere.Autorest/test/imagefile/ErrorReporting.imagepackage new file mode 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`aW+Vu5fnnYCAHTxqv;XPL8e{mfT{l)0G^ZF*9v9M^g2 z?bUO{Tt>+lmW-M=$7-&;{pR`PsB<{4dd7-l)w_=!K))N&?*qU-U?a-b_-y68*1}z` zswQQd>N0)4gM)(udDqAf z3~Na z2cO11&l8IT6kQRX%8gAPRI?wZs0Dh2M-7_$G1F64Vlk!H^t5EeSGqMn+KwQm8LJ~6 z7ao74yBn`lnBf#%k7*qVU5$@V=>I5leDO|lJf)wjST5FG<~YKwGwjmOKP)?rZPEhZ z62=naaaxm|SbAU4E0pWtob{WgE-vSxiHp7SWiD*yL(~iSf1!%Vp;QS*vFRAC8we0wJ zER4@N#xoZpZ5kNuKqWN5va{yYBUGe_@dzET?3@Tnj0H*AfQdd}%nl7Y2`W;=Jdg$e z+OeDq17bU5i`XXVLBO)x4I6^bJc}&5hfx8$=nnAo^FGVgviqKCXSDkQViA^(F)jH3 zWFBB~ESTqa*LA2e>}dN8z#}}`aj*YAoU9nA8nZhAnJJ^4dEN((4&$~ML?3iTybSPq z4LdxSI4C(bETSFpd%&{e^J@$2#l@wY4~my}}0X z6l2ZGJt^0>j80lTJ>*as+{i>+(Cj~{x gh$A$(bM8Xd@ +## Upcoming Release + +## Version 0.1.0 +* First preview release for module Az.Sphere + diff --git a/src/Sphere/Sphere/Properties/AssemblyInfo.cs b/src/Sphere/Sphere/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..bbed02b177d1 --- /dev/null +++ b/src/Sphere/Sphere/Properties/AssemblyInfo.cs @@ -0,0 +1,28 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Reflection; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("Microsoft Azure Powershell - Sphere")] +[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)] +[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)] +[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)] + +[assembly: ComVisible(false)] +[assembly: CLSCompliant(false)] +[assembly: Guid("7b10e20c-02b2-4ac4-8f81-e136e7bb8d56")] +[assembly: AssemblyVersion("0.1.0")] +[assembly: AssemblyFileVersion("0.1.0")] diff --git a/src/Sphere/Sphere/Sphere.csproj b/src/Sphere/Sphere/Sphere.csproj new file mode 100644 index 000000000000..a394eb97dab9 --- /dev/null +++ b/src/Sphere/Sphere/Sphere.csproj @@ -0,0 +1,28 @@ + + + + + + + Sphere + + + + netstandard2.0 + $(AzAssemblyPrefix)$(PsModuleName) + $(AzAssemblyPrefix)$(PsModuleName) + true + false + $(RepoArtifacts)$(Configuration)\Az.$(PsModuleName)\ + $(OutputPath) + + + + + + + + + + + diff --git a/src/Sphere/Sphere/help/Az.Sphere.md b/src/Sphere/Sphere/help/Az.Sphere.md new file mode 100644 index 000000000000..fee4f5b906d5 --- /dev/null +++ b/src/Sphere/Sphere/help/Az.Sphere.md @@ -0,0 +1,120 @@ +--- +Module Name: Az.Sphere +Module Guid: {{ Update Module Guid }} +Download Help Link: {{ Update Download Link }} +Help Version: {{ Update Help Version }} +Locale: {{ Update Locale }} +--- + +# Az.Sphere Module +## Description +{{ Fill in the Description }} + +## Az.Sphere Cmdlets +### [Get-AzSphereCatalog](Get-AzSphereCatalog.md) +Get a Catalog + +### [Get-AzSphereCatalogDevice](Get-AzSphereCatalogDevice.md) +Lists devices for catalog. + +### [Get-AzSphereCatalogDeviceGroup](Get-AzSphereCatalogDeviceGroup.md) +List the device groups for the catalog. + +### [Get-AzSphereCatalogDeviceInsight](Get-AzSphereCatalogDeviceInsight.md) +Lists device insights for catalog. + +### [Get-AzSphereCertificate](Get-AzSphereCertificate.md) +Get a Certificate + +### [Get-AzSphereCertificateCertChain](Get-AzSphereCertificateCertChain.md) +Retrieves cert chain. + +### [Get-AzSphereCertificateProof](Get-AzSphereCertificateProof.md) +Gets the proof of possession nonce. + +### [Get-AzSphereDeployment](Get-AzSphereDeployment.md) +Get a Deployment. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + +### [Get-AzSphereDevice](Get-AzSphereDevice.md) +Get a Device. +Use '.unassigned' or '.default' for the device group and product names when a device does not belong to a device group and product. + +### [Get-AzSphereDeviceGroup](Get-AzSphereDeviceGroup.md) +Get a DeviceGroup. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + +### [Get-AzSphereImage](Get-AzSphereImage.md) +Get a Image + +### [Get-AzSphereProduct](Get-AzSphereProduct.md) +Get a Product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. + +### [Invoke-AzSphereCountCatalogDevice](Invoke-AzSphereCountCatalogDevice.md) +Counts devices in catalog. + +### [Invoke-AzSphereCountDeviceGroupDevice](Invoke-AzSphereCountDeviceGroupDevice.md) +Counts devices in device group. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + +### [Invoke-AzSphereCountProductDevice](Invoke-AzSphereCountProductDevice.md) +Counts devices in product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. + +### [New-AzSphereCatalog](New-AzSphereCatalog.md) +Create a Catalog + +### [New-AzSphereDeployment](New-AzSphereDeployment.md) +Create a Deployment. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + +### [New-AzSphereDevice](New-AzSphereDevice.md) +Create a Device. +Use '.unassigned' or '.default' for the device group and product names to claim a device to the catalog only. + +### [New-AzSphereDeviceCapabilityImage](New-AzSphereDeviceCapabilityImage.md) +Generates the capability image for the device. +Use '.unassigned' or '.default' for the device group and product names to generate the image for a device that does not belong to a specific device group and product. + +### [New-AzSphereDeviceGroup](New-AzSphereDeviceGroup.md) +Create a DeviceGroup. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + +### [New-AzSphereImage](New-AzSphereImage.md) +Create a Image + +### [New-AzSphereProduct](New-AzSphereProduct.md) +Create a Product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. + +### [New-AzSphereProductDefaultDeviceGroup](New-AzSphereProductDefaultDeviceGroup.md) +Generates default device groups for the product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. + +### [Remove-AzSphereCatalog](Remove-AzSphereCatalog.md) +Delete a Catalog + +### [Remove-AzSphereDeviceGroup](Remove-AzSphereDeviceGroup.md) +Delete a DeviceGroup. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + +### [Remove-AzSphereProduct](Remove-AzSphereProduct.md) +Delete a Product. +'.default' and '.unassigned' are system defined values and cannot be used for product name' + +### [Update-AzSphereCatalog](Update-AzSphereCatalog.md) +Update a Catalog + +### [Update-AzSphereDevice](Update-AzSphereDevice.md) +Update a Device. +Use '.unassigned' or '.default' for the device group and product names to move a device to the catalog level. + +### [Update-AzSphereDeviceGroup](Update-AzSphereDeviceGroup.md) +Update a DeviceGroup. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + +### [Update-AzSphereProduct](Update-AzSphereProduct.md) +Update a Product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. + diff --git a/src/Sphere/Sphere/help/Get-AzSphereCatalog.md b/src/Sphere/Sphere/help/Get-AzSphereCatalog.md new file mode 100644 index 000000000000..69e85cb19b7b --- /dev/null +++ b/src/Sphere/Sphere/help/Get-AzSphereCatalog.md @@ -0,0 +1,222 @@ +--- +external help file: Az.Sphere-help.xml +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/get-azspherecatalog +schema: 2.0.0 +--- + +# Get-AzSphereCatalog + +## SYNOPSIS +Get a Catalog + +## SYNTAX + +### List (Default) +``` +Get-AzSphereCatalog [-SubscriptionId ] [-DefaultProfile ] + [-ProgressAction ] [] +``` + +### Get +``` +Get-AzSphereCatalog -Name -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [-ProgressAction ] [] +``` + +### List1 +``` +Get-AzSphereCatalog -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] + [-ProgressAction ] [] +``` + +### GetViaIdentity +``` +Get-AzSphereCatalog -InputObject [-DefaultProfile ] + [-ProgressAction ] [] +``` + +## DESCRIPTION +Get a Catalog + +## EXAMPLES + +### Example 1: List all catalogs for a given resource group +```powershell +Get-AzSphereCatalog -ResourceGroupName test-sataneja-10 +``` + +```output +Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +-------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------- +global CAT43 9/24/2022 12:54:16 PM example@microsoft.com User 9/24/2022 12:54:16 PM example@microsoft.com User test-satan… +global CAT007 9/26/2022 8:58:15 PM example@microsoft.com User 9/26/2022 8:58:15 PM example@microsoft.com User test-satan… +global CAT10 10/10/2022 4:23:53 PM example@microsoft.com User 10/10/2022 4:23:53 PM example@microsoft.com User test-satan… +global TCAT01 10/14/2022 12:12:22 AM example@microsoft.com User 10/14/2022 12:12:22 AM example@microsoft.com User test-satan… +global TestCatalog1x3 4/25/2023 10:00:52 PM example@microsoft.com User 4/25/2023 10:00:52 PM example@microsoft.com User test-satan… +global TestCatalog1x3_Catalog 5/11/2023 6:12:50 PM example@microsoft.com User 5/11/2023 6:12:50 PM example@microsoft.com User test-satan… +``` + +This command lists all catalogs for a given resource group. + +### Example 2: Get specific catalog with specified resource group +```powershell +Get-AzSphereCatalog -Name "testcat" -ResourceGroupName "goyedokun" +``` + +```output +Id : /subscriptions/82f138e0-1c79-4708-bda1-5e224cd688b2/resourceGroups/goyedokun/providers/Microsoft.AzureSphere/catalogs/testcat +Location : global +Name : testcat +ProvisioningState : Succeeded +ResourceGroupName : goyedokun +RetryAfter : +SystemDataCreatedAt : 6/27/2023 6:49:50 PM +SystemDataCreatedBy : example@microsoft.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 6/27/2023 6:49:50 PM +SystemDataLastModifiedBy : example@microsoft.com +SystemDataLastModifiedByType : User +Tag : { + } +Type : microsoft.azuresphere/catalogs +``` + +This command get specific catalog with specified resource group. + +### Example 2: List all catalogs for connected subscription +```powershell +Get-AzSphereCatalog +``` + +```output +Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemData + LastModifi + edBy +-------- ---- ------------------- ------------------- ----------------------- ------------------------ ---------- +global MyCatalog3 4/21/2021 9:32:32 PM example@microsoft.com User 8/10/2023 3:21:08 PM example@m… +global MyCatalog2 5/20/2021 4:44:38 PM example@microsoft.com User 5/20/2021 4:44:38 PM example@m… +global MyCatalog1 5/20/2021 4:45:44 PM example@microsoft.com User 5/20/2021 4:45:44 PM example@m… +global CatalogARMSetup_39f85f04 8/18/2021 8:28:11 PM 5223a8bc-448a-411c-bcd4-7d41745ed6ba Application 8/18/2021 8:28:11 PM 5223a8bc-… +global CatalogARMSetup_3b15f308 9/17/2021 6:41:41 PM 5223a8bc-448a-411c-bcd4-7d41745ed6ba Application 9/17/2021 6:41:41 PM 5223a8bc-… +global mrarmcatalog1 9/21/2021 7:27:16 PM example@microsoft.com User 9/21/2021 7:27:16 PM example@m… +global CatalogARMSetup_eb5cca0a 9/21/2021 10:06:28 PM 5223a8bc-448a-411c-bcd4-7d41745ed6ba Application 9/21/2021 10:06:28 PM 5223a8bc-… +global CatalogARMSetup_f8c1fea7 9/21/2021 10:06:31 PM 5223a8bc-448a-411c-bcd4-7d41745ed6ba Application 9/21/2021 10:06:31 PM 5223a8bc-… +global CatalogARMSetup_f2d88f81 9/21/2021 10:06:38 PM 5223a8bc-448a-411c-bcd4-7d41745ed6ba Application 9/21/2021 10:06:38 PM 5223a8bc-… +global CatalogARMSetup_1711d4b8 9/21/2021 10:06:42 PM 5223a8bc-448a-411c-bcd4-7d41745ed6ba Application 9/21/2021 10:06:42 PM 5223a8bc-… +global CatalogARMSetup_04744136 10/1/2021 7:14:04 PM 5223a8bc-448a-411c-bcd4-7d41745ed6ba Application 10/1/2021 7:14:04 PM 5223a8bc-… +global CatalogARMSetup_bff4a3fe 10/5/2021 5:14:48 PM 5223a8bc-448a-411c-bcd4-7d41745ed6ba Application 10/5/2021 5:14:48 PM 5223a8bc-… +global CatalogARMSetup_e05ad6ac 10/5/2021 5:15:05 PM 5223a8bc-448a-411c-bcd4-7d41745ed6ba Application 10/5/2021 5:15:05 PM 5223a8bc-… +global newCatalog 8/15/2023 3:06:31 AM example@microsoft.com User 8/15/2023 3:10:39 AM example@m… +``` + +This command lists all catalogs for current subscription. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Name of catalog + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: CatalogName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get, List1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: List, Get, List1 +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog + +## NOTES + +## RELATED LINKS diff --git a/src/Sphere/Sphere/help/Get-AzSphereCatalogDevice.md b/src/Sphere/Sphere/help/Get-AzSphereCatalogDevice.md new file mode 100644 index 000000000000..b30576754a5b --- /dev/null +++ b/src/Sphere/Sphere/help/Get-AzSphereCatalogDevice.md @@ -0,0 +1,226 @@ +--- +external help file: Az.Sphere-help.xml +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/get-azspherecatalogdevice +schema: 2.0.0 +--- + +# Get-AzSphereCatalogDevice + +## SYNOPSIS +Lists devices for catalog. + +## SYNTAX + +``` +Get-AzSphereCatalogDevice -CatalogName -ResourceGroupName [-SubscriptionId ] + [-Filter ] [-Maxpagesize ] [-Skip ] [-Top ] [-DefaultProfile ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Lists devices for catalog. + +## EXAMPLES + +### Example 1: List for the specified catalog with resource group +```powershell +Get-AzSphereCatalogDevice -CatalogName test2024 -ResourceGroupName joyer-test +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy System + DataLa + stModi + fiedBy + Type +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ------ +dbb0e0cb8bd961a6129096e1e8a1375ac1fa274f030c08161b37ae3bc5a94f443bdb628cf257bc5bc810d8768c03b6f5ca301a35cd0169f56a49624255964560 +b15332603ba55fb52b00fec8549fdaa46b7fb6ba35694bc8943131ccb4b302846d224580a27880a2996b9fd4f1b2699400b1627059b6a90d67dd29e2984ee147 +5d257fbcf76a5853832122d9b0e2410daa1438e3c1cde005162a837a7535c08973cc819a50cf8eb724ffc88dada06b40bee6010e82a8f84d2fef0fc263061d67 +``` + +This command gets list of device resources for the specified catalog with resource group. + +## PARAMETERS + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter +Filter the result list using the given expression + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Maxpagesize +The maximum number of result items per page. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Top +The number of result items to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Skip +The number of result items to skip. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + +## NOTES + +## RELATED LINKS diff --git a/src/Sphere/Sphere/help/Get-AzSphereCatalogDeviceGroup.md b/src/Sphere/Sphere/help/Get-AzSphereCatalogDeviceGroup.md new file mode 100644 index 000000000000..21ffed4d2285 --- /dev/null +++ b/src/Sphere/Sphere/help/Get-AzSphereCatalogDeviceGroup.md @@ -0,0 +1,236 @@ +--- +external help file: Az.Sphere-help.xml +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/get-azspherecatalogdevicegroup +schema: 2.0.0 +--- + +# Get-AzSphereCatalogDeviceGroup + +## SYNOPSIS +List the device groups for the catalog. + +## SYNTAX + +``` +Get-AzSphereCatalogDeviceGroup -CatalogName -ResourceGroupName [-SubscriptionId ] + [-Filter ] [-Maxpagesize ] [-Skip ] [-Top ] [-DeviceGroupName ] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +List the device groups for the catalog. + +## EXAMPLES + +### Example 1: List for the specified catalog with resource group +```powershell +Get-AzSphereCatalogDeviceGroup -CatalogName test2024 -ResourceGroupName joyer-test +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +testdevicegroup joyer-test +testdevicegroup2 joyer-test +``` + +This command gets list of device groups for the specified catalog with resource group. + +## PARAMETERS + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceGroupName +Device Group name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter +Filter the result list using the given expression + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Maxpagesize +The maximum number of result items per page. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Top +The number of result items to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Skip +The number of result items to skip. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + +## NOTES + +## RELATED LINKS diff --git a/src/Sphere/Sphere/help/Get-AzSphereCatalogDeviceInsight.md b/src/Sphere/Sphere/help/Get-AzSphereCatalogDeviceInsight.md new file mode 100644 index 000000000000..a08e3c76c7ff --- /dev/null +++ b/src/Sphere/Sphere/help/Get-AzSphereCatalogDeviceInsight.md @@ -0,0 +1,214 @@ +--- +external help file: Az.Sphere-help.xml +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/get-azspherecatalogdeviceinsight +schema: 2.0.0 +--- + +# Get-AzSphereCatalogDeviceInsight + +## SYNOPSIS +Lists device insights for catalog. + +## SYNTAX + +``` +Get-AzSphereCatalogDeviceInsight -CatalogName -ResourceGroupName [-SubscriptionId ] + [-Filter ] [-Maxpagesize ] [-Skip ] [-Top ] [-DefaultProfile ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Lists device insights for catalog. + +## EXAMPLES + +### Example 1: List device insight +```powershell +Get-AzSphereCatalogDeviceInsight -CatalogName test2024 -ResourceGroupName joyer-test +``` + +This command gets a list of device insights for specified catalog. + +## PARAMETERS + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter +Filter the result list using the given expression + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Maxpagesize +The maximum number of result items per page. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Top +The number of result items to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Skip +The number of result items to skip. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceInsight + +## NOTES + +## RELATED LINKS diff --git a/src/Sphere/Sphere/help/Get-AzSphereCertificate.md b/src/Sphere/Sphere/help/Get-AzSphereCertificate.md new file mode 100644 index 000000000000..d22d59e74417 --- /dev/null +++ b/src/Sphere/Sphere/help/Get-AzSphereCertificate.md @@ -0,0 +1,271 @@ +--- +external help file: Az.Sphere-help.xml +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/get-azspherecertificate +schema: 2.0.0 +--- + +# Get-AzSphereCertificate + +## SYNOPSIS +Get a Certificate + +## SYNTAX + +### List (Default) +``` +Get-AzSphereCertificate -CatalogName -ResourceGroupName [-SubscriptionId ] + [-Filter ] [-Maxpagesize ] [-Skip ] [-Top ] [-DefaultProfile ] + [-ProgressAction ] [] +``` + +### Get +``` +Get-AzSphereCertificate -CatalogName -ResourceGroupName -SerialNumber + [-SubscriptionId ] [-DefaultProfile ] [-ProgressAction ] + [] +``` + +### GetViaIdentityCatalog +``` +Get-AzSphereCertificate -SerialNumber -CatalogInputObject + [-DefaultProfile ] [-ProgressAction ] [] +``` + +### GetViaIdentity +``` +Get-AzSphereCertificate -InputObject [-DefaultProfile ] + [-ProgressAction ] [] +``` + +## DESCRIPTION +Get a Certificate + +## EXAMPLES + +### Example 1: List for the specified catalog with resource group +```powershell +Get-AzSphereCertificate -CatalogName test2024 -ResourceGroupName joyer-test +``` + +```output +ExpiryUtc : 4/30/2024 10:51:54 PM +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024/certificates/'serial number' +Name : 'serial number' +NotBeforeUtc : 1/31/2024 10:51:54 PM +PropertiesCertificate : 'certificate information' +ProvisioningState : Succeeded +ResourceGroupName : joyer-test +Status : Active +Subject : CN=Microsoft Azure Sphere INT 7de8a199-bb33-4eda-9600-583103317243, O=Microsoft Corporation, L=Redmond, S=Washington, C=US +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Thumbprint : 92C60521BB46C72D66FA72CF59EF701D9269A236 +Type : Microsoft.AzureSphere/catalogs/certificates +``` + +This command get a list of certificate for the specified catalog with resource group. + +## PARAMETERS + +### -CatalogInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: GetViaIdentityCatalog +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: List, Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter +Filter the result list using the given expression + +```yaml +Type: System.String +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Maxpagesize +The maximum number of result items per page. + +```yaml +Type: System.Int32 +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: List, Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SerialNumber +Serial number of the certificate. +Use '.default' to get current active certificate. + +```yaml +Type: System.String +Parameter Sets: Get, GetViaIdentityCatalog +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: List, Get +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Top +The number of result items to return. + +```yaml +Type: System.Int32 +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Skip +The number of result items to skip. + +```yaml +Type: System.Int32 +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificate + +## NOTES + +## RELATED LINKS diff --git a/src/Sphere/Sphere/help/Get-AzSphereCertificateCertChain.md b/src/Sphere/Sphere/help/Get-AzSphereCertificateCertChain.md new file mode 100644 index 000000000000..43c2cf2e875d --- /dev/null +++ b/src/Sphere/Sphere/help/Get-AzSphereCertificateCertChain.md @@ -0,0 +1,221 @@ +--- +external help file: Az.Sphere-help.xml +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/get-azspherecertificatecertchain +schema: 2.0.0 +--- + +# Get-AzSphereCertificateCertChain + +## SYNOPSIS +Retrieves cert chain. + +## SYNTAX + +### Retrieve (Default) +``` +Get-AzSphereCertificateCertChain -CatalogName -ResourceGroupName -SerialNumber + [-SubscriptionId ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] + [-Confirm] [] +``` + +### RetrieveViaIdentityCatalog +``` +Get-AzSphereCertificateCertChain -SerialNumber -CatalogInputObject + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### RetrieveViaIdentity +``` +Get-AzSphereCertificateCertChain -InputObject [-DefaultProfile ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Retrieves cert chain. + +## EXAMPLES + +### Example 1: Get a certificate cert chain +```powershell +Get-AzSphereCertificateCertChain -CatalogName test2024 -ResourceGroupName joyer-test -SerialNumber 'serial number' +``` + +```output +CertificateChain +---------------- +'information' +``` + +This command gets a certificate cert chain. + +## PARAMETERS + +### -CatalogInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: RetrieveViaIdentityCatalog +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: Retrieve +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: RetrieveViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Retrieve +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SerialNumber +Serial number of the certificate. +Use '.default' to get current active certificate. + +```yaml +Type: System.String +Parameter Sets: Retrieve, RetrieveViaIdentityCatalog +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: Retrieve +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICertificateChainResponse + +## NOTES + +## RELATED LINKS diff --git a/src/Sphere/Sphere/help/Get-AzSphereCertificateProof.md b/src/Sphere/Sphere/help/Get-AzSphereCertificateProof.md new file mode 100644 index 000000000000..d55a9af90eab --- /dev/null +++ b/src/Sphere/Sphere/help/Get-AzSphereCertificateProof.md @@ -0,0 +1,241 @@ +--- +external help file: Az.Sphere-help.xml +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/get-azspherecertificateproof +schema: 2.0.0 +--- + +# Get-AzSphereCertificateProof + +## SYNOPSIS +Gets the proof of possession nonce. + +## SYNTAX + +### RetrieveExpanded (Default) +``` +Get-AzSphereCertificateProof -CatalogName -ResourceGroupName -SerialNumber + [-SubscriptionId ] -ProofOfPossessionNonce [-DefaultProfile ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### RetrieveViaIdentityCatalogExpanded +``` +Get-AzSphereCertificateProof -SerialNumber -CatalogInputObject + -ProofOfPossessionNonce [-DefaultProfile ] [-ProgressAction ] [-WhatIf] + [-Confirm] [] +``` + +### RetrieveViaIdentityExpanded +``` +Get-AzSphereCertificateProof -InputObject -ProofOfPossessionNonce + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Gets the proof of possession nonce. + +## EXAMPLES + +### Example 1: Get a proof Of Possession Nonce +```powershell +Get-AzSphereCertificateProof -CatalogName test2024 -ResourceGroupName joyer-test -SerialNumber 'serial number' -ProofOfPossessionNonce proofOfPossessionNonce +``` + +```output +Certificate : 'information' +ExpiryUtc : +NotBeforeUtc : +ProvisioningState : +Status : +Subject : +Thumbprint : +``` + +This command gets a proof Of Possession Nonce for specified catalog and serial number. + +## PARAMETERS + +### -CatalogInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: RetrieveViaIdentityCatalogExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: RetrieveExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: RetrieveViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProofOfPossessionNonce +The proof of possession nonce + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: RetrieveExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SerialNumber +Serial number of the certificate. +Use '.default' to get current active certificate. + +```yaml +Type: System.String +Parameter Sets: RetrieveExpanded, RetrieveViaIdentityCatalogExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: RetrieveExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProofOfPossessionNonceResponse + +## NOTES + +## RELATED LINKS diff --git a/src/Sphere/Sphere/help/Get-AzSphereDeployment.md b/src/Sphere/Sphere/help/Get-AzSphereDeployment.md new file mode 100644 index 000000000000..42225cd2a19d --- /dev/null +++ b/src/Sphere/Sphere/help/Get-AzSphereDeployment.md @@ -0,0 +1,375 @@ +--- +external help file: Az.Sphere-help.xml +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/get-azspheredeployment +schema: 2.0.0 +--- + +# Get-AzSphereDeployment + +## SYNOPSIS +Get a Deployment. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + +## SYNTAX + +### List (Default) +``` +Get-AzSphereDeployment -CatalogName -DeviceGroupName -ProductName + -ResourceGroupName [-SubscriptionId ] [-Filter ] [-Maxpagesize ] + [-Skip ] [-Top ] [-DefaultProfile ] [-ProgressAction ] + [] +``` + +### Get +``` +Get-AzSphereDeployment -CatalogName -DeviceGroupName -Name -ProductName + -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] + [-ProgressAction ] [] +``` + +### GetViaIdentityProduct +``` +Get-AzSphereDeployment -DeviceGroupName -Name -ProductInputObject + [-DefaultProfile ] [-ProgressAction ] [] +``` + +### GetViaIdentityCatalog +``` +Get-AzSphereDeployment -DeviceGroupName -Name -ProductName + -CatalogInputObject [-DefaultProfile ] [-ProgressAction ] + [] +``` + +### GetViaIdentityDeviceGroup +``` +Get-AzSphereDeployment -Name -DeviceGroupInputObject [-DefaultProfile ] + [-ProgressAction ] [] +``` + +### GetViaIdentity +``` +Get-AzSphereDeployment -InputObject [-DefaultProfile ] + [-ProgressAction ] [] +``` + +## DESCRIPTION +Get a Deployment. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + +## EXAMPLES + +### Example 1: List by resource group +```powershell +Get-AzSphereDeployment -ResourceGroupName joyer-test -DeviceGroupName testdevicegroup -ProductName product2024 -CatalogName test2024 +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +009ada36-7515-4ff0-a54c-33b75bfae976 2/28/2024 2:36:04 AM 2/28/2024 2:36:04 AM joyer-test +2e83ddd9-6297-48df-9c2c-2257e6b3cc71 2/28/2024 2:57:56 AM 2/28/2024 2:57:56 AM joyer-test +``` + +This command lists all deployments for specified device group. + +### Example 2: Get specific deployment for device group +```powershell +Get-AzSphereDeployment -ResourceGroupName joyer-test -DeviceGroupName testdevicegroup -ProductName product2024 -CatalogName test2024 -Name 2e83ddd9-6297-48df-9c2c-2257e6b3cc71 +``` + +```output +DateUtc : 2/28/2024 2:57:56 AM +DeployedImage : {{ + "id": "/subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024/images/a04f0a91-b369-4249-a47d-28c118e2cb3b", + "name": "a04f0a91-b369-4249-a47d-28c118e2cb3b", + "type": "Microsoft.AzureSphere/catalogs/images", + "properties": { + "image": "GPIO_HighLevelApp", + "imageId": "a04f0a91-b369-4249-a47d-28c118e2cb3b", + "regionalDataBoundary": "None", + "uri": "https://as3imgptint003.blob.core.windows.net/7de8a199-bb33-4eda-9600-583103317243/imagesaks/a04f0a91-b369-4249-a47d-28c118e2cb3b?skoid=cc6e + 3fcf-ab4d-4b0d-b3f9-9769604c1e52\u0026sktid=72f988bf-86f1-41af-91ab-2d7cd011db47\u0026skt=2024-02-28T07%3A31%3A00Z\u0026ske=2024-02-28T08%3A36%3A00Z\u0 + 026sks=b\u0026skv=2021-12-02\u0026sv=2021-12-02\u0026spr=https,http\u0026se=2024-02-28T15%3A36%3A00Z\u0026sr=b\u0026sp=r\u0026sig=MbkzxZH1VQUGft%2BfXbE + DhubAVucDykFSEGgvqZVn5yk%3D", + "componentId": "dc7f135c-6074-4d49-aa3a-160e4eed884f", + "imageType": "Applications", + "provisioningState": "Succeeded" + } + }} +DeploymentId : 2e83ddd9-6297-48df-9c2c-2257e6b3cc71 +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024/products/product2024/de + viceGroups/testdevicegroup/deployments/2e83ddd9-6297-48df-9c2c-2257e6b3cc71 +Name : 2e83ddd9-6297-48df-9c2c-2257e6b3cc71 +ProvisioningState : Succeeded +ResourceGroupName : joyer-test +SystemDataCreatedAt : 2/28/2024 2:57:56 AM +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : 2/28/2024 2:57:56 AM +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.AzureSphere/catalogs/products/deviceGroups/deployments +``` + +This command gets specific deployment in specified device group. + +## PARAMETERS + +### -CatalogInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: GetViaIdentityCatalog +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: List, Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceGroupInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: GetViaIdentityDeviceGroup +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -DeviceGroupName +Name of device group. + +```yaml +Type: System.String +Parameter Sets: List, Get, GetViaIdentityProduct, GetViaIdentityCatalog +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter +Filter the result list using the given expression + +```yaml +Type: System.String +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Maxpagesize +The maximum number of result items per page. + +```yaml +Type: System.Int32 +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Deployment name. +Use .default for deployment creation and to get the current deployment for the associated device group. + +```yaml +Type: System.String +Parameter Sets: Get, GetViaIdentityProduct, GetViaIdentityCatalog, GetViaIdentityDeviceGroup +Aliases: DeploymentName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProductInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: GetViaIdentityProduct +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProductName +Name of product. + +```yaml +Type: System.String +Parameter Sets: List, Get, GetViaIdentityCatalog +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: List, Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: List, Get +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Top +The number of result items to return. + +```yaml +Type: System.Int32 +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Skip +The number of result items to skip. + +```yaml +Type: System.Int32 +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment + +## NOTES + +## RELATED LINKS diff --git a/src/Sphere/Sphere/help/Get-AzSphereDevice.md b/src/Sphere/Sphere/help/Get-AzSphereDevice.md new file mode 100644 index 000000000000..49920ea7b7ee --- /dev/null +++ b/src/Sphere/Sphere/help/Get-AzSphereDevice.md @@ -0,0 +1,304 @@ +--- +external help file: Az.Sphere-help.xml +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/get-azspheredevice +schema: 2.0.0 +--- + +# Get-AzSphereDevice + +## SYNOPSIS +Get a Device. +Use '.unassigned' or '.default' for the device group and product names when a device does not belong to a device group and product. + +## SYNTAX + +### List (Default) +``` +Get-AzSphereDevice -CatalogName -GroupName -ProductName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [-ProgressAction ] + [] +``` + +### Get +``` +Get-AzSphereDevice -CatalogName -GroupName -Name -ProductName + -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] + [-ProgressAction ] [] +``` + +### GetViaIdentityProduct +``` +Get-AzSphereDevice -GroupName -Name -ProductInputObject + [-DefaultProfile ] [-ProgressAction ] [] +``` + +### GetViaIdentityCatalog +``` +Get-AzSphereDevice -GroupName -Name -ProductName + -CatalogInputObject [-DefaultProfile ] [-ProgressAction ] + [] +``` + +### GetViaIdentityDeviceGroup +``` +Get-AzSphereDevice -Name -DeviceGroupInputObject [-DefaultProfile ] + [-ProgressAction ] [] +``` + +### GetViaIdentity +``` +Get-AzSphereDevice -InputObject [-DefaultProfile ] + [-ProgressAction ] [] +``` + +## DESCRIPTION +Get a Device. +Use '.unassigned' or '.default' for the device group and product names when a device does not belong to a device group and product. + +## EXAMPLES + +### Example 1: List by resource group +```powershell +Get-AzSphereDevice -CatalogName test2024 -ResourceGroupName "joyer-test" -GroupName testdevicegroup -ProductName product2024 +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy System + DataLa + stModi + fiedBy + Type +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ------ +dbb0e0cb8bd961a6129096e1e8a1375ac1fa274f030c08161b37ae3bc5a94f443bdb628cf257bc5bc810d8768c03b6f5ca301a35cd0169f56a49624255964560 +b15332603ba55fb52b00fec8549fdaa46b7fb6ba35694bc8943131ccb4b302846d224580a27880a2996b9fd4f1b2699400b1627059b6a90d67dd29e2984ee147 +5d257fbcf76a5853832122d9b0e2410daa1438e3c1cde005162a837a7535c08973cc819a50cf8eb724ffc88dada06b40bee6010e82a8f84d2fef0fc263061d67 +``` + +This command gets list of device resources by resource group. + +### Example 2: Get specific resource with specified resource group +```powershell +Get-AzSphereDevice -CatalogName test2024 -ResourceGroupName "joyer-test" -GroupName testdevicegroup -ProductName product2024 -Name dbb0e0cb8bd961a6129096e1e8a1375ac1fa274f030c08161b37ae3bc5a94f443bdb628cf257bc5bc810d8768c03b6f5ca301a35cd0169f56a49624255964560 +``` + +```output +ChipSku : MT3620AN +DeviceId : dbb0e0cb8bd961a6129096e1e8a1375ac1fa274f030c08161b37ae3bc5a94f443bdb628cf257bc5bc810d8768c03b6f5ca301a35cd0169f56a49624255964560 +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024/products/product2024/deviceGroups/testdevicegroup/devices/dbb0e0cb8bd961a6129096e1e8a1375ac1fa274f030c08161b37ae3bc5a94f443bdb628cf257bc5bc810d8768c03b6f5ca301a35cd0169f56a49624255964560 +LastAvailableOSVersion : +LastInstalledOSVersion : +LastOSUpdateUtc : +LastUpdateRequestUtc : +Name : dbb0e0cb8bd961a6129096e1e8a1375ac1fa274f030c08161b37ae3bc5a94f443bdb628cf257bc5bc810d8768c03b6f5ca301a35cd0169f56a49624255964560 +ProvisioningState : Succeeded +ResourceGroupName : joyer-test +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.AzureSphere/catalogs/products/deviceGroups/devices +``` + +This command gets specific device resource with specified resource group. + +## PARAMETERS + +### -CatalogInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: GetViaIdentityCatalog +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: List, Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceGroupInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: GetViaIdentityDeviceGroup +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -GroupName +Name of device group. + +```yaml +Type: System.String +Parameter Sets: List, Get, GetViaIdentityProduct, GetViaIdentityCatalog +Aliases: DeviceGroupName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Device name + +```yaml +Type: System.String +Parameter Sets: Get, GetViaIdentityProduct, GetViaIdentityCatalog, GetViaIdentityDeviceGroup +Aliases: DeviceName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProductInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: GetViaIdentityProduct +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProductName +Name of product. + +```yaml +Type: System.String +Parameter Sets: List, Get, GetViaIdentityCatalog +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: List, Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: List, Get +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + +## NOTES + +## RELATED LINKS diff --git a/src/Sphere/Sphere/help/Get-AzSphereDeviceGroup.md b/src/Sphere/Sphere/help/Get-AzSphereDeviceGroup.md new file mode 100644 index 000000000000..32dbff2eab1c --- /dev/null +++ b/src/Sphere/Sphere/help/Get-AzSphereDeviceGroup.md @@ -0,0 +1,337 @@ +--- +external help file: Az.Sphere-help.xml +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/get-azspheredevicegroup +schema: 2.0.0 +--- + +# Get-AzSphereDeviceGroup + +## SYNOPSIS +Get a DeviceGroup. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + +## SYNTAX + +### List (Default) +``` +Get-AzSphereDeviceGroup -CatalogName -ProductName -ResourceGroupName + [-SubscriptionId ] [-Filter ] [-Maxpagesize ] [-Skip ] [-Top ] + [-DefaultProfile ] [-ProgressAction ] [] +``` + +### Get +``` +Get-AzSphereDeviceGroup -CatalogName -Name -ProductName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [-ProgressAction ] + [] +``` + +### GetViaIdentityProduct +``` +Get-AzSphereDeviceGroup -Name -ProductInputObject [-DefaultProfile ] + [-ProgressAction ] [] +``` + +### GetViaIdentityCatalog +``` +Get-AzSphereDeviceGroup -Name -ProductName -CatalogInputObject + [-DefaultProfile ] [-ProgressAction ] [] +``` + +### GetViaIdentity +``` +Get-AzSphereDeviceGroup -InputObject [-DefaultProfile ] + [-ProgressAction ] [] +``` + +## DESCRIPTION +Get a DeviceGroup. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + +## EXAMPLES + +### Example 1: List device group for specific product with specified catalog and resource group +```powershell +Get-AzSphereDeviceGroup -CatalogName NewCatalog -ProductName MyProd815 -ResourceGroupName ps1-test +``` + +```output +AllowCrashDumpsCollection : Disabled +Description : test device group +HasDeployment : False +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/ps1-test/providers/Microsoft.AzureSphere/catalogs/NewCatalog/products/MyProd815/deviceGroups/Marketing +Name : Marketing +OSFeedType : Retail +ProvisioningState : Succeeded +RegionalDataBoundary : None +ResourceGroupName : ps1-test +RetryAfter : +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.AzureSphere/catalogs/products/deviceGroups +UpdatePolicy : UpdateAll +``` + +This command lists device groups. + +### Example 2: Get specific device group of specified product with specified catalog and resource group +```powershell +Get-AzSphereDeviceGroup -CatalogName NewCatalog -Name Marketing -ProductName MyProd815 -ResourceGroupName ps1-test +``` + +```output +AllowCrashDumpsCollection : Disabled +Description : test device group +HasDeployment : +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/ps1-test/providers/Microsoft.AzureSphere/catalogs/NewCatalog/products/MyProd815/deviceGroups/Marketing +Name : Marketing +OSFeedType : Retail +ProvisioningState : Succeeded +RegionalDataBoundary : None +ResourceGroupName : ps1-test +RetryAfter : +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.AzureSphere/catalogs/products/deviceGroups +UpdatePolicy : UpdateAll +``` + +This command gets specific device group. + +## PARAMETERS + +### -CatalogInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: GetViaIdentityCatalog +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: List, Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter +Filter the result list using the given expression + +```yaml +Type: System.String +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Maxpagesize +The maximum number of result items per page. + +```yaml +Type: System.Int32 +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Name of device group. + +```yaml +Type: System.String +Parameter Sets: Get, GetViaIdentityProduct, GetViaIdentityCatalog +Aliases: DeviceGroupName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProductInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: GetViaIdentityProduct +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProductName +Name of product. + +```yaml +Type: System.String +Parameter Sets: List, Get, GetViaIdentityCatalog +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: List, Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: List, Get +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Top +The number of result items to return. + +```yaml +Type: System.Int32 +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Skip +The number of result items to skip. + +```yaml +Type: System.Int32 +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + +## NOTES + +## RELATED LINKS diff --git a/src/Sphere/Sphere/help/Get-AzSphereImage.md b/src/Sphere/Sphere/help/Get-AzSphereImage.md new file mode 100644 index 000000000000..3b4c09f52341 --- /dev/null +++ b/src/Sphere/Sphere/help/Get-AzSphereImage.md @@ -0,0 +1,290 @@ +--- +external help file: Az.Sphere-help.xml +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/get-azsphereimage +schema: 2.0.0 +--- + +# Get-AzSphereImage + +## SYNOPSIS +Get a Image + +## SYNTAX + +### List (Default) +``` +Get-AzSphereImage -CatalogName -ResourceGroupName [-SubscriptionId ] + [-Filter ] [-Maxpagesize ] [-Skip ] [-Top ] [-DefaultProfile ] + [-ProgressAction ] [] +``` + +### Get +``` +Get-AzSphereImage -CatalogName -Name -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [-ProgressAction ] [] +``` + +### GetViaIdentityCatalog +``` +Get-AzSphereImage -Name -CatalogInputObject [-DefaultProfile ] + [-ProgressAction ] [] +``` + +### GetViaIdentity +``` +Get-AzSphereImage -InputObject [-DefaultProfile ] + [-ProgressAction ] [] +``` + +## DESCRIPTION +Get a Image + +## EXAMPLES + +### Example 1: List images for specific catalog with specified resource group +```powershell +Get-AzSphereImage -CatalogName MyCatalog1 -ResourceGroupName ResourceGroup1 +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDa + taLastMo + difiedBy + Type +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ -------- +fa0bdab1-42bc-4871-84d5-fa05c8c0c895 +5f05300e-b0e0-47d5-8255-e4bddb2ddd81 +``` + +This command lists images. + +### Example 2: Get specific image with specified catalog and resource group +```powershell +Get-AzSphereImage -CatalogName anotherCatalog -Name 14a6729e-5819-4737-8713-37b4798533f8 -ResourceGroupName Sphere-test +``` + +```output +ComponentId : 42257ad6-382d-405f-b7cc-e110fbda2d0b +Description : +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/Sphere-test/providers/Microsoft.AzureSphere/catalogs/anotherCatalog/images/14a6729e-5819-4737-8713-37b4798533f8 +ImageId : 14a6729e-5819-4737-8713-37b4798533f8 +ImageName : +ImageType : Applications +Name : 14a6729e-5819-4737-8713-37b4798533f8 +PropertiesImage : AzureSphereBlink1 +ProvisioningState : Succeeded +RegionalDataBoundary : None +ResourceGroupName : Sphere-test +RetryAfter : +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.AzureSphere/catalogs/images +Uri : https://as3imgptint003.blob.core.windows.net/9e508310-247c-4bba-add7-39169e9b7482/imagesaks/14a6729e-5819-4737-8713-37b4798533f8?skoid=41781aa8-e455-49b8-8db3-eb9232b581c2&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2024-01-30T08%3A27%3A57Z&ske=2024-01-30T09%3A32%3A57Z&sks=b&skv=2021-12-02&sv=2021-12-02&spr=https,http&se=2024-01-30T16%3A32%3A57Z&sr=b&sp=r&sig=EiMxkiDu6yHzV%2BB2LSqMp27AnJc3lKice%2Fm2AJ63r%2Bg%3D +``` + +This command get specific image. + +## PARAMETERS + +### -CatalogInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: GetViaIdentityCatalog +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: List, Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter +Filter the result list using the given expression + +```yaml +Type: System.String +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Maxpagesize +The maximum number of result items per page. + +```yaml +Type: System.Int32 +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Image name. +Use an image GUID for GA versions of the API. + +```yaml +Type: System.String +Parameter Sets: Get, GetViaIdentityCatalog +Aliases: ImageName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: List, Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: List, Get +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Top +The number of result items to return. + +```yaml +Type: System.Int32 +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Skip +The number of result items to skip. + +```yaml +Type: System.Int32 +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage + +## NOTES + +## RELATED LINKS diff --git a/src/Sphere/Sphere/help/Get-AzSphereProduct.md b/src/Sphere/Sphere/help/Get-AzSphereProduct.md new file mode 100644 index 000000000000..fcf548c6a43a --- /dev/null +++ b/src/Sphere/Sphere/help/Get-AzSphereProduct.md @@ -0,0 +1,220 @@ +--- +external help file: Az.Sphere-help.xml +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/get-azsphereproduct +schema: 2.0.0 +--- + +# Get-AzSphereProduct + +## SYNOPSIS +Get a Product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. + +## SYNTAX + +### List (Default) +``` +Get-AzSphereProduct -CatalogName -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [-ProgressAction ] [] +``` + +### Get +``` +Get-AzSphereProduct -CatalogName -Name -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [-ProgressAction ] + [] +``` + +### GetViaIdentityCatalog +``` +Get-AzSphereProduct -Name -CatalogInputObject [-DefaultProfile ] + [-ProgressAction ] [] +``` + +### GetViaIdentity +``` +Get-AzSphereProduct -InputObject [-DefaultProfile ] + [-ProgressAction ] [] +``` + +## DESCRIPTION +Get a Product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. + +## EXAMPLES + +### Example 1: List with specified catalog by resource group +```powershell +Get-AzSphereProduct -ResourceGroupName joyer-test -CatalogName test2024 +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +product2024 joyer-test +product0207 joyer-test +``` + +This command gets list of product with specified catalog by resource group. + +### Example 2: Get product with specified catalog and resource group +```powershell +Get-AzSphereProduct -ResourceGroupName joyer-test -CatalogName test2024 -Name product2024 +``` + +```output +Description : 222 +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024/products/product2024 +Name : product2024 +ProvisioningState : Succeeded +ResourceGroupName : joyer-test +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.AzureSphere/catalogs/products +``` + +This command gets specific product with specified catalog and resource group. + +## PARAMETERS + +### -CatalogInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: GetViaIdentityCatalog +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: List, Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Name of product. + +```yaml +Type: System.String +Parameter Sets: Get, GetViaIdentityCatalog +Aliases: ProductName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: List, Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: List, Get +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + +## NOTES + +## RELATED LINKS diff --git a/src/Sphere/Sphere/help/Invoke-AzSphereCountCatalogDevice.md b/src/Sphere/Sphere/help/Invoke-AzSphereCountCatalogDevice.md new file mode 100644 index 000000000000..f280821484bd --- /dev/null +++ b/src/Sphere/Sphere/help/Invoke-AzSphereCountCatalogDevice.md @@ -0,0 +1,183 @@ +--- +external help file: Az.Sphere-help.xml +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/invoke-azspherecountcatalogdevice +schema: 2.0.0 +--- + +# Invoke-AzSphereCountCatalogDevice + +## SYNOPSIS +Counts devices in catalog. + +## SYNTAX + +### CountDevice (Default) +``` +Invoke-AzSphereCountCatalogDevice -CatalogName -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### CountDeviceViaIdentity +``` +Invoke-AzSphereCountCatalogDevice -InputObject [-DefaultProfile ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Counts devices in catalog. + +## EXAMPLES + +### Example 1: Get device number +```powershell +Invoke-AzSphereCountCatalogDevice -CatalogName test2024 -ResourceGroupName joyer-test +``` + +```output +Value +----- + 3 +``` + +This command returns a number of device in the catalog. + +## PARAMETERS + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: CountDevice +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: CountDeviceViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: CountDevice +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: CountDevice +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse + +## NOTES + +## RELATED LINKS diff --git a/src/Sphere/Sphere/help/Invoke-AzSphereCountDeviceGroupDevice.md b/src/Sphere/Sphere/help/Invoke-AzSphereCountDeviceGroupDevice.md new file mode 100644 index 000000000000..bb3b17b9575f --- /dev/null +++ b/src/Sphere/Sphere/help/Invoke-AzSphereCountDeviceGroupDevice.md @@ -0,0 +1,259 @@ +--- +external help file: Az.Sphere-help.xml +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/invoke-azspherecountdevicegroupdevice +schema: 2.0.0 +--- + +# Invoke-AzSphereCountDeviceGroupDevice + +## SYNOPSIS +Counts devices in device group. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + +## SYNTAX + +### CountDevice (Default) +``` +Invoke-AzSphereCountDeviceGroupDevice -CatalogName -DeviceGroupName -ProductName + -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### CountDeviceViaIdentityProduct +``` +Invoke-AzSphereCountDeviceGroupDevice -DeviceGroupName -ProductInputObject + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### CountDeviceViaIdentityCatalog +``` +Invoke-AzSphereCountDeviceGroupDevice -DeviceGroupName -ProductName + -CatalogInputObject [-DefaultProfile ] [-ProgressAction ] + [-WhatIf] [-Confirm] [] +``` + +### CountDeviceViaIdentity +``` +Invoke-AzSphereCountDeviceGroupDevice -InputObject [-DefaultProfile ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Counts devices in device group. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + +## EXAMPLES + +### Example 1: Get device number +```powershell +Invoke-AzSphereCountDeviceGroupDevice -CatalogName test2024 -ResourceGroupName joyer-test -DeviceGroupName testdevicegroup -ProductName product2024 +``` + +```output +Value +----- + 3 +``` + +This command returns device number for the device group. + +## PARAMETERS + +### -CatalogInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: CountDeviceViaIdentityCatalog +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: CountDevice +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceGroupName +Name of device group. + +```yaml +Type: System.String +Parameter Sets: CountDevice, CountDeviceViaIdentityProduct, CountDeviceViaIdentityCatalog +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: CountDeviceViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProductInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: CountDeviceViaIdentityProduct +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProductName +Name of product. + +```yaml +Type: System.String +Parameter Sets: CountDevice, CountDeviceViaIdentityCatalog +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: CountDevice +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: CountDevice +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse + +## NOTES + +## RELATED LINKS diff --git a/src/Sphere/Sphere/help/Invoke-AzSphereCountProductDevice.md b/src/Sphere/Sphere/help/Invoke-AzSphereCountProductDevice.md new file mode 100644 index 000000000000..d0c3b0ddcf72 --- /dev/null +++ b/src/Sphere/Sphere/help/Invoke-AzSphereCountProductDevice.md @@ -0,0 +1,222 @@ +--- +external help file: Az.Sphere-help.xml +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/invoke-azspherecountproductdevice +schema: 2.0.0 +--- + +# Invoke-AzSphereCountProductDevice + +## SYNOPSIS +Counts devices in product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. + +## SYNTAX + +### CountDevice (Default) +``` +Invoke-AzSphereCountProductDevice -CatalogName -ProductName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] + [-Confirm] [] +``` + +### CountDeviceViaIdentityCatalog +``` +Invoke-AzSphereCountProductDevice -ProductName -CatalogInputObject + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### CountDeviceViaIdentity +``` +Invoke-AzSphereCountProductDevice -InputObject [-DefaultProfile ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Counts devices in product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. + +## EXAMPLES + +### Example 1: Get device number +```powershell +Invoke-AzSphereCountProductDevice -CatalogName test2024 -ResourceGroupName joyer-test -ProductName product2024 +``` + +```output +Value +----- + 3 +``` + +This command returns device number for the product. + +## PARAMETERS + +### -CatalogInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: CountDeviceViaIdentityCatalog +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: CountDevice +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: CountDeviceViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProductName +Name of product. + +```yaml +Type: System.String +Parameter Sets: CountDevice, CountDeviceViaIdentityCatalog +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: CountDevice +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: CountDevice +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICountDevicesResponse + +## NOTES + +## RELATED LINKS diff --git a/src/Sphere/Sphere/help/New-AzSphereCatalog.md b/src/Sphere/Sphere/help/New-AzSphereCatalog.md new file mode 100644 index 000000000000..15884cf110ba --- /dev/null +++ b/src/Sphere/Sphere/help/New-AzSphereCatalog.md @@ -0,0 +1,278 @@ +--- +external help file: Az.Sphere-help.xml +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/new-azspherecatalog +schema: 2.0.0 +--- + +# New-AzSphereCatalog + +## SYNOPSIS +Create a Catalog + +## SYNTAX + +### CreateExpanded (Default) +``` +New-AzSphereCatalog -Name -ResourceGroupName [-SubscriptionId ] -Location + [-Tag ] [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] + [-WhatIf] [-Confirm] [] +``` + +### CreateViaJsonFilePath +``` +New-AzSphereCatalog -Name -ResourceGroupName [-SubscriptionId ] + -JsonFilePath [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] + [-WhatIf] [-Confirm] [] +``` + +### CreateViaJsonString +``` +New-AzSphereCatalog -Name -ResourceGroupName [-SubscriptionId ] -JsonString + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] +``` + +## DESCRIPTION +Create a Catalog + +## EXAMPLES + +### Example 1: Example 1: Create a catalog +```powershell +New-AzSphereCatalog -name test2024 -ResourceGroupName joyer-test -Location global +``` + +```output +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024 +Location : global +Name : test2024 +ProvisioningState : Succeeded +ResourceGroupName : joyer-test +RetryAfter : +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Tag : { + } +TenantId : 7de8a199-bb33-4eda-9600-583103317243 +Type : microsoft.azuresphere/catalogs +``` + +This command creates a catalog. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Location +The geo-location where the resource lives + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Name of catalog + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: CatalogName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Resource tags. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog + +## NOTES + +## RELATED LINKS diff --git a/src/Sphere/Sphere/help/New-AzSphereDeployment.md b/src/Sphere/Sphere/help/New-AzSphereDeployment.md new file mode 100644 index 000000000000..68ce4817aa63 --- /dev/null +++ b/src/Sphere/Sphere/help/New-AzSphereDeployment.md @@ -0,0 +1,343 @@ +--- +external help file: Az.Sphere-help.xml +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/new-azspheredeployment +schema: 2.0.0 +--- + +# New-AzSphereDeployment + +## SYNOPSIS +Create a Deployment. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + +## SYNTAX + +### CreateExpanded (Default) +``` +New-AzSphereDeployment -CatalogName -DeviceGroupName -Name -ProductName + -ResourceGroupName [-SubscriptionId ] [-DeployedImage ] [-DeploymentId ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] +``` + +### CreateViaJsonFilePath +``` +New-AzSphereDeployment -CatalogName -DeviceGroupName -Name -ProductName + -ResourceGroupName [-SubscriptionId ] -JsonFilePath [-DefaultProfile ] + [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### CreateViaJsonString +``` +New-AzSphereDeployment -CatalogName -DeviceGroupName -Name -ProductName + -ResourceGroupName [-SubscriptionId ] -JsonString [-DefaultProfile ] + [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Create a Deployment. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + +## EXAMPLES + +### Example 1: Create a deployment with deployed image +```powershell +$image1 = Get-AzSphereImage -Name '14a6729e-5819-4737-8713-37b4798533f8' -CatalogName test2024 -ResourceGroupName joyer-test +New-AzSphereDeployment -Name .default -CatalogName test2024 -DeviceGroupName testdevicegroup -ProductName product2024 -ResourceGroupName joyer-test -DeployedImage $image1 +``` + +```output +DateUtc : 3/1/2024 8:08:11 AM +DeployedImage : {{ + "id": "/subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024/images/14a6729e-5819-4737 + -8713-37b4798533f8", + "name": "14a6729e-5819-4737-8713-37b4798533f8", + "type": "Microsoft.AzureSphere/catalogs/images", + "properties": { + "image": "AzureSphereBlink1", + "imageId": "14a6729e-5819-4737-8713-37b4798533f8", + "regionalDataBoundary": "None", + "uri": "https://as3imgptint003.blob.core.windows.net/7de8a199-bb33-4eda-9600-583103317243/imagesaks/14a6729e-5819-4737-8713-37b4798533f8?skoid=cc6e3fcf-ab4d-4 + b0d-b3f9-9769604c1e52\u0026sktid=72f988bf-86f1-41af-91ab-2d7cd011db47\u0026skt=2024-03-01T08%3A03%3A45Z\u0026ske=2024-03-01T09%3A08%3A45Z\u0026sks=b\u0026skv=2021 + -12-02\u0026sv=2021-12-02\u0026spr=https,http\u0026se=2024-03-01T16%3A08%3A45Z\u0026sr=b\u0026sp=r\u0026sig=UviBTlciImOjqw968crarXzXyQ29UMEi4js56AEOPgU%3D", + "componentId": "42257ad6-382d-405f-b7cc-e110fbda2d0b", + "imageType": "Applications", + "provisioningState": "Succeeded" + } + }} +DeploymentId : e1e61a75-0629-491c-8f4f-0c054116d71c +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024/products/product2024/deviceGroups/ + testdevicegroup/deployments/e1e61a75-0629-491c-8f4f-0c054116d71c +Name : e1e61a75-0629-491c-8f4f-0c054116d71c +ProvisioningState : Succeeded +ResourceGroupName : joyer-test +SystemDataCreatedAt : 3/1/2024 8:08:11 AM +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : 3/1/2024 8:08:11 AM +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.AzureSphere/catalogs/products/deviceGroups/deployments +``` + +This command create a deployment with deployed images. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeployedImage +Images deployed + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage[] +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeploymentId +Deployment ID + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceGroupName +Name of device group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Deployment name. +Use .default for deployment creation and to get the current deployment for the associated device group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: DeploymentName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProductName +Name of product. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment + +## NOTES + +## RELATED LINKS diff --git a/src/Sphere/Sphere/help/New-AzSphereDevice.md b/src/Sphere/Sphere/help/New-AzSphereDevice.md new file mode 100644 index 000000000000..04991e80446f --- /dev/null +++ b/src/Sphere/Sphere/help/New-AzSphereDevice.md @@ -0,0 +1,312 @@ +--- +external help file: Az.Sphere-help.xml +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/new-azspheredevice +schema: 2.0.0 +--- + +# New-AzSphereDevice + +## SYNOPSIS +Create a Device. +Use '.unassigned' or '.default' for the device group and product names to claim a device to the catalog only. + +## SYNTAX + +### CreateExpanded (Default) +``` +New-AzSphereDevice -CatalogName -GroupName -Name -ProductName + -ResourceGroupName [-SubscriptionId ] [-DeviceId ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### CreateViaJsonFilePath +``` +New-AzSphereDevice -CatalogName -GroupName -Name -ProductName + -ResourceGroupName [-SubscriptionId ] -JsonFilePath [-DefaultProfile ] + [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### CreateViaJsonString +``` +New-AzSphereDevice -CatalogName -GroupName -Name -ProductName + -ResourceGroupName [-SubscriptionId ] -JsonString [-DefaultProfile ] + [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Create a Device. +Use '.unassigned' or '.default' for the device group and product names to claim a device to the catalog only. + +## EXAMPLES + +### Example 1: Create a device +```powershell +New-AzSphereDevice -CatalogName "anotherNewOne" -GroupName ".default" -Name "45ffd2afe82d77b2b70f1daed2054abc64853a27395c6112d9adaf01047bae5a0caa72219f93db02e1a93f2c159ba2090a783077138e7fa542459621e6091e4c" -ProductName ".default" -ResourceGroupName "goyedokun" +``` + +```output +ChipSku : MT3620AN +DeviceId : fc9085337153e47eca0d42dcae83819f18ae90d916ae3b87d0206fef6acb9ca44f9e21b93c01311e83168393d112841decc5ef6d48c3d1d07be6b0bf8fec6e2b +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/goyedokun/providers/Microsoft.AzureSphere/catalogs/anotherNewOne/products/.default/deviceGroups/.default/devices/FC9085337153E47ECA0D42DCAE83819F18AE90D916AE3B87D0206FEF6ACB9CA44F9E21B93C01311E83168393D112841DECC5EF6D48C3D1D07BE6B0BF8FEC6E2B +LastAvailableOSVersion : +LastInstalledOSVersion : +LastOSUpdateUtc : +LastUpdateRequestUtc : +Name : fc9085337153e47eca0d42dcae83819f18ae90d916ae3b87d0206fef6acb9ca44f9e21b93c01311e83168393d112841decc5ef6d48c3d1d07be6b0bf8fec6e2b +ProvisioningState : Succeeded +ResourceGroupName : goyedokun +RetryAfter : +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.AzureSphere/catalogs/products/deviceGroups/devices +``` + +This command creates a device. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceId +Device ID + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupName +Name of device group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: DeviceGroupName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Device name + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: DeviceName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProductName +Name of product. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + +## NOTES + +## RELATED LINKS diff --git a/src/Sphere/Sphere/help/New-AzSphereDeviceCapabilityImage.md b/src/Sphere/Sphere/help/New-AzSphereDeviceCapabilityImage.md new file mode 100644 index 000000000000..233ef2c01912 --- /dev/null +++ b/src/Sphere/Sphere/help/New-AzSphereDeviceCapabilityImage.md @@ -0,0 +1,368 @@ +--- +external help file: Az.Sphere-help.xml +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/new-azspheredevicecapabilityimage +schema: 2.0.0 +--- + +# New-AzSphereDeviceCapabilityImage + +## SYNOPSIS +Generates the capability image for the device. +Use '.unassigned' or '.default' for the device group and product names to generate the image for a device that does not belong to a specific device group and product. + +## SYNTAX + +### GenerateExpanded (Default) +``` +New-AzSphereDeviceCapabilityImage -DeviceName -CatalogName -DeviceGroupName + -ProductName -ResourceGroupName [-SubscriptionId ] -Capability + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] +``` + +### GenerateViaJsonString +``` +New-AzSphereDeviceCapabilityImage -DeviceName -CatalogName -DeviceGroupName + -ProductName -ResourceGroupName [-SubscriptionId ] -JsonString + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] +``` + +### GenerateViaJsonFilePath +``` +New-AzSphereDeviceCapabilityImage -DeviceName -CatalogName -DeviceGroupName + -ProductName -ResourceGroupName [-SubscriptionId ] -JsonFilePath + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] +``` + +### GenerateViaIdentityProductExpanded +``` +New-AzSphereDeviceCapabilityImage -DeviceName -DeviceGroupName + -ProductInputObject -Capability [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### GenerateViaIdentityCatalogExpanded +``` +New-AzSphereDeviceCapabilityImage -DeviceName -DeviceGroupName -ProductName + -CatalogInputObject -Capability [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### GenerateViaIdentityDeviceGroupExpanded +``` +New-AzSphereDeviceCapabilityImage -DeviceName -DeviceGroupInputObject + -Capability [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] + [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Generates the capability image for the device. +Use '.unassigned' or '.default' for the device group and product names to generate the image for a device that does not belong to a specific device group and product. + +## EXAMPLES + +### Example 1: Generates the capability image for the device. +```powershell +New-AzSphereDeviceCapabilityImage -ResourceGroupName joyer-test -CatalogName test2024 -DeviceGroupName testdevicegroup2 -ProductName product2024 -DeviceName DBB0E0CB8BD961A6129096E1E8A1375AC1FA274F030C08161B37AE3BC5A94F443BDB628CF257BC5BC810D8768C03B6F5CA301A35CD0169F56A49624255964560 -Capability 'ApplicationDevelopment' | Format-List +``` + +```output +Image : /Vz9XAEAAADMAAAA27Dgy4vZYaYSkJbh6KE3WsH6J08DDAgWGzeuO8WpT0Q722KM8le8W8gQ2HaMA7b1yjAaNc0BafVqSWJCVZZFYAsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANFg0TQMAAABJRCQADQAAANi1KEHCq1VBmjOKHzHtZ+yYQTwYazyNRbRvoHzwyZefU0cYAJZKiVhXTEtr0FMmMLhe+JiQpbh/AQAA + AERCKAAAAAAAAAAAAGZ3X2NvbmZpZwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAfAAAAMyzku8X6GdcOC1Sd9Cfozpmsiny2TzmjyXK7IvOhfA1B8nwdf1GoPa6PPVNMnn15TPIFK/P5/S2TD/mQrNh0Nk= +``` + +This command generates the capability image for specified device. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Capability +List of capabilities to create + +```yaml +Type: System.String[] +Parameter Sets: GenerateExpanded, GenerateViaIdentityProductExpanded, GenerateViaIdentityCatalogExpanded, GenerateViaIdentityDeviceGroupExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CatalogInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: GenerateViaIdentityCatalogExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: GenerateExpanded, GenerateViaJsonString, GenerateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceGroupInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: GenerateViaIdentityDeviceGroupExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -DeviceGroupName +Name of device group. + +```yaml +Type: System.String +Parameter Sets: GenerateExpanded, GenerateViaJsonString, GenerateViaJsonFilePath, GenerateViaIdentityProductExpanded, GenerateViaIdentityCatalogExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceName +Device name + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Generate operation + +```yaml +Type: System.String +Parameter Sets: GenerateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Generate operation + +```yaml +Type: System.String +Parameter Sets: GenerateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProductInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: GenerateViaIdentityProductExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProductName +Name of product. + +```yaml +Type: System.String +Parameter Sets: GenerateExpanded, GenerateViaJsonString, GenerateViaJsonFilePath, GenerateViaIdentityCatalogExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: GenerateExpanded, GenerateViaJsonString, GenerateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: GenerateExpanded, GenerateViaJsonString, GenerateViaJsonFilePath +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse + +## NOTES + +## RELATED LINKS diff --git a/src/Sphere/Sphere/help/New-AzSphereDeviceGroup.md b/src/Sphere/Sphere/help/New-AzSphereDeviceGroup.md new file mode 100644 index 000000000000..383a4ccfc7cd --- /dev/null +++ b/src/Sphere/Sphere/help/New-AzSphereDeviceGroup.md @@ -0,0 +1,358 @@ +--- +external help file: Az.Sphere-help.xml +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/new-azspheredevicegroup +schema: 2.0.0 +--- + +# New-AzSphereDeviceGroup + +## SYNOPSIS +Create a DeviceGroup. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + +## SYNTAX + +### CreateExpanded (Default) +``` +New-AzSphereDeviceGroup -CatalogName -Name -ProductName -ResourceGroupName + [-SubscriptionId ] [-AllowCrashDumpsCollection ] [-Description ] + [-OSFeedType ] [-RegionalDataBoundary ] [-UpdatePolicy ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### CreateViaJsonFilePath +``` +New-AzSphereDeviceGroup -CatalogName -Name -ProductName -ResourceGroupName + [-SubscriptionId ] -JsonFilePath [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### CreateViaJsonString +``` +New-AzSphereDeviceGroup -CatalogName -Name -ProductName -ResourceGroupName + [-SubscriptionId ] -JsonString [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Create a DeviceGroup. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + +## EXAMPLES + +### Example 1: Create a device group into specified catalog and product +```powershell +New-AzSphereDeviceGroup -CatalogName anotherCatalog -Name testgroup -ProductName test -ResourceGroupName Sphere-test +``` + +```output +AllowCrashDumpsCollection : Disabled +Description : +HasDeployment : +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/Sphere-test/providers/Microsoft.AzureSphere/catalogs/anotherCatalog/products/test/deviceGroups/testgroup +Name : testgroup +OSFeedType : Retail +ProvisioningState : Succeeded +RegionalDataBoundary : None +ResourceGroupName : Sphere-test +RetryAfter : +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.AzureSphere/catalogs/products/deviceGroups +UpdatePolicy : UpdateAll +``` + +This command creates a device group into specified catalog and product. + +## PARAMETERS + +### -AllowCrashDumpsCollection +Flag to define if the user allows for crash dump collection. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Description +Description of the device group. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Name of device group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: DeviceGroupName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OSFeedType +Operating system feed type of the device group. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProductName +Name of product. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RegionalDataBoundary +Regional data boundary for the device group. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UpdatePolicy +Update policy of the device group. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + +## NOTES + +## RELATED LINKS diff --git a/src/Sphere/Sphere/help/New-AzSphereImage.md b/src/Sphere/Sphere/help/New-AzSphereImage.md new file mode 100644 index 000000000000..008d3ddb9e76 --- /dev/null +++ b/src/Sphere/Sphere/help/New-AzSphereImage.md @@ -0,0 +1,318 @@ +--- +external help file: Az.Sphere-help.xml +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/new-azsphereimage +schema: 2.0.0 +--- + +# New-AzSphereImage + +## SYNOPSIS +Create a Image + +## SYNTAX + +### CreateExpanded (Default) +``` +New-AzSphereImage -CatalogName -Name -ResourceGroupName [-SubscriptionId ] + [-Image ] [-ImageId ] [-RegionalDataBoundary ] [-DefaultProfile ] [-AsJob] + [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### CreateViaJsonFilePath +``` +New-AzSphereImage -CatalogName -Name -ResourceGroupName [-SubscriptionId ] + -JsonFilePath [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] + [-WhatIf] [-Confirm] [] +``` + +### CreateViaJsonString +``` +New-AzSphereImage -CatalogName -Name -ResourceGroupName [-SubscriptionId ] + -JsonString [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] + [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Create a Image + +## EXAMPLES + +### Example 1: Create a image for device group +```powershell +$imagefile1 = 'D:\GitHub\azure-powershell\src\Sphere\Sphere.Autorest\test\imagefile\AzureSphereBlink1.imagepackage' +$encf1 = [system.io.file]::ReadAllBytes($imagefile1) +$base64str = [system.convert]::ToBase64String($encf1) +New-AzSphereImage -CatalogName test2024 -ResourceGroupName joyer-test -Name 14a6729e-5819-4737-8713-37b4798533f8 -Image $base64str +``` + +```output +ComponentId : 42257ad6-382d-405f-b7cc-e110fbda2d0b +Description : +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024/images/14a6729e-5819-4737-8713-37b4798533f8 +ImageId : 14a6729e-5819-4737-8713-37b4798533f8 +ImageName : +ImageType : Applications +Name : 14a6729e-5819-4737-8713-37b4798533f8 +PropertiesImage : AzureSphereBlink1 +ProvisioningState : Succeeded +RegionalDataBoundary : None +ResourceGroupName : joyer-test +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.AzureSphere/catalogs/images +Uri : https://as3imgptint003.blob.core.windows.net/7de8a199-bb33-4eda-9600-583103317243/imagesaks/14a6729e-5819-4737-8713-37b4798533f8?skoid=cc6e3fcf-ab4d-4b0d-b3f9-9769 + 604c1e52&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2024-02-23T02%3A31%3A35Z&ske=2024-02-23T03%3A36%3A35Z&sks=b&skv=2021-12-02&sv=2021-12-02&spr=https,http&se= + 2024-02-23T10%3A36%3A35Z&sr=b&sp=r&sig=7ZNckgqdazn9Af8fHUfsEEA2JrZO0SjDZpUgbh0jEZI%3D +``` + +This command creates a image for the device group. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Image +Image as a UTF-8 encoded base 64 string on image create. +This field contains the image URI on image reads. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ImageId +Image ID + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Image name. +Use an image GUID for GA versions of the API. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ImageName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RegionalDataBoundary +Regional data boundary for an image + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage + +## NOTES + +## RELATED LINKS diff --git a/src/Sphere/Sphere/help/New-AzSphereProduct.md b/src/Sphere/Sphere/help/New-AzSphereProduct.md new file mode 100644 index 000000000000..7cd528eda680 --- /dev/null +++ b/src/Sphere/Sphere/help/New-AzSphereProduct.md @@ -0,0 +1,277 @@ +--- +external help file: Az.Sphere-help.xml +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/new-azsphereproduct +schema: 2.0.0 +--- + +# New-AzSphereProduct + +## SYNOPSIS +Create a Product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. + +## SYNTAX + +### CreateExpanded (Default) +``` +New-AzSphereProduct -CatalogName -Name -ResourceGroupName [-SubscriptionId ] + [-Description ] [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] + [-WhatIf] [-Confirm] [] +``` + +### CreateViaJsonFilePath +``` +New-AzSphereProduct -CatalogName -Name -ResourceGroupName [-SubscriptionId ] + -JsonFilePath [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] + [-WhatIf] [-Confirm] [] +``` + +### CreateViaJsonString +``` +New-AzSphereProduct -CatalogName -Name -ResourceGroupName [-SubscriptionId ] + -JsonString [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] + [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Create a Product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. + +## EXAMPLES + +### Example 1: Create a product into specified catalog +```powershell +New-AzSphereProduct -CatalogName test2024 -ResourceGroupName joyer-test -Name product2024 +``` + +```output +Description : +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024/products/product2024 +Name : product2024 +ProvisioningState : Succeeded +ResourceGroupName : joyer-test +RetryAfter : +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.AzureSphere/catalogs/products +``` + +This command create a product into specified catalog. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Description +Description of the product + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Name of product. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ProductName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + +## NOTES + +## RELATED LINKS diff --git a/src/Sphere/Sphere/help/New-AzSphereProductDefaultDeviceGroup.md b/src/Sphere/Sphere/help/New-AzSphereProductDefaultDeviceGroup.md new file mode 100644 index 000000000000..2e50dac43219 --- /dev/null +++ b/src/Sphere/Sphere/help/New-AzSphereProductDefaultDeviceGroup.md @@ -0,0 +1,226 @@ +--- +external help file: Az.Sphere-help.xml +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/new-azsphereproductdefaultdevicegroup +schema: 2.0.0 +--- + +# New-AzSphereProductDefaultDeviceGroup + +## SYNOPSIS +Generates default device groups for the product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. + +## SYNTAX + +### Generate (Default) +``` +New-AzSphereProductDefaultDeviceGroup -CatalogName -ProductName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] + [-Confirm] [] +``` + +### GenerateViaIdentityCatalog +``` +New-AzSphereProductDefaultDeviceGroup -ProductName -CatalogInputObject + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### GenerateViaIdentity +``` +New-AzSphereProductDefaultDeviceGroup -InputObject [-DefaultProfile ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Generates default device groups for the product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. + +## EXAMPLES + +### Example 1: Generate default device groups for the product +```powershell +New-AzSphereProductDefaultDeviceGroup -CatalogName test2024 -ProductName product0207 -ResourceGroupName joyer-test +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +Development joyer-test +Field Test joyer-test +Production joyer-test +Production OS Evaluation joyer-test +Field Test OS Evaluation joyer-test +``` + +This command generates default device groups for the product. + +## PARAMETERS + +### -CatalogInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: GenerateViaIdentityCatalog +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: Generate +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: GenerateViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProductName +Name of product. + +```yaml +Type: System.String +Parameter Sets: Generate, GenerateViaIdentityCatalog +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Generate +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: Generate +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + +## NOTES + +## RELATED LINKS diff --git a/src/Sphere/Sphere/help/Remove-AzSphereCatalog.md b/src/Sphere/Sphere/help/Remove-AzSphereCatalog.md new file mode 100644 index 000000000000..7af762efe4d5 --- /dev/null +++ b/src/Sphere/Sphere/help/Remove-AzSphereCatalog.md @@ -0,0 +1,223 @@ +--- +external help file: Az.Sphere-help.xml +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/remove-azspherecatalog +schema: 2.0.0 +--- + +# Remove-AzSphereCatalog + +## SYNOPSIS +Delete a Catalog + +## SYNTAX + +### Delete (Default) +``` +Remove-AzSphereCatalog -Name -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] + [-Confirm] [] +``` + +### DeleteViaIdentity +``` +Remove-AzSphereCatalog -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Delete a Catalog + +## EXAMPLES + +### Example 1: Delete a catalog +```powershell +Remove-AzSphereCatalog -Name test2024 -ResourceGroupName joyer-test +``` + +This command deletes specified catalog. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Name of catalog + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: CatalogName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS diff --git a/src/Sphere/Sphere/help/Remove-AzSphereDeviceGroup.md b/src/Sphere/Sphere/help/Remove-AzSphereDeviceGroup.md new file mode 100644 index 000000000000..31e915585265 --- /dev/null +++ b/src/Sphere/Sphere/help/Remove-AzSphereDeviceGroup.md @@ -0,0 +1,298 @@ +--- +external help file: Az.Sphere-help.xml +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/remove-azspheredevicegroup +schema: 2.0.0 +--- + +# Remove-AzSphereDeviceGroup + +## SYNOPSIS +Delete a DeviceGroup. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + +## SYNTAX + +### Delete (Default) +``` +Remove-AzSphereDeviceGroup -CatalogName -Name -ProductName + -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### DeleteViaIdentityProduct +``` +Remove-AzSphereDeviceGroup -Name -ProductInputObject [-DefaultProfile ] + [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### DeleteViaIdentityCatalog +``` +Remove-AzSphereDeviceGroup -Name -ProductName -CatalogInputObject + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] + [-Confirm] [] +``` + +### DeleteViaIdentity +``` +Remove-AzSphereDeviceGroup -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Delete a DeviceGroup. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + +## EXAMPLES + +### Example 1: Delete specified device group +```powershell +Remove-AzSphereDeviceGroup -CatalogName NewCatalog -Name Marketing -ProductName MyProd129 -ResourceGroupName Sphere-test +``` + +This command deletes specified device group. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CatalogInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: DeleteViaIdentityCatalog +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Name of device group. + +```yaml +Type: System.String +Parameter Sets: Delete, DeleteViaIdentityProduct, DeleteViaIdentityCatalog +Aliases: DeviceGroupName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProductInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: DeleteViaIdentityProduct +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProductName +Name of product. + +```yaml +Type: System.String +Parameter Sets: Delete, DeleteViaIdentityCatalog +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS diff --git a/src/Sphere/Sphere/help/Remove-AzSphereProduct.md b/src/Sphere/Sphere/help/Remove-AzSphereProduct.md new file mode 100644 index 000000000000..6ecb516ea6c1 --- /dev/null +++ b/src/Sphere/Sphere/help/Remove-AzSphereProduct.md @@ -0,0 +1,261 @@ +--- +external help file: Az.Sphere-help.xml +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/remove-azsphereproduct +schema: 2.0.0 +--- + +# Remove-AzSphereProduct + +## SYNOPSIS +Delete a Product. +'.default' and '.unassigned' are system defined values and cannot be used for product name' + +## SYNTAX + +### Delete (Default) +``` +Remove-AzSphereProduct -CatalogName -Name -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### DeleteViaIdentityCatalog +``` +Remove-AzSphereProduct -Name -CatalogInputObject [-DefaultProfile ] + [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### DeleteViaIdentity +``` +Remove-AzSphereProduct -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Delete a Product. +'.default' and '.unassigned' are system defined values and cannot be used for product name' + +## EXAMPLES + +### Example 1: Delete a product +```powershell +Remove-AzSphereProduct -CatalogName test2024 -ResourceGroupName joyer-test -Name product2024 +``` + +This command deletes specified product. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CatalogInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: DeleteViaIdentityCatalog +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Name of product. + +```yaml +Type: System.String +Parameter Sets: Delete, DeleteViaIdentityCatalog +Aliases: ProductName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS diff --git a/src/Sphere/Sphere/help/Update-AzSphereCatalog.md b/src/Sphere/Sphere/help/Update-AzSphereCatalog.md new file mode 100644 index 000000000000..1c8bf1fd5a64 --- /dev/null +++ b/src/Sphere/Sphere/help/Update-AzSphereCatalog.md @@ -0,0 +1,255 @@ +--- +external help file: Az.Sphere-help.xml +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/update-azspherecatalog +schema: 2.0.0 +--- + +# Update-AzSphereCatalog + +## SYNOPSIS +Update a Catalog + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzSphereCatalog -Name -ResourceGroupName [-SubscriptionId ] [-Tag ] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### UpdateViaJsonString +``` +Update-AzSphereCatalog -Name -ResourceGroupName [-SubscriptionId ] + -JsonString [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] + [] +``` + +### UpdateViaJsonFilePath +``` +Update-AzSphereCatalog -Name -ResourceGroupName [-SubscriptionId ] + -JsonFilePath [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] + [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzSphereCatalog -InputObject [-Tag ] [-DefaultProfile ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Update a Catalog + +## EXAMPLES + +### Example 1: Update tag +```powershell +Update-AzSphereCatalog -Name test2024 -ResourceGroupName joyer-test -Tag @{"123"="abc"} +``` + +```output +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024 +Location : global +Name : test2024 +ProvisioningState : Succeeded +ResourceGroupName : joyer-test +SystemDataCreatedAt : 2/1/2024 1:51:44 AM +SystemDataCreatedBy : example@microsoft.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 2/8/2024 1:54:33 AM +SystemDataLastModifiedBy : example@microsoft.com +SystemDataLastModifiedByType : User +Tag : { + "123": "abc" + } +TenantId : +Type : microsoft.azuresphere/catalogs +``` + +This command updates tag for specified catalog. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Name of catalog + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonString, UpdateViaJsonFilePath +Aliases: CatalogName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonString, UpdateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonString, UpdateViaJsonFilePath +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Resource tags. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog + +## NOTES + +## RELATED LINKS diff --git a/src/Sphere/Sphere/help/Update-AzSphereDevice.md b/src/Sphere/Sphere/help/Update-AzSphereDevice.md new file mode 100644 index 000000000000..019c9ff30496 --- /dev/null +++ b/src/Sphere/Sphere/help/Update-AzSphereDevice.md @@ -0,0 +1,429 @@ +--- +external help file: Az.Sphere-help.xml +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/update-azspheredevice +schema: 2.0.0 +--- + +# Update-AzSphereDevice + +## SYNOPSIS +Update a Device. +Use '.unassigned' or '.default' for the device group and product names to move a device to the catalog level. + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzSphereDevice -CatalogName -GroupName -Name -ProductName + -ResourceGroupName [-SubscriptionId ] [-DeviceGroupId ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### UpdateViaJsonString +``` +Update-AzSphereDevice -CatalogName -GroupName -Name -ProductName + -ResourceGroupName [-SubscriptionId ] -JsonString [-DefaultProfile ] + [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### UpdateViaJsonFilePath +``` +Update-AzSphereDevice -CatalogName -GroupName -Name -ProductName + -ResourceGroupName [-SubscriptionId ] -JsonFilePath [-DefaultProfile ] + [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### UpdateViaIdentityProductExpanded +``` +Update-AzSphereDevice -GroupName -Name -ProductInputObject + [-DeviceGroupId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] + [-WhatIf] [-Confirm] [] +``` + +### UpdateViaIdentityCatalogExpanded +``` +Update-AzSphereDevice -GroupName -Name -ProductName + -CatalogInputObject [-DeviceGroupId ] [-DefaultProfile ] [-AsJob] + [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### UpdateViaIdentityDeviceGroupExpanded +``` +Update-AzSphereDevice -Name -DeviceGroupInputObject [-DeviceGroupId ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzSphereDevice -InputObject [-DeviceGroupId ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Update a Device. +Use '.unassigned' or '.default' for the device group and product names to move a device to the catalog level. + +## EXAMPLES + +### Example 1: Assign a device to another device group +```powershell +Update-AzSphereDevice -ResourceGroupName joyer-test -CatalogName test2024 -GroupName testdevicegroup -ProductName product2024 -Name DBB0E0CB8BD961A6129096E1E8A1375AC1FA274F030C08161B37AE3BC5A94F443BDB628CF257BC5BC810D8768C03B6F5CA301A35CD0169F56A49624255964560 -DeviceGroupId /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024/products/product2024/deviceGroups/testdevicegroup2 +``` + +```output +ChipSku : +DeviceId : +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/dc3e0b1a-59ae-4b00-bb84-9 + a7ea253f4e8*648856149066E98CE43CF51B8F3FC827768BFF5C8740097AD36EDFC456E7B110 +LastAvailableOSVersion : +LastInstalledOSVersion : +LastOSUpdateUtc : +LastUpdateRequestUtc : +Name : dc3e0b1a-59ae-4b00-bb84-9a7ea253f4e8*648856149066E98CE43CF51B8F3FC827768BFF5C8740097AD36EDFC456E7B110 +ProvisioningState : +ResourceGroupName : +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : +``` + +This command assign a device to another device group. + +### Example 2: unassign a device +```powershell +Update-AzSphereDevice -ResourceGroupName joyer-test -CatalogName test2024 -GroupName testdevicegroup -ProductName product2024 -Name DBB0E0CB8BD961A6129096E1E8A1375AC1FA274F030C08161B37AE3BC5A94F443BDB628CF257BC5BC810D8768C03B6F5CA301A35CD0169F56A49624255964560 -DeviceGroupId /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024/products/.default/deviceGroups/.default +``` + +```output +ChipSku : +DeviceId : +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/providers/Microsoft.AzureSphere/locations/WESTCENTRALUS/operationStatuses/89c583a1-2a79-4f5f-ab4b-7e1cc7fb52e7* + 648856149066E98CE43CF51B8F3FC827768BFF5C8740097AD36EDFC456E7B110 +LastAvailableOSVersion : +LastInstalledOSVersion : +LastOSUpdateUtc : +LastUpdateRequestUtc : +Name : 89c583a1-2a79-4f5f-ab4b-7e1cc7fb52e7*648856149066E98CE43CF51B8F3FC827768BFF5C8740097AD36EDFC456E7B110 +ProvisioningState : +ResourceGroupName : +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : +``` + +This command unassign a device to catalog. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CatalogInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: UpdateViaIdentityCatalogExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonString, UpdateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceGroupId +Device group id + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityProductExpanded, UpdateViaIdentityCatalogExpanded, UpdateViaIdentityDeviceGroupExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceGroupInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: UpdateViaIdentityDeviceGroupExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -GroupName +Name of device group. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonString, UpdateViaJsonFilePath, UpdateViaIdentityProductExpanded, UpdateViaIdentityCatalogExpanded +Aliases: DeviceGroupName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Device name + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonString, UpdateViaJsonFilePath, UpdateViaIdentityProductExpanded, UpdateViaIdentityCatalogExpanded, UpdateViaIdentityDeviceGroupExpanded +Aliases: DeviceName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProductInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: UpdateViaIdentityProductExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProductName +Name of product. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonString, UpdateViaJsonFilePath, UpdateViaIdentityCatalogExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonString, UpdateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonString, UpdateViaJsonFilePath +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice + +## NOTES + +## RELATED LINKS diff --git a/src/Sphere/Sphere/help/Update-AzSphereDeviceGroup.md b/src/Sphere/Sphere/help/Update-AzSphereDeviceGroup.md new file mode 100644 index 000000000000..432c87b4436a --- /dev/null +++ b/src/Sphere/Sphere/help/Update-AzSphereDeviceGroup.md @@ -0,0 +1,429 @@ +--- +external help file: Az.Sphere-help.xml +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/update-azspheredevicegroup +schema: 2.0.0 +--- + +# Update-AzSphereDeviceGroup + +## SYNOPSIS +Update a DeviceGroup. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzSphereDeviceGroup -CatalogName -Name -ProductName + -ResourceGroupName [-SubscriptionId ] [-AllowCrashDumpsCollection ] + [-Description ] [-OSFeedType ] [-RegionalDataBoundary ] [-UpdatePolicy ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] +``` + +### UpdateViaJsonString +``` +Update-AzSphereDeviceGroup -CatalogName -Name -ProductName + -ResourceGroupName [-SubscriptionId ] -JsonString [-DefaultProfile ] + [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### UpdateViaJsonFilePath +``` +Update-AzSphereDeviceGroup -CatalogName -Name -ProductName + -ResourceGroupName [-SubscriptionId ] -JsonFilePath [-DefaultProfile ] + [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### UpdateViaIdentityProductExpanded +``` +Update-AzSphereDeviceGroup -Name -ProductInputObject + [-AllowCrashDumpsCollection ] [-Description ] [-OSFeedType ] + [-RegionalDataBoundary ] [-UpdatePolicy ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### UpdateViaIdentityCatalogExpanded +``` +Update-AzSphereDeviceGroup -Name -ProductName -CatalogInputObject + [-AllowCrashDumpsCollection ] [-Description ] [-OSFeedType ] + [-RegionalDataBoundary ] [-UpdatePolicy ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzSphereDeviceGroup -InputObject [-AllowCrashDumpsCollection ] + [-Description ] [-OSFeedType ] [-RegionalDataBoundary ] [-UpdatePolicy ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] +``` + +## DESCRIPTION +Update a DeviceGroup. +'.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + +## EXAMPLES + +### Example 1: Update device group +```powershell +Update-AzSphereDeviceGroup -ResourceGroupName joyer-test -CatalogName test2024 -ProductName product2024 -Name testdevicegroup -Description test +``` + +```output +AllowCrashDumpsCollection : +Description : test +HasDeployment : +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024/products/product2024/deviceGroups/testdevicegroup +Name : testdevicegroup +OSFeedType : +ProvisioningState : Succeeded +RegionalDataBoundary : +ResourceGroupName : joyer-test +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.AzureSphere/catalogs/products/deviceGroups +UpdatePolicy : +``` + +This command updates device group. + +## PARAMETERS + +### -AllowCrashDumpsCollection +Flag to define if the user allows for crash dump collection. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityProductExpanded, UpdateViaIdentityCatalogExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CatalogInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: UpdateViaIdentityCatalogExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonString, UpdateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Description +Description of the device group. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityProductExpanded, UpdateViaIdentityCatalogExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Name of device group. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonString, UpdateViaJsonFilePath, UpdateViaIdentityProductExpanded, UpdateViaIdentityCatalogExpanded +Aliases: DeviceGroupName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OSFeedType +Operating system feed type of the device group. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityProductExpanded, UpdateViaIdentityCatalogExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProductInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: UpdateViaIdentityProductExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProductName +Name of product. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonString, UpdateViaJsonFilePath, UpdateViaIdentityCatalogExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RegionalDataBoundary +Regional data boundary for the device group. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityProductExpanded, UpdateViaIdentityCatalogExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonString, UpdateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonString, UpdateViaJsonFilePath +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UpdatePolicy +Update policy of the device group. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityProductExpanded, UpdateViaIdentityCatalogExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup + +## NOTES + +## RELATED LINKS diff --git a/src/Sphere/Sphere/help/Update-AzSphereProduct.md b/src/Sphere/Sphere/help/Update-AzSphereProduct.md new file mode 100644 index 000000000000..778ba81c01d0 --- /dev/null +++ b/src/Sphere/Sphere/help/Update-AzSphereProduct.md @@ -0,0 +1,321 @@ +--- +external help file: Az.Sphere-help.xml +Module Name: Az.Sphere +online version: https://learn.microsoft.com/powershell/module/az.sphere/update-azsphereproduct +schema: 2.0.0 +--- + +# Update-AzSphereProduct + +## SYNOPSIS +Update a Product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzSphereProduct -CatalogName -Name -ResourceGroupName + [-SubscriptionId ] [-Description ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### UpdateViaJsonString +``` +Update-AzSphereProduct -CatalogName -Name -ResourceGroupName + [-SubscriptionId ] -JsonString [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### UpdateViaJsonFilePath +``` +Update-AzSphereProduct -CatalogName -Name -ResourceGroupName + [-SubscriptionId ] -JsonFilePath [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### UpdateViaIdentityCatalogExpanded +``` +Update-AzSphereProduct -Name -CatalogInputObject [-Description ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzSphereProduct -InputObject [-Description ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Update a Product. +'.default' and '.unassigned' are system defined values and cannot be used for product name. + +## EXAMPLES + +### Example 1: Update description +```powershell +Update-AzSphereProduct -ResourceGroupName joyer-test -CatalogName test2024 -Name product2024 -Description 2222 +``` + +```output +Description : 2222 +Id : /subscriptions/d1cd48f9-b94b-4645-9632-634b440db393/resourceGroups/joyer-test/providers/Microsoft.AzureSphere/catalogs/test2024/products/product2024 +Name : product2024 +ProvisioningState : Succeeded +ResourceGroupName : joyer-test +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.AzureSphere/catalogs/products +``` + +This command updates product description. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CatalogInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: UpdateViaIdentityCatalogExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -CatalogName +Name of catalog + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonString, UpdateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Description +Description of the product + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityCatalogExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Name of product. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonString, UpdateViaJsonFilePath, UpdateViaIdentityCatalogExpanded +Aliases: ProductName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonString, UpdateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonString, UpdateViaJsonFilePath +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISphereIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct + +## NOTES + +## RELATED LINKS diff --git a/tools/CreateMappings_rules.json b/tools/CreateMappings_rules.json index 2e44ea9c4ef0..309f1a48160e 100644 --- a/tools/CreateMappings_rules.json +++ b/tools/CreateMappings_rules.json @@ -875,5 +875,9 @@ { "module": "EdgeZones", "alias": "EdgeZones" + }, + { + "alias": "Sphere", + "module": "Sphere" } ] From 93d4879f8187e4e06da9500929feeb99e1c53194 Mon Sep 17 00:00:00 2001 From: NanxiangLiu <33285578+Nickcandy@users.noreply.github.com> Date: Mon, 8 Apr 2024 15:06:43 +0800 Subject: [PATCH 11/12] fix oob pipeline (#24585) --- build.proj | 8 +------- tools/PublishModules.ps1 | 2 +- tools/PublishModules.psm1 | 12 +++++++----- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/build.proj b/build.proj index 259304d01ff0..e4c93077cdd8 100644 --- a/build.proj +++ b/build.proj @@ -256,13 +256,7 @@ - - - - - - - + diff --git a/tools/PublishModules.ps1 b/tools/PublishModules.ps1 index 48b51ceb303a..5bb2f9d9421e 100644 --- a/tools/PublishModules.ps1 +++ b/tools/PublishModules.ps1 @@ -109,7 +109,7 @@ if ($PublishLocal) { $null = New-Item -ItemType Directory -Force -Path $tempRepoPath $tempRepoName = ([System.Guid]::NewGuid()).ToString() $repo = Get-PSRepository | Where-Object { $_.SourceLocation -eq $tempRepoPath } -if ($repo -ne $null) { +if ($null -ne $repo) { $tempRepoName = $repo.Name } else { Register-PSRepository -Name $tempRepoName -SourceLocation $tempRepoPath -PublishLocation $tempRepoPath -InstallationPolicy Trusted -PackageManagementProvider NuGet diff --git a/tools/PublishModules.psm1 b/tools/PublishModules.psm1 index 942ed4a2070c..60fc5da0b008 100644 --- a/tools/PublishModules.psm1 +++ b/tools/PublishModules.psm1 @@ -275,9 +275,8 @@ function Get-AllModules { ) Write-Host "Getting Azure client modules" $clientModules = Get-ClientModules -BuildConfig $BuildConfig -Scope $Scope -PublishLocal:$PublishLocal -IsNetCore:$isNetCore - Write-Host " " - - if($clientModules.Length -le 2 -and $TargetBuild -eq "true") { + Write-Host "$clientModules" + if($clientModules.Count -le 2 -and $TargetBuild -eq "true") { return @{ ClientModules = $clientModules } @@ -285,11 +284,11 @@ function Get-AllModules { Write-Host "Getting admin modules" $adminModules = Get-AdminModules -BuildConfig $BuildConfig -Scope $Scope - Write-Host " " + Write-Host "$adminModules" Write-Host "Getting rollup modules" $rollupModules = Get-RollupModules -BuildConfig $BuildConfig -Scope $Scope -IsNetCore:$isNetCore - Write-Host " " + Write-Host "$rollupModules" return @{ ClientModules = $clientModules; @@ -592,6 +591,9 @@ function Add-AllModules { foreach ($package in $packages) { $fileName = $package.Name $versionString = $fileName.Replace('Az.Accounts.', '').Replace('.nupkg', '') + if ($versionString -match 'preview') { + return + } $version = [version]$versionString if ($version -gt $latestVersion) { From 37badb2ffe4fb193ca8d7c661328bea9eb52ec28 Mon Sep 17 00:00:00 2001 From: NoriZC <110961157+NoriZC@users.noreply.github.com> Date: Mon, 8 Apr 2024 16:52:51 +0800 Subject: [PATCH 12/12] [Az.Resources]migrate to autorest.powershell (#24297) * migrate to autorest.powershell * migrate 2 * rename sdk folder * rename sdk folder * rename sdk folder * rename sdk folder * sdk check update * sdk check update * sdk check update --- .../ResourceManager/ResourceManager.csproj | 2 +- .../DeploymentStacks/PSDeploymentStack.cs | 2 +- .../Customizations/Models/GenericResource.cs | 0 .../Models/GenericResourceExpanded.cs | 0 .../Customizations/Models/WhatIfChange.cs | 0 .../Generated/DeploymentOperations.cs | 1575 +++-- .../DeploymentOperationsExtensions.cs | 607 ++ .../Generated/DeploymentScriptsClient.cs | 189 +- .../Generated/DeploymentScriptsOperations.cs | 1093 +-- .../DeploymentScriptsOperationsExtensions.cs | 424 ++ .../Generated/DeploymentStacksClient.cs | 179 +- .../Generated/DeploymentStacksOperations.cs | 2210 +++--- .../DeploymentStacksOperationsExtensions.cs | 970 +++ .../Generated/DeploymentsOperations.cs | 6055 +++++++++-------- .../DeploymentsOperationsExtensions.cs | 2734 ++++++++ .../Generated/FeatureClient.cs | 366 +- .../Generated/FeatureClientExtensions.cs | 76 + .../Generated/FeaturesOperations.cs | 702 +- .../Generated/FeaturesOperationsExtensions.cs | 267 + .../Generated/IDeploymentOperations.cs | 151 +- .../Generated/IDeploymentScriptsClient.cs | 49 +- .../Generated/IDeploymentScriptsOperations.cs | 149 +- .../Generated/IDeploymentStacksClient.cs | 45 +- .../Generated/IDeploymentStacksOperations.cs | 340 +- .../Generated/IDeploymentsOperations.cs | 1137 ++-- .../Generated/IFeatureClient.cs | 129 + .../Generated/IFeaturesOperations.cs | 113 +- .../Generated/IOperations.cs | 34 +- .../IPrivateLinkAssociationOperations.cs | 52 +- .../IProviderResourceTypesOperations.cs | 33 +- .../Generated/IProvidersOperations.cs | 144 +- .../Generated/IResourceGroupsOperations.cs | 158 +- .../Generated/IResourceManagementClient.cs | 61 +- ...ResourceManagementPrivateLinkOperations.cs | 61 +- .../Generated/IResourcePrivateLinkClient.cs | 45 +- .../Generated/IResourcesOperations.cs | 387 +- .../Generated/ISubscriptionClient.cs | 69 +- ...scriptionFeatureRegistrationsOperations.cs | 103 +- .../Generated/ISubscriptionsOperations.cs | 70 +- .../Generated/ITagsOperations.cs | 295 + .../ITemplateSpecVersionsOperations.cs | 93 +- .../Generated/ITemplateSpecsClient.cs | 53 +- .../Generated/ITemplateSpecsOperations.cs | 121 +- .../Generated/ITenantsOperations.cs | 34 +- .../Generated/Models/Alias.cs | 100 + .../Generated/Models/AliasPath.cs | 65 +- .../Generated/Models/AliasPathAttributes.cs | 17 +- .../Generated/Models/AliasPathMetadata.cs | 47 +- .../Generated/Models/AliasPathTokenType.cs | 13 +- .../Generated/Models/AliasPattern.cs | 49 +- .../Generated/Models/AliasPatternType.cs | 25 +- .../Generated/Models/AliasType.cs | 27 +- .../Generated/Models/ApiProfile.cs | 35 +- .../Generated/Models/AuthorizationProfile.cs | 65 +- .../Generated/Models/AvailabilityZonePeers.cs | 39 +- .../Generated/Models/AzureCliScript.cs | 268 + .../Models/AzureCliScriptProperties.cs | 242 + .../Generated/Models/AzurePowerShellScript.cs | 268 + .../Models/AzurePowerShellScriptProperties.cs | 242 + .../Generated/Models/AzureResourceBase.cs | 66 +- .../Generated/Models/BasicDependency.cs | 45 +- .../Generated/Models/ChangeType.cs | 70 +- .../Models/CheckResourceNameResult.cs | 49 +- .../Generated/Models/CheckZonePeersRequest.cs | 40 +- .../Generated/Models/CheckZonePeersResult.cs | 50 +- .../Generated/Models/CleanupOptions.cs | 13 +- .../Models/ContainerConfiguration.cs | 90 + .../Generated/Models/CreatedByType.cs | 13 +- .../Generated/Models/DebugSetting.cs | 51 +- .../Generated/Models/DenySettings.cs | 110 + .../Generated/Models/DenySettingsMode.cs | 21 +- .../Generated/Models/DenyStatusMode.cs | 29 +- .../Generated/Models/Dependency.cs | 59 +- .../Generated/Models/Deployment.cs | 63 +- .../Models/DeploymentExportResult.cs | 25 +- .../Generated/Models/DeploymentExtended.cs | 94 +- .../Models/DeploymentExtendedFilter.cs | 25 +- .../Generated/Models/DeploymentMode.cs | 25 +- .../Generated/Models/DeploymentOperation.cs | 45 +- .../Models/DeploymentOperationProperties.cs | 146 + .../Generated/Models/DeploymentProperties.cs | 174 + .../Models/DeploymentPropertiesExtended.cs | 238 + .../Generated/Models/DeploymentScript.cs | 99 +- .../Models/DeploymentScriptUpdateParameter.cs | 50 +- .../Models/DeploymentScriptsError.cs | 29 +- .../Models/DeploymentScriptsErrorException.cs | 25 +- .../Generated/Models/DeploymentStack.cs | 343 + .../Models/DeploymentStackProperties.cs | 303 + ...ploymentStackPropertiesActionOnUnmanage.cs | 97 + .../DeploymentStackProvisioningState.cs | 13 +- .../DeploymentStackTemplateDefinition.cs | 64 +- .../Models/DeploymentStacksDebugSetting.cs | 60 + ...entStacksDeleteAtManagementGroupHeaders.cs | 34 +- ...ymentStacksDeleteAtResourceGroupHeaders.cs | 34 +- ...oymentStacksDeleteAtSubscriptionHeaders.cs | 34 +- .../DeploymentStacksDeleteDetachEnum.cs | 13 +- .../Generated/Models/DeploymentStacksError.cs | 29 +- .../Models/DeploymentStacksErrorException.cs | 25 +- .../Models/DeploymentStacksParametersLink.cs | 54 +- .../Models/DeploymentStacksTemplateLink.cs | 113 +- .../Models/DeploymentValidateResult.cs | 43 +- .../Generated/Models/DeploymentWhatIf.cs | 48 +- .../Models/DeploymentWhatIfProperties.cs | 107 +- .../Models/DeploymentWhatIfSettings.cs | 30 +- ...entsWhatIfAtManagementGroupScopeHeaders.cs | 55 + ...oymentsWhatIfAtSubscriptionScopeHeaders.cs | 55 + .../DeploymentsWhatIfAtTenantScopeHeaders.cs | 55 + .../Models/DeploymentsWhatIfHeaders.cs | 44 +- .../Generated/Models/EnvironmentVariable.cs | 59 +- .../Generated/Models/ErrorAdditionalInfo.cs | 35 +- .../Generated/Models/ErrorDefinition.cs | 55 +- .../Generated/Models/ErrorDetail.cs | 88 + .../Generated/Models/ErrorResponse.cs | 95 + .../Models/ErrorResponseAutoGenerated.cs | 55 + .../ErrorResponseAutoGeneratedException.cs} | 35 +- .../Models/ErrorResponseException.cs | 25 +- .../Generated/Models/ExportTemplateRequest.cs | 60 +- .../Models/ExpressionEvaluationOptions.cs | 43 +- .../ExpressionEvaluationOptionsScopeType.cs | 13 +- .../Generated/Models/ExtendedLocation.cs | 39 +- .../Generated/Models/ExtendedLocationType.cs | 13 +- .../Generated/Models/FeatureProperties.cs | 29 +- .../Generated/Models/FeatureResult.cs | 56 +- .../Generated/Models/GenericResource.cs | 138 + .../Models/GenericResourceExpanded.cs | 122 + .../Generated/Models/GenericResourceFilter.cs | 45 +- .../Generated/Models/HttpMessage.cs | 27 +- .../Generated/Models/Identity.cs | 84 + .../IdentityUserAssignedIdentitiesValue.cs | 43 +- .../Models/LinkedTemplateArtifact.cs | 53 +- .../Generated/Models/Location.cs | 98 +- .../Generated/Models/LocationMetadata.cs | 111 +- .../Generated/Models/LocationType.cs | 25 +- .../Generated/Models/LogProperties.cs | 48 + .../Generated/Models/ManagedByTenant.cs | 26 +- .../Models/ManagedResourceReference.cs | 58 +- .../Models/ManagedServiceIdentity.cs | 63 +- .../Models/ManagedServiceIdentityType.cs | 13 +- .../Generated/Models/OnErrorDeployment.cs | 44 +- .../Models/OnErrorDeploymentExtended.cs | 55 +- .../Generated/Models/OnErrorDeploymentType.cs | 25 +- .../Generated/Models/Operation.cs | 37 +- .../Generated/Models/OperationDisplay.cs | 58 +- .../Generated/Models/OperationListResult.cs | 49 +- .../Generated/Models/Page.cs | 43 + .../Generated/Models/Page1.cs | 43 + .../Generated/Models/PairedRegion.cs | 48 +- .../Generated/Models/ParametersLink.cs | 48 +- .../Generated/Models/Peers.cs | 35 +- .../Generated/Models/Permission.cs | 78 + .../Generated/Models/Plan.cs | 67 +- .../Models/PrivateLinkAssociation.cs | 60 +- .../Models/PrivateLinkAssociationGetResult.cs | 35 +- .../Models/PrivateLinkAssociationObject.cs | 32 +- .../PrivateLinkAssociationProperties.cs | 44 +- ...rivateLinkAssociationPropertiesExpanded.cs | 78 + .../Generated/Models/PropertyChangeType.cs | 46 +- .../Generated/Models/Provider.cs | 90 +- .../ProviderAuthorizationConsentState.cs | 13 +- .../Models/ProviderConsentDefinition.cs | 29 +- .../Models/ProviderExtendedLocation.cs | 50 +- .../Generated/Models/ProviderPermission.cs | 63 +- .../Models/ProviderPermissionListResult.cs | 46 +- .../Models/ProviderRegistrationRequest.cs | 32 +- .../Generated/Models/ProviderResourceType.cs | 140 + .../Models/ProviderResourceTypeListResult.cs | 46 +- .../Generated/Models/ProvisioningOperation.cs | 45 +- .../Generated/Models/ProvisioningState.cs | 13 +- .../Generated/Models/ProxyResource.cs | 49 +- .../Models/PublicNetworkAccessOptions.cs | 13 +- .../Generated/Models/RegionCategory.cs | 13 +- .../Generated/Models/RegionType.cs | 13 +- .../Generated/Models/Resource.cs | 83 +- .../Generated/Models/ResourceGroup.cs | 119 +- .../Models/ResourceGroupExportResult.cs | 35 +- .../Generated/Models/ResourceGroupFilter.cs | 35 +- .../Models/ResourceGroupPatchable.cs | 63 +- .../Models/ResourceGroupProperties.cs | 25 +- .../Generated/Models/ResourceIdentityType.cs | 29 +- .../Models/ResourceManagementPrivateLink.cs | 75 +- ...anagementPrivateLinkEndpointConnections.cs | 36 +- ...ResourceManagementPrivateLinkListResult.cs | 36 +- .../ResourceManagementPrivateLinkLocation.cs | 32 +- .../Generated/Models/ResourceName.cs | 48 +- .../Generated/Models/ResourceNameStatus.cs | 13 +- ...ourceProviderOperationDisplayProperties.cs | 73 +- .../Generated/Models/ResourceReference.cs | 26 +- .../Models/ResourceReferenceExtended.cs | 40 +- .../Generated/Models/ResourceStatusMode.cs | 17 +- .../Generated/Models/ResourcesMoveInfo.cs | 40 +- .../Generated/Models/RoleDefinition.cs | 69 +- .../Generated/Models/ScopedDeployment.cs | 67 +- .../Models/ScopedDeploymentWhatIf.cs | 52 +- .../Generated/Models/ScriptLog.cs | 44 +- .../Generated/Models/ScriptLogsList.cs | 29 +- .../Models/ScriptProvisioningState.cs | 13 +- .../Generated/Models/ScriptStatus.cs | 79 +- .../Generated/Models/ScriptType.cs | 19 + .../Generated/Models/Sku.cs | 75 +- .../Generated/Models/SpendingLimit.cs} | 27 +- .../Generated/Models/StatusMessage.cs | 35 +- .../Models/StorageAccountConfiguration.cs | 46 +- .../Generated/Models/SubResource.cs | 29 +- .../Generated/Models/Subscription.cs | 137 + .../Models/SubscriptionFeatureRegistration.cs | 51 +- ...criptionFeatureRegistrationApprovalType.cs | 13 +- ...bscriptionFeatureRegistrationProperties.cs | 208 + .../SubscriptionFeatureRegistrationState.cs | 13 +- .../Generated/Models/SubscriptionPolicies.cs | 59 +- .../Generated/Models/SubscriptionState.cs | 31 +- .../Generated/Models/SystemData.cs | 91 +- .../Generated/Models/TagCount.cs | 35 +- .../Generated/Models/TagDetails.cs | 71 +- .../Generated/Models/TagValue.cs | 49 +- .../Generated/Models/Tags.cs | 29 +- .../Generated/Models/TagsPatchOperation.cs | 25 +- .../Generated/Models/TagsPatchResource.cs | 37 +- .../Generated/Models/TagsResource.cs | 69 +- .../Generated/Models/TargetResource.cs | 45 +- .../Generated/Models/TemplateHashResult.cs | 40 +- .../Generated/Models/TemplateLink.cs | 107 +- .../Generated/Models/TemplateSpec.cs | 152 + .../Models/TemplateSpecExpandKind.cs | 13 +- .../Models/TemplateSpecProperties.cs | 109 + .../Models/TemplateSpecUpdateModel.cs | 53 +- .../Generated/Models/TemplateSpecVersion.cs | 162 + .../Models/TemplateSpecVersionInfo.cs | 48 +- .../Models/TemplateSpecVersionProperties.cs | 119 + .../Models/TemplateSpecVersionUpdateModel.cs | 56 +- .../Generated/Models/TemplateSpecsError.cs | 29 +- .../Models/TemplateSpecsErrorException.cs | 25 +- .../Generated/Models/TenantCategory.cs | 27 +- .../Generated/Models/TenantIdDescription.cs | 141 + .../UnmanageActionManagementGroupMode.cs | 13 +- .../Models/UnmanageActionResourceGroupMode.cs | 13 +- .../Models/UnmanageActionResourceMode.cs | 13 +- .../Generated/Models/UserAssignedIdentity.cs | 40 +- .../Generated/Models/WhatIfChange.cs | 120 +- .../Models/WhatIfOperationProperties.cs | 48 + .../Generated/Models/WhatIfOperationResult.cs | 63 +- .../Generated/Models/WhatIfPropertyChange.cs | 95 +- .../Generated/Models/WhatIfResultFormat.cs | 25 +- .../Generated/Models/ZoneMapping.cs | 39 +- .../Generated/Operations.cs | 207 +- .../Generated/OperationsExtensions.cs | 76 + .../PrivateLinkAssociationOperations.cs | 456 +- ...vateLinkAssociationOperationsExtensions.cs | 163 + .../ProviderResourceTypesOperations.cs | 141 +- ...oviderResourceTypesOperationsExtensions.cs | 57 + .../Generated/ProvidersOperations.cs | 1034 +-- .../ProvidersOperationsExtensions.cs | 385 ++ .../Generated/ResourceGroupsOperations.cs | 962 +-- .../ResourceGroupsOperationsExtensions.cs | 376 + .../Generated/ResourceManagementClient.cs | 220 +- ...ResourceManagementPrivateLinkOperations.cs | 587 +- ...nagementPrivateLinkOperationsExtensions.cs | 190 + .../Generated/ResourcePrivateLinkClient.cs | 180 +- .../Generated/ResourcesOperations.cs | 1867 ++--- .../ResourcesOperationsExtensions.cs | 1180 ++++ .../Generated/SubscriptionClient.cs | 293 +- .../Generated/SubscriptionClientExtensions.cs | 45 + ...scriptionFeatureRegistrationsOperations.cs | 706 +- ...eatureRegistrationsOperationsExtensions.cs | 260 + .../Generated/SubscriptionsOperations.cs | 521 +- .../SubscriptionsOperationsExtensions.cs | 185 + .../Generated/TagsOperations.cs | 1102 +-- .../Generated/TagsOperationsExtensions.cs | 391 ++ .../TemplateSpecVersionsOperations.cs | 736 +- ...emplateSpecVersionsOperationsExtensions.cs | 267 + .../Generated/TemplateSpecsClient.cs | 194 +- .../Generated/TemplateSpecsOperations.cs | 883 +-- .../TemplateSpecsOperationsExtensions.cs | 321 + .../Generated/TenantsOperations.cs | 207 +- .../Generated/TenantsOperationsExtensions.cs | 76 + .../Properties/AssemblyInfo.cs | 0 .../Readme.md | 17 +- .../Resources.Management.Sdk.csproj} | 0 .../Utility/SafeJsonConvertWrapper.cs | 0 .../generate.ps1 | 0 .../DeploymentOperationsExtensions.cs | 631 -- .../DeploymentScriptsOperationsExtensions.cs | 462 -- .../DeploymentStacksOperationsExtensions.cs | 1067 --- .../DeploymentsOperationsExtensions.cs | 3137 --------- .../Generated/FeatureClientExtensions.cs | 87 - .../Generated/FeaturesOperationsExtensions.cs | 283 - .../Resources.Sdk/Generated/IFeatureClient.cs | 111 - .../Generated/ITagsOperations.cs | 299 - .../Resources.Sdk/Generated/Models/Alias.cs | 99 - .../Generated/Models/AzureCliScript.cs | 244 - .../Generated/Models/AzurePowerShellScript.cs | 244 - .../Models/ContainerConfiguration.cs | 98 - .../Generated/Models/DenySettings.cs | 113 - .../Models/DeploymentOperationProperties.cs | 142 - .../Generated/Models/DeploymentProperties.cs | 168 - .../Models/DeploymentPropertiesExtended.cs | 218 - .../Generated/Models/DeploymentStack.cs | 317 - .../Models/DeploymentStackProperties.cs | 283 - ...ploymentStackPropertiesActionOnUnmanage.cs | 87 - .../Models/DeploymentStacksDebugSetting.cs | 67 - ...entsWhatIfAtManagementGroupScopeHeaders.cs | 63 - ...oymentsWhatIfAtSubscriptionScopeHeaders.cs | 63 - .../DeploymentsWhatIfAtTenantScopeHeaders.cs | 63 - .../Generated/Models/ErrorDetail.cs | 85 - .../Generated/Models/ErrorResponse.cs | 90 - .../Generated/Models/GenericResource.cs | 118 - .../Models/GenericResourceExpanded.cs | 100 - .../Generated/Models/Identity.cs | 88 - .../Resources.Sdk/Generated/Models/Page.cs | 53 - .../Resources.Sdk/Generated/Models/Page1.cs | 53 - .../Generated/Models/Permission.cs | 77 - ...rivateLinkAssociationPropertiesExpanded.cs | 79 - .../Generated/Models/ProviderResourceType.cs | 131 - .../Generated/Models/Subscription.cs | 133 - ...bscriptionFeatureRegistrationProperties.cs | 189 - .../Generated/Models/TemplateSpec.cs | 142 - .../Generated/Models/TemplateSpecVersion.cs | 151 - .../Generated/Models/TenantIdDescription.cs | 137 - .../Generated/OperationsExtensions.cs | 87 - ...vateLinkAssociationOperationsExtensions.cs | 182 - ...oviderResourceTypesOperationsExtensions.cs | 67 - .../ProvidersOperationsExtensions.cs | 410 -- .../ResourceGroupsOperationsExtensions.cs | 438 -- ...nagementPrivateLinkOperationsExtensions.cs | 210 - .../ResourcesOperationsExtensions.cs | 1314 ---- .../SdkInfo_DeploymentScriptsClient.cs | 27 - .../SdkInfo_DeploymentStacksClient.cs | 28 - .../Generated/SdkInfo_FeatureClient.cs | 29 - .../SdkInfo_ResourceManagementClient.cs | 39 - .../SdkInfo_ResourcePrivateLinkClient.cs | 28 - .../Generated/SdkInfo_SubscriptionClient.cs | 30 - .../Generated/SdkInfo_TemplateSpecsClient.cs | 28 - .../Generated/SubscriptionClientExtensions.cs | 67 - ...eatureRegistrationsOperationsExtensions.cs | 282 - .../SubscriptionsOperationsExtensions.cs | 213 - .../Generated/TagsOperationsExtensions.cs | 466 -- ...emplateSpecVersionsOperationsExtensions.cs | 294 - .../TemplateSpecsOperationsExtensions.cs | 350 - .../Generated/TenantsOperationsExtensions.cs | 87 - .../Resources.Test/Resources.Test.csproj | 2 +- src/Resources/Resources.sln | 2 +- src/Resources/Tags/Tags.csproj | 2 +- .../SDKGeneratedCodeVerify.ps1 | 24 +- 342 files changed, 31905 insertions(+), 30490 deletions(-) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Customizations/Models/GenericResource.cs (100%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Customizations/Models/GenericResourceExpanded.cs (100%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Customizations/Models/WhatIfChange.cs (100%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/DeploymentOperations.cs (56%) create mode 100644 src/Resources/Resources.Management.Sdk/Generated/DeploymentOperationsExtensions.cs rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/DeploymentScriptsClient.cs (63%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/DeploymentScriptsOperations.cs (57%) create mode 100644 src/Resources/Resources.Management.Sdk/Generated/DeploymentScriptsOperationsExtensions.cs rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/DeploymentStacksClient.cs (65%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/DeploymentStacksOperations.cs (56%) create mode 100644 src/Resources/Resources.Management.Sdk/Generated/DeploymentStacksOperationsExtensions.cs rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/DeploymentsOperations.cs (55%) create mode 100644 src/Resources/Resources.Management.Sdk/Generated/DeploymentsOperationsExtensions.cs rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/FeatureClient.cs (61%) create mode 100644 src/Resources/Resources.Management.Sdk/Generated/FeatureClientExtensions.cs rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/FeaturesOperations.cs (58%) create mode 100644 src/Resources/Resources.Management.Sdk/Generated/FeaturesOperationsExtensions.cs rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/IDeploymentOperations.cs (63%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/IDeploymentScriptsClient.cs (62%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/IDeploymentScriptsOperations.cs (58%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/IDeploymentStacksClient.cs (64%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/IDeploymentStacksOperations.cs (55%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/IDeploymentsOperations.cs (51%) create mode 100644 src/Resources/Resources.Management.Sdk/Generated/IFeatureClient.cs rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/IFeaturesOperations.cs (56%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/IOperations.cs (67%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/IPrivateLinkAssociationOperations.cs (65%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/IProviderResourceTypesOperations.cs (64%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/IProvidersOperations.cs (59%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/IResourceGroupsOperations.cs (58%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/IResourceManagementClient.cs (66%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/IResourceManagementPrivateLinkOperations.cs (64%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/IResourcePrivateLinkClient.cs (65%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/IResourcesOperations.cs (59%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/ISubscriptionClient.cs (50%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/ISubscriptionFeatureRegistrationsOperations.cs (55%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/ISubscriptionsOperations.cs (60%) create mode 100644 src/Resources/Resources.Management.Sdk/Generated/ITagsOperations.cs rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/ITemplateSpecVersionsOperations.cs (59%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/ITemplateSpecsClient.cs (62%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/ITemplateSpecsOperations.cs (58%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/ITenantsOperations.cs (65%) create mode 100644 src/Resources/Resources.Management.Sdk/Generated/Models/Alias.cs rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/AliasPath.cs (53%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/AliasPathAttributes.cs (83%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/AliasPathMetadata.cs (58%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/AliasPathTokenType.cs (93%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/AliasPattern.cs (60%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/AliasPatternType.cs (81%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/AliasType.cs (81%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ApiProfile.cs (67%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/AuthorizationProfile.cs (58%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/AvailabilityZonePeers.cs (71%) create mode 100644 src/Resources/Resources.Management.Sdk/Generated/Models/AzureCliScript.cs create mode 100644 src/Resources/Resources.Management.Sdk/Generated/Models/AzureCliScriptProperties.cs create mode 100644 src/Resources/Resources.Management.Sdk/Generated/Models/AzurePowerShellScript.cs create mode 100644 src/Resources/Resources.Management.Sdk/Generated/Models/AzurePowerShellScriptProperties.cs rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/AzureResourceBase.cs (61%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/BasicDependency.cs (70%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ChangeType.cs (68%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/CheckResourceNameResult.cs (67%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/CheckZonePeersRequest.cs (67%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/CheckZonePeersResult.cs (60%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/CleanupOptions.cs (85%) create mode 100644 src/Resources/Resources.Management.Sdk/Generated/Models/ContainerConfiguration.cs rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/CreatedByType.cs (85%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/DebugSetting.cs (52%) create mode 100644 src/Resources/Resources.Management.Sdk/Generated/Models/DenySettings.cs rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/DenySettingsMode.cs (83%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/DenyStatusMode.cs (82%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/Dependency.cs (56%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/Deployment.cs (57%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/DeploymentExportResult.cs (78%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/DeploymentExtended.cs (52%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/DeploymentExtendedFilter.cs (80%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/DeploymentMode.cs (79%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/DeploymentOperation.cs (65%) create mode 100644 src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentOperationProperties.cs create mode 100644 src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentProperties.cs create mode 100644 src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentPropertiesExtended.cs rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/DeploymentScript.cs (54%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/DeploymentScriptUpdateParameter.cs (64%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/DeploymentScriptsError.cs (64%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/DeploymentScriptsErrorException.cs (80%) create mode 100644 src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentStack.cs create mode 100644 src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentStackProperties.cs create mode 100644 src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentStackPropertiesActionOnUnmanage.cs rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/DeploymentStackProvisioningState.cs (90%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/DeploymentStackTemplateDefinition.cs (57%) create mode 100644 src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentStacksDebugSetting.cs rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/DeploymentStacksDeleteAtManagementGroupHeaders.cs (62%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/DeploymentStacksDeleteAtResourceGroupHeaders.cs (62%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/DeploymentStacksDeleteAtSubscriptionHeaders.cs (62%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/DeploymentStacksDeleteDetachEnum.cs (84%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/DeploymentStacksError.cs (63%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/DeploymentStacksErrorException.cs (80%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/DeploymentStacksParametersLink.cs (67%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/DeploymentStacksTemplateLink.cs (50%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/DeploymentValidateResult.cs (72%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/DeploymentWhatIf.cs (66%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/DeploymentWhatIfProperties.cs (51%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/DeploymentWhatIfSettings.cs (69%) create mode 100644 src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentsWhatIfAtManagementGroupScopeHeaders.cs create mode 100644 src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentsWhatIfAtSubscriptionScopeHeaders.cs create mode 100644 src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentsWhatIfAtTenantScopeHeaders.cs rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/DeploymentsWhatIfHeaders.cs (57%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/EnvironmentVariable.cs (69%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ErrorAdditionalInfo.cs (72%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ErrorDefinition.cs (58%) create mode 100644 src/Resources/Resources.Management.Sdk/Generated/Models/ErrorDetail.cs create mode 100644 src/Resources/Resources.Management.Sdk/Generated/Models/ErrorResponse.cs create mode 100644 src/Resources/Resources.Management.Sdk/Generated/Models/ErrorResponseAutoGenerated.cs rename src/Resources/{Resources.Sdk/Generated/Models/DeploymentStackPropertiesException.cs => Resources.Management.Sdk/Generated/Models/ErrorResponseAutoGeneratedException.cs} (53%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ErrorResponseException.cs (75%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ExportTemplateRequest.cs (52%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ExpressionEvaluationOptions.cs (65%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ExpressionEvaluationOptionsScopeType.cs (85%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ExtendedLocation.cs (69%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ExtendedLocationType.cs (82%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/FeatureProperties.cs (78%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/FeatureResult.cs (67%) create mode 100644 src/Resources/Resources.Management.Sdk/Generated/Models/GenericResource.cs create mode 100644 src/Resources/Resources.Management.Sdk/Generated/Models/GenericResourceExpanded.cs rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/GenericResourceFilter.cs (65%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/HttpMessage.cs (74%) create mode 100644 src/Resources/Resources.Management.Sdk/Generated/Models/Identity.cs rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/IdentityUserAssignedIdentitiesValue.cs (64%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/LinkedTemplateArtifact.cs (66%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/Location.cs (55%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/LocationMetadata.cs (53%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/LocationType.cs (79%) create mode 100644 src/Resources/Resources.Management.Sdk/Generated/Models/LogProperties.cs rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ManagedByTenant.cs (80%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ManagedResourceReference.cs (58%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ManagedServiceIdentity.cs (52%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ManagedServiceIdentityType.cs (83%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/OnErrorDeployment.cs (66%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/OnErrorDeploymentExtended.cs (64%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/OnErrorDeploymentType.cs (80%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/Operation.cs (72%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/OperationDisplay.cs (67%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/OperationListResult.cs (60%) create mode 100644 src/Resources/Resources.Management.Sdk/Generated/Models/Page.cs create mode 100644 src/Resources/Resources.Management.Sdk/Generated/Models/Page1.cs rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/PairedRegion.cs (68%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ParametersLink.cs (68%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/Peers.cs (70%) create mode 100644 src/Resources/Resources.Management.Sdk/Generated/Models/Permission.cs rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/Plan.cs (55%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/PrivateLinkAssociation.cs (63%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/PrivateLinkAssociationGetResult.cs (68%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/PrivateLinkAssociationObject.cs (72%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/PrivateLinkAssociationProperties.cs (61%) create mode 100644 src/Resources/Resources.Management.Sdk/Generated/Models/PrivateLinkAssociationPropertiesExpanded.cs rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/PropertyChangeType.cs (76%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/Provider.cs (50%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ProviderAuthorizationConsentState.cs (86%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ProviderConsentDefinition.cs (75%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ProviderExtendedLocation.cs (61%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ProviderPermission.cs (58%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ProviderPermissionListResult.cs (64%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ProviderRegistrationRequest.cs (78%) create mode 100644 src/Resources/Resources.Management.Sdk/Generated/Models/ProviderResourceType.cs rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ProviderResourceTypeListResult.cs (61%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ProvisioningOperation.cs (82%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ProvisioningState.cs (90%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ProxyResource.cs (62%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/PublicNetworkAccessOptions.cs (84%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/RegionCategory.cs (84%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/RegionType.cs (83%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/Resource.cs (51%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ResourceGroup.cs (50%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ResourceGroupExportResult.cs (72%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ResourceGroupFilter.cs (71%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ResourceGroupPatchable.cs (62%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ResourceGroupProperties.cs (79%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ResourceIdentityType.cs (80%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ResourceManagementPrivateLink.cs (56%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ResourceManagementPrivateLinkEndpointConnections.cs (58%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ResourceManagementPrivateLinkListResult.cs (57%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ResourceManagementPrivateLinkLocation.cs (68%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ResourceName.cs (63%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ResourceNameStatus.cs (83%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ResourceProviderOperationDisplayProperties.cs (53%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ResourceReference.cs (80%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ResourceReferenceExtended.cs (62%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ResourceStatusMode.cs (84%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ResourcesMoveInfo.cs (62%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/RoleDefinition.cs (58%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ScopedDeployment.cs (55%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ScopedDeploymentWhatIf.cs (63%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ScriptLog.cs (70%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ScriptLogsList.cs (69%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ScriptProvisioningState.cs (88%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ScriptStatus.cs (61%) create mode 100644 src/Resources/Resources.Management.Sdk/Generated/Models/ScriptType.cs rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/Sku.cs (56%) rename src/Resources/{Resources.Sdk/Generated/Models/spendingLimit.cs => Resources.Management.Sdk/Generated/Models/SpendingLimit.cs} (79%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/StatusMessage.cs (78%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/StorageAccountConfiguration.cs (70%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/SubResource.cs (72%) create mode 100644 src/Resources/Resources.Management.Sdk/Generated/Models/Subscription.cs rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/SubscriptionFeatureRegistration.cs (69%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/SubscriptionFeatureRegistrationApprovalType.cs (86%) create mode 100644 src/Resources/Resources.Management.Sdk/Generated/Models/SubscriptionFeatureRegistrationProperties.cs rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/SubscriptionFeatureRegistrationState.cs (89%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/SubscriptionPolicies.cs (55%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/SubscriptionState.cs (80%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/SystemData.cs (57%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/TagCount.cs (71%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/TagDetails.cs (51%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/TagValue.cs (61%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/Tags.cs (64%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/TagsPatchOperation.cs (61%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/TagsPatchResource.cs (69%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/TagsResource.cs (63%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/TargetResource.cs (70%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/TemplateHashResult.cs (70%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/TemplateLink.cs (50%) create mode 100644 src/Resources/Resources.Management.Sdk/Generated/Models/TemplateSpec.cs rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/TemplateSpecExpandKind.cs (85%) create mode 100644 src/Resources/Resources.Management.Sdk/Generated/Models/TemplateSpecProperties.cs rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/TemplateSpecUpdateModel.cs (63%) create mode 100644 src/Resources/Resources.Management.Sdk/Generated/Models/TemplateSpecVersion.cs rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/TemplateSpecVersionInfo.cs (68%) create mode 100644 src/Resources/Resources.Management.Sdk/Generated/Models/TemplateSpecVersionProperties.cs rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/TemplateSpecVersionUpdateModel.cs (62%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/TemplateSpecsError.cs (63%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/TemplateSpecsErrorException.cs (80%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/TenantCategory.cs (79%) create mode 100644 src/Resources/Resources.Management.Sdk/Generated/Models/TenantIdDescription.cs rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/UnmanageActionManagementGroupMode.cs (84%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/UnmanageActionResourceGroupMode.cs (84%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/UnmanageActionResourceMode.cs (84%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/UserAssignedIdentity.cs (72%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/WhatIfChange.cs (51%) create mode 100644 src/Resources/Resources.Management.Sdk/Generated/Models/WhatIfOperationProperties.cs rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/WhatIfOperationResult.cs (62%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/WhatIfPropertyChange.cs (55%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/WhatIfResultFormat.cs (80%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Models/ZoneMapping.cs (63%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/Operations.cs (58%) create mode 100644 src/Resources/Resources.Management.Sdk/Generated/OperationsExtensions.cs rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/PrivateLinkAssociationOperations.cs (57%) create mode 100644 src/Resources/Resources.Management.Sdk/Generated/PrivateLinkAssociationOperationsExtensions.cs rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/ProviderResourceTypesOperations.cs (60%) create mode 100644 src/Resources/Resources.Management.Sdk/Generated/ProviderResourceTypesOperationsExtensions.cs rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/ProvidersOperations.cs (57%) create mode 100644 src/Resources/Resources.Management.Sdk/Generated/ProvidersOperationsExtensions.cs rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/ResourceGroupsOperations.cs (56%) create mode 100644 src/Resources/Resources.Management.Sdk/Generated/ResourceGroupsOperationsExtensions.cs rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/ResourceManagementClient.cs (64%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/ResourceManagementPrivateLinkOperations.cs (56%) create mode 100644 src/Resources/Resources.Management.Sdk/Generated/ResourceManagementPrivateLinkOperationsExtensions.cs rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/ResourcePrivateLinkClient.cs (66%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/ResourcesOperations.cs (57%) create mode 100644 src/Resources/Resources.Management.Sdk/Generated/ResourcesOperationsExtensions.cs rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/SubscriptionClient.cs (62%) create mode 100644 src/Resources/Resources.Management.Sdk/Generated/SubscriptionClientExtensions.cs rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/SubscriptionFeatureRegistrationsOperations.cs (58%) create mode 100644 src/Resources/Resources.Management.Sdk/Generated/SubscriptionFeatureRegistrationsOperationsExtensions.cs rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/SubscriptionsOperations.cs (57%) create mode 100644 src/Resources/Resources.Management.Sdk/Generated/SubscriptionsOperationsExtensions.cs rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/TagsOperations.cs (57%) create mode 100644 src/Resources/Resources.Management.Sdk/Generated/TagsOperationsExtensions.cs rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/TemplateSpecVersionsOperations.cs (57%) create mode 100644 src/Resources/Resources.Management.Sdk/Generated/TemplateSpecVersionsOperationsExtensions.cs rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/TemplateSpecsClient.cs (64%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/TemplateSpecsOperations.cs (57%) create mode 100644 src/Resources/Resources.Management.Sdk/Generated/TemplateSpecsOperationsExtensions.cs rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Generated/TenantsOperations.cs (58%) create mode 100644 src/Resources/Resources.Management.Sdk/Generated/TenantsOperationsExtensions.cs rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Properties/AssemblyInfo.cs (100%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Readme.md (85%) rename src/Resources/{Resources.Sdk/Resources.Sdk.csproj => Resources.Management.Sdk/Resources.Management.Sdk.csproj} (100%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/Utility/SafeJsonConvertWrapper.cs (100%) rename src/Resources/{Resources.Sdk => Resources.Management.Sdk}/generate.ps1 (100%) delete mode 100644 src/Resources/Resources.Sdk/Generated/DeploymentOperationsExtensions.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/DeploymentScriptsOperationsExtensions.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/DeploymentStacksOperationsExtensions.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/DeploymentsOperationsExtensions.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/FeatureClientExtensions.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/FeaturesOperationsExtensions.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/IFeatureClient.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/ITagsOperations.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/Models/Alias.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/Models/AzureCliScript.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/Models/AzurePowerShellScript.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/Models/ContainerConfiguration.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/Models/DenySettings.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/Models/DeploymentOperationProperties.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/Models/DeploymentProperties.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/Models/DeploymentPropertiesExtended.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/Models/DeploymentStack.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/Models/DeploymentStackProperties.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/Models/DeploymentStackPropertiesActionOnUnmanage.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/Models/DeploymentStacksDebugSetting.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/Models/DeploymentsWhatIfAtManagementGroupScopeHeaders.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/Models/DeploymentsWhatIfAtSubscriptionScopeHeaders.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/Models/DeploymentsWhatIfAtTenantScopeHeaders.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/Models/ErrorDetail.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/Models/ErrorResponse.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/Models/GenericResource.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/Models/GenericResourceExpanded.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/Models/Identity.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/Models/Page.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/Models/Page1.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/Models/Permission.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/Models/PrivateLinkAssociationPropertiesExpanded.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/Models/ProviderResourceType.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/Models/Subscription.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/Models/SubscriptionFeatureRegistrationProperties.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/Models/TemplateSpec.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/Models/TemplateSpecVersion.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/Models/TenantIdDescription.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/OperationsExtensions.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/PrivateLinkAssociationOperationsExtensions.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/ProviderResourceTypesOperationsExtensions.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/ProvidersOperationsExtensions.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/ResourceGroupsOperationsExtensions.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/ResourceManagementPrivateLinkOperationsExtensions.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/ResourcesOperationsExtensions.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/SdkInfo_DeploymentScriptsClient.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/SdkInfo_DeploymentStacksClient.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/SdkInfo_FeatureClient.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/SdkInfo_ResourceManagementClient.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/SdkInfo_ResourcePrivateLinkClient.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/SdkInfo_SubscriptionClient.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/SdkInfo_TemplateSpecsClient.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/SubscriptionClientExtensions.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/SubscriptionFeatureRegistrationsOperationsExtensions.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/SubscriptionsOperationsExtensions.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/TagsOperationsExtensions.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/TemplateSpecVersionsOperationsExtensions.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/TemplateSpecsOperationsExtensions.cs delete mode 100644 src/Resources/Resources.Sdk/Generated/TenantsOperationsExtensions.cs diff --git a/src/Resources/ResourceManager/ResourceManager.csproj b/src/Resources/ResourceManager/ResourceManager.csproj index 32786542f6d6..a6ccd8aeed9b 100644 --- a/src/Resources/ResourceManager/ResourceManager.csproj +++ b/src/Resources/ResourceManager/ResourceManager.csproj @@ -17,7 +17,7 @@ - + diff --git a/src/Resources/ResourceManager/SdkModels/DeploymentStacks/PSDeploymentStack.cs b/src/Resources/ResourceManager/SdkModels/DeploymentStacks/PSDeploymentStack.cs index 3f30da8f0dd2..3de1e2340f63 100644 --- a/src/Resources/ResourceManager/SdkModels/DeploymentStacks/PSDeploymentStack.cs +++ b/src/Resources/ResourceManager/SdkModels/DeploymentStacks/PSDeploymentStack.cs @@ -89,7 +89,7 @@ internal PSDeploymentStack(DeploymentStack deploymentStack) this.provisioningState = deploymentStack.ProvisioningState; this.deploymentScope = deploymentStack.DeploymentScope; this.description = deploymentStack.Description; - this.resources = deploymentStack.ResourcesProperty; + this.resources = deploymentStack.Resources; this.denySettings = deploymentStack.DenySettings; this.detachedResources = deploymentStack.DetachedResources; this.deletedResources = deploymentStack.DeletedResources; diff --git a/src/Resources/Resources.Sdk/Customizations/Models/GenericResource.cs b/src/Resources/Resources.Management.Sdk/Customizations/Models/GenericResource.cs similarity index 100% rename from src/Resources/Resources.Sdk/Customizations/Models/GenericResource.cs rename to src/Resources/Resources.Management.Sdk/Customizations/Models/GenericResource.cs diff --git a/src/Resources/Resources.Sdk/Customizations/Models/GenericResourceExpanded.cs b/src/Resources/Resources.Management.Sdk/Customizations/Models/GenericResourceExpanded.cs similarity index 100% rename from src/Resources/Resources.Sdk/Customizations/Models/GenericResourceExpanded.cs rename to src/Resources/Resources.Management.Sdk/Customizations/Models/GenericResourceExpanded.cs diff --git a/src/Resources/Resources.Sdk/Customizations/Models/WhatIfChange.cs b/src/Resources/Resources.Management.Sdk/Customizations/Models/WhatIfChange.cs similarity index 100% rename from src/Resources/Resources.Sdk/Customizations/Models/WhatIfChange.cs rename to src/Resources/Resources.Management.Sdk/Customizations/Models/WhatIfChange.cs diff --git a/src/Resources/Resources.Sdk/Generated/DeploymentOperations.cs b/src/Resources/Resources.Management.Sdk/Generated/DeploymentOperations.cs similarity index 56% rename from src/Resources/Resources.Sdk/Generated/DeploymentOperations.cs rename to src/Resources/Resources.Management.Sdk/Generated/DeploymentOperations.cs index 49f47efc6998..dfe9de2b7824 100644 --- a/src/Resources/Resources.Sdk/Generated/DeploymentOperations.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/DeploymentOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// DeploymentOperations operations. /// - internal partial class DeploymentOperations : IServiceOperations, IDeploymentOperations + internal partial class DeploymentOperations : Microsoft.Rest.IServiceOperations, IDeploymentOperations { /// /// Initializes a new instance of the DeploymentOperations class. @@ -36,13 +24,13 @@ internal partial class DeploymentOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal DeploymentOperations(ResourceManagementClient client) + internal DeploymentOperations (ResourceManagementClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -68,13 +56,13 @@ internal DeploymentOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -83,87 +71,97 @@ internal DeploymentOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetAtScopeWithHttpMessagesAsync(string scope, string deploymentName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetAtScopeWithHttpMessagesAsync(string scope, string deploymentName, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (scope == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "scope"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "scope"); } + if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } if (operationId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "operationId"); } - if (Client.ApiVersion == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("scope", scope); tracingParameters.Add("deploymentName", deploymentName); tracingParameters.Add("operationId", operationId); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetAtScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "GetAtScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{scope}/providers/Microsoft.Resources/deployments/{deploymentName}/operations/{operationId}").ToString(); _url = _url.Replace("{scope}", scope); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -175,55 +173,56 @@ internal DeploymentOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -233,9 +232,10 @@ internal DeploymentOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -246,25 +246,29 @@ internal DeploymentOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets all deployments operations for a deployment. /// @@ -283,13 +287,13 @@ internal DeploymentOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -298,86 +302,96 @@ internal DeploymentOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListAtScopeWithHttpMessagesAsync(string scope, string deploymentName, int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListAtScopeWithHttpMessagesAsync(string scope, string deploymentName, int? top = default(int?), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (scope == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "scope"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "scope"); } + if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("scope", scope); tracingParameters.Add("deploymentName", deploymentName); tracingParameters.Add("top", top); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListAtScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListAtScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{scope}/providers/Microsoft.Resources/deployments/{deploymentName}/operations").ToString(); _url = _url.Replace("{scope}", scope); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (top != null) { - _queryParameters.Add(string.Format("$top={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(top, Client.SerializationSettings).Trim('"')))); + _queryParameters.Add(string.Format("$top={0}", System.Uri.EscapeDataString(Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(top, this.Client.SerializationSettings).Trim('"')))); } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -389,55 +403,56 @@ internal DeploymentOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -447,9 +462,10 @@ internal DeploymentOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -460,25 +476,29 @@ internal DeploymentOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets a deployments operation. /// @@ -494,13 +514,13 @@ internal DeploymentOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -509,81 +529,90 @@ internal DeploymentOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetAtTenantScopeWithHttpMessagesAsync(string deploymentName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetAtTenantScopeWithHttpMessagesAsync(string deploymentName, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } if (operationId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "operationId"); } - if (Client.ApiVersion == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("deploymentName", deploymentName); tracingParameters.Add("operationId", operationId); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetAtTenantScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "GetAtTenantScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Resources/deployments/{deploymentName}/operations/{operationId}").ToString(); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -595,55 +624,56 @@ internal DeploymentOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -653,9 +683,10 @@ internal DeploymentOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -666,25 +697,29 @@ internal DeploymentOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets all deployments operations for a deployment. /// @@ -700,13 +735,13 @@ internal DeploymentOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -715,80 +750,89 @@ internal DeploymentOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListAtTenantScopeWithHttpMessagesAsync(string deploymentName, int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListAtTenantScopeWithHttpMessagesAsync(string deploymentName, int? top = default(int?), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("deploymentName", deploymentName); tracingParameters.Add("top", top); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListAtTenantScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListAtTenantScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Resources/deployments/{deploymentName}/operations").ToString(); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (top != null) { - _queryParameters.Add(string.Format("$top={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(top, Client.SerializationSettings).Trim('"')))); + _queryParameters.Add(string.Format("$top={0}", System.Uri.EscapeDataString(Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(top, this.Client.SerializationSettings).Trim('"')))); } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -800,55 +844,56 @@ internal DeploymentOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -858,9 +903,10 @@ internal DeploymentOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -871,25 +917,29 @@ internal DeploymentOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets a deployments operation. /// @@ -908,13 +958,13 @@ internal DeploymentOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -923,98 +973,107 @@ internal DeploymentOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (groupId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "groupId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "groupId"); } if (groupId != null) { if (groupId.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "groupId", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "groupId", 90); } if (groupId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "groupId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "groupId", 1); } } if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } if (operationId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "operationId"); } - if (Client.ApiVersion == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("groupId", groupId); tracingParameters.Add("deploymentName", deploymentName); tracingParameters.Add("operationId", operationId); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetAtManagementGroupScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "GetAtManagementGroupScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/operations/{operationId}").ToString(); _url = _url.Replace("{groupId}", System.Uri.EscapeDataString(groupId)); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1026,55 +1085,56 @@ internal DeploymentOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1084,9 +1144,10 @@ internal DeploymentOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -1097,25 +1158,29 @@ internal DeploymentOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets all deployments operations for a deployment. /// @@ -1134,13 +1199,13 @@ internal DeploymentOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1149,97 +1214,106 @@ internal DeploymentOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, int? top = default(int?), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (groupId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "groupId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "groupId"); } if (groupId != null) { if (groupId.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "groupId", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "groupId", 90); } if (groupId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "groupId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "groupId", 1); } } if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("groupId", groupId); tracingParameters.Add("deploymentName", deploymentName); tracingParameters.Add("top", top); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListAtManagementGroupScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListAtManagementGroupScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/operations").ToString(); _url = _url.Replace("{groupId}", System.Uri.EscapeDataString(groupId)); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (top != null) { - _queryParameters.Add(string.Format("$top={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(top, Client.SerializationSettings).Trim('"')))); + _queryParameters.Add(string.Format("$top={0}", System.Uri.EscapeDataString(Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(top, this.Client.SerializationSettings).Trim('"')))); } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1251,55 +1325,56 @@ internal DeploymentOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1309,9 +1384,10 @@ internal DeploymentOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -1322,25 +1398,29 @@ internal DeploymentOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets a deployments operation. /// @@ -1356,13 +1436,13 @@ internal DeploymentOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1371,86 +1451,96 @@ internal DeploymentOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } if (operationId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "operationId"); } - if (Client.ApiVersion == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("deploymentName", deploymentName); tracingParameters.Add("operationId", operationId); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetAtSubscriptionScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "GetAtSubscriptionScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}/operations/{operationId}").ToString(); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1462,55 +1552,56 @@ internal DeploymentOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1520,9 +1611,10 @@ internal DeploymentOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -1533,25 +1625,29 @@ internal DeploymentOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets all deployments operations for a deployment. /// @@ -1567,13 +1663,13 @@ internal DeploymentOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1582,85 +1678,95 @@ internal DeploymentOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, int? top = default(int?), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("deploymentName", deploymentName); tracingParameters.Add("top", top); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListAtSubscriptionScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListAtSubscriptionScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}/operations").ToString(); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (top != null) { - _queryParameters.Add(string.Format("$top={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(top, Client.SerializationSettings).Trim('"')))); + _queryParameters.Add(string.Format("$top={0}", System.Uri.EscapeDataString(Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(top, this.Client.SerializationSettings).Trim('"')))); } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1672,55 +1778,56 @@ internal DeploymentOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1730,9 +1837,10 @@ internal DeploymentOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -1743,25 +1851,29 @@ internal DeploymentOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets a deployments operation. /// @@ -1780,13 +1892,13 @@ internal DeploymentOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1795,107 +1907,117 @@ internal DeploymentOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string deploymentName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string deploymentName, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); } } if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } if (operationId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "operationId"); } - if (Client.ApiVersion == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("deploymentName", deploymentName); tracingParameters.Add("operationId", operationId); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/deployments/{deploymentName}/operations/{operationId}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1907,55 +2029,56 @@ internal DeploymentOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1965,9 +2088,10 @@ internal DeploymentOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -1978,25 +2102,29 @@ internal DeploymentOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets all deployments operations for a deployment. /// @@ -2015,13 +2143,13 @@ internal DeploymentOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -2030,106 +2158,116 @@ internal DeploymentOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, string deploymentName, int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string deploymentName, int? top = default(int?), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); } } if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("deploymentName", deploymentName); tracingParameters.Add("top", top); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/deployments/{deploymentName}/operations").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (top != null) { - _queryParameters.Add(string.Format("$top={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(top, Client.SerializationSettings).Trim('"')))); + _queryParameters.Add(string.Format("$top={0}", System.Uri.EscapeDataString(Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(top, this.Client.SerializationSettings).Trim('"')))); } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2141,55 +2279,56 @@ internal DeploymentOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -2199,9 +2338,10 @@ internal DeploymentOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -2212,25 +2352,29 @@ internal DeploymentOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets all deployments operations for a deployment. /// @@ -2243,13 +2387,13 @@ internal DeploymentOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -2258,51 +2402,54 @@ internal DeploymentOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListAtScopeNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListAtScopeNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListAtScopeNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListAtScopeNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2314,55 +2461,56 @@ internal DeploymentOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -2372,9 +2520,10 @@ internal DeploymentOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -2385,25 +2534,29 @@ internal DeploymentOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets all deployments operations for a deployment. /// @@ -2416,13 +2569,13 @@ internal DeploymentOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -2431,51 +2584,54 @@ internal DeploymentOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListAtTenantScopeNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListAtTenantScopeNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListAtTenantScopeNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListAtTenantScopeNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2487,55 +2643,56 @@ internal DeploymentOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -2545,9 +2702,10 @@ internal DeploymentOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -2558,25 +2716,29 @@ internal DeploymentOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets all deployments operations for a deployment. /// @@ -2589,13 +2751,13 @@ internal DeploymentOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -2604,51 +2766,54 @@ internal DeploymentOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListAtManagementGroupScopeNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListAtManagementGroupScopeNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListAtManagementGroupScopeNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListAtManagementGroupScopeNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2660,55 +2825,56 @@ internal DeploymentOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -2718,9 +2884,10 @@ internal DeploymentOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -2731,25 +2898,29 @@ internal DeploymentOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets all deployments operations for a deployment. /// @@ -2762,13 +2933,13 @@ internal DeploymentOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -2777,51 +2948,54 @@ internal DeploymentOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListAtSubscriptionScopeNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListAtSubscriptionScopeNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListAtSubscriptionScopeNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListAtSubscriptionScopeNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2833,55 +3007,56 @@ internal DeploymentOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -2891,9 +3066,10 @@ internal DeploymentOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -2904,25 +3080,29 @@ internal DeploymentOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets all deployments operations for a deployment. /// @@ -2935,13 +3115,13 @@ internal DeploymentOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -2950,51 +3130,54 @@ internal DeploymentOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -3006,55 +3189,56 @@ internal DeploymentOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -3064,9 +3248,10 @@ internal DeploymentOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -3077,24 +3262,28 @@ internal DeploymentOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/DeploymentOperationsExtensions.cs b/src/Resources/Resources.Management.Sdk/Generated/DeploymentOperationsExtensions.cs new file mode 100644 index 000000000000..76f300630e16 --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/DeploymentOperationsExtensions.cs @@ -0,0 +1,607 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +namespace Microsoft.Azure.Management.Resources +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// Extension methods for DeploymentOperations + /// + public static partial class DeploymentOperationsExtensions + { + /// + /// Gets a deployments operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource scope. + /// + /// + /// The name of the deployment. + /// + /// + /// The ID of the operation to get. + /// + public static DeploymentOperation GetAtScope(this IDeploymentOperations operations, string scope, string deploymentName, string operationId) + { + return ((IDeploymentOperations)operations).GetAtScopeAsync(scope, deploymentName, operationId).GetAwaiter().GetResult(); + } + + /// + /// Gets a deployments operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource scope. + /// + /// + /// The name of the deployment. + /// + /// + /// The ID of the operation to get. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAtScopeAsync(this IDeploymentOperations operations, string scope, string deploymentName, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetAtScopeWithHttpMessagesAsync(scope, deploymentName, operationId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets all deployments operations for a deployment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource scope. + /// + /// + /// The name of the deployment. + /// + /// + /// The number of results to return. + /// + public static Microsoft.Rest.Azure.IPage ListAtScope(this IDeploymentOperations operations, string scope, string deploymentName, int? top = default(int?)) + { + return ((IDeploymentOperations)operations).ListAtScopeAsync(scope, deploymentName, top).GetAwaiter().GetResult(); + } + + /// + /// Gets all deployments operations for a deployment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource scope. + /// + /// + /// The name of the deployment. + /// + /// + /// The number of results to return. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAtScopeAsync(this IDeploymentOperations operations, string scope, string deploymentName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListAtScopeWithHttpMessagesAsync(scope, deploymentName, top, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets a deployments operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + /// + /// The ID of the operation to get. + /// + public static DeploymentOperation GetAtTenantScope(this IDeploymentOperations operations, string deploymentName, string operationId) + { + return ((IDeploymentOperations)operations).GetAtTenantScopeAsync(deploymentName, operationId).GetAwaiter().GetResult(); + } + + /// + /// Gets a deployments operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + /// + /// The ID of the operation to get. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAtTenantScopeAsync(this IDeploymentOperations operations, string deploymentName, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetAtTenantScopeWithHttpMessagesAsync(deploymentName, operationId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets all deployments operations for a deployment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + /// + /// The number of results to return. + /// + public static Microsoft.Rest.Azure.IPage ListAtTenantScope(this IDeploymentOperations operations, string deploymentName, int? top = default(int?)) + { + return ((IDeploymentOperations)operations).ListAtTenantScopeAsync(deploymentName, top).GetAwaiter().GetResult(); + } + + /// + /// Gets all deployments operations for a deployment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + /// + /// The number of results to return. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAtTenantScopeAsync(this IDeploymentOperations operations, string deploymentName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListAtTenantScopeWithHttpMessagesAsync(deploymentName, top, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets a deployments operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The management group ID. + /// + /// + /// The name of the deployment. + /// + /// + /// The ID of the operation to get. + /// + public static DeploymentOperation GetAtManagementGroupScope(this IDeploymentOperations operations, string groupId, string deploymentName, string operationId) + { + return ((IDeploymentOperations)operations).GetAtManagementGroupScopeAsync(groupId, deploymentName, operationId).GetAwaiter().GetResult(); + } + + /// + /// Gets a deployments operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The management group ID. + /// + /// + /// The name of the deployment. + /// + /// + /// The ID of the operation to get. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAtManagementGroupScopeAsync(this IDeploymentOperations operations, string groupId, string deploymentName, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetAtManagementGroupScopeWithHttpMessagesAsync(groupId, deploymentName, operationId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets all deployments operations for a deployment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The management group ID. + /// + /// + /// The name of the deployment. + /// + /// + /// The number of results to return. + /// + public static Microsoft.Rest.Azure.IPage ListAtManagementGroupScope(this IDeploymentOperations operations, string groupId, string deploymentName, int? top = default(int?)) + { + return ((IDeploymentOperations)operations).ListAtManagementGroupScopeAsync(groupId, deploymentName, top).GetAwaiter().GetResult(); + } + + /// + /// Gets all deployments operations for a deployment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The management group ID. + /// + /// + /// The name of the deployment. + /// + /// + /// The number of results to return. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAtManagementGroupScopeAsync(this IDeploymentOperations operations, string groupId, string deploymentName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListAtManagementGroupScopeWithHttpMessagesAsync(groupId, deploymentName, top, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets a deployments operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + /// + /// The ID of the operation to get. + /// + public static DeploymentOperation GetAtSubscriptionScope(this IDeploymentOperations operations, string deploymentName, string operationId) + { + return ((IDeploymentOperations)operations).GetAtSubscriptionScopeAsync(deploymentName, operationId).GetAwaiter().GetResult(); + } + + /// + /// Gets a deployments operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + /// + /// The ID of the operation to get. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAtSubscriptionScopeAsync(this IDeploymentOperations operations, string deploymentName, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetAtSubscriptionScopeWithHttpMessagesAsync(deploymentName, operationId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets all deployments operations for a deployment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + /// + /// The number of results to return. + /// + public static Microsoft.Rest.Azure.IPage ListAtSubscriptionScope(this IDeploymentOperations operations, string deploymentName, int? top = default(int?)) + { + return ((IDeploymentOperations)operations).ListAtSubscriptionScopeAsync(deploymentName, top).GetAwaiter().GetResult(); + } + + /// + /// Gets all deployments operations for a deployment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + /// + /// The number of results to return. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAtSubscriptionScopeAsync(this IDeploymentOperations operations, string deploymentName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListAtSubscriptionScopeWithHttpMessagesAsync(deploymentName, top, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets a deployments operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the deployment. + /// + /// + /// The ID of the operation to get. + /// + public static DeploymentOperation Get(this IDeploymentOperations operations, string resourceGroupName, string deploymentName, string operationId) + { + return ((IDeploymentOperations)operations).GetAsync(resourceGroupName, deploymentName, operationId).GetAwaiter().GetResult(); + } + + /// + /// Gets a deployments operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the deployment. + /// + /// + /// The ID of the operation to get. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IDeploymentOperations operations, string resourceGroupName, string deploymentName, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, deploymentName, operationId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets all deployments operations for a deployment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the deployment. + /// + /// + /// The number of results to return. + /// + public static Microsoft.Rest.Azure.IPage List(this IDeploymentOperations operations, string resourceGroupName, string deploymentName, int? top = default(int?)) + { + return ((IDeploymentOperations)operations).ListAsync(resourceGroupName, deploymentName, top).GetAwaiter().GetResult(); + } + + /// + /// Gets all deployments operations for a deployment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the deployment. + /// + /// + /// The number of results to return. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IDeploymentOperations operations, string resourceGroupName, string deploymentName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, deploymentName, top, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets all deployments operations for a deployment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListAtScopeNext(this IDeploymentOperations operations, string nextPageLink) + { + return ((IDeploymentOperations)operations).ListAtScopeNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets all deployments operations for a deployment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAtScopeNextAsync(this IDeploymentOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListAtScopeNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets all deployments operations for a deployment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListAtTenantScopeNext(this IDeploymentOperations operations, string nextPageLink) + { + return ((IDeploymentOperations)operations).ListAtTenantScopeNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets all deployments operations for a deployment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAtTenantScopeNextAsync(this IDeploymentOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListAtTenantScopeNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets all deployments operations for a deployment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListAtManagementGroupScopeNext(this IDeploymentOperations operations, string nextPageLink) + { + return ((IDeploymentOperations)operations).ListAtManagementGroupScopeNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets all deployments operations for a deployment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAtManagementGroupScopeNextAsync(this IDeploymentOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListAtManagementGroupScopeNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets all deployments operations for a deployment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListAtSubscriptionScopeNext(this IDeploymentOperations operations, string nextPageLink) + { + return ((IDeploymentOperations)operations).ListAtSubscriptionScopeNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets all deployments operations for a deployment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAtSubscriptionScopeNextAsync(this IDeploymentOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListAtSubscriptionScopeNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets all deployments operations for a deployment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IDeploymentOperations operations, string nextPageLink) + { + return ((IDeploymentOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets all deployments operations for a deployment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IDeploymentOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } +} diff --git a/src/Resources/Resources.Sdk/Generated/DeploymentScriptsClient.cs b/src/Resources/Resources.Management.Sdk/Generated/DeploymentScriptsClient.cs similarity index 63% rename from src/Resources/Resources.Sdk/Generated/DeploymentScriptsClient.cs rename to src/Resources/Resources.Management.Sdk/Generated/DeploymentScriptsClient.cs index 8d55d0a86216..50d562c880fb 100644 --- a/src/Resources/Resources.Sdk/Generated/DeploymentScriptsClient.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/DeploymentScriptsClient.cs @@ -1,85 +1,70 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Serialization; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; /// /// The APIs listed in this specification can be used to manage Deployment /// Scripts resource through the Azure Resource Manager. /// - public partial class DeploymentScriptsClient : ServiceClient, IDeploymentScriptsClient, IAzureClient + public partial class DeploymentScriptsClient : Microsoft.Rest.ServiceClient, IDeploymentScriptsClient, IAzureClient { /// /// The base URI of the service. /// public System.Uri BaseUri { get; set; } - /// /// Gets or sets json serialization settings. /// - public JsonSerializerSettings SerializationSettings { get; private set; } - + public Newtonsoft.Json.JsonSerializerSettings SerializationSettings { get; private set; } /// /// Gets or sets json deserialization settings. /// - public JsonSerializerSettings DeserializationSettings { get; private set; } - + public Newtonsoft.Json.JsonSerializerSettings DeserializationSettings { get; private set; } /// /// Credentials needed for the client to connect to Azure. /// - public ServiceClientCredentials Credentials { get; private set; } + public Microsoft.Rest.ServiceClientCredentials Credentials { get; private set; } /// - /// Subscription Id which forms part of the URI for every service call. + /// The API version to use for this operation. /// - public string SubscriptionId { get; set; } + public string ApiVersion { get; private set; } /// - /// Client Api version. + /// Subscription Id which forms part of the URI for every service call. /// - public string ApiVersion { get; private set; } + public string SubscriptionId { get; set;} /// /// The preferred language for the response. /// - public string AcceptLanguage { get; set; } + public string AcceptLanguage { get; set;} /// - /// The retry timeout in seconds for Long Running Operations. Default value is - /// 30. + /// The retry timeout in seconds for Long Running Operations. Default + /// /// value is 30. /// - public int? LongRunningOperationRetryTimeout { get; set; } + public int? LongRunningOperationRetryTimeout { get; set;} /// - /// Whether a unique x-ms-client-request-id should be generated. When set to - /// true a unique x-ms-client-request-id value is generated and included in - /// each request. Default is true. + /// Whether a unique x-ms-client-request-id should be generated. When + /// /// set to true a unique x-ms-client-request-id value is generated and + /// /// included in each request. Default is true. /// - public bool? GenerateClientRequestId { get; set; } + public bool? GenerateClientRequestId { get; set;} /// - /// Gets the IDeploymentScriptsOperations. + /// Gets the IDeploymentScriptsOperations /// public virtual IDeploymentScriptsOperations DeploymentScripts { get; private set; } - /// /// Initializes a new instance of the DeploymentScriptsClient class. /// @@ -88,24 +73,22 @@ public partial class DeploymentScriptsClient : ServiceClient /// /// True: will dispose the provided httpClient on calling DeploymentScriptsClient.Dispose(). False: will not dispose provided httpClient - protected DeploymentScriptsClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient) + protected DeploymentScriptsClient(System.Net.Http.HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient) { - Initialize(); + this.Initialize(); } - /// /// Initializes a new instance of the DeploymentScriptsClient class. /// /// /// Optional. The delegating handlers to add to the http client pipeline. /// - protected DeploymentScriptsClient(params DelegatingHandler[] handlers) : base(handlers) + protected DeploymentScriptsClient(params System.Net.Http.DelegatingHandler[] handlers) : base(handlers) { - Initialize(); + this.Initialize(); } - /// - /// Initializes a new instance of the DeploymentScriptsClient class. + /// Initializes a new instance of the DeploymentScriptsClient class. /// /// /// Optional. The http client handler used to handle http transport. @@ -113,11 +96,10 @@ protected DeploymentScriptsClient(params DelegatingHandler[] handlers) : base(ha /// /// Optional. The delegating handlers to add to the http client pipeline. /// - protected DeploymentScriptsClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers) + protected DeploymentScriptsClient(System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : base(rootHandler, handlers) { - Initialize(); + this.Initialize(); } - /// /// Initializes a new instance of the DeploymentScriptsClient class. /// @@ -130,15 +112,14 @@ protected DeploymentScriptsClient(HttpClientHandler rootHandler, params Delegati /// /// Thrown when a required parameter is null /// - protected DeploymentScriptsClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) + protected DeploymentScriptsClient(System.Uri baseUri, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) { throw new System.ArgumentNullException("baseUri"); } - BaseUri = baseUri; + this.BaseUri = baseUri; } - /// /// Initializes a new instance of the DeploymentScriptsClient class. /// @@ -154,15 +135,15 @@ protected DeploymentScriptsClient(System.Uri baseUri, params DelegatingHandler[] /// /// Thrown when a required parameter is null /// - protected DeploymentScriptsClient(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + protected DeploymentScriptsClient(System.Uri baseUri, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) { throw new System.ArgumentNullException("baseUri"); } - BaseUri = baseUri; + + this.BaseUri = baseUri; } - /// /// Initializes a new instance of the DeploymentScriptsClient class. /// @@ -175,23 +156,23 @@ protected DeploymentScriptsClient(System.Uri baseUri, HttpClientHandler rootHand /// /// Thrown when a required parameter is null /// - public DeploymentScriptsClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + public DeploymentScriptsClient(Microsoft.Rest.ServiceClientCredentials credentials, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) { if (credentials == null) { throw new System.ArgumentNullException("credentials"); } - Credentials = credentials; - if (Credentials != null) + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the DeploymentScriptsClient class. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// @@ -202,23 +183,23 @@ public DeploymentScriptsClient(ServiceClientCredentials credentials, params Dele /// /// Thrown when a required parameter is null /// - public DeploymentScriptsClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient) + public DeploymentScriptsClient(Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient) { if (credentials == null) { throw new System.ArgumentNullException("credentials"); } - Credentials = credentials; - if (Credentials != null) + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the DeploymentScriptsClient class. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// @@ -230,26 +211,26 @@ public DeploymentScriptsClient(ServiceClientCredentials credentials, HttpClient /// /// Thrown when a required parameter is null /// - public DeploymentScriptsClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + public DeploymentScriptsClient(Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (credentials == null) { throw new System.ArgumentNullException("credentials"); } - Credentials = credentials; - if (Credentials != null) + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the DeploymentScriptsClient class. /// /// /// Optional. The base URI of the service. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// @@ -258,7 +239,7 @@ public DeploymentScriptsClient(ServiceClientCredentials credentials, HttpClientH /// /// Thrown when a required parameter is null /// - public DeploymentScriptsClient(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + public DeploymentScriptsClient(System.Uri baseUri, Microsoft.Rest.ServiceClientCredentials credentials, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) { @@ -268,33 +249,30 @@ public DeploymentScriptsClient(System.Uri baseUri, ServiceClientCredentials cred { throw new System.ArgumentNullException("credentials"); } - BaseUri = baseUri; - Credentials = credentials; - if (Credentials != null) + this.BaseUri = baseUri; + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the DeploymentScriptsClient class. /// /// /// Optional. The base URI of the service. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// /// Optional. The http client handler used to handle http transport. /// - /// - /// Optional. The delegating handlers to add to the http client pipeline. - /// /// /// Thrown when a required parameter is null /// - public DeploymentScriptsClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + public DeploymentScriptsClient(System.Uri baseUri, Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) { @@ -304,60 +282,61 @@ public DeploymentScriptsClient(System.Uri baseUri, ServiceClientCredentials cred { throw new System.ArgumentNullException("credentials"); } - BaseUri = baseUri; - Credentials = credentials; - if (Credentials != null) + this.BaseUri = baseUri; + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// An optional partial-method to perform custom initialization. /// partial void CustomInitialize(); + /// /// Initializes client properties. /// private void Initialize() { - DeploymentScripts = new DeploymentScriptsOperations(this); - BaseUri = new System.Uri("https://management.azure.com"); - ApiVersion = "2020-10-01"; - AcceptLanguage = "en-US"; - LongRunningOperationRetryTimeout = 30; - GenerateClientRequestId = true; - SerializationSettings = new JsonSerializerSettings + this.DeploymentScripts = new DeploymentScriptsOperations(this); + this.BaseUri = new System.Uri("https://management.azure.com"); + this.ApiVersion = "2020-10-01"; + this.AcceptLanguage = "en-US"; + this.LongRunningOperationRetryTimeout = 30; + this.GenerateClientRequestId = true; + SerializationSettings = new Newtonsoft.Json.JsonSerializerSettings { Formatting = Newtonsoft.Json.Formatting.Indented, DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, - ContractResolver = new ReadOnlyJsonContractResolver(), - Converters = new List + ContractResolver = new Microsoft.Rest.Serialization.ReadOnlyJsonContractResolver(), + Converters = new System.Collections.Generic.List { - new Iso8601TimeSpanConverter() + new Microsoft.Rest.Serialization.Iso8601TimeSpanConverter() } }; - SerializationSettings.Converters.Add(new TransformationJsonConverter()); - DeserializationSettings = new JsonSerializerSettings + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.TransformationJsonConverter()); + DeserializationSettings = new Newtonsoft.Json.JsonSerializerSettings { DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, - ContractResolver = new ReadOnlyJsonContractResolver(), - Converters = new List + ContractResolver = new Microsoft.Rest.Serialization.ReadOnlyJsonContractResolver(), + Converters = new System.Collections.Generic.List { - new Iso8601TimeSpanConverter() + new Microsoft.Rest.Serialization.Iso8601TimeSpanConverter() } }; - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("kind")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("kind")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("kind")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("kind")); CustomInitialize(); - DeserializationSettings.Converters.Add(new TransformationJsonConverter()); - DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.TransformationJsonConverter()); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Azure.CloudErrorJsonConverter()); } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/DeploymentScriptsOperations.cs b/src/Resources/Resources.Management.Sdk/Generated/DeploymentScriptsOperations.cs similarity index 57% rename from src/Resources/Resources.Sdk/Generated/DeploymentScriptsOperations.cs rename to src/Resources/Resources.Management.Sdk/Generated/DeploymentScriptsOperations.cs index ee37aaf6edaf..34c29274acbb 100644 --- a/src/Resources/Resources.Sdk/Generated/DeploymentScriptsOperations.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/DeploymentScriptsOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// DeploymentScriptsOperations operations. /// - internal partial class DeploymentScriptsOperations : IServiceOperations, IDeploymentScriptsOperations + internal partial class DeploymentScriptsOperations : Microsoft.Rest.IServiceOperations, IDeploymentScriptsOperations { /// /// Initializes a new instance of the DeploymentScriptsOperations class. @@ -36,13 +24,13 @@ internal partial class DeploymentScriptsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal DeploymentScriptsOperations(DeploymentScriptsClient client) + internal DeploymentScriptsOperations (DeploymentScriptsClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -63,16 +51,16 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) /// Deployment script supplied to the operation. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> CreateWithHttpMessagesAsync(string resourceGroupName, string scriptName, DeploymentScript deploymentScript, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string resourceGroupName, string scriptName, DeploymentScript deploymentScript, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send Request - AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(resourceGroupName, scriptName, deploymentScript, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(resourceGroupName, scriptName, deploymentScript, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// @@ -93,13 +81,13 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -108,94 +96,103 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string scriptName, DeploymentScriptUpdateParameter deploymentScript = default(DeploymentScriptUpdateParameter), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string scriptName, DeploymentScriptUpdateParameter deploymentScript = default(DeploymentScriptUpdateParameter), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (scriptName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "scriptName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "scriptName"); } if (scriptName != null) { if (scriptName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "scriptName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "scriptName", 90); } if (scriptName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "scriptName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "scriptName", 1); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("scriptName", scriptName); + tracingParameters.Add("deploymentScript", deploymentScript); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentScripts/{scriptName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{scriptName}", System.Uri.EscapeDataString(scriptName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PATCH"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -207,56 +204,57 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(deploymentScript != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(deploymentScript, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(deploymentScript, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new DeploymentScriptsErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DeploymentScriptsError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + DeploymentScriptsError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -266,9 +264,10 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -279,25 +278,29 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets a deployment script with a given name. /// @@ -313,13 +316,13 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -328,93 +331,102 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string scriptName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string scriptName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (scriptName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "scriptName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "scriptName"); } if (scriptName != null) { if (scriptName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "scriptName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "scriptName", 90); } if (scriptName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "scriptName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "scriptName", 1); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("scriptName", scriptName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentScripts/{scriptName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{scriptName}", System.Uri.EscapeDataString(scriptName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -426,50 +438,51 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new DeploymentScriptsErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DeploymentScriptsError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + DeploymentScriptsError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -479,9 +492,10 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -492,25 +506,29 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Deletes a deployment script. When operation completes, status code 200 /// returned without content. @@ -527,10 +545,10 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -539,93 +557,102 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string scriptName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string scriptName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (scriptName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "scriptName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "scriptName"); } if (scriptName != null) { if (scriptName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "scriptName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "scriptName", 90); } if (scriptName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "scriptName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "scriptName", 1); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("scriptName", scriptName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentScripts/{scriptName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{scriptName}", System.Uri.EscapeDataString(scriptName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -637,50 +664,51 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 204) { var ex = new DeploymentScriptsErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DeploymentScriptsError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + DeploymentScriptsError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -690,20 +718,25 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Lists all deployment scripts for a given subscription. /// @@ -713,13 +746,13 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -728,59 +761,68 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListBySubscriptionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListBySubscriptionWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.ApiVersion == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListBySubscription", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListBySubscription", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentScripts").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -792,50 +834,51 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new DeploymentScriptsErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DeploymentScriptsError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + DeploymentScriptsError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -845,9 +888,10 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -858,25 +902,29 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets deployment script logs for a given deployment script name. /// @@ -892,13 +940,13 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -907,93 +955,102 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetLogsWithHttpMessagesAsync(string resourceGroupName, string scriptName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetLogsWithHttpMessagesAsync(string resourceGroupName, string scriptName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (scriptName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "scriptName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "scriptName"); } if (scriptName != null) { if (scriptName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "scriptName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "scriptName", 90); } if (scriptName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "scriptName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "scriptName", 1); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("scriptName", scriptName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetLogs", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "GetLogs", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentScripts/{scriptName}/logs").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{scriptName}", System.Uri.EscapeDataString(scriptName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1005,50 +1062,51 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new DeploymentScriptsErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DeploymentScriptsError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + DeploymentScriptsError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1058,9 +1116,10 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -1071,25 +1130,29 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets deployment script logs for a given deployment script name. /// @@ -1101,7 +1164,7 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) /// /// /// The number of lines to show from the tail of the deployment script log. - /// Valid value is a positive number up to 1000. If 'tail' is not provided, all + /// Valid value is a positive number up to 1000. If 'tail' is not provided, all /// available logs are shown up to container instance log capacity of 4mb. /// /// @@ -1110,13 +1173,13 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1125,98 +1188,108 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetLogsDefaultWithHttpMessagesAsync(string resourceGroupName, string scriptName, int? tail = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetLogsDefaultWithHttpMessagesAsync(string resourceGroupName, string scriptName, int? tail = default(int?), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (scriptName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "scriptName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "scriptName"); } if (scriptName != null) { if (scriptName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "scriptName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "scriptName", 90); } if (scriptName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "scriptName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "scriptName", 1); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("scriptName", scriptName); tracingParameters.Add("tail", tail); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetLogsDefault", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "GetLogsDefault", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentScripts/{scriptName}/logs/default").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{scriptName}", System.Uri.EscapeDataString(scriptName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (tail != null) { - _queryParameters.Add(string.Format("tail={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(tail, Client.SerializationSettings).Trim('"')))); + _queryParameters.Add(string.Format("tail={0}", System.Uri.EscapeDataString(Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(tail, this.Client.SerializationSettings).Trim('"')))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1228,50 +1301,51 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new DeploymentScriptsErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DeploymentScriptsError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + DeploymentScriptsError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1281,9 +1355,10 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -1294,25 +1369,29 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Lists deployments scripts. /// @@ -1325,13 +1404,13 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1340,76 +1419,85 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentScripts").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1421,50 +1509,51 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new DeploymentScriptsErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DeploymentScriptsError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + DeploymentScriptsError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1474,9 +1563,10 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -1487,25 +1577,29 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Creates a deployment script. /// @@ -1524,13 +1618,13 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1539,102 +1633,111 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateWithHttpMessagesAsync(string resourceGroupName, string scriptName, DeploymentScript deploymentScript, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginCreateWithHttpMessagesAsync(string resourceGroupName, string scriptName, DeploymentScript deploymentScript, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (deploymentScript == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentScript"); + } + if (deploymentScript != null) + { + deploymentScript.Validate(); + } + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (scriptName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "scriptName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "scriptName"); } if (scriptName != null) { if (scriptName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "scriptName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "scriptName", 90); } if (scriptName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "scriptName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "scriptName", 1); } } - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (deploymentScript == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentScript"); - } - if (deploymentScript != null) - { - deploymentScript.Validate(); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("scriptName", scriptName); + tracingParameters.Add("deploymentScript", deploymentScript); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentScripts/{scriptName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{scriptName}", System.Uri.EscapeDataString(scriptName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1646,56 +1749,57 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(deploymentScript != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(deploymentScript, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(deploymentScript, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 201) { var ex = new DeploymentScriptsErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DeploymentScriptsError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + DeploymentScriptsError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1705,9 +1809,10 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -1718,16 +1823,16 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } // Deserialize Response @@ -1736,25 +1841,29 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Lists all deployment scripts for a given subscription. /// @@ -1767,13 +1876,13 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1782,51 +1891,54 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListBySubscriptionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListBySubscriptionNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListBySubscriptionNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListBySubscriptionNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1838,50 +1950,51 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new DeploymentScriptsErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DeploymentScriptsError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + DeploymentScriptsError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1891,9 +2004,10 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -1904,25 +2018,29 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Lists deployments scripts. /// @@ -1935,13 +2053,13 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1950,51 +2068,54 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroupNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroupNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2006,50 +2127,51 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new DeploymentScriptsErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DeploymentScriptsError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + DeploymentScriptsError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -2059,9 +2181,10 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -2072,24 +2195,28 @@ internal DeploymentScriptsOperations(DeploymentScriptsClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/DeploymentScriptsOperationsExtensions.cs b/src/Resources/Resources.Management.Sdk/Generated/DeploymentScriptsOperationsExtensions.cs new file mode 100644 index 000000000000..9f23c66fed39 --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/DeploymentScriptsOperationsExtensions.cs @@ -0,0 +1,424 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +namespace Microsoft.Azure.Management.Resources +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// Extension methods for DeploymentScriptsOperations + /// + public static partial class DeploymentScriptsOperationsExtensions + { + /// + /// Creates a deployment script. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of the deployment script. + /// + public static DeploymentScript Create(this IDeploymentScriptsOperations operations, string resourceGroupName, string scriptName, DeploymentScript deploymentScript) + { + return ((IDeploymentScriptsOperations)operations).CreateAsync(resourceGroupName, scriptName, deploymentScript).GetAwaiter().GetResult(); + } + + /// + /// Creates a deployment script. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of the deployment script. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateAsync(this IDeploymentScriptsOperations operations, string resourceGroupName, string scriptName, DeploymentScript deploymentScript, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, scriptName, deploymentScript, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Updates deployment script tags with specified values. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of the deployment script. + /// + public static DeploymentScript Update(this IDeploymentScriptsOperations operations, string resourceGroupName, string scriptName, DeploymentScriptUpdateParameter deploymentScript = default(DeploymentScriptUpdateParameter)) + { + return ((IDeploymentScriptsOperations)operations).UpdateAsync(resourceGroupName, scriptName, deploymentScript).GetAwaiter().GetResult(); + } + + /// + /// Updates deployment script tags with specified values. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of the deployment script. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task UpdateAsync(this IDeploymentScriptsOperations operations, string resourceGroupName, string scriptName, DeploymentScriptUpdateParameter deploymentScript = default(DeploymentScriptUpdateParameter), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, scriptName, deploymentScript, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets a deployment script with a given name. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of the deployment script. + /// + public static DeploymentScript Get(this IDeploymentScriptsOperations operations, string resourceGroupName, string scriptName) + { + return ((IDeploymentScriptsOperations)operations).GetAsync(resourceGroupName, scriptName).GetAwaiter().GetResult(); + } + + /// + /// Gets a deployment script with a given name. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of the deployment script. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IDeploymentScriptsOperations operations, string resourceGroupName, string scriptName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, scriptName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Deletes a deployment script. When operation completes, status code 200 + /// returned without content. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of the deployment script. + /// + public static void Delete(this IDeploymentScriptsOperations operations, string resourceGroupName, string scriptName) + { + ((IDeploymentScriptsOperations)operations).DeleteAsync(resourceGroupName, scriptName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a deployment script. When operation completes, status code 200 + /// returned without content. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of the deployment script. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAsync(this IDeploymentScriptsOperations operations, string resourceGroupName, string scriptName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, scriptName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Lists all deployment scripts for a given subscription. + /// + /// + /// The operations group for this extension method. + /// + public static Microsoft.Rest.Azure.IPage ListBySubscription(this IDeploymentScriptsOperations operations) + { + return ((IDeploymentScriptsOperations)operations).ListBySubscriptionAsync().GetAwaiter().GetResult(); + } + + /// + /// Lists all deployment scripts for a given subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListBySubscriptionAsync(this IDeploymentScriptsOperations operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets deployment script logs for a given deployment script name. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of the deployment script. + /// + public static ScriptLogsList GetLogs(this IDeploymentScriptsOperations operations, string resourceGroupName, string scriptName) + { + return ((IDeploymentScriptsOperations)operations).GetLogsAsync(resourceGroupName, scriptName).GetAwaiter().GetResult(); + } + + /// + /// Gets deployment script logs for a given deployment script name. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of the deployment script. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetLogsAsync(this IDeploymentScriptsOperations operations, string resourceGroupName, string scriptName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetLogsWithHttpMessagesAsync(resourceGroupName, scriptName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets deployment script logs for a given deployment script name. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of the deployment script. + /// + /// + /// The number of lines to show from the tail of the deployment script log. + /// Valid value is a positive number up to 1000. If 'tail' is not provided, all + /// available logs are shown up to container instance log capacity of 4mb. + /// + public static ScriptLog GetLogsDefault(this IDeploymentScriptsOperations operations, string resourceGroupName, string scriptName, int? tail = default(int?)) + { + return ((IDeploymentScriptsOperations)operations).GetLogsDefaultAsync(resourceGroupName, scriptName, tail).GetAwaiter().GetResult(); + } + + /// + /// Gets deployment script logs for a given deployment script name. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of the deployment script. + /// + /// + /// The number of lines to show from the tail of the deployment script log. + /// Valid value is a positive number up to 1000. If 'tail' is not provided, all + /// available logs are shown up to container instance log capacity of 4mb. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetLogsDefaultAsync(this IDeploymentScriptsOperations operations, string resourceGroupName, string scriptName, int? tail = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetLogsDefaultWithHttpMessagesAsync(resourceGroupName, scriptName, tail, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Lists deployments scripts. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + public static Microsoft.Rest.Azure.IPage ListByResourceGroup(this IDeploymentScriptsOperations operations, string resourceGroupName) + { + return ((IDeploymentScriptsOperations)operations).ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult(); + } + + /// + /// Lists deployments scripts. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByResourceGroupAsync(this IDeploymentScriptsOperations operations, string resourceGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Creates a deployment script. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of the deployment script. + /// + public static DeploymentScript BeginCreate(this IDeploymentScriptsOperations operations, string resourceGroupName, string scriptName, DeploymentScript deploymentScript) + { + return ((IDeploymentScriptsOperations)operations).BeginCreateAsync(resourceGroupName, scriptName, deploymentScript).GetAwaiter().GetResult(); + } + + /// + /// Creates a deployment script. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of the deployment script. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginCreateAsync(this IDeploymentScriptsOperations operations, string resourceGroupName, string scriptName, DeploymentScript deploymentScript, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginCreateWithHttpMessagesAsync(resourceGroupName, scriptName, deploymentScript, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Lists all deployment scripts for a given subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListBySubscriptionNext(this IDeploymentScriptsOperations operations, string nextPageLink) + { + return ((IDeploymentScriptsOperations)operations).ListBySubscriptionNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists all deployment scripts for a given subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListBySubscriptionNextAsync(this IDeploymentScriptsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListBySubscriptionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Lists deployments scripts. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListByResourceGroupNext(this IDeploymentScriptsOperations operations, string nextPageLink) + { + return ((IDeploymentScriptsOperations)operations).ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists deployments scripts. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByResourceGroupNextAsync(this IDeploymentScriptsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } +} diff --git a/src/Resources/Resources.Sdk/Generated/DeploymentStacksClient.cs b/src/Resources/Resources.Management.Sdk/Generated/DeploymentStacksClient.cs similarity index 65% rename from src/Resources/Resources.Sdk/Generated/DeploymentStacksClient.cs rename to src/Resources/Resources.Management.Sdk/Generated/DeploymentStacksClient.cs index 8904b247023f..e38665bc444a 100644 --- a/src/Resources/Resources.Sdk/Generated/DeploymentStacksClient.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/DeploymentStacksClient.cs @@ -1,51 +1,37 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Serialization; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; /// /// The APIs listed in this specification can be used to manage deployment /// stack resources through the Azure Resource Manager. /// - public partial class DeploymentStacksClient : ServiceClient, IDeploymentStacksClient, IAzureClient + public partial class DeploymentStacksClient : Microsoft.Rest.ServiceClient, IDeploymentStacksClient, IAzureClient { /// /// The base URI of the service. /// public System.Uri BaseUri { get; set; } - /// /// Gets or sets json serialization settings. /// - public JsonSerializerSettings SerializationSettings { get; private set; } - + public Newtonsoft.Json.JsonSerializerSettings SerializationSettings { get; private set; } /// /// Gets or sets json deserialization settings. /// - public JsonSerializerSettings DeserializationSettings { get; private set; } - + public Newtonsoft.Json.JsonSerializerSettings DeserializationSettings { get; private set; } /// /// Credentials needed for the client to connect to Azure. /// - public ServiceClientCredentials Credentials { get; private set; } + public Microsoft.Rest.ServiceClientCredentials Credentials { get; private set; } /// /// The API version to use for this operation. @@ -55,31 +41,30 @@ public partial class DeploymentStacksClient : ServiceClient /// The ID of the target subscription. /// - public string SubscriptionId { get; set; } + public string SubscriptionId { get; set;} /// /// The preferred language for the response. /// - public string AcceptLanguage { get; set; } + public string AcceptLanguage { get; set;} /// - /// The retry timeout in seconds for Long Running Operations. Default value is - /// 30. + /// The retry timeout in seconds for Long Running Operations. Default + /// /// value is 30. /// - public int? LongRunningOperationRetryTimeout { get; set; } + public int? LongRunningOperationRetryTimeout { get; set;} /// - /// Whether a unique x-ms-client-request-id should be generated. When set to - /// true a unique x-ms-client-request-id value is generated and included in - /// each request. Default is true. + /// Whether a unique x-ms-client-request-id should be generated. When + /// /// set to true a unique x-ms-client-request-id value is generated and + /// /// included in each request. Default is true. /// - public bool? GenerateClientRequestId { get; set; } + public bool? GenerateClientRequestId { get; set;} /// - /// Gets the IDeploymentStacksOperations. + /// Gets the IDeploymentStacksOperations /// public virtual IDeploymentStacksOperations DeploymentStacks { get; private set; } - /// /// Initializes a new instance of the DeploymentStacksClient class. /// @@ -88,24 +73,22 @@ public partial class DeploymentStacksClient : ServiceClient /// /// True: will dispose the provided httpClient on calling DeploymentStacksClient.Dispose(). False: will not dispose provided httpClient - protected DeploymentStacksClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient) + protected DeploymentStacksClient(System.Net.Http.HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient) { - Initialize(); + this.Initialize(); } - /// /// Initializes a new instance of the DeploymentStacksClient class. /// /// /// Optional. The delegating handlers to add to the http client pipeline. /// - protected DeploymentStacksClient(params DelegatingHandler[] handlers) : base(handlers) + protected DeploymentStacksClient(params System.Net.Http.DelegatingHandler[] handlers) : base(handlers) { - Initialize(); + this.Initialize(); } - /// - /// Initializes a new instance of the DeploymentStacksClient class. + /// Initializes a new instance of the DeploymentStacksClient class. /// /// /// Optional. The http client handler used to handle http transport. @@ -113,11 +96,10 @@ protected DeploymentStacksClient(params DelegatingHandler[] handlers) : base(han /// /// Optional. The delegating handlers to add to the http client pipeline. /// - protected DeploymentStacksClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers) + protected DeploymentStacksClient(System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : base(rootHandler, handlers) { - Initialize(); + this.Initialize(); } - /// /// Initializes a new instance of the DeploymentStacksClient class. /// @@ -130,15 +112,14 @@ protected DeploymentStacksClient(HttpClientHandler rootHandler, params Delegatin /// /// Thrown when a required parameter is null /// - protected DeploymentStacksClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) + protected DeploymentStacksClient(System.Uri baseUri, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) { throw new System.ArgumentNullException("baseUri"); } - BaseUri = baseUri; + this.BaseUri = baseUri; } - /// /// Initializes a new instance of the DeploymentStacksClient class. /// @@ -154,15 +135,15 @@ protected DeploymentStacksClient(System.Uri baseUri, params DelegatingHandler[] /// /// Thrown when a required parameter is null /// - protected DeploymentStacksClient(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + protected DeploymentStacksClient(System.Uri baseUri, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) { throw new System.ArgumentNullException("baseUri"); } - BaseUri = baseUri; + + this.BaseUri = baseUri; } - /// /// Initializes a new instance of the DeploymentStacksClient class. /// @@ -175,23 +156,23 @@ protected DeploymentStacksClient(System.Uri baseUri, HttpClientHandler rootHandl /// /// Thrown when a required parameter is null /// - public DeploymentStacksClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + public DeploymentStacksClient(Microsoft.Rest.ServiceClientCredentials credentials, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) { if (credentials == null) { throw new System.ArgumentNullException("credentials"); } - Credentials = credentials; - if (Credentials != null) + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the DeploymentStacksClient class. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// @@ -202,23 +183,23 @@ public DeploymentStacksClient(ServiceClientCredentials credentials, params Deleg /// /// Thrown when a required parameter is null /// - public DeploymentStacksClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient) + public DeploymentStacksClient(Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient) { if (credentials == null) { throw new System.ArgumentNullException("credentials"); } - Credentials = credentials; - if (Credentials != null) + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the DeploymentStacksClient class. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// @@ -230,26 +211,26 @@ public DeploymentStacksClient(ServiceClientCredentials credentials, HttpClient h /// /// Thrown when a required parameter is null /// - public DeploymentStacksClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + public DeploymentStacksClient(Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (credentials == null) { throw new System.ArgumentNullException("credentials"); } - Credentials = credentials; - if (Credentials != null) + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the DeploymentStacksClient class. /// /// /// Optional. The base URI of the service. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// @@ -258,7 +239,7 @@ public DeploymentStacksClient(ServiceClientCredentials credentials, HttpClientHa /// /// Thrown when a required parameter is null /// - public DeploymentStacksClient(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + public DeploymentStacksClient(System.Uri baseUri, Microsoft.Rest.ServiceClientCredentials credentials, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) { @@ -268,33 +249,30 @@ public DeploymentStacksClient(System.Uri baseUri, ServiceClientCredentials crede { throw new System.ArgumentNullException("credentials"); } - BaseUri = baseUri; - Credentials = credentials; - if (Credentials != null) + this.BaseUri = baseUri; + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the DeploymentStacksClient class. /// /// /// Optional. The base URI of the service. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// /// Optional. The http client handler used to handle http transport. /// - /// - /// Optional. The delegating handlers to add to the http client pipeline. - /// /// /// Thrown when a required parameter is null /// - public DeploymentStacksClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + public DeploymentStacksClient(System.Uri baseUri, Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) { @@ -304,58 +282,59 @@ public DeploymentStacksClient(System.Uri baseUri, ServiceClientCredentials crede { throw new System.ArgumentNullException("credentials"); } - BaseUri = baseUri; - Credentials = credentials; - if (Credentials != null) + this.BaseUri = baseUri; + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// An optional partial-method to perform custom initialization. /// partial void CustomInitialize(); + /// /// Initializes client properties. /// private void Initialize() { - DeploymentStacks = new DeploymentStacksOperations(this); - BaseUri = new System.Uri("https://management.azure.com"); - ApiVersion = "2022-08-01-preview"; - AcceptLanguage = "en-US"; - LongRunningOperationRetryTimeout = 30; - GenerateClientRequestId = true; - SerializationSettings = new JsonSerializerSettings + this.DeploymentStacks = new DeploymentStacksOperations(this); + this.BaseUri = new System.Uri("https://management.azure.com"); + this.ApiVersion = "2022-08-01-preview"; + this.AcceptLanguage = "en-US"; + this.LongRunningOperationRetryTimeout = 30; + this.GenerateClientRequestId = true; + SerializationSettings = new Newtonsoft.Json.JsonSerializerSettings { Formatting = Newtonsoft.Json.Formatting.Indented, DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, - ContractResolver = new ReadOnlyJsonContractResolver(), - Converters = new List + ContractResolver = new Microsoft.Rest.Serialization.ReadOnlyJsonContractResolver(), + Converters = new System.Collections.Generic.List { - new Iso8601TimeSpanConverter() + new Microsoft.Rest.Serialization.Iso8601TimeSpanConverter() } }; - SerializationSettings.Converters.Add(new TransformationJsonConverter()); - DeserializationSettings = new JsonSerializerSettings + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.TransformationJsonConverter()); + DeserializationSettings = new Newtonsoft.Json.JsonSerializerSettings { DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, - ContractResolver = new ReadOnlyJsonContractResolver(), - Converters = new List + ContractResolver = new Microsoft.Rest.Serialization.ReadOnlyJsonContractResolver(), + Converters = new System.Collections.Generic.List { - new Iso8601TimeSpanConverter() + new Microsoft.Rest.Serialization.Iso8601TimeSpanConverter() } }; CustomInitialize(); - DeserializationSettings.Converters.Add(new TransformationJsonConverter()); - DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.TransformationJsonConverter()); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Azure.CloudErrorJsonConverter()); } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/DeploymentStacksOperations.cs b/src/Resources/Resources.Management.Sdk/Generated/DeploymentStacksOperations.cs similarity index 56% rename from src/Resources/Resources.Sdk/Generated/DeploymentStacksOperations.cs rename to src/Resources/Resources.Management.Sdk/Generated/DeploymentStacksOperations.cs index b93d51b74b2c..6a3666048323 100644 --- a/src/Resources/Resources.Sdk/Generated/DeploymentStacksOperations.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/DeploymentStacksOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// DeploymentStacksOperations operations. /// - internal partial class DeploymentStacksOperations : IServiceOperations, IDeploymentStacksOperations + internal partial class DeploymentStacksOperations : Microsoft.Rest.IServiceOperations, IDeploymentStacksOperations { /// /// Initializes a new instance of the DeploymentStacksOperations class. @@ -36,13 +24,13 @@ internal partial class DeploymentStacksOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal DeploymentStacksOperations(DeploymentStacksClient client) + internal DeploymentStacksOperations (DeploymentStacksClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -62,13 +50,13 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -77,90 +65,91 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListAtResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListAtResourceGroupWithHttpMessagesAsync(string resourceGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListAtResourceGroup", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListAtResourceGroup", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacks").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -172,50 +161,51 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new DeploymentStacksErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DeploymentStacksError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + DeploymentStacksError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -225,9 +215,10 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -238,25 +229,29 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Lists all the Deployment Stacks within the specified subscription. /// @@ -266,13 +261,13 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -281,73 +276,74 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListAtSubscriptionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListAtSubscriptionWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListAtSubscription", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListAtSubscription", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacks").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -359,50 +355,51 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new DeploymentStacksErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DeploymentStacksError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + DeploymentStacksError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -412,9 +409,10 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -425,25 +423,29 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Lists all the Deployment Stacks within the specified management group. /// @@ -456,13 +458,13 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -471,82 +473,83 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListAtManagementGroupWithHttpMessagesAsync(string managementGroupId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListAtManagementGroupWithHttpMessagesAsync(string managementGroupId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (managementGroupId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "managementGroupId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "managementGroupId"); } if (managementGroupId != null) { if (managementGroupId.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "managementGroupId", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "managementGroupId", 90); } if (managementGroupId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "managementGroupId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "managementGroupId", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(managementGroupId, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "managementGroupId", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "managementGroupId", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("managementGroupId", managementGroupId); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListAtManagementGroup", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListAtManagementGroup", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks").ToString(); _url = _url.Replace("{managementGroupId}", System.Uri.EscapeDataString(managementGroupId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -558,50 +561,51 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new DeploymentStacksErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DeploymentStacksError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + DeploymentStacksError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -611,9 +615,10 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -624,25 +629,29 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Creates or updates a Deployment Stack. /// @@ -656,16 +665,16 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) /// Deployment Stack supplied to the operation. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> CreateOrUpdateAtResourceGroupWithHttpMessagesAsync(string resourceGroupName, string deploymentStackName, DeploymentStack deploymentStack, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CreateOrUpdateAtResourceGroupWithHttpMessagesAsync(string resourceGroupName, string deploymentStackName, DeploymentStack deploymentStack, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send Request - AzureOperationResponse _response = await BeginCreateOrUpdateAtResourceGroupWithHttpMessagesAsync(resourceGroupName, deploymentStackName, deploymentStack, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateOrUpdateAtResourceGroupWithHttpMessagesAsync(resourceGroupName, deploymentStackName, deploymentStack, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// @@ -683,13 +692,13 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -698,111 +707,112 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetAtResourceGroupWithHttpMessagesAsync(string resourceGroupName, string deploymentStackName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetAtResourceGroupWithHttpMessagesAsync(string resourceGroupName, string deploymentStackName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (deploymentStackName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentStackName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentStackName"); } if (deploymentStackName != null) { if (deploymentStackName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentStackName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentStackName", 90); } if (deploymentStackName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentStackName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentStackName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentStackName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentStackName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentStackName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("deploymentStackName", deploymentStackName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetAtResourceGroup", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "GetAtResourceGroup", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{deploymentStackName}", System.Uri.EscapeDataString(deploymentStackName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -814,50 +824,51 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new DeploymentStacksErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DeploymentStacksError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + DeploymentStacksError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -867,9 +878,10 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -880,28 +892,31 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Deletes a Deployment Stack by name. When operation completes, status code - /// 200 returned without content. + /// Deletes a Deployment Stack by name. When operation completes, status code 200 returned without content. /// /// /// The name of the resource group. The name is case insensitive. @@ -910,24 +925,22 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) /// Name of the deployment stack. /// /// - /// Flag to indicate delete rather than detach for the resources. Possible - /// values include: 'delete', 'detach' + /// Flag to indicate delete rather than detach for the resources. /// /// /// Flag to indicate delete rather than detach for the resource groups. - /// Possible values include: 'delete', 'detach' /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> DeleteAtResourceGroupWithHttpMessagesAsync(string resourceGroupName, string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> DeleteAtResourceGroupWithHttpMessagesAsync(string resourceGroupName, string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationHeaderResponse _response = await BeginDeleteAtResourceGroupWithHttpMessagesAsync(resourceGroupName, deploymentStackName, unmanageActionResources, unmanageActionResourceGroups, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationHeaderResponse _response = await BeginDeleteAtResourceGroupWithHttpMessagesAsync(resourceGroupName, deploymentStackName, unmanageActionResources, unmanageActionResourceGroups, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// @@ -940,16 +953,16 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) /// Deployment Stack supplied to the operation. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> CreateOrUpdateAtSubscriptionWithHttpMessagesAsync(string deploymentStackName, DeploymentStack deploymentStack, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CreateOrUpdateAtSubscriptionWithHttpMessagesAsync(string deploymentStackName, DeploymentStack deploymentStack, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send Request - AzureOperationResponse _response = await BeginCreateOrUpdateAtSubscriptionWithHttpMessagesAsync(deploymentStackName, deploymentStack, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateOrUpdateAtSubscriptionWithHttpMessagesAsync(deploymentStackName, deploymentStack, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// @@ -964,13 +977,13 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -979,94 +992,95 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetAtSubscriptionWithHttpMessagesAsync(string deploymentStackName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetAtSubscriptionWithHttpMessagesAsync(string deploymentStackName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (deploymentStackName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentStackName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentStackName"); } if (deploymentStackName != null) { if (deploymentStackName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentStackName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentStackName", 90); } if (deploymentStackName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentStackName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentStackName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentStackName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentStackName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentStackName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("deploymentStackName", deploymentStackName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetAtSubscription", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "GetAtSubscription", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{deploymentStackName}", System.Uri.EscapeDataString(deploymentStackName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1078,50 +1092,51 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new DeploymentStacksErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DeploymentStacksError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + DeploymentStacksError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1131,9 +1146,10 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -1144,51 +1160,52 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Deletes a Deployment Stack by name. When operation completes, status code - /// 200 returned without content. + /// Deletes a Deployment Stack by name. When operation completes, status code 200 returned without content. /// /// /// Name of the deployment stack. /// /// - /// Flag to indicate delete rather than detach for the resources. Possible - /// values include: 'delete', 'detach' + /// Flag to indicate delete rather than detach for the resources. /// /// /// Flag to indicate delete rather than detach for the resource groups. - /// Possible values include: 'delete', 'detach' /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> DeleteAtSubscriptionWithHttpMessagesAsync(string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> DeleteAtSubscriptionWithHttpMessagesAsync(string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationHeaderResponse _response = await BeginDeleteAtSubscriptionWithHttpMessagesAsync(deploymentStackName, unmanageActionResources, unmanageActionResourceGroups, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationHeaderResponse _response = await BeginDeleteAtSubscriptionWithHttpMessagesAsync(deploymentStackName, unmanageActionResources, unmanageActionResourceGroups, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// @@ -1204,16 +1221,16 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) /// Deployment Stack supplied to the operation. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> CreateOrUpdateAtManagementGroupWithHttpMessagesAsync(string managementGroupId, string deploymentStackName, DeploymentStack deploymentStack, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CreateOrUpdateAtManagementGroupWithHttpMessagesAsync(string managementGroupId, string deploymentStackName, DeploymentStack deploymentStack, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send Request - AzureOperationResponse _response = await BeginCreateOrUpdateAtManagementGroupWithHttpMessagesAsync(managementGroupId, deploymentStackName, deploymentStack, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateOrUpdateAtManagementGroupWithHttpMessagesAsync(managementGroupId, deploymentStackName, deploymentStack, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// @@ -1231,13 +1248,13 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1246,103 +1263,104 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetAtManagementGroupWithHttpMessagesAsync(string managementGroupId, string deploymentStackName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetAtManagementGroupWithHttpMessagesAsync(string managementGroupId, string deploymentStackName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (managementGroupId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "managementGroupId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "managementGroupId"); } if (managementGroupId != null) { if (managementGroupId.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "managementGroupId", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "managementGroupId", 90); } if (managementGroupId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "managementGroupId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "managementGroupId", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(managementGroupId, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "managementGroupId", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "managementGroupId", "^[-\\w\\._\\(\\)]+$"); } } if (deploymentStackName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentStackName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentStackName"); } if (deploymentStackName != null) { if (deploymentStackName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentStackName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentStackName", 90); } if (deploymentStackName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentStackName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentStackName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentStackName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentStackName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentStackName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("managementGroupId", managementGroupId); tracingParameters.Add("deploymentStackName", deploymentStackName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetAtManagementGroup", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "GetAtManagementGroup", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}").ToString(); _url = _url.Replace("{managementGroupId}", System.Uri.EscapeDataString(managementGroupId)); _url = _url.Replace("{deploymentStackName}", System.Uri.EscapeDataString(deploymentStackName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1354,50 +1372,51 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new DeploymentStacksErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DeploymentStacksError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + DeploymentStacksError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1407,9 +1426,10 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -1420,28 +1440,31 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Deletes a Deployment Stack by name. When operation completes, status code - /// 200 returned without content. + /// Deletes a Deployment Stack by name. When operation completes, status code 200 returned without content. /// /// /// Management Group. @@ -1450,28 +1473,25 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) /// Name of the deployment stack. /// /// - /// Flag to indicate delete rather than detach for the resources. Possible - /// values include: 'delete', 'detach' + /// Flag to indicate delete rather than detach for the resources. /// /// /// Flag to indicate delete rather than detach for the resource groups. - /// Possible values include: 'delete', 'detach' /// /// /// Flag to indicate delete rather than detach for the management groups. - /// Possible values include: 'delete', 'detach' /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> DeleteAtManagementGroupWithHttpMessagesAsync(string managementGroupId, string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string), string unmanageActionManagementGroups = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> DeleteAtManagementGroupWithHttpMessagesAsync(string managementGroupId, string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string), string unmanageActionManagementGroups = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationHeaderResponse _response = await BeginDeleteAtManagementGroupWithHttpMessagesAsync(managementGroupId, deploymentStackName, unmanageActionResources, unmanageActionResourceGroups, unmanageActionManagementGroups, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationHeaderResponse _response = await BeginDeleteAtManagementGroupWithHttpMessagesAsync(managementGroupId, deploymentStackName, unmanageActionResources, unmanageActionResourceGroups, unmanageActionManagementGroups, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// @@ -1489,13 +1509,13 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1504,111 +1524,112 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ExportTemplateAtResourceGroupWithHttpMessagesAsync(string resourceGroupName, string deploymentStackName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> ExportTemplateAtResourceGroupWithHttpMessagesAsync(string resourceGroupName, string deploymentStackName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (deploymentStackName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentStackName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentStackName"); } if (deploymentStackName != null) { if (deploymentStackName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentStackName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentStackName", 90); } if (deploymentStackName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentStackName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentStackName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentStackName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentStackName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentStackName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("deploymentStackName", deploymentStackName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ExportTemplateAtResourceGroup", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ExportTemplateAtResourceGroup", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}/exportTemplate").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{deploymentStackName}", System.Uri.EscapeDataString(deploymentStackName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1620,50 +1641,51 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new DeploymentStacksErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DeploymentStacksError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + DeploymentStacksError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1673,9 +1695,10 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -1686,25 +1709,29 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Exports the template used to create the deployment stack. /// @@ -1717,13 +1744,13 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1732,94 +1759,95 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ExportTemplateAtSubscriptionWithHttpMessagesAsync(string deploymentStackName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> ExportTemplateAtSubscriptionWithHttpMessagesAsync(string deploymentStackName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (deploymentStackName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentStackName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentStackName"); } if (deploymentStackName != null) { if (deploymentStackName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentStackName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentStackName", 90); } if (deploymentStackName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentStackName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentStackName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentStackName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentStackName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentStackName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("deploymentStackName", deploymentStackName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ExportTemplateAtSubscription", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ExportTemplateAtSubscription", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}/exportTemplate").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{deploymentStackName}", System.Uri.EscapeDataString(deploymentStackName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1831,50 +1859,51 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new DeploymentStacksErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DeploymentStacksError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + DeploymentStacksError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1884,9 +1913,10 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -1897,25 +1927,29 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Exports the template used to create the deployment stack. /// @@ -1931,13 +1965,13 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1946,103 +1980,104 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ExportTemplateAtManagementGroupWithHttpMessagesAsync(string managementGroupId, string deploymentStackName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> ExportTemplateAtManagementGroupWithHttpMessagesAsync(string managementGroupId, string deploymentStackName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (managementGroupId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "managementGroupId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "managementGroupId"); } if (managementGroupId != null) { if (managementGroupId.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "managementGroupId", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "managementGroupId", 90); } if (managementGroupId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "managementGroupId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "managementGroupId", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(managementGroupId, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "managementGroupId", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "managementGroupId", "^[-\\w\\._\\(\\)]+$"); } } if (deploymentStackName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentStackName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentStackName"); } if (deploymentStackName != null) { if (deploymentStackName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentStackName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentStackName", 90); } if (deploymentStackName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentStackName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentStackName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentStackName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentStackName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentStackName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("managementGroupId", managementGroupId); tracingParameters.Add("deploymentStackName", deploymentStackName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ExportTemplateAtManagementGroup", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ExportTemplateAtManagementGroup", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}/exportTemplate").ToString(); _url = _url.Replace("{managementGroupId}", System.Uri.EscapeDataString(managementGroupId)); _url = _url.Replace("{deploymentStackName}", System.Uri.EscapeDataString(deploymentStackName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2054,50 +2089,51 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new DeploymentStacksErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DeploymentStacksError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + DeploymentStacksError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -2107,9 +2143,10 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -2120,25 +2157,29 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Creates or updates a Deployment Stack. /// @@ -2157,13 +2198,13 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -2172,120 +2213,121 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateOrUpdateAtResourceGroupWithHttpMessagesAsync(string resourceGroupName, string deploymentStackName, DeploymentStack deploymentStack, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginCreateOrUpdateAtResourceGroupWithHttpMessagesAsync(string resourceGroupName, string deploymentStackName, DeploymentStack deploymentStack, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (deploymentStack == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentStack"); + } + if (deploymentStack != null) + { + deploymentStack.Validate(); + } + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (deploymentStackName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentStackName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentStackName"); } if (deploymentStackName != null) { if (deploymentStackName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentStackName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentStackName", 90); } if (deploymentStackName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentStackName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentStackName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentStackName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentStackName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentStackName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - if (deploymentStack == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentStack"); - } - if (deploymentStack != null) + if (this.Client.ApiVersion == null) { - deploymentStack.Validate(); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("deploymentStackName", deploymentStackName); + tracingParameters.Add("deploymentStack", deploymentStack); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdateAtResourceGroup", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdateAtResourceGroup", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{deploymentStackName}", System.Uri.EscapeDataString(deploymentStackName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2297,56 +2339,57 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(deploymentStack != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(deploymentStack, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(deploymentStack, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 201) { var ex = new DeploymentStacksErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DeploymentStacksError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + DeploymentStacksError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -2356,9 +2399,10 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -2369,16 +2413,16 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } // Deserialize Response @@ -2387,25 +2431,29 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Deletes a Deployment Stack by name. When operation completes, status code /// 200 returned without content. @@ -2417,12 +2465,10 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) /// Name of the deployment stack. /// /// - /// Flag to indicate delete rather than detach for the resources. Possible - /// values include: 'delete', 'detach' + /// Flag to indicate delete rather than detach for the resources. /// /// /// Flag to indicate delete rather than detach for the resource groups. - /// Possible values include: 'delete', 'detach' /// /// /// Headers that will be added to request. @@ -2430,10 +2476,10 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -2442,85 +2488,89 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginDeleteAtResourceGroupWithHttpMessagesAsync(string resourceGroupName, string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginDeleteAtResourceGroupWithHttpMessagesAsync(string resourceGroupName, string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (deploymentStackName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentStackName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentStackName"); } if (deploymentStackName != null) { if (deploymentStackName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentStackName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentStackName", 90); } if (deploymentStackName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentStackName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentStackName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentStackName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentStackName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentStackName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) + + + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("deploymentStackName", deploymentStackName); tracingParameters.Add("unmanageActionResources", unmanageActionResources); tracingParameters.Add("unmanageActionResourceGroups", unmanageActionResourceGroups); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDeleteAtResourceGroup", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginDeleteAtResourceGroup", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{deploymentStackName}", System.Uri.EscapeDataString(deploymentStackName)); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (unmanageActionResources != null) { _queryParameters.Add(string.Format("unmanageAction.Resources={0}", System.Uri.EscapeDataString(unmanageActionResources))); @@ -2529,34 +2579,33 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) { _queryParameters.Add(string.Format("unmanageAction.ResourceGroups={0}", System.Uri.EscapeDataString(unmanageActionResourceGroups))); } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2568,50 +2617,51 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) { var ex = new DeploymentStacksErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DeploymentStacksError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + DeploymentStacksError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -2621,33 +2671,38 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) throw ex; } // Create Result - var _result = new AzureOperationHeaderResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationHeaderResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } try { - _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Creates or updates a Deployment Stack. /// @@ -2663,13 +2718,13 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -2678,103 +2733,104 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateOrUpdateAtSubscriptionWithHttpMessagesAsync(string deploymentStackName, DeploymentStack deploymentStack, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginCreateOrUpdateAtSubscriptionWithHttpMessagesAsync(string deploymentStackName, DeploymentStack deploymentStack, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (deploymentStack == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentStack"); + } + if (deploymentStack != null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + deploymentStack.Validate(); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId == null) { - if (Client.SubscriptionId.Length < 1) + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (this.Client.SubscriptionId != null) + { + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (deploymentStackName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentStackName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentStackName"); } if (deploymentStackName != null) { if (deploymentStackName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentStackName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentStackName", 90); } if (deploymentStackName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentStackName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentStackName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentStackName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentStackName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentStackName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - if (deploymentStack == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentStack"); - } - if (deploymentStack != null) - { - deploymentStack.Validate(); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("deploymentStackName", deploymentStackName); + tracingParameters.Add("deploymentStack", deploymentStack); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdateAtSubscription", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdateAtSubscription", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{deploymentStackName}", System.Uri.EscapeDataString(deploymentStackName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2786,56 +2842,57 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(deploymentStack != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(deploymentStack, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(deploymentStack, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 201) { var ex = new DeploymentStacksErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DeploymentStacksError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + DeploymentStacksError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -2845,9 +2902,10 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -2858,16 +2916,16 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } // Deserialize Response @@ -2876,25 +2934,29 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Deletes a Deployment Stack by name. When operation completes, status code /// 200 returned without content. @@ -2903,12 +2965,10 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) /// Name of the deployment stack. /// /// - /// Flag to indicate delete rather than detach for the resources. Possible - /// values include: 'delete', 'detach' + /// Flag to indicate delete rather than detach for the resources. /// /// /// Flag to indicate delete rather than detach for the resource groups. - /// Possible values include: 'delete', 'detach' /// /// /// Headers that will be added to request. @@ -2916,10 +2976,10 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -2928,68 +2988,72 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginDeleteAtSubscriptionWithHttpMessagesAsync(string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginDeleteAtSubscriptionWithHttpMessagesAsync(string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (deploymentStackName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentStackName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentStackName"); } if (deploymentStackName != null) { if (deploymentStackName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentStackName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentStackName", 90); } if (deploymentStackName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentStackName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentStackName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentStackName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentStackName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentStackName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("deploymentStackName", deploymentStackName); tracingParameters.Add("unmanageActionResources", unmanageActionResources); tracingParameters.Add("unmanageActionResourceGroups", unmanageActionResourceGroups); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDeleteAtSubscription", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginDeleteAtSubscription", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{deploymentStackName}", System.Uri.EscapeDataString(deploymentStackName)); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (unmanageActionResources != null) { _queryParameters.Add(string.Format("unmanageAction.Resources={0}", System.Uri.EscapeDataString(unmanageActionResources))); @@ -2998,34 +3062,33 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) { _queryParameters.Add(string.Format("unmanageAction.ResourceGroups={0}", System.Uri.EscapeDataString(unmanageActionResourceGroups))); } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -3037,50 +3100,51 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) { var ex = new DeploymentStacksErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DeploymentStacksError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + DeploymentStacksError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -3090,33 +3154,38 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) throw ex; } // Create Result - var _result = new AzureOperationHeaderResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationHeaderResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } try { - _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Creates or updates a Deployment Stack. /// @@ -3135,13 +3204,13 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -3150,112 +3219,113 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateOrUpdateAtManagementGroupWithHttpMessagesAsync(string managementGroupId, string deploymentStackName, DeploymentStack deploymentStack, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginCreateOrUpdateAtManagementGroupWithHttpMessagesAsync(string managementGroupId, string deploymentStackName, DeploymentStack deploymentStack, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + + if (deploymentStack == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentStack"); + } + if (deploymentStack != null) + { + deploymentStack.Validate(); + } if (managementGroupId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "managementGroupId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "managementGroupId"); } if (managementGroupId != null) { if (managementGroupId.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "managementGroupId", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "managementGroupId", 90); } if (managementGroupId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "managementGroupId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "managementGroupId", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(managementGroupId, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "managementGroupId", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "managementGroupId", "^[-\\w\\._\\(\\)]+$"); } } if (deploymentStackName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentStackName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentStackName"); } if (deploymentStackName != null) { if (deploymentStackName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentStackName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentStackName", 90); } if (deploymentStackName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentStackName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentStackName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentStackName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentStackName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentStackName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - if (deploymentStack == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentStack"); - } - if (deploymentStack != null) + if (this.Client.ApiVersion == null) { - deploymentStack.Validate(); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("managementGroupId", managementGroupId); tracingParameters.Add("deploymentStackName", deploymentStackName); + tracingParameters.Add("deploymentStack", deploymentStack); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdateAtManagementGroup", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdateAtManagementGroup", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}").ToString(); _url = _url.Replace("{managementGroupId}", System.Uri.EscapeDataString(managementGroupId)); _url = _url.Replace("{deploymentStackName}", System.Uri.EscapeDataString(deploymentStackName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -3267,56 +3337,57 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(deploymentStack != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(deploymentStack, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(deploymentStack, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 201) { var ex = new DeploymentStacksErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DeploymentStacksError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + DeploymentStacksError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -3326,9 +3397,10 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -3339,16 +3411,16 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } // Deserialize Response @@ -3357,25 +3429,29 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Deletes a Deployment Stack by name. When operation completes, status code /// 200 returned without content. @@ -3387,16 +3463,13 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) /// Name of the deployment stack. /// /// - /// Flag to indicate delete rather than detach for the resources. Possible - /// values include: 'delete', 'detach' + /// Flag to indicate delete rather than detach for the resources. /// /// /// Flag to indicate delete rather than detach for the resource groups. - /// Possible values include: 'delete', 'detach' /// /// /// Flag to indicate delete rather than detach for the management groups. - /// Possible values include: 'delete', 'detach' /// /// /// Headers that will be added to request. @@ -3404,10 +3477,10 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -3416,78 +3489,83 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginDeleteAtManagementGroupWithHttpMessagesAsync(string managementGroupId, string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string), string unmanageActionManagementGroups = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginDeleteAtManagementGroupWithHttpMessagesAsync(string managementGroupId, string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string), string unmanageActionManagementGroups = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (managementGroupId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "managementGroupId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "managementGroupId"); } if (managementGroupId != null) { if (managementGroupId.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "managementGroupId", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "managementGroupId", 90); } if (managementGroupId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "managementGroupId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "managementGroupId", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(managementGroupId, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "managementGroupId", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "managementGroupId", "^[-\\w\\._\\(\\)]+$"); } } if (deploymentStackName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentStackName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentStackName"); } if (deploymentStackName != null) { if (deploymentStackName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentStackName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentStackName", 90); } if (deploymentStackName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentStackName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentStackName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentStackName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentStackName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentStackName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) + + + + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("managementGroupId", managementGroupId); tracingParameters.Add("deploymentStackName", deploymentStackName); tracingParameters.Add("unmanageActionResources", unmanageActionResources); tracingParameters.Add("unmanageActionResourceGroups", unmanageActionResourceGroups); tracingParameters.Add("unmanageActionManagementGroups", unmanageActionManagementGroups); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDeleteAtManagementGroup", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginDeleteAtManagementGroup", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}").ToString(); _url = _url.Replace("{managementGroupId}", System.Uri.EscapeDataString(managementGroupId)); _url = _url.Replace("{deploymentStackName}", System.Uri.EscapeDataString(deploymentStackName)); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (unmanageActionResources != null) { _queryParameters.Add(string.Format("unmanageAction.Resources={0}", System.Uri.EscapeDataString(unmanageActionResources))); @@ -3500,34 +3578,33 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) { _queryParameters.Add(string.Format("unmanageAction.ManagementGroups={0}", System.Uri.EscapeDataString(unmanageActionManagementGroups))); } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -3539,50 +3616,51 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) { var ex = new DeploymentStacksErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DeploymentStacksError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + DeploymentStacksError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -3592,33 +3670,38 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) throw ex; } // Create Result - var _result = new AzureOperationHeaderResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationHeaderResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } try { - _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Lists all the Deployment Stacks within the specified resource group. /// @@ -3631,13 +3714,13 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -3646,51 +3729,54 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListAtResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListAtResourceGroupNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListAtResourceGroupNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListAtResourceGroupNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -3702,50 +3788,51 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new DeploymentStacksErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DeploymentStacksError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + DeploymentStacksError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -3755,9 +3842,10 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -3768,25 +3856,29 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Lists all the Deployment Stacks within the specified subscription. /// @@ -3799,13 +3891,13 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -3814,51 +3906,54 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListAtSubscriptionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListAtSubscriptionNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListAtSubscriptionNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListAtSubscriptionNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -3870,50 +3965,51 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new DeploymentStacksErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DeploymentStacksError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + DeploymentStacksError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -3923,9 +4019,10 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -3936,25 +4033,29 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Lists all the Deployment Stacks within the specified management group. /// @@ -3967,13 +4068,13 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -3982,51 +4083,54 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListAtManagementGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListAtManagementGroupNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListAtManagementGroupNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListAtManagementGroupNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -4038,50 +4142,51 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new DeploymentStacksErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DeploymentStacksError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + DeploymentStacksError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -4091,9 +4196,10 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -4104,24 +4210,28 @@ internal DeploymentStacksOperations(DeploymentStacksClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/DeploymentStacksOperationsExtensions.cs b/src/Resources/Resources.Management.Sdk/Generated/DeploymentStacksOperationsExtensions.cs new file mode 100644 index 000000000000..936ce6f432be --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/DeploymentStacksOperationsExtensions.cs @@ -0,0 +1,970 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +namespace Microsoft.Azure.Management.Resources +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// Extension methods for DeploymentStacksOperations + /// + public static partial class DeploymentStacksOperationsExtensions + { + /// + /// Lists all the Deployment Stacks within the specified resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + public static Microsoft.Rest.Azure.IPage ListAtResourceGroup(this IDeploymentStacksOperations operations, string resourceGroupName) + { + return ((IDeploymentStacksOperations)operations).ListAtResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult(); + } + + /// + /// Lists all the Deployment Stacks within the specified resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAtResourceGroupAsync(this IDeploymentStacksOperations operations, string resourceGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListAtResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Lists all the Deployment Stacks within the specified subscription. + /// + /// + /// The operations group for this extension method. + /// + public static Microsoft.Rest.Azure.IPage ListAtSubscription(this IDeploymentStacksOperations operations) + { + return ((IDeploymentStacksOperations)operations).ListAtSubscriptionAsync().GetAwaiter().GetResult(); + } + + /// + /// Lists all the Deployment Stacks within the specified subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAtSubscriptionAsync(this IDeploymentStacksOperations operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListAtSubscriptionWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Lists all the Deployment Stacks within the specified management group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Management Group. + /// + public static Microsoft.Rest.Azure.IPage ListAtManagementGroup(this IDeploymentStacksOperations operations, string managementGroupId) + { + return ((IDeploymentStacksOperations)operations).ListAtManagementGroupAsync(managementGroupId).GetAwaiter().GetResult(); + } + + /// + /// Lists all the Deployment Stacks within the specified management group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Management Group. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAtManagementGroupAsync(this IDeploymentStacksOperations operations, string managementGroupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListAtManagementGroupWithHttpMessagesAsync(managementGroupId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Creates or updates a Deployment Stack. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of the deployment stack. + /// + public static DeploymentStack CreateOrUpdateAtResourceGroup(this IDeploymentStacksOperations operations, string resourceGroupName, string deploymentStackName, DeploymentStack deploymentStack) + { + return ((IDeploymentStacksOperations)operations).CreateOrUpdateAtResourceGroupAsync(resourceGroupName, deploymentStackName, deploymentStack).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a Deployment Stack. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of the deployment stack. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateOrUpdateAtResourceGroupAsync(this IDeploymentStacksOperations operations, string resourceGroupName, string deploymentStackName, DeploymentStack deploymentStack, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateAtResourceGroupWithHttpMessagesAsync(resourceGroupName, deploymentStackName, deploymentStack, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets a Deployment Stack with a given name. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of the deployment stack. + /// + public static DeploymentStack GetAtResourceGroup(this IDeploymentStacksOperations operations, string resourceGroupName, string deploymentStackName) + { + return ((IDeploymentStacksOperations)operations).GetAtResourceGroupAsync(resourceGroupName, deploymentStackName).GetAwaiter().GetResult(); + } + + /// + /// Gets a Deployment Stack with a given name. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of the deployment stack. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAtResourceGroupAsync(this IDeploymentStacksOperations operations, string resourceGroupName, string deploymentStackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetAtResourceGroupWithHttpMessagesAsync(resourceGroupName, deploymentStackName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Deletes a Deployment Stack by name. When operation completes, status code + /// 200 returned without content. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of the deployment stack. + /// + /// + /// Flag to indicate delete rather than detach for the resources. + /// + /// + /// Flag to indicate delete rather than detach for the resource groups. + /// + public static DeploymentStacksDeleteAtResourceGroupHeaders DeleteAtResourceGroup(this IDeploymentStacksOperations operations, string resourceGroupName, string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string)) + { + return ((IDeploymentStacksOperations)operations).DeleteAtResourceGroupAsync(resourceGroupName, deploymentStackName, unmanageActionResources, unmanageActionResourceGroups).GetAwaiter().GetResult(); + } + + /// + /// Deletes a Deployment Stack by name. When operation completes, status code + /// 200 returned without content. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of the deployment stack. + /// + /// + /// Flag to indicate delete rather than detach for the resources. + /// + /// + /// Flag to indicate delete rather than detach for the resource groups. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAtResourceGroupAsync(this IDeploymentStacksOperations operations, string resourceGroupName, string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.DeleteAtResourceGroupWithHttpMessagesAsync(resourceGroupName, deploymentStackName, unmanageActionResources, unmanageActionResourceGroups, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Headers; + } + } + /// + /// Creates or updates a Deployment Stack. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the deployment stack. + /// + public static DeploymentStack CreateOrUpdateAtSubscription(this IDeploymentStacksOperations operations, string deploymentStackName, DeploymentStack deploymentStack) + { + return ((IDeploymentStacksOperations)operations).CreateOrUpdateAtSubscriptionAsync(deploymentStackName, deploymentStack).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a Deployment Stack. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the deployment stack. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateOrUpdateAtSubscriptionAsync(this IDeploymentStacksOperations operations, string deploymentStackName, DeploymentStack deploymentStack, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateAtSubscriptionWithHttpMessagesAsync(deploymentStackName, deploymentStack, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets a Deployment Stack with a given name. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the deployment stack. + /// + public static DeploymentStack GetAtSubscription(this IDeploymentStacksOperations operations, string deploymentStackName) + { + return ((IDeploymentStacksOperations)operations).GetAtSubscriptionAsync(deploymentStackName).GetAwaiter().GetResult(); + } + + /// + /// Gets a Deployment Stack with a given name. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the deployment stack. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAtSubscriptionAsync(this IDeploymentStacksOperations operations, string deploymentStackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetAtSubscriptionWithHttpMessagesAsync(deploymentStackName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Deletes a Deployment Stack by name. When operation completes, status code + /// 200 returned without content. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the deployment stack. + /// + /// + /// Flag to indicate delete rather than detach for the resources. + /// + /// + /// Flag to indicate delete rather than detach for the resource groups. + /// + public static DeploymentStacksDeleteAtSubscriptionHeaders DeleteAtSubscription(this IDeploymentStacksOperations operations, string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string)) + { + return ((IDeploymentStacksOperations)operations).DeleteAtSubscriptionAsync(deploymentStackName, unmanageActionResources, unmanageActionResourceGroups).GetAwaiter().GetResult(); + } + + /// + /// Deletes a Deployment Stack by name. When operation completes, status code + /// 200 returned without content. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the deployment stack. + /// + /// + /// Flag to indicate delete rather than detach for the resources. + /// + /// + /// Flag to indicate delete rather than detach for the resource groups. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAtSubscriptionAsync(this IDeploymentStacksOperations operations, string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.DeleteAtSubscriptionWithHttpMessagesAsync(deploymentStackName, unmanageActionResources, unmanageActionResourceGroups, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Headers; + } + } + /// + /// Creates or updates a Deployment Stack. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Management Group. + /// + /// + /// Name of the deployment stack. + /// + public static DeploymentStack CreateOrUpdateAtManagementGroup(this IDeploymentStacksOperations operations, string managementGroupId, string deploymentStackName, DeploymentStack deploymentStack) + { + return ((IDeploymentStacksOperations)operations).CreateOrUpdateAtManagementGroupAsync(managementGroupId, deploymentStackName, deploymentStack).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a Deployment Stack. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Management Group. + /// + /// + /// Name of the deployment stack. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateOrUpdateAtManagementGroupAsync(this IDeploymentStacksOperations operations, string managementGroupId, string deploymentStackName, DeploymentStack deploymentStack, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateAtManagementGroupWithHttpMessagesAsync(managementGroupId, deploymentStackName, deploymentStack, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets a Deployment Stack with a given name. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Management Group. + /// + /// + /// Name of the deployment stack. + /// + public static DeploymentStack GetAtManagementGroup(this IDeploymentStacksOperations operations, string managementGroupId, string deploymentStackName) + { + return ((IDeploymentStacksOperations)operations).GetAtManagementGroupAsync(managementGroupId, deploymentStackName).GetAwaiter().GetResult(); + } + + /// + /// Gets a Deployment Stack with a given name. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Management Group. + /// + /// + /// Name of the deployment stack. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAtManagementGroupAsync(this IDeploymentStacksOperations operations, string managementGroupId, string deploymentStackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetAtManagementGroupWithHttpMessagesAsync(managementGroupId, deploymentStackName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Deletes a Deployment Stack by name. When operation completes, status code + /// 200 returned without content. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Management Group. + /// + /// + /// Name of the deployment stack. + /// + /// + /// Flag to indicate delete rather than detach for the resources. + /// + /// + /// Flag to indicate delete rather than detach for the resource groups. + /// + /// + /// Flag to indicate delete rather than detach for the management groups. + /// + public static DeploymentStacksDeleteAtManagementGroupHeaders DeleteAtManagementGroup(this IDeploymentStacksOperations operations, string managementGroupId, string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string), string unmanageActionManagementGroups = default(string)) + { + return ((IDeploymentStacksOperations)operations).DeleteAtManagementGroupAsync(managementGroupId, deploymentStackName, unmanageActionResources, unmanageActionResourceGroups, unmanageActionManagementGroups).GetAwaiter().GetResult(); + } + + /// + /// Deletes a Deployment Stack by name. When operation completes, status code + /// 200 returned without content. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Management Group. + /// + /// + /// Name of the deployment stack. + /// + /// + /// Flag to indicate delete rather than detach for the resources. + /// + /// + /// Flag to indicate delete rather than detach for the resource groups. + /// + /// + /// Flag to indicate delete rather than detach for the management groups. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAtManagementGroupAsync(this IDeploymentStacksOperations operations, string managementGroupId, string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string), string unmanageActionManagementGroups = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.DeleteAtManagementGroupWithHttpMessagesAsync(managementGroupId, deploymentStackName, unmanageActionResources, unmanageActionResourceGroups, unmanageActionManagementGroups, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Headers; + } + } + /// + /// Exports the template used to create the deployment stack. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of the deployment stack. + /// + public static DeploymentStackTemplateDefinition ExportTemplateAtResourceGroup(this IDeploymentStacksOperations operations, string resourceGroupName, string deploymentStackName) + { + return ((IDeploymentStacksOperations)operations).ExportTemplateAtResourceGroupAsync(resourceGroupName, deploymentStackName).GetAwaiter().GetResult(); + } + + /// + /// Exports the template used to create the deployment stack. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of the deployment stack. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ExportTemplateAtResourceGroupAsync(this IDeploymentStacksOperations operations, string resourceGroupName, string deploymentStackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ExportTemplateAtResourceGroupWithHttpMessagesAsync(resourceGroupName, deploymentStackName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Exports the template used to create the deployment stack. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the deployment stack. + /// + public static DeploymentStackTemplateDefinition ExportTemplateAtSubscription(this IDeploymentStacksOperations operations, string deploymentStackName) + { + return ((IDeploymentStacksOperations)operations).ExportTemplateAtSubscriptionAsync(deploymentStackName).GetAwaiter().GetResult(); + } + + /// + /// Exports the template used to create the deployment stack. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the deployment stack. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ExportTemplateAtSubscriptionAsync(this IDeploymentStacksOperations operations, string deploymentStackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ExportTemplateAtSubscriptionWithHttpMessagesAsync(deploymentStackName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Exports the template used to create the deployment stack. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Management Group. + /// + /// + /// Name of the deployment stack. + /// + public static DeploymentStackTemplateDefinition ExportTemplateAtManagementGroup(this IDeploymentStacksOperations operations, string managementGroupId, string deploymentStackName) + { + return ((IDeploymentStacksOperations)operations).ExportTemplateAtManagementGroupAsync(managementGroupId, deploymentStackName).GetAwaiter().GetResult(); + } + + /// + /// Exports the template used to create the deployment stack. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Management Group. + /// + /// + /// Name of the deployment stack. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ExportTemplateAtManagementGroupAsync(this IDeploymentStacksOperations operations, string managementGroupId, string deploymentStackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ExportTemplateAtManagementGroupWithHttpMessagesAsync(managementGroupId, deploymentStackName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Creates or updates a Deployment Stack. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of the deployment stack. + /// + public static DeploymentStack BeginCreateOrUpdateAtResourceGroup(this IDeploymentStacksOperations operations, string resourceGroupName, string deploymentStackName, DeploymentStack deploymentStack) + { + return ((IDeploymentStacksOperations)operations).BeginCreateOrUpdateAtResourceGroupAsync(resourceGroupName, deploymentStackName, deploymentStack).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a Deployment Stack. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of the deployment stack. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginCreateOrUpdateAtResourceGroupAsync(this IDeploymentStacksOperations operations, string resourceGroupName, string deploymentStackName, DeploymentStack deploymentStack, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginCreateOrUpdateAtResourceGroupWithHttpMessagesAsync(resourceGroupName, deploymentStackName, deploymentStack, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Deletes a Deployment Stack by name. When operation completes, status code + /// 200 returned without content. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of the deployment stack. + /// + /// + /// Flag to indicate delete rather than detach for the resources. + /// + /// + /// Flag to indicate delete rather than detach for the resource groups. + /// + public static DeploymentStacksDeleteAtResourceGroupHeaders BeginDeleteAtResourceGroup(this IDeploymentStacksOperations operations, string resourceGroupName, string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string)) + { + return ((IDeploymentStacksOperations)operations).BeginDeleteAtResourceGroupAsync(resourceGroupName, deploymentStackName, unmanageActionResources, unmanageActionResourceGroups).GetAwaiter().GetResult(); + } + + /// + /// Deletes a Deployment Stack by name. When operation completes, status code + /// 200 returned without content. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of the deployment stack. + /// + /// + /// Flag to indicate delete rather than detach for the resources. + /// + /// + /// Flag to indicate delete rather than detach for the resource groups. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginDeleteAtResourceGroupAsync(this IDeploymentStacksOperations operations, string resourceGroupName, string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginDeleteAtResourceGroupWithHttpMessagesAsync(resourceGroupName, deploymentStackName, unmanageActionResources, unmanageActionResourceGroups, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Headers; + } + } + /// + /// Creates or updates a Deployment Stack. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the deployment stack. + /// + public static DeploymentStack BeginCreateOrUpdateAtSubscription(this IDeploymentStacksOperations operations, string deploymentStackName, DeploymentStack deploymentStack) + { + return ((IDeploymentStacksOperations)operations).BeginCreateOrUpdateAtSubscriptionAsync(deploymentStackName, deploymentStack).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a Deployment Stack. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the deployment stack. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginCreateOrUpdateAtSubscriptionAsync(this IDeploymentStacksOperations operations, string deploymentStackName, DeploymentStack deploymentStack, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginCreateOrUpdateAtSubscriptionWithHttpMessagesAsync(deploymentStackName, deploymentStack, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Deletes a Deployment Stack by name. When operation completes, status code + /// 200 returned without content. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the deployment stack. + /// + /// + /// Flag to indicate delete rather than detach for the resources. + /// + /// + /// Flag to indicate delete rather than detach for the resource groups. + /// + public static DeploymentStacksDeleteAtSubscriptionHeaders BeginDeleteAtSubscription(this IDeploymentStacksOperations operations, string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string)) + { + return ((IDeploymentStacksOperations)operations).BeginDeleteAtSubscriptionAsync(deploymentStackName, unmanageActionResources, unmanageActionResourceGroups).GetAwaiter().GetResult(); + } + + /// + /// Deletes a Deployment Stack by name. When operation completes, status code + /// 200 returned without content. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the deployment stack. + /// + /// + /// Flag to indicate delete rather than detach for the resources. + /// + /// + /// Flag to indicate delete rather than detach for the resource groups. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginDeleteAtSubscriptionAsync(this IDeploymentStacksOperations operations, string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginDeleteAtSubscriptionWithHttpMessagesAsync(deploymentStackName, unmanageActionResources, unmanageActionResourceGroups, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Headers; + } + } + /// + /// Creates or updates a Deployment Stack. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Management Group. + /// + /// + /// Name of the deployment stack. + /// + public static DeploymentStack BeginCreateOrUpdateAtManagementGroup(this IDeploymentStacksOperations operations, string managementGroupId, string deploymentStackName, DeploymentStack deploymentStack) + { + return ((IDeploymentStacksOperations)operations).BeginCreateOrUpdateAtManagementGroupAsync(managementGroupId, deploymentStackName, deploymentStack).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a Deployment Stack. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Management Group. + /// + /// + /// Name of the deployment stack. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginCreateOrUpdateAtManagementGroupAsync(this IDeploymentStacksOperations operations, string managementGroupId, string deploymentStackName, DeploymentStack deploymentStack, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginCreateOrUpdateAtManagementGroupWithHttpMessagesAsync(managementGroupId, deploymentStackName, deploymentStack, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Deletes a Deployment Stack by name. When operation completes, status code + /// 200 returned without content. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Management Group. + /// + /// + /// Name of the deployment stack. + /// + /// + /// Flag to indicate delete rather than detach for the resources. + /// + /// + /// Flag to indicate delete rather than detach for the resource groups. + /// + /// + /// Flag to indicate delete rather than detach for the management groups. + /// + public static DeploymentStacksDeleteAtManagementGroupHeaders BeginDeleteAtManagementGroup(this IDeploymentStacksOperations operations, string managementGroupId, string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string), string unmanageActionManagementGroups = default(string)) + { + return ((IDeploymentStacksOperations)operations).BeginDeleteAtManagementGroupAsync(managementGroupId, deploymentStackName, unmanageActionResources, unmanageActionResourceGroups, unmanageActionManagementGroups).GetAwaiter().GetResult(); + } + + /// + /// Deletes a Deployment Stack by name. When operation completes, status code + /// 200 returned without content. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Management Group. + /// + /// + /// Name of the deployment stack. + /// + /// + /// Flag to indicate delete rather than detach for the resources. + /// + /// + /// Flag to indicate delete rather than detach for the resource groups. + /// + /// + /// Flag to indicate delete rather than detach for the management groups. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginDeleteAtManagementGroupAsync(this IDeploymentStacksOperations operations, string managementGroupId, string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string), string unmanageActionManagementGroups = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginDeleteAtManagementGroupWithHttpMessagesAsync(managementGroupId, deploymentStackName, unmanageActionResources, unmanageActionResourceGroups, unmanageActionManagementGroups, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Headers; + } + } + /// + /// Lists all the Deployment Stacks within the specified resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListAtResourceGroupNext(this IDeploymentStacksOperations operations, string nextPageLink) + { + return ((IDeploymentStacksOperations)operations).ListAtResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists all the Deployment Stacks within the specified resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAtResourceGroupNextAsync(this IDeploymentStacksOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListAtResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Lists all the Deployment Stacks within the specified subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListAtSubscriptionNext(this IDeploymentStacksOperations operations, string nextPageLink) + { + return ((IDeploymentStacksOperations)operations).ListAtSubscriptionNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists all the Deployment Stacks within the specified subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAtSubscriptionNextAsync(this IDeploymentStacksOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListAtSubscriptionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Lists all the Deployment Stacks within the specified management group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListAtManagementGroupNext(this IDeploymentStacksOperations operations, string nextPageLink) + { + return ((IDeploymentStacksOperations)operations).ListAtManagementGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists all the Deployment Stacks within the specified management group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAtManagementGroupNextAsync(this IDeploymentStacksOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListAtManagementGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } +} diff --git a/src/Resources/Resources.Sdk/Generated/DeploymentsOperations.cs b/src/Resources/Resources.Management.Sdk/Generated/DeploymentsOperations.cs similarity index 55% rename from src/Resources/Resources.Sdk/Generated/DeploymentsOperations.cs rename to src/Resources/Resources.Management.Sdk/Generated/DeploymentsOperations.cs index 4b22ba24e8c4..3264fa2fdf94 100644 --- a/src/Resources/Resources.Sdk/Generated/DeploymentsOperations.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/DeploymentsOperations.cs @@ -1,32 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// DeploymentsOperations operations. /// - internal partial class DeploymentsOperations : IServiceOperations, IDeploymentsOperations + internal partial class DeploymentsOperations : Microsoft.Rest.IServiceOperations, IDeploymentsOperations { /// /// Initializes a new instance of the DeploymentsOperations class. @@ -37,13 +24,13 @@ internal partial class DeploymentsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal DeploymentsOperations(ResourceManagementClient client) + internal DeploymentsOperations (ResourceManagementClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -52,19 +39,8 @@ internal DeploymentsOperations(ResourceManagementClient client) public ResourceManagementClient Client { get; private set; } /// - /// Deletes a deployment from the deployment history. + /// A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the associated deployment operations. This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted. The Location response header contains the URI that is used to obtain the status of the process. While the process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the Location header returns an error-level status code. /// - /// - /// A template deployment that is currently running cannot be deleted. Deleting - /// a template deployment removes the associated deployment operations. This is - /// an asynchronous operation that returns a status of 202 until the template - /// deployment is successfully deleted. The Location response header contains - /// the URI that is used to obtain the status of the process. While the process - /// is running, a call to the URI in the Location header returns a status of - /// 202. When the process finishes, the URI in the Location header returns a - /// status of 204 on success. If the asynchronous request failed, the URI in - /// the Location header returns an error-level status code. - /// /// /// The resource scope. /// @@ -72,16 +48,16 @@ internal DeploymentsOperations(ResourceManagementClient client) /// The name of the deployment. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task DeleteAtScopeWithHttpMessagesAsync(string scope, string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task DeleteAtScopeWithHttpMessagesAsync(string scope, string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginDeleteAtScopeWithHttpMessagesAsync(scope, deploymentName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginDeleteAtScopeWithHttpMessagesAsync(scope, deploymentName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// @@ -99,10 +75,10 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -111,81 +87,90 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CheckExistenceAtScopeWithHttpMessagesAsync(string scope, string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CheckExistenceAtScopeWithHttpMessagesAsync(string scope, string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (scope == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "scope"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "scope"); } + if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("scope", scope); tracingParameters.Add("deploymentName", deploymentName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CheckExistenceAtScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "CheckExistenceAtScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{scope}/providers/Microsoft.Resources/deployments/{deploymentName}").ToString(); _url = _url.Replace("{scope}", scope); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("HEAD"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("HEAD"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -197,55 +182,56 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 204 && (int)_statusCode != 404) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -255,28 +241,28 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; - _result.Body = _statusCode == System.Net.HttpStatusCode.NoContent; + _result.Body = (_statusCode == System.Net.HttpStatusCode.NoContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Deploys resources at a given scope. + /// You can provide the template and parameters directly in the request or link to JSON files. /// - /// - /// You can provide the template and parameters directly in the request or link - /// to JSON files. - /// /// /// The resource scope. /// @@ -287,16 +273,16 @@ internal DeploymentsOperations(ResourceManagementClient client) /// Additional parameters supplied to the operation. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> CreateOrUpdateAtScopeWithHttpMessagesAsync(string scope, string deploymentName, Deployment parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CreateOrUpdateAtScopeWithHttpMessagesAsync(string scope, string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send Request - AzureOperationResponse _response = await BeginCreateOrUpdateAtScopeWithHttpMessagesAsync(scope, deploymentName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateOrUpdateAtScopeWithHttpMessagesAsync(scope, deploymentName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// @@ -314,13 +300,13 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -329,81 +315,90 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetAtScopeWithHttpMessagesAsync(string scope, string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetAtScopeWithHttpMessagesAsync(string scope, string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (scope == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "scope"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "scope"); } + if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("scope", scope); tracingParameters.Add("deploymentName", deploymentName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetAtScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "GetAtScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{scope}/providers/Microsoft.Resources/deployments/{deploymentName}").ToString(); _url = _url.Replace("{scope}", scope); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -415,55 +410,56 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -473,9 +469,10 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -486,34 +483,35 @@ internal DeploymentsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Cancels a currently running template deployment. - /// - /// /// You can cancel a deployment only if the provisioningState is Accepted or /// Running. After the deployment is canceled, the provisioningState is set to /// Canceled. Canceling a template deployment stops the currently running /// template deployment and leaves the resources partially deployed. - /// + /// /// /// The resource scope. /// @@ -526,10 +524,10 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -538,81 +536,90 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task CancelAtScopeWithHttpMessagesAsync(string scope, string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task CancelAtScopeWithHttpMessagesAsync(string scope, string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (scope == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "scope"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "scope"); } + if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("scope", scope); tracingParameters.Add("deploymentName", deploymentName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CancelAtScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "CancelAtScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{scope}/providers/Microsoft.Resources/deployments/{deploymentName}/cancel").ToString(); _url = _url.Replace("{scope}", scope); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -624,55 +631,56 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -682,23 +690,27 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Validates whether the specified template is syntactically correct and will - /// be accepted by Azure Resource Manager.. + /// Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager.. /// /// /// The resource scope. @@ -710,16 +722,16 @@ internal DeploymentsOperations(ResourceManagementClient client) /// Parameters to validate. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> ValidateAtScopeWithHttpMessagesAsync(string scope, string deploymentName, Deployment parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> ValidateAtScopeWithHttpMessagesAsync(string scope, string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginValidateAtScopeWithHttpMessagesAsync(scope, deploymentName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginValidateAtScopeWithHttpMessagesAsync(scope, deploymentName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// @@ -737,13 +749,13 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -752,81 +764,90 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ExportTemplateAtScopeWithHttpMessagesAsync(string scope, string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> ExportTemplateAtScopeWithHttpMessagesAsync(string scope, string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (scope == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "scope"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "scope"); } + if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("scope", scope); tracingParameters.Add("deploymentName", deploymentName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ExportTemplateAtScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ExportTemplateAtScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{scope}/providers/Microsoft.Resources/deployments/{deploymentName}/exportTemplate").ToString(); _url = _url.Replace("{scope}", scope); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -838,55 +859,56 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -896,9 +918,10 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -909,47 +932,51 @@ internal DeploymentsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Get all the deployments at the given scope. /// + /// + /// + /// /// /// The resource scope. /// - /// - /// OData parameters to apply to the operation. - /// /// /// Headers that will be added to request. /// /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -958,69 +985,79 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListAtScopeWithHttpMessagesAsync(string scope, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListAtScopeWithHttpMessagesAsync(string scope, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + + if (scope == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "scope"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "scope"); } - if (Client.ApiVersion == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("odataQuery", odataQuery); tracingParameters.Add("scope", scope); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListAtScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListAtScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{scope}/providers/Microsoft.Resources/deployments/").ToString(); _url = _url.Replace("{scope}", scope); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (odataQuery != null) { - var _odataFilter = odataQuery.ToString(); - if (!string.IsNullOrEmpty(_odataFilter)) + var _deploymentExtendedFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_deploymentExtendedFilter)) { - _queryParameters.Add(_odataFilter); + _queryParameters.Add(_deploymentExtendedFilter); } } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1032,55 +1069,56 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1090,9 +1128,10 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -1103,53 +1142,46 @@ internal DeploymentsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Deletes a deployment from the deployment history. + /// A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the associated deployment operations. This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted. The Location response header contains the URI that is used to obtain the status of the process. While the process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the Location header returns an error-level status code. /// - /// - /// A template deployment that is currently running cannot be deleted. Deleting - /// a template deployment removes the associated deployment operations. This is - /// an asynchronous operation that returns a status of 202 until the template - /// deployment is successfully deleted. The Location response header contains - /// the URI that is used to obtain the status of the process. While the process - /// is running, a call to the URI in the Location header returns a status of - /// 202. When the process finishes, the URI in the Location header returns a - /// status of 204 on success. If the asynchronous request failed, the URI in - /// the Location header returns an error-level status code. - /// /// /// The name of the deployment. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task DeleteAtTenantScopeWithHttpMessagesAsync(string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task DeleteAtTenantScopeWithHttpMessagesAsync(string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginDeleteAtTenantScopeWithHttpMessagesAsync(deploymentName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginDeleteAtTenantScopeWithHttpMessagesAsync(deploymentName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// @@ -1164,10 +1196,10 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1176,75 +1208,83 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CheckExistenceAtTenantScopeWithHttpMessagesAsync(string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CheckExistenceAtTenantScopeWithHttpMessagesAsync(string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("deploymentName", deploymentName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CheckExistenceAtTenantScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "CheckExistenceAtTenantScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Resources/deployments/{deploymentName}").ToString(); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("HEAD"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("HEAD"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1256,55 +1296,56 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 204 && (int)_statusCode != 404) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1314,28 +1355,28 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; - _result.Body = _statusCode == System.Net.HttpStatusCode.NoContent; + _result.Body = (_statusCode == System.Net.HttpStatusCode.NoContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Deploys resources at tenant scope. + /// You can provide the template and parameters directly in the request or link to JSON files. /// - /// - /// You can provide the template and parameters directly in the request or link - /// to JSON files. - /// /// /// The name of the deployment. /// @@ -1343,16 +1384,16 @@ internal DeploymentsOperations(ResourceManagementClient client) /// Additional parameters supplied to the operation. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> CreateOrUpdateAtTenantScopeWithHttpMessagesAsync(string deploymentName, ScopedDeployment parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CreateOrUpdateAtTenantScopeWithHttpMessagesAsync(string deploymentName, ScopedDeployment parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send Request - AzureOperationResponse _response = await BeginCreateOrUpdateAtTenantScopeWithHttpMessagesAsync(deploymentName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateOrUpdateAtTenantScopeWithHttpMessagesAsync(deploymentName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// @@ -1367,13 +1408,13 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1382,75 +1423,83 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetAtTenantScopeWithHttpMessagesAsync(string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetAtTenantScopeWithHttpMessagesAsync(string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("deploymentName", deploymentName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetAtTenantScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "GetAtTenantScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Resources/deployments/{deploymentName}").ToString(); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1462,55 +1511,56 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1520,9 +1570,10 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -1533,34 +1584,35 @@ internal DeploymentsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Cancels a currently running template deployment. - /// - /// /// You can cancel a deployment only if the provisioningState is Accepted or /// Running. After the deployment is canceled, the provisioningState is set to /// Canceled. Canceling a template deployment stops the currently running /// template deployment and leaves the resources partially deployed. - /// + /// /// /// The name of the deployment. /// @@ -1570,10 +1622,10 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1582,75 +1634,83 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task CancelAtTenantScopeWithHttpMessagesAsync(string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task CancelAtTenantScopeWithHttpMessagesAsync(string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("deploymentName", deploymentName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CancelAtTenantScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "CancelAtTenantScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Resources/deployments/{deploymentName}/cancel").ToString(); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1662,55 +1722,56 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1720,23 +1781,27 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Validates whether the specified template is syntactically correct and will - /// be accepted by Azure Resource Manager.. + /// Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager.. /// /// /// The name of the deployment. @@ -1745,21 +1810,20 @@ internal DeploymentsOperations(ResourceManagementClient client) /// Parameters to validate. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> ValidateAtTenantScopeWithHttpMessagesAsync(string deploymentName, ScopedDeployment parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> ValidateAtTenantScopeWithHttpMessagesAsync(string deploymentName, ScopedDeployment parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginValidateAtTenantScopeWithHttpMessagesAsync(deploymentName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginValidateAtTenantScopeWithHttpMessagesAsync(deploymentName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Returns changes that will be made by the deployment if executed at the - /// scope of the tenant group. + /// Returns changes that will be made by the deployment if executed at the scope of the tenant group. /// /// /// The name of the deployment. @@ -1768,16 +1832,16 @@ internal DeploymentsOperations(ResourceManagementClient client) /// Parameters to validate. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> WhatIfAtTenantScopeWithHttpMessagesAsync(string deploymentName, ScopedDeploymentWhatIf parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> WhatIfAtTenantScopeWithHttpMessagesAsync(string deploymentName, ScopedDeploymentWhatIf parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginWhatIfAtTenantScopeWithHttpMessagesAsync(deploymentName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginWhatIfAtTenantScopeWithHttpMessagesAsync(deploymentName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// @@ -1792,13 +1856,13 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1807,75 +1871,83 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ExportTemplateAtTenantScopeWithHttpMessagesAsync(string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> ExportTemplateAtTenantScopeWithHttpMessagesAsync(string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("deploymentName", deploymentName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ExportTemplateAtTenantScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ExportTemplateAtTenantScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Resources/deployments/{deploymentName}/exportTemplate").ToString(); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1887,55 +1959,56 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1945,9 +2018,10 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -1958,30 +2032,34 @@ internal DeploymentsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Get all the deployments at the tenant scope. /// /// - /// OData parameters to apply to the operation. + /// /// /// /// Headers that will be added to request. @@ -1989,13 +2067,13 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -2004,63 +2082,72 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListAtTenantScopeWithHttpMessagesAsync(ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListAtTenantScopeWithHttpMessagesAsync(Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("odataQuery", odataQuery); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListAtTenantScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListAtTenantScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Resources/deployments/").ToString(); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (odataQuery != null) { - var _odataFilter = odataQuery.ToString(); - if (!string.IsNullOrEmpty(_odataFilter)) + var _deploymentExtendedFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_deploymentExtendedFilter)) { - _queryParameters.Add(_odataFilter); + _queryParameters.Add(_deploymentExtendedFilter); } } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2072,55 +2159,56 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -2130,9 +2218,10 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -2143,39 +2232,32 @@ internal DeploymentsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Deletes a deployment from the deployment history. + /// A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the associated deployment operations. This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted. The Location response header contains the URI that is used to obtain the status of the process. While the process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the Location header returns an error-level status code. /// - /// - /// A template deployment that is currently running cannot be deleted. Deleting - /// a template deployment removes the associated deployment operations. This is - /// an asynchronous operation that returns a status of 202 until the template - /// deployment is successfully deleted. The Location response header contains - /// the URI that is used to obtain the status of the process. While the process - /// is running, a call to the URI in the Location header returns a status of - /// 202. When the process finishes, the URI in the Location header returns a - /// status of 204 on success. If the asynchronous request failed, the URI in - /// the Location header returns an error-level status code. - /// /// /// The management group ID. /// @@ -2183,16 +2265,16 @@ internal DeploymentsOperations(ResourceManagementClient client) /// The name of the deployment. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task DeleteAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task DeleteAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginDeleteAtManagementGroupScopeWithHttpMessagesAsync(groupId, deploymentName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginDeleteAtManagementGroupScopeWithHttpMessagesAsync(groupId, deploymentName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// @@ -2210,10 +2292,10 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -2222,92 +2304,100 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CheckExistenceAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CheckExistenceAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (groupId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "groupId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "groupId"); } if (groupId != null) { if (groupId.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "groupId", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "groupId", 90); } if (groupId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "groupId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "groupId", 1); } } if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("groupId", groupId); tracingParameters.Add("deploymentName", deploymentName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CheckExistenceAtManagementGroupScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "CheckExistenceAtManagementGroupScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}").ToString(); _url = _url.Replace("{groupId}", System.Uri.EscapeDataString(groupId)); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("HEAD"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("HEAD"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2319,55 +2409,56 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 204 && (int)_statusCode != 404) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -2377,28 +2468,28 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; - _result.Body = _statusCode == System.Net.HttpStatusCode.NoContent; + _result.Body = (_statusCode == System.Net.HttpStatusCode.NoContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Deploys resources at management group scope. + /// You can provide the template and parameters directly in the request or link to JSON files. /// - /// - /// You can provide the template and parameters directly in the request or link - /// to JSON files. - /// /// /// The management group ID. /// @@ -2409,16 +2500,16 @@ internal DeploymentsOperations(ResourceManagementClient client) /// Additional parameters supplied to the operation. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> CreateOrUpdateAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, ScopedDeployment parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CreateOrUpdateAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, ScopedDeployment parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send Request - AzureOperationResponse _response = await BeginCreateOrUpdateAtManagementGroupScopeWithHttpMessagesAsync(groupId, deploymentName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateOrUpdateAtManagementGroupScopeWithHttpMessagesAsync(groupId, deploymentName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// @@ -2436,13 +2527,13 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -2451,92 +2542,100 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (groupId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "groupId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "groupId"); } if (groupId != null) { if (groupId.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "groupId", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "groupId", 90); } if (groupId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "groupId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "groupId", 1); } } if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("groupId", groupId); tracingParameters.Add("deploymentName", deploymentName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetAtManagementGroupScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "GetAtManagementGroupScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}").ToString(); _url = _url.Replace("{groupId}", System.Uri.EscapeDataString(groupId)); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2548,55 +2647,56 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -2606,9 +2706,10 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -2619,34 +2720,35 @@ internal DeploymentsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Cancels a currently running template deployment. - /// - /// /// You can cancel a deployment only if the provisioningState is Accepted or /// Running. After the deployment is canceled, the provisioningState is set to /// Canceled. Canceling a template deployment stops the currently running /// template deployment and leaves the resources partially deployed. - /// + /// /// /// The management group ID. /// @@ -2659,10 +2761,10 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -2671,92 +2773,100 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task CancelAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task CancelAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (groupId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "groupId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "groupId"); } if (groupId != null) { if (groupId.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "groupId", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "groupId", 90); } if (groupId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "groupId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "groupId", 1); } } if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("groupId", groupId); tracingParameters.Add("deploymentName", deploymentName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CancelAtManagementGroupScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "CancelAtManagementGroupScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/cancel").ToString(); _url = _url.Replace("{groupId}", System.Uri.EscapeDataString(groupId)); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2768,55 +2878,56 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -2826,23 +2937,27 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Validates whether the specified template is syntactically correct and will - /// be accepted by Azure Resource Manager.. + /// Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager.. /// /// /// The management group ID. @@ -2854,21 +2969,20 @@ internal DeploymentsOperations(ResourceManagementClient client) /// Parameters to validate. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> ValidateAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, ScopedDeployment parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> ValidateAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, ScopedDeployment parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginValidateAtManagementGroupScopeWithHttpMessagesAsync(groupId, deploymentName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginValidateAtManagementGroupScopeWithHttpMessagesAsync(groupId, deploymentName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Returns changes that will be made by the deployment if executed at the - /// scope of the management group. + /// Returns changes that will be made by the deployment if executed at the scope of the management group. /// /// /// The management group ID. @@ -2880,16 +2994,16 @@ internal DeploymentsOperations(ResourceManagementClient client) /// Parameters to validate. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> WhatIfAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, ScopedDeploymentWhatIf parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> WhatIfAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, ScopedDeploymentWhatIf parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginWhatIfAtManagementGroupScopeWithHttpMessagesAsync(groupId, deploymentName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginWhatIfAtManagementGroupScopeWithHttpMessagesAsync(groupId, deploymentName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// @@ -2907,13 +3021,13 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -2922,92 +3036,100 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ExportTemplateAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> ExportTemplateAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (groupId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "groupId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "groupId"); } if (groupId != null) { if (groupId.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "groupId", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "groupId", 90); } if (groupId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "groupId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "groupId", 1); } } if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("groupId", groupId); tracingParameters.Add("deploymentName", deploymentName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ExportTemplateAtManagementGroupScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ExportTemplateAtManagementGroupScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/exportTemplate").ToString(); _url = _url.Replace("{groupId}", System.Uri.EscapeDataString(groupId)); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -3019,55 +3141,56 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -3077,9 +3200,10 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -3090,47 +3214,51 @@ internal DeploymentsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Get all the deployments for a management group. /// + /// + /// + /// /// /// The management group ID. /// - /// - /// OData parameters to apply to the operation. - /// /// /// Headers that will be added to request. /// /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -3139,80 +3267,89 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListAtManagementGroupScopeWithHttpMessagesAsync(string groupId, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListAtManagementGroupScopeWithHttpMessagesAsync(string groupId, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + + if (groupId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "groupId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "groupId"); } if (groupId != null) { if (groupId.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "groupId", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "groupId", 90); } if (groupId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "groupId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "groupId", 1); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("odataQuery", odataQuery); tracingParameters.Add("groupId", groupId); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListAtManagementGroupScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListAtManagementGroupScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/").ToString(); _url = _url.Replace("{groupId}", System.Uri.EscapeDataString(groupId)); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (odataQuery != null) { - var _odataFilter = odataQuery.ToString(); - if (!string.IsNullOrEmpty(_odataFilter)) + var _deploymentExtendedFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_deploymentExtendedFilter)) { - _queryParameters.Add(_odataFilter); + _queryParameters.Add(_deploymentExtendedFilter); } } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -3224,55 +3361,56 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -3282,9 +3420,10 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -3295,53 +3434,46 @@ internal DeploymentsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Deletes a deployment from the deployment history. + /// A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the associated deployment operations. This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted. The Location response header contains the URI that is used to obtain the status of the process. While the process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the Location header returns an error-level status code. /// - /// - /// A template deployment that is currently running cannot be deleted. Deleting - /// a template deployment removes the associated deployment operations. This is - /// an asynchronous operation that returns a status of 202 until the template - /// deployment is successfully deleted. The Location response header contains - /// the URI that is used to obtain the status of the process. While the process - /// is running, a call to the URI in the Location header returns a status of - /// 202. When the process finishes, the URI in the Location header returns a - /// status of 204 on success. If the asynchronous request failed, the URI in - /// the Location header returns an error-level status code. - /// /// /// The name of the deployment. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task DeleteAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task DeleteAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginDeleteAtSubscriptionScopeWithHttpMessagesAsync(deploymentName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginDeleteAtSubscriptionScopeWithHttpMessagesAsync(deploymentName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// @@ -3356,10 +3488,10 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -3368,80 +3500,89 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CheckExistenceAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CheckExistenceAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("deploymentName", deploymentName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CheckExistenceAtSubscriptionScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "CheckExistenceAtSubscriptionScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}").ToString(); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("HEAD"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("HEAD"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -3453,55 +3594,56 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 204 && (int)_statusCode != 404) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -3511,28 +3653,28 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; - _result.Body = _statusCode == System.Net.HttpStatusCode.NoContent; + _result.Body = (_statusCode == System.Net.HttpStatusCode.NoContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Deploys resources at subscription scope. + /// You can provide the template and parameters directly in the request or link to JSON files. /// - /// - /// You can provide the template and parameters directly in the request or link - /// to JSON files. - /// /// /// The name of the deployment. /// @@ -3540,16 +3682,16 @@ internal DeploymentsOperations(ResourceManagementClient client) /// Additional parameters supplied to the operation. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> CreateOrUpdateAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, Deployment parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CreateOrUpdateAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send Request - AzureOperationResponse _response = await BeginCreateOrUpdateAtSubscriptionScopeWithHttpMessagesAsync(deploymentName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateOrUpdateAtSubscriptionScopeWithHttpMessagesAsync(deploymentName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// @@ -3564,13 +3706,13 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -3579,80 +3721,89 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("deploymentName", deploymentName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetAtSubscriptionScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "GetAtSubscriptionScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}").ToString(); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -3664,55 +3815,56 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -3722,9 +3874,10 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -3735,34 +3888,35 @@ internal DeploymentsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Cancels a currently running template deployment. - /// - /// /// You can cancel a deployment only if the provisioningState is Accepted or /// Running. After the deployment is canceled, the provisioningState is set to /// Canceled. Canceling a template deployment stops the currently running /// template deployment and leaves the resources partially deployed. - /// + /// /// /// The name of the deployment. /// @@ -3772,10 +3926,10 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -3784,80 +3938,89 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task CancelAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task CancelAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("deploymentName", deploymentName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CancelAtSubscriptionScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "CancelAtSubscriptionScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}/cancel").ToString(); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -3869,55 +4032,56 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -3927,23 +4091,27 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Validates whether the specified template is syntactically correct and will - /// be accepted by Azure Resource Manager.. + /// Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager.. /// /// /// The name of the deployment. @@ -3952,21 +4120,20 @@ internal DeploymentsOperations(ResourceManagementClient client) /// Parameters to validate. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> ValidateAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, Deployment parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> ValidateAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginValidateAtSubscriptionScopeWithHttpMessagesAsync(deploymentName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginValidateAtSubscriptionScopeWithHttpMessagesAsync(deploymentName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Returns changes that will be made by the deployment if executed at the - /// scope of the subscription. + /// Returns changes that will be made by the deployment if executed at the scope of the subscription. /// /// /// The name of the deployment. @@ -3975,16 +4142,16 @@ internal DeploymentsOperations(ResourceManagementClient client) /// Parameters to What If. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> WhatIfAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, DeploymentWhatIf parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> WhatIfAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, DeploymentWhatIf parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginWhatIfAtSubscriptionScopeWithHttpMessagesAsync(deploymentName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginWhatIfAtSubscriptionScopeWithHttpMessagesAsync(deploymentName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// @@ -3999,13 +4166,13 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -4014,80 +4181,89 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ExportTemplateAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> ExportTemplateAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("deploymentName", deploymentName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ExportTemplateAtSubscriptionScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ExportTemplateAtSubscriptionScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}/exportTemplate").ToString(); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -4099,55 +4275,56 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -4157,9 +4334,10 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -4170,30 +4348,34 @@ internal DeploymentsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Get all the deployments for a subscription. /// /// - /// OData parameters to apply to the operation. + /// /// /// /// Headers that will be added to request. @@ -4201,13 +4383,13 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -4216,68 +4398,78 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListAtSubscriptionScopeWithHttpMessagesAsync(ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListAtSubscriptionScopeWithHttpMessagesAsync(Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("odataQuery", odataQuery); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListAtSubscriptionScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListAtSubscriptionScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (odataQuery != null) { - var _odataFilter = odataQuery.ToString(); - if (!string.IsNullOrEmpty(_odataFilter)) + var _deploymentExtendedFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_deploymentExtendedFilter)) { - _queryParameters.Add(_odataFilter); + _queryParameters.Add(_deploymentExtendedFilter); } } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -4289,55 +4481,56 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -4347,9 +4540,10 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -4360,40 +4554,32 @@ internal DeploymentsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Deletes a deployment from the deployment history. + /// A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the associated deployment operations. Deleting a template deployment does not affect the state of the resource group. This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted. The Location response header contains the URI that is used to obtain the status of the process. While the process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the Location header returns an error-level status code. /// - /// - /// A template deployment that is currently running cannot be deleted. Deleting - /// a template deployment removes the associated deployment operations. - /// Deleting a template deployment does not affect the state of the resource - /// group. This is an asynchronous operation that returns a status of 202 until - /// the template deployment is successfully deleted. The Location response - /// header contains the URI that is used to obtain the status of the process. - /// While the process is running, a call to the URI in the Location header - /// returns a status of 202. When the process finishes, the URI in the Location - /// header returns a status of 204 on success. If the asynchronous request - /// failed, the URI in the Location header returns an error-level status code. - /// /// /// The name of the resource group with the deployment to delete. The name is /// case insensitive. @@ -4402,16 +4588,16 @@ internal DeploymentsOperations(ResourceManagementClient client) /// The name of the deployment. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, deploymentName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, deploymentName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// @@ -4430,10 +4616,10 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -4442,101 +4628,110 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CheckExistenceWithHttpMessagesAsync(string resourceGroupName, string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CheckExistenceWithHttpMessagesAsync(string resourceGroupName, string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); } } if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("deploymentName", deploymentName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CheckExistence", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "CheckExistence", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("HEAD"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("HEAD"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -4548,55 +4743,56 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 204 && (int)_statusCode != 404) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -4606,28 +4802,28 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; - _result.Body = _statusCode == System.Net.HttpStatusCode.NoContent; + _result.Body = (_statusCode == System.Net.HttpStatusCode.NoContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Deploys resources to a resource group. + /// You can provide the template and parameters directly in the request or link to JSON files. /// - /// - /// You can provide the template and parameters directly in the request or link - /// to JSON files. - /// /// /// The name of the resource group to deploy the resources to. The name is case /// insensitive. The resource group must already exist. @@ -4639,16 +4835,16 @@ internal DeploymentsOperations(ResourceManagementClient client) /// Additional parameters supplied to the operation. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string deploymentName, Deployment parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send Request - AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, deploymentName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, deploymentName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// @@ -4666,13 +4862,13 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -4681,101 +4877,110 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); } } if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("deploymentName", deploymentName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -4787,55 +4992,56 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -4845,9 +5051,10 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -4858,34 +5065,35 @@ internal DeploymentsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Cancels a currently running template deployment. - /// - /// /// You can cancel a deployment only if the provisioningState is Accepted or /// Running. After the deployment is canceled, the provisioningState is set to /// Canceled. Canceling a template deployment stops the currently running /// template deployment and leaves the resource group partially deployed. - /// + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -4898,10 +5106,10 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -4910,101 +5118,110 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task CancelWithHttpMessagesAsync(string resourceGroupName, string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task CancelWithHttpMessagesAsync(string resourceGroupName, string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); } } if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("deploymentName", deploymentName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Cancel", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Cancel", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/cancel").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -5016,55 +5233,56 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -5074,23 +5292,27 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Validates whether the specified template is syntactically correct and will - /// be accepted by Azure Resource Manager.. + /// Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager.. /// /// /// The name of the resource group the template will be deployed to. The name @@ -5103,21 +5325,20 @@ internal DeploymentsOperations(ResourceManagementClient client) /// Parameters to validate. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> ValidateWithHttpMessagesAsync(string resourceGroupName, string deploymentName, Deployment parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> ValidateWithHttpMessagesAsync(string resourceGroupName, string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginValidateWithHttpMessagesAsync(resourceGroupName, deploymentName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginValidateWithHttpMessagesAsync(resourceGroupName, deploymentName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Returns changes that will be made by the deployment if executed at the - /// scope of the resource group. + /// Returns changes that will be made by the deployment if executed at the scope of the resource group. /// /// /// The name of the resource group the template will be deployed to. The name @@ -5130,16 +5351,16 @@ internal DeploymentsOperations(ResourceManagementClient client) /// Parameters to validate. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> WhatIfWithHttpMessagesAsync(string resourceGroupName, string deploymentName, DeploymentWhatIf parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> WhatIfWithHttpMessagesAsync(string resourceGroupName, string deploymentName, DeploymentWhatIf parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginWhatIfWithHttpMessagesAsync(resourceGroupName, deploymentName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginWhatIfWithHttpMessagesAsync(resourceGroupName, deploymentName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// @@ -5157,13 +5378,13 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -5172,101 +5393,110 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ExportTemplateWithHttpMessagesAsync(string resourceGroupName, string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> ExportTemplateWithHttpMessagesAsync(string resourceGroupName, string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); } } if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("deploymentName", deploymentName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ExportTemplate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ExportTemplate", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/exportTemplate").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -5278,55 +5508,56 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -5336,9 +5567,10 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -5349,48 +5581,52 @@ internal DeploymentsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Get all the deployments for a resource group. /// + /// + /// + /// /// /// The name of the resource group with the deployments to get. The name is /// case insensitive. /// - /// - /// OData parameters to apply to the operation. - /// /// /// Headers that will be added to request. /// /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -5399,89 +5635,99 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("odataQuery", odataQuery); tracingParameters.Add("resourceGroupName", resourceGroupName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (odataQuery != null) { - var _odataFilter = odataQuery.ToString(); - if (!string.IsNullOrEmpty(_odataFilter)) + var _deploymentExtendedFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_deploymentExtendedFilter)) { - _queryParameters.Add(_odataFilter); + _queryParameters.Add(_deploymentExtendedFilter); } } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -5493,55 +5739,56 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -5551,9 +5798,10 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -5564,25 +5812,29 @@ internal DeploymentsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Calculate the hash of the given template. /// @@ -5595,13 +5847,13 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -5610,59 +5862,68 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CalculateTemplateHashWithHttpMessagesAsync(object template, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CalculateTemplateHashWithHttpMessagesAsync(object template, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (template == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "template"); } - if (template == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "template"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("template", template); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CalculateTemplateHash", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "CalculateTemplateHash", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Resources/calculateTemplateHash").ToString(); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -5674,61 +5935,62 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(template != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(template, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(template, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -5738,9 +6000,10 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -5751,29 +6014,30 @@ internal DeploymentsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Deletes a deployment from the deployment history. - /// - /// /// A template deployment that is currently running cannot be deleted. Deleting /// a template deployment removes the associated deployment operations. This is /// an asynchronous operation that returns a status of 202 until the template @@ -5783,7 +6047,7 @@ internal DeploymentsOperations(ResourceManagementClient client) /// 202. When the process finishes, the URI in the Location header returns a /// status of 204 on success. If the asynchronous request failed, the URI in /// the Location header returns an error-level status code. - /// + /// /// /// The resource scope. /// @@ -5796,10 +6060,10 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -5808,81 +6072,90 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginDeleteAtScopeWithHttpMessagesAsync(string scope, string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task BeginDeleteAtScopeWithHttpMessagesAsync(string scope, string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (scope == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "scope"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "scope"); } + if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("scope", scope); tracingParameters.Add("deploymentName", deploymentName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDeleteAtScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginDeleteAtScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{scope}/providers/Microsoft.Resources/deployments/{deploymentName}").ToString(); _url = _url.Replace("{scope}", scope); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -5894,55 +6167,56 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -5952,27 +6226,29 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Deploys resources at a given scope. - /// - /// /// You can provide the template and parameters directly in the request or link /// to JSON files. - /// + /// /// /// The resource scope. /// @@ -5988,13 +6264,13 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -6003,90 +6279,99 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateOrUpdateAtScopeWithHttpMessagesAsync(string scope, string deploymentName, Deployment parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginCreateOrUpdateAtScopeWithHttpMessagesAsync(string scope, string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + + if (parameters == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } if (scope == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "scope"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "scope"); } + if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } - if (parameters != null) + if (this.Client.ApiVersion == null) { - parameters.Validate(); - } - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("scope", scope); tracingParameters.Add("deploymentName", deploymentName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdateAtScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdateAtScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{scope}/providers/Microsoft.Resources/deployments/{deploymentName}").ToString(); _url = _url.Replace("{scope}", scope); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -6098,61 +6383,62 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 201) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -6162,9 +6448,10 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -6175,16 +6462,16 @@ internal DeploymentsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } // Deserialize Response @@ -6193,25 +6480,29 @@ internal DeploymentsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Validates whether the specified template is syntactically correct and will /// be accepted by Azure Resource Manager.. @@ -6231,13 +6522,13 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -6246,90 +6537,99 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginValidateAtScopeWithHttpMessagesAsync(string scope, string deploymentName, Deployment parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginValidateAtScopeWithHttpMessagesAsync(string scope, string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + + if (parameters == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } if (scope == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "scope"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "scope"); } + if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } - if (parameters != null) + if (this.Client.ApiVersion == null) { - parameters.Validate(); - } - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("scope", scope); tracingParameters.Add("deploymentName", deploymentName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginValidateAtScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginValidateAtScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{scope}/providers/Microsoft.Resources/deployments/{deploymentName}/validate").ToString(); _url = _url.Replace("{scope}", scope); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -6341,61 +6641,62 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 400) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -6405,9 +6706,10 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -6418,16 +6720,16 @@ internal DeploymentsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } // Deserialize Response @@ -6436,29 +6738,30 @@ internal DeploymentsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Deletes a deployment from the deployment history. - /// - /// /// A template deployment that is currently running cannot be deleted. Deleting /// a template deployment removes the associated deployment operations. This is /// an asynchronous operation that returns a status of 202 until the template @@ -6468,7 +6771,7 @@ internal DeploymentsOperations(ResourceManagementClient client) /// 202. When the process finishes, the URI in the Location header returns a /// status of 204 on success. If the asynchronous request failed, the URI in /// the Location header returns an error-level status code. - /// + /// /// /// The name of the deployment. /// @@ -6478,10 +6781,10 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -6490,75 +6793,83 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginDeleteAtTenantScopeWithHttpMessagesAsync(string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task BeginDeleteAtTenantScopeWithHttpMessagesAsync(string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("deploymentName", deploymentName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDeleteAtTenantScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginDeleteAtTenantScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Resources/deployments/{deploymentName}").ToString(); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -6570,55 +6881,56 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -6628,27 +6940,29 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Deploys resources at tenant scope. - /// - /// /// You can provide the template and parameters directly in the request or link /// to JSON files. - /// + /// /// /// The name of the deployment. /// @@ -6661,13 +6975,13 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -6676,84 +6990,92 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateOrUpdateAtTenantScopeWithHttpMessagesAsync(string deploymentName, ScopedDeployment parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginCreateOrUpdateAtTenantScopeWithHttpMessagesAsync(string deploymentName, ScopedDeployment parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + + if (parameters == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } - if (parameters != null) - { - parameters.Validate(); - } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("deploymentName", deploymentName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdateAtTenantScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdateAtTenantScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Resources/deployments/{deploymentName}").ToString(); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -6765,61 +7087,62 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 201) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -6829,9 +7152,10 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -6842,16 +7166,16 @@ internal DeploymentsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } // Deserialize Response @@ -6860,25 +7184,29 @@ internal DeploymentsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Validates whether the specified template is syntactically correct and will /// be accepted by Azure Resource Manager.. @@ -6895,13 +7223,13 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -6910,84 +7238,92 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginValidateAtTenantScopeWithHttpMessagesAsync(string deploymentName, ScopedDeployment parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginValidateAtTenantScopeWithHttpMessagesAsync(string deploymentName, ScopedDeployment parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + + if (parameters == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } - if (parameters != null) - { - parameters.Validate(); - } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("deploymentName", deploymentName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginValidateAtTenantScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginValidateAtTenantScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Resources/deployments/{deploymentName}/validate").ToString(); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -6999,61 +7335,62 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 400) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -7063,9 +7400,10 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -7076,16 +7414,16 @@ internal DeploymentsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } // Deserialize Response @@ -7094,25 +7432,29 @@ internal DeploymentsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Returns changes that will be made by the deployment if executed at the /// scope of the tenant group. @@ -7129,13 +7471,13 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -7144,84 +7486,92 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginWhatIfAtTenantScopeWithHttpMessagesAsync(string deploymentName, ScopedDeploymentWhatIf parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginWhatIfAtTenantScopeWithHttpMessagesAsync(string deploymentName, ScopedDeploymentWhatIf parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + + if (parameters == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } - if (parameters != null) - { - parameters.Validate(); - } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("deploymentName", deploymentName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginWhatIfAtTenantScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginWhatIfAtTenantScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Resources/deployments/{deploymentName}/whatIf").ToString(); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -7233,61 +7583,62 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -7297,9 +7648,10 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -7310,42 +7662,43 @@ internal DeploymentsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } try { - _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Deletes a deployment from the deployment history. - /// - /// /// A template deployment that is currently running cannot be deleted. Deleting /// a template deployment removes the associated deployment operations. This is /// an asynchronous operation that returns a status of 202 until the template @@ -7355,7 +7708,7 @@ internal DeploymentsOperations(ResourceManagementClient client) /// 202. When the process finishes, the URI in the Location header returns a /// status of 204 on success. If the asynchronous request failed, the URI in /// the Location header returns an error-level status code. - /// + /// /// /// The management group ID. /// @@ -7368,10 +7721,10 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -7380,92 +7733,100 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginDeleteAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task BeginDeleteAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (groupId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "groupId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "groupId"); } if (groupId != null) { if (groupId.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "groupId", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "groupId", 90); } if (groupId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "groupId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "groupId", 1); } } if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("groupId", groupId); tracingParameters.Add("deploymentName", deploymentName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDeleteAtManagementGroupScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginDeleteAtManagementGroupScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}").ToString(); _url = _url.Replace("{groupId}", System.Uri.EscapeDataString(groupId)); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -7477,55 +7838,56 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -7535,27 +7897,29 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Deploys resources at management group scope. - /// - /// /// You can provide the template and parameters directly in the request or link /// to JSON files. - /// + /// /// /// The management group ID. /// @@ -7571,13 +7935,13 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -7586,101 +7950,109 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateOrUpdateAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, ScopedDeployment parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginCreateOrUpdateAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, ScopedDeployment parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + + if (parameters == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } if (groupId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "groupId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "groupId"); } if (groupId != null) { if (groupId.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "groupId", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "groupId", 90); } if (groupId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "groupId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "groupId", 1); } } if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } - if (parameters != null) - { - parameters.Validate(); - } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("groupId", groupId); tracingParameters.Add("deploymentName", deploymentName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdateAtManagementGroupScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdateAtManagementGroupScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}").ToString(); _url = _url.Replace("{groupId}", System.Uri.EscapeDataString(groupId)); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -7692,61 +8064,62 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 201) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -7756,9 +8129,10 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -7769,16 +8143,16 @@ internal DeploymentsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } // Deserialize Response @@ -7787,25 +8161,29 @@ internal DeploymentsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Validates whether the specified template is syntactically correct and will /// be accepted by Azure Resource Manager.. @@ -7825,13 +8203,13 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -7840,101 +8218,109 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginValidateAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, ScopedDeployment parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginValidateAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, ScopedDeployment parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + + if (parameters == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } if (groupId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "groupId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "groupId"); } if (groupId != null) { if (groupId.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "groupId", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "groupId", 90); } if (groupId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "groupId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "groupId", 1); } } if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } - if (parameters != null) - { - parameters.Validate(); - } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("groupId", groupId); tracingParameters.Add("deploymentName", deploymentName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginValidateAtManagementGroupScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginValidateAtManagementGroupScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/validate").ToString(); _url = _url.Replace("{groupId}", System.Uri.EscapeDataString(groupId)); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -7946,61 +8332,62 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 400) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -8010,9 +8397,10 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -8023,16 +8411,16 @@ internal DeploymentsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } // Deserialize Response @@ -8041,25 +8429,29 @@ internal DeploymentsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Returns changes that will be made by the deployment if executed at the /// scope of the management group. @@ -8079,13 +8471,13 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -8094,101 +8486,109 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginWhatIfAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, ScopedDeploymentWhatIf parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginWhatIfAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, ScopedDeploymentWhatIf parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + + if (parameters == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } if (groupId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "groupId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "groupId"); } if (groupId != null) { if (groupId.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "groupId", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "groupId", 90); } if (groupId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "groupId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "groupId", 1); } } if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } - if (parameters != null) - { - parameters.Validate(); - } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("groupId", groupId); tracingParameters.Add("deploymentName", deploymentName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginWhatIfAtManagementGroupScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginWhatIfAtManagementGroupScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/whatIf").ToString(); _url = _url.Replace("{groupId}", System.Uri.EscapeDataString(groupId)); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -8200,61 +8600,62 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -8264,9 +8665,10 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -8277,42 +8679,43 @@ internal DeploymentsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } try { - _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Deletes a deployment from the deployment history. - /// - /// /// A template deployment that is currently running cannot be deleted. Deleting /// a template deployment removes the associated deployment operations. This is /// an asynchronous operation that returns a status of 202 until the template @@ -8322,7 +8725,7 @@ internal DeploymentsOperations(ResourceManagementClient client) /// 202. When the process finishes, the URI in the Location header returns a /// status of 204 on success. If the asynchronous request failed, the URI in /// the Location header returns an error-level status code. - /// + /// /// /// The name of the deployment. /// @@ -8332,10 +8735,10 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -8344,80 +8747,89 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginDeleteAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task BeginDeleteAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("deploymentName", deploymentName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDeleteAtSubscriptionScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginDeleteAtSubscriptionScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}").ToString(); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -8429,55 +8841,56 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -8487,27 +8900,29 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Deploys resources at subscription scope. - /// - /// /// You can provide the template and parameters directly in the request or link /// to JSON files. - /// + /// /// /// The name of the deployment. /// @@ -8520,13 +8935,13 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -8535,89 +8950,98 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateOrUpdateAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, Deployment parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginCreateOrUpdateAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + + if (parameters == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } - if (parameters == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (parameters != null) - { - parameters.Validate(); - } - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("deploymentName", deploymentName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdateAtSubscriptionScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdateAtSubscriptionScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}").ToString(); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -8629,61 +9053,62 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 201) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -8693,9 +9118,10 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -8706,16 +9132,16 @@ internal DeploymentsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } // Deserialize Response @@ -8724,25 +9150,29 @@ internal DeploymentsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Validates whether the specified template is syntactically correct and will /// be accepted by Azure Resource Manager.. @@ -8759,13 +9189,13 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -8774,89 +9204,98 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginValidateAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, Deployment parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginValidateAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + + if (parameters == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } - if (parameters != null) - { - parameters.Validate(); - } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("deploymentName", deploymentName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginValidateAtSubscriptionScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginValidateAtSubscriptionScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}/validate").ToString(); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -8868,61 +9307,62 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 400) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -8932,9 +9372,10 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -8945,16 +9386,16 @@ internal DeploymentsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } // Deserialize Response @@ -8963,25 +9404,29 @@ internal DeploymentsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Returns changes that will be made by the deployment if executed at the /// scope of the subscription. @@ -8998,13 +9443,13 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -9013,89 +9458,98 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginWhatIfAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, DeploymentWhatIf parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginWhatIfAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, DeploymentWhatIf parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + + if (parameters == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } - if (parameters != null) - { - parameters.Validate(); - } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("deploymentName", deploymentName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginWhatIfAtSubscriptionScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginWhatIfAtSubscriptionScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}/whatIf").ToString(); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -9107,61 +9561,62 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -9171,9 +9626,10 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -9184,42 +9640,43 @@ internal DeploymentsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } try { - _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Deletes a deployment from the deployment history. - /// - /// /// A template deployment that is currently running cannot be deleted. Deleting /// a template deployment removes the associated deployment operations. /// Deleting a template deployment does not affect the state of the resource @@ -9230,7 +9687,7 @@ internal DeploymentsOperations(ResourceManagementClient client) /// returns a status of 202. When the process finishes, the URI in the Location /// header returns a status of 204 on success. If the asynchronous request /// failed, the URI in the Location header returns an error-level status code. - /// + /// /// /// The name of the resource group with the deployment to delete. The name is /// case insensitive. @@ -9244,10 +9701,10 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -9256,101 +9713,110 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); } } if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("deploymentName", deploymentName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -9362,55 +9828,56 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -9420,27 +9887,29 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Deploys resources to a resource group. - /// - /// /// You can provide the template and parameters directly in the request or link /// to JSON files. - /// + /// /// /// The name of the resource group to deploy the resources to. The name is case /// insensitive. The resource group must already exist. @@ -9457,13 +9926,13 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -9472,110 +9941,119 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string deploymentName, Deployment parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + + if (parameters == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); } } if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } - if (parameters != null) - { - parameters.Validate(); - } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("deploymentName", deploymentName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -9587,61 +10065,62 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 201) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -9651,9 +10130,10 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -9664,16 +10144,16 @@ internal DeploymentsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } // Deserialize Response @@ -9682,25 +10162,29 @@ internal DeploymentsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Validates whether the specified template is syntactically correct and will /// be accepted by Azure Resource Manager.. @@ -9721,13 +10205,13 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -9736,110 +10220,119 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginValidateWithHttpMessagesAsync(string resourceGroupName, string deploymentName, Deployment parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginValidateWithHttpMessagesAsync(string resourceGroupName, string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + + if (parameters == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); } } if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } - if (parameters != null) - { - parameters.Validate(); - } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("deploymentName", deploymentName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginValidate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginValidate", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/validate").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -9851,61 +10344,62 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 400) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -9915,9 +10409,10 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -9928,16 +10423,16 @@ internal DeploymentsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } // Deserialize Response @@ -9946,25 +10441,29 @@ internal DeploymentsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Returns changes that will be made by the deployment if executed at the /// scope of the resource group. @@ -9985,13 +10484,13 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -10000,110 +10499,119 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginWhatIfWithHttpMessagesAsync(string resourceGroupName, string deploymentName, DeploymentWhatIf parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginWhatIfWithHttpMessagesAsync(string resourceGroupName, string deploymentName, DeploymentWhatIf parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + + if (parameters == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); } } if (deploymentName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "deploymentName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "deploymentName"); } if (deploymentName != null) { if (deploymentName.Length > 64) { - throw new ValidationException(ValidationRules.MaxLength, "deploymentName", 64); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "deploymentName", 64); } if (deploymentName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "deploymentName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "deploymentName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(deploymentName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "deploymentName", "^[-\\w\\._\\(\\)]+$"); } } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } - if (parameters != null) + if (this.Client.ApiVersion == null) { - parameters.Validate(); - } - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("deploymentName", deploymentName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginWhatIf", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginWhatIf", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/whatIf").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{deploymentName}", System.Uri.EscapeDataString(deploymentName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -10115,61 +10623,62 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -10179,9 +10688,10 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -10192,38 +10702,42 @@ internal DeploymentsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } try { - _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Get all the deployments at the given scope. /// @@ -10236,13 +10750,13 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -10251,51 +10765,54 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListAtScopeNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListAtScopeNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListAtScopeNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListAtScopeNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -10307,55 +10824,56 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -10365,9 +10883,10 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -10378,25 +10897,29 @@ internal DeploymentsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Get all the deployments at the tenant scope. /// @@ -10409,13 +10932,13 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -10424,51 +10947,54 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListAtTenantScopeNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListAtTenantScopeNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListAtTenantScopeNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListAtTenantScopeNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -10480,55 +11006,56 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -10538,9 +11065,10 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -10551,25 +11079,29 @@ internal DeploymentsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Get all the deployments for a management group. /// @@ -10582,13 +11114,13 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -10597,51 +11129,54 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListAtManagementGroupScopeNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListAtManagementGroupScopeNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListAtManagementGroupScopeNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListAtManagementGroupScopeNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -10653,55 +11188,56 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -10711,9 +11247,10 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -10724,25 +11261,29 @@ internal DeploymentsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Get all the deployments for a subscription. /// @@ -10755,13 +11296,13 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -10770,51 +11311,54 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListAtSubscriptionScopeNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListAtSubscriptionScopeNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListAtSubscriptionScopeNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListAtSubscriptionScopeNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -10826,55 +11370,56 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -10884,9 +11429,10 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -10897,25 +11443,29 @@ internal DeploymentsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Get all the deployments for a resource group. /// @@ -10928,13 +11478,13 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -10943,51 +11493,54 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroupNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroupNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -10999,55 +11552,56 @@ internal DeploymentsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -11057,9 +11611,10 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -11070,24 +11625,28 @@ internal DeploymentsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/DeploymentsOperationsExtensions.cs b/src/Resources/Resources.Management.Sdk/Generated/DeploymentsOperationsExtensions.cs new file mode 100644 index 000000000000..063ce42caa5e --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/DeploymentsOperationsExtensions.cs @@ -0,0 +1,2734 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +namespace Microsoft.Azure.Management.Resources +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// Extension methods for DeploymentsOperations + /// + public static partial class DeploymentsOperationsExtensions + { + /// + /// A template deployment that is currently running cannot be deleted. Deleting + /// a template deployment removes the associated deployment operations. This is + /// an asynchronous operation that returns a status of 202 until the template + /// deployment is successfully deleted. The Location response header contains + /// the URI that is used to obtain the status of the process. While the process + /// is running, a call to the URI in the Location header returns a status of + /// 202. When the process finishes, the URI in the Location header returns a + /// status of 204 on success. If the asynchronous request failed, the URI in + /// the Location header returns an error-level status code. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource scope. + /// + /// + /// The name of the deployment. + /// + public static void DeleteAtScope(this IDeploymentsOperations operations, string scope, string deploymentName) + { + ((IDeploymentsOperations)operations).DeleteAtScopeAsync(scope, deploymentName).GetAwaiter().GetResult(); + } + + /// + /// A template deployment that is currently running cannot be deleted. Deleting + /// a template deployment removes the associated deployment operations. This is + /// an asynchronous operation that returns a status of 202 until the template + /// deployment is successfully deleted. The Location response header contains + /// the URI that is used to obtain the status of the process. While the process + /// is running, a call to the URI in the Location header returns a status of + /// 202. When the process finishes, the URI in the Location header returns a + /// status of 204 on success. If the asynchronous request failed, the URI in + /// the Location header returns an error-level status code. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource scope. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAtScopeAsync(this IDeploymentsOperations operations, string scope, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteAtScopeWithHttpMessagesAsync(scope, deploymentName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Checks whether the deployment exists. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource scope. + /// + /// + /// The name of the deployment. + /// + public static bool CheckExistenceAtScope(this IDeploymentsOperations operations, string scope, string deploymentName) + { + return ((IDeploymentsOperations)operations).CheckExistenceAtScopeAsync(scope, deploymentName).GetAwaiter().GetResult(); + } + + /// + /// Checks whether the deployment exists. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource scope. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CheckExistenceAtScopeAsync(this IDeploymentsOperations operations, string scope, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CheckExistenceAtScopeWithHttpMessagesAsync(scope, deploymentName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// You can provide the template and parameters directly in the request or link + /// to JSON files. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource scope. + /// + /// + /// The name of the deployment. + /// + public static DeploymentExtended CreateOrUpdateAtScope(this IDeploymentsOperations operations, string scope, string deploymentName, Deployment parameters) + { + return ((IDeploymentsOperations)operations).CreateOrUpdateAtScopeAsync(scope, deploymentName, parameters).GetAwaiter().GetResult(); + } + + /// + /// You can provide the template and parameters directly in the request or link + /// to JSON files. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource scope. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateOrUpdateAtScopeAsync(this IDeploymentsOperations operations, string scope, string deploymentName, Deployment parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateAtScopeWithHttpMessagesAsync(scope, deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets a deployment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource scope. + /// + /// + /// The name of the deployment. + /// + public static DeploymentExtended GetAtScope(this IDeploymentsOperations operations, string scope, string deploymentName) + { + return ((IDeploymentsOperations)operations).GetAtScopeAsync(scope, deploymentName).GetAwaiter().GetResult(); + } + + /// + /// Gets a deployment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource scope. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAtScopeAsync(this IDeploymentsOperations operations, string scope, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetAtScopeWithHttpMessagesAsync(scope, deploymentName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// You can cancel a deployment only if the provisioningState is Accepted or + /// Running. After the deployment is canceled, the provisioningState is set to + /// Canceled. Canceling a template deployment stops the currently running + /// template deployment and leaves the resources partially deployed. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource scope. + /// + /// + /// The name of the deployment. + /// + public static void CancelAtScope(this IDeploymentsOperations operations, string scope, string deploymentName) + { + ((IDeploymentsOperations)operations).CancelAtScopeAsync(scope, deploymentName).GetAwaiter().GetResult(); + } + + /// + /// You can cancel a deployment only if the provisioningState is Accepted or + /// Running. After the deployment is canceled, the provisioningState is set to + /// Canceled. Canceling a template deployment stops the currently running + /// template deployment and leaves the resources partially deployed. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource scope. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CancelAtScopeAsync(this IDeploymentsOperations operations, string scope, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.CancelAtScopeWithHttpMessagesAsync(scope, deploymentName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Validates whether the specified template is syntactically correct and will + /// be accepted by Azure Resource Manager.. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource scope. + /// + /// + /// The name of the deployment. + /// + public static DeploymentValidateResult ValidateAtScope(this IDeploymentsOperations operations, string scope, string deploymentName, Deployment parameters) + { + return ((IDeploymentsOperations)operations).ValidateAtScopeAsync(scope, deploymentName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Validates whether the specified template is syntactically correct and will + /// be accepted by Azure Resource Manager.. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource scope. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ValidateAtScopeAsync(this IDeploymentsOperations operations, string scope, string deploymentName, Deployment parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ValidateAtScopeWithHttpMessagesAsync(scope, deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Exports the template used for specified deployment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource scope. + /// + /// + /// The name of the deployment. + /// + public static DeploymentExportResult ExportTemplateAtScope(this IDeploymentsOperations operations, string scope, string deploymentName) + { + return ((IDeploymentsOperations)operations).ExportTemplateAtScopeAsync(scope, deploymentName).GetAwaiter().GetResult(); + } + + /// + /// Exports the template used for specified deployment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource scope. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ExportTemplateAtScopeAsync(this IDeploymentsOperations operations, string scope, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ExportTemplateAtScopeWithHttpMessagesAsync(scope, deploymentName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Get all the deployments at the given scope. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The resource scope. + /// + public static Microsoft.Rest.Azure.IPage ListAtScope(this IDeploymentsOperations operations, string scope, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery)) + { + return ((IDeploymentsOperations)operations).ListAtScopeAsync(scope, odataQuery).GetAwaiter().GetResult(); + } + + /// + /// Get all the deployments at the given scope. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The resource scope. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAtScopeAsync(this IDeploymentsOperations operations, string scope, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListAtScopeWithHttpMessagesAsync(scope, odataQuery, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// A template deployment that is currently running cannot be deleted. Deleting + /// a template deployment removes the associated deployment operations. This is + /// an asynchronous operation that returns a status of 202 until the template + /// deployment is successfully deleted. The Location response header contains + /// the URI that is used to obtain the status of the process. While the process + /// is running, a call to the URI in the Location header returns a status of + /// 202. When the process finishes, the URI in the Location header returns a + /// status of 204 on success. If the asynchronous request failed, the URI in + /// the Location header returns an error-level status code. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + public static void DeleteAtTenantScope(this IDeploymentsOperations operations, string deploymentName) + { + ((IDeploymentsOperations)operations).DeleteAtTenantScopeAsync(deploymentName).GetAwaiter().GetResult(); + } + + /// + /// A template deployment that is currently running cannot be deleted. Deleting + /// a template deployment removes the associated deployment operations. This is + /// an asynchronous operation that returns a status of 202 until the template + /// deployment is successfully deleted. The Location response header contains + /// the URI that is used to obtain the status of the process. While the process + /// is running, a call to the URI in the Location header returns a status of + /// 202. When the process finishes, the URI in the Location header returns a + /// status of 204 on success. If the asynchronous request failed, the URI in + /// the Location header returns an error-level status code. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAtTenantScopeAsync(this IDeploymentsOperations operations, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteAtTenantScopeWithHttpMessagesAsync(deploymentName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Checks whether the deployment exists. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + public static bool CheckExistenceAtTenantScope(this IDeploymentsOperations operations, string deploymentName) + { + return ((IDeploymentsOperations)operations).CheckExistenceAtTenantScopeAsync(deploymentName).GetAwaiter().GetResult(); + } + + /// + /// Checks whether the deployment exists. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CheckExistenceAtTenantScopeAsync(this IDeploymentsOperations operations, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CheckExistenceAtTenantScopeWithHttpMessagesAsync(deploymentName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// You can provide the template and parameters directly in the request or link + /// to JSON files. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + public static DeploymentExtended CreateOrUpdateAtTenantScope(this IDeploymentsOperations operations, string deploymentName, ScopedDeployment parameters) + { + return ((IDeploymentsOperations)operations).CreateOrUpdateAtTenantScopeAsync(deploymentName, parameters).GetAwaiter().GetResult(); + } + + /// + /// You can provide the template and parameters directly in the request or link + /// to JSON files. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateOrUpdateAtTenantScopeAsync(this IDeploymentsOperations operations, string deploymentName, ScopedDeployment parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateAtTenantScopeWithHttpMessagesAsync(deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets a deployment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + public static DeploymentExtended GetAtTenantScope(this IDeploymentsOperations operations, string deploymentName) + { + return ((IDeploymentsOperations)operations).GetAtTenantScopeAsync(deploymentName).GetAwaiter().GetResult(); + } + + /// + /// Gets a deployment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAtTenantScopeAsync(this IDeploymentsOperations operations, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetAtTenantScopeWithHttpMessagesAsync(deploymentName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// You can cancel a deployment only if the provisioningState is Accepted or + /// Running. After the deployment is canceled, the provisioningState is set to + /// Canceled. Canceling a template deployment stops the currently running + /// template deployment and leaves the resources partially deployed. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + public static void CancelAtTenantScope(this IDeploymentsOperations operations, string deploymentName) + { + ((IDeploymentsOperations)operations).CancelAtTenantScopeAsync(deploymentName).GetAwaiter().GetResult(); + } + + /// + /// You can cancel a deployment only if the provisioningState is Accepted or + /// Running. After the deployment is canceled, the provisioningState is set to + /// Canceled. Canceling a template deployment stops the currently running + /// template deployment and leaves the resources partially deployed. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CancelAtTenantScopeAsync(this IDeploymentsOperations operations, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.CancelAtTenantScopeWithHttpMessagesAsync(deploymentName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Validates whether the specified template is syntactically correct and will + /// be accepted by Azure Resource Manager.. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + public static DeploymentValidateResult ValidateAtTenantScope(this IDeploymentsOperations operations, string deploymentName, ScopedDeployment parameters) + { + return ((IDeploymentsOperations)operations).ValidateAtTenantScopeAsync(deploymentName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Validates whether the specified template is syntactically correct and will + /// be accepted by Azure Resource Manager.. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ValidateAtTenantScopeAsync(this IDeploymentsOperations operations, string deploymentName, ScopedDeployment parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ValidateAtTenantScopeWithHttpMessagesAsync(deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Returns changes that will be made by the deployment if executed at the + /// scope of the tenant group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + public static WhatIfOperationResult WhatIfAtTenantScope(this IDeploymentsOperations operations, string deploymentName, ScopedDeploymentWhatIf parameters) + { + return ((IDeploymentsOperations)operations).WhatIfAtTenantScopeAsync(deploymentName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Returns changes that will be made by the deployment if executed at the + /// scope of the tenant group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task WhatIfAtTenantScopeAsync(this IDeploymentsOperations operations, string deploymentName, ScopedDeploymentWhatIf parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.WhatIfAtTenantScopeWithHttpMessagesAsync(deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Exports the template used for specified deployment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + public static DeploymentExportResult ExportTemplateAtTenantScope(this IDeploymentsOperations operations, string deploymentName) + { + return ((IDeploymentsOperations)operations).ExportTemplateAtTenantScopeAsync(deploymentName).GetAwaiter().GetResult(); + } + + /// + /// Exports the template used for specified deployment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ExportTemplateAtTenantScopeAsync(this IDeploymentsOperations operations, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ExportTemplateAtTenantScopeWithHttpMessagesAsync(deploymentName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Get all the deployments at the tenant scope. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + public static Microsoft.Rest.Azure.IPage ListAtTenantScope(this IDeploymentsOperations operations, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery)) + { + return ((IDeploymentsOperations)operations).ListAtTenantScopeAsync(odataQuery).GetAwaiter().GetResult(); + } + + /// + /// Get all the deployments at the tenant scope. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAtTenantScopeAsync(this IDeploymentsOperations operations, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListAtTenantScopeWithHttpMessagesAsync(odataQuery, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// A template deployment that is currently running cannot be deleted. Deleting + /// a template deployment removes the associated deployment operations. This is + /// an asynchronous operation that returns a status of 202 until the template + /// deployment is successfully deleted. The Location response header contains + /// the URI that is used to obtain the status of the process. While the process + /// is running, a call to the URI in the Location header returns a status of + /// 202. When the process finishes, the URI in the Location header returns a + /// status of 204 on success. If the asynchronous request failed, the URI in + /// the Location header returns an error-level status code. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The management group ID. + /// + /// + /// The name of the deployment. + /// + public static void DeleteAtManagementGroupScope(this IDeploymentsOperations operations, string groupId, string deploymentName) + { + ((IDeploymentsOperations)operations).DeleteAtManagementGroupScopeAsync(groupId, deploymentName).GetAwaiter().GetResult(); + } + + /// + /// A template deployment that is currently running cannot be deleted. Deleting + /// a template deployment removes the associated deployment operations. This is + /// an asynchronous operation that returns a status of 202 until the template + /// deployment is successfully deleted. The Location response header contains + /// the URI that is used to obtain the status of the process. While the process + /// is running, a call to the URI in the Location header returns a status of + /// 202. When the process finishes, the URI in the Location header returns a + /// status of 204 on success. If the asynchronous request failed, the URI in + /// the Location header returns an error-level status code. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The management group ID. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAtManagementGroupScopeAsync(this IDeploymentsOperations operations, string groupId, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteAtManagementGroupScopeWithHttpMessagesAsync(groupId, deploymentName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Checks whether the deployment exists. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The management group ID. + /// + /// + /// The name of the deployment. + /// + public static bool CheckExistenceAtManagementGroupScope(this IDeploymentsOperations operations, string groupId, string deploymentName) + { + return ((IDeploymentsOperations)operations).CheckExistenceAtManagementGroupScopeAsync(groupId, deploymentName).GetAwaiter().GetResult(); + } + + /// + /// Checks whether the deployment exists. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The management group ID. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CheckExistenceAtManagementGroupScopeAsync(this IDeploymentsOperations operations, string groupId, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CheckExistenceAtManagementGroupScopeWithHttpMessagesAsync(groupId, deploymentName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// You can provide the template and parameters directly in the request or link + /// to JSON files. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The management group ID. + /// + /// + /// The name of the deployment. + /// + public static DeploymentExtended CreateOrUpdateAtManagementGroupScope(this IDeploymentsOperations operations, string groupId, string deploymentName, ScopedDeployment parameters) + { + return ((IDeploymentsOperations)operations).CreateOrUpdateAtManagementGroupScopeAsync(groupId, deploymentName, parameters).GetAwaiter().GetResult(); + } + + /// + /// You can provide the template and parameters directly in the request or link + /// to JSON files. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The management group ID. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateOrUpdateAtManagementGroupScopeAsync(this IDeploymentsOperations operations, string groupId, string deploymentName, ScopedDeployment parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateAtManagementGroupScopeWithHttpMessagesAsync(groupId, deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets a deployment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The management group ID. + /// + /// + /// The name of the deployment. + /// + public static DeploymentExtended GetAtManagementGroupScope(this IDeploymentsOperations operations, string groupId, string deploymentName) + { + return ((IDeploymentsOperations)operations).GetAtManagementGroupScopeAsync(groupId, deploymentName).GetAwaiter().GetResult(); + } + + /// + /// Gets a deployment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The management group ID. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAtManagementGroupScopeAsync(this IDeploymentsOperations operations, string groupId, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetAtManagementGroupScopeWithHttpMessagesAsync(groupId, deploymentName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// You can cancel a deployment only if the provisioningState is Accepted or + /// Running. After the deployment is canceled, the provisioningState is set to + /// Canceled. Canceling a template deployment stops the currently running + /// template deployment and leaves the resources partially deployed. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The management group ID. + /// + /// + /// The name of the deployment. + /// + public static void CancelAtManagementGroupScope(this IDeploymentsOperations operations, string groupId, string deploymentName) + { + ((IDeploymentsOperations)operations).CancelAtManagementGroupScopeAsync(groupId, deploymentName).GetAwaiter().GetResult(); + } + + /// + /// You can cancel a deployment only if the provisioningState is Accepted or + /// Running. After the deployment is canceled, the provisioningState is set to + /// Canceled. Canceling a template deployment stops the currently running + /// template deployment and leaves the resources partially deployed. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The management group ID. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CancelAtManagementGroupScopeAsync(this IDeploymentsOperations operations, string groupId, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.CancelAtManagementGroupScopeWithHttpMessagesAsync(groupId, deploymentName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Validates whether the specified template is syntactically correct and will + /// be accepted by Azure Resource Manager.. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The management group ID. + /// + /// + /// The name of the deployment. + /// + public static DeploymentValidateResult ValidateAtManagementGroupScope(this IDeploymentsOperations operations, string groupId, string deploymentName, ScopedDeployment parameters) + { + return ((IDeploymentsOperations)operations).ValidateAtManagementGroupScopeAsync(groupId, deploymentName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Validates whether the specified template is syntactically correct and will + /// be accepted by Azure Resource Manager.. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The management group ID. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ValidateAtManagementGroupScopeAsync(this IDeploymentsOperations operations, string groupId, string deploymentName, ScopedDeployment parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ValidateAtManagementGroupScopeWithHttpMessagesAsync(groupId, deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Returns changes that will be made by the deployment if executed at the + /// scope of the management group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The management group ID. + /// + /// + /// The name of the deployment. + /// + public static WhatIfOperationResult WhatIfAtManagementGroupScope(this IDeploymentsOperations operations, string groupId, string deploymentName, ScopedDeploymentWhatIf parameters) + { + return ((IDeploymentsOperations)operations).WhatIfAtManagementGroupScopeAsync(groupId, deploymentName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Returns changes that will be made by the deployment if executed at the + /// scope of the management group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The management group ID. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task WhatIfAtManagementGroupScopeAsync(this IDeploymentsOperations operations, string groupId, string deploymentName, ScopedDeploymentWhatIf parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.WhatIfAtManagementGroupScopeWithHttpMessagesAsync(groupId, deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Exports the template used for specified deployment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The management group ID. + /// + /// + /// The name of the deployment. + /// + public static DeploymentExportResult ExportTemplateAtManagementGroupScope(this IDeploymentsOperations operations, string groupId, string deploymentName) + { + return ((IDeploymentsOperations)operations).ExportTemplateAtManagementGroupScopeAsync(groupId, deploymentName).GetAwaiter().GetResult(); + } + + /// + /// Exports the template used for specified deployment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The management group ID. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ExportTemplateAtManagementGroupScopeAsync(this IDeploymentsOperations operations, string groupId, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ExportTemplateAtManagementGroupScopeWithHttpMessagesAsync(groupId, deploymentName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Get all the deployments for a management group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The management group ID. + /// + public static Microsoft.Rest.Azure.IPage ListAtManagementGroupScope(this IDeploymentsOperations operations, string groupId, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery)) + { + return ((IDeploymentsOperations)operations).ListAtManagementGroupScopeAsync(groupId, odataQuery).GetAwaiter().GetResult(); + } + + /// + /// Get all the deployments for a management group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The management group ID. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAtManagementGroupScopeAsync(this IDeploymentsOperations operations, string groupId, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListAtManagementGroupScopeWithHttpMessagesAsync(groupId, odataQuery, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// A template deployment that is currently running cannot be deleted. Deleting + /// a template deployment removes the associated deployment operations. This is + /// an asynchronous operation that returns a status of 202 until the template + /// deployment is successfully deleted. The Location response header contains + /// the URI that is used to obtain the status of the process. While the process + /// is running, a call to the URI in the Location header returns a status of + /// 202. When the process finishes, the URI in the Location header returns a + /// status of 204 on success. If the asynchronous request failed, the URI in + /// the Location header returns an error-level status code. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + public static void DeleteAtSubscriptionScope(this IDeploymentsOperations operations, string deploymentName) + { + ((IDeploymentsOperations)operations).DeleteAtSubscriptionScopeAsync(deploymentName).GetAwaiter().GetResult(); + } + + /// + /// A template deployment that is currently running cannot be deleted. Deleting + /// a template deployment removes the associated deployment operations. This is + /// an asynchronous operation that returns a status of 202 until the template + /// deployment is successfully deleted. The Location response header contains + /// the URI that is used to obtain the status of the process. While the process + /// is running, a call to the URI in the Location header returns a status of + /// 202. When the process finishes, the URI in the Location header returns a + /// status of 204 on success. If the asynchronous request failed, the URI in + /// the Location header returns an error-level status code. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAtSubscriptionScopeAsync(this IDeploymentsOperations operations, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteAtSubscriptionScopeWithHttpMessagesAsync(deploymentName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Checks whether the deployment exists. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + public static bool CheckExistenceAtSubscriptionScope(this IDeploymentsOperations operations, string deploymentName) + { + return ((IDeploymentsOperations)operations).CheckExistenceAtSubscriptionScopeAsync(deploymentName).GetAwaiter().GetResult(); + } + + /// + /// Checks whether the deployment exists. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CheckExistenceAtSubscriptionScopeAsync(this IDeploymentsOperations operations, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CheckExistenceAtSubscriptionScopeWithHttpMessagesAsync(deploymentName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// You can provide the template and parameters directly in the request or link + /// to JSON files. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + public static DeploymentExtended CreateOrUpdateAtSubscriptionScope(this IDeploymentsOperations operations, string deploymentName, Deployment parameters) + { + return ((IDeploymentsOperations)operations).CreateOrUpdateAtSubscriptionScopeAsync(deploymentName, parameters).GetAwaiter().GetResult(); + } + + /// + /// You can provide the template and parameters directly in the request or link + /// to JSON files. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateOrUpdateAtSubscriptionScopeAsync(this IDeploymentsOperations operations, string deploymentName, Deployment parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateAtSubscriptionScopeWithHttpMessagesAsync(deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets a deployment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + public static DeploymentExtended GetAtSubscriptionScope(this IDeploymentsOperations operations, string deploymentName) + { + return ((IDeploymentsOperations)operations).GetAtSubscriptionScopeAsync(deploymentName).GetAwaiter().GetResult(); + } + + /// + /// Gets a deployment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAtSubscriptionScopeAsync(this IDeploymentsOperations operations, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetAtSubscriptionScopeWithHttpMessagesAsync(deploymentName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// You can cancel a deployment only if the provisioningState is Accepted or + /// Running. After the deployment is canceled, the provisioningState is set to + /// Canceled. Canceling a template deployment stops the currently running + /// template deployment and leaves the resources partially deployed. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + public static void CancelAtSubscriptionScope(this IDeploymentsOperations operations, string deploymentName) + { + ((IDeploymentsOperations)operations).CancelAtSubscriptionScopeAsync(deploymentName).GetAwaiter().GetResult(); + } + + /// + /// You can cancel a deployment only if the provisioningState is Accepted or + /// Running. After the deployment is canceled, the provisioningState is set to + /// Canceled. Canceling a template deployment stops the currently running + /// template deployment and leaves the resources partially deployed. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CancelAtSubscriptionScopeAsync(this IDeploymentsOperations operations, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.CancelAtSubscriptionScopeWithHttpMessagesAsync(deploymentName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Validates whether the specified template is syntactically correct and will + /// be accepted by Azure Resource Manager.. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + public static DeploymentValidateResult ValidateAtSubscriptionScope(this IDeploymentsOperations operations, string deploymentName, Deployment parameters) + { + return ((IDeploymentsOperations)operations).ValidateAtSubscriptionScopeAsync(deploymentName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Validates whether the specified template is syntactically correct and will + /// be accepted by Azure Resource Manager.. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ValidateAtSubscriptionScopeAsync(this IDeploymentsOperations operations, string deploymentName, Deployment parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ValidateAtSubscriptionScopeWithHttpMessagesAsync(deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Returns changes that will be made by the deployment if executed at the + /// scope of the subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + public static WhatIfOperationResult WhatIfAtSubscriptionScope(this IDeploymentsOperations operations, string deploymentName, DeploymentWhatIf parameters) + { + return ((IDeploymentsOperations)operations).WhatIfAtSubscriptionScopeAsync(deploymentName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Returns changes that will be made by the deployment if executed at the + /// scope of the subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task WhatIfAtSubscriptionScopeAsync(this IDeploymentsOperations operations, string deploymentName, DeploymentWhatIf parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.WhatIfAtSubscriptionScopeWithHttpMessagesAsync(deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Exports the template used for specified deployment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + public static DeploymentExportResult ExportTemplateAtSubscriptionScope(this IDeploymentsOperations operations, string deploymentName) + { + return ((IDeploymentsOperations)operations).ExportTemplateAtSubscriptionScopeAsync(deploymentName).GetAwaiter().GetResult(); + } + + /// + /// Exports the template used for specified deployment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ExportTemplateAtSubscriptionScopeAsync(this IDeploymentsOperations operations, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ExportTemplateAtSubscriptionScopeWithHttpMessagesAsync(deploymentName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Get all the deployments for a subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + public static Microsoft.Rest.Azure.IPage ListAtSubscriptionScope(this IDeploymentsOperations operations, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery)) + { + return ((IDeploymentsOperations)operations).ListAtSubscriptionScopeAsync(odataQuery).GetAwaiter().GetResult(); + } + + /// + /// Get all the deployments for a subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAtSubscriptionScopeAsync(this IDeploymentsOperations operations, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListAtSubscriptionScopeWithHttpMessagesAsync(odataQuery, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// A template deployment that is currently running cannot be deleted. Deleting + /// a template deployment removes the associated deployment operations. + /// Deleting a template deployment does not affect the state of the resource + /// group. This is an asynchronous operation that returns a status of 202 until + /// the template deployment is successfully deleted. The Location response + /// header contains the URI that is used to obtain the status of the process. + /// While the process is running, a call to the URI in the Location header + /// returns a status of 202. When the process finishes, the URI in the Location + /// header returns a status of 204 on success. If the asynchronous request + /// failed, the URI in the Location header returns an error-level status code. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group with the deployment to delete. The name is + /// case insensitive. + /// + /// + /// The name of the deployment. + /// + public static void Delete(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName) + { + ((IDeploymentsOperations)operations).DeleteAsync(resourceGroupName, deploymentName).GetAwaiter().GetResult(); + } + + /// + /// A template deployment that is currently running cannot be deleted. Deleting + /// a template deployment removes the associated deployment operations. + /// Deleting a template deployment does not affect the state of the resource + /// group. This is an asynchronous operation that returns a status of 202 until + /// the template deployment is successfully deleted. The Location response + /// header contains the URI that is used to obtain the status of the process. + /// While the process is running, a call to the URI in the Location header + /// returns a status of 202. When the process finishes, the URI in the Location + /// header returns a status of 204 on success. If the asynchronous request + /// failed, the URI in the Location header returns an error-level status code. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group with the deployment to delete. The name is + /// case insensitive. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAsync(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, deploymentName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Checks whether the deployment exists. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group with the deployment to check. The name is + /// case insensitive. + /// + /// + /// The name of the deployment. + /// + public static bool CheckExistence(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName) + { + return ((IDeploymentsOperations)operations).CheckExistenceAsync(resourceGroupName, deploymentName).GetAwaiter().GetResult(); + } + + /// + /// Checks whether the deployment exists. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group with the deployment to check. The name is + /// case insensitive. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CheckExistenceAsync(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CheckExistenceWithHttpMessagesAsync(resourceGroupName, deploymentName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// You can provide the template and parameters directly in the request or link + /// to JSON files. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group to deploy the resources to. The name is case + /// insensitive. The resource group must already exist. + /// + /// + /// The name of the deployment. + /// + public static DeploymentExtended CreateOrUpdate(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName, Deployment parameters) + { + return ((IDeploymentsOperations)operations).CreateOrUpdateAsync(resourceGroupName, deploymentName, parameters).GetAwaiter().GetResult(); + } + + /// + /// You can provide the template and parameters directly in the request or link + /// to JSON files. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group to deploy the resources to. The name is case + /// insensitive. The resource group must already exist. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateOrUpdateAsync(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName, Deployment parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets a deployment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the deployment. + /// + public static DeploymentExtended Get(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName) + { + return ((IDeploymentsOperations)operations).GetAsync(resourceGroupName, deploymentName).GetAwaiter().GetResult(); + } + + /// + /// Gets a deployment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, deploymentName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// You can cancel a deployment only if the provisioningState is Accepted or + /// Running. After the deployment is canceled, the provisioningState is set to + /// Canceled. Canceling a template deployment stops the currently running + /// template deployment and leaves the resource group partially deployed. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the deployment. + /// + public static void Cancel(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName) + { + ((IDeploymentsOperations)operations).CancelAsync(resourceGroupName, deploymentName).GetAwaiter().GetResult(); + } + + /// + /// You can cancel a deployment only if the provisioningState is Accepted or + /// Running. After the deployment is canceled, the provisioningState is set to + /// Canceled. Canceling a template deployment stops the currently running + /// template deployment and leaves the resource group partially deployed. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CancelAsync(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.CancelWithHttpMessagesAsync(resourceGroupName, deploymentName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Validates whether the specified template is syntactically correct and will + /// be accepted by Azure Resource Manager.. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group the template will be deployed to. The name + /// is case insensitive. + /// + /// + /// The name of the deployment. + /// + public static DeploymentValidateResult Validate(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName, Deployment parameters) + { + return ((IDeploymentsOperations)operations).ValidateAsync(resourceGroupName, deploymentName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Validates whether the specified template is syntactically correct and will + /// be accepted by Azure Resource Manager.. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group the template will be deployed to. The name + /// is case insensitive. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ValidateAsync(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName, Deployment parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ValidateWithHttpMessagesAsync(resourceGroupName, deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Returns changes that will be made by the deployment if executed at the + /// scope of the resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group the template will be deployed to. The name + /// is case insensitive. + /// + /// + /// The name of the deployment. + /// + public static WhatIfOperationResult WhatIf(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName, DeploymentWhatIf parameters) + { + return ((IDeploymentsOperations)operations).WhatIfAsync(resourceGroupName, deploymentName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Returns changes that will be made by the deployment if executed at the + /// scope of the resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group the template will be deployed to. The name + /// is case insensitive. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task WhatIfAsync(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName, DeploymentWhatIf parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.WhatIfWithHttpMessagesAsync(resourceGroupName, deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Exports the template used for specified deployment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the deployment. + /// + public static DeploymentExportResult ExportTemplate(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName) + { + return ((IDeploymentsOperations)operations).ExportTemplateAsync(resourceGroupName, deploymentName).GetAwaiter().GetResult(); + } + + /// + /// Exports the template used for specified deployment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ExportTemplateAsync(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ExportTemplateWithHttpMessagesAsync(resourceGroupName, deploymentName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Get all the deployments for a resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The name of the resource group with the deployments to get. The name is + /// case insensitive. + /// + public static Microsoft.Rest.Azure.IPage ListByResourceGroup(this IDeploymentsOperations operations, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery)) + { + return ((IDeploymentsOperations)operations).ListByResourceGroupAsync(resourceGroupName, odataQuery).GetAwaiter().GetResult(); + } + + /// + /// Get all the deployments for a resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The name of the resource group with the deployments to get. The name is + /// case insensitive. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByResourceGroupAsync(this IDeploymentsOperations operations, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, odataQuery, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Calculate the hash of the given template. + /// + /// + /// The operations group for this extension method. + /// + public static TemplateHashResult CalculateTemplateHash(this IDeploymentsOperations operations, object template) + { + return ((IDeploymentsOperations)operations).CalculateTemplateHashAsync(template).GetAwaiter().GetResult(); + } + + /// + /// Calculate the hash of the given template. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CalculateTemplateHashAsync(this IDeploymentsOperations operations, object template, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CalculateTemplateHashWithHttpMessagesAsync(template, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// A template deployment that is currently running cannot be deleted. Deleting + /// a template deployment removes the associated deployment operations. This is + /// an asynchronous operation that returns a status of 202 until the template + /// deployment is successfully deleted. The Location response header contains + /// the URI that is used to obtain the status of the process. While the process + /// is running, a call to the URI in the Location header returns a status of + /// 202. When the process finishes, the URI in the Location header returns a + /// status of 204 on success. If the asynchronous request failed, the URI in + /// the Location header returns an error-level status code. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource scope. + /// + /// + /// The name of the deployment. + /// + public static void BeginDeleteAtScope(this IDeploymentsOperations operations, string scope, string deploymentName) + { + ((IDeploymentsOperations)operations).BeginDeleteAtScopeAsync(scope, deploymentName).GetAwaiter().GetResult(); + } + + /// + /// A template deployment that is currently running cannot be deleted. Deleting + /// a template deployment removes the associated deployment operations. This is + /// an asynchronous operation that returns a status of 202 until the template + /// deployment is successfully deleted. The Location response header contains + /// the URI that is used to obtain the status of the process. While the process + /// is running, a call to the URI in the Location header returns a status of + /// 202. When the process finishes, the URI in the Location header returns a + /// status of 204 on success. If the asynchronous request failed, the URI in + /// the Location header returns an error-level status code. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource scope. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginDeleteAtScopeAsync(this IDeploymentsOperations operations, string scope, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.BeginDeleteAtScopeWithHttpMessagesAsync(scope, deploymentName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// You can provide the template and parameters directly in the request or link + /// to JSON files. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource scope. + /// + /// + /// The name of the deployment. + /// + public static DeploymentExtended BeginCreateOrUpdateAtScope(this IDeploymentsOperations operations, string scope, string deploymentName, Deployment parameters) + { + return ((IDeploymentsOperations)operations).BeginCreateOrUpdateAtScopeAsync(scope, deploymentName, parameters).GetAwaiter().GetResult(); + } + + /// + /// You can provide the template and parameters directly in the request or link + /// to JSON files. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource scope. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginCreateOrUpdateAtScopeAsync(this IDeploymentsOperations operations, string scope, string deploymentName, Deployment parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginCreateOrUpdateAtScopeWithHttpMessagesAsync(scope, deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Validates whether the specified template is syntactically correct and will + /// be accepted by Azure Resource Manager.. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource scope. + /// + /// + /// The name of the deployment. + /// + public static DeploymentValidateResult BeginValidateAtScope(this IDeploymentsOperations operations, string scope, string deploymentName, Deployment parameters) + { + return ((IDeploymentsOperations)operations).BeginValidateAtScopeAsync(scope, deploymentName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Validates whether the specified template is syntactically correct and will + /// be accepted by Azure Resource Manager.. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource scope. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginValidateAtScopeAsync(this IDeploymentsOperations operations, string scope, string deploymentName, Deployment parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginValidateAtScopeWithHttpMessagesAsync(scope, deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// A template deployment that is currently running cannot be deleted. Deleting + /// a template deployment removes the associated deployment operations. This is + /// an asynchronous operation that returns a status of 202 until the template + /// deployment is successfully deleted. The Location response header contains + /// the URI that is used to obtain the status of the process. While the process + /// is running, a call to the URI in the Location header returns a status of + /// 202. When the process finishes, the URI in the Location header returns a + /// status of 204 on success. If the asynchronous request failed, the URI in + /// the Location header returns an error-level status code. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + public static void BeginDeleteAtTenantScope(this IDeploymentsOperations operations, string deploymentName) + { + ((IDeploymentsOperations)operations).BeginDeleteAtTenantScopeAsync(deploymentName).GetAwaiter().GetResult(); + } + + /// + /// A template deployment that is currently running cannot be deleted. Deleting + /// a template deployment removes the associated deployment operations. This is + /// an asynchronous operation that returns a status of 202 until the template + /// deployment is successfully deleted. The Location response header contains + /// the URI that is used to obtain the status of the process. While the process + /// is running, a call to the URI in the Location header returns a status of + /// 202. When the process finishes, the URI in the Location header returns a + /// status of 204 on success. If the asynchronous request failed, the URI in + /// the Location header returns an error-level status code. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginDeleteAtTenantScopeAsync(this IDeploymentsOperations operations, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.BeginDeleteAtTenantScopeWithHttpMessagesAsync(deploymentName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// You can provide the template and parameters directly in the request or link + /// to JSON files. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + public static DeploymentExtended BeginCreateOrUpdateAtTenantScope(this IDeploymentsOperations operations, string deploymentName, ScopedDeployment parameters) + { + return ((IDeploymentsOperations)operations).BeginCreateOrUpdateAtTenantScopeAsync(deploymentName, parameters).GetAwaiter().GetResult(); + } + + /// + /// You can provide the template and parameters directly in the request or link + /// to JSON files. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginCreateOrUpdateAtTenantScopeAsync(this IDeploymentsOperations operations, string deploymentName, ScopedDeployment parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginCreateOrUpdateAtTenantScopeWithHttpMessagesAsync(deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Validates whether the specified template is syntactically correct and will + /// be accepted by Azure Resource Manager.. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + public static DeploymentValidateResult BeginValidateAtTenantScope(this IDeploymentsOperations operations, string deploymentName, ScopedDeployment parameters) + { + return ((IDeploymentsOperations)operations).BeginValidateAtTenantScopeAsync(deploymentName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Validates whether the specified template is syntactically correct and will + /// be accepted by Azure Resource Manager.. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginValidateAtTenantScopeAsync(this IDeploymentsOperations operations, string deploymentName, ScopedDeployment parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginValidateAtTenantScopeWithHttpMessagesAsync(deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Returns changes that will be made by the deployment if executed at the + /// scope of the tenant group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + public static WhatIfOperationResult BeginWhatIfAtTenantScope(this IDeploymentsOperations operations, string deploymentName, ScopedDeploymentWhatIf parameters) + { + return ((IDeploymentsOperations)operations).BeginWhatIfAtTenantScopeAsync(deploymentName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Returns changes that will be made by the deployment if executed at the + /// scope of the tenant group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginWhatIfAtTenantScopeAsync(this IDeploymentsOperations operations, string deploymentName, ScopedDeploymentWhatIf parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginWhatIfAtTenantScopeWithHttpMessagesAsync(deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// A template deployment that is currently running cannot be deleted. Deleting + /// a template deployment removes the associated deployment operations. This is + /// an asynchronous operation that returns a status of 202 until the template + /// deployment is successfully deleted. The Location response header contains + /// the URI that is used to obtain the status of the process. While the process + /// is running, a call to the URI in the Location header returns a status of + /// 202. When the process finishes, the URI in the Location header returns a + /// status of 204 on success. If the asynchronous request failed, the URI in + /// the Location header returns an error-level status code. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The management group ID. + /// + /// + /// The name of the deployment. + /// + public static void BeginDeleteAtManagementGroupScope(this IDeploymentsOperations operations, string groupId, string deploymentName) + { + ((IDeploymentsOperations)operations).BeginDeleteAtManagementGroupScopeAsync(groupId, deploymentName).GetAwaiter().GetResult(); + } + + /// + /// A template deployment that is currently running cannot be deleted. Deleting + /// a template deployment removes the associated deployment operations. This is + /// an asynchronous operation that returns a status of 202 until the template + /// deployment is successfully deleted. The Location response header contains + /// the URI that is used to obtain the status of the process. While the process + /// is running, a call to the URI in the Location header returns a status of + /// 202. When the process finishes, the URI in the Location header returns a + /// status of 204 on success. If the asynchronous request failed, the URI in + /// the Location header returns an error-level status code. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The management group ID. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginDeleteAtManagementGroupScopeAsync(this IDeploymentsOperations operations, string groupId, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.BeginDeleteAtManagementGroupScopeWithHttpMessagesAsync(groupId, deploymentName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// You can provide the template and parameters directly in the request or link + /// to JSON files. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The management group ID. + /// + /// + /// The name of the deployment. + /// + public static DeploymentExtended BeginCreateOrUpdateAtManagementGroupScope(this IDeploymentsOperations operations, string groupId, string deploymentName, ScopedDeployment parameters) + { + return ((IDeploymentsOperations)operations).BeginCreateOrUpdateAtManagementGroupScopeAsync(groupId, deploymentName, parameters).GetAwaiter().GetResult(); + } + + /// + /// You can provide the template and parameters directly in the request or link + /// to JSON files. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The management group ID. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginCreateOrUpdateAtManagementGroupScopeAsync(this IDeploymentsOperations operations, string groupId, string deploymentName, ScopedDeployment parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginCreateOrUpdateAtManagementGroupScopeWithHttpMessagesAsync(groupId, deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Validates whether the specified template is syntactically correct and will + /// be accepted by Azure Resource Manager.. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The management group ID. + /// + /// + /// The name of the deployment. + /// + public static DeploymentValidateResult BeginValidateAtManagementGroupScope(this IDeploymentsOperations operations, string groupId, string deploymentName, ScopedDeployment parameters) + { + return ((IDeploymentsOperations)operations).BeginValidateAtManagementGroupScopeAsync(groupId, deploymentName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Validates whether the specified template is syntactically correct and will + /// be accepted by Azure Resource Manager.. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The management group ID. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginValidateAtManagementGroupScopeAsync(this IDeploymentsOperations operations, string groupId, string deploymentName, ScopedDeployment parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginValidateAtManagementGroupScopeWithHttpMessagesAsync(groupId, deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Returns changes that will be made by the deployment if executed at the + /// scope of the management group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The management group ID. + /// + /// + /// The name of the deployment. + /// + public static WhatIfOperationResult BeginWhatIfAtManagementGroupScope(this IDeploymentsOperations operations, string groupId, string deploymentName, ScopedDeploymentWhatIf parameters) + { + return ((IDeploymentsOperations)operations).BeginWhatIfAtManagementGroupScopeAsync(groupId, deploymentName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Returns changes that will be made by the deployment if executed at the + /// scope of the management group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The management group ID. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginWhatIfAtManagementGroupScopeAsync(this IDeploymentsOperations operations, string groupId, string deploymentName, ScopedDeploymentWhatIf parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginWhatIfAtManagementGroupScopeWithHttpMessagesAsync(groupId, deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// A template deployment that is currently running cannot be deleted. Deleting + /// a template deployment removes the associated deployment operations. This is + /// an asynchronous operation that returns a status of 202 until the template + /// deployment is successfully deleted. The Location response header contains + /// the URI that is used to obtain the status of the process. While the process + /// is running, a call to the URI in the Location header returns a status of + /// 202. When the process finishes, the URI in the Location header returns a + /// status of 204 on success. If the asynchronous request failed, the URI in + /// the Location header returns an error-level status code. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + public static void BeginDeleteAtSubscriptionScope(this IDeploymentsOperations operations, string deploymentName) + { + ((IDeploymentsOperations)operations).BeginDeleteAtSubscriptionScopeAsync(deploymentName).GetAwaiter().GetResult(); + } + + /// + /// A template deployment that is currently running cannot be deleted. Deleting + /// a template deployment removes the associated deployment operations. This is + /// an asynchronous operation that returns a status of 202 until the template + /// deployment is successfully deleted. The Location response header contains + /// the URI that is used to obtain the status of the process. While the process + /// is running, a call to the URI in the Location header returns a status of + /// 202. When the process finishes, the URI in the Location header returns a + /// status of 204 on success. If the asynchronous request failed, the URI in + /// the Location header returns an error-level status code. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginDeleteAtSubscriptionScopeAsync(this IDeploymentsOperations operations, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.BeginDeleteAtSubscriptionScopeWithHttpMessagesAsync(deploymentName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// You can provide the template and parameters directly in the request or link + /// to JSON files. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + public static DeploymentExtended BeginCreateOrUpdateAtSubscriptionScope(this IDeploymentsOperations operations, string deploymentName, Deployment parameters) + { + return ((IDeploymentsOperations)operations).BeginCreateOrUpdateAtSubscriptionScopeAsync(deploymentName, parameters).GetAwaiter().GetResult(); + } + + /// + /// You can provide the template and parameters directly in the request or link + /// to JSON files. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginCreateOrUpdateAtSubscriptionScopeAsync(this IDeploymentsOperations operations, string deploymentName, Deployment parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginCreateOrUpdateAtSubscriptionScopeWithHttpMessagesAsync(deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Validates whether the specified template is syntactically correct and will + /// be accepted by Azure Resource Manager.. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + public static DeploymentValidateResult BeginValidateAtSubscriptionScope(this IDeploymentsOperations operations, string deploymentName, Deployment parameters) + { + return ((IDeploymentsOperations)operations).BeginValidateAtSubscriptionScopeAsync(deploymentName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Validates whether the specified template is syntactically correct and will + /// be accepted by Azure Resource Manager.. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginValidateAtSubscriptionScopeAsync(this IDeploymentsOperations operations, string deploymentName, Deployment parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginValidateAtSubscriptionScopeWithHttpMessagesAsync(deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Returns changes that will be made by the deployment if executed at the + /// scope of the subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + public static WhatIfOperationResult BeginWhatIfAtSubscriptionScope(this IDeploymentsOperations operations, string deploymentName, DeploymentWhatIf parameters) + { + return ((IDeploymentsOperations)operations).BeginWhatIfAtSubscriptionScopeAsync(deploymentName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Returns changes that will be made by the deployment if executed at the + /// scope of the subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginWhatIfAtSubscriptionScopeAsync(this IDeploymentsOperations operations, string deploymentName, DeploymentWhatIf parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginWhatIfAtSubscriptionScopeWithHttpMessagesAsync(deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// A template deployment that is currently running cannot be deleted. Deleting + /// a template deployment removes the associated deployment operations. + /// Deleting a template deployment does not affect the state of the resource + /// group. This is an asynchronous operation that returns a status of 202 until + /// the template deployment is successfully deleted. The Location response + /// header contains the URI that is used to obtain the status of the process. + /// While the process is running, a call to the URI in the Location header + /// returns a status of 202. When the process finishes, the URI in the Location + /// header returns a status of 204 on success. If the asynchronous request + /// failed, the URI in the Location header returns an error-level status code. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group with the deployment to delete. The name is + /// case insensitive. + /// + /// + /// The name of the deployment. + /// + public static void BeginDelete(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName) + { + ((IDeploymentsOperations)operations).BeginDeleteAsync(resourceGroupName, deploymentName).GetAwaiter().GetResult(); + } + + /// + /// A template deployment that is currently running cannot be deleted. Deleting + /// a template deployment removes the associated deployment operations. + /// Deleting a template deployment does not affect the state of the resource + /// group. This is an asynchronous operation that returns a status of 202 until + /// the template deployment is successfully deleted. The Location response + /// header contains the URI that is used to obtain the status of the process. + /// While the process is running, a call to the URI in the Location header + /// returns a status of 202. When the process finishes, the URI in the Location + /// header returns a status of 204 on success. If the asynchronous request + /// failed, the URI in the Location header returns an error-level status code. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group with the deployment to delete. The name is + /// case insensitive. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginDeleteAsync(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, deploymentName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// You can provide the template and parameters directly in the request or link + /// to JSON files. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group to deploy the resources to. The name is case + /// insensitive. The resource group must already exist. + /// + /// + /// The name of the deployment. + /// + public static DeploymentExtended BeginCreateOrUpdate(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName, Deployment parameters) + { + return ((IDeploymentsOperations)operations).BeginCreateOrUpdateAsync(resourceGroupName, deploymentName, parameters).GetAwaiter().GetResult(); + } + + /// + /// You can provide the template and parameters directly in the request or link + /// to JSON files. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group to deploy the resources to. The name is case + /// insensitive. The resource group must already exist. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginCreateOrUpdateAsync(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName, Deployment parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Validates whether the specified template is syntactically correct and will + /// be accepted by Azure Resource Manager.. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group the template will be deployed to. The name + /// is case insensitive. + /// + /// + /// The name of the deployment. + /// + public static DeploymentValidateResult BeginValidate(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName, Deployment parameters) + { + return ((IDeploymentsOperations)operations).BeginValidateAsync(resourceGroupName, deploymentName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Validates whether the specified template is syntactically correct and will + /// be accepted by Azure Resource Manager.. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group the template will be deployed to. The name + /// is case insensitive. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginValidateAsync(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName, Deployment parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginValidateWithHttpMessagesAsync(resourceGroupName, deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Returns changes that will be made by the deployment if executed at the + /// scope of the resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group the template will be deployed to. The name + /// is case insensitive. + /// + /// + /// The name of the deployment. + /// + public static WhatIfOperationResult BeginWhatIf(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName, DeploymentWhatIf parameters) + { + return ((IDeploymentsOperations)operations).BeginWhatIfAsync(resourceGroupName, deploymentName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Returns changes that will be made by the deployment if executed at the + /// scope of the resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group the template will be deployed to. The name + /// is case insensitive. + /// + /// + /// The name of the deployment. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginWhatIfAsync(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName, DeploymentWhatIf parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginWhatIfWithHttpMessagesAsync(resourceGroupName, deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Get all the deployments at the given scope. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListAtScopeNext(this IDeploymentsOperations operations, string nextPageLink) + { + return ((IDeploymentsOperations)operations).ListAtScopeNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Get all the deployments at the given scope. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAtScopeNextAsync(this IDeploymentsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListAtScopeNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Get all the deployments at the tenant scope. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListAtTenantScopeNext(this IDeploymentsOperations operations, string nextPageLink) + { + return ((IDeploymentsOperations)operations).ListAtTenantScopeNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Get all the deployments at the tenant scope. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAtTenantScopeNextAsync(this IDeploymentsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListAtTenantScopeNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Get all the deployments for a management group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListAtManagementGroupScopeNext(this IDeploymentsOperations operations, string nextPageLink) + { + return ((IDeploymentsOperations)operations).ListAtManagementGroupScopeNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Get all the deployments for a management group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAtManagementGroupScopeNextAsync(this IDeploymentsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListAtManagementGroupScopeNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Get all the deployments for a subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListAtSubscriptionScopeNext(this IDeploymentsOperations operations, string nextPageLink) + { + return ((IDeploymentsOperations)operations).ListAtSubscriptionScopeNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Get all the deployments for a subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAtSubscriptionScopeNextAsync(this IDeploymentsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListAtSubscriptionScopeNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Get all the deployments for a resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListByResourceGroupNext(this IDeploymentsOperations operations, string nextPageLink) + { + return ((IDeploymentsOperations)operations).ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Get all the deployments for a resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByResourceGroupNextAsync(this IDeploymentsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } +} diff --git a/src/Resources/Resources.Sdk/Generated/FeatureClient.cs b/src/Resources/Resources.Management.Sdk/Generated/FeatureClient.cs similarity index 61% rename from src/Resources/Resources.Sdk/Generated/FeatureClient.cs rename to src/Resources/Resources.Management.Sdk/Generated/FeatureClient.cs index d23db2655340..e31c52c8f508 100644 --- a/src/Resources/Resources.Sdk/Generated/FeatureClient.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/FeatureClient.cs @@ -1,88 +1,77 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Serialization; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; - public partial class FeatureClient : ServiceClient, IFeatureClient, IAzureClient + /// + /// Azure Feature Exposure Control (AFEC) provides a mechanism for the resource + /// providers to control feature exposure to users. Resource providers + /// typically use this mechanism to provide public/private preview for new + /// features prior to making them generally available. Users need to explicitly + /// register for AFEC features to get access to such functionality. + /// + public partial class FeatureClient : Microsoft.Rest.ServiceClient, IFeatureClient, IAzureClient { /// /// The base URI of the service. /// public System.Uri BaseUri { get; set; } - /// /// Gets or sets json serialization settings. /// - public JsonSerializerSettings SerializationSettings { get; private set; } - + public Newtonsoft.Json.JsonSerializerSettings SerializationSettings { get; private set; } /// /// Gets or sets json deserialization settings. /// - public JsonSerializerSettings DeserializationSettings { get; private set; } - + public Newtonsoft.Json.JsonSerializerSettings DeserializationSettings { get; private set; } /// /// Credentials needed for the client to connect to Azure. /// - public ServiceClientCredentials Credentials { get; private set; } + public Microsoft.Rest.ServiceClientCredentials Credentials { get; private set; } /// - /// The Azure subscription ID. + /// The API version to use for this operation. /// - public string SubscriptionId { get; set; } + public string ApiVersion { get; private set; } /// - /// The API version to use for this operation. + /// The Azure subscription ID. /// - public string ApiVersion { get; private set; } + public string SubscriptionId { get; set;} /// /// The preferred language for the response. /// - public string AcceptLanguage { get; set; } + public string AcceptLanguage { get; set;} /// - /// The retry timeout in seconds for Long Running Operations. Default value is - /// 30. + /// The retry timeout in seconds for Long Running Operations. Default + /// /// value is 30. /// - public int? LongRunningOperationRetryTimeout { get; set; } + public int? LongRunningOperationRetryTimeout { get; set;} /// - /// Whether a unique x-ms-client-request-id should be generated. When set to - /// true a unique x-ms-client-request-id value is generated and included in - /// each request. Default is true. + /// Whether a unique x-ms-client-request-id should be generated. When + /// /// set to true a unique x-ms-client-request-id value is generated and + /// /// included in each request. Default is true. /// - public bool? GenerateClientRequestId { get; set; } + public bool? GenerateClientRequestId { get; set;} /// - /// Gets the IFeaturesOperations. + /// Gets the IFeaturesOperations /// public virtual IFeaturesOperations Features { get; private set; } - /// - /// Gets the ISubscriptionFeatureRegistrationsOperations. + /// Gets the ISubscriptionFeatureRegistrationsOperations /// public virtual ISubscriptionFeatureRegistrationsOperations SubscriptionFeatureRegistrations { get; private set; } - /// /// Initializes a new instance of the FeatureClient class. /// @@ -91,24 +80,22 @@ public partial class FeatureClient : ServiceClient, IFeatureClien /// /// /// True: will dispose the provided httpClient on calling FeatureClient.Dispose(). False: will not dispose provided httpClient - protected FeatureClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient) + protected FeatureClient(System.Net.Http.HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient) { - Initialize(); + this.Initialize(); } - /// /// Initializes a new instance of the FeatureClient class. /// /// /// Optional. The delegating handlers to add to the http client pipeline. /// - protected FeatureClient(params DelegatingHandler[] handlers) : base(handlers) + protected FeatureClient(params System.Net.Http.DelegatingHandler[] handlers) : base(handlers) { - Initialize(); + this.Initialize(); } - /// - /// Initializes a new instance of the FeatureClient class. + /// Initializes a new instance of the FeatureClient class. /// /// /// Optional. The http client handler used to handle http transport. @@ -116,11 +103,10 @@ protected FeatureClient(params DelegatingHandler[] handlers) : base(handlers) /// /// Optional. The delegating handlers to add to the http client pipeline. /// - protected FeatureClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers) + protected FeatureClient(System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : base(rootHandler, handlers) { - Initialize(); + this.Initialize(); } - /// /// Initializes a new instance of the FeatureClient class. /// @@ -133,15 +119,14 @@ protected FeatureClient(HttpClientHandler rootHandler, params DelegatingHandler[ /// /// Thrown when a required parameter is null /// - protected FeatureClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) + protected FeatureClient(System.Uri baseUri, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) { throw new System.ArgumentNullException("baseUri"); } - BaseUri = baseUri; + this.BaseUri = baseUri; } - /// /// Initializes a new instance of the FeatureClient class. /// @@ -157,15 +142,15 @@ protected FeatureClient(System.Uri baseUri, params DelegatingHandler[] handlers) /// /// Thrown when a required parameter is null /// - protected FeatureClient(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + protected FeatureClient(System.Uri baseUri, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) { throw new System.ArgumentNullException("baseUri"); } - BaseUri = baseUri; + + this.BaseUri = baseUri; } - /// /// Initializes a new instance of the FeatureClient class. /// @@ -178,23 +163,23 @@ protected FeatureClient(System.Uri baseUri, HttpClientHandler rootHandler, param /// /// Thrown when a required parameter is null /// - public FeatureClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + public FeatureClient(Microsoft.Rest.ServiceClientCredentials credentials, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) { if (credentials == null) { throw new System.ArgumentNullException("credentials"); } - Credentials = credentials; - if (Credentials != null) + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the FeatureClient class. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// @@ -205,23 +190,23 @@ public FeatureClient(ServiceClientCredentials credentials, params DelegatingHand /// /// Thrown when a required parameter is null /// - public FeatureClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient) + public FeatureClient(Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient) { if (credentials == null) { throw new System.ArgumentNullException("credentials"); } - Credentials = credentials; - if (Credentials != null) + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the FeatureClient class. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// @@ -233,26 +218,26 @@ public FeatureClient(ServiceClientCredentials credentials, HttpClient httpClient /// /// Thrown when a required parameter is null /// - public FeatureClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + public FeatureClient(Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (credentials == null) { throw new System.ArgumentNullException("credentials"); } - Credentials = credentials; - if (Credentials != null) + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the FeatureClient class. /// /// /// Optional. The base URI of the service. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// @@ -261,7 +246,7 @@ public FeatureClient(ServiceClientCredentials credentials, HttpClientHandler roo /// /// Thrown when a required parameter is null /// - public FeatureClient(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + public FeatureClient(System.Uri baseUri, Microsoft.Rest.ServiceClientCredentials credentials, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) { @@ -271,33 +256,30 @@ public FeatureClient(System.Uri baseUri, ServiceClientCredentials credentials, p { throw new System.ArgumentNullException("credentials"); } - BaseUri = baseUri; - Credentials = credentials; - if (Credentials != null) + this.BaseUri = baseUri; + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the FeatureClient class. /// /// /// Optional. The base URI of the service. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// /// Optional. The http client handler used to handle http transport. /// - /// - /// Optional. The delegating handlers to add to the http client pipeline. - /// /// /// Thrown when a required parameter is null /// - public FeatureClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + public FeatureClient(System.Uri baseUri, Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) { @@ -307,57 +289,58 @@ public FeatureClient(System.Uri baseUri, ServiceClientCredentials credentials, H { throw new System.ArgumentNullException("credentials"); } - BaseUri = baseUri; - Credentials = credentials; - if (Credentials != null) + this.BaseUri = baseUri; + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// An optional partial-method to perform custom initialization. /// partial void CustomInitialize(); + /// /// Initializes client properties. /// private void Initialize() { - Features = new FeaturesOperations(this); - SubscriptionFeatureRegistrations = new SubscriptionFeatureRegistrationsOperations(this); - BaseUri = new System.Uri("https://management.azure.com"); - ApiVersion = "2021-07-01"; - AcceptLanguage = "en-US"; - LongRunningOperationRetryTimeout = 30; - GenerateClientRequestId = true; - SerializationSettings = new JsonSerializerSettings + this.Features = new FeaturesOperations(this); + this.SubscriptionFeatureRegistrations = new SubscriptionFeatureRegistrationsOperations(this); + this.BaseUri = new System.Uri("https://management.azure.com"); + this.ApiVersion = "2021-07-01"; + this.AcceptLanguage = "en-US"; + this.LongRunningOperationRetryTimeout = 30; + this.GenerateClientRequestId = true; + SerializationSettings = new Newtonsoft.Json.JsonSerializerSettings { Formatting = Newtonsoft.Json.Formatting.Indented, DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, - ContractResolver = new ReadOnlyJsonContractResolver(), - Converters = new List + ContractResolver = new Microsoft.Rest.Serialization.ReadOnlyJsonContractResolver(), + Converters = new System.Collections.Generic.List { - new Iso8601TimeSpanConverter() + new Microsoft.Rest.Serialization.Iso8601TimeSpanConverter() } }; - DeserializationSettings = new JsonSerializerSettings + DeserializationSettings = new Newtonsoft.Json.JsonSerializerSettings { DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, - ContractResolver = new ReadOnlyJsonContractResolver(), - Converters = new List + ContractResolver = new Microsoft.Rest.Serialization.ReadOnlyJsonContractResolver(), + Converters = new System.Collections.Generic.List { - new Iso8601TimeSpanConverter() + new Microsoft.Rest.Serialization.Iso8601TimeSpanConverter() } }; CustomInitialize(); - DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Azure.CloudErrorJsonConverter()); } /// /// Lists all of the available Microsoft.Features REST API operations. @@ -368,13 +351,13 @@ private void Initialize() /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -383,54 +366,62 @@ private void Initialize() /// /// A response object containing the response body and response headers. /// - public async Task>> ListOperationsWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListOperationsWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (ApiVersion == null) + + + + + if (this.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListOperations", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListOperations", tracingParameters); } // Construct URL - var _baseUrl = BaseUri.AbsoluteUri; + + var _baseUrl = this.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Features/operations").ToString(); - List _queryParameters = new List(); - if (ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (GenerateClientRequestId != null && GenerateClientRequestId.Value) + if (this.GenerateClientRequestId != null && this.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (AcceptLanguage != null) + if (this.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -442,50 +433,51 @@ private void Initialize() _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Credentials != null) + if (this.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorResponse _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -495,9 +487,10 @@ private void Initialize() throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -508,25 +501,29 @@ private void Initialize() _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = SafeJsonConvert.DeserializeObject>(_responseContent, DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Lists all of the available Microsoft.Features REST API operations. /// @@ -539,13 +536,13 @@ private void Initialize() /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -554,51 +551,54 @@ private void Initialize() /// /// A response object containing the response body and response headers. /// - public async Task>> ListOperationsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListOperationsNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListOperationsNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListOperationsNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (GenerateClientRequestId != null && GenerateClientRequestId.Value) + if (this.GenerateClientRequestId != null && this.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (AcceptLanguage != null) + if (this.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -610,50 +610,51 @@ private void Initialize() _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Credentials != null) + if (this.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorResponse _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -663,9 +664,10 @@ private void Initialize() throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -676,24 +678,28 @@ private void Initialize() _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = SafeJsonConvert.DeserializeObject>(_responseContent, DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/FeatureClientExtensions.cs b/src/Resources/Resources.Management.Sdk/Generated/FeatureClientExtensions.cs new file mode 100644 index 000000000000..e5fc6220314d --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/FeatureClientExtensions.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +namespace Microsoft.Azure.Management.Resources +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// Extension methods for FeatureClient + /// + public static partial class FeatureClientExtensions + { + /// + /// Lists all of the available Microsoft.Features REST API operations. + /// + /// + /// The operations group for this extension method. + /// + public static Microsoft.Rest.Azure.IPage ListOperations(this IFeatureClient operations) + { + return ((IFeatureClient)operations).ListOperationsAsync().GetAwaiter().GetResult(); + } + + /// + /// Lists all of the available Microsoft.Features REST API operations. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListOperationsAsync(this IFeatureClient operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListOperationsWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Lists all of the available Microsoft.Features REST API operations. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListOperationsNext(this IFeatureClient operations, string nextPageLink) + { + return ((IFeatureClient)operations).ListOperationsNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists all of the available Microsoft.Features REST API operations. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListOperationsNextAsync(this IFeatureClient operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListOperationsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } +} diff --git a/src/Resources/Resources.Sdk/Generated/FeaturesOperations.cs b/src/Resources/Resources.Management.Sdk/Generated/FeaturesOperations.cs similarity index 58% rename from src/Resources/Resources.Sdk/Generated/FeaturesOperations.cs rename to src/Resources/Resources.Management.Sdk/Generated/FeaturesOperations.cs index a274081f0e00..0bcff253b2fb 100644 --- a/src/Resources/Resources.Sdk/Generated/FeaturesOperations.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/FeaturesOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// FeaturesOperations operations. /// - internal partial class FeaturesOperations : IServiceOperations, IFeaturesOperations + internal partial class FeaturesOperations : Microsoft.Rest.IServiceOperations, IFeaturesOperations { /// /// Initializes a new instance of the FeaturesOperations class. @@ -36,13 +24,13 @@ internal partial class FeaturesOperations : IServiceOperations, I /// /// Thrown when a required parameter is null /// - internal FeaturesOperations(FeatureClient client) + internal FeaturesOperations (FeatureClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -60,13 +48,13 @@ internal FeaturesOperations(FeatureClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -75,59 +63,68 @@ internal FeaturesOperations(FeatureClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListAllWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListAllWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListAll", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListAll", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Features/features").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -139,50 +136,51 @@ internal FeaturesOperations(FeatureClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -192,9 +190,10 @@ internal FeaturesOperations(FeatureClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -205,25 +204,29 @@ internal FeaturesOperations(FeatureClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets all the preview features in a provider namespace that are available /// through AFEC for the subscription. @@ -237,13 +240,13 @@ internal FeaturesOperations(FeatureClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -252,65 +255,75 @@ internal FeaturesOperations(FeatureClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(string resourceProviderNamespace, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceProviderNamespace, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (resourceProviderNamespace == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceProviderNamespace"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceProviderNamespace"); } - if (Client.ApiVersion == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceProviderNamespace", resourceProviderNamespace); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Features/providers/{resourceProviderNamespace}/features").ToString(); _url = _url.Replace("{resourceProviderNamespace}", System.Uri.EscapeDataString(resourceProviderNamespace)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -322,50 +335,51 @@ internal FeaturesOperations(FeatureClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -375,9 +389,10 @@ internal FeaturesOperations(FeatureClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -388,25 +403,29 @@ internal FeaturesOperations(FeatureClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets the preview feature with the specified name. /// @@ -422,13 +441,13 @@ internal FeaturesOperations(FeatureClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -437,71 +456,82 @@ internal FeaturesOperations(FeatureClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string resourceProviderNamespace, string featureName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceProviderNamespace, string featureName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (resourceProviderNamespace == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceProviderNamespace"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceProviderNamespace"); } + if (featureName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "featureName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "featureName"); } - if (Client.ApiVersion == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceProviderNamespace", resourceProviderNamespace); tracingParameters.Add("featureName", featureName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Features/providers/{resourceProviderNamespace}/features/{featureName}").ToString(); _url = _url.Replace("{resourceProviderNamespace}", System.Uri.EscapeDataString(resourceProviderNamespace)); _url = _url.Replace("{featureName}", System.Uri.EscapeDataString(featureName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -513,50 +543,51 @@ internal FeaturesOperations(FeatureClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -566,9 +597,10 @@ internal FeaturesOperations(FeatureClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -579,25 +611,29 @@ internal FeaturesOperations(FeatureClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Registers the preview feature for the subscription. /// @@ -613,13 +649,13 @@ internal FeaturesOperations(FeatureClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -628,71 +664,82 @@ internal FeaturesOperations(FeatureClient client) /// /// A response object containing the response body and response headers. /// - public async Task> RegisterWithHttpMessagesAsync(string resourceProviderNamespace, string featureName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> RegisterWithHttpMessagesAsync(string resourceProviderNamespace, string featureName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (resourceProviderNamespace == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceProviderNamespace"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceProviderNamespace"); } + if (featureName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "featureName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "featureName"); } - if (Client.ApiVersion == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceProviderNamespace", resourceProviderNamespace); tracingParameters.Add("featureName", featureName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Register", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Register", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Features/providers/{resourceProviderNamespace}/features/{featureName}/register").ToString(); _url = _url.Replace("{resourceProviderNamespace}", System.Uri.EscapeDataString(resourceProviderNamespace)); _url = _url.Replace("{featureName}", System.Uri.EscapeDataString(featureName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -704,50 +751,51 @@ internal FeaturesOperations(FeatureClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -757,9 +805,10 @@ internal FeaturesOperations(FeatureClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -770,25 +819,29 @@ internal FeaturesOperations(FeatureClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Unregisters the preview feature for the subscription. /// @@ -804,13 +857,13 @@ internal FeaturesOperations(FeatureClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -819,71 +872,82 @@ internal FeaturesOperations(FeatureClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UnregisterWithHttpMessagesAsync(string resourceProviderNamespace, string featureName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> UnregisterWithHttpMessagesAsync(string resourceProviderNamespace, string featureName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (resourceProviderNamespace == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceProviderNamespace"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceProviderNamespace"); } + if (featureName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "featureName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "featureName"); } - if (Client.ApiVersion == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceProviderNamespace", resourceProviderNamespace); tracingParameters.Add("featureName", featureName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Unregister", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Unregister", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Features/providers/{resourceProviderNamespace}/features/{featureName}/unregister").ToString(); _url = _url.Replace("{resourceProviderNamespace}", System.Uri.EscapeDataString(resourceProviderNamespace)); _url = _url.Replace("{featureName}", System.Uri.EscapeDataString(featureName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -895,50 +959,51 @@ internal FeaturesOperations(FeatureClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -948,9 +1013,10 @@ internal FeaturesOperations(FeatureClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -961,25 +1027,29 @@ internal FeaturesOperations(FeatureClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets all the preview features that are available through AFEC for the /// subscription. @@ -993,13 +1063,13 @@ internal FeaturesOperations(FeatureClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1008,51 +1078,54 @@ internal FeaturesOperations(FeatureClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListAllNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListAllNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListAllNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListAllNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1064,50 +1137,51 @@ internal FeaturesOperations(FeatureClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1117,9 +1191,10 @@ internal FeaturesOperations(FeatureClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -1130,25 +1205,29 @@ internal FeaturesOperations(FeatureClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets all the preview features in a provider namespace that are available /// through AFEC for the subscription. @@ -1162,13 +1241,13 @@ internal FeaturesOperations(FeatureClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1177,51 +1256,54 @@ internal FeaturesOperations(FeatureClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1233,50 +1315,51 @@ internal FeaturesOperations(FeatureClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1286,9 +1369,10 @@ internal FeaturesOperations(FeatureClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -1299,24 +1383,28 @@ internal FeaturesOperations(FeatureClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/FeaturesOperationsExtensions.cs b/src/Resources/Resources.Management.Sdk/Generated/FeaturesOperationsExtensions.cs new file mode 100644 index 000000000000..4e5a705e7121 --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/FeaturesOperationsExtensions.cs @@ -0,0 +1,267 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +namespace Microsoft.Azure.Management.Resources +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// Extension methods for FeaturesOperations + /// + public static partial class FeaturesOperationsExtensions + { + /// + /// Gets all the preview features that are available through AFEC for the + /// subscription. + /// + /// + /// The operations group for this extension method. + /// + public static Microsoft.Rest.Azure.IPage ListAll(this IFeaturesOperations operations) + { + return ((IFeaturesOperations)operations).ListAllAsync().GetAwaiter().GetResult(); + } + + /// + /// Gets all the preview features that are available through AFEC for the + /// subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAllAsync(this IFeaturesOperations operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListAllWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets all the preview features in a provider namespace that are available + /// through AFEC for the subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The namespace of the resource provider for getting features. + /// + public static Microsoft.Rest.Azure.IPage List(this IFeaturesOperations operations, string resourceProviderNamespace) + { + return ((IFeaturesOperations)operations).ListAsync(resourceProviderNamespace).GetAwaiter().GetResult(); + } + + /// + /// Gets all the preview features in a provider namespace that are available + /// through AFEC for the subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The namespace of the resource provider for getting features. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IFeaturesOperations operations, string resourceProviderNamespace, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceProviderNamespace, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets the preview feature with the specified name. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource provider namespace for the feature. + /// + /// + /// The name of the feature to get. + /// + public static FeatureResult Get(this IFeaturesOperations operations, string resourceProviderNamespace, string featureName) + { + return ((IFeaturesOperations)operations).GetAsync(resourceProviderNamespace, featureName).GetAwaiter().GetResult(); + } + + /// + /// Gets the preview feature with the specified name. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource provider namespace for the feature. + /// + /// + /// The name of the feature to get. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IFeaturesOperations operations, string resourceProviderNamespace, string featureName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceProviderNamespace, featureName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Registers the preview feature for the subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The namespace of the resource provider. + /// + /// + /// The name of the feature to register. + /// + public static FeatureResult Register(this IFeaturesOperations operations, string resourceProviderNamespace, string featureName) + { + return ((IFeaturesOperations)operations).RegisterAsync(resourceProviderNamespace, featureName).GetAwaiter().GetResult(); + } + + /// + /// Registers the preview feature for the subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The namespace of the resource provider. + /// + /// + /// The name of the feature to register. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task RegisterAsync(this IFeaturesOperations operations, string resourceProviderNamespace, string featureName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.RegisterWithHttpMessagesAsync(resourceProviderNamespace, featureName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Unregisters the preview feature for the subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The namespace of the resource provider. + /// + /// + /// The name of the feature to unregister. + /// + public static FeatureResult Unregister(this IFeaturesOperations operations, string resourceProviderNamespace, string featureName) + { + return ((IFeaturesOperations)operations).UnregisterAsync(resourceProviderNamespace, featureName).GetAwaiter().GetResult(); + } + + /// + /// Unregisters the preview feature for the subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The namespace of the resource provider. + /// + /// + /// The name of the feature to unregister. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task UnregisterAsync(this IFeaturesOperations operations, string resourceProviderNamespace, string featureName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.UnregisterWithHttpMessagesAsync(resourceProviderNamespace, featureName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets all the preview features that are available through AFEC for the + /// subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListAllNext(this IFeaturesOperations operations, string nextPageLink) + { + return ((IFeaturesOperations)operations).ListAllNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets all the preview features that are available through AFEC for the + /// subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAllNextAsync(this IFeaturesOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListAllNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets all the preview features in a provider namespace that are available + /// through AFEC for the subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IFeaturesOperations operations, string nextPageLink) + { + return ((IFeaturesOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets all the preview features in a provider namespace that are available + /// through AFEC for the subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IFeaturesOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } +} diff --git a/src/Resources/Resources.Sdk/Generated/IDeploymentOperations.cs b/src/Resources/Resources.Management.Sdk/Generated/IDeploymentOperations.cs similarity index 63% rename from src/Resources/Resources.Sdk/Generated/IDeploymentOperations.cs rename to src/Resources/Resources.Management.Sdk/Generated/IDeploymentOperations.cs index b57fc7117f08..5b67548dc2bc 100644 --- a/src/Resources/Resources.Sdk/Generated/IDeploymentOperations.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/IDeploymentOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// DeploymentOperations operations. @@ -26,6 +16,9 @@ public partial interface IDeploymentOperations /// /// Gets a deployments operation. /// + /// + /// Gets a deployments operation. + /// /// /// The resource scope. /// @@ -47,13 +40,14 @@ public partial interface IDeploymentOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetAtScopeWithHttpMessagesAsync(string scope, string deploymentName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetAtScopeWithHttpMessagesAsync(string scope, string deploymentName, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets all deployments operations for a deployment. /// + /// + /// Gets all deployments operations for a deployment. + /// /// /// The resource scope. /// @@ -75,13 +69,14 @@ public partial interface IDeploymentOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListAtScopeWithHttpMessagesAsync(string scope, string deploymentName, int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListAtScopeWithHttpMessagesAsync(string scope, string deploymentName, int? top = default(int?), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets a deployments operation. /// + /// + /// Gets a deployments operation. + /// /// /// The name of the deployment. /// @@ -100,13 +95,14 @@ public partial interface IDeploymentOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetAtTenantScopeWithHttpMessagesAsync(string deploymentName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetAtTenantScopeWithHttpMessagesAsync(string deploymentName, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets all deployments operations for a deployment. /// + /// + /// Gets all deployments operations for a deployment. + /// /// /// The name of the deployment. /// @@ -125,13 +121,14 @@ public partial interface IDeploymentOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListAtTenantScopeWithHttpMessagesAsync(string deploymentName, int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListAtTenantScopeWithHttpMessagesAsync(string deploymentName, int? top = default(int?), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets a deployments operation. /// + /// + /// Gets a deployments operation. + /// /// /// The management group ID. /// @@ -153,13 +150,14 @@ public partial interface IDeploymentOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets all deployments operations for a deployment. /// + /// + /// Gets all deployments operations for a deployment. + /// /// /// The management group ID. /// @@ -181,13 +179,14 @@ public partial interface IDeploymentOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, int? top = default(int?), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets a deployments operation. /// + /// + /// Gets a deployments operation. + /// /// /// The name of the deployment. /// @@ -206,13 +205,14 @@ public partial interface IDeploymentOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets all deployments operations for a deployment. /// + /// + /// Gets all deployments operations for a deployment. + /// /// /// The name of the deployment. /// @@ -231,13 +231,14 @@ public partial interface IDeploymentOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, int? top = default(int?), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets a deployments operation. /// + /// + /// Gets a deployments operation. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -259,13 +260,14 @@ public partial interface IDeploymentOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string resourceGroupName, string deploymentName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string deploymentName, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets all deployments operations for a deployment. /// + /// + /// Gets all deployments operations for a deployment. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -287,13 +289,14 @@ public partial interface IDeploymentOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(string resourceGroupName, string deploymentName, int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string deploymentName, int? top = default(int?), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets all deployments operations for a deployment. /// + /// + /// Gets all deployments operations for a deployment. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -309,13 +312,14 @@ public partial interface IDeploymentOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListAtScopeNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListAtScopeNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets all deployments operations for a deployment. /// + /// + /// Gets all deployments operations for a deployment. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -331,13 +335,14 @@ public partial interface IDeploymentOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListAtTenantScopeNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListAtTenantScopeNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets all deployments operations for a deployment. /// + /// + /// Gets all deployments operations for a deployment. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -353,13 +358,14 @@ public partial interface IDeploymentOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListAtManagementGroupScopeNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListAtManagementGroupScopeNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets all deployments operations for a deployment. /// + /// + /// Gets all deployments operations for a deployment. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -375,13 +381,14 @@ public partial interface IDeploymentOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListAtSubscriptionScopeNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListAtSubscriptionScopeNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets all deployments operations for a deployment. /// + /// + /// Gets all deployments operations for a deployment. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -397,9 +404,7 @@ public partial interface IDeploymentOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/IDeploymentScriptsClient.cs b/src/Resources/Resources.Management.Sdk/Generated/IDeploymentScriptsClient.cs similarity index 62% rename from src/Resources/Resources.Sdk/Generated/IDeploymentScriptsClient.cs rename to src/Resources/Resources.Management.Sdk/Generated/IDeploymentScriptsClient.cs index fa5018b8251c..35b6a24c3b51 100644 --- a/src/Resources/Resources.Sdk/Generated/IDeploymentScriptsClient.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/IDeploymentScriptsClient.cs @@ -1,25 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; /// /// The APIs listed in this specification can be used to manage Deployment - /// Scripts resource through the Azure Resource Manager. + /// Scripts resource through the Azure Resource Manager. /// - public partial interface IDeploymentScriptsClient : System.IDisposable + public partial interface IDeploymentScriptsClient : System.IDisposable { /// /// The base URI of the service. @@ -29,51 +23,56 @@ public partial interface IDeploymentScriptsClient : System.IDisposable /// /// Gets or sets json serialization settings. /// - JsonSerializerSettings SerializationSettings { get; } + Newtonsoft.Json.JsonSerializerSettings SerializationSettings { get; } /// /// Gets or sets json deserialization settings. /// - JsonSerializerSettings DeserializationSettings { get; } + Newtonsoft.Json.JsonSerializerSettings DeserializationSettings { get; } /// /// Credentials needed for the client to connect to Azure. /// - ServiceClientCredentials Credentials { get; } + Microsoft.Rest.ServiceClientCredentials Credentials { get;} + /// - /// Subscription Id which forms part of the URI for every service call. + /// The API version to use for this operation. /// - string SubscriptionId { get; set; } + string ApiVersion { get;} + /// - /// Client Api version. + /// Subscription Id which forms part of the URI for every service call. /// - string ApiVersion { get; } + string SubscriptionId { get; set;} + /// /// The preferred language for the response. /// - string AcceptLanguage { get; set; } + string AcceptLanguage { get; set;} + /// /// The retry timeout in seconds for Long Running Operations. Default - /// value is 30. + /// /// value is 30. /// - int? LongRunningOperationRetryTimeout { get; set; } + int? LongRunningOperationRetryTimeout { get; set;} + /// /// Whether a unique x-ms-client-request-id should be generated. When - /// set to true a unique x-ms-client-request-id value is generated and - /// included in each request. Default is true. + /// /// set to true a unique x-ms-client-request-id value is generated and + /// /// included in each request. Default is true. /// - bool? GenerateClientRequestId { get; set; } + bool? GenerateClientRequestId { get; set;} /// - /// Gets the IDeploymentScriptsOperations. + /// Gets the IDeploymentScriptsOperations /// IDeploymentScriptsOperations DeploymentScripts { get; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/IDeploymentScriptsOperations.cs b/src/Resources/Resources.Management.Sdk/Generated/IDeploymentScriptsOperations.cs similarity index 58% rename from src/Resources/Resources.Sdk/Generated/IDeploymentScriptsOperations.cs rename to src/Resources/Resources.Management.Sdk/Generated/IDeploymentScriptsOperations.cs index 085a45701cae..9e9d5ba182d6 100644 --- a/src/Resources/Resources.Sdk/Generated/IDeploymentScriptsOperations.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/IDeploymentScriptsOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// DeploymentScriptsOperations operations. @@ -26,6 +16,9 @@ public partial interface IDeploymentScriptsOperations /// /// Creates a deployment script. /// + /// + /// Creates a deployment script. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -41,19 +34,20 @@ public partial interface IDeploymentScriptsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateWithHttpMessagesAsync(string resourceGroupName, string scriptName, DeploymentScript deploymentScript, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string resourceGroupName, string scriptName, DeploymentScript deploymentScript, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Updates deployment script tags with specified values. /// + /// + /// Updates deployment script tags with specified values. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -69,19 +63,20 @@ public partial interface IDeploymentScriptsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string scriptName, DeploymentScriptUpdateParameter deploymentScript = default(DeploymentScriptUpdateParameter), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string scriptName, DeploymentScriptUpdateParameter deploymentScript = default(DeploymentScriptUpdateParameter), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets a deployment script with a given name. /// + /// + /// Gets a deployment script with a given name. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -94,20 +89,22 @@ public partial interface IDeploymentScriptsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string resourceGroupName, string scriptName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string scriptName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Deletes a deployment script. When operation completes, status code - /// 200 returned without content. + /// Deletes a deployment script. When operation completes, status code 200 + /// returned without content. /// + /// + /// Deletes a deployment script. When operation completes, status code 200 + /// returned without content. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -120,35 +117,37 @@ public partial interface IDeploymentScriptsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteWithHttpMessagesAsync(string resourceGroupName, string scriptName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string scriptName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Lists all deployment scripts for a given subscription. /// + /// + /// Lists all deployment scripts for a given subscription. + /// /// /// The headers that will be added to request. /// /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListBySubscriptionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListBySubscriptionWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets deployment script logs for a given deployment script name. /// + /// + /// Gets deployment script logs for a given deployment script name. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -161,19 +160,20 @@ public partial interface IDeploymentScriptsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetLogsWithHttpMessagesAsync(string resourceGroupName, string scriptName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetLogsWithHttpMessagesAsync(string resourceGroupName, string scriptName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets deployment script logs for a given deployment script name. /// + /// + /// Gets deployment script logs for a given deployment script name. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -181,10 +181,9 @@ public partial interface IDeploymentScriptsOperations /// Name of the deployment script. /// /// - /// The number of lines to show from the tail of the deployment script - /// log. Valid value is a positive number up to 1000. If 'tail' is not - /// provided, all available logs are shown up to container instance log - /// capacity of 4mb. + /// The number of lines to show from the tail of the deployment script log. + /// Valid value is a positive number up to 1000. If 'tail' is not provided, all + /// available logs are shown up to container instance log capacity of 4mb. /// /// /// The headers that will be added to request. @@ -192,19 +191,20 @@ public partial interface IDeploymentScriptsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetLogsDefaultWithHttpMessagesAsync(string resourceGroupName, string scriptName, int? tail = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetLogsDefaultWithHttpMessagesAsync(string resourceGroupName, string scriptName, int? tail = default(int?), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Lists deployments scripts. /// + /// + /// Lists deployments scripts. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -214,19 +214,20 @@ public partial interface IDeploymentScriptsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Creates a deployment script. /// + /// + /// Creates a deployment script. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -242,19 +243,20 @@ public partial interface IDeploymentScriptsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginCreateWithHttpMessagesAsync(string resourceGroupName, string scriptName, DeploymentScript deploymentScript, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginCreateWithHttpMessagesAsync(string resourceGroupName, string scriptName, DeploymentScript deploymentScript, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Lists all deployment scripts for a given subscription. /// + /// + /// Lists all deployment scripts for a given subscription. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -264,19 +266,20 @@ public partial interface IDeploymentScriptsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListBySubscriptionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListBySubscriptionNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Lists deployments scripts. /// + /// + /// Lists deployments scripts. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -286,15 +289,13 @@ public partial interface IDeploymentScriptsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/IDeploymentStacksClient.cs b/src/Resources/Resources.Management.Sdk/Generated/IDeploymentStacksClient.cs similarity index 64% rename from src/Resources/Resources.Sdk/Generated/IDeploymentStacksClient.cs rename to src/Resources/Resources.Management.Sdk/Generated/IDeploymentStacksClient.cs index a468e9fdfaa6..2f6ebf43172f 100644 --- a/src/Resources/Resources.Sdk/Generated/IDeploymentStacksClient.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/IDeploymentStacksClient.cs @@ -1,25 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; /// /// The APIs listed in this specification can be used to manage deployment - /// stack resources through the Azure Resource Manager. + /// stack resources through the Azure Resource Manager. /// - public partial interface IDeploymentStacksClient : System.IDisposable + public partial interface IDeploymentStacksClient : System.IDisposable { /// /// The base URI of the service. @@ -29,51 +23,56 @@ public partial interface IDeploymentStacksClient : System.IDisposable /// /// Gets or sets json serialization settings. /// - JsonSerializerSettings SerializationSettings { get; } + Newtonsoft.Json.JsonSerializerSettings SerializationSettings { get; } /// /// Gets or sets json deserialization settings. /// - JsonSerializerSettings DeserializationSettings { get; } + Newtonsoft.Json.JsonSerializerSettings DeserializationSettings { get; } /// /// Credentials needed for the client to connect to Azure. /// - ServiceClientCredentials Credentials { get; } + Microsoft.Rest.ServiceClientCredentials Credentials { get;} + /// /// The API version to use for this operation. /// - string ApiVersion { get; } + string ApiVersion { get;} + /// /// The ID of the target subscription. /// - string SubscriptionId { get; set; } + string SubscriptionId { get; set;} + /// /// The preferred language for the response. /// - string AcceptLanguage { get; set; } + string AcceptLanguage { get; set;} + /// /// The retry timeout in seconds for Long Running Operations. Default - /// value is 30. + /// /// value is 30. /// - int? LongRunningOperationRetryTimeout { get; set; } + int? LongRunningOperationRetryTimeout { get; set;} + /// /// Whether a unique x-ms-client-request-id should be generated. When - /// set to true a unique x-ms-client-request-id value is generated and - /// included in each request. Default is true. + /// /// set to true a unique x-ms-client-request-id value is generated and + /// /// included in each request. Default is true. /// - bool? GenerateClientRequestId { get; set; } + bool? GenerateClientRequestId { get; set;} /// - /// Gets the IDeploymentStacksOperations. + /// Gets the IDeploymentStacksOperations /// IDeploymentStacksOperations DeploymentStacks { get; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/IDeploymentStacksOperations.cs b/src/Resources/Resources.Management.Sdk/Generated/IDeploymentStacksOperations.cs similarity index 55% rename from src/Resources/Resources.Sdk/Generated/IDeploymentStacksOperations.cs rename to src/Resources/Resources.Management.Sdk/Generated/IDeploymentStacksOperations.cs index c3290f688285..66a1e6145523 100644 --- a/src/Resources/Resources.Sdk/Generated/IDeploymentStacksOperations.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/IDeploymentStacksOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// DeploymentStacksOperations operations. @@ -24,9 +14,11 @@ namespace Microsoft.Azure.Management.Resources public partial interface IDeploymentStacksOperations { /// - /// Lists all the Deployment Stacks within the specified resource - /// group. + /// Lists all the Deployment Stacks within the specified resource group. /// + /// + /// Lists all the Deployment Stacks within the specified resource group. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -36,39 +28,40 @@ public partial interface IDeploymentStacksOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListAtResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListAtResourceGroupWithHttpMessagesAsync(string resourceGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Lists all the Deployment Stacks within the specified subscription. /// + /// + /// Lists all the Deployment Stacks within the specified subscription. + /// /// /// The headers that will be added to request. /// /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListAtSubscriptionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListAtSubscriptionWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Lists all the Deployment Stacks within the specified management - /// group. + /// Lists all the Deployment Stacks within the specified management group. /// + /// + /// Lists all the Deployment Stacks within the specified management group. + /// /// /// Management Group. /// @@ -78,19 +71,20 @@ public partial interface IDeploymentStacksOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListAtManagementGroupWithHttpMessagesAsync(string managementGroupId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListAtManagementGroupWithHttpMessagesAsync(string managementGroupId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Creates or updates a Deployment Stack. /// + /// + /// Creates or updates a Deployment Stack. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -106,19 +100,20 @@ public partial interface IDeploymentStacksOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateOrUpdateAtResourceGroupWithHttpMessagesAsync(string resourceGroupName, string deploymentStackName, DeploymentStack deploymentStack, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CreateOrUpdateAtResourceGroupWithHttpMessagesAsync(string resourceGroupName, string deploymentStackName, DeploymentStack deploymentStack, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets a Deployment Stack with a given name. /// + /// + /// Gets a Deployment Stack with a given name. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -131,20 +126,22 @@ public partial interface IDeploymentStacksOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetAtResourceGroupWithHttpMessagesAsync(string resourceGroupName, string deploymentStackName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetAtResourceGroupWithHttpMessagesAsync(string resourceGroupName, string deploymentStackName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Deletes a Deployment Stack by name. When operation completes, - /// status code 200 returned without content. + /// Deletes a Deployment Stack by name. When operation completes, status code + /// 200 returned without content. /// + /// + /// Deletes a Deployment Stack by name. When operation completes, status code + /// 200 returned without content. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -153,11 +150,9 @@ public partial interface IDeploymentStacksOperations /// /// /// Flag to indicate delete rather than detach for the resources. - /// Possible values include: 'delete', 'detach' /// /// /// Flag to indicate delete rather than detach for the resource groups. - /// Possible values include: 'delete', 'detach' /// /// /// The headers that will be added to request. @@ -165,16 +160,17 @@ public partial interface IDeploymentStacksOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task> DeleteAtResourceGroupWithHttpMessagesAsync(string resourceGroupName, string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> DeleteAtResourceGroupWithHttpMessagesAsync(string resourceGroupName, string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Creates or updates a Deployment Stack. /// + /// + /// Creates or updates a Deployment Stack. + /// /// /// Name of the deployment stack. /// @@ -187,19 +183,20 @@ public partial interface IDeploymentStacksOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateOrUpdateAtSubscriptionWithHttpMessagesAsync(string deploymentStackName, DeploymentStack deploymentStack, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CreateOrUpdateAtSubscriptionWithHttpMessagesAsync(string deploymentStackName, DeploymentStack deploymentStack, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets a Deployment Stack with a given name. /// + /// + /// Gets a Deployment Stack with a given name. + /// /// /// Name of the deployment stack. /// @@ -209,30 +206,30 @@ public partial interface IDeploymentStacksOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetAtSubscriptionWithHttpMessagesAsync(string deploymentStackName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetAtSubscriptionWithHttpMessagesAsync(string deploymentStackName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Deletes a Deployment Stack by name. When operation completes, - /// status code 200 returned without content. + /// Deletes a Deployment Stack by name. When operation completes, status code + /// 200 returned without content. /// + /// + /// Deletes a Deployment Stack by name. When operation completes, status code + /// 200 returned without content. + /// /// /// Name of the deployment stack. /// /// /// Flag to indicate delete rather than detach for the resources. - /// Possible values include: 'delete', 'detach' /// /// /// Flag to indicate delete rather than detach for the resource groups. - /// Possible values include: 'delete', 'detach' /// /// /// The headers that will be added to request. @@ -240,16 +237,17 @@ public partial interface IDeploymentStacksOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task> DeleteAtSubscriptionWithHttpMessagesAsync(string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> DeleteAtSubscriptionWithHttpMessagesAsync(string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Creates or updates a Deployment Stack. /// + /// + /// Creates or updates a Deployment Stack. + /// /// /// Management Group. /// @@ -265,19 +263,20 @@ public partial interface IDeploymentStacksOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateOrUpdateAtManagementGroupWithHttpMessagesAsync(string managementGroupId, string deploymentStackName, DeploymentStack deploymentStack, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CreateOrUpdateAtManagementGroupWithHttpMessagesAsync(string managementGroupId, string deploymentStackName, DeploymentStack deploymentStack, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets a Deployment Stack with a given name. /// + /// + /// Gets a Deployment Stack with a given name. + /// /// /// Management Group. /// @@ -290,20 +289,22 @@ public partial interface IDeploymentStacksOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetAtManagementGroupWithHttpMessagesAsync(string managementGroupId, string deploymentStackName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetAtManagementGroupWithHttpMessagesAsync(string managementGroupId, string deploymentStackName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Deletes a Deployment Stack by name. When operation completes, - /// status code 200 returned without content. + /// Deletes a Deployment Stack by name. When operation completes, status code + /// 200 returned without content. /// + /// + /// Deletes a Deployment Stack by name. When operation completes, status code + /// 200 returned without content. + /// /// /// Management Group. /// @@ -312,15 +313,12 @@ public partial interface IDeploymentStacksOperations /// /// /// Flag to indicate delete rather than detach for the resources. - /// Possible values include: 'delete', 'detach' /// /// /// Flag to indicate delete rather than detach for the resource groups. - /// Possible values include: 'delete', 'detach' /// /// - /// Flag to indicate delete rather than detach for the management - /// groups. Possible values include: 'delete', 'detach' + /// Flag to indicate delete rather than detach for the management groups. /// /// /// The headers that will be added to request. @@ -328,16 +326,17 @@ public partial interface IDeploymentStacksOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task> DeleteAtManagementGroupWithHttpMessagesAsync(string managementGroupId, string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string), string unmanageActionManagementGroups = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> DeleteAtManagementGroupWithHttpMessagesAsync(string managementGroupId, string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string), string unmanageActionManagementGroups = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Exports the template used to create the deployment stack. /// + /// + /// Exports the template used to create the deployment stack. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -350,19 +349,20 @@ public partial interface IDeploymentStacksOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> ExportTemplateAtResourceGroupWithHttpMessagesAsync(string resourceGroupName, string deploymentStackName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> ExportTemplateAtResourceGroupWithHttpMessagesAsync(string resourceGroupName, string deploymentStackName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Exports the template used to create the deployment stack. /// + /// + /// Exports the template used to create the deployment stack. + /// /// /// Name of the deployment stack. /// @@ -372,19 +372,20 @@ public partial interface IDeploymentStacksOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> ExportTemplateAtSubscriptionWithHttpMessagesAsync(string deploymentStackName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> ExportTemplateAtSubscriptionWithHttpMessagesAsync(string deploymentStackName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Exports the template used to create the deployment stack. /// + /// + /// Exports the template used to create the deployment stack. + /// /// /// Management Group. /// @@ -397,19 +398,20 @@ public partial interface IDeploymentStacksOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> ExportTemplateAtManagementGroupWithHttpMessagesAsync(string managementGroupId, string deploymentStackName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> ExportTemplateAtManagementGroupWithHttpMessagesAsync(string managementGroupId, string deploymentStackName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Creates or updates a Deployment Stack. /// + /// + /// Creates or updates a Deployment Stack. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -425,20 +427,22 @@ public partial interface IDeploymentStacksOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginCreateOrUpdateAtResourceGroupWithHttpMessagesAsync(string resourceGroupName, string deploymentStackName, DeploymentStack deploymentStack, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginCreateOrUpdateAtResourceGroupWithHttpMessagesAsync(string resourceGroupName, string deploymentStackName, DeploymentStack deploymentStack, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Deletes a Deployment Stack by name. When operation completes, - /// status code 200 returned without content. + /// Deletes a Deployment Stack by name. When operation completes, status code + /// 200 returned without content. /// + /// + /// Deletes a Deployment Stack by name. When operation completes, status code + /// 200 returned without content. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -447,11 +451,9 @@ public partial interface IDeploymentStacksOperations /// /// /// Flag to indicate delete rather than detach for the resources. - /// Possible values include: 'delete', 'detach' /// /// /// Flag to indicate delete rather than detach for the resource groups. - /// Possible values include: 'delete', 'detach' /// /// /// The headers that will be added to request. @@ -459,16 +461,17 @@ public partial interface IDeploymentStacksOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginDeleteAtResourceGroupWithHttpMessagesAsync(string resourceGroupName, string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginDeleteAtResourceGroupWithHttpMessagesAsync(string resourceGroupName, string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Creates or updates a Deployment Stack. /// + /// + /// Creates or updates a Deployment Stack. + /// /// /// Name of the deployment stack. /// @@ -481,30 +484,30 @@ public partial interface IDeploymentStacksOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginCreateOrUpdateAtSubscriptionWithHttpMessagesAsync(string deploymentStackName, DeploymentStack deploymentStack, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginCreateOrUpdateAtSubscriptionWithHttpMessagesAsync(string deploymentStackName, DeploymentStack deploymentStack, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Deletes a Deployment Stack by name. When operation completes, - /// status code 200 returned without content. + /// Deletes a Deployment Stack by name. When operation completes, status code + /// 200 returned without content. /// + /// + /// Deletes a Deployment Stack by name. When operation completes, status code + /// 200 returned without content. + /// /// /// Name of the deployment stack. /// /// /// Flag to indicate delete rather than detach for the resources. - /// Possible values include: 'delete', 'detach' /// /// /// Flag to indicate delete rather than detach for the resource groups. - /// Possible values include: 'delete', 'detach' /// /// /// The headers that will be added to request. @@ -512,16 +515,17 @@ public partial interface IDeploymentStacksOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginDeleteAtSubscriptionWithHttpMessagesAsync(string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginDeleteAtSubscriptionWithHttpMessagesAsync(string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Creates or updates a Deployment Stack. /// + /// + /// Creates or updates a Deployment Stack. + /// /// /// Management Group. /// @@ -537,20 +541,22 @@ public partial interface IDeploymentStacksOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginCreateOrUpdateAtManagementGroupWithHttpMessagesAsync(string managementGroupId, string deploymentStackName, DeploymentStack deploymentStack, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginCreateOrUpdateAtManagementGroupWithHttpMessagesAsync(string managementGroupId, string deploymentStackName, DeploymentStack deploymentStack, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Deletes a Deployment Stack by name. When operation completes, - /// status code 200 returned without content. + /// Deletes a Deployment Stack by name. When operation completes, status code + /// 200 returned without content. /// + /// + /// Deletes a Deployment Stack by name. When operation completes, status code + /// 200 returned without content. + /// /// /// Management Group. /// @@ -559,15 +565,12 @@ public partial interface IDeploymentStacksOperations /// /// /// Flag to indicate delete rather than detach for the resources. - /// Possible values include: 'delete', 'detach' /// /// /// Flag to indicate delete rather than detach for the resource groups. - /// Possible values include: 'delete', 'detach' /// /// - /// Flag to indicate delete rather than detach for the management - /// groups. Possible values include: 'delete', 'detach' + /// Flag to indicate delete rather than detach for the management groups. /// /// /// The headers that will be added to request. @@ -575,17 +578,17 @@ public partial interface IDeploymentStacksOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginDeleteAtManagementGroupWithHttpMessagesAsync(string managementGroupId, string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string), string unmanageActionManagementGroups = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginDeleteAtManagementGroupWithHttpMessagesAsync(string managementGroupId, string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string), string unmanageActionManagementGroups = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Lists all the Deployment Stacks within the specified resource - /// group. + /// Lists all the Deployment Stacks within the specified resource group. /// + /// + /// Lists all the Deployment Stacks within the specified resource group. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -595,19 +598,20 @@ public partial interface IDeploymentStacksOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListAtResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListAtResourceGroupNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Lists all the Deployment Stacks within the specified subscription. /// + /// + /// Lists all the Deployment Stacks within the specified subscription. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -617,20 +621,20 @@ public partial interface IDeploymentStacksOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListAtSubscriptionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListAtSubscriptionNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Lists all the Deployment Stacks within the specified management - /// group. + /// Lists all the Deployment Stacks within the specified management group. /// + /// + /// Lists all the Deployment Stacks within the specified management group. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -640,15 +644,13 @@ public partial interface IDeploymentStacksOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListAtManagementGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListAtManagementGroupNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/IDeploymentsOperations.cs b/src/Resources/Resources.Management.Sdk/Generated/IDeploymentsOperations.cs similarity index 51% rename from src/Resources/Resources.Sdk/Generated/IDeploymentsOperations.cs rename to src/Resources/Resources.Management.Sdk/Generated/IDeploymentsOperations.cs index 1f4acf5d9f85..e0ddfcc94a50 100644 --- a/src/Resources/Resources.Sdk/Generated/IDeploymentsOperations.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/IDeploymentsOperations.cs @@ -1,23 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// DeploymentsOperations operations. @@ -25,18 +14,25 @@ namespace Microsoft.Azure.Management.Resources public partial interface IDeploymentsOperations { /// - /// Deletes a deployment from the deployment history. + /// A template deployment that is currently running cannot be deleted. Deleting + /// a template deployment removes the associated deployment operations. This is + /// an asynchronous operation that returns a status of 202 until the template + /// deployment is successfully deleted. The Location response header contains + /// the URI that is used to obtain the status of the process. While the process + /// is running, a call to the URI in the Location header returns a status of + /// 202. When the process finishes, the URI in the Location header returns a + /// status of 204 on success. If the asynchronous request failed, the URI in + /// the Location header returns an error-level status code. /// /// - /// A template deployment that is currently running cannot be deleted. - /// Deleting a template deployment removes the associated deployment - /// operations. This is an asynchronous operation that returns a status - /// of 202 until the template deployment is successfully deleted. The - /// Location response header contains the URI that is used to obtain - /// the status of the process. While the process is running, a call to - /// the URI in the Location header returns a status of 202. When the - /// process finishes, the URI in the Location header returns a status - /// of 204 on success. If the asynchronous request failed, the URI in + /// A template deployment that is currently running cannot be deleted. Deleting + /// a template deployment removes the associated deployment operations. This is + /// an asynchronous operation that returns a status of 202 until the template + /// deployment is successfully deleted. The Location response header contains + /// the URI that is used to obtain the status of the process. While the process + /// is running, a call to the URI in the Location header returns a status of + /// 202. When the process finishes, the URI in the Location header returns a + /// status of 204 on success. If the asynchronous request failed, the URI in /// the Location header returns an error-level status code. /// /// @@ -54,13 +50,14 @@ public partial interface IDeploymentsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteAtScopeWithHttpMessagesAsync(string scope, string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task DeleteAtScopeWithHttpMessagesAsync(string scope, string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Checks whether the deployment exists. /// + /// + /// Checks whether the deployment exists. + /// /// /// The resource scope. /// @@ -76,16 +73,15 @@ public partial interface IDeploymentsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task> CheckExistenceAtScopeWithHttpMessagesAsync(string scope, string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CheckExistenceAtScopeWithHttpMessagesAsync(string scope, string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Deploys resources at a given scope. + /// You can provide the template and parameters directly in the request or link + /// to JSON files. /// /// - /// You can provide the template and parameters directly in the request - /// or link to JSON files. + /// You can provide the template and parameters directly in the request or link + /// to JSON files. /// /// /// The resource scope. @@ -108,13 +104,14 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateOrUpdateAtScopeWithHttpMessagesAsync(string scope, string deploymentName, Deployment parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CreateOrUpdateAtScopeWithHttpMessagesAsync(string scope, string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets a deployment. /// + /// + /// Gets a deployment. + /// /// /// The resource scope. /// @@ -133,19 +130,19 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetAtScopeWithHttpMessagesAsync(string scope, string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetAtScopeWithHttpMessagesAsync(string scope, string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Cancels a currently running template deployment. + /// You can cancel a deployment only if the provisioningState is Accepted or + /// Running. After the deployment is canceled, the provisioningState is set to + /// Canceled. Canceling a template deployment stops the currently running + /// template deployment and leaves the resources partially deployed. /// /// - /// You can cancel a deployment only if the provisioningState is - /// Accepted or Running. After the deployment is canceled, the - /// provisioningState is set to Canceled. Canceling a template - /// deployment stops the currently running template deployment and - /// leaves the resources partially deployed. + /// You can cancel a deployment only if the provisioningState is Accepted or + /// Running. After the deployment is canceled, the provisioningState is set to + /// Canceled. Canceling a template deployment stops the currently running + /// template deployment and leaves the resources partially deployed. /// /// /// The resource scope. @@ -162,14 +159,16 @@ public partial interface IDeploymentsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task CancelAtScopeWithHttpMessagesAsync(string scope, string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task CancelAtScopeWithHttpMessagesAsync(string scope, string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Validates whether the specified template is syntactically correct - /// and will be accepted by Azure Resource Manager.. + /// Validates whether the specified template is syntactically correct and will + /// be accepted by Azure Resource Manager.. /// + /// + /// Validates whether the specified template is syntactically correct and will + /// be accepted by Azure Resource Manager.. + /// /// /// The resource scope. /// @@ -191,13 +190,14 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> ValidateAtScopeWithHttpMessagesAsync(string scope, string deploymentName, Deployment parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> ValidateAtScopeWithHttpMessagesAsync(string scope, string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Exports the template used for specified deployment. /// + /// + /// Exports the template used for specified deployment. + /// /// /// The resource scope. /// @@ -216,19 +216,20 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> ExportTemplateAtScopeWithHttpMessagesAsync(string scope, string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> ExportTemplateAtScopeWithHttpMessagesAsync(string scope, string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Get all the deployments at the given scope. /// + /// + /// Get all the deployments at the given scope. + /// + /// + /// + /// /// /// The resource scope. /// - /// - /// OData parameters to apply to the operation. - /// /// /// The headers that will be added to request. /// @@ -241,23 +242,28 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListAtScopeWithHttpMessagesAsync(string scope, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListAtScopeWithHttpMessagesAsync(string scope, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Deletes a deployment from the deployment history. + /// A template deployment that is currently running cannot be deleted. Deleting + /// a template deployment removes the associated deployment operations. This is + /// an asynchronous operation that returns a status of 202 until the template + /// deployment is successfully deleted. The Location response header contains + /// the URI that is used to obtain the status of the process. While the process + /// is running, a call to the URI in the Location header returns a status of + /// 202. When the process finishes, the URI in the Location header returns a + /// status of 204 on success. If the asynchronous request failed, the URI in + /// the Location header returns an error-level status code. /// /// - /// A template deployment that is currently running cannot be deleted. - /// Deleting a template deployment removes the associated deployment - /// operations. This is an asynchronous operation that returns a status - /// of 202 until the template deployment is successfully deleted. The - /// Location response header contains the URI that is used to obtain - /// the status of the process. While the process is running, a call to - /// the URI in the Location header returns a status of 202. When the - /// process finishes, the URI in the Location header returns a status - /// of 204 on success. If the asynchronous request failed, the URI in + /// A template deployment that is currently running cannot be deleted. Deleting + /// a template deployment removes the associated deployment operations. This is + /// an asynchronous operation that returns a status of 202 until the template + /// deployment is successfully deleted. The Location response header contains + /// the URI that is used to obtain the status of the process. While the process + /// is running, a call to the URI in the Location header returns a status of + /// 202. When the process finishes, the URI in the Location header returns a + /// status of 204 on success. If the asynchronous request failed, the URI in /// the Location header returns an error-level status code. /// /// @@ -272,13 +278,14 @@ public partial interface IDeploymentsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteAtTenantScopeWithHttpMessagesAsync(string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task DeleteAtTenantScopeWithHttpMessagesAsync(string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Checks whether the deployment exists. /// + /// + /// Checks whether the deployment exists. + /// /// /// The name of the deployment. /// @@ -291,16 +298,15 @@ public partial interface IDeploymentsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task> CheckExistenceAtTenantScopeWithHttpMessagesAsync(string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CheckExistenceAtTenantScopeWithHttpMessagesAsync(string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Deploys resources at tenant scope. + /// You can provide the template and parameters directly in the request or link + /// to JSON files. /// /// - /// You can provide the template and parameters directly in the request - /// or link to JSON files. + /// You can provide the template and parameters directly in the request or link + /// to JSON files. /// /// /// The name of the deployment. @@ -320,13 +326,14 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateOrUpdateAtTenantScopeWithHttpMessagesAsync(string deploymentName, ScopedDeployment parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CreateOrUpdateAtTenantScopeWithHttpMessagesAsync(string deploymentName, ScopedDeployment parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets a deployment. /// + /// + /// Gets a deployment. + /// /// /// The name of the deployment. /// @@ -342,19 +349,19 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetAtTenantScopeWithHttpMessagesAsync(string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetAtTenantScopeWithHttpMessagesAsync(string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Cancels a currently running template deployment. + /// You can cancel a deployment only if the provisioningState is Accepted or + /// Running. After the deployment is canceled, the provisioningState is set to + /// Canceled. Canceling a template deployment stops the currently running + /// template deployment and leaves the resources partially deployed. /// /// - /// You can cancel a deployment only if the provisioningState is - /// Accepted or Running. After the deployment is canceled, the - /// provisioningState is set to Canceled. Canceling a template - /// deployment stops the currently running template deployment and - /// leaves the resources partially deployed. + /// You can cancel a deployment only if the provisioningState is Accepted or + /// Running. After the deployment is canceled, the provisioningState is set to + /// Canceled. Canceling a template deployment stops the currently running + /// template deployment and leaves the resources partially deployed. /// /// /// The name of the deployment. @@ -368,14 +375,16 @@ public partial interface IDeploymentsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task CancelAtTenantScopeWithHttpMessagesAsync(string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task CancelAtTenantScopeWithHttpMessagesAsync(string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Validates whether the specified template is syntactically correct - /// and will be accepted by Azure Resource Manager.. + /// Validates whether the specified template is syntactically correct and will + /// be accepted by Azure Resource Manager.. /// + /// + /// Validates whether the specified template is syntactically correct and will + /// be accepted by Azure Resource Manager.. + /// /// /// The name of the deployment. /// @@ -394,14 +403,16 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> ValidateAtTenantScopeWithHttpMessagesAsync(string deploymentName, ScopedDeployment parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> ValidateAtTenantScopeWithHttpMessagesAsync(string deploymentName, ScopedDeployment parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Returns changes that will be made by the deployment if executed at - /// the scope of the tenant group. + /// Returns changes that will be made by the deployment if executed at the + /// scope of the tenant group. /// + /// + /// Returns changes that will be made by the deployment if executed at the + /// scope of the tenant group. + /// /// /// The name of the deployment. /// @@ -420,13 +431,14 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> WhatIfAtTenantScopeWithHttpMessagesAsync(string deploymentName, ScopedDeploymentWhatIf parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> WhatIfAtTenantScopeWithHttpMessagesAsync(string deploymentName, ScopedDeploymentWhatIf parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Exports the template used for specified deployment. /// + /// + /// Exports the template used for specified deployment. + /// /// /// The name of the deployment. /// @@ -442,15 +454,16 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> ExportTemplateAtTenantScopeWithHttpMessagesAsync(string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> ExportTemplateAtTenantScopeWithHttpMessagesAsync(string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Get all the deployments at the tenant scope. /// + /// + /// Get all the deployments at the tenant scope. + /// /// - /// OData parameters to apply to the operation. + /// /// /// /// The headers that will be added to request. @@ -464,23 +477,28 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListAtTenantScopeWithHttpMessagesAsync(ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListAtTenantScopeWithHttpMessagesAsync(Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Deletes a deployment from the deployment history. + /// A template deployment that is currently running cannot be deleted. Deleting + /// a template deployment removes the associated deployment operations. This is + /// an asynchronous operation that returns a status of 202 until the template + /// deployment is successfully deleted. The Location response header contains + /// the URI that is used to obtain the status of the process. While the process + /// is running, a call to the URI in the Location header returns a status of + /// 202. When the process finishes, the URI in the Location header returns a + /// status of 204 on success. If the asynchronous request failed, the URI in + /// the Location header returns an error-level status code. /// /// - /// A template deployment that is currently running cannot be deleted. - /// Deleting a template deployment removes the associated deployment - /// operations. This is an asynchronous operation that returns a status - /// of 202 until the template deployment is successfully deleted. The - /// Location response header contains the URI that is used to obtain - /// the status of the process. While the process is running, a call to - /// the URI in the Location header returns a status of 202. When the - /// process finishes, the URI in the Location header returns a status - /// of 204 on success. If the asynchronous request failed, the URI in + /// A template deployment that is currently running cannot be deleted. Deleting + /// a template deployment removes the associated deployment operations. This is + /// an asynchronous operation that returns a status of 202 until the template + /// deployment is successfully deleted. The Location response header contains + /// the URI that is used to obtain the status of the process. While the process + /// is running, a call to the URI in the Location header returns a status of + /// 202. When the process finishes, the URI in the Location header returns a + /// status of 204 on success. If the asynchronous request failed, the URI in /// the Location header returns an error-level status code. /// /// @@ -498,13 +516,14 @@ public partial interface IDeploymentsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task DeleteAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Checks whether the deployment exists. /// + /// + /// Checks whether the deployment exists. + /// /// /// The management group ID. /// @@ -520,16 +539,15 @@ public partial interface IDeploymentsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task> CheckExistenceAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CheckExistenceAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Deploys resources at management group scope. + /// You can provide the template and parameters directly in the request or link + /// to JSON files. /// /// - /// You can provide the template and parameters directly in the request - /// or link to JSON files. + /// You can provide the template and parameters directly in the request or link + /// to JSON files. /// /// /// The management group ID. @@ -552,13 +570,14 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateOrUpdateAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, ScopedDeployment parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CreateOrUpdateAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, ScopedDeployment parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets a deployment. /// + /// + /// Gets a deployment. + /// /// /// The management group ID. /// @@ -577,19 +596,19 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Cancels a currently running template deployment. + /// You can cancel a deployment only if the provisioningState is Accepted or + /// Running. After the deployment is canceled, the provisioningState is set to + /// Canceled. Canceling a template deployment stops the currently running + /// template deployment and leaves the resources partially deployed. /// /// - /// You can cancel a deployment only if the provisioningState is - /// Accepted or Running. After the deployment is canceled, the - /// provisioningState is set to Canceled. Canceling a template - /// deployment stops the currently running template deployment and - /// leaves the resources partially deployed. + /// You can cancel a deployment only if the provisioningState is Accepted or + /// Running. After the deployment is canceled, the provisioningState is set to + /// Canceled. Canceling a template deployment stops the currently running + /// template deployment and leaves the resources partially deployed. /// /// /// The management group ID. @@ -606,14 +625,16 @@ public partial interface IDeploymentsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task CancelAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task CancelAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Validates whether the specified template is syntactically correct - /// and will be accepted by Azure Resource Manager.. + /// Validates whether the specified template is syntactically correct and will + /// be accepted by Azure Resource Manager.. /// + /// + /// Validates whether the specified template is syntactically correct and will + /// be accepted by Azure Resource Manager.. + /// /// /// The management group ID. /// @@ -635,14 +656,16 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> ValidateAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, ScopedDeployment parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> ValidateAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, ScopedDeployment parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Returns changes that will be made by the deployment if executed at - /// the scope of the management group. + /// Returns changes that will be made by the deployment if executed at the + /// scope of the management group. /// + /// + /// Returns changes that will be made by the deployment if executed at the + /// scope of the management group. + /// /// /// The management group ID. /// @@ -664,13 +687,14 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> WhatIfAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, ScopedDeploymentWhatIf parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> WhatIfAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, ScopedDeploymentWhatIf parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Exports the template used for specified deployment. /// + /// + /// Exports the template used for specified deployment. + /// /// /// The management group ID. /// @@ -689,19 +713,20 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> ExportTemplateAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> ExportTemplateAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Get all the deployments for a management group. /// + /// + /// Get all the deployments for a management group. + /// + /// + /// + /// /// /// The management group ID. /// - /// - /// OData parameters to apply to the operation. - /// /// /// The headers that will be added to request. /// @@ -714,23 +739,28 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListAtManagementGroupScopeWithHttpMessagesAsync(string groupId, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListAtManagementGroupScopeWithHttpMessagesAsync(string groupId, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Deletes a deployment from the deployment history. + /// A template deployment that is currently running cannot be deleted. Deleting + /// a template deployment removes the associated deployment operations. This is + /// an asynchronous operation that returns a status of 202 until the template + /// deployment is successfully deleted. The Location response header contains + /// the URI that is used to obtain the status of the process. While the process + /// is running, a call to the URI in the Location header returns a status of + /// 202. When the process finishes, the URI in the Location header returns a + /// status of 204 on success. If the asynchronous request failed, the URI in + /// the Location header returns an error-level status code. /// /// - /// A template deployment that is currently running cannot be deleted. - /// Deleting a template deployment removes the associated deployment - /// operations. This is an asynchronous operation that returns a status - /// of 202 until the template deployment is successfully deleted. The - /// Location response header contains the URI that is used to obtain - /// the status of the process. While the process is running, a call to - /// the URI in the Location header returns a status of 202. When the - /// process finishes, the URI in the Location header returns a status - /// of 204 on success. If the asynchronous request failed, the URI in + /// A template deployment that is currently running cannot be deleted. Deleting + /// a template deployment removes the associated deployment operations. This is + /// an asynchronous operation that returns a status of 202 until the template + /// deployment is successfully deleted. The Location response header contains + /// the URI that is used to obtain the status of the process. While the process + /// is running, a call to the URI in the Location header returns a status of + /// 202. When the process finishes, the URI in the Location header returns a + /// status of 204 on success. If the asynchronous request failed, the URI in /// the Location header returns an error-level status code. /// /// @@ -745,13 +775,14 @@ public partial interface IDeploymentsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task DeleteAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Checks whether the deployment exists. /// + /// + /// Checks whether the deployment exists. + /// /// /// The name of the deployment. /// @@ -764,16 +795,15 @@ public partial interface IDeploymentsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task> CheckExistenceAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CheckExistenceAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Deploys resources at subscription scope. + /// You can provide the template and parameters directly in the request or link + /// to JSON files. /// /// - /// You can provide the template and parameters directly in the request - /// or link to JSON files. + /// You can provide the template and parameters directly in the request or link + /// to JSON files. /// /// /// The name of the deployment. @@ -793,13 +823,14 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateOrUpdateAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, Deployment parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CreateOrUpdateAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets a deployment. /// + /// + /// Gets a deployment. + /// /// /// The name of the deployment. /// @@ -815,19 +846,19 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Cancels a currently running template deployment. + /// You can cancel a deployment only if the provisioningState is Accepted or + /// Running. After the deployment is canceled, the provisioningState is set to + /// Canceled. Canceling a template deployment stops the currently running + /// template deployment and leaves the resources partially deployed. /// /// - /// You can cancel a deployment only if the provisioningState is - /// Accepted or Running. After the deployment is canceled, the - /// provisioningState is set to Canceled. Canceling a template - /// deployment stops the currently running template deployment and - /// leaves the resources partially deployed. + /// You can cancel a deployment only if the provisioningState is Accepted or + /// Running. After the deployment is canceled, the provisioningState is set to + /// Canceled. Canceling a template deployment stops the currently running + /// template deployment and leaves the resources partially deployed. /// /// /// The name of the deployment. @@ -841,14 +872,16 @@ public partial interface IDeploymentsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task CancelAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task CancelAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Validates whether the specified template is syntactically correct - /// and will be accepted by Azure Resource Manager.. + /// Validates whether the specified template is syntactically correct and will + /// be accepted by Azure Resource Manager.. /// + /// + /// Validates whether the specified template is syntactically correct and will + /// be accepted by Azure Resource Manager.. + /// /// /// The name of the deployment. /// @@ -867,14 +900,16 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> ValidateAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, Deployment parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> ValidateAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Returns changes that will be made by the deployment if executed at - /// the scope of the subscription. + /// Returns changes that will be made by the deployment if executed at the + /// scope of the subscription. /// + /// + /// Returns changes that will be made by the deployment if executed at the + /// scope of the subscription. + /// /// /// The name of the deployment. /// @@ -893,13 +928,14 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> WhatIfAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, DeploymentWhatIf parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> WhatIfAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, DeploymentWhatIf parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Exports the template used for specified deployment. /// + /// + /// Exports the template used for specified deployment. + /// /// /// The name of the deployment. /// @@ -915,15 +951,16 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> ExportTemplateAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> ExportTemplateAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Get all the deployments for a subscription. /// + /// + /// Get all the deployments for a subscription. + /// /// - /// OData parameters to apply to the operation. + /// /// /// /// The headers that will be added to request. @@ -937,30 +974,35 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListAtSubscriptionScopeWithHttpMessagesAsync(ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListAtSubscriptionScopeWithHttpMessagesAsync(Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Deletes a deployment from the deployment history. + /// A template deployment that is currently running cannot be deleted. Deleting + /// a template deployment removes the associated deployment operations. + /// Deleting a template deployment does not affect the state of the resource + /// group. This is an asynchronous operation that returns a status of 202 until + /// the template deployment is successfully deleted. The Location response + /// header contains the URI that is used to obtain the status of the process. + /// While the process is running, a call to the URI in the Location header + /// returns a status of 202. When the process finishes, the URI in the Location + /// header returns a status of 204 on success. If the asynchronous request + /// failed, the URI in the Location header returns an error-level status code. /// /// - /// A template deployment that is currently running cannot be deleted. - /// Deleting a template deployment removes the associated deployment - /// operations. Deleting a template deployment does not affect the - /// state of the resource group. This is an asynchronous operation that - /// returns a status of 202 until the template deployment is - /// successfully deleted. The Location response header contains the URI - /// that is used to obtain the status of the process. While the process - /// is running, a call to the URI in the Location header returns a - /// status of 202. When the process finishes, the URI in the Location - /// header returns a status of 204 on success. If the asynchronous - /// request failed, the URI in the Location header returns an - /// error-level status code. + /// A template deployment that is currently running cannot be deleted. Deleting + /// a template deployment removes the associated deployment operations. + /// Deleting a template deployment does not affect the state of the resource + /// group. This is an asynchronous operation that returns a status of 202 until + /// the template deployment is successfully deleted. The Location response + /// header contains the URI that is used to obtain the status of the process. + /// While the process is running, a call to the URI in the Location header + /// returns a status of 202. When the process finishes, the URI in the Location + /// header returns a status of 204 on success. If the asynchronous request + /// failed, the URI in the Location header returns an error-level status code. /// /// - /// The name of the resource group with the deployment to delete. The - /// name is case insensitive. + /// The name of the resource group with the deployment to delete. The name is + /// case insensitive. /// /// /// The name of the deployment. @@ -974,16 +1016,17 @@ public partial interface IDeploymentsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteWithHttpMessagesAsync(string resourceGroupName, string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Checks whether the deployment exists. /// + /// + /// Checks whether the deployment exists. + /// /// - /// The name of the resource group with the deployment to check. The - /// name is case insensitive. + /// The name of the resource group with the deployment to check. The name is + /// case insensitive. /// /// /// The name of the deployment. @@ -997,20 +1040,19 @@ public partial interface IDeploymentsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task> CheckExistenceWithHttpMessagesAsync(string resourceGroupName, string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CheckExistenceWithHttpMessagesAsync(string resourceGroupName, string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Deploys resources to a resource group. + /// You can provide the template and parameters directly in the request or link + /// to JSON files. /// /// - /// You can provide the template and parameters directly in the request - /// or link to JSON files. + /// You can provide the template and parameters directly in the request or link + /// to JSON files. /// /// - /// The name of the resource group to deploy the resources to. The name - /// is case insensitive. The resource group must already exist. + /// The name of the resource group to deploy the resources to. The name is case + /// insensitive. The resource group must already exist. /// /// /// The name of the deployment. @@ -1030,13 +1072,14 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string deploymentName, Deployment parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets a deployment. /// + /// + /// Gets a deployment. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -1055,19 +1098,19 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string resourceGroupName, string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Cancels a currently running template deployment. + /// You can cancel a deployment only if the provisioningState is Accepted or + /// Running. After the deployment is canceled, the provisioningState is set to + /// Canceled. Canceling a template deployment stops the currently running + /// template deployment and leaves the resource group partially deployed. /// /// - /// You can cancel a deployment only if the provisioningState is - /// Accepted or Running. After the deployment is canceled, the - /// provisioningState is set to Canceled. Canceling a template - /// deployment stops the currently running template deployment and - /// leaves the resource group partially deployed. + /// You can cancel a deployment only if the provisioningState is Accepted or + /// Running. After the deployment is canceled, the provisioningState is set to + /// Canceled. Canceling a template deployment stops the currently running + /// template deployment and leaves the resource group partially deployed. /// /// /// The name of the resource group. The name is case insensitive. @@ -1084,17 +1127,19 @@ public partial interface IDeploymentsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task CancelWithHttpMessagesAsync(string resourceGroupName, string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task CancelWithHttpMessagesAsync(string resourceGroupName, string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Validates whether the specified template is syntactically correct - /// and will be accepted by Azure Resource Manager.. + /// Validates whether the specified template is syntactically correct and will + /// be accepted by Azure Resource Manager.. /// + /// + /// Validates whether the specified template is syntactically correct and will + /// be accepted by Azure Resource Manager.. + /// /// - /// The name of the resource group the template will be deployed to. - /// The name is case insensitive. + /// The name of the resource group the template will be deployed to. The name + /// is case insensitive. /// /// /// The name of the deployment. @@ -1114,17 +1159,19 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> ValidateWithHttpMessagesAsync(string resourceGroupName, string deploymentName, Deployment parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> ValidateWithHttpMessagesAsync(string resourceGroupName, string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Returns changes that will be made by the deployment if executed at - /// the scope of the resource group. + /// Returns changes that will be made by the deployment if executed at the + /// scope of the resource group. /// + /// + /// Returns changes that will be made by the deployment if executed at the + /// scope of the resource group. + /// /// - /// The name of the resource group the template will be deployed to. - /// The name is case insensitive. + /// The name of the resource group the template will be deployed to. The name + /// is case insensitive. /// /// /// The name of the deployment. @@ -1144,13 +1191,14 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> WhatIfWithHttpMessagesAsync(string resourceGroupName, string deploymentName, DeploymentWhatIf parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> WhatIfWithHttpMessagesAsync(string resourceGroupName, string deploymentName, DeploymentWhatIf parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Exports the template used for specified deployment. /// + /// + /// Exports the template used for specified deployment. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -1169,19 +1217,20 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> ExportTemplateWithHttpMessagesAsync(string resourceGroupName, string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> ExportTemplateWithHttpMessagesAsync(string resourceGroupName, string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Get all the deployments for a resource group. /// - /// - /// The name of the resource group with the deployments to get. The - /// name is case insensitive. - /// + /// + /// Get all the deployments for a resource group. + /// /// - /// OData parameters to apply to the operation. + /// + /// + /// + /// The name of the resource group with the deployments to get. The name is + /// case insensitive. /// /// /// The headers that will be added to request. @@ -1195,13 +1244,14 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Calculate the hash of the given template. /// + /// + /// Calculate the hash of the given template. + /// /// /// The template provided to calculate hash. /// @@ -1217,23 +1267,28 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> CalculateTemplateHashWithHttpMessagesAsync(object template, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CalculateTemplateHashWithHttpMessagesAsync(object template, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Deletes a deployment from the deployment history. + /// A template deployment that is currently running cannot be deleted. Deleting + /// a template deployment removes the associated deployment operations. This is + /// an asynchronous operation that returns a status of 202 until the template + /// deployment is successfully deleted. The Location response header contains + /// the URI that is used to obtain the status of the process. While the process + /// is running, a call to the URI in the Location header returns a status of + /// 202. When the process finishes, the URI in the Location header returns a + /// status of 204 on success. If the asynchronous request failed, the URI in + /// the Location header returns an error-level status code. /// /// - /// A template deployment that is currently running cannot be deleted. - /// Deleting a template deployment removes the associated deployment - /// operations. This is an asynchronous operation that returns a status - /// of 202 until the template deployment is successfully deleted. The - /// Location response header contains the URI that is used to obtain - /// the status of the process. While the process is running, a call to - /// the URI in the Location header returns a status of 202. When the - /// process finishes, the URI in the Location header returns a status - /// of 204 on success. If the asynchronous request failed, the URI in + /// A template deployment that is currently running cannot be deleted. Deleting + /// a template deployment removes the associated deployment operations. This is + /// an asynchronous operation that returns a status of 202 until the template + /// deployment is successfully deleted. The Location response header contains + /// the URI that is used to obtain the status of the process. While the process + /// is running, a call to the URI in the Location header returns a status of + /// 202. When the process finishes, the URI in the Location header returns a + /// status of 204 on success. If the asynchronous request failed, the URI in /// the Location header returns an error-level status code. /// /// @@ -1251,16 +1306,15 @@ public partial interface IDeploymentsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task BeginDeleteAtScopeWithHttpMessagesAsync(string scope, string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task BeginDeleteAtScopeWithHttpMessagesAsync(string scope, string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Deploys resources at a given scope. + /// You can provide the template and parameters directly in the request or link + /// to JSON files. /// /// - /// You can provide the template and parameters directly in the request - /// or link to JSON files. + /// You can provide the template and parameters directly in the request or link + /// to JSON files. /// /// /// The resource scope. @@ -1283,14 +1337,16 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginCreateOrUpdateAtScopeWithHttpMessagesAsync(string scope, string deploymentName, Deployment parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginCreateOrUpdateAtScopeWithHttpMessagesAsync(string scope, string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Validates whether the specified template is syntactically correct - /// and will be accepted by Azure Resource Manager.. + /// Validates whether the specified template is syntactically correct and will + /// be accepted by Azure Resource Manager.. /// + /// + /// Validates whether the specified template is syntactically correct and will + /// be accepted by Azure Resource Manager.. + /// /// /// The resource scope. /// @@ -1312,23 +1368,28 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginValidateAtScopeWithHttpMessagesAsync(string scope, string deploymentName, Deployment parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginValidateAtScopeWithHttpMessagesAsync(string scope, string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Deletes a deployment from the deployment history. + /// A template deployment that is currently running cannot be deleted. Deleting + /// a template deployment removes the associated deployment operations. This is + /// an asynchronous operation that returns a status of 202 until the template + /// deployment is successfully deleted. The Location response header contains + /// the URI that is used to obtain the status of the process. While the process + /// is running, a call to the URI in the Location header returns a status of + /// 202. When the process finishes, the URI in the Location header returns a + /// status of 204 on success. If the asynchronous request failed, the URI in + /// the Location header returns an error-level status code. /// /// - /// A template deployment that is currently running cannot be deleted. - /// Deleting a template deployment removes the associated deployment - /// operations. This is an asynchronous operation that returns a status - /// of 202 until the template deployment is successfully deleted. The - /// Location response header contains the URI that is used to obtain - /// the status of the process. While the process is running, a call to - /// the URI in the Location header returns a status of 202. When the - /// process finishes, the URI in the Location header returns a status - /// of 204 on success. If the asynchronous request failed, the URI in + /// A template deployment that is currently running cannot be deleted. Deleting + /// a template deployment removes the associated deployment operations. This is + /// an asynchronous operation that returns a status of 202 until the template + /// deployment is successfully deleted. The Location response header contains + /// the URI that is used to obtain the status of the process. While the process + /// is running, a call to the URI in the Location header returns a status of + /// 202. When the process finishes, the URI in the Location header returns a + /// status of 204 on success. If the asynchronous request failed, the URI in /// the Location header returns an error-level status code. /// /// @@ -1343,16 +1404,15 @@ public partial interface IDeploymentsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task BeginDeleteAtTenantScopeWithHttpMessagesAsync(string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task BeginDeleteAtTenantScopeWithHttpMessagesAsync(string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Deploys resources at tenant scope. + /// You can provide the template and parameters directly in the request or link + /// to JSON files. /// /// - /// You can provide the template and parameters directly in the request - /// or link to JSON files. + /// You can provide the template and parameters directly in the request or link + /// to JSON files. /// /// /// The name of the deployment. @@ -1372,14 +1432,16 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginCreateOrUpdateAtTenantScopeWithHttpMessagesAsync(string deploymentName, ScopedDeployment parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginCreateOrUpdateAtTenantScopeWithHttpMessagesAsync(string deploymentName, ScopedDeployment parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Validates whether the specified template is syntactically correct - /// and will be accepted by Azure Resource Manager.. + /// Validates whether the specified template is syntactically correct and will + /// be accepted by Azure Resource Manager.. /// + /// + /// Validates whether the specified template is syntactically correct and will + /// be accepted by Azure Resource Manager.. + /// /// /// The name of the deployment. /// @@ -1398,14 +1460,16 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginValidateAtTenantScopeWithHttpMessagesAsync(string deploymentName, ScopedDeployment parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginValidateAtTenantScopeWithHttpMessagesAsync(string deploymentName, ScopedDeployment parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Returns changes that will be made by the deployment if executed at - /// the scope of the tenant group. + /// Returns changes that will be made by the deployment if executed at the + /// scope of the tenant group. /// + /// + /// Returns changes that will be made by the deployment if executed at the + /// scope of the tenant group. + /// /// /// The name of the deployment. /// @@ -1424,23 +1488,28 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginWhatIfAtTenantScopeWithHttpMessagesAsync(string deploymentName, ScopedDeploymentWhatIf parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginWhatIfAtTenantScopeWithHttpMessagesAsync(string deploymentName, ScopedDeploymentWhatIf parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Deletes a deployment from the deployment history. + /// A template deployment that is currently running cannot be deleted. Deleting + /// a template deployment removes the associated deployment operations. This is + /// an asynchronous operation that returns a status of 202 until the template + /// deployment is successfully deleted. The Location response header contains + /// the URI that is used to obtain the status of the process. While the process + /// is running, a call to the URI in the Location header returns a status of + /// 202. When the process finishes, the URI in the Location header returns a + /// status of 204 on success. If the asynchronous request failed, the URI in + /// the Location header returns an error-level status code. /// /// - /// A template deployment that is currently running cannot be deleted. - /// Deleting a template deployment removes the associated deployment - /// operations. This is an asynchronous operation that returns a status - /// of 202 until the template deployment is successfully deleted. The - /// Location response header contains the URI that is used to obtain - /// the status of the process. While the process is running, a call to - /// the URI in the Location header returns a status of 202. When the - /// process finishes, the URI in the Location header returns a status - /// of 204 on success. If the asynchronous request failed, the URI in + /// A template deployment that is currently running cannot be deleted. Deleting + /// a template deployment removes the associated deployment operations. This is + /// an asynchronous operation that returns a status of 202 until the template + /// deployment is successfully deleted. The Location response header contains + /// the URI that is used to obtain the status of the process. While the process + /// is running, a call to the URI in the Location header returns a status of + /// 202. When the process finishes, the URI in the Location header returns a + /// status of 204 on success. If the asynchronous request failed, the URI in /// the Location header returns an error-level status code. /// /// @@ -1458,16 +1527,15 @@ public partial interface IDeploymentsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task BeginDeleteAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task BeginDeleteAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Deploys resources at management group scope. + /// You can provide the template and parameters directly in the request or link + /// to JSON files. /// /// - /// You can provide the template and parameters directly in the request - /// or link to JSON files. + /// You can provide the template and parameters directly in the request or link + /// to JSON files. /// /// /// The management group ID. @@ -1490,14 +1558,16 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginCreateOrUpdateAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, ScopedDeployment parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginCreateOrUpdateAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, ScopedDeployment parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Validates whether the specified template is syntactically correct - /// and will be accepted by Azure Resource Manager.. + /// Validates whether the specified template is syntactically correct and will + /// be accepted by Azure Resource Manager.. /// + /// + /// Validates whether the specified template is syntactically correct and will + /// be accepted by Azure Resource Manager.. + /// /// /// The management group ID. /// @@ -1519,14 +1589,16 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginValidateAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, ScopedDeployment parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginValidateAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, ScopedDeployment parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Returns changes that will be made by the deployment if executed at - /// the scope of the management group. + /// Returns changes that will be made by the deployment if executed at the + /// scope of the management group. /// + /// + /// Returns changes that will be made by the deployment if executed at the + /// scope of the management group. + /// /// /// The management group ID. /// @@ -1548,23 +1620,28 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginWhatIfAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, ScopedDeploymentWhatIf parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginWhatIfAtManagementGroupScopeWithHttpMessagesAsync(string groupId, string deploymentName, ScopedDeploymentWhatIf parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Deletes a deployment from the deployment history. + /// A template deployment that is currently running cannot be deleted. Deleting + /// a template deployment removes the associated deployment operations. This is + /// an asynchronous operation that returns a status of 202 until the template + /// deployment is successfully deleted. The Location response header contains + /// the URI that is used to obtain the status of the process. While the process + /// is running, a call to the URI in the Location header returns a status of + /// 202. When the process finishes, the URI in the Location header returns a + /// status of 204 on success. If the asynchronous request failed, the URI in + /// the Location header returns an error-level status code. /// /// - /// A template deployment that is currently running cannot be deleted. - /// Deleting a template deployment removes the associated deployment - /// operations. This is an asynchronous operation that returns a status - /// of 202 until the template deployment is successfully deleted. The - /// Location response header contains the URI that is used to obtain - /// the status of the process. While the process is running, a call to - /// the URI in the Location header returns a status of 202. When the - /// process finishes, the URI in the Location header returns a status - /// of 204 on success. If the asynchronous request failed, the URI in + /// A template deployment that is currently running cannot be deleted. Deleting + /// a template deployment removes the associated deployment operations. This is + /// an asynchronous operation that returns a status of 202 until the template + /// deployment is successfully deleted. The Location response header contains + /// the URI that is used to obtain the status of the process. While the process + /// is running, a call to the URI in the Location header returns a status of + /// 202. When the process finishes, the URI in the Location header returns a + /// status of 204 on success. If the asynchronous request failed, the URI in /// the Location header returns an error-level status code. /// /// @@ -1579,16 +1656,15 @@ public partial interface IDeploymentsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task BeginDeleteAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task BeginDeleteAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Deploys resources at subscription scope. + /// You can provide the template and parameters directly in the request or link + /// to JSON files. /// /// - /// You can provide the template and parameters directly in the request - /// or link to JSON files. + /// You can provide the template and parameters directly in the request or link + /// to JSON files. /// /// /// The name of the deployment. @@ -1608,14 +1684,16 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginCreateOrUpdateAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, Deployment parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginCreateOrUpdateAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Validates whether the specified template is syntactically correct - /// and will be accepted by Azure Resource Manager.. + /// Validates whether the specified template is syntactically correct and will + /// be accepted by Azure Resource Manager.. /// + /// + /// Validates whether the specified template is syntactically correct and will + /// be accepted by Azure Resource Manager.. + /// /// /// The name of the deployment. /// @@ -1634,14 +1712,16 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginValidateAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, Deployment parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginValidateAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Returns changes that will be made by the deployment if executed at - /// the scope of the subscription. + /// Returns changes that will be made by the deployment if executed at the + /// scope of the subscription. /// + /// + /// Returns changes that will be made by the deployment if executed at the + /// scope of the subscription. + /// /// /// The name of the deployment. /// @@ -1660,30 +1740,35 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginWhatIfAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, DeploymentWhatIf parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginWhatIfAtSubscriptionScopeWithHttpMessagesAsync(string deploymentName, DeploymentWhatIf parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Deletes a deployment from the deployment history. + /// A template deployment that is currently running cannot be deleted. Deleting + /// a template deployment removes the associated deployment operations. + /// Deleting a template deployment does not affect the state of the resource + /// group. This is an asynchronous operation that returns a status of 202 until + /// the template deployment is successfully deleted. The Location response + /// header contains the URI that is used to obtain the status of the process. + /// While the process is running, a call to the URI in the Location header + /// returns a status of 202. When the process finishes, the URI in the Location + /// header returns a status of 204 on success. If the asynchronous request + /// failed, the URI in the Location header returns an error-level status code. /// /// - /// A template deployment that is currently running cannot be deleted. - /// Deleting a template deployment removes the associated deployment - /// operations. Deleting a template deployment does not affect the - /// state of the resource group. This is an asynchronous operation that - /// returns a status of 202 until the template deployment is - /// successfully deleted. The Location response header contains the URI - /// that is used to obtain the status of the process. While the process - /// is running, a call to the URI in the Location header returns a - /// status of 202. When the process finishes, the URI in the Location - /// header returns a status of 204 on success. If the asynchronous - /// request failed, the URI in the Location header returns an - /// error-level status code. + /// A template deployment that is currently running cannot be deleted. Deleting + /// a template deployment removes the associated deployment operations. + /// Deleting a template deployment does not affect the state of the resource + /// group. This is an asynchronous operation that returns a status of 202 until + /// the template deployment is successfully deleted. The Location response + /// header contains the URI that is used to obtain the status of the process. + /// While the process is running, a call to the URI in the Location header + /// returns a status of 202. When the process finishes, the URI in the Location + /// header returns a status of 204 on success. If the asynchronous request + /// failed, the URI in the Location header returns an error-level status code. /// /// - /// The name of the resource group with the deployment to delete. The - /// name is case insensitive. + /// The name of the resource group with the deployment to delete. The name is + /// case insensitive. /// /// /// The name of the deployment. @@ -1697,20 +1782,19 @@ public partial interface IDeploymentsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string deploymentName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Deploys resources to a resource group. + /// You can provide the template and parameters directly in the request or link + /// to JSON files. /// /// - /// You can provide the template and parameters directly in the request - /// or link to JSON files. + /// You can provide the template and parameters directly in the request or link + /// to JSON files. /// /// - /// The name of the resource group to deploy the resources to. The name - /// is case insensitive. The resource group must already exist. + /// The name of the resource group to deploy the resources to. The name is case + /// insensitive. The resource group must already exist. /// /// /// The name of the deployment. @@ -1730,17 +1814,19 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string deploymentName, Deployment parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Validates whether the specified template is syntactically correct - /// and will be accepted by Azure Resource Manager.. + /// Validates whether the specified template is syntactically correct and will + /// be accepted by Azure Resource Manager.. /// + /// + /// Validates whether the specified template is syntactically correct and will + /// be accepted by Azure Resource Manager.. + /// /// - /// The name of the resource group the template will be deployed to. - /// The name is case insensitive. + /// The name of the resource group the template will be deployed to. The name + /// is case insensitive. /// /// /// The name of the deployment. @@ -1760,17 +1846,19 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginValidateWithHttpMessagesAsync(string resourceGroupName, string deploymentName, Deployment parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginValidateWithHttpMessagesAsync(string resourceGroupName, string deploymentName, Deployment parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Returns changes that will be made by the deployment if executed at - /// the scope of the resource group. + /// Returns changes that will be made by the deployment if executed at the + /// scope of the resource group. /// + /// + /// Returns changes that will be made by the deployment if executed at the + /// scope of the resource group. + /// /// - /// The name of the resource group the template will be deployed to. - /// The name is case insensitive. + /// The name of the resource group the template will be deployed to. The name + /// is case insensitive. /// /// /// The name of the deployment. @@ -1790,13 +1878,14 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginWhatIfWithHttpMessagesAsync(string resourceGroupName, string deploymentName, DeploymentWhatIf parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginWhatIfWithHttpMessagesAsync(string resourceGroupName, string deploymentName, DeploymentWhatIf parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Get all the deployments at the given scope. /// + /// + /// Get all the deployments at the given scope. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -1812,13 +1901,14 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListAtScopeNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListAtScopeNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Get all the deployments at the tenant scope. /// + /// + /// Get all the deployments at the tenant scope. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -1834,13 +1924,14 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListAtTenantScopeNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListAtTenantScopeNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Get all the deployments for a management group. /// + /// + /// Get all the deployments for a management group. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -1856,13 +1947,14 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListAtManagementGroupScopeNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListAtManagementGroupScopeNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Get all the deployments for a subscription. /// + /// + /// Get all the deployments for a subscription. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -1878,13 +1970,14 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListAtSubscriptionScopeNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListAtSubscriptionScopeNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Get all the deployments for a resource group. /// + /// + /// Get all the deployments for a resource group. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -1900,9 +1993,7 @@ public partial interface IDeploymentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/IFeatureClient.cs b/src/Resources/Resources.Management.Sdk/Generated/IFeatureClient.cs new file mode 100644 index 000000000000..04733615088e --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/IFeatureClient.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Resources +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + + /// + /// Azure Feature Exposure Control (AFEC) provides a mechanism for the resource + /// providers to control feature exposure to users. Resource providers + /// typically use this mechanism to provide public/private preview for new + /// features prior to making them generally available. Users need to explicitly + /// register for AFEC features to get access to such functionality. + /// + public partial interface IFeatureClient : System.IDisposable + { + /// + /// The base URI of the service. + /// + System.Uri BaseUri { get; set; } + + /// + /// Gets or sets json serialization settings. + /// + Newtonsoft.Json.JsonSerializerSettings SerializationSettings { get; } + + /// + /// Gets or sets json deserialization settings. + /// + Newtonsoft.Json.JsonSerializerSettings DeserializationSettings { get; } + + /// + /// Credentials needed for the client to connect to Azure. + /// + Microsoft.Rest.ServiceClientCredentials Credentials { get;} + + + /// + /// The API version to use for this operation. + /// + string ApiVersion { get;} + + + /// + /// The Azure subscription ID. + /// + string SubscriptionId { get; set;} + + + /// + /// The preferred language for the response. + /// + string AcceptLanguage { get; set;} + + + /// + /// The retry timeout in seconds for Long Running Operations. Default + /// /// value is 30. + /// + int? LongRunningOperationRetryTimeout { get; set;} + + + /// + /// Whether a unique x-ms-client-request-id should be generated. When + /// /// set to true a unique x-ms-client-request-id value is generated and + /// /// included in each request. Default is true. + /// + bool? GenerateClientRequestId { get; set;} + + + /// + /// Gets the IFeaturesOperations + /// + IFeaturesOperations Features { get; } + + /// + /// Gets the ISubscriptionFeatureRegistrationsOperations + /// + ISubscriptionFeatureRegistrationsOperations SubscriptionFeatureRegistrations { get; } + + /// + /// Lists all of the available Microsoft.Features REST API operations. + /// + /// + /// Lists all of the available Microsoft.Features REST API operations. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListOperationsWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Lists all of the available Microsoft.Features REST API operations. + /// + /// + /// Lists all of the available Microsoft.Features REST API operations. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListOperationsNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + } +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/IFeaturesOperations.cs b/src/Resources/Resources.Management.Sdk/Generated/IFeaturesOperations.cs similarity index 56% rename from src/Resources/Resources.Sdk/Generated/IFeaturesOperations.cs rename to src/Resources/Resources.Management.Sdk/Generated/IFeaturesOperations.cs index fb88f183bd00..83d7fc2f8cfb 100644 --- a/src/Resources/Resources.Sdk/Generated/IFeaturesOperations.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/IFeaturesOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// FeaturesOperations operations. @@ -24,29 +14,35 @@ namespace Microsoft.Azure.Management.Resources public partial interface IFeaturesOperations { /// - /// Gets all the preview features that are available through AFEC for - /// the subscription. + /// Gets all the preview features that are available through AFEC for the + /// subscription. /// + /// + /// Gets all the preview features that are available through AFEC for the + /// subscription. + /// /// /// The headers that will be added to request. /// /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListAllWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListAllWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets all the preview features in a provider namespace that are - /// available through AFEC for the subscription. + /// Gets all the preview features in a provider namespace that are available + /// through AFEC for the subscription. /// + /// + /// Gets all the preview features in a provider namespace that are available + /// through AFEC for the subscription. + /// /// /// The namespace of the resource provider for getting features. /// @@ -56,19 +52,20 @@ public partial interface IFeaturesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(string resourceProviderNamespace, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceProviderNamespace, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets the preview feature with the specified name. /// + /// + /// Gets the preview feature with the specified name. + /// /// /// The resource provider namespace for the feature. /// @@ -81,19 +78,20 @@ public partial interface IFeaturesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string resourceProviderNamespace, string featureName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceProviderNamespace, string featureName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Registers the preview feature for the subscription. /// + /// + /// Registers the preview feature for the subscription. + /// /// /// The namespace of the resource provider. /// @@ -106,19 +104,20 @@ public partial interface IFeaturesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> RegisterWithHttpMessagesAsync(string resourceProviderNamespace, string featureName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> RegisterWithHttpMessagesAsync(string resourceProviderNamespace, string featureName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Unregisters the preview feature for the subscription. /// + /// + /// Unregisters the preview feature for the subscription. + /// /// /// The namespace of the resource provider. /// @@ -131,20 +130,22 @@ public partial interface IFeaturesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> UnregisterWithHttpMessagesAsync(string resourceProviderNamespace, string featureName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> UnregisterWithHttpMessagesAsync(string resourceProviderNamespace, string featureName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets all the preview features that are available through AFEC for - /// the subscription. + /// Gets all the preview features that are available through AFEC for the + /// subscription. /// + /// + /// Gets all the preview features that are available through AFEC for the + /// subscription. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -154,20 +155,22 @@ public partial interface IFeaturesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListAllNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListAllNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets all the preview features in a provider namespace that are - /// available through AFEC for the subscription. + /// Gets all the preview features in a provider namespace that are available + /// through AFEC for the subscription. /// + /// + /// Gets all the preview features in a provider namespace that are available + /// through AFEC for the subscription. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -177,15 +180,13 @@ public partial interface IFeaturesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/IOperations.cs b/src/Resources/Resources.Management.Sdk/Generated/IOperations.cs similarity index 67% rename from src/Resources/Resources.Sdk/Generated/IOperations.cs rename to src/Resources/Resources.Management.Sdk/Generated/IOperations.cs index 8ad7414b9463..c7122a216a71 100644 --- a/src/Resources/Resources.Sdk/Generated/IOperations.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/IOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// Operations operations. @@ -26,6 +16,9 @@ public partial interface IOperations /// /// Lists all of the available Microsoft.Resources REST API operations. /// + /// + /// Lists all of the available Microsoft.Resources REST API operations. + /// /// /// The headers that will be added to request. /// @@ -38,13 +31,14 @@ public partial interface IOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Lists all of the available Microsoft.Resources REST API operations. /// + /// + /// Lists all of the available Microsoft.Resources REST API operations. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -60,9 +54,7 @@ public partial interface IOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/IPrivateLinkAssociationOperations.cs b/src/Resources/Resources.Management.Sdk/Generated/IPrivateLinkAssociationOperations.cs similarity index 65% rename from src/Resources/Resources.Sdk/Generated/IPrivateLinkAssociationOperations.cs rename to src/Resources/Resources.Management.Sdk/Generated/IPrivateLinkAssociationOperations.cs index 882a4281ee63..fd99598dd65c 100644 --- a/src/Resources/Resources.Sdk/Generated/IPrivateLinkAssociationOperations.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/IPrivateLinkAssociationOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// PrivateLinkAssociationOperations operations. @@ -26,6 +16,9 @@ public partial interface IPrivateLinkAssociationOperations /// /// Create a PrivateLinkAssociation /// + /// + /// Create a PrivateLinkAssociation + /// /// /// The management group ID. /// @@ -47,13 +40,14 @@ public partial interface IPrivateLinkAssociationOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> PutWithHttpMessagesAsync(string groupId, string plaId, PrivateLinkAssociationObject parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> PutWithHttpMessagesAsync(string groupId, string plaId, PrivateLinkAssociationObject parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Get a single private link association /// + /// + /// Get a single private link association + /// /// /// The management group ID. /// @@ -72,13 +66,14 @@ public partial interface IPrivateLinkAssociationOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string groupId, string plaId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string groupId, string plaId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Delete a PrivateLinkAssociation /// + /// + /// Delete a PrivateLinkAssociation + /// /// /// The management group ID. /// @@ -94,13 +89,14 @@ public partial interface IPrivateLinkAssociationOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteWithHttpMessagesAsync(string groupId, string plaId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string groupId, string plaId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Get a private link association for a management group scope /// + /// + /// Get a private link association for a management group scope + /// /// /// The management group ID. /// @@ -116,9 +112,7 @@ public partial interface IPrivateLinkAssociationOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> ListWithHttpMessagesAsync(string groupId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> ListWithHttpMessagesAsync(string groupId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/IProviderResourceTypesOperations.cs b/src/Resources/Resources.Management.Sdk/Generated/IProviderResourceTypesOperations.cs similarity index 64% rename from src/Resources/Resources.Sdk/Generated/IProviderResourceTypesOperations.cs rename to src/Resources/Resources.Management.Sdk/Generated/IProviderResourceTypesOperations.cs index 1a8f46c92b3f..ba3147a62f08 100644 --- a/src/Resources/Resources.Sdk/Generated/IProviderResourceTypesOperations.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/IProviderResourceTypesOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ProviderResourceTypesOperations operations. @@ -26,13 +16,16 @@ public partial interface IProviderResourceTypesOperations /// /// List the resource types for a specified resource provider. /// + /// + /// List the resource types for a specified resource provider. + /// + /// + /// The $expand query parameter. For example, to include property aliases in + /// response, use $expand=resourceTypes/aliases. + /// /// /// The namespace of the resource provider. /// - /// - /// The $expand query parameter. For example, to include property - /// aliases in response, use $expand=resourceTypes/aliases. - /// /// /// The headers that will be added to request. /// @@ -45,9 +38,7 @@ public partial interface IProviderResourceTypesOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> ListWithHttpMessagesAsync(string resourceProviderNamespace, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> ListWithHttpMessagesAsync(string resourceProviderNamespace, string expand = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/IProvidersOperations.cs b/src/Resources/Resources.Management.Sdk/Generated/IProvidersOperations.cs similarity index 59% rename from src/Resources/Resources.Sdk/Generated/IProvidersOperations.cs rename to src/Resources/Resources.Management.Sdk/Generated/IProvidersOperations.cs index 9142f5d838f3..799d4ea80d8e 100644 --- a/src/Resources/Resources.Sdk/Generated/IProvidersOperations.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/IProvidersOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ProvidersOperations operations. @@ -26,6 +16,9 @@ public partial interface IProvidersOperations /// /// Unregisters a subscription from a resource provider. /// + /// + /// Unregisters a subscription from a resource provider. + /// /// /// The namespace of the resource provider to unregister. /// @@ -41,17 +34,22 @@ public partial interface IProvidersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> UnregisterWithHttpMessagesAsync(string resourceProviderNamespace, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> UnregisterWithHttpMessagesAsync(string resourceProviderNamespace, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Registers a management group with a resource provider. Use this - /// operation to register a resource provider with resource types that - /// can be deployed at the management group scope. It does not - /// recursively register subscriptions within the management group. - /// Instead, you must register subscriptions individually. + /// Registers a management group with a resource provider. Use this operation + /// to register a resource provider with resource types that can be deployed at + /// the management group scope. It does not recursively register subscriptions + /// within the management group. Instead, you must register subscriptions + /// individually. /// + /// + /// Registers a management group with a resource provider. Use this operation + /// to register a resource provider with resource types that can be deployed at + /// the management group scope. It does not recursively register subscriptions + /// within the management group. Instead, you must register subscriptions + /// individually. + /// /// /// The namespace of the resource provider to register. /// @@ -67,13 +65,14 @@ public partial interface IProvidersOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task RegisterAtManagementGroupScopeWithHttpMessagesAsync(string resourceProviderNamespace, string groupId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task RegisterAtManagementGroupScopeWithHttpMessagesAsync(string resourceProviderNamespace, string groupId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Get the provider permissions. /// + /// + /// Get the provider permissions. + /// /// /// The namespace of the resource provider. /// @@ -89,13 +88,14 @@ public partial interface IProvidersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> ProviderPermissionsWithHttpMessagesAsync(string resourceProviderNamespace, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> ProviderPermissionsWithHttpMessagesAsync(string resourceProviderNamespace, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Registers a subscription with a resource provider. /// + /// + /// Registers a subscription with a resource provider. + /// /// /// The namespace of the resource provider to register. /// @@ -114,17 +114,18 @@ public partial interface IProvidersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> RegisterWithHttpMessagesAsync(string resourceProviderNamespace, ProviderRegistrationRequest properties = default(ProviderRegistrationRequest), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> RegisterWithHttpMessagesAsync(string resourceProviderNamespace, ProviderRegistrationRequest properties = default(ProviderRegistrationRequest), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets all resource providers for a subscription. /// + /// + /// Gets all resource providers for a subscription. + /// /// /// The properties to include in the results. For example, use - /// &$expand=metadata in the query string to retrieve resource - /// provider metadata. To include property aliases in response, use + /// &$expand=metadata in the query string to retrieve resource provider + /// metadata. To include property aliases in response, use /// $expand=resourceTypes/aliases. /// /// @@ -139,17 +140,18 @@ public partial interface IProvidersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string expand = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets all resource providers for the tenant. /// + /// + /// Gets all resource providers for the tenant. + /// /// /// The properties to include in the results. For example, use - /// &$expand=metadata in the query string to retrieve resource - /// provider metadata. To include property aliases in response, use + /// &$expand=metadata in the query string to retrieve resource provider + /// metadata. To include property aliases in response, use /// $expand=resourceTypes/aliases. /// /// @@ -164,20 +166,21 @@ public partial interface IProvidersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListAtTenantScopeWithHttpMessagesAsync(string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListAtTenantScopeWithHttpMessagesAsync(string expand = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets the specified resource provider. /// + /// + /// Gets the specified resource provider. + /// + /// + /// The $expand query parameter. For example, to include property aliases in + /// response, use $expand=resourceTypes/aliases. + /// /// /// The namespace of the resource provider. /// - /// - /// The $expand query parameter. For example, to include property - /// aliases in response, use $expand=resourceTypes/aliases. - /// /// /// The headers that will be added to request. /// @@ -190,20 +193,21 @@ public partial interface IProvidersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string resourceProviderNamespace, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceProviderNamespace, string expand = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets the specified resource provider at the tenant level. /// + /// + /// Gets the specified resource provider at the tenant level. + /// + /// + /// The $expand query parameter. For example, to include property aliases in + /// response, use $expand=resourceTypes/aliases. + /// /// /// The namespace of the resource provider. /// - /// - /// The $expand query parameter. For example, to include property - /// aliases in response, use $expand=resourceTypes/aliases. - /// /// /// The headers that will be added to request. /// @@ -216,13 +220,14 @@ public partial interface IProvidersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetAtTenantScopeWithHttpMessagesAsync(string resourceProviderNamespace, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetAtTenantScopeWithHttpMessagesAsync(string resourceProviderNamespace, string expand = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets all resource providers for a subscription. /// + /// + /// Gets all resource providers for a subscription. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -238,13 +243,14 @@ public partial interface IProvidersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets all resource providers for the tenant. /// + /// + /// Gets all resource providers for the tenant. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -260,9 +266,7 @@ public partial interface IProvidersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListAtTenantScopeNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListAtTenantScopeNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/IResourceGroupsOperations.cs b/src/Resources/Resources.Management.Sdk/Generated/IResourceGroupsOperations.cs similarity index 58% rename from src/Resources/Resources.Sdk/Generated/IResourceGroupsOperations.cs rename to src/Resources/Resources.Management.Sdk/Generated/IResourceGroupsOperations.cs index f83f3d64fb02..c504eeeed6d7 100644 --- a/src/Resources/Resources.Sdk/Generated/IResourceGroupsOperations.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/IResourceGroupsOperations.cs @@ -1,23 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ResourceGroupsOperations operations. @@ -27,9 +16,11 @@ public partial interface IResourceGroupsOperations /// /// Checks whether a resource group exists. /// + /// + /// Checks whether a resource group exists. + /// /// - /// The name of the resource group to check. The name is case - /// insensitive. + /// The name of the resource group to check. The name is case insensitive. /// /// /// The headers that will be added to request. @@ -40,17 +31,18 @@ public partial interface IResourceGroupsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task> CheckExistenceWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CheckExistenceWithHttpMessagesAsync(string resourceGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Creates or updates a resource group. /// + /// + /// Creates or updates a resource group. + /// /// /// The name of the resource group to create or update. Can include - /// alphanumeric, underscore, parentheses, hyphen, period (except at - /// end), and Unicode characters that match the allowed characters. + /// alphanumeric, underscore, parentheses, hyphen, period (except at end), and + /// Unicode characters that match the allowed characters. /// /// /// Parameters supplied to the create or update a resource group. @@ -67,25 +59,24 @@ public partial interface IResourceGroupsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, ResourceGroup parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, ResourceGroup parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Deletes a resource group. + /// When you delete a resource group, all of its resources are also deleted. + /// Deleting a resource group deletes all of its template deployments and + /// currently stored operations. /// /// - /// When you delete a resource group, all of its resources are also - /// deleted. Deleting a resource group deletes all of its template - /// deployments and currently stored operations. + /// When you delete a resource group, all of its resources are also deleted. + /// Deleting a resource group deletes all of its template deployments and + /// currently stored operations. /// /// - /// The name of the resource group to delete. The name is case - /// insensitive. + /// The name of the resource group to delete. The name is case insensitive. /// /// - /// The resource types you want to force delete. Currently, only the - /// following is supported: + /// The resource types you want to force delete. Currently, only the following + /// is supported: /// forceDeletionTypes=Microsoft.Compute/virtualMachines,Microsoft.Compute/virtualMachineScaleSets /// /// @@ -97,16 +88,16 @@ public partial interface IResourceGroupsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteWithHttpMessagesAsync(string resourceGroupName, string forceDeletionTypes = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string forceDeletionTypes = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets a resource group. /// + /// + /// Gets a resource group. + /// /// - /// The name of the resource group to get. The name is case - /// insensitive. + /// The name of the resource group to get. The name is case insensitive. /// /// /// The headers that will be added to request. @@ -120,22 +111,20 @@ public partial interface IResourceGroupsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Updates a resource group. + /// Resource groups can be updated through a simple PATCH operation to a group + /// address. The format of the request is the same as that for creating a + /// resource group. If a field is unspecified, the current value is retained. /// /// - /// Resource groups can be updated through a simple PATCH operation to - /// a group address. The format of the request is the same as that for - /// creating a resource group. If a field is unspecified, the current - /// value is retained. + /// Resource groups can be updated through a simple PATCH operation to a group + /// address. The format of the request is the same as that for creating a + /// resource group. If a field is unspecified, the current value is retained. /// /// - /// The name of the resource group to update. The name is case - /// insensitive. + /// The name of the resource group to update. The name is case insensitive. /// /// /// Parameters supplied to update a resource group. @@ -152,13 +141,14 @@ public partial interface IResourceGroupsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> UpdateWithHttpMessagesAsync(string resourceGroupName, ResourceGroupPatchable parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, ResourceGroupPatchable parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Captures the specified resource group as a template. /// + /// + /// Captures the specified resource group as a template. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -177,15 +167,16 @@ public partial interface IResourceGroupsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> ExportTemplateWithHttpMessagesAsync(string resourceGroupName, ExportTemplateRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> ExportTemplateWithHttpMessagesAsync(string resourceGroupName, ExportTemplateRequest parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets all the resource groups for a subscription. /// + /// + /// Gets all the resource groups for a subscription. + /// /// - /// OData parameters to apply to the operation. + /// /// /// /// The headers that will be added to request. @@ -199,25 +190,24 @@ public partial interface IResourceGroupsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Deletes a resource group. + /// When you delete a resource group, all of its resources are also deleted. + /// Deleting a resource group deletes all of its template deployments and + /// currently stored operations. /// /// - /// When you delete a resource group, all of its resources are also - /// deleted. Deleting a resource group deletes all of its template - /// deployments and currently stored operations. + /// When you delete a resource group, all of its resources are also deleted. + /// Deleting a resource group deletes all of its template deployments and + /// currently stored operations. /// /// - /// The name of the resource group to delete. The name is case - /// insensitive. + /// The name of the resource group to delete. The name is case insensitive. /// /// - /// The resource types you want to force delete. Currently, only the - /// following is supported: + /// The resource types you want to force delete. Currently, only the following + /// is supported: /// forceDeletionTypes=Microsoft.Compute/virtualMachines,Microsoft.Compute/virtualMachineScaleSets /// /// @@ -229,13 +219,14 @@ public partial interface IResourceGroupsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string forceDeletionTypes = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string forceDeletionTypes = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Captures the specified resource group as a template. /// + /// + /// Captures the specified resource group as a template. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -254,13 +245,14 @@ public partial interface IResourceGroupsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginExportTemplateWithHttpMessagesAsync(string resourceGroupName, ExportTemplateRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginExportTemplateWithHttpMessagesAsync(string resourceGroupName, ExportTemplateRequest parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets all the resource groups for a subscription. /// + /// + /// Gets all the resource groups for a subscription. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -276,9 +268,7 @@ public partial interface IResourceGroupsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/IResourceManagementClient.cs b/src/Resources/Resources.Management.Sdk/Generated/IResourceManagementClient.cs similarity index 66% rename from src/Resources/Resources.Sdk/Generated/IResourceManagementClient.cs rename to src/Resources/Resources.Management.Sdk/Generated/IResourceManagementClient.cs index f6751a387faa..a6f8168ac4b5 100644 --- a/src/Resources/Resources.Sdk/Generated/IResourceManagementClient.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/IResourceManagementClient.cs @@ -1,24 +1,18 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; /// /// Provides operations for working with resources and resource groups. /// - public partial interface IResourceManagementClient : System.IDisposable + public partial interface IResourceManagementClient : System.IDisposable { /// /// The base URI of the service. @@ -28,86 +22,91 @@ public partial interface IResourceManagementClient : System.IDisposable /// /// Gets or sets json serialization settings. /// - JsonSerializerSettings SerializationSettings { get; } + Newtonsoft.Json.JsonSerializerSettings SerializationSettings { get; } /// /// Gets or sets json deserialization settings. /// - JsonSerializerSettings DeserializationSettings { get; } + Newtonsoft.Json.JsonSerializerSettings DeserializationSettings { get; } /// /// Credentials needed for the client to connect to Azure. /// - ServiceClientCredentials Credentials { get; } + Microsoft.Rest.ServiceClientCredentials Credentials { get;} + /// - /// The Microsoft Azure subscription ID. + /// The API version to use for this operation. /// - string SubscriptionId { get; set; } + string ApiVersion { get;} + /// - /// The API version to use for this operation. + /// The Microsoft Azure subscription ID. /// - string ApiVersion { get; } + string SubscriptionId { get; set;} + /// /// The preferred language for the response. /// - string AcceptLanguage { get; set; } + string AcceptLanguage { get; set;} + /// /// The retry timeout in seconds for Long Running Operations. Default - /// value is 30. + /// /// value is 30. /// - int? LongRunningOperationRetryTimeout { get; set; } + int? LongRunningOperationRetryTimeout { get; set;} + /// /// Whether a unique x-ms-client-request-id should be generated. When - /// set to true a unique x-ms-client-request-id value is generated and - /// included in each request. Default is true. + /// /// set to true a unique x-ms-client-request-id value is generated and + /// /// included in each request. Default is true. /// - bool? GenerateClientRequestId { get; set; } + bool? GenerateClientRequestId { get; set;} /// - /// Gets the IOperations. + /// Gets the IOperations /// IOperations Operations { get; } /// - /// Gets the IDeploymentsOperations. + /// Gets the IDeploymentsOperations /// IDeploymentsOperations Deployments { get; } /// - /// Gets the IProvidersOperations. + /// Gets the IProvidersOperations /// IProvidersOperations Providers { get; } /// - /// Gets the IProviderResourceTypesOperations. + /// Gets the IProviderResourceTypesOperations /// IProviderResourceTypesOperations ProviderResourceTypes { get; } /// - /// Gets the IResourcesOperations. + /// Gets the IResourcesOperations /// IResourcesOperations Resources { get; } /// - /// Gets the IResourceGroupsOperations. + /// Gets the IResourceGroupsOperations /// IResourceGroupsOperations ResourceGroups { get; } /// - /// Gets the ITagsOperations. + /// Gets the ITagsOperations /// ITagsOperations Tags { get; } /// - /// Gets the IDeploymentOperations. + /// Gets the IDeploymentOperations /// IDeploymentOperations DeploymentOperations { get; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/IResourceManagementPrivateLinkOperations.cs b/src/Resources/Resources.Management.Sdk/Generated/IResourceManagementPrivateLinkOperations.cs similarity index 64% rename from src/Resources/Resources.Sdk/Generated/IResourceManagementPrivateLinkOperations.cs rename to src/Resources/Resources.Management.Sdk/Generated/IResourceManagementPrivateLinkOperations.cs index bcefc7c41353..fa17af66da5d 100644 --- a/src/Resources/Resources.Sdk/Generated/IResourceManagementPrivateLinkOperations.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/IResourceManagementPrivateLinkOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ResourceManagementPrivateLinkOperations operations. @@ -26,6 +16,9 @@ public partial interface IResourceManagementPrivateLinkOperations /// /// Create a resource management group private link. /// + /// + /// Create a resource management group private link. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -47,13 +40,14 @@ public partial interface IResourceManagementPrivateLinkOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> PutWithHttpMessagesAsync(string resourceGroupName, string rmplName, ResourceManagementPrivateLinkLocation parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> PutWithHttpMessagesAsync(string resourceGroupName, string rmplName, ResourceManagementPrivateLinkLocation parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Get a resource management private link(resource-level). /// + /// + /// Get a resource management private link(resource-level). + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -72,13 +66,14 @@ public partial interface IResourceManagementPrivateLinkOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string resourceGroupName, string rmplName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string rmplName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Delete a resource management private link. /// + /// + /// Delete a resource management private link. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -94,13 +89,14 @@ public partial interface IResourceManagementPrivateLinkOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteWithHttpMessagesAsync(string resourceGroupName, string rmplName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string rmplName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Get all the resource management private links in a subscription. /// + /// + /// Get all the resource management private links in a subscription. + /// /// /// The headers that will be added to request. /// @@ -113,13 +109,14 @@ public partial interface IResourceManagementPrivateLinkOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Get all the resource management private links in a resource group. /// + /// + /// Get all the resource management private links in a resource group. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -135,9 +132,7 @@ public partial interface IResourceManagementPrivateLinkOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/IResourcePrivateLinkClient.cs b/src/Resources/Resources.Management.Sdk/Generated/IResourcePrivateLinkClient.cs similarity index 65% rename from src/Resources/Resources.Sdk/Generated/IResourcePrivateLinkClient.cs rename to src/Resources/Resources.Management.Sdk/Generated/IResourcePrivateLinkClient.cs index 5a8c3fd487cb..576510b048a2 100644 --- a/src/Resources/Resources.Sdk/Generated/IResourcePrivateLinkClient.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/IResourcePrivateLinkClient.cs @@ -1,24 +1,18 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; /// /// Provides operations for managing private link resources /// - public partial interface IResourcePrivateLinkClient : System.IDisposable + public partial interface IResourcePrivateLinkClient : System.IDisposable { /// /// The base URI of the service. @@ -28,56 +22,61 @@ public partial interface IResourcePrivateLinkClient : System.IDisposable /// /// Gets or sets json serialization settings. /// - JsonSerializerSettings SerializationSettings { get; } + Newtonsoft.Json.JsonSerializerSettings SerializationSettings { get; } /// /// Gets or sets json deserialization settings. /// - JsonSerializerSettings DeserializationSettings { get; } + Newtonsoft.Json.JsonSerializerSettings DeserializationSettings { get; } /// /// Credentials needed for the client to connect to Azure. /// - ServiceClientCredentials Credentials { get; } + Microsoft.Rest.ServiceClientCredentials Credentials { get;} + /// /// The API version to use for this operation. /// - string ApiVersion { get; } + string ApiVersion { get;} + /// /// The ID of the target subscription. /// - string SubscriptionId { get; set; } + string SubscriptionId { get; set;} + /// /// The preferred language for the response. /// - string AcceptLanguage { get; set; } + string AcceptLanguage { get; set;} + /// /// The retry timeout in seconds for Long Running Operations. Default - /// value is 30. + /// /// value is 30. /// - int? LongRunningOperationRetryTimeout { get; set; } + int? LongRunningOperationRetryTimeout { get; set;} + /// /// Whether a unique x-ms-client-request-id should be generated. When - /// set to true a unique x-ms-client-request-id value is generated and - /// included in each request. Default is true. + /// /// set to true a unique x-ms-client-request-id value is generated and + /// /// included in each request. Default is true. /// - bool? GenerateClientRequestId { get; set; } + bool? GenerateClientRequestId { get; set;} /// - /// Gets the IPrivateLinkAssociationOperations. + /// Gets the IPrivateLinkAssociationOperations /// IPrivateLinkAssociationOperations PrivateLinkAssociation { get; } /// - /// Gets the IResourceManagementPrivateLinkOperations. + /// Gets the IResourceManagementPrivateLinkOperations /// IResourceManagementPrivateLinkOperations ResourceManagementPrivateLink { get; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/IResourcesOperations.cs b/src/Resources/Resources.Management.Sdk/Generated/IResourcesOperations.cs similarity index 59% rename from src/Resources/Resources.Sdk/Generated/IResourcesOperations.cs rename to src/Resources/Resources.Management.Sdk/Generated/IResourcesOperations.cs index f07834e61daf..9b36be8d1ef9 100644 --- a/src/Resources/Resources.Sdk/Generated/IResourcesOperations.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/IResourcesOperations.cs @@ -1,23 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ResourcesOperations operations. @@ -27,12 +16,15 @@ public partial interface IResourcesOperations /// /// Get all the resources for a resource group. /// + /// + /// Get all the resources for a resource group. + /// + /// + /// + /// /// /// The resource group with the resources to get. /// - /// - /// OData parameters to apply to the operation. - /// /// /// The headers that will be added to request. /// @@ -45,24 +37,25 @@ public partial interface IResourcesOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Moves resources from one resource group to another resource group. + /// The resources to be moved must be in the same source resource group in the + /// source subscription being used. The target resource group may be in a + /// different subscription. When moving resources, both the source group and + /// the target group are locked for the duration of the operation. Write and + /// delete operations are blocked on the groups until the move completes. /// /// - /// The resources to be moved must be in the same source resource group - /// in the source subscription being used. The target resource group - /// may be in a different subscription. When moving resources, both the - /// source group and the target group are locked for the duration of - /// the operation. Write and delete operations are blocked on the - /// groups until the move completes. + /// The resources to be moved must be in the same source resource group in the + /// source subscription being used. The target resource group may be in a + /// different subscription. When moving resources, both the source group and + /// the target group are locked for the duration of the operation. Write and + /// delete operations are blocked on the groups until the move completes. /// /// - /// The name of the resource group from the source subscription - /// containing the resources to be moved. + /// The name of the resource group from the source subscription containing the + /// resources to be moved. /// /// /// Parameters for moving resources. @@ -76,27 +69,29 @@ public partial interface IResourcesOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task MoveResourcesWithHttpMessagesAsync(string sourceResourceGroupName, ResourcesMoveInfo parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task MoveResourcesWithHttpMessagesAsync(string sourceResourceGroupName, ResourcesMoveInfo parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Validates whether resources can be moved from one resource group to - /// another resource group. + /// This operation checks whether the specified resources can be moved to the + /// target. The resources to be moved must be in the same source resource group + /// in the source subscription being used. The target resource group may be in + /// a different subscription. If validation succeeds, it returns HTTP response + /// code 204 (no content). If validation fails, it returns HTTP response code + /// 409 (Conflict) with an error message. Retrieve the URL in the Location + /// header value to check the result of the long-running operation. /// /// - /// This operation checks whether the specified resources can be moved - /// to the target. The resources to be moved must be in the same source - /// resource group in the source subscription being used. The target - /// resource group may be in a different subscription. If validation - /// succeeds, it returns HTTP response code 204 (no content). If - /// validation fails, it returns HTTP response code 409 (Conflict) with - /// an error message. Retrieve the URL in the Location header value to - /// check the result of the long-running operation. + /// This operation checks whether the specified resources can be moved to the + /// target. The resources to be moved must be in the same source resource group + /// in the source subscription being used. The target resource group may be in + /// a different subscription. If validation succeeds, it returns HTTP response + /// code 204 (no content). If validation fails, it returns HTTP response code + /// 409 (Conflict) with an error message. Retrieve the URL in the Location + /// header value to check the result of the long-running operation. /// /// - /// The name of the resource group from the source subscription - /// containing the resources to be validated for move. + /// The name of the resource group from the source subscription containing the + /// resources to be validated for move. /// /// /// Parameters for moving resources. @@ -110,15 +105,16 @@ public partial interface IResourcesOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task ValidateMoveResourcesWithHttpMessagesAsync(string sourceResourceGroupName, ResourcesMoveInfo parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task ValidateMoveResourcesWithHttpMessagesAsync(string sourceResourceGroupName, ResourcesMoveInfo parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Get all the resources in a subscription. /// + /// + /// Get all the resources in a subscription. + /// /// - /// OData parameters to apply to the operation. + /// /// /// /// The headers that will be added to request. @@ -132,16 +128,17 @@ public partial interface IResourcesOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Checks whether a resource exists. /// + /// + /// Checks whether a resource exists. + /// /// - /// The name of the resource group containing the resource to check. - /// The name is case insensitive. + /// The name of the resource group containing the resource to check. The name + /// is case insensitive. /// /// /// The resource provider of the resource to check. @@ -167,16 +164,17 @@ public partial interface IResourcesOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task> CheckExistenceWithHttpMessagesAsync(string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CheckExistenceWithHttpMessagesAsync(string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Deletes a resource. /// + /// + /// Deletes a resource. + /// /// - /// The name of the resource group that contains the resource to - /// delete. The name is case insensitive. + /// The name of the resource group that contains the resource to delete. The + /// name is case insensitive. /// /// /// The namespace of the resource provider. @@ -202,13 +200,14 @@ public partial interface IResourcesOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Creates a resource. /// + /// + /// Creates a resource. + /// /// /// The name of the resource group for the resource. The name is case /// insensitive. @@ -243,13 +242,14 @@ public partial interface IResourcesOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, GenericResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, GenericResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Updates a resource. /// + /// + /// Updates a resource. + /// /// /// The name of the resource group for the resource. The name is case /// insensitive. @@ -284,16 +284,17 @@ public partial interface IResourcesOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, GenericResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, GenericResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets a resource. /// + /// + /// Gets a resource. + /// /// - /// The name of the resource group containing the resource to get. The - /// name is case insensitive. + /// The name of the resource group containing the resource to get. The name is + /// case insensitive. /// /// /// The namespace of the resource provider. @@ -322,20 +323,23 @@ public partial interface IResourcesOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Checks by ID whether a resource exists. This API currently works - /// only for a limited set of Resource providers. In the event that a - /// Resource provider does not implement this API, ARM will respond - /// with a 405. The alternative then is to use the GET API to check for - /// the existence of the resource. + /// Checks by ID whether a resource exists. This API currently works only for a + /// limited set of Resource providers. In the event that a Resource provider + /// does not implement this API, ARM will respond with a 405. The alternative + /// then is to use the GET API to check for the existence of the resource. /// + /// + /// Checks by ID whether a resource exists. This API currently works only for a + /// limited set of Resource providers. In the event that a Resource provider + /// does not implement this API, ARM will respond with a 405. The alternative + /// then is to use the GET API to check for the existence of the resource. + /// /// - /// The fully qualified ID of the resource, including the resource name - /// and resource type. Use the format, + /// The fully qualified ID of the resource, including the resource name and + /// resource type. Use the format, /// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} /// /// @@ -350,16 +354,17 @@ public partial interface IResourcesOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task> CheckExistenceByIdWithHttpMessagesAsync(string resourceId, string apiVersion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CheckExistenceByIdWithHttpMessagesAsync(string resourceId, string apiVersion, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Deletes a resource by ID. /// + /// + /// Deletes a resource by ID. + /// /// - /// The fully qualified ID of the resource, including the resource name - /// and resource type. Use the format, + /// The fully qualified ID of the resource, including the resource name and + /// resource type. Use the format, /// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} /// /// @@ -374,16 +379,17 @@ public partial interface IResourcesOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteByIdWithHttpMessagesAsync(string resourceId, string apiVersion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task DeleteByIdWithHttpMessagesAsync(string resourceId, string apiVersion, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Create a resource by ID. /// + /// + /// Create a resource by ID. + /// /// - /// The fully qualified ID of the resource, including the resource name - /// and resource type. Use the format, + /// The fully qualified ID of the resource, including the resource name and + /// resource type. Use the format, /// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} /// /// @@ -404,16 +410,17 @@ public partial interface IResourcesOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateOrUpdateByIdWithHttpMessagesAsync(string resourceId, string apiVersion, GenericResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CreateOrUpdateByIdWithHttpMessagesAsync(string resourceId, string apiVersion, GenericResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Updates a resource by ID. /// + /// + /// Updates a resource by ID. + /// /// - /// The fully qualified ID of the resource, including the resource name - /// and resource type. Use the format, + /// The fully qualified ID of the resource, including the resource name and + /// resource type. Use the format, /// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} /// /// @@ -434,16 +441,17 @@ public partial interface IResourcesOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> UpdateByIdWithHttpMessagesAsync(string resourceId, string apiVersion, GenericResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> UpdateByIdWithHttpMessagesAsync(string resourceId, string apiVersion, GenericResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets a resource by ID. /// + /// + /// Gets a resource by ID. + /// /// - /// The fully qualified ID of the resource, including the resource name - /// and resource type. Use the format, + /// The fully qualified ID of the resource, including the resource name and + /// resource type. Use the format, /// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} /// /// @@ -461,24 +469,25 @@ public partial interface IResourcesOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetByIdWithHttpMessagesAsync(string resourceId, string apiVersion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetByIdWithHttpMessagesAsync(string resourceId, string apiVersion, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Moves resources from one resource group to another resource group. + /// The resources to be moved must be in the same source resource group in the + /// source subscription being used. The target resource group may be in a + /// different subscription. When moving resources, both the source group and + /// the target group are locked for the duration of the operation. Write and + /// delete operations are blocked on the groups until the move completes. /// /// - /// The resources to be moved must be in the same source resource group - /// in the source subscription being used. The target resource group - /// may be in a different subscription. When moving resources, both the - /// source group and the target group are locked for the duration of - /// the operation. Write and delete operations are blocked on the - /// groups until the move completes. + /// The resources to be moved must be in the same source resource group in the + /// source subscription being used. The target resource group may be in a + /// different subscription. When moving resources, both the source group and + /// the target group are locked for the duration of the operation. Write and + /// delete operations are blocked on the groups until the move completes. /// /// - /// The name of the resource group from the source subscription - /// containing the resources to be moved. + /// The name of the resource group from the source subscription containing the + /// resources to be moved. /// /// /// Parameters for moving resources. @@ -492,27 +501,29 @@ public partial interface IResourcesOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task BeginMoveResourcesWithHttpMessagesAsync(string sourceResourceGroupName, ResourcesMoveInfo parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task BeginMoveResourcesWithHttpMessagesAsync(string sourceResourceGroupName, ResourcesMoveInfo parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Validates whether resources can be moved from one resource group to - /// another resource group. + /// This operation checks whether the specified resources can be moved to the + /// target. The resources to be moved must be in the same source resource group + /// in the source subscription being used. The target resource group may be in + /// a different subscription. If validation succeeds, it returns HTTP response + /// code 204 (no content). If validation fails, it returns HTTP response code + /// 409 (Conflict) with an error message. Retrieve the URL in the Location + /// header value to check the result of the long-running operation. /// /// - /// This operation checks whether the specified resources can be moved - /// to the target. The resources to be moved must be in the same source - /// resource group in the source subscription being used. The target - /// resource group may be in a different subscription. If validation - /// succeeds, it returns HTTP response code 204 (no content). If - /// validation fails, it returns HTTP response code 409 (Conflict) with - /// an error message. Retrieve the URL in the Location header value to - /// check the result of the long-running operation. + /// This operation checks whether the specified resources can be moved to the + /// target. The resources to be moved must be in the same source resource group + /// in the source subscription being used. The target resource group may be in + /// a different subscription. If validation succeeds, it returns HTTP response + /// code 204 (no content). If validation fails, it returns HTTP response code + /// 409 (Conflict) with an error message. Retrieve the URL in the Location + /// header value to check the result of the long-running operation. /// /// - /// The name of the resource group from the source subscription - /// containing the resources to be validated for move. + /// The name of the resource group from the source subscription containing the + /// resources to be validated for move. /// /// /// Parameters for moving resources. @@ -526,16 +537,17 @@ public partial interface IResourcesOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task BeginValidateMoveResourcesWithHttpMessagesAsync(string sourceResourceGroupName, ResourcesMoveInfo parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task BeginValidateMoveResourcesWithHttpMessagesAsync(string sourceResourceGroupName, ResourcesMoveInfo parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Deletes a resource. /// + /// + /// Deletes a resource. + /// /// - /// The name of the resource group that contains the resource to - /// delete. The name is case insensitive. + /// The name of the resource group that contains the resource to delete. The + /// name is case insensitive. /// /// /// The namespace of the resource provider. @@ -561,13 +573,14 @@ public partial interface IResourcesOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Creates a resource. /// + /// + /// Creates a resource. + /// /// /// The name of the resource group for the resource. The name is case /// insensitive. @@ -602,13 +615,14 @@ public partial interface IResourcesOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, GenericResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, GenericResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Updates a resource. /// + /// + /// Updates a resource. + /// /// /// The name of the resource group for the resource. The name is case /// insensitive. @@ -643,16 +657,17 @@ public partial interface IResourcesOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, GenericResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, GenericResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Deletes a resource by ID. /// + /// + /// Deletes a resource by ID. + /// /// - /// The fully qualified ID of the resource, including the resource name - /// and resource type. Use the format, + /// The fully qualified ID of the resource, including the resource name and + /// resource type. Use the format, /// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} /// /// @@ -667,16 +682,17 @@ public partial interface IResourcesOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task BeginDeleteByIdWithHttpMessagesAsync(string resourceId, string apiVersion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task BeginDeleteByIdWithHttpMessagesAsync(string resourceId, string apiVersion, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Create a resource by ID. /// + /// + /// Create a resource by ID. + /// /// - /// The fully qualified ID of the resource, including the resource name - /// and resource type. Use the format, + /// The fully qualified ID of the resource, including the resource name and + /// resource type. Use the format, /// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} /// /// @@ -697,16 +713,17 @@ public partial interface IResourcesOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginCreateOrUpdateByIdWithHttpMessagesAsync(string resourceId, string apiVersion, GenericResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginCreateOrUpdateByIdWithHttpMessagesAsync(string resourceId, string apiVersion, GenericResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Updates a resource by ID. /// + /// + /// Updates a resource by ID. + /// /// - /// The fully qualified ID of the resource, including the resource name - /// and resource type. Use the format, + /// The fully qualified ID of the resource, including the resource name and + /// resource type. Use the format, /// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} /// /// @@ -727,13 +744,14 @@ public partial interface IResourcesOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginUpdateByIdWithHttpMessagesAsync(string resourceId, string apiVersion, GenericResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginUpdateByIdWithHttpMessagesAsync(string resourceId, string apiVersion, GenericResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Get all the resources for a resource group. /// + /// + /// Get all the resources for a resource group. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -749,13 +767,14 @@ public partial interface IResourcesOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Get all the resources in a subscription. /// + /// + /// Get all the resources in a subscription. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -771,9 +790,7 @@ public partial interface IResourcesOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/ISubscriptionClient.cs b/src/Resources/Resources.Management.Sdk/Generated/ISubscriptionClient.cs similarity index 50% rename from src/Resources/Resources.Sdk/Generated/ISubscriptionClient.cs rename to src/Resources/Resources.Management.Sdk/Generated/ISubscriptionClient.cs index 726d7bac021f..9e540c35c760 100644 --- a/src/Resources/Resources.Sdk/Generated/ISubscriptionClient.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/ISubscriptionClient.cs @@ -1,31 +1,21 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// All resource groups and resources exist within subscriptions. These - /// operation enable you get information about your subscriptions and - /// tenants. A tenant is a dedicated instance of Azure Active Directory - /// (Azure AD) for your organization. + /// operation enable you get information about your subscriptions and tenants. + /// A tenant is a dedicated instance of Azure Active Directory (Azure AD) for + /// your organization. /// - public partial interface ISubscriptionClient : System.IDisposable + public partial interface ISubscriptionClient : System.IDisposable { /// /// The base URI of the service. @@ -35,58 +25,63 @@ public partial interface ISubscriptionClient : System.IDisposable /// /// Gets or sets json serialization settings. /// - JsonSerializerSettings SerializationSettings { get; } + Newtonsoft.Json.JsonSerializerSettings SerializationSettings { get; } /// /// Gets or sets json deserialization settings. /// - JsonSerializerSettings DeserializationSettings { get; } + Newtonsoft.Json.JsonSerializerSettings DeserializationSettings { get; } /// /// Credentials needed for the client to connect to Azure. /// - ServiceClientCredentials Credentials { get; } + Microsoft.Rest.ServiceClientCredentials Credentials { get;} + /// - /// The API version to use for the operation. + /// The API version to use for this operation. /// - string ApiVersion { get; } + string ApiVersion { get;} + /// /// The preferred language for the response. /// - string AcceptLanguage { get; set; } + string AcceptLanguage { get; set;} + /// /// The retry timeout in seconds for Long Running Operations. Default - /// value is 30. + /// /// value is 30. /// - int? LongRunningOperationRetryTimeout { get; set; } + int? LongRunningOperationRetryTimeout { get; set;} + /// /// Whether a unique x-ms-client-request-id should be generated. When - /// set to true a unique x-ms-client-request-id value is generated and - /// included in each request. Default is true. + /// /// set to true a unique x-ms-client-request-id value is generated and + /// /// included in each request. Default is true. /// - bool? GenerateClientRequestId { get; set; } + bool? GenerateClientRequestId { get; set;} /// - /// Gets the ISubscriptionsOperations. + /// Gets the ISubscriptionsOperations /// ISubscriptionsOperations Subscriptions { get; } /// - /// Gets the ITenantsOperations. + /// Gets the ITenantsOperations /// ITenantsOperations Tenants { get; } /// - /// Checks resource name validity + /// A resource name is valid if it is not a reserved word, does not contains a + /// reserved word and does not start with a reserved word /// /// - /// A resource name is valid if it is not a reserved word, does not - /// contains a reserved word and does not start with a reserved word + /// A resource name is valid if it is not a reserved word, does not contains a + /// reserved word and does not start with a reserved word /// /// /// Resource object with values for resource name and resource type @@ -97,7 +92,13 @@ public partial interface ISubscriptionClient : System.IDisposable /// /// The cancellation token. /// - Task> CheckResourceNameWithHttpMessagesAsync(ResourceName resourceNameDefinition = default(ResourceName), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> CheckResourceNameWithHttpMessagesAsync(ResourceName resourceNameDefinition = default(ResourceName), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/ISubscriptionFeatureRegistrationsOperations.cs b/src/Resources/Resources.Management.Sdk/Generated/ISubscriptionFeatureRegistrationsOperations.cs similarity index 55% rename from src/Resources/Resources.Sdk/Generated/ISubscriptionFeatureRegistrationsOperations.cs rename to src/Resources/Resources.Management.Sdk/Generated/ISubscriptionFeatureRegistrationsOperations.cs index 2a990f03d557..cf7a093ef037 100644 --- a/src/Resources/Resources.Sdk/Generated/ISubscriptionFeatureRegistrationsOperations.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/ISubscriptionFeatureRegistrationsOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// SubscriptionFeatureRegistrationsOperations operations. @@ -26,6 +16,9 @@ public partial interface ISubscriptionFeatureRegistrationsOperations /// /// Returns a feature registration /// + /// + /// Returns a feature registration + /// /// /// The provider namespace. /// @@ -38,19 +31,20 @@ public partial interface ISubscriptionFeatureRegistrationsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string providerNamespace, string featureName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string providerNamespace, string featureName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Create or update a feature registration. /// + /// + /// Create or update a feature registration. + /// /// /// The provider namespace. /// @@ -66,19 +60,20 @@ public partial interface ISubscriptionFeatureRegistrationsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateOrUpdateWithHttpMessagesAsync(string providerNamespace, string featureName, SubscriptionFeatureRegistration subscriptionFeatureRegistrationType = default(SubscriptionFeatureRegistration), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string providerNamespace, string featureName, SubscriptionFeatureRegistration subscriptionFeatureRegistrationType = default(SubscriptionFeatureRegistration), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Deletes a feature registration /// + /// + /// Deletes a feature registration + /// /// /// The provider namespace. /// @@ -91,17 +86,19 @@ public partial interface ISubscriptionFeatureRegistrationsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteWithHttpMessagesAsync(string providerNamespace, string featureName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string providerNamespace, string featureName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Returns subscription feature registrations for given subscription - /// and provider namespace. + /// Returns subscription feature registrations for given subscription and + /// provider namespace. /// + /// + /// Returns subscription feature registrations for given subscription and + /// provider namespace. + /// /// /// The provider namespace. /// @@ -111,39 +108,42 @@ public partial interface ISubscriptionFeatureRegistrationsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListBySubscriptionWithHttpMessagesAsync(string providerNamespace, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListBySubscriptionWithHttpMessagesAsync(string providerNamespace, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Returns subscription feature registrations for given subscription. /// + /// + /// Returns subscription feature registrations for given subscription. + /// /// /// The headers that will be added to request. /// /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListAllBySubscriptionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListAllBySubscriptionWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Returns subscription feature registrations for given subscription - /// and provider namespace. + /// Returns subscription feature registrations for given subscription and + /// provider namespace. /// + /// + /// Returns subscription feature registrations for given subscription and + /// provider namespace. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -153,19 +153,20 @@ public partial interface ISubscriptionFeatureRegistrationsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListBySubscriptionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListBySubscriptionNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Returns subscription feature registrations for given subscription. /// + /// + /// Returns subscription feature registrations for given subscription. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -175,15 +176,13 @@ public partial interface ISubscriptionFeatureRegistrationsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListAllBySubscriptionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListAllBySubscriptionNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/ISubscriptionsOperations.cs b/src/Resources/Resources.Management.Sdk/Generated/ISubscriptionsOperations.cs similarity index 60% rename from src/Resources/Resources.Sdk/Generated/ISubscriptionsOperations.cs rename to src/Resources/Resources.Management.Sdk/Generated/ISubscriptionsOperations.cs index 0b563419ff51..e9907a3228fc 100644 --- a/src/Resources/Resources.Sdk/Generated/ISubscriptionsOperations.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/ISubscriptionsOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// SubscriptionsOperations operations. @@ -24,12 +14,14 @@ namespace Microsoft.Azure.Management.Resources public partial interface ISubscriptionsOperations { /// - /// Gets all available geo-locations. + /// This operation provides all the locations that are available for resource + /// providers; however, each resource provider may support a subset of this + /// list. /// /// - /// This operation provides all the locations that are available for - /// resource providers; however, each resource provider may support a - /// subset of this list. + /// This operation provides all the locations that are available for resource + /// providers; however, each resource provider may support a subset of this + /// list. /// /// /// The ID of the target subscription. @@ -49,13 +41,14 @@ public partial interface ISubscriptionsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListLocationsWithHttpMessagesAsync(string subscriptionId, bool? includeExtendedLocations = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListLocationsWithHttpMessagesAsync(string subscriptionId, bool? includeExtendedLocations = default(bool?), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets details about a specified subscription. /// + /// + /// Gets details about a specified subscription. + /// /// /// The ID of the target subscription. /// @@ -71,13 +64,14 @@ public partial interface ISubscriptionsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string subscriptionId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string subscriptionId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets all subscriptions for a tenant. /// + /// + /// Gets all subscriptions for a tenant. + /// /// /// The headers that will be added to request. /// @@ -90,13 +84,14 @@ public partial interface ISubscriptionsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Compares a subscriptions logical zone mapping /// + /// + /// Compares a subscriptions logical zone mapping + /// /// /// The ID of the target subscription. /// @@ -109,19 +104,20 @@ public partial interface ISubscriptionsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> CheckZonePeersWithHttpMessagesAsync(string subscriptionId, CheckZonePeersRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CheckZonePeersWithHttpMessagesAsync(string subscriptionId, CheckZonePeersRequest parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets all subscriptions for a tenant. /// + /// + /// Gets all subscriptions for a tenant. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -137,9 +133,7 @@ public partial interface ISubscriptionsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/ITagsOperations.cs b/src/Resources/Resources.Management.Sdk/Generated/ITagsOperations.cs new file mode 100644 index 000000000000..1ecc859f766d --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/ITagsOperations.cs @@ -0,0 +1,295 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Resources +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// TagsOperations operations. + /// + public partial interface ITagsOperations + { + /// + /// This operation allows deleting a value from the list of predefined values + /// for an existing predefined tag name. The value being deleted must not be in + /// use as a tag value for the given tag name for any resource. + /// + /// + /// This operation allows deleting a value from the list of predefined values + /// for an existing predefined tag name. The value being deleted must not be in + /// use as a tag value for the given tag name for any resource. + /// + /// + /// The name of the tag. + /// + /// + /// The value of the tag to delete. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task DeleteValueWithHttpMessagesAsync(string tagName, string tagValue, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// This operation allows adding a value to the list of predefined values for + /// an existing predefined tag name. A tag value can have a maximum of 256 + /// characters. + /// + /// + /// This operation allows adding a value to the list of predefined values for + /// an existing predefined tag name. A tag value can have a maximum of 256 + /// characters. + /// + /// + /// The name of the tag. + /// + /// + /// The value of the tag to create. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> CreateOrUpdateValueWithHttpMessagesAsync(string tagName, string tagValue, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// This operation allows adding a name to the list of predefined tag names for + /// the given subscription. A tag name can have a maximum of 512 characters and + /// is case-insensitive. Tag names cannot have the following prefixes which are + /// reserved for Azure use: 'microsoft', 'azure', 'windows'. + /// + /// + /// This operation allows adding a name to the list of predefined tag names for + /// the given subscription. A tag name can have a maximum of 512 characters and + /// is case-insensitive. Tag names cannot have the following prefixes which are + /// reserved for Azure use: 'microsoft', 'azure', 'windows'. + /// + /// + /// The name of the tag to create. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string tagName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// This operation allows deleting a name from the list of predefined tag names + /// for the given subscription. The name being deleted must not be in use as a + /// tag name for any resource. All predefined values for the given name must + /// have already been deleted. + /// + /// + /// This operation allows deleting a name from the list of predefined tag names + /// for the given subscription. The name being deleted must not be in use as a + /// tag name for any resource. All predefined values for the given name must + /// have already been deleted. + /// + /// + /// The name of the tag. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string tagName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// This operation performs a union of predefined tags, resource tags, resource + /// group tags and subscription tags, and returns a summary of usage for each + /// tag name and value under the given subscription. In case of a large number + /// of tags, this operation may return a previously cached result. + /// + /// + /// This operation performs a union of predefined tags, resource tags, resource + /// group tags and subscription tags, and returns a summary of usage for each + /// tag name and value under the given subscription. In case of a large number + /// of tags, this operation may return a previously cached result. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// This operation allows adding or replacing the entire set of tags on the + /// specified resource or subscription. The specified entity can have a maximum + /// of 50 tags. + /// + /// + /// This operation allows adding or replacing the entire set of tags on the + /// specified resource or subscription. The specified entity can have a maximum + /// of 50 tags. + /// + /// + /// The resource scope. + /// + /// + /// + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> CreateOrUpdateAtScopeWithHttpMessagesAsync(string scope, TagsResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// This operation allows replacing, merging or selectively deleting tags on + /// the specified resource or subscription. The specified entity can have a + /// maximum of 50 tags at the end of the operation. The 'replace' option + /// replaces the entire set of existing tags with a new set. The 'merge' option + /// allows adding tags with new names and updating the values of tags with + /// existing names. The 'delete' option allows selectively deleting tags based + /// on given names or name/value pairs. + /// + /// + /// This operation allows replacing, merging or selectively deleting tags on + /// the specified resource or subscription. The specified entity can have a + /// maximum of 50 tags at the end of the operation. The 'replace' option + /// replaces the entire set of existing tags with a new set. The 'merge' option + /// allows adding tags with new names and updating the values of tags with + /// existing names. The 'delete' option allows selectively deleting tags based + /// on given names or name/value pairs. + /// + /// + /// The resource scope. + /// + /// + /// + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> UpdateAtScopeWithHttpMessagesAsync(string scope, TagsPatchResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Gets the entire set of tags on a resource or subscription. + /// + /// + /// Gets the entire set of tags on a resource or subscription. + /// + /// + /// The resource scope. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> GetAtScopeWithHttpMessagesAsync(string scope, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Deletes the entire set of tags on a resource or subscription. + /// + /// + /// Deletes the entire set of tags on a resource or subscription. + /// + /// + /// The resource scope. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task DeleteAtScopeWithHttpMessagesAsync(string scope, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// This operation performs a union of predefined tags, resource tags, resource + /// group tags and subscription tags, and returns a summary of usage for each + /// tag name and value under the given subscription. In case of a large number + /// of tags, this operation may return a previously cached result. + /// + /// + /// This operation performs a union of predefined tags, resource tags, resource + /// group tags and subscription tags, and returns a summary of usage for each + /// tag name and value under the given subscription. In case of a large number + /// of tags, this operation may return a previously cached result. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + } +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/ITemplateSpecVersionsOperations.cs b/src/Resources/Resources.Management.Sdk/Generated/ITemplateSpecVersionsOperations.cs similarity index 59% rename from src/Resources/Resources.Sdk/Generated/ITemplateSpecVersionsOperations.cs rename to src/Resources/Resources.Management.Sdk/Generated/ITemplateSpecVersionsOperations.cs index 6f8fe7948639..06a04b2a7123 100644 --- a/src/Resources/Resources.Sdk/Generated/ITemplateSpecVersionsOperations.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/ITemplateSpecVersionsOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// TemplateSpecVersionsOperations operations. @@ -26,6 +16,9 @@ public partial interface ITemplateSpecVersionsOperations /// /// Creates or updates a Template Spec version. /// + /// + /// Creates or updates a Template Spec version. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -44,19 +37,20 @@ public partial interface ITemplateSpecVersionsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string templateSpecName, string templateSpecVersion, TemplateSpecVersion templateSpecVersionModel, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string templateSpecName, string templateSpecVersion, TemplateSpecVersion templateSpecVersionModel, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Updates Template Spec Version tags with specified values. /// + /// + /// Updates Template Spec Version tags with specified values. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -75,19 +69,20 @@ public partial interface ITemplateSpecVersionsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string templateSpecName, string templateSpecVersion, TemplateSpecVersionUpdateModel templateSpecVersionUpdateModel = default(TemplateSpecVersionUpdateModel), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string templateSpecName, string templateSpecVersion, TemplateSpecVersionUpdateModel templateSpecVersionUpdateModel = default(TemplateSpecVersionUpdateModel), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets a Template Spec version from a specific Template Spec. /// + /// + /// Gets a Template Spec version from a specific Template Spec. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -103,20 +98,22 @@ public partial interface ITemplateSpecVersionsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string resourceGroupName, string templateSpecName, string templateSpecVersion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string templateSpecName, string templateSpecVersion, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Deletes a specific version from a Template Spec. When operation - /// completes, status code 200 returned without content. + /// Deletes a specific version from a Template Spec. When operation completes, + /// status code 200 returned without content. /// + /// + /// Deletes a specific version from a Template Spec. When operation completes, + /// status code 200 returned without content. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -132,17 +129,17 @@ public partial interface ITemplateSpecVersionsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteWithHttpMessagesAsync(string resourceGroupName, string templateSpecName, string templateSpecVersion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string templateSpecName, string templateSpecVersion, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Lists all the Template Spec versions in the specified Template - /// Spec. + /// Lists all the Template Spec versions in the specified Template Spec. /// + /// + /// Lists all the Template Spec versions in the specified Template Spec. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -155,20 +152,20 @@ public partial interface ITemplateSpecVersionsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(string resourceGroupName, string templateSpecName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string templateSpecName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Lists all the Template Spec versions in the specified Template - /// Spec. + /// Lists all the Template Spec versions in the specified Template Spec. /// + /// + /// Lists all the Template Spec versions in the specified Template Spec. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -178,15 +175,13 @@ public partial interface ITemplateSpecVersionsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/ITemplateSpecsClient.cs b/src/Resources/Resources.Management.Sdk/Generated/ITemplateSpecsClient.cs similarity index 62% rename from src/Resources/Resources.Sdk/Generated/ITemplateSpecsClient.cs rename to src/Resources/Resources.Management.Sdk/Generated/ITemplateSpecsClient.cs index f5798dce6889..f72e78ee13c0 100644 --- a/src/Resources/Resources.Sdk/Generated/ITemplateSpecsClient.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/ITemplateSpecsClient.cs @@ -1,25 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; /// - /// The APIs listed in this specification can be used to manage Template - /// Spec resources through the Azure Resource Manager. + /// The APIs listed in this specification can be used to manage Template Spec + /// resources through the Azure Resource Manager. /// - public partial interface ITemplateSpecsClient : System.IDisposable + public partial interface ITemplateSpecsClient : System.IDisposable { /// /// The base URI of the service. @@ -29,56 +23,61 @@ public partial interface ITemplateSpecsClient : System.IDisposable /// /// Gets or sets json serialization settings. /// - JsonSerializerSettings SerializationSettings { get; } + Newtonsoft.Json.JsonSerializerSettings SerializationSettings { get; } /// /// Gets or sets json deserialization settings. /// - JsonSerializerSettings DeserializationSettings { get; } + Newtonsoft.Json.JsonSerializerSettings DeserializationSettings { get; } /// /// Credentials needed for the client to connect to Azure. /// - ServiceClientCredentials Credentials { get; } + Microsoft.Rest.ServiceClientCredentials Credentials { get;} + /// - /// Subscription Id which forms part of the URI for every service call. + /// The API version to use for this operation. /// - string SubscriptionId { get; set; } + string ApiVersion { get;} + /// - /// Client Api version. + /// Subscription Id which forms part of the URI for every service call. /// - string ApiVersion { get; } + string SubscriptionId { get; set;} + /// /// The preferred language for the response. /// - string AcceptLanguage { get; set; } + string AcceptLanguage { get; set;} + /// /// The retry timeout in seconds for Long Running Operations. Default - /// value is 30. + /// /// value is 30. /// - int? LongRunningOperationRetryTimeout { get; set; } + int? LongRunningOperationRetryTimeout { get; set;} + /// /// Whether a unique x-ms-client-request-id should be generated. When - /// set to true a unique x-ms-client-request-id value is generated and - /// included in each request. Default is true. + /// /// set to true a unique x-ms-client-request-id value is generated and + /// /// included in each request. Default is true. /// - bool? GenerateClientRequestId { get; set; } + bool? GenerateClientRequestId { get; set;} /// - /// Gets the ITemplateSpecsOperations. + /// Gets the ITemplateSpecsOperations /// ITemplateSpecsOperations TemplateSpecs { get; } /// - /// Gets the ITemplateSpecVersionsOperations. + /// Gets the ITemplateSpecVersionsOperations /// ITemplateSpecVersionsOperations TemplateSpecVersions { get; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/ITemplateSpecsOperations.cs b/src/Resources/Resources.Management.Sdk/Generated/ITemplateSpecsOperations.cs similarity index 58% rename from src/Resources/Resources.Sdk/Generated/ITemplateSpecsOperations.cs rename to src/Resources/Resources.Management.Sdk/Generated/ITemplateSpecsOperations.cs index 8c5511ca891c..dbfab7614f73 100644 --- a/src/Resources/Resources.Sdk/Generated/ITemplateSpecsOperations.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/ITemplateSpecsOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// TemplateSpecsOperations operations. @@ -26,6 +16,9 @@ public partial interface ITemplateSpecsOperations /// /// Creates or updates a Template Spec. /// + /// + /// Creates or updates a Template Spec. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -41,19 +34,20 @@ public partial interface ITemplateSpecsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string templateSpecName, TemplateSpec templateSpec, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string templateSpecName, TemplateSpec templateSpec, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Updates Template Spec tags with specified values. /// + /// + /// Updates Template Spec tags with specified values. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -69,19 +63,20 @@ public partial interface ITemplateSpecsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string templateSpecName, TemplateSpecUpdateModel templateSpec = default(TemplateSpecUpdateModel), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string templateSpecName, TemplateSpecUpdateModel templateSpec = default(TemplateSpecUpdateModel), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets a Template Spec with a given name. /// + /// + /// Gets a Template Spec with a given name. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -89,8 +84,8 @@ public partial interface ITemplateSpecsOperations /// Name of the Template Spec. /// /// - /// Allows for expansion of additional Template Spec details in the - /// response. Optional. Possible values include: 'versions' + /// Allows for expansion of additional Template Spec details in the response. + /// Optional. /// /// /// The headers that will be added to request. @@ -98,20 +93,22 @@ public partial interface ITemplateSpecsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string resourceGroupName, string templateSpecName, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string templateSpecName, string expand = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Deletes a Template Spec by name. When operation completes, status - /// code 200 returned without content. + /// Deletes a Template Spec by name. When operation completes, status code 200 + /// returned without content. /// + /// + /// Deletes a Template Spec by name. When operation completes, status code 200 + /// returned without content. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -124,19 +121,20 @@ public partial interface ITemplateSpecsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteWithHttpMessagesAsync(string resourceGroupName, string templateSpecName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string templateSpecName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Lists all the Template Specs within the specified subscriptions. /// + /// + /// Lists all the Template Specs within the specified subscriptions. + /// /// - /// Allows for expansion of additional Template Spec details in the - /// response. Optional. Possible values include: 'versions' + /// Allows for expansion of additional Template Spec details in the response. + /// Optional. /// /// /// The headers that will be added to request. @@ -144,25 +142,26 @@ public partial interface ITemplateSpecsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListBySubscriptionWithHttpMessagesAsync(string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListBySubscriptionWithHttpMessagesAsync(string expand = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Lists all the Template Specs within the specified resource group. /// + /// + /// Lists all the Template Specs within the specified resource group. + /// /// /// The name of the resource group. The name is case insensitive. /// /// - /// Allows for expansion of additional Template Spec details in the - /// response. Optional. Possible values include: 'versions' + /// Allows for expansion of additional Template Spec details in the response. + /// Optional. /// /// /// The headers that will be added to request. @@ -170,19 +169,20 @@ public partial interface ITemplateSpecsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string expand = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Lists all the Template Specs within the specified subscriptions. /// + /// + /// Lists all the Template Specs within the specified subscriptions. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -192,19 +192,20 @@ public partial interface ITemplateSpecsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListBySubscriptionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListBySubscriptionNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Lists all the Template Specs within the specified resource group. /// + /// + /// Lists all the Template Specs within the specified resource group. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -214,15 +215,13 @@ public partial interface ITemplateSpecsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/ITenantsOperations.cs b/src/Resources/Resources.Management.Sdk/Generated/ITenantsOperations.cs similarity index 65% rename from src/Resources/Resources.Sdk/Generated/ITenantsOperations.cs rename to src/Resources/Resources.Management.Sdk/Generated/ITenantsOperations.cs index 1285c4d0da17..dd8ce9657071 100644 --- a/src/Resources/Resources.Sdk/Generated/ITenantsOperations.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/ITenantsOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// TenantsOperations operations. @@ -26,6 +16,9 @@ public partial interface ITenantsOperations /// /// Gets the tenants for your account. /// + /// + /// Gets the tenants for your account. + /// /// /// The headers that will be added to request. /// @@ -38,13 +31,14 @@ public partial interface ITenantsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets the tenants for your account. /// + /// + /// Gets the tenants for your account. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -60,9 +54,7 @@ public partial interface ITenantsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/Models/Alias.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/Alias.cs new file mode 100644 index 000000000000..48b53f637f43 --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/Alias.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Resources.Models +{ + using System.Linq; + + /// + /// The alias type. + /// + public partial class Alias + { + /// + /// Initializes a new instance of the Alias class. + /// + public Alias() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Alias class. + /// + + /// The alias name. + /// + + /// The paths for an alias. + /// + + /// The type of the alias. + /// Possible values include: 'NotSpecified', 'PlainText', 'Mask' + + /// The default path for an alias. + /// + + /// The default pattern for an alias. + /// + + /// The default alias path metadata. Applies to the default path and to any + /// alias path that doesn't have metadata + /// + public Alias(string name = default(string), System.Collections.Generic.IList paths = default(System.Collections.Generic.IList), AliasType? type = default(AliasType?), string defaultPath = default(string), AliasPattern defaultPattern = default(AliasPattern), AliasPathMetadata defaultMetadata = default(AliasPathMetadata)) + + { + this.Name = name; + this.Paths = paths; + this.Type = type; + this.DefaultPath = defaultPath; + this.DefaultPattern = defaultPattern; + this.DefaultMetadata = defaultMetadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the alias name. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } + + /// + /// Gets or sets the paths for an alias. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "paths")] + public System.Collections.Generic.IList Paths {get; set; } + + /// + /// Gets or sets the type of the alias. Possible values include: 'NotSpecified', 'PlainText', 'Mask' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public AliasType? Type {get; set; } + + /// + /// Gets or sets the default path for an alias. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "defaultPath")] + public string DefaultPath {get; set; } + + /// + /// Gets or sets the default pattern for an alias. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "defaultPattern")] + public AliasPattern DefaultPattern {get; set; } + + /// + /// Gets the default alias path metadata. Applies to the default path and to + /// any alias path that doesn't have metadata + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "defaultMetadata")] + public AliasPathMetadata DefaultMetadata {get; private set; } + } +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/AliasPath.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/AliasPath.cs similarity index 53% rename from src/Resources/Resources.Sdk/Generated/Models/AliasPath.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/AliasPath.cs index a655473ff54f..264206e0342c 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/AliasPath.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/AliasPath.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,17 +23,26 @@ public AliasPath() /// /// Initializes a new instance of the AliasPath class. /// - /// The path of an alias. - /// The API versions. - /// The pattern for an alias path. - /// The metadata of the alias path. If missing, - /// fall back to the default metadata of the alias. - public AliasPath(string path = default(string), IList apiVersions = default(IList), AliasPattern pattern = default(AliasPattern), AliasPathMetadata metadata = default(AliasPathMetadata)) + + /// The path of an alias. + /// + + /// The API versions. + /// + + /// The pattern for an alias path. + /// + + /// The metadata of the alias path. If missing, fall back to the default + /// metadata of the alias. + /// + public AliasPath(string path = default(string), System.Collections.Generic.IList apiVersions = default(System.Collections.Generic.IList), AliasPattern pattern = default(AliasPattern), AliasPathMetadata metadata = default(AliasPathMetadata)) + { - Path = path; - ApiVersions = apiVersions; - Pattern = pattern; - Metadata = metadata; + this.Path = path; + this.ApiVersions = apiVersions; + this.Pattern = pattern; + this.Metadata = metadata; CustomInit(); } @@ -50,30 +51,30 @@ public AliasPath() /// partial void CustomInit(); + /// /// Gets or sets the path of an alias. /// - [JsonProperty(PropertyName = "path")] - public string Path { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "path")] + public string Path {get; set; } /// /// Gets or sets the API versions. /// - [JsonProperty(PropertyName = "apiVersions")] - public IList ApiVersions { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "apiVersions")] + public System.Collections.Generic.IList ApiVersions {get; set; } /// /// Gets or sets the pattern for an alias path. /// - [JsonProperty(PropertyName = "pattern")] - public AliasPattern Pattern { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "pattern")] + public AliasPattern Pattern {get; set; } /// - /// Gets the metadata of the alias path. If missing, fall back to the - /// default metadata of the alias. + /// Gets the metadata of the alias path. If missing, fall back to the default + /// metadata of the alias. /// - [JsonProperty(PropertyName = "metadata")] - public AliasPathMetadata Metadata { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "metadata")] + public AliasPathMetadata Metadata {get; private set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/AliasPathAttributes.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/AliasPathAttributes.cs similarity index 83% rename from src/Resources/Resources.Sdk/Generated/Models/AliasPathAttributes.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/AliasPathAttributes.cs index 5992a064af13..63db94052ed7 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/AliasPathAttributes.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/AliasPathAttributes.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.Resources.Models /// /// Defines values for AliasPathAttributes. /// + + public static class AliasPathAttributes { /// @@ -21,9 +18,9 @@ public static class AliasPathAttributes /// public const string None = "None"; /// - /// The token that the alias path is referring to is modifiable by - /// policies with 'modify' effect. + /// The token that the alias path is referring to is modifiable by policies + /// with 'modify' effect. /// public const string Modifiable = "Modifiable"; } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/AliasPathMetadata.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/AliasPathMetadata.cs similarity index 58% rename from src/Resources/Resources.Sdk/Generated/Models/AliasPathMetadata.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/AliasPathMetadata.cs index 4fa718d80a3c..615dfe9b691e 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/AliasPathMetadata.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/AliasPathMetadata.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; public partial class AliasPathMetadata @@ -26,16 +20,18 @@ public AliasPathMetadata() /// /// Initializes a new instance of the AliasPathMetadata class. /// - /// The type of the token that the alias path is - /// referring to. Possible values include: 'NotSpecified', 'Any', - /// 'String', 'Object', 'Array', 'Integer', 'Number', 'Boolean' - /// The attributes of the token that the alias - /// path is referring to. Possible values include: 'None', - /// 'Modifiable' + + /// The type of the token that the alias path is referring to. + /// Possible values include: 'NotSpecified', 'Any', 'String', 'Object', + /// 'Array', 'Integer', 'Number', 'Boolean' + + /// The attributes of the token that the alias path is referring to. + /// Possible values include: 'None', 'Modifiable' public AliasPathMetadata(string type = default(string), string attributes = default(string)) + { - Type = type; - Attributes = attributes; + this.Type = type; + this.Attributes = attributes; CustomInit(); } @@ -44,20 +40,17 @@ public AliasPathMetadata() /// partial void CustomInit(); + /// - /// Gets the type of the token that the alias path is referring to. - /// Possible values include: 'NotSpecified', 'Any', 'String', 'Object', - /// 'Array', 'Integer', 'Number', 'Boolean' + /// Gets the type of the token that the alias path is referring to. Possible values include: 'NotSpecified', 'Any', 'String', 'Object', 'Array', 'Integer', 'Number', 'Boolean' /// - [JsonProperty(PropertyName = "type")] - public string Type { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; private set; } /// - /// Gets the attributes of the token that the alias path is referring - /// to. Possible values include: 'None', 'Modifiable' + /// Gets the attributes of the token that the alias path is referring to. Possible values include: 'None', 'Modifiable' /// - [JsonProperty(PropertyName = "attributes")] - public string Attributes { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "attributes")] + public string Attributes {get; private set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/AliasPathTokenType.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/AliasPathTokenType.cs similarity index 93% rename from src/Resources/Resources.Sdk/Generated/Models/AliasPathTokenType.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/AliasPathTokenType.cs index d013d372299d..2b2971943a4e 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/AliasPathTokenType.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/AliasPathTokenType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.Resources.Models /// /// Defines values for AliasPathTokenType. /// + + public static class AliasPathTokenType { /// @@ -49,4 +46,4 @@ public static class AliasPathTokenType /// public const string Boolean = "Boolean"; } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/AliasPattern.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/AliasPattern.cs similarity index 60% rename from src/Resources/Resources.Sdk/Generated/Models/AliasPattern.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/AliasPattern.cs index 0db278cf0c25..21fe93df6de5 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/AliasPattern.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/AliasPattern.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,15 +23,21 @@ public AliasPattern() /// /// Initializes a new instance of the AliasPattern class. /// - /// The alias pattern phrase. - /// The alias pattern variable. - /// The type of alias pattern. Possible values - /// include: 'NotSpecified', 'Extract' + + /// The alias pattern phrase. + /// + + /// The alias pattern variable. + /// + + /// The type of alias pattern + /// Possible values include: 'NotSpecified', 'Extract' public AliasPattern(string phrase = default(string), string variable = default(string), AliasPatternType? type = default(AliasPatternType?)) + { - Phrase = phrase; - Variable = variable; - Type = type; + this.Phrase = phrase; + this.Variable = variable; + this.Type = type; CustomInit(); } @@ -46,24 +46,23 @@ public AliasPattern() /// partial void CustomInit(); + /// /// Gets or sets the alias pattern phrase. /// - [JsonProperty(PropertyName = "phrase")] - public string Phrase { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "phrase")] + public string Phrase {get; set; } /// /// Gets or sets the alias pattern variable. /// - [JsonProperty(PropertyName = "variable")] - public string Variable { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "variable")] + public string Variable {get; set; } /// - /// Gets or sets the type of alias pattern. Possible values include: - /// 'NotSpecified', 'Extract' + /// Gets or sets the type of alias pattern Possible values include: 'NotSpecified', 'Extract' /// - [JsonProperty(PropertyName = "type")] - public AliasPatternType? Type { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public AliasPatternType? Type {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/AliasPatternType.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/AliasPatternType.cs similarity index 81% rename from src/Resources/Resources.Sdk/Generated/Models/AliasPatternType.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/AliasPatternType.cs index 60642ee728ef..2a67ace8386d 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/AliasPatternType.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/AliasPatternType.cs @@ -1,35 +1,28 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; /// /// Defines values for AliasPatternType. /// - [JsonConverter(typeof(StringEnumConverter))] + + + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public enum AliasPatternType { /// /// NotSpecified is not allowed. /// - [EnumMember(Value = "NotSpecified")] + [System.Runtime.Serialization.EnumMember(Value = "NotSpecified")] NotSpecified, /// /// Extract is the only allowed value. /// - [EnumMember(Value = "Extract")] + [System.Runtime.Serialization.EnumMember(Value = "Extract")] Extract } internal static class AliasPatternTypeEnumExtension @@ -38,7 +31,6 @@ internal static string ToSerializedValue(this AliasPatternType? value) { return value == null ? null : ((AliasPatternType)value).ToSerializedValue(); } - internal static string ToSerializedValue(this AliasPatternType value) { switch( value ) @@ -50,7 +42,6 @@ internal static string ToSerializedValue(this AliasPatternType value) } return null; } - internal static AliasPatternType? ParseAliasPatternType(this string value) { switch( value ) @@ -63,4 +54,4 @@ internal static string ToSerializedValue(this AliasPatternType value) return null; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/AliasType.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/AliasType.cs similarity index 81% rename from src/Resources/Resources.Sdk/Generated/Models/AliasType.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/AliasType.cs index 2c4778d0cd39..d4522b815654 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/AliasType.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/AliasType.cs @@ -1,40 +1,33 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; /// /// Defines values for AliasType. /// - [JsonConverter(typeof(StringEnumConverter))] + + + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public enum AliasType { /// /// Alias type is unknown (same as not providing alias type). /// - [EnumMember(Value = "NotSpecified")] + [System.Runtime.Serialization.EnumMember(Value = "NotSpecified")] NotSpecified, /// /// Alias value is not secret. /// - [EnumMember(Value = "PlainText")] + [System.Runtime.Serialization.EnumMember(Value = "PlainText")] PlainText, /// /// Alias value is secret. /// - [EnumMember(Value = "Mask")] + [System.Runtime.Serialization.EnumMember(Value = "Mask")] Mask } internal static class AliasTypeEnumExtension @@ -43,7 +36,6 @@ internal static string ToSerializedValue(this AliasType? value) { return value == null ? null : ((AliasType)value).ToSerializedValue(); } - internal static string ToSerializedValue(this AliasType value) { switch( value ) @@ -57,7 +49,6 @@ internal static string ToSerializedValue(this AliasType value) } return null; } - internal static AliasType? ParseAliasType(this string value) { switch( value ) @@ -72,4 +63,4 @@ internal static string ToSerializedValue(this AliasType value) return null; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ApiProfile.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ApiProfile.cs similarity index 67% rename from src/Resources/Resources.Sdk/Generated/Models/ApiProfile.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ApiProfile.cs index e8bc5f4ec665..74e67ffa19c5 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ApiProfile.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ApiProfile.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; public partial class ApiProfile @@ -26,12 +20,17 @@ public ApiProfile() /// /// Initializes a new instance of the ApiProfile class. /// - /// The profile version. - /// The API version. + + /// The profile version. + /// + + /// The API version. + /// public ApiProfile(string profileVersion = default(string), string apiVersion = default(string)) + { - ProfileVersion = profileVersion; - ApiVersion = apiVersion; + this.ProfileVersion = profileVersion; + this.ApiVersion = apiVersion; CustomInit(); } @@ -40,17 +39,17 @@ public ApiProfile() /// partial void CustomInit(); + /// /// Gets the profile version. /// - [JsonProperty(PropertyName = "profileVersion")] - public string ProfileVersion { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "profileVersion")] + public string ProfileVersion {get; private set; } /// /// Gets the API version. /// - [JsonProperty(PropertyName = "apiVersion")] - public string ApiVersion { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion {get; private set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/AuthorizationProfile.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/AuthorizationProfile.cs similarity index 58% rename from src/Resources/Resources.Sdk/Generated/Models/AuthorizationProfile.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/AuthorizationProfile.cs index 1cca3bfb036d..8c58553e80fb 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/AuthorizationProfile.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/AuthorizationProfile.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,18 +23,29 @@ public AuthorizationProfile() /// /// Initializes a new instance of the AuthorizationProfile class. /// - /// The requested time - /// The requester - /// The requester object id - /// The approved time - /// The approver + + /// The requested time + /// + + /// The requester + /// + + /// The requester object id + /// + + /// The approved time + /// + + /// The approver + /// public AuthorizationProfile(System.DateTime? requestedTime = default(System.DateTime?), string requester = default(string), string requesterObjectId = default(string), System.DateTime? approvedTime = default(System.DateTime?), string approver = default(string)) + { - RequestedTime = requestedTime; - Requester = requester; - RequesterObjectId = requesterObjectId; - ApprovedTime = approvedTime; - Approver = approver; + this.RequestedTime = requestedTime; + this.Requester = requester; + this.RequesterObjectId = requesterObjectId; + this.ApprovedTime = approvedTime; + this.Approver = approver; CustomInit(); } @@ -49,35 +54,35 @@ public AuthorizationProfile() /// partial void CustomInit(); + /// /// Gets the requested time /// - [JsonProperty(PropertyName = "requestedTime")] - public System.DateTime? RequestedTime { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "requestedTime")] + public System.DateTime? RequestedTime {get; private set; } /// /// Gets the requester /// - [JsonProperty(PropertyName = "requester")] - public string Requester { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "requester")] + public string Requester {get; private set; } /// /// Gets the requester object id /// - [JsonProperty(PropertyName = "requesterObjectId")] - public string RequesterObjectId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "requesterObjectId")] + public string RequesterObjectId {get; private set; } /// /// Gets the approved time /// - [JsonProperty(PropertyName = "approvedTime")] - public System.DateTime? ApprovedTime { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "approvedTime")] + public System.DateTime? ApprovedTime {get; private set; } /// /// Gets the approver /// - [JsonProperty(PropertyName = "approver")] - public string Approver { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "approver")] + public string Approver {get; private set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/AvailabilityZonePeers.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/AvailabilityZonePeers.cs similarity index 71% rename from src/Resources/Resources.Sdk/Generated/Models/AvailabilityZonePeers.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/AvailabilityZonePeers.cs index 47f386176876..39dc3a60abc0 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/AvailabilityZonePeers.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/AvailabilityZonePeers.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,12 +23,17 @@ public AvailabilityZonePeers() /// /// Initializes a new instance of the AvailabilityZonePeers class. /// - /// The availabilityZone. - /// Details of shared availability zone. - public AvailabilityZonePeers(string availabilityZone = default(string), IList peers = default(IList)) + + /// The availabilityZone. + /// + + /// Details of shared availability zone. + /// + public AvailabilityZonePeers(string availabilityZone = default(string), System.Collections.Generic.IList peers = default(System.Collections.Generic.IList)) + { - AvailabilityZone = availabilityZone; - Peers = peers; + this.AvailabilityZone = availabilityZone; + this.Peers = peers; CustomInit(); } @@ -45,17 +42,17 @@ public AvailabilityZonePeers() /// partial void CustomInit(); + /// /// Gets the availabilityZone. /// - [JsonProperty(PropertyName = "availabilityZone")] - public string AvailabilityZone { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "availabilityZone")] + public string AvailabilityZone {get; private set; } /// /// Gets or sets details of shared availability zone. /// - [JsonProperty(PropertyName = "peers")] - public IList Peers { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "peers")] + public System.Collections.Generic.IList Peers {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/Models/AzureCliScript.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/AzureCliScript.cs new file mode 100644 index 000000000000..7005f831622f --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/AzureCliScript.cs @@ -0,0 +1,268 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Resources.Models +{ + using System.Linq; + + /// + /// Object model for the Azure CLI script. + /// + [Newtonsoft.Json.JsonObject("AzureCLI")] + [Microsoft.Rest.Serialization.JsonTransformation] + public partial class AzureCliScript : DeploymentScript + { + /// + /// Initializes a new instance of the AzureCliScript class. + /// + public AzureCliScript() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureCliScript class. + /// + + /// String Id used to locate any resource on Azure. + /// + + /// Name of this resource. + /// + + /// Type of this resource. + /// + + /// Optional property. Managed identity to be used for this deployment script. + /// Currently, only user-assigned MSI is supported. + /// + + /// The location of the ACI and the storage account for the deployment script. + /// + + /// Resource tags. + /// + + /// The system metadata related to this resource. + /// + + /// Container settings. + /// + + /// Storage Account settings. + /// + + /// The clean up preference when the script execution gets in a terminal state. + /// Default setting is 'Always'. + /// Possible values include: 'Always', 'OnSuccess', 'OnExpiration' + + /// State of the script execution. This only appears in the response. + /// Possible values include: 'Creating', 'ProvisioningResources', 'Running', + /// 'Succeeded', 'Failed', 'Canceled' + + /// Contains the results of script execution. + /// + + /// List of script outputs. + /// + + /// Uri for the script. This is the entry point for the external script. + /// + + /// Supporting files for the external script. + /// + + /// Script body. + /// + + /// Command line arguments to pass to the script. Arguments are separated by + /// spaces. ex: -Name blue* -Location 'West US 2' + /// + + /// The environment variables to pass over to the script. + /// + + /// Gets or sets how the deployment script should be forced to execute even if + /// the script resource has not changed. Can be current time stamp or a GUID. + /// + + /// Interval for which the service retains the script resource after it reaches + /// a terminal state. Resource will be deleted when this duration expires. + /// Duration is based on ISO 8601 pattern (for example P1D means one day). + /// + + /// Maximum allowed script execution time specified in ISO 8601 format. Default + /// value is P1D + /// + + /// Azure CLI module version to be used. + /// + public AzureCliScript(string location, System.TimeSpan retentionInterval, string azCliVersion, string id = default(string), string name = default(string), string type = default(string), ManagedServiceIdentity identity = default(ManagedServiceIdentity), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), SystemData systemData = default(SystemData), ContainerConfiguration containerSettings = default(ContainerConfiguration), StorageAccountConfiguration storageAccountSettings = default(StorageAccountConfiguration), string cleanupPreference = default(string), string provisioningState = default(string), ScriptStatus status = default(ScriptStatus), System.Collections.Generic.IDictionary outputs = default(System.Collections.Generic.IDictionary), string primaryScriptUri = default(string), System.Collections.Generic.IList supportingScriptUris = default(System.Collections.Generic.IList), string scriptContent = default(string), string arguments = default(string), System.Collections.Generic.IList environmentVariables = default(System.Collections.Generic.IList), string forceUpdateTag = default(string), System.TimeSpan? timeout = default(System.TimeSpan?)) + + : base(location, id, name, type, identity, tags, systemData) + { + this.ContainerSettings = containerSettings; + this.StorageAccountSettings = storageAccountSettings; + this.CleanupPreference = cleanupPreference; + this.ProvisioningState = provisioningState; + this.Status = status; + this.Outputs = outputs; + this.PrimaryScriptUri = primaryScriptUri; + this.SupportingScriptUris = supportingScriptUris; + this.ScriptContent = scriptContent; + this.Arguments = arguments; + this.EnvironmentVariables = environmentVariables; + this.ForceUpdateTag = forceUpdateTag; + this.RetentionInterval = retentionInterval; + this.Timeout = timeout; + this.AzCliVersion = azCliVersion; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets container settings. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.containerSettings")] + public ContainerConfiguration ContainerSettings {get; set; } + + /// + /// Gets or sets storage Account settings. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.storageAccountSettings")] + public StorageAccountConfiguration StorageAccountSettings {get; set; } + + /// + /// Gets or sets the clean up preference when the script execution gets in a + /// terminal state. Default setting is 'Always'. Possible values include: 'Always', 'OnSuccess', 'OnExpiration' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.cleanupPreference")] + public string CleanupPreference {get; set; } + + /// + /// Gets state of the script execution. This only appears in the response. Possible values include: 'Creating', 'ProvisioningResources', 'Running', 'Succeeded', 'Failed', 'Canceled' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.provisioningState")] + public string ProvisioningState {get; private set; } + + /// + /// Gets contains the results of script execution. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.status")] + public ScriptStatus Status {get; private set; } + + /// + /// Gets list of script outputs. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.outputs")] + public System.Collections.Generic.IDictionary Outputs {get; private set; } + + /// + /// Gets or sets uri for the script. This is the entry point for the external + /// script. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.primaryScriptUri")] + public string PrimaryScriptUri {get; set; } + + /// + /// Gets or sets supporting files for the external script. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.supportingScriptUris")] + public System.Collections.Generic.IList SupportingScriptUris {get; set; } + + /// + /// Gets or sets script body. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.scriptContent")] + public string ScriptContent {get; set; } + + /// + /// Gets or sets command line arguments to pass to the script. Arguments are + /// separated by spaces. ex: -Name blue* -Location 'West US 2' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.arguments")] + public string Arguments {get; set; } + + /// + /// Gets or sets the environment variables to pass over to the script. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.environmentVariables")] + public System.Collections.Generic.IList EnvironmentVariables {get; set; } + + /// + /// Gets or sets gets or sets how the deployment script should be forced to + /// execute even if the script resource has not changed. Can be current time + /// stamp or a GUID. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.forceUpdateTag")] + public string ForceUpdateTag {get; set; } + + /// + /// Gets or sets interval for which the service retains the script resource + /// after it reaches a terminal state. Resource will be deleted when this + /// duration expires. Duration is based on ISO 8601 pattern (for example P1D + /// means one day). + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.retentionInterval")] + public System.TimeSpan RetentionInterval {get; set; } + + /// + /// Gets or sets maximum allowed script execution time specified in ISO 8601 + /// format. Default value is P1D + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.timeout")] + public System.TimeSpan? Timeout {get; set; } + + /// + /// Gets or sets azure CLI module version to be used. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.azCliVersion")] + public string AzCliVersion {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (this.AzCliVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "AzCliVersion"); + } + if (this.ContainerSettings != null) + { + this.ContainerSettings.Validate(); + } + + + + + + + + + + if (this.EnvironmentVariables != null) + { + foreach (var element in this.EnvironmentVariables) + { + if (element != null) + { + element.Validate(); + } + } + } + + + } + } +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/Models/AzureCliScriptProperties.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/AzureCliScriptProperties.cs new file mode 100644 index 000000000000..a0d25a2cbb54 --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/AzureCliScriptProperties.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Resources.Models +{ + using System.Linq; + + /// + /// Properties of the Azure CLI script object. + /// + public partial class AzureCliScriptProperties + { + /// + /// Initializes a new instance of the AzureCliScriptProperties class. + /// + public AzureCliScriptProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureCliScriptProperties class. + /// + + /// Container settings. + /// + + /// Storage Account settings. + /// + + /// The clean up preference when the script execution gets in a terminal state. + /// Default setting is 'Always'. + /// Possible values include: 'Always', 'OnSuccess', 'OnExpiration' + + /// State of the script execution. This only appears in the response. + /// Possible values include: 'Creating', 'ProvisioningResources', 'Running', + /// 'Succeeded', 'Failed', 'Canceled' + + /// Contains the results of script execution. + /// + + /// List of script outputs. + /// + + /// Uri for the script. This is the entry point for the external script. + /// + + /// Supporting files for the external script. + /// + + /// Script body. + /// + + /// Command line arguments to pass to the script. Arguments are separated by + /// spaces. ex: -Name blue* -Location 'West US 2' + /// + + /// The environment variables to pass over to the script. + /// + + /// Gets or sets how the deployment script should be forced to execute even if + /// the script resource has not changed. Can be current time stamp or a GUID. + /// + + /// Interval for which the service retains the script resource after it reaches + /// a terminal state. Resource will be deleted when this duration expires. + /// Duration is based on ISO 8601 pattern (for example P1D means one day). + /// + + /// Maximum allowed script execution time specified in ISO 8601 format. Default + /// value is P1D + /// + + /// Azure CLI module version to be used. + /// + public AzureCliScriptProperties(System.TimeSpan retentionInterval, string azCliVersion, ContainerConfiguration containerSettings = default(ContainerConfiguration), StorageAccountConfiguration storageAccountSettings = default(StorageAccountConfiguration), string cleanupPreference = default(string), string provisioningState = default(string), ScriptStatus status = default(ScriptStatus), System.Collections.Generic.IDictionary outputs = default(System.Collections.Generic.IDictionary), string primaryScriptUri = default(string), System.Collections.Generic.IList supportingScriptUris = default(System.Collections.Generic.IList), string scriptContent = default(string), string arguments = default(string), System.Collections.Generic.IList environmentVariables = default(System.Collections.Generic.IList), string forceUpdateTag = default(string), System.TimeSpan? timeout = default(System.TimeSpan?)) + + { + this.ContainerSettings = containerSettings; + this.StorageAccountSettings = storageAccountSettings; + this.CleanupPreference = cleanupPreference; + this.ProvisioningState = provisioningState; + this.Status = status; + this.Outputs = outputs; + this.PrimaryScriptUri = primaryScriptUri; + this.SupportingScriptUris = supportingScriptUris; + this.ScriptContent = scriptContent; + this.Arguments = arguments; + this.EnvironmentVariables = environmentVariables; + this.ForceUpdateTag = forceUpdateTag; + this.RetentionInterval = retentionInterval; + this.Timeout = timeout; + this.AzCliVersion = azCliVersion; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets container settings. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "containerSettings")] + public ContainerConfiguration ContainerSettings {get; set; } + + /// + /// Gets or sets storage Account settings. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "storageAccountSettings")] + public StorageAccountConfiguration StorageAccountSettings {get; set; } + + /// + /// Gets or sets the clean up preference when the script execution gets in a + /// terminal state. Default setting is 'Always'. Possible values include: 'Always', 'OnSuccess', 'OnExpiration' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "cleanupPreference")] + public string CleanupPreference {get; set; } + + /// + /// Gets state of the script execution. This only appears in the response. Possible values include: 'Creating', 'ProvisioningResources', 'Running', 'Succeeded', 'Failed', 'Canceled' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "provisioningState")] + public string ProvisioningState {get; private set; } + + /// + /// Gets contains the results of script execution. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public ScriptStatus Status {get; private set; } + + /// + /// Gets list of script outputs. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "outputs")] + public System.Collections.Generic.IDictionary Outputs {get; private set; } + + /// + /// Gets or sets uri for the script. This is the entry point for the external + /// script. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "primaryScriptUri")] + public string PrimaryScriptUri {get; set; } + + /// + /// Gets or sets supporting files for the external script. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "supportingScriptUris")] + public System.Collections.Generic.IList SupportingScriptUris {get; set; } + + /// + /// Gets or sets script body. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "scriptContent")] + public string ScriptContent {get; set; } + + /// + /// Gets or sets command line arguments to pass to the script. Arguments are + /// separated by spaces. ex: -Name blue* -Location 'West US 2' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "arguments")] + public string Arguments {get; set; } + + /// + /// Gets or sets the environment variables to pass over to the script. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "environmentVariables")] + public System.Collections.Generic.IList EnvironmentVariables {get; set; } + + /// + /// Gets or sets gets or sets how the deployment script should be forced to + /// execute even if the script resource has not changed. Can be current time + /// stamp or a GUID. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "forceUpdateTag")] + public string ForceUpdateTag {get; set; } + + /// + /// Gets or sets interval for which the service retains the script resource + /// after it reaches a terminal state. Resource will be deleted when this + /// duration expires. Duration is based on ISO 8601 pattern (for example P1D + /// means one day). + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "retentionInterval")] + public System.TimeSpan RetentionInterval {get; set; } + + /// + /// Gets or sets maximum allowed script execution time specified in ISO 8601 + /// format. Default value is P1D + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "timeout")] + public System.TimeSpan? Timeout {get; set; } + + /// + /// Gets or sets azure CLI module version to be used. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "azCliVersion")] + public string AzCliVersion {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.AzCliVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "AzCliVersion"); + } + if (this.ContainerSettings != null) + { + this.ContainerSettings.Validate(); + } + + + + + + + + + + if (this.EnvironmentVariables != null) + { + foreach (var element in this.EnvironmentVariables) + { + if (element != null) + { + element.Validate(); + } + } + } + + + } + } +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/Models/AzurePowerShellScript.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/AzurePowerShellScript.cs new file mode 100644 index 000000000000..4e9172613852 --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/AzurePowerShellScript.cs @@ -0,0 +1,268 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Resources.Models +{ + using System.Linq; + + /// + /// Object model for the Azure PowerShell script. + /// + [Newtonsoft.Json.JsonObject("AzurePowerShell")] + [Microsoft.Rest.Serialization.JsonTransformation] + public partial class AzurePowerShellScript : DeploymentScript + { + /// + /// Initializes a new instance of the AzurePowerShellScript class. + /// + public AzurePowerShellScript() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzurePowerShellScript class. + /// + + /// String Id used to locate any resource on Azure. + /// + + /// Name of this resource. + /// + + /// Type of this resource. + /// + + /// Optional property. Managed identity to be used for this deployment script. + /// Currently, only user-assigned MSI is supported. + /// + + /// The location of the ACI and the storage account for the deployment script. + /// + + /// Resource tags. + /// + + /// The system metadata related to this resource. + /// + + /// Container settings. + /// + + /// Storage Account settings. + /// + + /// The clean up preference when the script execution gets in a terminal state. + /// Default setting is 'Always'. + /// Possible values include: 'Always', 'OnSuccess', 'OnExpiration' + + /// State of the script execution. This only appears in the response. + /// Possible values include: 'Creating', 'ProvisioningResources', 'Running', + /// 'Succeeded', 'Failed', 'Canceled' + + /// Contains the results of script execution. + /// + + /// List of script outputs. + /// + + /// Uri for the script. This is the entry point for the external script. + /// + + /// Supporting files for the external script. + /// + + /// Script body. + /// + + /// Command line arguments to pass to the script. Arguments are separated by + /// spaces. ex: -Name blue* -Location 'West US 2' + /// + + /// The environment variables to pass over to the script. + /// + + /// Gets or sets how the deployment script should be forced to execute even if + /// the script resource has not changed. Can be current time stamp or a GUID. + /// + + /// Interval for which the service retains the script resource after it reaches + /// a terminal state. Resource will be deleted when this duration expires. + /// Duration is based on ISO 8601 pattern (for example P1D means one day). + /// + + /// Maximum allowed script execution time specified in ISO 8601 format. Default + /// value is P1D + /// + + /// Azure PowerShell module version to be used. + /// + public AzurePowerShellScript(string location, System.TimeSpan retentionInterval, string azPowerShellVersion, string id = default(string), string name = default(string), string type = default(string), ManagedServiceIdentity identity = default(ManagedServiceIdentity), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), SystemData systemData = default(SystemData), ContainerConfiguration containerSettings = default(ContainerConfiguration), StorageAccountConfiguration storageAccountSettings = default(StorageAccountConfiguration), string cleanupPreference = default(string), string provisioningState = default(string), ScriptStatus status = default(ScriptStatus), System.Collections.Generic.IDictionary outputs = default(System.Collections.Generic.IDictionary), string primaryScriptUri = default(string), System.Collections.Generic.IList supportingScriptUris = default(System.Collections.Generic.IList), string scriptContent = default(string), string arguments = default(string), System.Collections.Generic.IList environmentVariables = default(System.Collections.Generic.IList), string forceUpdateTag = default(string), System.TimeSpan? timeout = default(System.TimeSpan?)) + + : base(location, id, name, type, identity, tags, systemData) + { + this.ContainerSettings = containerSettings; + this.StorageAccountSettings = storageAccountSettings; + this.CleanupPreference = cleanupPreference; + this.ProvisioningState = provisioningState; + this.Status = status; + this.Outputs = outputs; + this.PrimaryScriptUri = primaryScriptUri; + this.SupportingScriptUris = supportingScriptUris; + this.ScriptContent = scriptContent; + this.Arguments = arguments; + this.EnvironmentVariables = environmentVariables; + this.ForceUpdateTag = forceUpdateTag; + this.RetentionInterval = retentionInterval; + this.Timeout = timeout; + this.AzPowerShellVersion = azPowerShellVersion; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets container settings. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.containerSettings")] + public ContainerConfiguration ContainerSettings {get; set; } + + /// + /// Gets or sets storage Account settings. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.storageAccountSettings")] + public StorageAccountConfiguration StorageAccountSettings {get; set; } + + /// + /// Gets or sets the clean up preference when the script execution gets in a + /// terminal state. Default setting is 'Always'. Possible values include: 'Always', 'OnSuccess', 'OnExpiration' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.cleanupPreference")] + public string CleanupPreference {get; set; } + + /// + /// Gets state of the script execution. This only appears in the response. Possible values include: 'Creating', 'ProvisioningResources', 'Running', 'Succeeded', 'Failed', 'Canceled' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.provisioningState")] + public string ProvisioningState {get; private set; } + + /// + /// Gets contains the results of script execution. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.status")] + public ScriptStatus Status {get; private set; } + + /// + /// Gets list of script outputs. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.outputs")] + public System.Collections.Generic.IDictionary Outputs {get; private set; } + + /// + /// Gets or sets uri for the script. This is the entry point for the external + /// script. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.primaryScriptUri")] + public string PrimaryScriptUri {get; set; } + + /// + /// Gets or sets supporting files for the external script. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.supportingScriptUris")] + public System.Collections.Generic.IList SupportingScriptUris {get; set; } + + /// + /// Gets or sets script body. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.scriptContent")] + public string ScriptContent {get; set; } + + /// + /// Gets or sets command line arguments to pass to the script. Arguments are + /// separated by spaces. ex: -Name blue* -Location 'West US 2' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.arguments")] + public string Arguments {get; set; } + + /// + /// Gets or sets the environment variables to pass over to the script. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.environmentVariables")] + public System.Collections.Generic.IList EnvironmentVariables {get; set; } + + /// + /// Gets or sets gets or sets how the deployment script should be forced to + /// execute even if the script resource has not changed. Can be current time + /// stamp or a GUID. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.forceUpdateTag")] + public string ForceUpdateTag {get; set; } + + /// + /// Gets or sets interval for which the service retains the script resource + /// after it reaches a terminal state. Resource will be deleted when this + /// duration expires. Duration is based on ISO 8601 pattern (for example P1D + /// means one day). + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.retentionInterval")] + public System.TimeSpan RetentionInterval {get; set; } + + /// + /// Gets or sets maximum allowed script execution time specified in ISO 8601 + /// format. Default value is P1D + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.timeout")] + public System.TimeSpan? Timeout {get; set; } + + /// + /// Gets or sets azure PowerShell module version to be used. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.azPowerShellVersion")] + public string AzPowerShellVersion {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (this.AzPowerShellVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "AzPowerShellVersion"); + } + if (this.ContainerSettings != null) + { + this.ContainerSettings.Validate(); + } + + + + + + + + + + if (this.EnvironmentVariables != null) + { + foreach (var element in this.EnvironmentVariables) + { + if (element != null) + { + element.Validate(); + } + } + } + + + } + } +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/Models/AzurePowerShellScriptProperties.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/AzurePowerShellScriptProperties.cs new file mode 100644 index 000000000000..aad7caa49352 --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/AzurePowerShellScriptProperties.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Resources.Models +{ + using System.Linq; + + /// + /// Properties of the Azure PowerShell script object. + /// + public partial class AzurePowerShellScriptProperties + { + /// + /// Initializes a new instance of the AzurePowerShellScriptProperties class. + /// + public AzurePowerShellScriptProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzurePowerShellScriptProperties class. + /// + + /// Container settings. + /// + + /// Storage Account settings. + /// + + /// The clean up preference when the script execution gets in a terminal state. + /// Default setting is 'Always'. + /// Possible values include: 'Always', 'OnSuccess', 'OnExpiration' + + /// State of the script execution. This only appears in the response. + /// Possible values include: 'Creating', 'ProvisioningResources', 'Running', + /// 'Succeeded', 'Failed', 'Canceled' + + /// Contains the results of script execution. + /// + + /// List of script outputs. + /// + + /// Uri for the script. This is the entry point for the external script. + /// + + /// Supporting files for the external script. + /// + + /// Script body. + /// + + /// Command line arguments to pass to the script. Arguments are separated by + /// spaces. ex: -Name blue* -Location 'West US 2' + /// + + /// The environment variables to pass over to the script. + /// + + /// Gets or sets how the deployment script should be forced to execute even if + /// the script resource has not changed. Can be current time stamp or a GUID. + /// + + /// Interval for which the service retains the script resource after it reaches + /// a terminal state. Resource will be deleted when this duration expires. + /// Duration is based on ISO 8601 pattern (for example P1D means one day). + /// + + /// Maximum allowed script execution time specified in ISO 8601 format. Default + /// value is P1D + /// + + /// Azure PowerShell module version to be used. + /// + public AzurePowerShellScriptProperties(System.TimeSpan retentionInterval, string azPowerShellVersion, ContainerConfiguration containerSettings = default(ContainerConfiguration), StorageAccountConfiguration storageAccountSettings = default(StorageAccountConfiguration), string cleanupPreference = default(string), string provisioningState = default(string), ScriptStatus status = default(ScriptStatus), System.Collections.Generic.IDictionary outputs = default(System.Collections.Generic.IDictionary), string primaryScriptUri = default(string), System.Collections.Generic.IList supportingScriptUris = default(System.Collections.Generic.IList), string scriptContent = default(string), string arguments = default(string), System.Collections.Generic.IList environmentVariables = default(System.Collections.Generic.IList), string forceUpdateTag = default(string), System.TimeSpan? timeout = default(System.TimeSpan?)) + + { + this.ContainerSettings = containerSettings; + this.StorageAccountSettings = storageAccountSettings; + this.CleanupPreference = cleanupPreference; + this.ProvisioningState = provisioningState; + this.Status = status; + this.Outputs = outputs; + this.PrimaryScriptUri = primaryScriptUri; + this.SupportingScriptUris = supportingScriptUris; + this.ScriptContent = scriptContent; + this.Arguments = arguments; + this.EnvironmentVariables = environmentVariables; + this.ForceUpdateTag = forceUpdateTag; + this.RetentionInterval = retentionInterval; + this.Timeout = timeout; + this.AzPowerShellVersion = azPowerShellVersion; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets container settings. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "containerSettings")] + public ContainerConfiguration ContainerSettings {get; set; } + + /// + /// Gets or sets storage Account settings. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "storageAccountSettings")] + public StorageAccountConfiguration StorageAccountSettings {get; set; } + + /// + /// Gets or sets the clean up preference when the script execution gets in a + /// terminal state. Default setting is 'Always'. Possible values include: 'Always', 'OnSuccess', 'OnExpiration' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "cleanupPreference")] + public string CleanupPreference {get; set; } + + /// + /// Gets state of the script execution. This only appears in the response. Possible values include: 'Creating', 'ProvisioningResources', 'Running', 'Succeeded', 'Failed', 'Canceled' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "provisioningState")] + public string ProvisioningState {get; private set; } + + /// + /// Gets contains the results of script execution. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public ScriptStatus Status {get; private set; } + + /// + /// Gets list of script outputs. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "outputs")] + public System.Collections.Generic.IDictionary Outputs {get; private set; } + + /// + /// Gets or sets uri for the script. This is the entry point for the external + /// script. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "primaryScriptUri")] + public string PrimaryScriptUri {get; set; } + + /// + /// Gets or sets supporting files for the external script. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "supportingScriptUris")] + public System.Collections.Generic.IList SupportingScriptUris {get; set; } + + /// + /// Gets or sets script body. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "scriptContent")] + public string ScriptContent {get; set; } + + /// + /// Gets or sets command line arguments to pass to the script. Arguments are + /// separated by spaces. ex: -Name blue* -Location 'West US 2' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "arguments")] + public string Arguments {get; set; } + + /// + /// Gets or sets the environment variables to pass over to the script. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "environmentVariables")] + public System.Collections.Generic.IList EnvironmentVariables {get; set; } + + /// + /// Gets or sets gets or sets how the deployment script should be forced to + /// execute even if the script resource has not changed. Can be current time + /// stamp or a GUID. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "forceUpdateTag")] + public string ForceUpdateTag {get; set; } + + /// + /// Gets or sets interval for which the service retains the script resource + /// after it reaches a terminal state. Resource will be deleted when this + /// duration expires. Duration is based on ISO 8601 pattern (for example P1D + /// means one day). + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "retentionInterval")] + public System.TimeSpan RetentionInterval {get; set; } + + /// + /// Gets or sets maximum allowed script execution time specified in ISO 8601 + /// format. Default value is P1D + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "timeout")] + public System.TimeSpan? Timeout {get; set; } + + /// + /// Gets or sets azure PowerShell module version to be used. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "azPowerShellVersion")] + public string AzPowerShellVersion {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.AzPowerShellVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "AzPowerShellVersion"); + } + if (this.ContainerSettings != null) + { + this.ContainerSettings.Validate(); + } + + + + + + + + + + if (this.EnvironmentVariables != null) + { + foreach (var element in this.EnvironmentVariables) + { + if (element != null) + { + element.Validate(); + } + } + } + + + } + } +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/AzureResourceBase.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/AzureResourceBase.cs similarity index 61% rename from src/Resources/Resources.Sdk/Generated/Models/AzureResourceBase.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/AzureResourceBase.cs index 3f6ab30ea648..6949bc20cf49 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/AzureResourceBase.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/AzureResourceBase.cs @@ -1,24 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Newtonsoft.Json; using System.Linq; /// /// Common properties for all Azure resources. /// - public partial class AzureResourceBase : IResource + public partial class AzureResourceBase : Microsoft.Rest.Azure.IResource { /// /// Initializes a new instance of the AzureResourceBase class. @@ -31,18 +23,26 @@ public AzureResourceBase() /// /// Initializes a new instance of the AzureResourceBase class. /// - /// String Id used to locate any resource on - /// Azure. - /// Name of this resource. - /// Type of this resource. - /// Azure Resource Manager metadata containing - /// createdBy and modifiedBy information. + + /// String Id used to locate any resource on Azure. + /// + + /// Name of this resource. + /// + + /// Type of this resource. + /// + + /// Azure Resource Manager metadata containing createdBy and modifiedBy + /// information. + /// public AzureResourceBase(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData)) + { - Id = id; - Name = name; - Type = type; - SystemData = systemData; + this.Id = id; + this.Name = name; + this.Type = type; + this.SystemData = systemData; CustomInit(); } @@ -51,30 +51,30 @@ public AzureResourceBase() /// partial void CustomInit(); + /// /// Gets string Id used to locate any resource on Azure. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; private set; } /// /// Gets name of this resource. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; private set; } /// /// Gets type of this resource. /// - [JsonProperty(PropertyName = "type")] - public string Type { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; private set; } /// - /// Gets azure Resource Manager metadata containing createdBy and - /// modifiedBy information. + /// Gets azure Resource Manager metadata containing createdBy and modifiedBy + /// information. /// - [JsonProperty(PropertyName = "systemData")] - public SystemData SystemData { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "systemData")] + public SystemData SystemData {get; private set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/BasicDependency.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/BasicDependency.cs similarity index 70% rename from src/Resources/Resources.Sdk/Generated/Models/BasicDependency.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/BasicDependency.cs index fe7a68898552..0893c34de94f 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/BasicDependency.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/BasicDependency.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,14 +23,21 @@ public BasicDependency() /// /// Initializes a new instance of the BasicDependency class. /// - /// The ID of the dependency. - /// The dependency resource type. - /// The dependency resource name. + + /// The ID of the dependency. + /// + + /// The dependency resource type. + /// + + /// The dependency resource name. + /// public BasicDependency(string id = default(string), string resourceType = default(string), string resourceName = default(string)) + { - Id = id; - ResourceType = resourceType; - ResourceName = resourceName; + this.Id = id; + this.ResourceType = resourceType; + this.ResourceName = resourceName; CustomInit(); } @@ -45,23 +46,23 @@ public BasicDependency() /// partial void CustomInit(); + /// /// Gets or sets the ID of the dependency. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; set; } /// /// Gets or sets the dependency resource type. /// - [JsonProperty(PropertyName = "resourceType")] - public string ResourceType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resourceType")] + public string ResourceType {get; set; } /// /// Gets or sets the dependency resource name. /// - [JsonProperty(PropertyName = "resourceName")] - public string ResourceName { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "resourceName")] + public string ResourceName {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ChangeType.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ChangeType.cs similarity index 68% rename from src/Resources/Resources.Sdk/Generated/Models/ChangeType.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ChangeType.cs index 2daa63b962c9..b74ac66dee9f 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ChangeType.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ChangeType.cs @@ -1,72 +1,64 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; /// /// Defines values for ChangeType. /// - [JsonConverter(typeof(StringEnumConverter))] + + + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public enum ChangeType { /// - /// The resource does not exist in the current state but is present in - /// the desired state. The resource will be created when the deployment - /// is executed. + /// The resource does not exist in the current state but is present in the + /// desired state. The resource will be created when the deployment is + /// executed. /// - [EnumMember(Value = "Create")] + [System.Runtime.Serialization.EnumMember(Value = "Create")] Create, /// - /// The resource exists in the current state and is missing from the - /// desired state. The resource will be deleted when the deployment is - /// executed. + /// The resource exists in the current state and is missing from the desired + /// state. The resource will be deleted when the deployment is executed. /// - [EnumMember(Value = "Delete")] + [System.Runtime.Serialization.EnumMember(Value = "Delete")] Delete, /// - /// The resource exists in the current state and is missing from the - /// desired state. The resource will not be deployed or modified when - /// the deployment is executed. + /// The resource exists in the current state and is missing from the desired + /// state. The resource will not be deployed or modified when the deployment is + /// executed. /// - [EnumMember(Value = "Ignore")] + [System.Runtime.Serialization.EnumMember(Value = "Ignore")] Ignore, /// - /// The resource exists in the current state and the desired state and - /// will be redeployed when the deployment is executed. The properties - /// of the resource may or may not change. + /// The resource exists in the current state and the desired state and will be + /// redeployed when the deployment is executed. The properties of the resource + /// may or may not change. /// - [EnumMember(Value = "Deploy")] + [System.Runtime.Serialization.EnumMember(Value = "Deploy")] Deploy, /// - /// The resource exists in the current state and the desired state and - /// will be redeployed when the deployment is executed. The properties - /// of the resource will not change. + /// The resource exists in the current state and the desired state and will be + /// redeployed when the deployment is executed. The properties of the resource + /// will not change. /// - [EnumMember(Value = "NoChange")] + [System.Runtime.Serialization.EnumMember(Value = "NoChange")] NoChange, /// - /// The resource exists in the current state and the desired state and - /// will be redeployed when the deployment is executed. The properties - /// of the resource will change. + /// The resource exists in the current state and the desired state and will be + /// redeployed when the deployment is executed. The properties of the resource + /// will change. /// - [EnumMember(Value = "Modify")] + [System.Runtime.Serialization.EnumMember(Value = "Modify")] Modify, /// /// The resource is not supported by What-If. /// - [EnumMember(Value = "Unsupported")] + [System.Runtime.Serialization.EnumMember(Value = "Unsupported")] Unsupported } internal static class ChangeTypeEnumExtension @@ -75,7 +67,6 @@ internal static string ToSerializedValue(this ChangeType? value) { return value == null ? null : ((ChangeType)value).ToSerializedValue(); } - internal static string ToSerializedValue(this ChangeType value) { switch( value ) @@ -97,7 +88,6 @@ internal static string ToSerializedValue(this ChangeType value) } return null; } - internal static ChangeType? ParseChangeType(this string value) { switch( value ) @@ -120,4 +110,4 @@ internal static string ToSerializedValue(this ChangeType value) return null; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/CheckResourceNameResult.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/CheckResourceNameResult.cs similarity index 67% rename from src/Resources/Resources.Sdk/Generated/Models/CheckResourceNameResult.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/CheckResourceNameResult.cs index a9f16cb7a43b..3964d220142e 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/CheckResourceNameResult.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/CheckResourceNameResult.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,15 +24,21 @@ public CheckResourceNameResult() /// /// Initializes a new instance of the CheckResourceNameResult class. /// - /// Name of Resource - /// Type of Resource - /// Is the resource name Allowed or Reserved. - /// Possible values include: 'Allowed', 'Reserved' + + /// Name of Resource + /// + + /// Type of Resource + /// + + /// Is the resource name Allowed or Reserved + /// Possible values include: 'Allowed', 'Reserved' public CheckResourceNameResult(string name = default(string), string type = default(string), string status = default(string)) + { - Name = name; - Type = type; - Status = status; + this.Name = name; + this.Type = type; + this.Status = status; CustomInit(); } @@ -47,24 +47,23 @@ public CheckResourceNameResult() /// partial void CustomInit(); + /// /// Gets or sets name of Resource /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } /// /// Gets or sets type of Resource /// - [JsonProperty(PropertyName = "type")] - public string Type { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; set; } /// - /// Gets or sets is the resource name Allowed or Reserved. Possible - /// values include: 'Allowed', 'Reserved' + /// Gets or sets is the resource name Allowed or Reserved Possible values include: 'Allowed', 'Reserved' /// - [JsonProperty(PropertyName = "status")] - public string Status { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public string Status {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/CheckZonePeersRequest.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/CheckZonePeersRequest.cs similarity index 67% rename from src/Resources/Resources.Sdk/Generated/Models/CheckZonePeersRequest.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/CheckZonePeersRequest.cs index c8a4f05f9aad..6f03e6204069 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/CheckZonePeersRequest.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/CheckZonePeersRequest.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,13 +23,17 @@ public CheckZonePeersRequest() /// /// Initializes a new instance of the CheckZonePeersRequest class. /// - /// The Microsoft location. - /// The peer Microsoft Azure subscription - /// ID. - public CheckZonePeersRequest(string location = default(string), IList subscriptionIds = default(IList)) + + /// The Microsoft location. + /// + + /// The peer Microsoft Azure subscription ID. + /// + public CheckZonePeersRequest(string location = default(string), System.Collections.Generic.IList subscriptionIds = default(System.Collections.Generic.IList)) + { - Location = location; - SubscriptionIds = subscriptionIds; + this.Location = location; + this.SubscriptionIds = subscriptionIds; CustomInit(); } @@ -46,17 +42,17 @@ public CheckZonePeersRequest() /// partial void CustomInit(); + /// /// Gets or sets the Microsoft location. /// - [JsonProperty(PropertyName = "location")] - public string Location { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "location")] + public string Location {get; set; } /// /// Gets or sets the peer Microsoft Azure subscription ID. /// - [JsonProperty(PropertyName = "subscriptionIds")] - public IList SubscriptionIds { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "subscriptionIds")] + public System.Collections.Generic.IList SubscriptionIds {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/CheckZonePeersResult.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/CheckZonePeersResult.cs similarity index 60% rename from src/Resources/Resources.Sdk/Generated/Models/CheckZonePeersResult.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/CheckZonePeersResult.cs index 03e0a450fe13..fb5dc09b8e0d 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/CheckZonePeersResult.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/CheckZonePeersResult.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,15 +23,21 @@ public CheckZonePeersResult() /// /// Initializes a new instance of the CheckZonePeersResult class. /// - /// The subscription ID. - /// the location of the subscription. - /// The Availability Zones shared - /// by the subscriptions. - public CheckZonePeersResult(string subscriptionId = default(string), string location = default(string), IList availabilityZonePeers = default(IList)) + + /// The subscription ID. + /// + + /// the location of the subscription. + /// + + /// The Availability Zones shared by the subscriptions. + /// + public CheckZonePeersResult(string subscriptionId = default(string), string location = default(string), System.Collections.Generic.IList availabilityZonePeers = default(System.Collections.Generic.IList)) + { - SubscriptionId = subscriptionId; - Location = location; - AvailabilityZonePeers = availabilityZonePeers; + this.SubscriptionId = subscriptionId; + this.Location = location; + this.AvailabilityZonePeers = availabilityZonePeers; CustomInit(); } @@ -48,23 +46,23 @@ public CheckZonePeersResult() /// partial void CustomInit(); + /// /// Gets the subscription ID. /// - [JsonProperty(PropertyName = "subscriptionId")] - public string SubscriptionId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "subscriptionId")] + public string SubscriptionId {get; private set; } /// /// Gets or sets the location of the subscription. /// - [JsonProperty(PropertyName = "location")] - public string Location { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "location")] + public string Location {get; set; } /// /// Gets or sets the Availability Zones shared by the subscriptions. /// - [JsonProperty(PropertyName = "availabilityZonePeers")] - public IList AvailabilityZonePeers { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "availabilityZonePeers")] + public System.Collections.Generic.IList AvailabilityZonePeers {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/CleanupOptions.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/CleanupOptions.cs similarity index 85% rename from src/Resources/Resources.Sdk/Generated/Models/CleanupOptions.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/CleanupOptions.cs index 8b268c953fa8..0e3e8aaf35fc 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/CleanupOptions.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/CleanupOptions.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.Resources.Models /// /// Defines values for CleanupOptions. /// + + public static class CleanupOptions { public const string Always = "Always"; public const string OnSuccess = "OnSuccess"; public const string OnExpiration = "OnExpiration"; } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/Models/ContainerConfiguration.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ContainerConfiguration.cs new file mode 100644 index 000000000000..999b7745f0f8 --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ContainerConfiguration.cs @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Resources.Models +{ + using System.Linq; + + /// + /// Settings to customize ACI container instance. + /// + public partial class ContainerConfiguration + { + /// + /// Initializes a new instance of the ContainerConfiguration class. + /// + public ContainerConfiguration() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ContainerConfiguration class. + /// + + /// Container group name, if not specified then the name will get + /// auto-generated. Not specifying a 'containerGroupName' indicates the system + /// to generate a unique name which might end up flagging an Azure Policy as + /// non-compliant. Use 'containerGroupName' when you have an Azure Policy that + /// expects a specific naming convention or when you want to fully control the + /// name. 'containerGroupName' property must be between 1 and 63 characters + /// long, must contain only lowercase letters, numbers, and dashes and it + /// cannot start or end with a dash and consecutive dashes are not allowed. To + /// specify a 'containerGroupName', add the following object to properties: { + /// "containerSettings": { "containerGroupName": "contoso-container" } }. If + /// you do not want to specify a 'containerGroupName' then do not add + /// 'containerSettings' property. + /// + public ContainerConfiguration(string containerGroupName = default(string)) + + { + this.ContainerGroupName = containerGroupName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets container group name, if not specified then the name will get + /// auto-generated. Not specifying a 'containerGroupName' indicates the system + /// to generate a unique name which might end up flagging an Azure Policy as + /// non-compliant. Use 'containerGroupName' when you have an Azure Policy that + /// expects a specific naming convention or when you want to fully control the + /// name. 'containerGroupName' property must be between 1 and 63 characters + /// long, must contain only lowercase letters, numbers, and dashes and it + /// cannot start or end with a dash and consecutive dashes are not allowed. To + /// specify a 'containerGroupName', add the following object to properties: { + /// "containerSettings": { "containerGroupName": "contoso-container" } }. If + /// you do not want to specify a 'containerGroupName' then do not add + /// 'containerSettings' property. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "containerGroupName")] + public string ContainerGroupName {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.ContainerGroupName != null) + { + if (this.ContainerGroupName.Length > 63) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "ContainerGroupName", 63); + } + if (this.ContainerGroupName.Length < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "ContainerGroupName", 1); + } + } + } + } +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/CreatedByType.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/CreatedByType.cs similarity index 85% rename from src/Resources/Resources.Sdk/Generated/Models/CreatedByType.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/CreatedByType.cs index dd569f9c0a8a..727a643b55e5 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/CreatedByType.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/CreatedByType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.Resources.Models /// /// Defines values for CreatedByType. /// + + public static class CreatedByType { public const string User = "User"; @@ -21,4 +18,4 @@ public static class CreatedByType public const string ManagedIdentity = "ManagedIdentity"; public const string Key = "Key"; } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/DebugSetting.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/DebugSetting.cs similarity index 52% rename from src/Resources/Resources.Sdk/Generated/Models/DebugSetting.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/DebugSetting.cs index 30d5641c01b7..982e4ee49f1e 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/DebugSetting.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/DebugSetting.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,17 +23,19 @@ public DebugSetting() /// /// Initializes a new instance of the DebugSetting class. /// - /// Specifies the type of information to log - /// for debugging. The permitted values are none, requestContent, - /// responseContent, or both requestContent and responseContent - /// separated by a comma. The default is none. When setting this value, - /// carefully consider the type of information you are passing in - /// during deployment. By logging information about the request or - /// response, you could potentially expose sensitive data that is - /// retrieved through the deployment operations. + + /// Specifies the type of information to log for debugging. The permitted + /// values are none, requestContent, responseContent, or both requestContent + /// and responseContent separated by a comma. The default is none. When setting + /// this value, carefully consider the type of information you are passing in + /// during deployment. By logging information about the request or response, + /// you could potentially expose sensitive data that is retrieved through the + /// deployment operations. + /// public DebugSetting(string detailLevel = default(string)) + { - DetailLevel = detailLevel; + this.DetailLevel = detailLevel; CustomInit(); } @@ -48,18 +44,17 @@ public DebugSetting() /// partial void CustomInit(); + /// - /// Gets or sets specifies the type of information to log for - /// debugging. The permitted values are none, requestContent, - /// responseContent, or both requestContent and responseContent - /// separated by a comma. The default is none. When setting this value, - /// carefully consider the type of information you are passing in - /// during deployment. By logging information about the request or - /// response, you could potentially expose sensitive data that is + /// Gets or sets specifies the type of information to log for debugging. The + /// permitted values are none, requestContent, responseContent, or both + /// requestContent and responseContent separated by a comma. The default is + /// none. When setting this value, carefully consider the type of information + /// you are passing in during deployment. By logging information about the + /// request or response, you could potentially expose sensitive data that is /// retrieved through the deployment operations. /// - [JsonProperty(PropertyName = "detailLevel")] - public string DetailLevel { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "detailLevel")] + public string DetailLevel {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/Models/DenySettings.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/DenySettings.cs new file mode 100644 index 000000000000..17d36d0d2311 --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/DenySettings.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Resources.Models +{ + using System.Linq; + + /// + /// Defines how resources deployed by the deployment stack are locked. + /// + public partial class DenySettings + { + /// + /// Initializes a new instance of the DenySettings class. + /// + public DenySettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DenySettings class. + /// + + /// denySettings Mode. + /// Possible values include: 'denyDelete', 'denyWriteAndDelete', 'none' + + /// List of AAD principal IDs excluded from the lock. Up to 5 principals are + /// permitted. + /// + + /// List of role-based management operations that are excluded from the + /// denySettings. Up to 200 actions are permitted. If the denySetting mode is + /// set to 'denyWriteAndDelete', then the following actions are automatically + /// appended to 'excludedActions': '*/read' and + /// 'Microsoft.Authorization/locks/delete'. If the denySetting mode is set to + /// 'denyDelete', then the following actions are automatically appended to + /// 'excludedActions': 'Microsoft.Authorization/locks/delete'. Duplicate + /// actions will be removed. + /// + + /// DenySettings will be applied to child scopes. + /// + public DenySettings(string mode, System.Collections.Generic.IList excludedPrincipals = default(System.Collections.Generic.IList), System.Collections.Generic.IList excludedActions = default(System.Collections.Generic.IList), bool? applyToChildScopes = default(bool?)) + + { + this.Mode = mode; + this.ExcludedPrincipals = excludedPrincipals; + this.ExcludedActions = excludedActions; + this.ApplyToChildScopes = applyToChildScopes; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets denySettings Mode. Possible values include: 'denyDelete', 'denyWriteAndDelete', 'none' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "mode")] + public string Mode {get; set; } + + /// + /// Gets or sets list of AAD principal IDs excluded from the lock. Up to 5 + /// principals are permitted. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "excludedPrincipals")] + public System.Collections.Generic.IList ExcludedPrincipals {get; set; } + + /// + /// Gets or sets list of role-based management operations that are excluded + /// from the denySettings. Up to 200 actions are permitted. If the denySetting + /// mode is set to 'denyWriteAndDelete', then the following actions are + /// automatically appended to 'excludedActions': '*/read' and + /// 'Microsoft.Authorization/locks/delete'. If the denySetting mode is set to + /// 'denyDelete', then the following actions are automatically appended to + /// 'excludedActions': 'Microsoft.Authorization/locks/delete'. Duplicate + /// actions will be removed. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "excludedActions")] + public System.Collections.Generic.IList ExcludedActions {get; set; } + + /// + /// Gets or sets denySettings will be applied to child scopes. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "applyToChildScopes")] + public bool? ApplyToChildScopes {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.Mode == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Mode"); + } + + + + } + } +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/DenySettingsMode.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/DenySettingsMode.cs similarity index 83% rename from src/Resources/Resources.Sdk/Generated/Models/DenySettingsMode.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/DenySettingsMode.cs index 4c8d8652a12a..35c47b0677c0 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/DenySettingsMode.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/DenySettingsMode.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { @@ -14,16 +9,18 @@ namespace Microsoft.Azure.Management.Resources.Models /// /// Defines values for DenySettingsMode. /// + + public static class DenySettingsMode { /// - /// Authorized users are able to read and modify the resources, but - /// cannot delete. + /// Authorized users are able to read and modify the resources, but cannot + /// delete. /// public const string DenyDelete = "denyDelete"; /// - /// Authorized users can only read from a resource, but cannot modify - /// or delete it. + /// Authorized users can only read from a resource, but cannot modify or delete + /// it. /// public const string DenyWriteAndDelete = "denyWriteAndDelete"; /// @@ -31,4 +28,4 @@ public static class DenySettingsMode /// public const string None = "none"; } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/DenyStatusMode.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/DenyStatusMode.cs similarity index 82% rename from src/Resources/Resources.Sdk/Generated/Models/DenyStatusMode.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/DenyStatusMode.cs index 211e63017e5e..3c75487fe81b 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/DenyStatusMode.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/DenyStatusMode.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { @@ -14,11 +9,13 @@ namespace Microsoft.Azure.Management.Resources.Models /// /// Defines values for DenyStatusMode. /// + + public static class DenyStatusMode { /// - /// Authorized users are able to read and modify the resources, but - /// cannot delete. + /// Authorized users are able to read and modify the resources, but cannot + /// delete. /// public const string DenyDelete = "denyDelete"; /// @@ -26,18 +23,18 @@ public static class DenyStatusMode /// public const string NotSupported = "notSupported"; /// - /// denyAssignments are not supported on resources outside the scope of - /// the deployment stack. + /// denyAssignments are not supported on resources outside the scope of the + /// deployment stack. /// public const string Inapplicable = "inapplicable"; /// - /// Authorized users can only read from a resource, but cannot modify - /// or delete it. + /// Authorized users can only read from a resource, but cannot modify or delete + /// it. /// public const string DenyWriteAndDelete = "denyWriteAndDelete"; /// - /// Deny assignment has been removed by Azure due to a resource - /// management change (management group move, etc.) + /// Deny assignment has been removed by Azure due to a resource management + /// change (management group move, etc.) /// public const string RemovedBySystem = "removedBySystem"; /// @@ -45,4 +42,4 @@ public static class DenyStatusMode /// public const string None = "None"; } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/Dependency.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/Dependency.cs similarity index 56% rename from src/Resources/Resources.Sdk/Generated/Models/Dependency.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/Dependency.cs index c7c72dfe68ee..07ffc57475fc 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/Dependency.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/Dependency.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,16 +23,25 @@ public Dependency() /// /// Initializes a new instance of the Dependency class. /// - /// The list of dependencies. - /// The ID of the dependency. - /// The dependency resource type. - /// The dependency resource name. - public Dependency(IList dependsOn = default(IList), string id = default(string), string resourceType = default(string), string resourceName = default(string)) + + /// The list of dependencies. + /// + + /// The ID of the dependency. + /// + + /// The dependency resource type. + /// + + /// The dependency resource name. + /// + public Dependency(System.Collections.Generic.IList dependsOn = default(System.Collections.Generic.IList), string id = default(string), string resourceType = default(string), string resourceName = default(string)) + { - DependsOn = dependsOn; - Id = id; - ResourceType = resourceType; - ResourceName = resourceName; + this.DependsOn = dependsOn; + this.Id = id; + this.ResourceType = resourceType; + this.ResourceName = resourceName; CustomInit(); } @@ -49,29 +50,29 @@ public Dependency() /// partial void CustomInit(); + /// /// Gets or sets the list of dependencies. /// - [JsonProperty(PropertyName = "dependsOn")] - public IList DependsOn { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "dependsOn")] + public System.Collections.Generic.IList DependsOn {get; set; } /// /// Gets or sets the ID of the dependency. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; set; } /// /// Gets or sets the dependency resource type. /// - [JsonProperty(PropertyName = "resourceType")] - public string ResourceType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resourceType")] + public string ResourceType {get; set; } /// /// Gets or sets the dependency resource name. /// - [JsonProperty(PropertyName = "resourceName")] - public string ResourceName { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "resourceName")] + public string ResourceName {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/Deployment.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/Deployment.cs similarity index 57% rename from src/Resources/Resources.Sdk/Generated/Models/Deployment.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/Deployment.cs index 6c91d9293f65..8d5594f43f96 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/Deployment.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/Deployment.cs @@ -1,19 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,15 +23,21 @@ public Deployment() /// /// Initializes a new instance of the Deployment class. /// - /// The deployment properties. - /// The location to store the deployment - /// data. - /// Deployment tags - public Deployment(DeploymentProperties properties, string location = default(string), IDictionary tags = default(IDictionary)) + + /// The location to store the deployment data. + /// + + /// The deployment properties. + /// + + /// Deployment tags + /// + public Deployment(DeploymentProperties properties, string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary)) + { - Location = location; - Properties = properties; - Tags = tags; + this.Location = location; + this.Properties = properties; + this.Tags = tags; CustomInit(); } @@ -49,40 +46,42 @@ public Deployment() /// partial void CustomInit(); + /// /// Gets or sets the location to store the deployment data. /// - [JsonProperty(PropertyName = "location")] - public string Location { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "location")] + public string Location {get; set; } /// /// Gets or sets the deployment properties. /// - [JsonProperty(PropertyName = "properties")] - public DeploymentProperties Properties { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public DeploymentProperties Properties {get; set; } /// /// Gets or sets deployment tags /// - [JsonProperty(PropertyName = "tags")] - public IDictionary Tags { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "tags")] + public System.Collections.Generic.IDictionary Tags {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Properties == null) + if (this.Properties == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Properties"); } - if (Properties != null) + + if (this.Properties != null) { - Properties.Validate(); + this.Properties.Validate(); } + } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/DeploymentExportResult.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentExportResult.cs similarity index 78% rename from src/Resources/Resources.Sdk/Generated/Models/DeploymentExportResult.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentExportResult.cs index 0908d86e812e..6ee4ec4e69e9 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/DeploymentExportResult.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentExportResult.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,10 +23,13 @@ public DeploymentExportResult() /// /// Initializes a new instance of the DeploymentExportResult class. /// - /// The template content. + + /// The template content. + /// public DeploymentExportResult(object template = default(object)) + { - Template = template; + this.Template = template; CustomInit(); } @@ -41,11 +38,11 @@ public DeploymentExportResult() /// partial void CustomInit(); + /// /// Gets or sets the template content. /// - [JsonProperty(PropertyName = "template")] - public object Template { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "template")] + public object Template {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/DeploymentExtended.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentExtended.cs similarity index 52% rename from src/Resources/Resources.Sdk/Generated/Models/DeploymentExtended.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentExtended.cs index 0ef01ccc101f..1cbbf1eb32a4 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/DeploymentExtended.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentExtended.cs @@ -1,26 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// /// Deployment information. /// - public partial class DeploymentExtended : IResource + public partial class DeploymentExtended : Microsoft.Rest.Azure.IResource { /// /// Initializes a new instance of the DeploymentExtended class. @@ -33,20 +23,33 @@ public DeploymentExtended() /// /// Initializes a new instance of the DeploymentExtended class. /// - /// The ID of the deployment. - /// The name of the deployment. - /// The type of the deployment. - /// the location of the deployment. - /// Deployment properties. - /// Deployment tags - public DeploymentExtended(string id = default(string), string name = default(string), string type = default(string), string location = default(string), DeploymentPropertiesExtended properties = default(DeploymentPropertiesExtended), IDictionary tags = default(IDictionary)) + + /// The ID of the deployment. + /// + + /// The name of the deployment. + /// + + /// The type of the deployment. + /// + + /// the location of the deployment. + /// + + /// Deployment properties. + /// + + /// Deployment tags + /// + public DeploymentExtended(string id = default(string), string name = default(string), string type = default(string), string location = default(string), DeploymentPropertiesExtended properties = default(DeploymentPropertiesExtended), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary)) + { - Id = id; - Name = name; - Type = type; - Location = location; - Properties = properties; - Tags = tags; + this.Id = id; + this.Name = name; + this.Type = type; + this.Location = location; + this.Properties = properties; + this.Tags = tags; CustomInit(); } @@ -55,54 +58,59 @@ public DeploymentExtended() /// partial void CustomInit(); + /// /// Gets the ID of the deployment. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; private set; } /// /// Gets the name of the deployment. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; private set; } /// /// Gets the type of the deployment. /// - [JsonProperty(PropertyName = "type")] - public string Type { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; private set; } /// /// Gets or sets the location of the deployment. /// - [JsonProperty(PropertyName = "location")] - public string Location { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "location")] + public string Location {get; set; } /// /// Gets or sets deployment properties. /// - [JsonProperty(PropertyName = "properties")] - public DeploymentPropertiesExtended Properties { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public DeploymentPropertiesExtended Properties {get; set; } /// /// Gets or sets deployment tags /// - [JsonProperty(PropertyName = "tags")] - public IDictionary Tags { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "tags")] + public System.Collections.Generic.IDictionary Tags {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Properties != null) + + + + + if (this.Properties != null) { - Properties.Validate(); + this.Properties.Validate(); } + } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/DeploymentExtendedFilter.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentExtendedFilter.cs similarity index 80% rename from src/Resources/Resources.Sdk/Generated/Models/DeploymentExtendedFilter.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentExtendedFilter.cs index d163ddc8290d..216705b876ea 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/DeploymentExtendedFilter.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentExtendedFilter.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,10 +23,13 @@ public DeploymentExtendedFilter() /// /// Initializes a new instance of the DeploymentExtendedFilter class. /// - /// The provisioning state. + + /// The provisioning state. + /// public DeploymentExtendedFilter(string provisioningState = default(string)) + { - ProvisioningState = provisioningState; + this.ProvisioningState = provisioningState; CustomInit(); } @@ -41,11 +38,11 @@ public DeploymentExtendedFilter() /// partial void CustomInit(); + /// /// Gets or sets the provisioning state. /// - [JsonProperty(PropertyName = "provisioningState")] - public string ProvisioningState { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "provisioningState")] + public string ProvisioningState {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/DeploymentMode.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentMode.cs similarity index 79% rename from src/Resources/Resources.Sdk/Generated/Models/DeploymentMode.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentMode.cs index 02176cd4bcfb..fc9812c9c39d 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/DeploymentMode.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentMode.cs @@ -1,29 +1,22 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; /// /// Defines values for DeploymentMode. /// - [JsonConverter(typeof(StringEnumConverter))] + + + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public enum DeploymentMode { - [EnumMember(Value = "Incremental")] + [System.Runtime.Serialization.EnumMember(Value = "Incremental")] Incremental, - [EnumMember(Value = "Complete")] + [System.Runtime.Serialization.EnumMember(Value = "Complete")] Complete } internal static class DeploymentModeEnumExtension @@ -32,7 +25,6 @@ internal static string ToSerializedValue(this DeploymentMode? value) { return value == null ? null : ((DeploymentMode)value).ToSerializedValue(); } - internal static string ToSerializedValue(this DeploymentMode value) { switch( value ) @@ -44,7 +36,6 @@ internal static string ToSerializedValue(this DeploymentMode value) } return null; } - internal static DeploymentMode? ParseDeploymentMode(this string value) { switch( value ) @@ -57,4 +48,4 @@ internal static string ToSerializedValue(this DeploymentMode value) return null; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/DeploymentOperation.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentOperation.cs similarity index 65% rename from src/Resources/Resources.Sdk/Generated/Models/DeploymentOperation.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentOperation.cs index d583add88c56..6e40041c4bbc 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/DeploymentOperation.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentOperation.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,14 +23,21 @@ public DeploymentOperation() /// /// Initializes a new instance of the DeploymentOperation class. /// - /// Full deployment operation ID. - /// Deployment operation ID. - /// Deployment properties. + + /// Full deployment operation ID. + /// + + /// Deployment operation ID. + /// + + /// Deployment properties. + /// public DeploymentOperation(string id = default(string), string operationId = default(string), DeploymentOperationProperties properties = default(DeploymentOperationProperties)) + { - Id = id; - OperationId = operationId; - Properties = properties; + this.Id = id; + this.OperationId = operationId; + this.Properties = properties; CustomInit(); } @@ -45,23 +46,23 @@ public DeploymentOperation() /// partial void CustomInit(); + /// /// Gets full deployment operation ID. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; private set; } /// /// Gets deployment operation ID. /// - [JsonProperty(PropertyName = "operationId")] - public string OperationId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "operationId")] + public string OperationId {get; private set; } /// /// Gets or sets deployment properties. /// - [JsonProperty(PropertyName = "properties")] - public DeploymentOperationProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public DeploymentOperationProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentOperationProperties.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentOperationProperties.cs new file mode 100644 index 000000000000..94e63a1d29f2 --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentOperationProperties.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Resources.Models +{ + using System.Linq; + + /// + /// Deployment operation properties. + /// + public partial class DeploymentOperationProperties + { + /// + /// Initializes a new instance of the DeploymentOperationProperties class. + /// + public DeploymentOperationProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DeploymentOperationProperties class. + /// + + /// The name of the current provisioning operation. + /// Possible values include: 'NotSpecified', 'Create', 'Delete', 'Waiting', + /// 'AzureAsyncOperationWaiting', 'ResourceCacheWaiting', 'Action', 'Read', + /// 'EvaluateDeploymentOutput', 'DeploymentCleanup' + + /// The state of the provisioning. + /// + + /// The date and time of the operation. + /// + + /// The duration of the operation. + /// + + /// Deployment operation service request id. + /// + + /// Operation status code from the resource provider. This property may not be + /// set if a response has not yet been received. + /// + + /// Operation status message from the resource provider. This property is + /// optional. It will only be provided if an error was received from the + /// resource provider. + /// + + /// The target resource. + /// + + /// The HTTP request message. + /// + + /// The HTTP response message. + /// + public DeploymentOperationProperties(ProvisioningOperation? provisioningOperation = default(ProvisioningOperation?), string provisioningState = default(string), System.DateTime? timestamp = default(System.DateTime?), string duration = default(string), string serviceRequestId = default(string), string statusCode = default(string), StatusMessage statusMessage = default(StatusMessage), TargetResource targetResource = default(TargetResource), HttpMessage request = default(HttpMessage), HttpMessage response = default(HttpMessage)) + + { + this.ProvisioningOperation = provisioningOperation; + this.ProvisioningState = provisioningState; + this.Timestamp = timestamp; + this.Duration = duration; + this.ServiceRequestId = serviceRequestId; + this.StatusCode = statusCode; + this.StatusMessage = statusMessage; + this.TargetResource = targetResource; + this.Request = request; + this.Response = response; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets the name of the current provisioning operation. Possible values include: 'NotSpecified', 'Create', 'Delete', 'Waiting', 'AzureAsyncOperationWaiting', 'ResourceCacheWaiting', 'Action', 'Read', 'EvaluateDeploymentOutput', 'DeploymentCleanup' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "provisioningOperation")] + public ProvisioningOperation? ProvisioningOperation {get; private set; } + + /// + /// Gets the state of the provisioning. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "provisioningState")] + public string ProvisioningState {get; private set; } + + /// + /// Gets the date and time of the operation. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "timestamp")] + public System.DateTime? Timestamp {get; private set; } + + /// + /// Gets the duration of the operation. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "duration")] + public string Duration {get; private set; } + + /// + /// Gets deployment operation service request id. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "serviceRequestId")] + public string ServiceRequestId {get; private set; } + + /// + /// Gets operation status code from the resource provider. This property may + /// not be set if a response has not yet been received. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "statusCode")] + public string StatusCode {get; private set; } + + /// + /// Gets operation status message from the resource provider. This property is + /// optional. It will only be provided if an error was received from the + /// resource provider. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "statusMessage")] + public StatusMessage StatusMessage {get; private set; } + + /// + /// Gets the target resource. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "targetResource")] + public TargetResource TargetResource {get; private set; } + + /// + /// Gets the HTTP request message. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "request")] + public HttpMessage Request {get; private set; } + + /// + /// Gets the HTTP response message. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "response")] + public HttpMessage Response {get; private set; } + } +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentProperties.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentProperties.cs new file mode 100644 index 000000000000..12480e7d295f --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentProperties.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Resources.Models +{ + using System.Linq; + + /// + /// Deployment properties. + /// + public partial class DeploymentProperties + { + /// + /// Initializes a new instance of the DeploymentProperties class. + /// + public DeploymentProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DeploymentProperties class. + /// + + /// The template content. You use this element when you want to pass the + /// template syntax directly in the request rather than link to an existing + /// template. It can be a JObject or well-formed JSON string. Use either the + /// templateLink property or the template property, but not both. + /// + + /// The URI of the template. Use either the templateLink property or the + /// template property, but not both. + /// + + /// Name and value pairs that define the deployment parameters for the + /// template. You use this element when you want to provide the parameter + /// values directly in the request rather than link to an existing parameter + /// file. Use either the parametersLink property or the parameters property, + /// but not both. It can be a JObject or a well formed JSON string. + /// + + /// The URI of parameters file. You use this element to link to an existing + /// parameters file. Use either the parametersLink property or the parameters + /// property, but not both. + /// + + /// The mode that is used to deploy resources. This value can be either + /// Incremental or Complete. In Incremental mode, resources are deployed + /// without deleting existing resources that are not included in the template. + /// In Complete mode, resources are deployed and existing resources in the + /// resource group that are not included in the template are deleted. Be + /// careful when using Complete mode as you may unintentionally delete + /// resources. + /// Possible values include: 'Incremental', 'Complete' + + /// The debug setting of the deployment. + /// + + /// The deployment on error behavior. + /// + + /// Specifies whether template expressions are evaluated within the scope of + /// the parent template or nested template. Only applicable to nested + /// templates. If not specified, default value is outer. + /// + public DeploymentProperties(DeploymentMode mode, object template = default(object), TemplateLink templateLink = default(TemplateLink), object parameters = default(object), ParametersLink parametersLink = default(ParametersLink), DebugSetting debugSetting = default(DebugSetting), OnErrorDeployment onErrorDeployment = default(OnErrorDeployment), ExpressionEvaluationOptions expressionEvaluationOptions = default(ExpressionEvaluationOptions)) + + { + this.Template = template; + this.TemplateLink = templateLink; + this.Parameters = parameters; + this.ParametersLink = parametersLink; + this.Mode = mode; + this.DebugSetting = debugSetting; + this.OnErrorDeployment = onErrorDeployment; + this.ExpressionEvaluationOptions = expressionEvaluationOptions; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the template content. You use this element when you want to + /// pass the template syntax directly in the request rather than link to an + /// existing template. It can be a JObject or well-formed JSON string. Use + /// either the templateLink property or the template property, but not both. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "template")] + public object Template {get; set; } + + /// + /// Gets or sets the URI of the template. Use either the templateLink property + /// or the template property, but not both. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "templateLink")] + public TemplateLink TemplateLink {get; set; } + + /// + /// Gets or sets name and value pairs that define the deployment parameters for + /// the template. You use this element when you want to provide the parameter + /// values directly in the request rather than link to an existing parameter + /// file. Use either the parametersLink property or the parameters property, + /// but not both. It can be a JObject or a well formed JSON string. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "parameters")] + public object Parameters {get; set; } + + /// + /// Gets or sets the URI of parameters file. You use this element to link to an + /// existing parameters file. Use either the parametersLink property or the + /// parameters property, but not both. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "parametersLink")] + public ParametersLink ParametersLink {get; set; } + + /// + /// Gets or sets the mode that is used to deploy resources. This value can be + /// either Incremental or Complete. In Incremental mode, resources are deployed + /// without deleting existing resources that are not included in the template. + /// In Complete mode, resources are deployed and existing resources in the + /// resource group that are not included in the template are deleted. Be + /// careful when using Complete mode as you may unintentionally delete + /// resources. Possible values include: 'Incremental', 'Complete' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "mode")] + public DeploymentMode Mode {get; set; } + + /// + /// Gets or sets the debug setting of the deployment. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "debugSetting")] + public DebugSetting DebugSetting {get; set; } + + /// + /// Gets or sets the deployment on error behavior. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "onErrorDeployment")] + public OnErrorDeployment OnErrorDeployment {get; set; } + + /// + /// Gets or sets specifies whether template expressions are evaluated within + /// the scope of the parent template or nested template. Only applicable to + /// nested templates. If not specified, default value is outer. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "expressionEvaluationOptions")] + public ExpressionEvaluationOptions ExpressionEvaluationOptions {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + + + + if (this.ParametersLink != null) + { + this.ParametersLink.Validate(); + } + + + + + } + } +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentPropertiesExtended.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentPropertiesExtended.cs new file mode 100644 index 000000000000..5b8725f1a69c --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentPropertiesExtended.cs @@ -0,0 +1,238 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Resources.Models +{ + using System.Linq; + + /// + /// Deployment properties with additional details. + /// + public partial class DeploymentPropertiesExtended + { + /// + /// Initializes a new instance of the DeploymentPropertiesExtended class. + /// + public DeploymentPropertiesExtended() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DeploymentPropertiesExtended class. + /// + + /// Denotes the state of provisioning. + /// Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', + /// 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', + /// 'Succeeded', 'Updating' + + /// The correlation ID of the deployment. + /// + + /// The timestamp of the template deployment. + /// + + /// The duration of the template deployment. + /// + + /// Key/value pairs that represent deployment output. + /// + + /// The list of resource providers needed for the deployment. + /// + + /// The list of deployment dependencies. + /// + + /// The URI referencing the template. + /// + + /// Deployment parameters. + /// + + /// The URI referencing the parameters. + /// + + /// The deployment mode. Possible values are Incremental and Complete. + /// Possible values include: 'Incremental', 'Complete' + + /// The debug setting of the deployment. + /// + + /// The deployment on error behavior. + /// + + /// The hash produced for the template. + /// + + /// Array of provisioned resources. + /// + + /// Array of validated resources. + /// + + /// The deployment error. + /// + public DeploymentPropertiesExtended(string provisioningState = default(string), string correlationId = default(string), System.DateTime? timestamp = default(System.DateTime?), string duration = default(string), object outputs = default(object), System.Collections.Generic.IList providers = default(System.Collections.Generic.IList), System.Collections.Generic.IList dependencies = default(System.Collections.Generic.IList), TemplateLink templateLink = default(TemplateLink), object parameters = default(object), ParametersLink parametersLink = default(ParametersLink), DeploymentMode? mode = default(DeploymentMode?), DebugSetting debugSetting = default(DebugSetting), OnErrorDeploymentExtended onErrorDeployment = default(OnErrorDeploymentExtended), string templateHash = default(string), System.Collections.Generic.IList outputResources = default(System.Collections.Generic.IList), System.Collections.Generic.IList validatedResources = default(System.Collections.Generic.IList), ErrorResponse error = default(ErrorResponse)) + + { + this.ProvisioningState = provisioningState; + this.CorrelationId = correlationId; + this.Timestamp = timestamp; + this.Duration = duration; + this.Outputs = outputs; + this.Providers = providers; + this.Dependencies = dependencies; + this.TemplateLink = templateLink; + this.Parameters = parameters; + this.ParametersLink = parametersLink; + this.Mode = mode; + this.DebugSetting = debugSetting; + this.OnErrorDeployment = onErrorDeployment; + this.TemplateHash = templateHash; + this.OutputResources = outputResources; + this.ValidatedResources = validatedResources; + this.Error = error; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets denotes the state of provisioning. Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', 'Succeeded', 'Updating' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "provisioningState")] + public string ProvisioningState {get; private set; } + + /// + /// Gets the correlation ID of the deployment. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "correlationId")] + public string CorrelationId {get; private set; } + + /// + /// Gets the timestamp of the template deployment. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "timestamp")] + public System.DateTime? Timestamp {get; private set; } + + /// + /// Gets the duration of the template deployment. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "duration")] + public string Duration {get; private set; } + + /// + /// Gets key/value pairs that represent deployment output. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "outputs")] + public object Outputs {get; private set; } + + /// + /// Gets the list of resource providers needed for the deployment. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "providers")] + public System.Collections.Generic.IList Providers {get; private set; } + + /// + /// Gets the list of deployment dependencies. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "dependencies")] + public System.Collections.Generic.IList Dependencies {get; private set; } + + /// + /// Gets the URI referencing the template. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "templateLink")] + public TemplateLink TemplateLink {get; private set; } + + /// + /// Gets deployment parameters. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "parameters")] + public object Parameters {get; private set; } + + /// + /// Gets the URI referencing the parameters. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "parametersLink")] + public ParametersLink ParametersLink {get; private set; } + + /// + /// Gets the deployment mode. Possible values are Incremental and Complete. Possible values include: 'Incremental', 'Complete' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "mode")] + public DeploymentMode? Mode {get; private set; } + + /// + /// Gets the debug setting of the deployment. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "debugSetting")] + public DebugSetting DebugSetting {get; private set; } + + /// + /// Gets the deployment on error behavior. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "onErrorDeployment")] + public OnErrorDeploymentExtended OnErrorDeployment {get; private set; } + + /// + /// Gets the hash produced for the template. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "templateHash")] + public string TemplateHash {get; private set; } + + /// + /// Gets array of provisioned resources. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "outputResources")] + public System.Collections.Generic.IList OutputResources {get; private set; } + + /// + /// Gets array of validated resources. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "validatedResources")] + public System.Collections.Generic.IList ValidatedResources {get; private set; } + + /// + /// Gets the deployment error. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "error")] + public ErrorResponse Error {get; private set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + + + + + + + + + if (this.ParametersLink != null) + { + this.ParametersLink.Validate(); + } + + + + + + + + } + } +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/DeploymentScript.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentScript.cs similarity index 54% rename from src/Resources/Resources.Sdk/Generated/Models/DeploymentScript.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentScript.cs index 496121979f16..7a5b4c8d1ca8 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/DeploymentScript.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentScript.cs @@ -1,19 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -33,25 +24,36 @@ public DeploymentScript() /// /// Initializes a new instance of the DeploymentScript class. /// - /// The location of the ACI and the storage - /// account for the deployment script. - /// String Id used to locate any resource on - /// Azure. - /// Name of this resource. - /// Type of this resource. - /// Optional property. Managed identity to be - /// used for this deployment script. Currently, only user-assigned MSI - /// is supported. - /// Resource tags. - /// The system metadata related to this - /// resource. - public DeploymentScript(string location, string id = default(string), string name = default(string), string type = default(string), ManagedServiceIdentity identity = default(ManagedServiceIdentity), IDictionary tags = default(IDictionary), SystemData systemData = default(SystemData)) - : base(id, name, type) + + /// String Id used to locate any resource on Azure. + /// + + /// Name of this resource. + /// + + /// Type of this resource. + /// + + /// Optional property. Managed identity to be used for this deployment script. + /// Currently, only user-assigned MSI is supported. + /// + + /// The location of the ACI and the storage account for the deployment script. + /// + + /// Resource tags. + /// + + /// The system metadata related to this resource. + /// + public DeploymentScript(string location, string id = default(string), string name = default(string), string type = default(string), ManagedServiceIdentity identity = default(ManagedServiceIdentity), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), SystemData systemData = default(SystemData)) + + : base(id, name, type) { - Identity = identity; - Location = location; - Tags = tags; - SystemData = systemData; + this.Identity = identity; + this.Location = location; + this.Tags = tags; + this.SystemData = systemData; CustomInit(); } @@ -60,45 +62,48 @@ public DeploymentScript() /// partial void CustomInit(); + /// - /// Gets or sets optional property. Managed identity to be used for - /// this deployment script. Currently, only user-assigned MSI is - /// supported. + /// Gets or sets optional property. Managed identity to be used for this + /// deployment script. Currently, only user-assigned MSI is supported. /// - [JsonProperty(PropertyName = "identity")] - public ManagedServiceIdentity Identity { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "identity")] + public ManagedServiceIdentity Identity {get; set; } /// - /// Gets or sets the location of the ACI and the storage account for - /// the deployment script. + /// Gets or sets the location of the ACI and the storage account for the + /// deployment script. /// - [JsonProperty(PropertyName = "location")] - public string Location { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "location")] + public string Location {get; set; } /// /// Gets or sets resource tags. /// - [JsonProperty(PropertyName = "tags")] - public IDictionary Tags { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tags")] + public System.Collections.Generic.IDictionary Tags {get; set; } /// /// Gets the system metadata related to this resource. /// - [JsonProperty(PropertyName = "systemData")] - public SystemData SystemData { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "systemData")] + public SystemData SystemData {get; private set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Location == null) + if (this.Location == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Location"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Location"); } + + + + } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/DeploymentScriptUpdateParameter.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentScriptUpdateParameter.cs similarity index 64% rename from src/Resources/Resources.Sdk/Generated/Models/DeploymentScriptUpdateParameter.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentScriptUpdateParameter.cs index 4f685f8e4b96..00b63103cdb4 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/DeploymentScriptUpdateParameter.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentScriptUpdateParameter.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.Resources.Models public partial class DeploymentScriptUpdateParameter : AzureResourceBase { /// - /// Initializes a new instance of the DeploymentScriptUpdateParameter - /// class. + /// Initializes a new instance of the DeploymentScriptUpdateParameter class. /// public DeploymentScriptUpdateParameter() { @@ -30,18 +21,25 @@ public DeploymentScriptUpdateParameter() } /// - /// Initializes a new instance of the DeploymentScriptUpdateParameter - /// class. + /// Initializes a new instance of the DeploymentScriptUpdateParameter class. /// - /// String Id used to locate any resource on - /// Azure. - /// Name of this resource. - /// Type of this resource. - /// Resource tags to be updated. - public DeploymentScriptUpdateParameter(string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary)) - : base(id, name, type) + + /// String Id used to locate any resource on Azure. + /// + + /// Name of this resource. + /// + + /// Type of this resource. + /// + + /// Resource tags to be updated. + /// + public DeploymentScriptUpdateParameter(string id = default(string), string name = default(string), string type = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary)) + + : base(id, name, type) { - Tags = tags; + this.Tags = tags; CustomInit(); } @@ -50,11 +48,11 @@ public DeploymentScriptUpdateParameter() /// partial void CustomInit(); + /// /// Gets or sets resource tags to be updated. /// - [JsonProperty(PropertyName = "tags")] - public IDictionary Tags { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "tags")] + public System.Collections.Generic.IDictionary Tags {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/DeploymentScriptsError.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentScriptsError.cs similarity index 64% rename from src/Resources/Resources.Sdk/Generated/Models/DeploymentScriptsError.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentScriptsError.cs index 2dbcd4f44f94..3f193d8db73d 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/DeploymentScriptsError.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentScriptsError.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,9 +23,15 @@ public DeploymentScriptsError() /// /// Initializes a new instance of the DeploymentScriptsError class. /// + + /// Common error response for all Azure Resource Manager APIs to return error + /// details for failed operations. (This also follows the OData error response + /// format.) + /// public DeploymentScriptsError(ErrorResponse error = default(ErrorResponse)) + { - Error = error; + this.Error = error; CustomInit(); } @@ -40,10 +40,13 @@ public DeploymentScriptsError() /// partial void CustomInit(); + /// + /// Gets or sets common error response for all Azure Resource Manager APIs to + /// return error details for failed operations. (This also follows the OData + /// error response format.) /// - [JsonProperty(PropertyName = "error")] - public ErrorResponse Error { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "error")] + public ErrorResponse Error {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/DeploymentScriptsErrorException.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentScriptsErrorException.cs similarity index 80% rename from src/Resources/Resources.Sdk/Generated/Models/DeploymentScriptsErrorException.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentScriptsErrorException.cs index c9a7654ebab9..0bb44d38c9d2 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/DeploymentScriptsErrorException.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentScriptsErrorException.cs @@ -1,32 +1,25 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Microsoft.Rest; /// - /// Exception thrown for an invalid response with DeploymentScriptsError - /// information. + /// Exception thrown for an invalid response with DeploymentScriptsError information. /// - public partial class DeploymentScriptsErrorException : RestException + public partial class DeploymentScriptsErrorException : Microsoft.Rest.RestException { /// /// Gets information about the associated HTTP request. /// - public HttpRequestMessageWrapper Request { get; set; } + public Microsoft.Rest.HttpRequestMessageWrapper Request { get; set; } /// /// Gets information about the associated HTTP response. /// - public HttpResponseMessageWrapper Response { get; set; } + public Microsoft.Rest.HttpResponseMessageWrapper Response { get; set; } /// /// Gets or sets the body object. @@ -41,7 +34,7 @@ public DeploymentScriptsErrorException() } /// - /// Initializes a new instance of the DeploymentScriptsErrorException class. + /// Initializes a new instance of the DeploymentScriptsError class. /// /// The exception message. public DeploymentScriptsErrorException(string message) @@ -50,7 +43,7 @@ public DeploymentScriptsErrorException(string message) } /// - /// Initializes a new instance of the DeploymentScriptsErrorException class. + /// Initializes a new instance of the DeploymentScriptsError class. /// /// The exception message. /// Inner exception. @@ -59,4 +52,4 @@ public DeploymentScriptsErrorException(string message, System.Exception innerExc { } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentStack.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentStack.cs new file mode 100644 index 000000000000..38bc0f113e42 --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentStack.cs @@ -0,0 +1,343 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Resources.Models +{ + using System.Linq; + + /// + /// Deployment stack object. + /// + [Microsoft.Rest.Serialization.JsonTransformation] + public partial class DeploymentStack : AzureResourceBase + { + /// + /// Initializes a new instance of the DeploymentStack class. + /// + public DeploymentStack() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DeploymentStack class. + /// + + /// String Id used to locate any resource on Azure. + /// + + /// Name of this resource. + /// + + /// Type of this resource. + /// + + /// Azure Resource Manager metadata containing createdBy and modifiedBy + /// information. + /// + + /// The location of the deployment stack. It cannot be changed after creation. + /// It must be one of the supported Azure locations. + /// + + /// Deployment stack resource tags. + /// + + /// Defines how resources deployed by the stack are locked. + /// + + /// Common error response for all Azure Resource Manager APIs to return error + /// details for failed operations. (This also follows the OData error response + /// format.). + /// + + /// The template content. You use this element when you want to pass the + /// template syntax directly in the request rather than link to an existing + /// template. It can be a JObject or well-formed JSON string. Use either the + /// templateLink property or the template property, but not both. + /// + + /// The URI of the template. Use either the templateLink property or the + /// template property, but not both. + /// + + /// Name and value pairs that define the deployment parameters for the + /// template. Use this element when providing the parameter values directly in + /// the request, rather than linking to an existing parameter file. Use either + /// the parametersLink property or the parameters property, but not both. It + /// can be a JObject or a well formed JSON string. + /// + + /// The URI of parameters file. Use this element to link to an existing + /// parameters file. Use either the parametersLink property or the parameters + /// property, but not both. + /// + + /// Defines the behavior of resources that are not managed immediately after + /// the stack is updated. + /// + + /// The debug setting of the deployment. + /// + + /// The scope at which the initial deployment should be created. If a scope is + /// not specified, it will default to the scope of the deployment stack. Valid + /// scopes are: management group (format: + /// '/providers/Microsoft.Management/managementGroups/{managementGroupId}'), + /// subscription (format: '/subscriptions/{subscriptionId}'), resource group + /// (format: + /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}'). + /// + + /// Deployment stack description. + /// + + /// State of the deployment stack. + /// Possible values include: 'Creating', 'Validating', 'Waiting', 'Deploying', + /// 'Canceling', 'Locking', 'DeletingResources', 'Succeeded', 'Failed', + /// 'Canceled', 'Deleting' + + /// An array of resources that were detached during the most recent update. + /// + + /// An array of resources that were deleted during the most recent update. + /// + + /// An array of resources that failed to reach goal state during the most + /// recent update. + /// + + /// An array of resources currently managed by the deployment stack. + /// + + /// The resourceId of the deployment resource created by the deployment stack. + /// + + /// The outputs of the underlying deployment. + /// + + /// The duration of the deployment stack update. + /// + public DeploymentStack(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), DenySettings denySettings = default(DenySettings), ErrorResponse error = default(ErrorResponse), object template = default(object), DeploymentStacksTemplateLink templateLink = default(DeploymentStacksTemplateLink), object parameters = default(object), DeploymentStacksParametersLink parametersLink = default(DeploymentStacksParametersLink), DeploymentStackPropertiesActionOnUnmanage actionOnUnmanage = default(DeploymentStackPropertiesActionOnUnmanage), DeploymentStacksDebugSetting debugSetting = default(DeploymentStacksDebugSetting), string deploymentScope = default(string), string description = default(string), string provisioningState = default(string), System.Collections.Generic.IList detachedResources = default(System.Collections.Generic.IList), System.Collections.Generic.IList deletedResources = default(System.Collections.Generic.IList), System.Collections.Generic.IList failedResources = default(System.Collections.Generic.IList), System.Collections.Generic.IList resources = default(System.Collections.Generic.IList), string deploymentId = default(string), object outputs = default(object), string duration = default(string)) + + : base(id, name, type, systemData) + { + this.Location = location; + this.Tags = tags; + this.DenySettings = denySettings; + this.Error = error; + this.Template = template; + this.TemplateLink = templateLink; + this.Parameters = parameters; + this.ParametersLink = parametersLink; + this.ActionOnUnmanage = actionOnUnmanage; + this.DebugSetting = debugSetting; + this.DeploymentScope = deploymentScope; + this.Description = description; + this.ProvisioningState = provisioningState; + this.DetachedResources = detachedResources; + this.DeletedResources = deletedResources; + this.FailedResources = failedResources; + this.Resources = resources; + this.DeploymentId = deploymentId; + this.Outputs = outputs; + this.Duration = duration; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the location of the deployment stack. It cannot be changed + /// after creation. It must be one of the supported Azure locations. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "location")] + public string Location {get; set; } + + /// + /// Gets or sets deployment stack resource tags. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "tags")] + public System.Collections.Generic.IDictionary Tags {get; set; } + + /// + /// Gets or sets defines how resources deployed by the stack are locked. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.denySettings")] + public DenySettings DenySettings {get; set; } + + /// + /// Gets or sets common error response for all Azure Resource Manager APIs to + /// return error details for failed operations. (This also follows the OData + /// error response format.). + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.error")] + public ErrorResponse Error {get; set; } + + /// + /// Gets or sets the template content. You use this element when you want to + /// pass the template syntax directly in the request rather than link to an + /// existing template. It can be a JObject or well-formed JSON string. Use + /// either the templateLink property or the template property, but not both. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.template")] + public object Template {get; set; } + + /// + /// Gets or sets the URI of the template. Use either the templateLink property + /// or the template property, but not both. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.templateLink")] + public DeploymentStacksTemplateLink TemplateLink {get; set; } + + /// + /// Gets or sets name and value pairs that define the deployment parameters for + /// the template. Use this element when providing the parameter values directly + /// in the request, rather than linking to an existing parameter file. Use + /// either the parametersLink property or the parameters property, but not + /// both. It can be a JObject or a well formed JSON string. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.parameters")] + public object Parameters {get; set; } + + /// + /// Gets or sets the URI of parameters file. Use this element to link to an + /// existing parameters file. Use either the parametersLink property or the + /// parameters property, but not both. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.parametersLink")] + public DeploymentStacksParametersLink ParametersLink {get; set; } + + /// + /// Gets or sets defines the behavior of resources that are not managed + /// immediately after the stack is updated. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.actionOnUnmanage")] + public DeploymentStackPropertiesActionOnUnmanage ActionOnUnmanage {get; set; } + + /// + /// Gets or sets the debug setting of the deployment. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.debugSetting")] + public DeploymentStacksDebugSetting DebugSetting {get; set; } + + /// + /// Gets or sets the scope at which the initial deployment should be created. + /// If a scope is not specified, it will default to the scope of the deployment + /// stack. Valid scopes are: management group (format: + /// '/providers/Microsoft.Management/managementGroups/{managementGroupId}'), + /// subscription (format: '/subscriptions/{subscriptionId}'), resource group + /// (format: + /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}'). + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.deploymentScope")] + public string DeploymentScope {get; set; } + + /// + /// Gets or sets deployment stack description. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.description")] + public string Description {get; set; } + + /// + /// Gets state of the deployment stack. Possible values include: 'Creating', 'Validating', 'Waiting', 'Deploying', 'Canceling', 'Locking', 'DeletingResources', 'Succeeded', 'Failed', 'Canceled', 'Deleting' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.provisioningState")] + public string ProvisioningState {get; private set; } + + /// + /// Gets an array of resources that were detached during the most recent + /// update. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.detachedResources")] + public System.Collections.Generic.IList DetachedResources {get; private set; } + + /// + /// Gets an array of resources that were deleted during the most recent update. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.deletedResources")] + public System.Collections.Generic.IList DeletedResources {get; private set; } + + /// + /// Gets an array of resources that failed to reach goal state during the most + /// recent update. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.failedResources")] + public System.Collections.Generic.IList FailedResources {get; private set; } + + /// + /// Gets an array of resources currently managed by the deployment stack. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.resources")] + public System.Collections.Generic.IList Resources {get; private set; } + + /// + /// Gets the resourceId of the deployment resource created by the deployment + /// stack. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.deploymentId")] + public string DeploymentId {get; private set; } + + /// + /// Gets the outputs of the underlying deployment. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.outputs")] + public object Outputs {get; private set; } + + /// + /// Gets the duration of the deployment stack update. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.duration")] + public string Duration {get; private set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + + + if (this.DenySettings != null) + { + this.DenySettings.Validate(); + } + + + + + if (this.ParametersLink != null) + { + this.ParametersLink.Validate(); + } + if (this.ActionOnUnmanage != null) + { + this.ActionOnUnmanage.Validate(); + } + + + if (this.Description != null) + { + if (this.Description.Length > 4096) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "Description", 4096); + } + } + + + + + + + + + } + } +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentStackProperties.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentStackProperties.cs new file mode 100644 index 000000000000..7dc8c2ed3f53 --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentStackProperties.cs @@ -0,0 +1,303 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Resources.Models +{ + using System.Linq; + + /// + /// Deployment stack properties. + /// + public partial class DeploymentStackProperties : DeploymentStacksError + { + /// + /// Initializes a new instance of the DeploymentStackProperties class. + /// + public DeploymentStackProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DeploymentStackProperties class. + /// + + /// Common error response for all Azure Resource Manager APIs to return error + /// details for failed operations. (This also follows the OData error response + /// format.). + /// + + /// The template content. You use this element when you want to pass the + /// template syntax directly in the request rather than link to an existing + /// template. It can be a JObject or well-formed JSON string. Use either the + /// templateLink property or the template property, but not both. + /// + + /// The URI of the template. Use either the templateLink property or the + /// template property, but not both. + /// + + /// Name and value pairs that define the deployment parameters for the + /// template. Use this element when providing the parameter values directly in + /// the request, rather than linking to an existing parameter file. Use either + /// the parametersLink property or the parameters property, but not both. It + /// can be a JObject or a well formed JSON string. + /// + + /// The URI of parameters file. Use this element to link to an existing + /// parameters file. Use either the parametersLink property or the parameters + /// property, but not both. + /// + + /// Defines the behavior of resources that are not managed immediately after + /// the stack is updated. + /// + + /// The debug setting of the deployment. + /// + + /// The scope at which the initial deployment should be created. If a scope is + /// not specified, it will default to the scope of the deployment stack. Valid + /// scopes are: management group (format: + /// '/providers/Microsoft.Management/managementGroups/{managementGroupId}'), + /// subscription (format: '/subscriptions/{subscriptionId}'), resource group + /// (format: + /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}'). + /// + + /// Deployment stack description. + /// + + /// Defines how resources deployed by the stack are locked. + /// + + /// State of the deployment stack. + /// Possible values include: 'Creating', 'Validating', 'Waiting', 'Deploying', + /// 'Canceling', 'Locking', 'DeletingResources', 'Succeeded', 'Failed', + /// 'Canceled', 'Deleting' + + /// An array of resources that were detached during the most recent update. + /// + + /// An array of resources that were deleted during the most recent update. + /// + + /// An array of resources that failed to reach goal state during the most + /// recent update. + /// + + /// An array of resources currently managed by the deployment stack. + /// + + /// The resourceId of the deployment resource created by the deployment stack. + /// + + /// The outputs of the underlying deployment. + /// + + /// The duration of the deployment stack update. + /// + public DeploymentStackProperties(DeploymentStackPropertiesActionOnUnmanage actionOnUnmanage, DenySettings denySettings, ErrorResponse error = default(ErrorResponse), object template = default(object), DeploymentStacksTemplateLink templateLink = default(DeploymentStacksTemplateLink), object parameters = default(object), DeploymentStacksParametersLink parametersLink = default(DeploymentStacksParametersLink), DeploymentStacksDebugSetting debugSetting = default(DeploymentStacksDebugSetting), string deploymentScope = default(string), string description = default(string), string provisioningState = default(string), System.Collections.Generic.IList detachedResources = default(System.Collections.Generic.IList), System.Collections.Generic.IList deletedResources = default(System.Collections.Generic.IList), System.Collections.Generic.IList failedResources = default(System.Collections.Generic.IList), System.Collections.Generic.IList resources = default(System.Collections.Generic.IList), string deploymentId = default(string), object outputs = default(object), string duration = default(string)) + + : base(error) + { + this.Template = template; + this.TemplateLink = templateLink; + this.Parameters = parameters; + this.ParametersLink = parametersLink; + this.ActionOnUnmanage = actionOnUnmanage; + this.DebugSetting = debugSetting; + this.DeploymentScope = deploymentScope; + this.Description = description; + this.DenySettings = denySettings; + this.ProvisioningState = provisioningState; + this.DetachedResources = detachedResources; + this.DeletedResources = deletedResources; + this.FailedResources = failedResources; + this.Resources = resources; + this.DeploymentId = deploymentId; + this.Outputs = outputs; + this.Duration = duration; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the template content. You use this element when you want to + /// pass the template syntax directly in the request rather than link to an + /// existing template. It can be a JObject or well-formed JSON string. Use + /// either the templateLink property or the template property, but not both. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "template")] + public object Template {get; set; } + + /// + /// Gets or sets the URI of the template. Use either the templateLink property + /// or the template property, but not both. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "templateLink")] + public DeploymentStacksTemplateLink TemplateLink {get; set; } + + /// + /// Gets or sets name and value pairs that define the deployment parameters for + /// the template. Use this element when providing the parameter values directly + /// in the request, rather than linking to an existing parameter file. Use + /// either the parametersLink property or the parameters property, but not + /// both. It can be a JObject or a well formed JSON string. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "parameters")] + public object Parameters {get; set; } + + /// + /// Gets or sets the URI of parameters file. Use this element to link to an + /// existing parameters file. Use either the parametersLink property or the + /// parameters property, but not both. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "parametersLink")] + public DeploymentStacksParametersLink ParametersLink {get; set; } + + /// + /// Gets or sets defines the behavior of resources that are not managed + /// immediately after the stack is updated. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "actionOnUnmanage")] + public DeploymentStackPropertiesActionOnUnmanage ActionOnUnmanage {get; set; } + + /// + /// Gets or sets the debug setting of the deployment. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "debugSetting")] + public DeploymentStacksDebugSetting DebugSetting {get; set; } + + /// + /// Gets or sets the scope at which the initial deployment should be created. + /// If a scope is not specified, it will default to the scope of the deployment + /// stack. Valid scopes are: management group (format: + /// '/providers/Microsoft.Management/managementGroups/{managementGroupId}'), + /// subscription (format: '/subscriptions/{subscriptionId}'), resource group + /// (format: + /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}'). + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "deploymentScope")] + public string DeploymentScope {get; set; } + + /// + /// Gets or sets deployment stack description. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "description")] + public string Description {get; set; } + + /// + /// Gets or sets defines how resources deployed by the stack are locked. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "denySettings")] + public DenySettings DenySettings {get; set; } + + /// + /// Gets state of the deployment stack. Possible values include: 'Creating', 'Validating', 'Waiting', 'Deploying', 'Canceling', 'Locking', 'DeletingResources', 'Succeeded', 'Failed', 'Canceled', 'Deleting' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "provisioningState")] + public string ProvisioningState {get; private set; } + + /// + /// Gets an array of resources that were detached during the most recent + /// update. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "detachedResources")] + public System.Collections.Generic.IList DetachedResources {get; private set; } + + /// + /// Gets an array of resources that were deleted during the most recent update. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "deletedResources")] + public System.Collections.Generic.IList DeletedResources {get; private set; } + + /// + /// Gets an array of resources that failed to reach goal state during the most + /// recent update. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "failedResources")] + public System.Collections.Generic.IList FailedResources {get; private set; } + + /// + /// Gets an array of resources currently managed by the deployment stack. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "resources")] + public System.Collections.Generic.IList Resources {get; private set; } + + /// + /// Gets the resourceId of the deployment resource created by the deployment + /// stack. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "deploymentId")] + public string DeploymentId {get; private set; } + + /// + /// Gets the outputs of the underlying deployment. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "outputs")] + public object Outputs {get; private set; } + + /// + /// Gets the duration of the deployment stack update. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "duration")] + public string Duration {get; private set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.ActionOnUnmanage == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ActionOnUnmanage"); + } + if (this.DenySettings == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "DenySettings"); + } + + + + if (this.ParametersLink != null) + { + this.ParametersLink.Validate(); + } + if (this.ActionOnUnmanage != null) + { + this.ActionOnUnmanage.Validate(); + } + + + if (this.Description != null) + { + if (this.Description.Length > 4096) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "Description", 4096); + } + } + if (this.DenySettings != null) + { + this.DenySettings.Validate(); + } + + + + + + + + + } + } +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentStackPropertiesActionOnUnmanage.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentStackPropertiesActionOnUnmanage.cs new file mode 100644 index 000000000000..c76a5e0cdc2d --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentStackPropertiesActionOnUnmanage.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Resources.Models +{ + using System.Linq; + + /// + /// Defines the behavior of resources that are not managed immediately after + /// the stack is updated. + /// + public partial class DeploymentStackPropertiesActionOnUnmanage + { + /// + /// Initializes a new instance of the DeploymentStackPropertiesActionOnUnmanage class. + /// + public DeploymentStackPropertiesActionOnUnmanage() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DeploymentStackPropertiesActionOnUnmanage class. + /// + + /// Specifies the action that should be taken on the resource when the + /// deployment stack is deleted. Delete will attempt to delete the resource + /// from Azure. Detach will leave the resource in it's current state. + /// Possible values include: 'delete', 'detach' + + /// Specifies the action that should be taken on the resource when the + /// deployment stack is deleted. Delete will attempt to delete the resource + /// from Azure. Detach will leave the resource in it's current state. + /// Possible values include: 'delete', 'detach' + + /// Specifies the action that should be taken on the resource when the + /// deployment stack is deleted. Delete will attempt to delete the resource + /// from Azure. Detach will leave the resource in it's current state. + /// Possible values include: 'delete', 'detach' + public DeploymentStackPropertiesActionOnUnmanage(string resources, string resourceGroups = default(string), string managementGroups = default(string)) + + { + this.Resources = resources; + this.ResourceGroups = resourceGroups; + this.ManagementGroups = managementGroups; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets specifies the action that should be taken on the resource when + /// the deployment stack is deleted. Delete will attempt to delete the resource + /// from Azure. Detach will leave the resource in it's current state. Possible values include: 'delete', 'detach' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "resources")] + public string Resources {get; set; } + + /// + /// Gets or sets specifies the action that should be taken on the resource when + /// the deployment stack is deleted. Delete will attempt to delete the resource + /// from Azure. Detach will leave the resource in it's current state. Possible values include: 'delete', 'detach' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "resourceGroups")] + public string ResourceGroups {get; set; } + + /// + /// Gets or sets specifies the action that should be taken on the resource when + /// the deployment stack is deleted. Delete will attempt to delete the resource + /// from Azure. Detach will leave the resource in it's current state. Possible values include: 'delete', 'detach' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "managementGroups")] + public string ManagementGroups {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.Resources == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Resources"); + } + + + + } + } +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/DeploymentStackProvisioningState.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentStackProvisioningState.cs similarity index 90% rename from src/Resources/Resources.Sdk/Generated/Models/DeploymentStackProvisioningState.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentStackProvisioningState.cs index c10597c341b8..16814808e079 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/DeploymentStackProvisioningState.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentStackProvisioningState.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.Resources.Models /// /// Defines values for DeploymentStackProvisioningState. /// + + public static class DeploymentStackProvisioningState { public const string Creating = "Creating"; @@ -28,4 +25,4 @@ public static class DeploymentStackProvisioningState public const string Canceled = "Canceled"; public const string Deleting = "Deleting"; } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/DeploymentStackTemplateDefinition.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentStackTemplateDefinition.cs similarity index 57% rename from src/Resources/Resources.Sdk/Generated/Models/DeploymentStackTemplateDefinition.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentStackTemplateDefinition.cs index 7f26f2b76d45..918975d8729c 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/DeploymentStackTemplateDefinition.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentStackTemplateDefinition.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.Resources.Models public partial class DeploymentStackTemplateDefinition { /// - /// Initializes a new instance of the DeploymentStackTemplateDefinition - /// class. + /// Initializes a new instance of the DeploymentStackTemplateDefinition class. /// public DeploymentStackTemplateDefinition() { @@ -28,21 +21,23 @@ public DeploymentStackTemplateDefinition() } /// - /// Initializes a new instance of the DeploymentStackTemplateDefinition - /// class. + /// Initializes a new instance of the DeploymentStackTemplateDefinition class. /// - /// The template content. Use this element to - /// pass the template syntax directly in the request rather than link - /// to an existing template. It can be a JObject or well-formed JSON - /// string. Use either the templateLink property or the template - /// property, but not both. - /// The URI of the template. Use either the - /// templateLink property or the template property, but not - /// both. + + /// The template content. Use this element to pass the template syntax directly + /// in the request rather than link to an existing template. It can be a + /// JObject or well-formed JSON string. Use either the templateLink property or + /// the template property, but not both. + /// + + /// The URI of the template. Use either the templateLink property or the + /// template property, but not both. + /// public DeploymentStackTemplateDefinition(object template = default(object), DeploymentStacksTemplateLink templateLink = default(DeploymentStacksTemplateLink)) + { - Template = template; - TemplateLink = templateLink; + this.Template = template; + this.TemplateLink = templateLink; CustomInit(); } @@ -51,22 +46,21 @@ public DeploymentStackTemplateDefinition() /// partial void CustomInit(); - /// - /// Gets or sets the template content. Use this element to pass the - /// template syntax directly in the request rather than link to an - /// existing template. It can be a JObject or well-formed JSON string. - /// Use either the templateLink property or the template property, but - /// not both. - /// - [JsonProperty(PropertyName = "template")] - public object Template { get; set; } /// - /// Gets or sets the URI of the template. Use either the templateLink + /// Gets or sets the template content. Use this element to pass the template + /// syntax directly in the request rather than link to an existing template. It + /// can be a JObject or well-formed JSON string. Use either the templateLink /// property or the template property, but not both. /// - [JsonProperty(PropertyName = "templateLink")] - public DeploymentStacksTemplateLink TemplateLink { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "template")] + public object Template {get; set; } + /// + /// Gets or sets the URI of the template. Use either the templateLink property + /// or the template property, but not both. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "templateLink")] + public DeploymentStacksTemplateLink TemplateLink {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentStacksDebugSetting.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentStacksDebugSetting.cs new file mode 100644 index 000000000000..df04d9d69a24 --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentStacksDebugSetting.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Resources.Models +{ + using System.Linq; + + /// + /// The debug setting. + /// + public partial class DeploymentStacksDebugSetting + { + /// + /// Initializes a new instance of the DeploymentStacksDebugSetting class. + /// + public DeploymentStacksDebugSetting() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DeploymentStacksDebugSetting class. + /// + + /// Specifies the type of information to log for debugging. The permitted + /// values are none, requestContent, responseContent, or both requestContent + /// and responseContent separated by a comma. The default is none. When setting + /// this value, carefully consider the type of information that is being passed + /// in during deployment. By logging information about the request or response, + /// sensitive data that is retrieved through the deployment operations could + /// potentially be exposed. + /// + public DeploymentStacksDebugSetting(string detailLevel = default(string)) + + { + this.DetailLevel = detailLevel; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets specifies the type of information to log for debugging. The + /// permitted values are none, requestContent, responseContent, or both + /// requestContent and responseContent separated by a comma. The default is + /// none. When setting this value, carefully consider the type of information + /// that is being passed in during deployment. By logging information about the + /// request or response, sensitive data that is retrieved through the + /// deployment operations could potentially be exposed. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "detailLevel")] + public string DetailLevel {get; set; } + } +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/DeploymentStacksDeleteAtManagementGroupHeaders.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentStacksDeleteAtManagementGroupHeaders.cs similarity index 62% rename from src/Resources/Resources.Sdk/Generated/Models/DeploymentStacksDeleteAtManagementGroupHeaders.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentStacksDeleteAtManagementGroupHeaders.cs index d0b2e89b4bd1..9c637c760504 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/DeploymentStacksDeleteAtManagementGroupHeaders.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentStacksDeleteAtManagementGroupHeaders.cs @@ -1,26 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; - /// - /// Defines headers for DeleteAtManagementGroup operation. - /// public partial class DeploymentStacksDeleteAtManagementGroupHeaders { /// - /// Initializes a new instance of the - /// DeploymentStacksDeleteAtManagementGroupHeaders class. + /// Initializes a new instance of the DeploymentStacksDeleteAtManagementGroupHeaders class. /// public DeploymentStacksDeleteAtManagementGroupHeaders() { @@ -28,12 +18,15 @@ public DeploymentStacksDeleteAtManagementGroupHeaders() } /// - /// Initializes a new instance of the - /// DeploymentStacksDeleteAtManagementGroupHeaders class. + /// Initializes a new instance of the DeploymentStacksDeleteAtManagementGroupHeaders class. /// + + /// + /// public DeploymentStacksDeleteAtManagementGroupHeaders(string location = default(string)) + { - Location = location; + this.Location = location; CustomInit(); } @@ -42,10 +35,11 @@ public DeploymentStacksDeleteAtManagementGroupHeaders() /// partial void CustomInit(); + /// + /// Gets or sets /// - [JsonProperty(PropertyName = "Location")] - public string Location { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] + public string Location {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/DeploymentStacksDeleteAtResourceGroupHeaders.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentStacksDeleteAtResourceGroupHeaders.cs similarity index 62% rename from src/Resources/Resources.Sdk/Generated/Models/DeploymentStacksDeleteAtResourceGroupHeaders.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentStacksDeleteAtResourceGroupHeaders.cs index b3ff45d17312..4a6eb239a187 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/DeploymentStacksDeleteAtResourceGroupHeaders.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentStacksDeleteAtResourceGroupHeaders.cs @@ -1,26 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; - /// - /// Defines headers for DeleteAtResourceGroup operation. - /// public partial class DeploymentStacksDeleteAtResourceGroupHeaders { /// - /// Initializes a new instance of the - /// DeploymentStacksDeleteAtResourceGroupHeaders class. + /// Initializes a new instance of the DeploymentStacksDeleteAtResourceGroupHeaders class. /// public DeploymentStacksDeleteAtResourceGroupHeaders() { @@ -28,12 +18,15 @@ public DeploymentStacksDeleteAtResourceGroupHeaders() } /// - /// Initializes a new instance of the - /// DeploymentStacksDeleteAtResourceGroupHeaders class. + /// Initializes a new instance of the DeploymentStacksDeleteAtResourceGroupHeaders class. /// + + /// + /// public DeploymentStacksDeleteAtResourceGroupHeaders(string location = default(string)) + { - Location = location; + this.Location = location; CustomInit(); } @@ -42,10 +35,11 @@ public DeploymentStacksDeleteAtResourceGroupHeaders() /// partial void CustomInit(); + /// + /// Gets or sets /// - [JsonProperty(PropertyName = "Location")] - public string Location { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] + public string Location {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/DeploymentStacksDeleteAtSubscriptionHeaders.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentStacksDeleteAtSubscriptionHeaders.cs similarity index 62% rename from src/Resources/Resources.Sdk/Generated/Models/DeploymentStacksDeleteAtSubscriptionHeaders.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentStacksDeleteAtSubscriptionHeaders.cs index 0fbf674cdc82..3dc9b3d55691 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/DeploymentStacksDeleteAtSubscriptionHeaders.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentStacksDeleteAtSubscriptionHeaders.cs @@ -1,26 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; - /// - /// Defines headers for DeleteAtSubscription operation. - /// public partial class DeploymentStacksDeleteAtSubscriptionHeaders { /// - /// Initializes a new instance of the - /// DeploymentStacksDeleteAtSubscriptionHeaders class. + /// Initializes a new instance of the DeploymentStacksDeleteAtSubscriptionHeaders class. /// public DeploymentStacksDeleteAtSubscriptionHeaders() { @@ -28,12 +18,15 @@ public DeploymentStacksDeleteAtSubscriptionHeaders() } /// - /// Initializes a new instance of the - /// DeploymentStacksDeleteAtSubscriptionHeaders class. + /// Initializes a new instance of the DeploymentStacksDeleteAtSubscriptionHeaders class. /// + + /// + /// public DeploymentStacksDeleteAtSubscriptionHeaders(string location = default(string)) + { - Location = location; + this.Location = location; CustomInit(); } @@ -42,10 +35,11 @@ public DeploymentStacksDeleteAtSubscriptionHeaders() /// partial void CustomInit(); + /// + /// Gets or sets /// - [JsonProperty(PropertyName = "Location")] - public string Location { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] + public string Location {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/DeploymentStacksDeleteDetachEnum.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentStacksDeleteDetachEnum.cs similarity index 84% rename from src/Resources/Resources.Sdk/Generated/Models/DeploymentStacksDeleteDetachEnum.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentStacksDeleteDetachEnum.cs index 544e9131a58a..c05ad76c944a 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/DeploymentStacksDeleteDetachEnum.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentStacksDeleteDetachEnum.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { @@ -14,9 +9,11 @@ namespace Microsoft.Azure.Management.Resources.Models /// /// Defines values for DeploymentStacksDeleteDetachEnum. /// + + public static class DeploymentStacksDeleteDetachEnum { public const string Delete = "delete"; public const string Detach = "detach"; } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/DeploymentStacksError.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentStacksError.cs similarity index 63% rename from src/Resources/Resources.Sdk/Generated/Models/DeploymentStacksError.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentStacksError.cs index e550230ccd3c..045dae5bb4c1 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/DeploymentStacksError.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentStacksError.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,9 +23,15 @@ public DeploymentStacksError() /// /// Initializes a new instance of the DeploymentStacksError class. /// + + /// Common error response for all Azure Resource Manager APIs to return error + /// details for failed operations. (This also follows the OData error response + /// format.). + /// public DeploymentStacksError(ErrorResponse error = default(ErrorResponse)) + { - Error = error; + this.Error = error; CustomInit(); } @@ -40,10 +40,13 @@ public DeploymentStacksError() /// partial void CustomInit(); + /// + /// Gets or sets common error response for all Azure Resource Manager APIs to + /// return error details for failed operations. (This also follows the OData + /// error response format.). /// - [JsonProperty(PropertyName = "error")] - public ErrorResponse Error { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "error")] + public ErrorResponse Error {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/DeploymentStacksErrorException.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentStacksErrorException.cs similarity index 80% rename from src/Resources/Resources.Sdk/Generated/Models/DeploymentStacksErrorException.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentStacksErrorException.cs index 7b985c5cf15b..4e4783a23ad2 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/DeploymentStacksErrorException.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentStacksErrorException.cs @@ -1,32 +1,25 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Microsoft.Rest; /// - /// Exception thrown for an invalid response with DeploymentStacksError - /// information. + /// Exception thrown for an invalid response with DeploymentStacksError information. /// - public partial class DeploymentStacksErrorException : RestException + public partial class DeploymentStacksErrorException : Microsoft.Rest.RestException { /// /// Gets information about the associated HTTP request. /// - public HttpRequestMessageWrapper Request { get; set; } + public Microsoft.Rest.HttpRequestMessageWrapper Request { get; set; } /// /// Gets information about the associated HTTP response. /// - public HttpResponseMessageWrapper Response { get; set; } + public Microsoft.Rest.HttpResponseMessageWrapper Response { get; set; } /// /// Gets or sets the body object. @@ -41,7 +34,7 @@ public DeploymentStacksErrorException() } /// - /// Initializes a new instance of the DeploymentStacksErrorException class. + /// Initializes a new instance of the DeploymentStacksError class. /// /// The exception message. public DeploymentStacksErrorException(string message) @@ -50,7 +43,7 @@ public DeploymentStacksErrorException(string message) } /// - /// Initializes a new instance of the DeploymentStacksErrorException class. + /// Initializes a new instance of the DeploymentStacksError class. /// /// The exception message. /// Inner exception. @@ -59,4 +52,4 @@ public DeploymentStacksErrorException(string message, System.Exception innerExce { } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/DeploymentStacksParametersLink.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentStacksParametersLink.cs similarity index 67% rename from src/Resources/Resources.Sdk/Generated/Models/DeploymentStacksParametersLink.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentStacksParametersLink.cs index c87e9673f29c..6771b039c048 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/DeploymentStacksParametersLink.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentStacksParametersLink.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +13,7 @@ namespace Microsoft.Azure.Management.Resources.Models public partial class DeploymentStacksParametersLink { /// - /// Initializes a new instance of the DeploymentStacksParametersLink - /// class. + /// Initializes a new instance of the DeploymentStacksParametersLink class. /// public DeploymentStacksParametersLink() { @@ -29,16 +21,19 @@ public DeploymentStacksParametersLink() } /// - /// Initializes a new instance of the DeploymentStacksParametersLink - /// class. + /// Initializes a new instance of the DeploymentStacksParametersLink class. /// - /// The URI of the parameters file. - /// If included, must match the - /// ContentVersion in the template. + + /// The URI of the parameters file. + /// + + /// If included, must match the ContentVersion in the template. + /// public DeploymentStacksParametersLink(string uri, string contentVersion = default(string)) + { - Uri = uri; - ContentVersion = contentVersion; + this.Uri = uri; + this.ContentVersion = contentVersion; CustomInit(); } @@ -47,31 +42,32 @@ public DeploymentStacksParametersLink() /// partial void CustomInit(); + /// /// Gets or sets the URI of the parameters file. /// - [JsonProperty(PropertyName = "uri")] - public string Uri { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "uri")] + public string Uri {get; set; } /// - /// Gets or sets if included, must match the ContentVersion in the - /// template. + /// Gets or sets if included, must match the ContentVersion in the template. /// - [JsonProperty(PropertyName = "contentVersion")] - public string ContentVersion { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "contentVersion")] + public string ContentVersion {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Uri == null) + if (this.Uri == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Uri"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Uri"); } + + } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/DeploymentStacksTemplateLink.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentStacksTemplateLink.cs similarity index 50% rename from src/Resources/Resources.Sdk/Generated/Models/DeploymentStacksTemplateLink.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentStacksTemplateLink.cs index 02d6431c187e..9dd196d42ed7 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/DeploymentStacksTemplateLink.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentStacksTemplateLink.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.Resources.Models public partial class DeploymentStacksTemplateLink { /// - /// Initializes a new instance of the DeploymentStacksTemplateLink - /// class. + /// Initializes a new instance of the DeploymentStacksTemplateLink class. /// public DeploymentStacksTemplateLink() { @@ -28,30 +21,38 @@ public DeploymentStacksTemplateLink() } /// - /// Initializes a new instance of the DeploymentStacksTemplateLink - /// class. + /// Initializes a new instance of the DeploymentStacksTemplateLink class. /// - /// The URI of the template to deploy. Use either the - /// uri or id property, but not both. - /// The resource id of a Template Spec. Use either the - /// id or uri property, but not both. - /// The relativePath property can be used to - /// deploy a linked template at a location relative to the parent. If - /// the parent template was linked with a TemplateSpec, this will - /// reference an artifact in the TemplateSpec. If the parent was - /// linked with a URI, the child deployment will be a combination of - /// the parent and relativePath URIs - /// The query string (for example, a SAS - /// token) to be used with the templateLink URI. - /// If included, must match the - /// ContentVersion in the template. + + /// The URI of the template to deploy. Use either the uri or id property, but + /// not both. + /// + + /// The resource id of a Template Spec. Use either the id or uri property, but + /// not both. + /// + + /// The relativePath property can be used to deploy a linked template at a + /// location relative to the parent. If the parent template was linked with a + /// TemplateSpec, this will reference an artifact in the TemplateSpec. If the + /// parent was linked with a URI, the child deployment will be a combination of + /// the parent and relativePath URIs + /// + + /// The query string (for example, a SAS token) to be used with the + /// templateLink URI. + /// + + /// If included, must match the ContentVersion in the template. + /// public DeploymentStacksTemplateLink(string uri = default(string), string id = default(string), string relativePath = default(string), string queryString = default(string), string contentVersion = default(string)) + { - Uri = uri; - Id = id; - RelativePath = relativePath; - QueryString = queryString; - ContentVersion = contentVersion; + this.Uri = uri; + this.Id = id; + this.RelativePath = relativePath; + this.QueryString = queryString; + this.ContentVersion = contentVersion; CustomInit(); } @@ -60,44 +61,42 @@ public DeploymentStacksTemplateLink() /// partial void CustomInit(); + /// - /// Gets or sets the URI of the template to deploy. Use either the uri - /// or id property, but not both. + /// Gets or sets the URI of the template to deploy. Use either the uri or id + /// property, but not both. /// - [JsonProperty(PropertyName = "uri")] - public string Uri { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "uri")] + public string Uri {get; set; } /// - /// Gets or sets the resource id of a Template Spec. Use either the id - /// or uri property, but not both. + /// Gets or sets the resource id of a Template Spec. Use either the id or uri + /// property, but not both. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; set; } /// - /// Gets or sets the relativePath property can be used to deploy a - /// linked template at a location relative to the parent. If the parent - /// template was linked with a TemplateSpec, this will reference an - /// artifact in the TemplateSpec. If the parent was linked with a URI, - /// the child deployment will be a combination of the parent and - /// relativePath URIs + /// Gets or sets the relativePath property can be used to deploy a linked + /// template at a location relative to the parent. If the parent template was + /// linked with a TemplateSpec, this will reference an artifact in the + /// TemplateSpec. If the parent was linked with a URI, the child deployment + /// will be a combination of the parent and relativePath URIs /// - [JsonProperty(PropertyName = "relativePath")] - public string RelativePath { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "relativePath")] + public string RelativePath {get; set; } /// - /// Gets or sets the query string (for example, a SAS token) to be used - /// with the templateLink URI. + /// Gets or sets the query string (for example, a SAS token) to be used with + /// the templateLink URI. /// - [JsonProperty(PropertyName = "queryString")] - public string QueryString { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "queryString")] + public string QueryString {get; set; } /// - /// Gets or sets if included, must match the ContentVersion in the - /// template. + /// Gets or sets if included, must match the ContentVersion in the template. /// - [JsonProperty(PropertyName = "contentVersion")] - public string ContentVersion { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "contentVersion")] + public string ContentVersion {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/DeploymentValidateResult.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentValidateResult.cs similarity index 72% rename from src/Resources/Resources.Sdk/Generated/Models/DeploymentValidateResult.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentValidateResult.cs index f74b24563bc4..3c8e092bb9cc 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/DeploymentValidateResult.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentValidateResult.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,13 +23,17 @@ public DeploymentValidateResult() /// /// Initializes a new instance of the DeploymentValidateResult class. /// - /// The deployment validation error. - /// The template deployment - /// properties. + + /// The deployment validation error. + /// + + /// The template deployment properties. + /// public DeploymentValidateResult(ErrorResponse error = default(ErrorResponse), DeploymentPropertiesExtended properties = default(DeploymentPropertiesExtended)) + { - Error = error; - Properties = properties; + this.Error = error; + this.Properties = properties; CustomInit(); } @@ -44,30 +42,31 @@ public DeploymentValidateResult() /// partial void CustomInit(); + /// /// Gets the deployment validation error. /// - [JsonProperty(PropertyName = "error")] - public ErrorResponse Error { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "error")] + public ErrorResponse Error {get; private set; } /// /// Gets or sets the template deployment properties. /// - [JsonProperty(PropertyName = "properties")] - public DeploymentPropertiesExtended Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public DeploymentPropertiesExtended Properties {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Properties != null) + + if (this.Properties != null) { - Properties.Validate(); + this.Properties.Validate(); } } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/DeploymentWhatIf.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentWhatIf.cs similarity index 66% rename from src/Resources/Resources.Sdk/Generated/Models/DeploymentWhatIf.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentWhatIf.cs index 33ff083d5da9..78a32c4433ab 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/DeploymentWhatIf.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentWhatIf.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -30,13 +23,17 @@ public DeploymentWhatIf() /// /// Initializes a new instance of the DeploymentWhatIf class. /// - /// The deployment properties. - /// The location to store the deployment - /// data. + + /// The location to store the deployment data. + /// + + /// The deployment properties. + /// public DeploymentWhatIf(DeploymentWhatIfProperties properties, string location = default(string)) + { - Location = location; - Properties = properties; + this.Location = location; + this.Properties = properties; CustomInit(); } @@ -45,34 +42,35 @@ public DeploymentWhatIf() /// partial void CustomInit(); + /// /// Gets or sets the location to store the deployment data. /// - [JsonProperty(PropertyName = "location")] - public string Location { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "location")] + public string Location {get; set; } /// /// Gets or sets the deployment properties. /// - [JsonProperty(PropertyName = "properties")] - public DeploymentWhatIfProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public DeploymentWhatIfProperties Properties {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Properties == null) + if (this.Properties == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Properties"); } - if (Properties != null) + + if (this.Properties != null) { - Properties.Validate(); + this.Properties.Validate(); } } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/DeploymentWhatIfProperties.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentWhatIfProperties.cs similarity index 51% rename from src/Resources/Resources.Sdk/Generated/Models/DeploymentWhatIfProperties.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentWhatIfProperties.cs index b2c2f3669582..e100a29e7324 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/DeploymentWhatIfProperties.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentWhatIfProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,46 +23,56 @@ public DeploymentWhatIfProperties() /// /// Initializes a new instance of the DeploymentWhatIfProperties class. /// - /// The mode that is used to deploy resources. This - /// value can be either Incremental or Complete. In Incremental mode, - /// resources are deployed without deleting existing resources that are - /// not included in the template. In Complete mode, resources are - /// deployed and existing resources in the resource group that are not - /// included in the template are deleted. Be careful when using - /// Complete mode as you may unintentionally delete resources. Possible - /// values include: 'Incremental', 'Complete' - /// The template content. You use this element - /// when you want to pass the template syntax directly in the request - /// rather than link to an existing template. It can be a JObject or - /// well-formed JSON string. Use either the templateLink property or - /// the template property, but not both. - /// The URI of the template. Use either the - /// templateLink property or the template property, but not - /// both. - /// Name and value pairs that define the - /// deployment parameters for the template. You use this element when - /// you want to provide the parameter values directly in the request - /// rather than link to an existing parameter file. Use either the - /// parametersLink property or the parameters property, but not both. - /// It can be a JObject or a well formed JSON string. - /// The URI of parameters file. You use - /// this element to link to an existing parameters file. Use either the - /// parametersLink property or the parameters property, but not - /// both. - /// The debug setting of the - /// deployment. - /// The deployment on error - /// behavior. - /// Specifies whether - /// template expressions are evaluated within the scope of the parent - /// template or nested template. Only applicable to nested templates. - /// If not specified, default value is outer. - /// Optional What-If operation - /// settings. + + /// The template content. You use this element when you want to pass the + /// template syntax directly in the request rather than link to an existing + /// template. It can be a JObject or well-formed JSON string. Use either the + /// templateLink property or the template property, but not both. + /// + + /// The URI of the template. Use either the templateLink property or the + /// template property, but not both. + /// + + /// Name and value pairs that define the deployment parameters for the + /// template. You use this element when you want to provide the parameter + /// values directly in the request rather than link to an existing parameter + /// file. Use either the parametersLink property or the parameters property, + /// but not both. It can be a JObject or a well formed JSON string. + /// + + /// The URI of parameters file. You use this element to link to an existing + /// parameters file. Use either the parametersLink property or the parameters + /// property, but not both. + /// + + /// The mode that is used to deploy resources. This value can be either + /// Incremental or Complete. In Incremental mode, resources are deployed + /// without deleting existing resources that are not included in the template. + /// In Complete mode, resources are deployed and existing resources in the + /// resource group that are not included in the template are deleted. Be + /// careful when using Complete mode as you may unintentionally delete + /// resources. + /// Possible values include: 'Incremental', 'Complete' + + /// The debug setting of the deployment. + /// + + /// The deployment on error behavior. + /// + + /// Specifies whether template expressions are evaluated within the scope of + /// the parent template or nested template. Only applicable to nested + /// templates. If not specified, default value is outer. + /// + + /// Optional What-If operation settings. + /// public DeploymentWhatIfProperties(DeploymentMode mode, object template = default(object), TemplateLink templateLink = default(TemplateLink), object parameters = default(object), ParametersLink parametersLink = default(ParametersLink), DebugSetting debugSetting = default(DebugSetting), OnErrorDeployment onErrorDeployment = default(OnErrorDeployment), ExpressionEvaluationOptions expressionEvaluationOptions = default(ExpressionEvaluationOptions), DeploymentWhatIfSettings whatIfSettings = default(DeploymentWhatIfSettings)) - : base(mode, template, templateLink, parameters, parametersLink, debugSetting, onErrorDeployment, expressionEvaluationOptions) + + : base(mode, template, templateLink, parameters, parametersLink, debugSetting, onErrorDeployment, expressionEvaluationOptions) { - WhatIfSettings = whatIfSettings; + this.WhatIfSettings = whatIfSettings; CustomInit(); } @@ -77,21 +81,22 @@ public DeploymentWhatIfProperties() /// partial void CustomInit(); + /// /// Gets or sets optional What-If operation settings. /// - [JsonProperty(PropertyName = "whatIfSettings")] - public DeploymentWhatIfSettings WhatIfSettings { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "whatIfSettings")] + public DeploymentWhatIfSettings WhatIfSettings {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public override void Validate() { base.Validate(); + } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/DeploymentWhatIfSettings.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentWhatIfSettings.cs similarity index 69% rename from src/Resources/Resources.Sdk/Generated/Models/DeploymentWhatIfSettings.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentWhatIfSettings.cs index f53ef756a91c..15b43878b32b 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/DeploymentWhatIfSettings.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentWhatIfSettings.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,12 +23,13 @@ public DeploymentWhatIfSettings() /// /// Initializes a new instance of the DeploymentWhatIfSettings class. /// - /// The format of the What-If results. - /// Possible values include: 'ResourceIdOnly', - /// 'FullResourcePayloads' + + /// The format of the What-If results + /// Possible values include: 'ResourceIdOnly', 'FullResourcePayloads' public DeploymentWhatIfSettings(WhatIfResultFormat? resultFormat = default(WhatIfResultFormat?)) + { - ResultFormat = resultFormat; + this.ResultFormat = resultFormat; CustomInit(); } @@ -43,12 +38,11 @@ public DeploymentWhatIfSettings() /// partial void CustomInit(); + /// - /// Gets or sets the format of the What-If results. Possible values - /// include: 'ResourceIdOnly', 'FullResourcePayloads' + /// Gets or sets the format of the What-If results Possible values include: 'ResourceIdOnly', 'FullResourcePayloads' /// - [JsonProperty(PropertyName = "resultFormat")] - public WhatIfResultFormat? ResultFormat { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "resultFormat")] + public WhatIfResultFormat? ResultFormat {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentsWhatIfAtManagementGroupScopeHeaders.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentsWhatIfAtManagementGroupScopeHeaders.cs new file mode 100644 index 000000000000..04f722c59838 --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentsWhatIfAtManagementGroupScopeHeaders.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Resources.Models +{ + using System.Linq; + + public partial class DeploymentsWhatIfAtManagementGroupScopeHeaders + { + /// + /// Initializes a new instance of the DeploymentsWhatIfAtManagementGroupScopeHeaders class. + /// + public DeploymentsWhatIfAtManagementGroupScopeHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DeploymentsWhatIfAtManagementGroupScopeHeaders class. + /// + + /// + /// + + /// + /// + public DeploymentsWhatIfAtManagementGroupScopeHeaders(string location = default(string), string retryAfter = default(string)) + + { + this.Location = location; + this.RetryAfter = retryAfter; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] + public string Location {get; set; } + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Retry-After")] + public string RetryAfter {get; set; } + } +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentsWhatIfAtSubscriptionScopeHeaders.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentsWhatIfAtSubscriptionScopeHeaders.cs new file mode 100644 index 000000000000..43ea5a8c01e2 --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentsWhatIfAtSubscriptionScopeHeaders.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Resources.Models +{ + using System.Linq; + + public partial class DeploymentsWhatIfAtSubscriptionScopeHeaders + { + /// + /// Initializes a new instance of the DeploymentsWhatIfAtSubscriptionScopeHeaders class. + /// + public DeploymentsWhatIfAtSubscriptionScopeHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DeploymentsWhatIfAtSubscriptionScopeHeaders class. + /// + + /// + /// + + /// + /// + public DeploymentsWhatIfAtSubscriptionScopeHeaders(string location = default(string), string retryAfter = default(string)) + + { + this.Location = location; + this.RetryAfter = retryAfter; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] + public string Location {get; set; } + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Retry-After")] + public string RetryAfter {get; set; } + } +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentsWhatIfAtTenantScopeHeaders.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentsWhatIfAtTenantScopeHeaders.cs new file mode 100644 index 000000000000..a8334569a6c5 --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentsWhatIfAtTenantScopeHeaders.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Resources.Models +{ + using System.Linq; + + public partial class DeploymentsWhatIfAtTenantScopeHeaders + { + /// + /// Initializes a new instance of the DeploymentsWhatIfAtTenantScopeHeaders class. + /// + public DeploymentsWhatIfAtTenantScopeHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DeploymentsWhatIfAtTenantScopeHeaders class. + /// + + /// + /// + + /// + /// + public DeploymentsWhatIfAtTenantScopeHeaders(string location = default(string), string retryAfter = default(string)) + + { + this.Location = location; + this.RetryAfter = retryAfter; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] + public string Location {get; set; } + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Retry-After")] + public string RetryAfter {get; set; } + } +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/DeploymentsWhatIfHeaders.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentsWhatIfHeaders.cs similarity index 57% rename from src/Resources/Resources.Sdk/Generated/Models/DeploymentsWhatIfHeaders.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentsWhatIfHeaders.cs index 288e8dd566d0..1c9d24794ac7 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/DeploymentsWhatIfHeaders.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/DeploymentsWhatIfHeaders.cs @@ -1,21 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; - /// - /// Defines headers for WhatIf operation. - /// public partial class DeploymentsWhatIfHeaders { /// @@ -29,14 +20,17 @@ public DeploymentsWhatIfHeaders() /// /// Initializes a new instance of the DeploymentsWhatIfHeaders class. /// - /// URL to get status of this long-running - /// operation. - /// Number of seconds to wait before polling - /// for status. + + /// + /// + + /// + /// public DeploymentsWhatIfHeaders(string location = default(string), string retryAfter = default(string)) + { - Location = location; - RetryAfter = retryAfter; + this.Location = location; + this.RetryAfter = retryAfter; CustomInit(); } @@ -45,17 +39,17 @@ public DeploymentsWhatIfHeaders() /// partial void CustomInit(); + /// - /// Gets or sets URL to get status of this long-running operation. + /// Gets or sets /// - [JsonProperty(PropertyName = "Location")] - public string Location { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] + public string Location {get; set; } /// - /// Gets or sets number of seconds to wait before polling for status. + /// Gets or sets /// - [JsonProperty(PropertyName = "Retry-After")] - public string RetryAfter { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "Retry-After")] + public string RetryAfter {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/EnvironmentVariable.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/EnvironmentVariable.cs similarity index 69% rename from src/Resources/Resources.Sdk/Generated/Models/EnvironmentVariable.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/EnvironmentVariable.cs index 510ce7edbe83..89db9d4f1921 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/EnvironmentVariable.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/EnvironmentVariable.cs @@ -1,22 +1,14 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// - /// The environment variable to pass to the script in the container - /// instance. + /// The environment variable to pass to the script in the container instance. /// public partial class EnvironmentVariable { @@ -31,15 +23,21 @@ public EnvironmentVariable() /// /// Initializes a new instance of the EnvironmentVariable class. /// - /// The name of the environment variable. - /// The value of the environment variable. - /// The value of the secure environment - /// variable. + + /// The name of the environment variable. + /// + + /// The value of the environment variable. + /// + + /// The value of the secure environment variable. + /// public EnvironmentVariable(string name, string value = default(string), string secureValue = default(string)) + { - Name = name; - Value = value; - SecureValue = secureValue; + this.Name = name; + this.Value = value; + this.SecureValue = secureValue; CustomInit(); } @@ -48,36 +46,39 @@ public EnvironmentVariable() /// partial void CustomInit(); + /// /// Gets or sets the name of the environment variable. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } /// /// Gets or sets the value of the environment variable. /// - [JsonProperty(PropertyName = "value")] - public string Value { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "value")] + public string Value {get; set; } /// /// Gets or sets the value of the secure environment variable. /// - [JsonProperty(PropertyName = "secureValue")] - public string SecureValue { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "secureValue")] + public string SecureValue {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Name == null) + if (this.Name == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Name"); } + + + } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ErrorAdditionalInfo.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ErrorAdditionalInfo.cs similarity index 72% rename from src/Resources/Resources.Sdk/Generated/Models/ErrorAdditionalInfo.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ErrorAdditionalInfo.cs index 9b576c5aa6a6..8ac0d1cbbb8f 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ErrorAdditionalInfo.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ErrorAdditionalInfo.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,12 +23,17 @@ public ErrorAdditionalInfo() /// /// Initializes a new instance of the ErrorAdditionalInfo class. /// - /// The additional info type. - /// The additional info. + + /// The additional info type. + /// + + /// The additional info. + /// public ErrorAdditionalInfo(string type = default(string), object info = default(object)) + { - Type = type; - Info = info; + this.Type = type; + this.Info = info; CustomInit(); } @@ -43,17 +42,17 @@ public ErrorAdditionalInfo() /// partial void CustomInit(); + /// /// Gets the additional info type. /// - [JsonProperty(PropertyName = "type")] - public string Type { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; private set; } /// /// Gets the additional info. /// - [JsonProperty(PropertyName = "info")] - public object Info { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "info")] + public object Info {get; private set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ErrorDefinition.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ErrorDefinition.cs similarity index 58% rename from src/Resources/Resources.Sdk/Generated/Models/ErrorDefinition.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ErrorDefinition.cs index 47d3b9c64c41..2c98d409e6db 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ErrorDefinition.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ErrorDefinition.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,15 +23,22 @@ public ErrorDefinition() /// /// Initializes a new instance of the ErrorDefinition class. /// - /// Service specific error code which serves as the - /// substatus for the HTTP error code. - /// Description of the error. - /// Internal error details. - public ErrorDefinition(string code = default(string), string message = default(string), IList details = default(IList)) + + /// Service specific error code which serves as the substatus for the HTTP + /// error code. + /// + + /// Description of the error. + /// + + /// Internal error details. + /// + public ErrorDefinition(string code = default(string), string message = default(string), System.Collections.Generic.IList details = default(System.Collections.Generic.IList)) + { - Code = code; - Message = message; - Details = details; + this.Code = code; + this.Message = message; + this.Details = details; CustomInit(); } @@ -48,24 +47,24 @@ public ErrorDefinition() /// partial void CustomInit(); + /// - /// Gets service specific error code which serves as the substatus for - /// the HTTP error code. + /// Gets service specific error code which serves as the substatus for the HTTP + /// error code. /// - [JsonProperty(PropertyName = "code")] - public string Code { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "code")] + public string Code {get; private set; } /// /// Gets description of the error. /// - [JsonProperty(PropertyName = "message")] - public string Message { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "message")] + public string Message {get; private set; } /// /// Gets or sets internal error details. /// - [JsonProperty(PropertyName = "details")] - public IList Details { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "details")] + public System.Collections.Generic.IList Details {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/Models/ErrorDetail.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ErrorDetail.cs new file mode 100644 index 000000000000..6af7910e1a0b --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ErrorDetail.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Resources.Models +{ + using System.Linq; + + /// + /// The error detail. + /// + public partial class ErrorDetail + { + /// + /// Initializes a new instance of the ErrorDetail class. + /// + public ErrorDetail() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ErrorDetail class. + /// + + /// The error code. + /// + + /// The error message. + /// + + /// The error target. + /// + + /// The error details. + /// + + /// The error additional info. + /// + public ErrorDetail(string code = default(string), string message = default(string), string target = default(string), System.Collections.Generic.IList details = default(System.Collections.Generic.IList), System.Collections.Generic.IList additionalInfo = default(System.Collections.Generic.IList)) + + { + this.Code = code; + this.Message = message; + this.Target = target; + this.Details = details; + this.AdditionalInfo = additionalInfo; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets the error code. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "code")] + public string Code {get; private set; } + + /// + /// Gets the error message. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "message")] + public string Message {get; private set; } + + /// + /// Gets the error target. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "target")] + public string Target {get; private set; } + + /// + /// Gets the error details. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "details")] + public System.Collections.Generic.IList Details {get; private set; } + + /// + /// Gets the error additional info. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "additionalInfo")] + public System.Collections.Generic.IList AdditionalInfo {get; private set; } + } +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/Models/ErrorResponse.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ErrorResponse.cs new file mode 100644 index 000000000000..b320f7c2f1d4 --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ErrorResponse.cs @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Resources.Models +{ + using System.Linq; + + /// + /// Common error response for all Azure Resource Manager APIs to return error + /// details for failed operations. (This also follows the OData error response + /// format.) + /// + /// + /// Common error response for all Azure Resource Manager APIs to return error + /// details for failed operations. (This also follows the OData error response + /// format.) + /// + public partial class ErrorResponse + { + /// + /// Initializes a new instance of the ErrorResponse class. + /// + public ErrorResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ErrorResponse class. + /// + + /// The error code. + /// + + /// The error message. + /// + + /// The error target. + /// + + /// The error details. + /// + + /// The error additional info. + /// + public ErrorResponse(string code = default(string), string message = default(string), string target = default(string), System.Collections.Generic.IList details = default(System.Collections.Generic.IList), System.Collections.Generic.IList additionalInfo = default(System.Collections.Generic.IList)) + + { + this.Code = code; + this.Message = message; + this.Target = target; + this.Details = details; + this.AdditionalInfo = additionalInfo; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets the error code. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "code")] + public string Code {get; private set; } + + /// + /// Gets the error message. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "message")] + public string Message {get; private set; } + + /// + /// Gets the error target. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "target")] + public string Target {get; private set; } + + /// + /// Gets the error details. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "details")] + public System.Collections.Generic.IList Details {get; private set; } + + /// + /// Gets the error additional info. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "additionalInfo")] + public System.Collections.Generic.IList AdditionalInfo {get; private set; } + } +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/Models/ErrorResponseAutoGenerated.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ErrorResponseAutoGenerated.cs new file mode 100644 index 000000000000..e9fc056ed28f --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ErrorResponseAutoGenerated.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Resources.Models +{ + using System.Linq; + + /// + /// Common error response for all Azure Resource Manager APIs to return error + /// details for failed operations. (This also follows the OData error response + /// format.). + /// + /// + /// Common error response for all Azure Resource Manager APIs to return error + /// details for failed operations. (This also follows the OData error response + /// format.). + /// + public partial class ErrorResponseAutoGenerated + { + /// + /// Initializes a new instance of the ErrorResponseAutoGenerated class. + /// + public ErrorResponseAutoGenerated() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ErrorResponseAutoGenerated class. + /// + + /// The error object. + /// + public ErrorResponseAutoGenerated(ErrorDetail error = default(ErrorDetail)) + + { + this.Error = error; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the error object. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "error")] + public ErrorDetail Error {get; set; } + } +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/DeploymentStackPropertiesException.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ErrorResponseAutoGeneratedException.cs similarity index 53% rename from src/Resources/Resources.Sdk/Generated/Models/DeploymentStackPropertiesException.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ErrorResponseAutoGeneratedException.cs index 4f85f7af990f..a61491fa600a 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/DeploymentStackPropertiesException.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ErrorResponseAutoGeneratedException.cs @@ -1,62 +1,55 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Microsoft.Rest; /// - /// Exception thrown for an invalid response with DeploymentStackProperties - /// information. + /// Exception thrown for an invalid response with ErrorResponseAutoGenerated information. /// - public partial class DeploymentStackPropertiesException : RestException + public partial class ErrorResponseAutoGeneratedException : Microsoft.Rest.RestException { /// /// Gets information about the associated HTTP request. /// - public HttpRequestMessageWrapper Request { get; set; } + public Microsoft.Rest.HttpRequestMessageWrapper Request { get; set; } /// /// Gets information about the associated HTTP response. /// - public HttpResponseMessageWrapper Response { get; set; } + public Microsoft.Rest.HttpResponseMessageWrapper Response { get; set; } /// /// Gets or sets the body object. /// - public DeploymentStackProperties Body { get; set; } + public ErrorResponseAutoGenerated Body { get; set; } /// - /// Initializes a new instance of the DeploymentStackPropertiesException class. + /// Initializes a new instance of the ErrorResponseAutoGeneratedException class. /// - public DeploymentStackPropertiesException() + public ErrorResponseAutoGeneratedException() { } /// - /// Initializes a new instance of the DeploymentStackPropertiesException class. + /// Initializes a new instance of the ErrorResponseAutoGenerated class. /// /// The exception message. - public DeploymentStackPropertiesException(string message) + public ErrorResponseAutoGeneratedException(string message) : this(message, null) { } /// - /// Initializes a new instance of the DeploymentStackPropertiesException class. + /// Initializes a new instance of the ErrorResponseAutoGenerated class. /// /// The exception message. /// Inner exception. - public DeploymentStackPropertiesException(string message, System.Exception innerException) + public ErrorResponseAutoGeneratedException(string message, System.Exception innerException) : base(message, innerException) { } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ErrorResponseException.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ErrorResponseException.cs similarity index 75% rename from src/Resources/Resources.Sdk/Generated/Models/ErrorResponseException.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ErrorResponseException.cs index d0b2f68bb1d0..67fc301f8169 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ErrorResponseException.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ErrorResponseException.cs @@ -1,32 +1,25 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Microsoft.Rest; /// - /// Exception thrown for an invalid response with ErrorResponse - /// information. + /// Exception thrown for an invalid response with ErrorResponse information. /// - public partial class ErrorResponseException : RestException + public partial class ErrorResponseException : Microsoft.Rest.RestException { /// /// Gets information about the associated HTTP request. /// - public HttpRequestMessageWrapper Request { get; set; } + public Microsoft.Rest.HttpRequestMessageWrapper Request { get; set; } /// /// Gets information about the associated HTTP response. /// - public HttpResponseMessageWrapper Response { get; set; } + public Microsoft.Rest.HttpResponseMessageWrapper Response { get; set; } /// /// Gets or sets the body object. @@ -41,7 +34,7 @@ public ErrorResponseException() } /// - /// Initializes a new instance of the ErrorResponseException class. + /// Initializes a new instance of the ErrorResponse class. /// /// The exception message. public ErrorResponseException(string message) @@ -50,7 +43,7 @@ public ErrorResponseException(string message) } /// - /// Initializes a new instance of the ErrorResponseException class. + /// Initializes a new instance of the ErrorResponse class. /// /// The exception message. /// Inner exception. @@ -59,4 +52,4 @@ public ErrorResponseException(string message, System.Exception innerException) { } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ExportTemplateRequest.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ExportTemplateRequest.cs similarity index 52% rename from src/Resources/Resources.Sdk/Generated/Models/ExportTemplateRequest.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ExportTemplateRequest.cs index 8f7821992196..cb03fea6c04d 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ExportTemplateRequest.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ExportTemplateRequest.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,18 +23,20 @@ public ExportTemplateRequest() /// /// Initializes a new instance of the ExportTemplateRequest class. /// - /// The IDs of the resources to filter the - /// export by. To export all resources, supply an array with single - /// entry '*'. - /// The export template options. A CSV-formatted - /// list containing zero or more of the following: - /// 'IncludeParameterDefaultValue', 'IncludeComments', - /// 'SkipResourceNameParameterization', - /// 'SkipAllParameterization' - public ExportTemplateRequest(IList resources = default(IList), string options = default(string)) + + /// The IDs of the resources to filter the export by. To export all resources, + /// supply an array with single entry '*'. + /// + + /// The export template options. A CSV-formatted list containing zero or more + /// of the following: 'IncludeParameterDefaultValue', 'IncludeComments', + /// 'SkipResourceNameParameterization', 'SkipAllParameterization' + /// + public ExportTemplateRequest(System.Collections.Generic.IList resources = default(System.Collections.Generic.IList), string options = default(string)) + { - Resources = resources; - Options = options; + this.Resources = resources; + this.Options = options; CustomInit(); } @@ -51,21 +45,21 @@ public ExportTemplateRequest() /// partial void CustomInit(); + /// - /// Gets or sets the IDs of the resources to filter the export by. To - /// export all resources, supply an array with single entry '*'. + /// Gets or sets the IDs of the resources to filter the export by. To export + /// all resources, supply an array with single entry '*'. /// - [JsonProperty(PropertyName = "resources")] - public IList Resources { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resources")] + public System.Collections.Generic.IList Resources {get; set; } /// - /// Gets or sets the export template options. A CSV-formatted list - /// containing zero or more of the following: - /// 'IncludeParameterDefaultValue', 'IncludeComments', - /// 'SkipResourceNameParameterization', 'SkipAllParameterization' + /// Gets or sets the export template options. A CSV-formatted list containing + /// zero or more of the following: 'IncludeParameterDefaultValue', + /// 'IncludeComments', 'SkipResourceNameParameterization', + /// 'SkipAllParameterization' /// - [JsonProperty(PropertyName = "options")] - public string Options { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "options")] + public string Options {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ExpressionEvaluationOptions.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ExpressionEvaluationOptions.cs similarity index 65% rename from src/Resources/Resources.Sdk/Generated/Models/ExpressionEvaluationOptions.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ExpressionEvaluationOptions.cs index 4cd9fda3a3a7..18efa387250e 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ExpressionEvaluationOptions.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ExpressionEvaluationOptions.cs @@ -1,27 +1,20 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// - /// Specifies whether template expressions are evaluated within the scope - /// of the parent template or nested template. + /// Specifies whether template expressions are evaluated within the scope of + /// the parent template or nested template. /// public partial class ExpressionEvaluationOptions { /// - /// Initializes a new instance of the ExpressionEvaluationOptions - /// class. + /// Initializes a new instance of the ExpressionEvaluationOptions class. /// public ExpressionEvaluationOptions() { @@ -29,15 +22,16 @@ public ExpressionEvaluationOptions() } /// - /// Initializes a new instance of the ExpressionEvaluationOptions - /// class. + /// Initializes a new instance of the ExpressionEvaluationOptions class. /// - /// The scope to be used for evaluation of - /// parameters, variables and functions in a nested template. Possible - /// values include: 'NotSpecified', 'Outer', 'Inner' + + /// The scope to be used for evaluation of parameters, variables and functions + /// in a nested template. + /// Possible values include: 'NotSpecified', 'Outer', 'Inner' public ExpressionEvaluationOptions(string scope = default(string)) + { - Scope = scope; + this.Scope = scope; CustomInit(); } @@ -46,13 +40,12 @@ public ExpressionEvaluationOptions() /// partial void CustomInit(); + /// - /// Gets or sets the scope to be used for evaluation of parameters, - /// variables and functions in a nested template. Possible values - /// include: 'NotSpecified', 'Outer', 'Inner' + /// Gets or sets the scope to be used for evaluation of parameters, variables + /// and functions in a nested template. Possible values include: 'NotSpecified', 'Outer', 'Inner' /// - [JsonProperty(PropertyName = "scope")] - public string Scope { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "scope")] + public string Scope {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ExpressionEvaluationOptionsScopeType.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ExpressionEvaluationOptionsScopeType.cs similarity index 85% rename from src/Resources/Resources.Sdk/Generated/Models/ExpressionEvaluationOptionsScopeType.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ExpressionEvaluationOptionsScopeType.cs index 7e125e11bcb8..fb483bcc1a9d 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ExpressionEvaluationOptionsScopeType.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ExpressionEvaluationOptionsScopeType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.Resources.Models /// /// Defines values for ExpressionEvaluationOptionsScopeType. /// + + public static class ExpressionEvaluationOptionsScopeType { public const string NotSpecified = "NotSpecified"; public const string Outer = "Outer"; public const string Inner = "Inner"; } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ExtendedLocation.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ExtendedLocation.cs similarity index 69% rename from src/Resources/Resources.Sdk/Generated/Models/ExtendedLocation.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ExtendedLocation.cs index f656ba694e97..d311389c4f21 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ExtendedLocation.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ExtendedLocation.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,13 +23,17 @@ public ExtendedLocation() /// /// Initializes a new instance of the ExtendedLocation class. /// - /// The extended location type. Possible values - /// include: 'EdgeZone' - /// The extended location name. + + /// The extended location type. + /// Possible values include: 'EdgeZone' + + /// The extended location name. + /// public ExtendedLocation(string type = default(string), string name = default(string)) + { - Type = type; - Name = name; + this.Type = type; + this.Name = name; CustomInit(); } @@ -44,18 +42,17 @@ public ExtendedLocation() /// partial void CustomInit(); + /// - /// Gets or sets the extended location type. Possible values include: - /// 'EdgeZone' + /// Gets or sets the extended location type. Possible values include: 'EdgeZone' /// - [JsonProperty(PropertyName = "type")] - public string Type { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; set; } /// /// Gets or sets the extended location name. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ExtendedLocationType.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ExtendedLocationType.cs similarity index 82% rename from src/Resources/Resources.Sdk/Generated/Models/ExtendedLocationType.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ExtendedLocationType.cs index 3bcdf0f751c1..6aa3e6a5515a 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ExtendedLocationType.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ExtendedLocationType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { @@ -14,8 +9,10 @@ namespace Microsoft.Azure.Management.Resources.Models /// /// Defines values for ExtendedLocationType. /// + + public static class ExtendedLocationType { public const string EdgeZone = "EdgeZone"; } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/FeatureProperties.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/FeatureProperties.cs similarity index 78% rename from src/Resources/Resources.Sdk/Generated/Models/FeatureProperties.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/FeatureProperties.cs index 3e7d244fc1f1..d02b51bef0ee 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/FeatureProperties.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/FeatureProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,11 +23,13 @@ public FeatureProperties() /// /// Initializes a new instance of the FeatureProperties class. /// - /// The registration state of the feature for the - /// subscription. + + /// The registration state of the feature for the subscription. + /// public FeatureProperties(string state = default(string)) + { - State = state; + this.State = state; CustomInit(); } @@ -42,12 +38,11 @@ public FeatureProperties() /// partial void CustomInit(); + /// - /// Gets or sets the registration state of the feature for the - /// subscription. + /// Gets or sets the registration state of the feature for the subscription. /// - [JsonProperty(PropertyName = "state")] - public string State { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "state")] + public string State {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/FeatureResult.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/FeatureResult.cs similarity index 67% rename from src/Resources/Resources.Sdk/Generated/Models/FeatureResult.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/FeatureResult.cs index 5f334c5dac82..a9d1a7ffb26e 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/FeatureResult.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/FeatureResult.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,17 +23,25 @@ public FeatureResult() /// /// Initializes a new instance of the FeatureResult class. /// - /// The name of the feature. - /// Properties of the previewed - /// feature. - /// The resource ID of the feature. - /// The resource type of the feature. + + /// The name of the feature. + /// + + /// Properties of the previewed feature. + /// + + /// The resource ID of the feature. + /// + + /// The resource type of the feature. + /// public FeatureResult(string name = default(string), FeatureProperties properties = default(FeatureProperties), string id = default(string), string type = default(string)) + { - Name = name; - Properties = properties; - Id = id; - Type = type; + this.Name = name; + this.Properties = properties; + this.Id = id; + this.Type = type; CustomInit(); } @@ -48,29 +50,29 @@ public FeatureResult() /// partial void CustomInit(); + /// /// Gets or sets the name of the feature. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } /// /// Gets or sets properties of the previewed feature. /// - [JsonProperty(PropertyName = "properties")] - public FeatureProperties Properties { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public FeatureProperties Properties {get; set; } /// /// Gets or sets the resource ID of the feature. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; set; } /// /// Gets or sets the resource type of the feature. /// - [JsonProperty(PropertyName = "type")] - public string Type { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/Models/GenericResource.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/GenericResource.cs new file mode 100644 index 000000000000..9581c71b5b77 --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/GenericResource.cs @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Resources.Models +{ + using System.Linq; + + /// + /// Resource information. + /// + public partial class GenericResource : Resource + { + /// + /// Initializes a new instance of the GenericResource class. + /// + public GenericResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the GenericResource class. + /// + + /// Resource ID + /// + + /// Resource name + /// + + /// Resource type + /// + + /// Resource location + /// + + /// Resource extended location. + /// + + /// Resource tags + /// + + /// The plan of the resource. + /// + + /// The resource properties. + /// + + /// The kind of the resource. + /// + + /// ID of the resource that manages this resource. + /// + + /// The SKU of the resource. + /// + + /// The identity of the resource. + /// + public GenericResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), ExtendedLocation extendedLocation = default(ExtendedLocation), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), Plan plan = default(Plan), object properties = default(object), string kind = default(string), string managedBy = default(string), Sku sku = default(Sku), Identity identity = default(Identity)) + + : base(id, name, type, location, extendedLocation, tags) + { + this.Plan = plan; + this.Properties = properties; + this.Kind = kind; + this.ManagedBy = managedBy; + this.Sku = sku; + this.Identity = identity; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the plan of the resource. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "plan")] + public Plan Plan {get; set; } + + /// + /// Gets or sets the resource properties. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public object Properties {get; set; } + + /// + /// Gets or sets the kind of the resource. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "kind")] + public string Kind {get; set; } + + /// + /// Gets or sets iD of the resource that manages this resource. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "managedBy")] + public string ManagedBy {get; set; } + + /// + /// Gets or sets the SKU of the resource. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "sku")] + public Sku Sku {get; set; } + + /// + /// Gets or sets the identity of the resource. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "identity")] + public Identity Identity {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + + + if (this.Kind != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(this.Kind, "^[-\\w\\._,\\(\\)]+$")) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "Kind", "^[-\\w\\._,\\(\\)]+$"); + } + } + + + + } + } +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/Models/GenericResourceExpanded.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/GenericResourceExpanded.cs new file mode 100644 index 000000000000..02e40c4caa28 --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/GenericResourceExpanded.cs @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Resources.Models +{ + using System.Linq; + + /// + /// Resource information. + /// + public partial class GenericResourceExpanded : GenericResource + { + /// + /// Initializes a new instance of the GenericResourceExpanded class. + /// + public GenericResourceExpanded() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the GenericResourceExpanded class. + /// + + /// Resource ID + /// + + /// Resource name + /// + + /// Resource type + /// + + /// Resource location + /// + + /// Resource extended location. + /// + + /// Resource tags + /// + + /// The plan of the resource. + /// + + /// The resource properties. + /// + + /// The kind of the resource. + /// + + /// ID of the resource that manages this resource. + /// + + /// The SKU of the resource. + /// + + /// The identity of the resource. + /// + + /// The created time of the resource. This is only present if requested via the + /// $expand query parameter. + /// + + /// The changed time of the resource. This is only present if requested via the + /// $expand query parameter. + /// + + /// The provisioning state of the resource. This is only present if requested + /// via the $expand query parameter. + /// + public GenericResourceExpanded(string id = default(string), string name = default(string), string type = default(string), string location = default(string), ExtendedLocation extendedLocation = default(ExtendedLocation), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), Plan plan = default(Plan), object properties = default(object), string kind = default(string), string managedBy = default(string), Sku sku = default(Sku), Identity identity = default(Identity), System.DateTime? createdTime = default(System.DateTime?), System.DateTime? changedTime = default(System.DateTime?), string provisioningState = default(string)) + + : base(id, name, type, location, extendedLocation, tags, plan, properties, kind, managedBy, sku, identity) + { + this.CreatedTime = createdTime; + this.ChangedTime = changedTime; + this.ProvisioningState = provisioningState; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets the created time of the resource. This is only present if requested + /// via the $expand query parameter. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "createdTime")] + public System.DateTime? CreatedTime {get; private set; } + + /// + /// Gets the changed time of the resource. This is only present if requested + /// via the $expand query parameter. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "changedTime")] + public System.DateTime? ChangedTime {get; private set; } + + /// + /// Gets the provisioning state of the resource. This is only present if + /// requested via the $expand query parameter. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "provisioningState")] + public string ProvisioningState {get; private set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + + } + } +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/GenericResourceFilter.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/GenericResourceFilter.cs similarity index 65% rename from src/Resources/Resources.Sdk/Generated/Models/GenericResourceFilter.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/GenericResourceFilter.cs index 6268d6f7dd00..71a5edaae8f4 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/GenericResourceFilter.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/GenericResourceFilter.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,14 +23,21 @@ public GenericResourceFilter() /// /// Initializes a new instance of the GenericResourceFilter class. /// - /// The resource type. - /// The tag name. - /// The tag value. + + /// The resource type. + /// + + /// The tag name. + /// + + /// The tag value. + /// public GenericResourceFilter(string resourceType = default(string), string tagname = default(string), string tagvalue = default(string)) + { - ResourceType = resourceType; - Tagname = tagname; - Tagvalue = tagvalue; + this.ResourceType = resourceType; + this.Tagname = tagname; + this.Tagvalue = tagvalue; CustomInit(); } @@ -45,23 +46,23 @@ public GenericResourceFilter() /// partial void CustomInit(); + /// /// Gets or sets the resource type. /// - [JsonProperty(PropertyName = "resourceType")] - public string ResourceType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resourceType")] + public string ResourceType {get; set; } /// /// Gets or sets the tag name. /// - [JsonProperty(PropertyName = "tagname")] - public string Tagname { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tagname")] + public string Tagname {get; set; } /// /// Gets or sets the tag value. /// - [JsonProperty(PropertyName = "tagvalue")] - public string Tagvalue { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "tagvalue")] + public string Tagvalue {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/HttpMessage.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/HttpMessage.cs similarity index 74% rename from src/Resources/Resources.Sdk/Generated/Models/HttpMessage.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/HttpMessage.cs index ecf41f58911b..c99fc8f33488 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/HttpMessage.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/HttpMessage.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,10 +23,13 @@ public HttpMessage() /// /// Initializes a new instance of the HttpMessage class. /// - /// HTTP message content. + + /// HTTP message content. + /// public HttpMessage(object content = default(object)) + { - Content = content; + this.Content = content; CustomInit(); } @@ -41,11 +38,11 @@ public HttpMessage() /// partial void CustomInit(); + /// - /// Gets or sets HTTP message content. + /// Gets or sets hTTP message content. /// - [JsonProperty(PropertyName = "content")] - public object Content { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "content")] + public object Content {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/Models/Identity.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/Identity.cs new file mode 100644 index 000000000000..5434506fd773 --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/Identity.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Resources.Models +{ + using System.Linq; + + /// + /// Identity for the resource. + /// + public partial class Identity + { + /// + /// Initializes a new instance of the Identity class. + /// + public Identity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Identity class. + /// + + /// The principal ID of resource identity. + /// + + /// The tenant ID of resource. + /// + + /// The identity type. + /// Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, + /// UserAssigned', 'None' + + /// The list of user identities associated with the resource. The user identity + /// dictionary key references will be ARM resource ids in the form: + /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + /// + public Identity(string principalId = default(string), string tenantId = default(string), ResourceIdentityType? type = default(ResourceIdentityType?), System.Collections.Generic.IDictionary userAssignedIdentities = default(System.Collections.Generic.IDictionary)) + + { + this.PrincipalId = principalId; + this.TenantId = tenantId; + this.Type = type; + this.UserAssignedIdentities = userAssignedIdentities; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets the principal ID of resource identity. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "principalId")] + public string PrincipalId {get; private set; } + + /// + /// Gets the tenant ID of resource. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "tenantId")] + public string TenantId {get; private set; } + + /// + /// Gets or sets the identity type. Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public ResourceIdentityType? Type {get; set; } + + /// + /// Gets or sets the list of user identities associated with the resource. The + /// user identity dictionary key references will be ARM resource ids in the + /// form: + /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "userAssignedIdentities")] + public System.Collections.Generic.IDictionary UserAssignedIdentities {get; set; } + } +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/IdentityUserAssignedIdentitiesValue.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/IdentityUserAssignedIdentitiesValue.cs similarity index 64% rename from src/Resources/Resources.Sdk/Generated/Models/IdentityUserAssignedIdentitiesValue.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/IdentityUserAssignedIdentitiesValue.cs index a8ea6ac51861..f3d350bd38fb 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/IdentityUserAssignedIdentitiesValue.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/IdentityUserAssignedIdentitiesValue.cs @@ -1,23 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; public partial class IdentityUserAssignedIdentitiesValue { /// - /// Initializes a new instance of the - /// IdentityUserAssignedIdentitiesValue class. + /// Initializes a new instance of the IdentityUserAssignedIdentitiesValue class. /// public IdentityUserAssignedIdentitiesValue() { @@ -25,17 +18,19 @@ public IdentityUserAssignedIdentitiesValue() } /// - /// Initializes a new instance of the - /// IdentityUserAssignedIdentitiesValue class. + /// Initializes a new instance of the IdentityUserAssignedIdentitiesValue class. /// - /// The principal id of user assigned - /// identity. - /// The client id of user assigned - /// identity. + + /// The principal id of user assigned identity. + /// + + /// The client id of user assigned identity. + /// public IdentityUserAssignedIdentitiesValue(string principalId = default(string), string clientId = default(string)) + { - PrincipalId = principalId; - ClientId = clientId; + this.PrincipalId = principalId; + this.ClientId = clientId; CustomInit(); } @@ -44,17 +39,17 @@ public IdentityUserAssignedIdentitiesValue() /// partial void CustomInit(); + /// /// Gets the principal id of user assigned identity. /// - [JsonProperty(PropertyName = "principalId")] - public string PrincipalId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "principalId")] + public string PrincipalId {get; private set; } /// /// Gets the client id of user assigned identity. /// - [JsonProperty(PropertyName = "clientId")] - public string ClientId { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "clientId")] + public string ClientId {get; private set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/LinkedTemplateArtifact.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/LinkedTemplateArtifact.cs similarity index 66% rename from src/Resources/Resources.Sdk/Generated/Models/LinkedTemplateArtifact.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/LinkedTemplateArtifact.cs index e5b60f483be3..4a3d42a6c95a 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/LinkedTemplateArtifact.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/LinkedTemplateArtifact.cs @@ -1,22 +1,15 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// - /// Represents a Template Spec artifact containing an embedded Azure - /// Resource Manager template for use as a linked template. + /// Represents a Template Spec artifact containing an embedded Azure Resource + /// Manager template for use as a linked template. /// public partial class LinkedTemplateArtifact { @@ -31,13 +24,17 @@ public LinkedTemplateArtifact() /// /// Initializes a new instance of the LinkedTemplateArtifact class. /// - /// A filesystem safe relative path of the - /// artifact. - /// The Azure Resource Manager template. + + /// A filesystem safe relative path of the artifact. + /// + + /// The Azure Resource Manager template. + /// public LinkedTemplateArtifact(string path, object template) + { - Path = path; - Template = template; + this.Path = path; + this.Template = template; CustomInit(); } @@ -46,34 +43,36 @@ public LinkedTemplateArtifact(string path, object template) /// partial void CustomInit(); + /// /// Gets or sets a filesystem safe relative path of the artifact. /// - [JsonProperty(PropertyName = "path")] - public string Path { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "path")] + public string Path {get; set; } /// /// Gets or sets the Azure Resource Manager template. /// - [JsonProperty(PropertyName = "template")] - public object Template { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "template")] + public object Template {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Path == null) + if (this.Path == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Path"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Path"); } - if (Template == null) + if (this.Template == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Template"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Template"); } + + } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/Location.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/Location.cs similarity index 55% rename from src/Resources/Resources.Sdk/Generated/Models/Location.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/Location.cs index 47fa3b6aef5e..db3ee2fd03b3 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/Location.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/Location.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,27 +23,38 @@ public Location() /// /// Initializes a new instance of the Location class. /// - /// The fully qualified ID of the location. For - /// example, - /// /subscriptions/00000000-0000-0000-0000-000000000000/locations/westus. - /// The subscription ID. - /// The location name. - /// The location type. Possible values include: - /// 'Region', 'EdgeZone' - /// The display name of the location. - /// The display name of the location - /// and its region. - /// Metadata of the location, such as lat/long, - /// paired region, and others. + + /// The fully qualified ID of the location. For example, + /// /subscriptions/00000000-0000-0000-0000-000000000000/locations/westus. + /// + + /// The subscription ID. + /// + + /// The location name. + /// + + /// The location type. + /// Possible values include: 'Region', 'EdgeZone' + + /// The display name of the location. + /// + + /// The display name of the location and its region. + /// + + /// Metadata of the location, such as lat/long, paired region, and others. + /// public Location(string id = default(string), string subscriptionId = default(string), string name = default(string), LocationType? type = default(LocationType?), string displayName = default(string), string regionalDisplayName = default(string), LocationMetadata metadata = default(LocationMetadata)) + { - Id = id; - SubscriptionId = subscriptionId; - Name = name; - Type = type; - DisplayName = displayName; - RegionalDisplayName = regionalDisplayName; - Metadata = metadata; + this.Id = id; + this.SubscriptionId = subscriptionId; + this.Name = name; + this.Type = type; + this.DisplayName = displayName; + this.RegionalDisplayName = regionalDisplayName; + this.Metadata = metadata; CustomInit(); } @@ -58,50 +63,49 @@ public Location() /// partial void CustomInit(); + /// /// Gets the fully qualified ID of the location. For example, /// /subscriptions/00000000-0000-0000-0000-000000000000/locations/westus. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; private set; } /// /// Gets the subscription ID. /// - [JsonProperty(PropertyName = "subscriptionId")] - public string SubscriptionId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "subscriptionId")] + public string SubscriptionId {get; private set; } /// /// Gets the location name. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; private set; } /// - /// Gets the location type. Possible values include: 'Region', - /// 'EdgeZone' + /// Gets the location type. Possible values include: 'Region', 'EdgeZone' /// - [JsonProperty(PropertyName = "type")] - public LocationType? Type { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public LocationType? Type {get; private set; } /// /// Gets the display name of the location. /// - [JsonProperty(PropertyName = "displayName")] - public string DisplayName { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "displayName")] + public string DisplayName {get; private set; } /// /// Gets the display name of the location and its region. /// - [JsonProperty(PropertyName = "regionalDisplayName")] - public string RegionalDisplayName { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "regionalDisplayName")] + public string RegionalDisplayName {get; private set; } /// - /// Gets or sets metadata of the location, such as lat/long, paired - /// region, and others. + /// Gets or sets metadata of the location, such as lat/long, paired region, and + /// others. /// - [JsonProperty(PropertyName = "metadata")] - public LocationMetadata Metadata { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "metadata")] + public LocationMetadata Metadata {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/LocationMetadata.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/LocationMetadata.cs similarity index 53% rename from src/Resources/Resources.Sdk/Generated/Models/LocationMetadata.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/LocationMetadata.cs index 7f4f4e2dd7ac..d767d3946e06 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/LocationMetadata.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/LocationMetadata.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,30 +23,41 @@ public LocationMetadata() /// /// Initializes a new instance of the LocationMetadata class. /// - /// The type of the region. Possible values - /// include: 'Physical', 'Logical' - /// The category of the region. Possible - /// values include: 'Recommended', 'Extended', 'Other' - /// The geography group of the - /// location. - /// The longitude of the location. - /// The latitude of the location. - /// The physical location of the Azure - /// location. - /// The regions paired to this - /// region. - /// The home location of an edge - /// zone. - public LocationMetadata(string regionType = default(string), string regionCategory = default(string), string geographyGroup = default(string), string longitude = default(string), string latitude = default(string), string physicalLocation = default(string), IList pairedRegion = default(IList), string homeLocation = default(string)) + + /// The type of the region. + /// Possible values include: 'Physical', 'Logical' + + /// The category of the region. + /// Possible values include: 'Recommended', 'Extended', 'Other' + + /// The geography group of the location. + /// + + /// The longitude of the location. + /// + + /// The latitude of the location. + /// + + /// The physical location of the Azure location. + /// + + /// The regions paired to this region. + /// + + /// The home location of an edge zone. + /// + public LocationMetadata(string regionType = default(string), string regionCategory = default(string), string geographyGroup = default(string), string longitude = default(string), string latitude = default(string), string physicalLocation = default(string), System.Collections.Generic.IList pairedRegion = default(System.Collections.Generic.IList), string homeLocation = default(string)) + { - RegionType = regionType; - RegionCategory = regionCategory; - GeographyGroup = geographyGroup; - Longitude = longitude; - Latitude = latitude; - PhysicalLocation = physicalLocation; - PairedRegion = pairedRegion; - HomeLocation = homeLocation; + this.RegionType = regionType; + this.RegionCategory = regionCategory; + this.GeographyGroup = geographyGroup; + this.Longitude = longitude; + this.Latitude = latitude; + this.PhysicalLocation = physicalLocation; + this.PairedRegion = pairedRegion; + this.HomeLocation = homeLocation; CustomInit(); } @@ -63,55 +66,53 @@ public LocationMetadata() /// partial void CustomInit(); + /// - /// Gets the type of the region. Possible values include: 'Physical', - /// 'Logical' + /// Gets the type of the region. Possible values include: 'Physical', 'Logical' /// - [JsonProperty(PropertyName = "regionType")] - public string RegionType { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "regionType")] + public string RegionType {get; private set; } /// - /// Gets the category of the region. Possible values include: - /// 'Recommended', 'Extended', 'Other' + /// Gets the category of the region. Possible values include: 'Recommended', 'Extended', 'Other' /// - [JsonProperty(PropertyName = "regionCategory")] - public string RegionCategory { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "regionCategory")] + public string RegionCategory {get; private set; } /// /// Gets the geography group of the location. /// - [JsonProperty(PropertyName = "geographyGroup")] - public string GeographyGroup { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "geographyGroup")] + public string GeographyGroup {get; private set; } /// /// Gets the longitude of the location. /// - [JsonProperty(PropertyName = "longitude")] - public string Longitude { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "longitude")] + public string Longitude {get; private set; } /// /// Gets the latitude of the location. /// - [JsonProperty(PropertyName = "latitude")] - public string Latitude { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "latitude")] + public string Latitude {get; private set; } /// /// Gets the physical location of the Azure location. /// - [JsonProperty(PropertyName = "physicalLocation")] - public string PhysicalLocation { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "physicalLocation")] + public string PhysicalLocation {get; private set; } /// /// Gets or sets the regions paired to this region. /// - [JsonProperty(PropertyName = "pairedRegion")] - public IList PairedRegion { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "pairedRegion")] + public System.Collections.Generic.IList PairedRegion {get; set; } /// /// Gets the home location of an edge zone. /// - [JsonProperty(PropertyName = "homeLocation")] - public string HomeLocation { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "homeLocation")] + public string HomeLocation {get; private set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/LocationType.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/LocationType.cs similarity index 79% rename from src/Resources/Resources.Sdk/Generated/Models/LocationType.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/LocationType.cs index 9d5dd38d273c..399c7ee6c62c 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/LocationType.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/LocationType.cs @@ -1,29 +1,22 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; /// /// Defines values for LocationType. /// - [JsonConverter(typeof(StringEnumConverter))] + + + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public enum LocationType { - [EnumMember(Value = "Region")] + [System.Runtime.Serialization.EnumMember(Value = "Region")] Region, - [EnumMember(Value = "EdgeZone")] + [System.Runtime.Serialization.EnumMember(Value = "EdgeZone")] EdgeZone } internal static class LocationTypeEnumExtension @@ -32,7 +25,6 @@ internal static string ToSerializedValue(this LocationType? value) { return value == null ? null : ((LocationType)value).ToSerializedValue(); } - internal static string ToSerializedValue(this LocationType value) { switch( value ) @@ -44,7 +36,6 @@ internal static string ToSerializedValue(this LocationType value) } return null; } - internal static LocationType? ParseLocationType(this string value) { switch( value ) @@ -57,4 +48,4 @@ internal static string ToSerializedValue(this LocationType value) return null; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/Models/LogProperties.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/LogProperties.cs new file mode 100644 index 000000000000..1345f160ef06 --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/LogProperties.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Resources.Models +{ + using System.Linq; + + /// + /// Script log properties. + /// + public partial class LogProperties + { + /// + /// Initializes a new instance of the LogProperties class. + /// + public LogProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the LogProperties class. + /// + + /// Script execution logs in text format. + /// + public LogProperties(string log = default(string)) + + { + this.Log = log; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets script execution logs in text format. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "log")] + public string Log {get; private set; } + } +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ManagedByTenant.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ManagedByTenant.cs similarity index 80% rename from src/Resources/Resources.Sdk/Generated/Models/ManagedByTenant.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ManagedByTenant.cs index d6c47b93e26a..1db6dae8a7de 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ManagedByTenant.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ManagedByTenant.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,11 +23,13 @@ public ManagedByTenant() /// /// Initializes a new instance of the ManagedByTenant class. /// - /// The tenant ID of the managing tenant. This - /// is a GUID. + + /// The tenant ID of the managing tenant. This is a GUID. + /// public ManagedByTenant(string tenantId = default(string)) + { - TenantId = tenantId; + this.TenantId = tenantId; CustomInit(); } @@ -42,11 +38,11 @@ public ManagedByTenant() /// partial void CustomInit(); + /// /// Gets the tenant ID of the managing tenant. This is a GUID. /// - [JsonProperty(PropertyName = "tenantId")] - public string TenantId { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "tenantId")] + public string TenantId {get; private set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ManagedResourceReference.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ManagedResourceReference.cs similarity index 58% rename from src/Resources/Resources.Sdk/Generated/Models/ManagedResourceReference.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ManagedResourceReference.cs index 0b0a9801b20a..b4f2f29a840d 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ManagedResourceReference.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ManagedResourceReference.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,20 +23,23 @@ public ManagedResourceReference() /// /// Initializes a new instance of the ManagedResourceReference class. /// - /// The resourceId of a resource managed by the - /// deployment stack. - /// Current management state of the resource in - /// the deployment stack. Possible values include: 'Managed', - /// 'removeDenyFailed', 'deleteFailed', 'None' - /// denyAssignment settings applied to the - /// resource. Possible values include: 'denyDelete', 'notSupported', - /// 'inapplicable', 'denyWriteAndDelete', 'removedBySystem', - /// 'None' + + /// The resourceId of a resource managed by the deployment stack. + /// + + /// Current management state of the resource in the deployment stack. + /// Possible values include: 'Managed', 'removeDenyFailed', 'deleteFailed', + /// 'None' + + /// denyAssignment settings applied to the resource. + /// Possible values include: 'denyDelete', 'notSupported', 'inapplicable', + /// 'denyWriteAndDelete', 'removedBySystem', 'None' public ManagedResourceReference(string id = default(string), string status = default(string), string denyStatus = default(string)) - : base(id) + + : base(id) { - Status = status; - DenyStatus = denyStatus; + this.Status = status; + this.DenyStatus = denyStatus; CustomInit(); } @@ -51,21 +48,18 @@ public ManagedResourceReference() /// partial void CustomInit(); + /// - /// Gets or sets current management state of the resource in the - /// deployment stack. Possible values include: 'Managed', - /// 'removeDenyFailed', 'deleteFailed', 'None' + /// Gets or sets current management state of the resource in the deployment + /// stack. Possible values include: 'Managed', 'removeDenyFailed', 'deleteFailed', 'None' /// - [JsonProperty(PropertyName = "status")] - public string Status { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public string Status {get; set; } /// - /// Gets or sets denyAssignment settings applied to the resource. - /// Possible values include: 'denyDelete', 'notSupported', - /// 'inapplicable', 'denyWriteAndDelete', 'removedBySystem', 'None' + /// Gets or sets denyAssignment settings applied to the resource. Possible values include: 'denyDelete', 'notSupported', 'inapplicable', 'denyWriteAndDelete', 'removedBySystem', 'None' /// - [JsonProperty(PropertyName = "denyStatus")] - public string DenyStatus { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "denyStatus")] + public string DenyStatus {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ManagedServiceIdentity.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ManagedServiceIdentity.cs similarity index 52% rename from src/Resources/Resources.Sdk/Generated/Models/ManagedServiceIdentity.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ManagedServiceIdentity.cs index 469d9f4dff40..3ef53615e6b5 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ManagedServiceIdentity.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ManagedServiceIdentity.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,17 +23,22 @@ public ManagedServiceIdentity() /// /// Initializes a new instance of the ManagedServiceIdentity class. /// - /// Type of the managed identity. Possible values - /// include: 'UserAssigned' - /// ID of the Azure Active Directory. - /// The list of user-assigned - /// managed identities associated with the resource. Key is the Azure - /// resource Id of the managed identity. - public ManagedServiceIdentity(string type = default(string), string tenantId = default(string), IDictionary userAssignedIdentities = default(IDictionary)) + + /// Type of the managed identity. + /// Possible values include: 'UserAssigned' + + /// ID of the Azure Active Directory. + /// + + /// The list of user-assigned managed identities associated with the resource. + /// Key is the Azure resource Id of the managed identity. + /// + public ManagedServiceIdentity(string type = default(string), string tenantId = default(string), System.Collections.Generic.IDictionary userAssignedIdentities = default(System.Collections.Generic.IDictionary)) + { - Type = type; - TenantId = tenantId; - UserAssignedIdentities = userAssignedIdentities; + this.Type = type; + this.TenantId = tenantId; + this.UserAssignedIdentities = userAssignedIdentities; CustomInit(); } @@ -50,26 +47,24 @@ public ManagedServiceIdentity() /// partial void CustomInit(); + /// - /// Gets or sets type of the managed identity. Possible values include: - /// 'UserAssigned' + /// Gets or sets type of the managed identity. Possible values include: 'UserAssigned' /// - [JsonProperty(PropertyName = "type")] - public string Type { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; set; } /// - /// Gets ID of the Azure Active Directory. + /// Gets iD of the Azure Active Directory. /// - [JsonProperty(PropertyName = "tenantId")] - public string TenantId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tenantId")] + public string TenantId {get; private set; } /// - /// Gets or sets the list of user-assigned managed identities - /// associated with the resource. Key is the Azure resource Id of the - /// managed identity. + /// Gets or sets the list of user-assigned managed identities associated with + /// the resource. Key is the Azure resource Id of the managed identity. /// - [JsonProperty(PropertyName = "userAssignedIdentities")] - public IDictionary UserAssignedIdentities { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "userAssignedIdentities")] + public System.Collections.Generic.IDictionary UserAssignedIdentities {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ManagedServiceIdentityType.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ManagedServiceIdentityType.cs similarity index 83% rename from src/Resources/Resources.Sdk/Generated/Models/ManagedServiceIdentityType.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ManagedServiceIdentityType.cs index 7f5fedf2f06e..b8661d37ed25 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ManagedServiceIdentityType.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ManagedServiceIdentityType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { @@ -14,8 +9,10 @@ namespace Microsoft.Azure.Management.Resources.Models /// /// Defines values for ManagedServiceIdentityType. /// + + public static class ManagedServiceIdentityType { public const string UserAssigned = "UserAssigned"; } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/OnErrorDeployment.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/OnErrorDeployment.cs similarity index 66% rename from src/Resources/Resources.Sdk/Generated/Models/OnErrorDeployment.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/OnErrorDeployment.cs index c809da6ff4f2..ddc63d68406a 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/OnErrorDeployment.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/OnErrorDeployment.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,15 +23,18 @@ public OnErrorDeployment() /// /// Initializes a new instance of the OnErrorDeployment class. /// - /// The deployment on error behavior type. Possible - /// values are LastSuccessful and SpecificDeployment. Possible values - /// include: 'LastSuccessful', 'SpecificDeployment' - /// The deployment to be used on error - /// case. + + /// The deployment on error behavior type. Possible values are LastSuccessful + /// and SpecificDeployment. + /// Possible values include: 'LastSuccessful', 'SpecificDeployment' + + /// The deployment to be used on error case. + /// public OnErrorDeployment(OnErrorDeploymentType? type = default(OnErrorDeploymentType?), string deploymentName = default(string)) + { - Type = type; - DeploymentName = deploymentName; + this.Type = type; + this.DeploymentName = deploymentName; CustomInit(); } @@ -46,19 +43,18 @@ public OnErrorDeployment() /// partial void CustomInit(); + /// - /// Gets or sets the deployment on error behavior type. Possible values - /// are LastSuccessful and SpecificDeployment. Possible values include: - /// 'LastSuccessful', 'SpecificDeployment' + /// Gets or sets the deployment on error behavior type. Possible values are + /// LastSuccessful and SpecificDeployment. Possible values include: 'LastSuccessful', 'SpecificDeployment' /// - [JsonProperty(PropertyName = "type")] - public OnErrorDeploymentType? Type { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public OnErrorDeploymentType? Type {get; set; } /// /// Gets or sets the deployment to be used on error case. /// - [JsonProperty(PropertyName = "deploymentName")] - public string DeploymentName { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "deploymentName")] + public string DeploymentName {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/OnErrorDeploymentExtended.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/OnErrorDeploymentExtended.cs similarity index 64% rename from src/Resources/Resources.Sdk/Generated/Models/OnErrorDeploymentExtended.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/OnErrorDeploymentExtended.cs index 8ebd52469a03..147e475ad3a8 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/OnErrorDeploymentExtended.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/OnErrorDeploymentExtended.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,18 +23,22 @@ public OnErrorDeploymentExtended() /// /// Initializes a new instance of the OnErrorDeploymentExtended class. /// - /// The state of the provisioning for - /// the on error deployment. - /// The deployment on error behavior type. Possible - /// values are LastSuccessful and SpecificDeployment. Possible values - /// include: 'LastSuccessful', 'SpecificDeployment' - /// The deployment to be used on error - /// case. + + /// The state of the provisioning for the on error deployment. + /// + + /// The deployment on error behavior type. Possible values are LastSuccessful + /// and SpecificDeployment. + /// Possible values include: 'LastSuccessful', 'SpecificDeployment' + + /// The deployment to be used on error case. + /// public OnErrorDeploymentExtended(string provisioningState = default(string), OnErrorDeploymentType? type = default(OnErrorDeploymentType?), string deploymentName = default(string)) + { - ProvisioningState = provisioningState; - Type = type; - DeploymentName = deploymentName; + this.ProvisioningState = provisioningState; + this.Type = type; + this.DeploymentName = deploymentName; CustomInit(); } @@ -49,25 +47,24 @@ public OnErrorDeploymentExtended() /// partial void CustomInit(); + /// /// Gets the state of the provisioning for the on error deployment. /// - [JsonProperty(PropertyName = "provisioningState")] - public string ProvisioningState { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "provisioningState")] + public string ProvisioningState {get; private set; } /// - /// Gets or sets the deployment on error behavior type. Possible values - /// are LastSuccessful and SpecificDeployment. Possible values include: - /// 'LastSuccessful', 'SpecificDeployment' + /// Gets or sets the deployment on error behavior type. Possible values are + /// LastSuccessful and SpecificDeployment. Possible values include: 'LastSuccessful', 'SpecificDeployment' /// - [JsonProperty(PropertyName = "type")] - public OnErrorDeploymentType? Type { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public OnErrorDeploymentType? Type {get; set; } /// /// Gets or sets the deployment to be used on error case. /// - [JsonProperty(PropertyName = "deploymentName")] - public string DeploymentName { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "deploymentName")] + public string DeploymentName {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/OnErrorDeploymentType.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/OnErrorDeploymentType.cs similarity index 80% rename from src/Resources/Resources.Sdk/Generated/Models/OnErrorDeploymentType.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/OnErrorDeploymentType.cs index 9d1e065e3374..1c6342512a5c 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/OnErrorDeploymentType.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/OnErrorDeploymentType.cs @@ -1,29 +1,22 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; /// /// Defines values for OnErrorDeploymentType. /// - [JsonConverter(typeof(StringEnumConverter))] + + + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public enum OnErrorDeploymentType { - [EnumMember(Value = "LastSuccessful")] + [System.Runtime.Serialization.EnumMember(Value = "LastSuccessful")] LastSuccessful, - [EnumMember(Value = "SpecificDeployment")] + [System.Runtime.Serialization.EnumMember(Value = "SpecificDeployment")] SpecificDeployment } internal static class OnErrorDeploymentTypeEnumExtension @@ -32,7 +25,6 @@ internal static string ToSerializedValue(this OnErrorDeploymentType? value) { return value == null ? null : ((OnErrorDeploymentType)value).ToSerializedValue(); } - internal static string ToSerializedValue(this OnErrorDeploymentType value) { switch( value ) @@ -44,7 +36,6 @@ internal static string ToSerializedValue(this OnErrorDeploymentType value) } return null; } - internal static OnErrorDeploymentType? ParseOnErrorDeploymentType(this string value) { switch( value ) @@ -57,4 +48,4 @@ internal static string ToSerializedValue(this OnErrorDeploymentType value) return null; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/Operation.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/Operation.cs similarity index 72% rename from src/Resources/Resources.Sdk/Generated/Models/Operation.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/Operation.cs index c46249662c82..11171880d969 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/Operation.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/Operation.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,14 +23,17 @@ public Operation() /// /// Initializes a new instance of the Operation class. /// - /// Operation name: - /// {provider}/{resource}/{operation} - /// The object that represents the - /// operation. + + /// Operation name: {provider}/{resource}/{operation} + /// + + /// The object that represents the operation. + /// public Operation(string name = default(string), OperationDisplay display = default(OperationDisplay)) + { - Name = name; - Display = display; + this.Name = name; + this.Display = display; CustomInit(); } @@ -45,17 +42,17 @@ public Operation() /// partial void CustomInit(); + /// /// Gets or sets operation name: {provider}/{resource}/{operation} /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } /// /// Gets or sets the object that represents the operation. /// - [JsonProperty(PropertyName = "display")] - public OperationDisplay Display { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "display")] + public OperationDisplay Display {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/OperationDisplay.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/OperationDisplay.cs similarity index 67% rename from src/Resources/Resources.Sdk/Generated/Models/OperationDisplay.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/OperationDisplay.cs index 85ddb518a0c3..91715806fe30 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/OperationDisplay.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/OperationDisplay.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,19 +23,25 @@ public OperationDisplay() /// /// Initializes a new instance of the OperationDisplay class. /// - /// Service provider: - /// Microsoft.Resources - /// Resource on which the operation is - /// performed: Profile, endpoint, etc. - /// Operation type: Read, write, delete, - /// etc. - /// Description of the operation. + + /// Service provider: Microsoft.Resources + /// + + /// Resource on which the operation is performed: Profile, endpoint, etc. + /// + + /// Operation type: Read, write, delete, etc. + /// + + /// Description of the operation. + /// public OperationDisplay(string provider = default(string), string resource = default(string), string operation = default(string), string description = default(string)) + { - Provider = provider; - Resource = resource; - Operation = operation; - Description = description; + this.Provider = provider; + this.Resource = resource; + this.Operation = operation; + this.Description = description; CustomInit(); } @@ -50,30 +50,30 @@ public OperationDisplay() /// partial void CustomInit(); + /// /// Gets or sets service provider: Microsoft.Resources /// - [JsonProperty(PropertyName = "provider")] - public string Provider { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "provider")] + public string Provider {get; set; } /// /// Gets or sets resource on which the operation is performed: Profile, /// endpoint, etc. /// - [JsonProperty(PropertyName = "resource")] - public string Resource { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resource")] + public string Resource {get; set; } /// /// Gets or sets operation type: Read, write, delete, etc. /// - [JsonProperty(PropertyName = "operation")] - public string Operation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "operation")] + public string Operation {get; set; } /// /// Gets or sets description of the operation. /// - [JsonProperty(PropertyName = "description")] - public string Description { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "description")] + public string Description {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/OperationListResult.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/OperationListResult.cs similarity index 60% rename from src/Resources/Resources.Sdk/Generated/Models/OperationListResult.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/OperationListResult.cs index 66868b952642..0395f1f928ce 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/OperationListResult.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/OperationListResult.cs @@ -1,24 +1,15 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// - /// Result of the request to list Microsoft.Resources operations. It - /// contains a list of operations and a URL link to get the next set of - /// results. + /// Result of the request to list Microsoft.Resources operations. It contains a + /// list of operations and a URL link to get the next set of results. /// public partial class OperationListResult { @@ -33,13 +24,17 @@ public OperationListResult() /// /// Initializes a new instance of the OperationListResult class. /// - /// List of Microsoft.Resources operations. - /// URL to get the next set of operation list - /// results if there are any. - public OperationListResult(IList value = default(IList), string nextLink = default(string)) + + /// List of Microsoft.Resources operations. + /// + + /// URL to get the next set of operation list results if there are any. + /// + public OperationListResult(System.Collections.Generic.IList value = default(System.Collections.Generic.IList), string nextLink = default(string)) + { - Value = value; - NextLink = nextLink; + this.Value = value; + this.NextLink = nextLink; CustomInit(); } @@ -48,18 +43,18 @@ public OperationListResult() /// partial void CustomInit(); + /// /// Gets or sets list of Microsoft.Resources operations. /// - [JsonProperty(PropertyName = "value")] - public IList Value { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "value")] + public System.Collections.Generic.IList Value {get; set; } /// - /// Gets or sets URL to get the next set of operation list results if - /// there are any. + /// Gets or sets uRL to get the next set of operation list results if there are + /// any. /// - [JsonProperty(PropertyName = "nextLink")] - public string NextLink { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "nextLink")] + public string NextLink {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/Models/Page.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/Page.cs new file mode 100644 index 000000000000..da05c5e9a887 --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/Page.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Resources.Models +{ + + /// + /// Defines a page in Azure responses. + /// + /// Type of the page content items + [Newtonsoft.Json.JsonObject] + public class Page : Microsoft.Rest.Azure.IPage + { + /// + /// Gets the link to the next page. + /// + [Newtonsoft.Json.JsonProperty("nextLink")] + public System.String NextPageLink { get; private set; } + + [Newtonsoft.Json.JsonProperty("value")] + private System.Collections.Generic.IList Items{ get; set; } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// A an enumerator that can be used to iterate through the collection. + public System.Collections.Generic.IEnumerator GetEnumerator() + { + return (Items == null) ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator(); + } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// A an enumerator that can be used to iterate through the collection. + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + } +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/Models/Page1.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/Page1.cs new file mode 100644 index 000000000000..c146f5d57c41 --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/Page1.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Resources.Models +{ + + /// + /// Defines a page in Azure responses. + /// + /// Type of the page content items + [Newtonsoft.Json.JsonObject] + public class Page1 : Microsoft.Rest.Azure.IPage + { + /// + /// Gets the link to the next page. + /// + [Newtonsoft.Json.JsonProperty("nextLink")] + public System.String NextPageLink { get; private set; } + + [Newtonsoft.Json.JsonProperty("value")] + private System.Collections.Generic.IList Items{ get; set; } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// A an enumerator that can be used to iterate through the collection. + public System.Collections.Generic.IEnumerator GetEnumerator() + { + return (Items == null) ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator(); + } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// A an enumerator that can be used to iterate through the collection. + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + } +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/PairedRegion.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/PairedRegion.cs similarity index 68% rename from src/Resources/Resources.Sdk/Generated/Models/PairedRegion.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/PairedRegion.cs index dfc030411242..814c5255076f 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/PairedRegion.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/PairedRegion.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,16 +23,22 @@ public PairedRegion() /// /// Initializes a new instance of the PairedRegion class. /// - /// The name of the paired region. - /// The fully qualified ID of the location. For - /// example, - /// /subscriptions/00000000-0000-0000-0000-000000000000/locations/westus. - /// The subscription ID. + + /// The name of the paired region. + /// + + /// The fully qualified ID of the location. For example, + /// /subscriptions/00000000-0000-0000-0000-000000000000/locations/westus. + /// + + /// The subscription ID. + /// public PairedRegion(string name = default(string), string id = default(string), string subscriptionId = default(string)) + { - Name = name; - Id = id; - SubscriptionId = subscriptionId; + this.Name = name; + this.Id = id; + this.SubscriptionId = subscriptionId; CustomInit(); } @@ -47,24 +47,24 @@ public PairedRegion() /// partial void CustomInit(); + /// /// Gets the name of the paired region. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; private set; } /// /// Gets the fully qualified ID of the location. For example, /// /subscriptions/00000000-0000-0000-0000-000000000000/locations/westus. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; private set; } /// /// Gets the subscription ID. /// - [JsonProperty(PropertyName = "subscriptionId")] - public string SubscriptionId { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "subscriptionId")] + public string SubscriptionId {get; private set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ParametersLink.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ParametersLink.cs similarity index 68% rename from src/Resources/Resources.Sdk/Generated/Models/ParametersLink.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ParametersLink.cs index f40f464ee8f6..ae61afebcef9 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ParametersLink.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ParametersLink.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -30,13 +23,17 @@ public ParametersLink() /// /// Initializes a new instance of the ParametersLink class. /// - /// The URI of the parameters file. - /// If included, must match the - /// ContentVersion in the template. + + /// The URI of the parameters file. + /// + + /// If included, must match the ContentVersion in the template. + /// public ParametersLink(string uri, string contentVersion = default(string)) + { - Uri = uri; - ContentVersion = contentVersion; + this.Uri = uri; + this.ContentVersion = contentVersion; CustomInit(); } @@ -45,31 +42,32 @@ public ParametersLink() /// partial void CustomInit(); + /// /// Gets or sets the URI of the parameters file. /// - [JsonProperty(PropertyName = "uri")] - public string Uri { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "uri")] + public string Uri {get; set; } /// - /// Gets or sets if included, must match the ContentVersion in the - /// template. + /// Gets or sets if included, must match the ContentVersion in the template. /// - [JsonProperty(PropertyName = "contentVersion")] - public string ContentVersion { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "contentVersion")] + public string ContentVersion {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Uri == null) + if (this.Uri == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Uri"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Uri"); } + + } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/Peers.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/Peers.cs similarity index 70% rename from src/Resources/Resources.Sdk/Generated/Models/Peers.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/Peers.cs index 0bf2470fc11d..6c9bc9d853e4 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/Peers.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/Peers.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,12 +23,17 @@ public Peers() /// /// Initializes a new instance of the Peers class. /// - /// The subscription ID. - /// The availabilityZone. + + /// The subscription ID. + /// + + /// The availabilityZone. + /// public Peers(string subscriptionId = default(string), string availabilityZone = default(string)) + { - SubscriptionId = subscriptionId; - AvailabilityZone = availabilityZone; + this.SubscriptionId = subscriptionId; + this.AvailabilityZone = availabilityZone; CustomInit(); } @@ -43,17 +42,17 @@ public Peers() /// partial void CustomInit(); + /// /// Gets the subscription ID. /// - [JsonProperty(PropertyName = "subscriptionId")] - public string SubscriptionId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "subscriptionId")] + public string SubscriptionId {get; private set; } /// /// Gets the availabilityZone. /// - [JsonProperty(PropertyName = "availabilityZone")] - public string AvailabilityZone { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "availabilityZone")] + public string AvailabilityZone {get; private set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/Models/Permission.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/Permission.cs new file mode 100644 index 000000000000..d2f8a64dae3c --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/Permission.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Resources.Models +{ + using System.Linq; + + /// + /// Role definition permissions. + /// + public partial class Permission + { + /// + /// Initializes a new instance of the Permission class. + /// + public Permission() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Permission class. + /// + + /// Allowed actions. + /// + + /// Denied actions. + /// + + /// Allowed Data actions. + /// + + /// Denied Data actions. + /// + public Permission(System.Collections.Generic.IList actions = default(System.Collections.Generic.IList), System.Collections.Generic.IList notActions = default(System.Collections.Generic.IList), System.Collections.Generic.IList dataActions = default(System.Collections.Generic.IList), System.Collections.Generic.IList notDataActions = default(System.Collections.Generic.IList)) + + { + this.Actions = actions; + this.NotActions = notActions; + this.DataActions = dataActions; + this.NotDataActions = notDataActions; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets allowed actions. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "actions")] + public System.Collections.Generic.IList Actions {get; set; } + + /// + /// Gets or sets denied actions. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "notActions")] + public System.Collections.Generic.IList NotActions {get; set; } + + /// + /// Gets or sets allowed Data actions. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "dataActions")] + public System.Collections.Generic.IList DataActions {get; set; } + + /// + /// Gets or sets denied Data actions. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "notDataActions")] + public System.Collections.Generic.IList NotDataActions {get; set; } + } +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/Plan.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/Plan.cs similarity index 55% rename from src/Resources/Resources.Sdk/Generated/Models/Plan.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/Plan.cs index 63a8e7ff5dee..413a68b5ab02 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/Plan.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/Plan.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,18 +23,29 @@ public Plan() /// /// Initializes a new instance of the Plan class. /// - /// The plan ID. - /// The publisher ID. - /// The offer ID. - /// The promotion code. - /// The plan's version. + + /// The plan ID. + /// + + /// The publisher ID. + /// + + /// The offer ID. + /// + + /// The promotion code. + /// + + /// The plan's version. + /// public Plan(string name = default(string), string publisher = default(string), string product = default(string), string promotionCode = default(string), string version = default(string)) + { - Name = name; - Publisher = publisher; - Product = product; - PromotionCode = promotionCode; - Version = version; + this.Name = name; + this.Publisher = publisher; + this.Product = product; + this.PromotionCode = promotionCode; + this.Version = version; CustomInit(); } @@ -49,35 +54,35 @@ public Plan() /// partial void CustomInit(); + /// /// Gets or sets the plan ID. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } /// /// Gets or sets the publisher ID. /// - [JsonProperty(PropertyName = "publisher")] - public string Publisher { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "publisher")] + public string Publisher {get; set; } /// /// Gets or sets the offer ID. /// - [JsonProperty(PropertyName = "product")] - public string Product { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "product")] + public string Product {get; set; } /// /// Gets or sets the promotion code. /// - [JsonProperty(PropertyName = "promotionCode")] - public string PromotionCode { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "promotionCode")] + public string PromotionCode {get; set; } /// - /// Gets or sets the plan's version. + /// Gets or sets the plan's version. /// - [JsonProperty(PropertyName = "version")] - public string Version { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "version")] + public string Version {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/PrivateLinkAssociation.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/PrivateLinkAssociation.cs similarity index 63% rename from src/Resources/Resources.Sdk/Generated/Models/PrivateLinkAssociation.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/PrivateLinkAssociation.cs index cbcac68b15a1..5e0b92b57d3c 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/PrivateLinkAssociation.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/PrivateLinkAssociation.cs @@ -1,21 +1,13 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Newtonsoft.Json; using System.Linq; - public partial class PrivateLinkAssociation : IResource + public partial class PrivateLinkAssociation : Microsoft.Rest.Azure.IResource { /// /// Initializes a new instance of the PrivateLinkAssociation class. @@ -28,17 +20,25 @@ public PrivateLinkAssociation() /// /// Initializes a new instance of the PrivateLinkAssociation class. /// - /// The private link association - /// properties. - /// The plaResourceID. - /// The operation type. - /// The pla name. + + /// The private link association properties. + /// + + /// The plaResourceID. + /// + + /// The operation type. + /// + + /// The pla name. + /// public PrivateLinkAssociation(PrivateLinkAssociationPropertiesExpanded properties = default(PrivateLinkAssociationPropertiesExpanded), string id = default(string), string type = default(string), string name = default(string)) + { - Properties = properties; - Id = id; - Type = type; - Name = name; + this.Properties = properties; + this.Id = id; + this.Type = type; + this.Name = name; CustomInit(); } @@ -47,29 +47,29 @@ public PrivateLinkAssociation() /// partial void CustomInit(); + /// /// Gets or sets the private link association properties. /// - [JsonProperty(PropertyName = "properties")] - public PrivateLinkAssociationPropertiesExpanded Properties { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public PrivateLinkAssociationPropertiesExpanded Properties {get; set; } /// /// Gets the plaResourceID. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; private set; } /// /// Gets the operation type. /// - [JsonProperty(PropertyName = "type")] - public string Type { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; private set; } /// /// Gets the pla name. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; private set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/PrivateLinkAssociationGetResult.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/PrivateLinkAssociationGetResult.cs similarity index 68% rename from src/Resources/Resources.Sdk/Generated/Models/PrivateLinkAssociationGetResult.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/PrivateLinkAssociationGetResult.cs index 6a6182a53363..cd6625bbc91d 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/PrivateLinkAssociationGetResult.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/PrivateLinkAssociationGetResult.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.Resources.Models public partial class PrivateLinkAssociationGetResult { /// - /// Initializes a new instance of the PrivateLinkAssociationGetResult - /// class. + /// Initializes a new instance of the PrivateLinkAssociationGetResult class. /// public PrivateLinkAssociationGetResult() { @@ -30,13 +21,15 @@ public PrivateLinkAssociationGetResult() } /// - /// Initializes a new instance of the PrivateLinkAssociationGetResult - /// class. + /// Initializes a new instance of the PrivateLinkAssociationGetResult class. /// - /// private link association information. - public PrivateLinkAssociationGetResult(IList value = default(IList)) + + /// private link association information. + /// + public PrivateLinkAssociationGetResult(System.Collections.Generic.IList value = default(System.Collections.Generic.IList)) + { - Value = value; + this.Value = value; CustomInit(); } @@ -45,11 +38,11 @@ public PrivateLinkAssociationGetResult() /// partial void CustomInit(); + /// /// Gets or sets private link association information. /// - [JsonProperty(PropertyName = "value")] - public IList Value { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "value")] + public System.Collections.Generic.IList Value {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/PrivateLinkAssociationObject.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/PrivateLinkAssociationObject.cs similarity index 72% rename from src/Resources/Resources.Sdk/Generated/Models/PrivateLinkAssociationObject.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/PrivateLinkAssociationObject.cs index 216895cf681d..4ff6aba00195 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/PrivateLinkAssociationObject.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/PrivateLinkAssociationObject.cs @@ -1,23 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; public partial class PrivateLinkAssociationObject { /// - /// Initializes a new instance of the PrivateLinkAssociationObject - /// class. + /// Initializes a new instance of the PrivateLinkAssociationObject class. /// public PrivateLinkAssociationObject() { @@ -25,14 +18,15 @@ public PrivateLinkAssociationObject() } /// - /// Initializes a new instance of the PrivateLinkAssociationObject - /// class. + /// Initializes a new instance of the PrivateLinkAssociationObject class. /// - /// The properties of the - /// PrivateLinkAssociation. + + /// The properties of the PrivateLinkAssociation. + /// public PrivateLinkAssociationObject(PrivateLinkAssociationProperties properties = default(PrivateLinkAssociationProperties)) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -41,11 +35,11 @@ public PrivateLinkAssociationObject() /// partial void CustomInit(); + /// /// Gets or sets the properties of the PrivateLinkAssociation. /// - [JsonProperty(PropertyName = "properties")] - public PrivateLinkAssociationProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public PrivateLinkAssociationProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/PrivateLinkAssociationProperties.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/PrivateLinkAssociationProperties.cs similarity index 61% rename from src/Resources/Resources.Sdk/Generated/Models/PrivateLinkAssociationProperties.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/PrivateLinkAssociationProperties.cs index 3721b5b0c862..1976897e96c2 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/PrivateLinkAssociationProperties.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/PrivateLinkAssociationProperties.cs @@ -1,23 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; public partial class PrivateLinkAssociationProperties { /// - /// Initializes a new instance of the PrivateLinkAssociationProperties - /// class. + /// Initializes a new instance of the PrivateLinkAssociationProperties class. /// public PrivateLinkAssociationProperties() { @@ -25,16 +18,19 @@ public PrivateLinkAssociationProperties() } /// - /// Initializes a new instance of the PrivateLinkAssociationProperties - /// class. + /// Initializes a new instance of the PrivateLinkAssociationProperties class. /// - /// The rmpl Resource ID. - /// Possible values include: - /// 'Enabled', 'Disabled' + + /// The rmpl Resource ID. + /// + + /// + /// Possible values include: 'Enabled', 'Disabled' public PrivateLinkAssociationProperties(string privateLink = default(string), string publicNetworkAccess = default(string)) + { - PrivateLink = privateLink; - PublicNetworkAccess = publicNetworkAccess; + this.PrivateLink = privateLink; + this.PublicNetworkAccess = publicNetworkAccess; CustomInit(); } @@ -43,17 +39,17 @@ public PrivateLinkAssociationProperties() /// partial void CustomInit(); + /// /// Gets or sets the rmpl Resource ID. /// - [JsonProperty(PropertyName = "privateLink")] - public string PrivateLink { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "privateLink")] + public string PrivateLink {get; set; } /// - /// Gets or sets possible values include: 'Enabled', 'Disabled' + /// Gets or sets Possible values include: 'Enabled', 'Disabled' /// - [JsonProperty(PropertyName = "publicNetworkAccess")] - public string PublicNetworkAccess { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "publicNetworkAccess")] + public string PublicNetworkAccess {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/Models/PrivateLinkAssociationPropertiesExpanded.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/PrivateLinkAssociationPropertiesExpanded.cs new file mode 100644 index 000000000000..b32375e9269f --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/PrivateLinkAssociationPropertiesExpanded.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Resources.Models +{ + using System.Linq; + + /// + /// Private Link Association Properties. + /// + public partial class PrivateLinkAssociationPropertiesExpanded + { + /// + /// Initializes a new instance of the PrivateLinkAssociationPropertiesExpanded class. + /// + public PrivateLinkAssociationPropertiesExpanded() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PrivateLinkAssociationPropertiesExpanded class. + /// + + /// The rmpl Resource ID. + /// + + /// + /// Possible values include: 'Enabled', 'Disabled' + + /// The TenantID. + /// + + /// The scope of the private link association. + /// + public PrivateLinkAssociationPropertiesExpanded(string privateLink = default(string), string publicNetworkAccess = default(string), string tenantId = default(string), string scope = default(string)) + + { + this.PrivateLink = privateLink; + this.PublicNetworkAccess = publicNetworkAccess; + this.TenantId = tenantId; + this.Scope = scope; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the rmpl Resource ID. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "privateLink")] + public string PrivateLink {get; set; } + + /// + /// Gets or sets Possible values include: 'Enabled', 'Disabled' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "publicNetworkAccess")] + public string PublicNetworkAccess {get; set; } + + /// + /// Gets or sets the TenantID. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "tenantID")] + public string TenantId {get; set; } + + /// + /// Gets or sets the scope of the private link association. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "scope")] + public string Scope {get; set; } + } +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/PropertyChangeType.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/PropertyChangeType.cs similarity index 76% rename from src/Resources/Resources.Sdk/Generated/Models/PropertyChangeType.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/PropertyChangeType.cs index 45b0c96155cc..6ac9fac742ec 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/PropertyChangeType.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/PropertyChangeType.cs @@ -1,55 +1,47 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; /// /// Defines values for PropertyChangeType. /// - [JsonConverter(typeof(StringEnumConverter))] + + + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public enum PropertyChangeType { /// - /// The property does not exist in the current state but is present in - /// the desired state. The property will be created when the deployment - /// is executed. + /// The property does not exist in the current state but is present in the + /// desired state. The property will be created when the deployment is + /// executed. /// - [EnumMember(Value = "Create")] + [System.Runtime.Serialization.EnumMember(Value = "Create")] Create, /// - /// The property exists in the current state and is missing from the - /// desired state. It will be deleted when the deployment is executed. + /// The property exists in the current state and is missing from the desired + /// state. It will be deleted when the deployment is executed. /// - [EnumMember(Value = "Delete")] + [System.Runtime.Serialization.EnumMember(Value = "Delete")] Delete, /// - /// The property exists in both current and desired state and is - /// different. The value of the property will change when the - /// deployment is executed. + /// The property exists in both current and desired state and is different. The + /// value of the property will change when the deployment is executed. /// - [EnumMember(Value = "Modify")] + [System.Runtime.Serialization.EnumMember(Value = "Modify")] Modify, /// /// The property is an array and contains nested changes. /// - [EnumMember(Value = "Array")] + [System.Runtime.Serialization.EnumMember(Value = "Array")] Array, /// /// The property will not be set or updated. /// - [EnumMember(Value = "NoEffect")] + [System.Runtime.Serialization.EnumMember(Value = "NoEffect")] NoEffect } internal static class PropertyChangeTypeEnumExtension @@ -58,7 +50,6 @@ internal static string ToSerializedValue(this PropertyChangeType? value) { return value == null ? null : ((PropertyChangeType)value).ToSerializedValue(); } - internal static string ToSerializedValue(this PropertyChangeType value) { switch( value ) @@ -76,7 +67,6 @@ internal static string ToSerializedValue(this PropertyChangeType value) } return null; } - internal static PropertyChangeType? ParsePropertyChangeType(this string value) { switch( value ) @@ -95,4 +85,4 @@ internal static string ToSerializedValue(this PropertyChangeType value) return null; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/Provider.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/Provider.cs similarity index 50% rename from src/Resources/Resources.Sdk/Generated/Models/Provider.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/Provider.cs index ddb0d2af0369..d74ed809a521 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/Provider.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/Provider.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,26 +23,34 @@ public Provider() /// /// Initializes a new instance of the Provider class. /// - /// The provider ID. - /// The namespace of the resource - /// provider. - /// The registration state of the - /// resource provider. - /// The registration policy of the - /// resource provider. - /// The collection of provider resource - /// types. - /// The provider - /// authorization consent state. Possible values include: - /// 'NotSpecified', 'Required', 'NotRequired', 'Consented' - public Provider(string id = default(string), string namespaceProperty = default(string), string registrationState = default(string), string registrationPolicy = default(string), IList resourceTypes = default(IList), string providerAuthorizationConsentState = default(string)) + + /// The provider ID. + /// + + /// The namespace of the resource provider. + /// + + /// The registration state of the resource provider. + /// + + /// The registration policy of the resource provider. + /// + + /// The collection of provider resource types. + /// + + /// The provider authorization consent state. + /// Possible values include: 'NotSpecified', 'Required', 'NotRequired', + /// 'Consented' + public Provider(string id = default(string), string namespaceProperty = default(string), string registrationState = default(string), string registrationPolicy = default(string), System.Collections.Generic.IList resourceTypes = default(System.Collections.Generic.IList), string providerAuthorizationConsentState = default(string)) + { - Id = id; - NamespaceProperty = namespaceProperty; - RegistrationState = registrationState; - RegistrationPolicy = registrationPolicy; - ResourceTypes = resourceTypes; - ProviderAuthorizationConsentState = providerAuthorizationConsentState; + this.Id = id; + this.NamespaceProperty = namespaceProperty; + this.RegistrationState = registrationState; + this.RegistrationPolicy = registrationPolicy; + this.ResourceTypes = resourceTypes; + this.ProviderAuthorizationConsentState = providerAuthorizationConsentState; CustomInit(); } @@ -59,43 +59,41 @@ public Provider() /// partial void CustomInit(); + /// /// Gets the provider ID. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; private set; } /// /// Gets or sets the namespace of the resource provider. /// - [JsonProperty(PropertyName = "namespace")] - public string NamespaceProperty { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "namespace")] + public string NamespaceProperty {get; set; } /// /// Gets the registration state of the resource provider. /// - [JsonProperty(PropertyName = "registrationState")] - public string RegistrationState { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "registrationState")] + public string RegistrationState {get; private set; } /// /// Gets the registration policy of the resource provider. /// - [JsonProperty(PropertyName = "registrationPolicy")] - public string RegistrationPolicy { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "registrationPolicy")] + public string RegistrationPolicy {get; private set; } /// /// Gets the collection of provider resource types. /// - [JsonProperty(PropertyName = "resourceTypes")] - public IList ResourceTypes { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resourceTypes")] + public System.Collections.Generic.IList ResourceTypes {get; private set; } /// - /// Gets or sets the provider authorization consent state. Possible - /// values include: 'NotSpecified', 'Required', 'NotRequired', - /// 'Consented' + /// Gets or sets the provider authorization consent state. Possible values include: 'NotSpecified', 'Required', 'NotRequired', 'Consented' /// - [JsonProperty(PropertyName = "providerAuthorizationConsentState")] - public string ProviderAuthorizationConsentState { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "providerAuthorizationConsentState")] + public string ProviderAuthorizationConsentState {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ProviderAuthorizationConsentState.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ProviderAuthorizationConsentState.cs similarity index 86% rename from src/Resources/Resources.Sdk/Generated/Models/ProviderAuthorizationConsentState.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ProviderAuthorizationConsentState.cs index a572220ba6cd..d0451217f956 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ProviderAuthorizationConsentState.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ProviderAuthorizationConsentState.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.Resources.Models /// /// Defines values for ProviderAuthorizationConsentState. /// + + public static class ProviderAuthorizationConsentState { public const string NotSpecified = "NotSpecified"; @@ -21,4 +18,4 @@ public static class ProviderAuthorizationConsentState public const string NotRequired = "NotRequired"; public const string Consented = "Consented"; } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ProviderConsentDefinition.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ProviderConsentDefinition.cs similarity index 75% rename from src/Resources/Resources.Sdk/Generated/Models/ProviderConsentDefinition.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ProviderConsentDefinition.cs index 06c5d39fd2f1..082e87291af7 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ProviderConsentDefinition.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ProviderConsentDefinition.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,11 +23,13 @@ public ProviderConsentDefinition() /// /// Initializes a new instance of the ProviderConsentDefinition class. /// - /// A value indicating whether - /// authorization is consented or not. + + /// A value indicating whether authorization is consented or not. + /// public ProviderConsentDefinition(bool? consentToAuthorization = default(bool?)) + { - ConsentToAuthorization = consentToAuthorization; + this.ConsentToAuthorization = consentToAuthorization; CustomInit(); } @@ -42,12 +38,11 @@ public ProviderConsentDefinition() /// partial void CustomInit(); + /// - /// Gets or sets a value indicating whether authorization is consented - /// or not. + /// Gets or sets a value indicating whether authorization is consented or not. /// - [JsonProperty(PropertyName = "consentToAuthorization")] - public bool? ConsentToAuthorization { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "consentToAuthorization")] + public bool? ConsentToAuthorization {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ProviderExtendedLocation.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ProviderExtendedLocation.cs similarity index 61% rename from src/Resources/Resources.Sdk/Generated/Models/ProviderExtendedLocation.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ProviderExtendedLocation.cs index be16e49c4b6f..46b8f86e8fab 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ProviderExtendedLocation.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ProviderExtendedLocation.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,15 +23,21 @@ public ProviderExtendedLocation() /// /// Initializes a new instance of the ProviderExtendedLocation class. /// - /// The azure location. - /// The extended location type. - /// The extended locations for the - /// azure location. - public ProviderExtendedLocation(string location = default(string), string type = default(string), IList extendedLocations = default(IList)) + + /// The azure location. + /// + + /// The extended location type. + /// + + /// The extended locations for the azure location. + /// + public ProviderExtendedLocation(string location = default(string), string type = default(string), System.Collections.Generic.IList extendedLocations = default(System.Collections.Generic.IList)) + { - Location = location; - Type = type; - ExtendedLocations = extendedLocations; + this.Location = location; + this.Type = type; + this.ExtendedLocations = extendedLocations; CustomInit(); } @@ -48,23 +46,23 @@ public ProviderExtendedLocation() /// partial void CustomInit(); + /// /// Gets or sets the azure location. /// - [JsonProperty(PropertyName = "location")] - public string Location { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "location")] + public string Location {get; set; } /// /// Gets or sets the extended location type. /// - [JsonProperty(PropertyName = "type")] - public string Type { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; set; } /// /// Gets or sets the extended locations for the azure location. /// - [JsonProperty(PropertyName = "extendedLocations")] - public IList ExtendedLocations { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "extendedLocations")] + public System.Collections.Generic.IList ExtendedLocations {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ProviderPermission.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ProviderPermission.cs similarity index 58% rename from src/Resources/Resources.Sdk/Generated/Models/ProviderPermission.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ProviderPermission.cs index d6359588ddd0..cd97d612a093 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ProviderPermission.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ProviderPermission.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,19 +23,26 @@ public ProviderPermission() /// /// Initializes a new instance of the ProviderPermission class. /// - /// The application id. - /// Role definition properties. - /// Role definition - /// properties. - /// The provider - /// authorization consent state. Possible values include: - /// 'NotSpecified', 'Required', 'NotRequired', 'Consented' + + /// The application id. + /// + + /// Role definition properties. + /// + + /// Role definition properties. + /// + + /// The provider authorization consent state. + /// Possible values include: 'NotSpecified', 'Required', 'NotRequired', + /// 'Consented' public ProviderPermission(string applicationId = default(string), RoleDefinition roleDefinition = default(RoleDefinition), RoleDefinition managedByRoleDefinition = default(RoleDefinition), string providerAuthorizationConsentState = default(string)) + { - ApplicationId = applicationId; - RoleDefinition = roleDefinition; - ManagedByRoleDefinition = managedByRoleDefinition; - ProviderAuthorizationConsentState = providerAuthorizationConsentState; + this.ApplicationId = applicationId; + this.RoleDefinition = roleDefinition; + this.ManagedByRoleDefinition = managedByRoleDefinition; + this.ProviderAuthorizationConsentState = providerAuthorizationConsentState; CustomInit(); } @@ -50,31 +51,29 @@ public ProviderPermission() /// partial void CustomInit(); + /// /// Gets or sets the application id. /// - [JsonProperty(PropertyName = "applicationId")] - public string ApplicationId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "applicationId")] + public string ApplicationId {get; set; } /// /// Gets or sets role definition properties. /// - [JsonProperty(PropertyName = "roleDefinition")] - public RoleDefinition RoleDefinition { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "roleDefinition")] + public RoleDefinition RoleDefinition {get; set; } /// /// Gets or sets role definition properties. /// - [JsonProperty(PropertyName = "managedByRoleDefinition")] - public RoleDefinition ManagedByRoleDefinition { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "managedByRoleDefinition")] + public RoleDefinition ManagedByRoleDefinition {get; set; } /// - /// Gets or sets the provider authorization consent state. Possible - /// values include: 'NotSpecified', 'Required', 'NotRequired', - /// 'Consented' + /// Gets or sets the provider authorization consent state. Possible values include: 'NotSpecified', 'Required', 'NotRequired', 'Consented' /// - [JsonProperty(PropertyName = "providerAuthorizationConsentState")] - public string ProviderAuthorizationConsentState { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "providerAuthorizationConsentState")] + public string ProviderAuthorizationConsentState {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ProviderPermissionListResult.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ProviderPermissionListResult.cs similarity index 64% rename from src/Resources/Resources.Sdk/Generated/Models/ProviderPermissionListResult.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ProviderPermissionListResult.cs index 14d50192c074..f29e8a3f38b2 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ProviderPermissionListResult.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ProviderPermissionListResult.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.Resources.Models public partial class ProviderPermissionListResult { /// - /// Initializes a new instance of the ProviderPermissionListResult - /// class. + /// Initializes a new instance of the ProviderPermissionListResult class. /// public ProviderPermissionListResult() { @@ -30,16 +21,19 @@ public ProviderPermissionListResult() } /// - /// Initializes a new instance of the ProviderPermissionListResult - /// class. + /// Initializes a new instance of the ProviderPermissionListResult class. /// - /// An array of provider permissions. - /// The URL to use for getting the next set of - /// results. - public ProviderPermissionListResult(IList value = default(IList), string nextLink = default(string)) + + /// An array of provider permissions. + /// + + /// The URL to use for getting the next set of results. + /// + public ProviderPermissionListResult(System.Collections.Generic.IList value = default(System.Collections.Generic.IList), string nextLink = default(string)) + { - Value = value; - NextLink = nextLink; + this.Value = value; + this.NextLink = nextLink; CustomInit(); } @@ -48,17 +42,17 @@ public ProviderPermissionListResult() /// partial void CustomInit(); + /// /// Gets or sets an array of provider permissions. /// - [JsonProperty(PropertyName = "value")] - public IList Value { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "value")] + public System.Collections.Generic.IList Value {get; set; } /// /// Gets the URL to use for getting the next set of results. /// - [JsonProperty(PropertyName = "nextLink")] - public string NextLink { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "nextLink")] + public string NextLink {get; private set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ProviderRegistrationRequest.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ProviderRegistrationRequest.cs similarity index 78% rename from src/Resources/Resources.Sdk/Generated/Models/ProviderRegistrationRequest.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ProviderRegistrationRequest.cs index d531f0407973..e217f81b7943 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ProviderRegistrationRequest.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ProviderRegistrationRequest.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.Resources.Models public partial class ProviderRegistrationRequest { /// - /// Initializes a new instance of the ProviderRegistrationRequest - /// class. + /// Initializes a new instance of the ProviderRegistrationRequest class. /// public ProviderRegistrationRequest() { @@ -28,14 +21,15 @@ public ProviderRegistrationRequest() } /// - /// Initializes a new instance of the ProviderRegistrationRequest - /// class. + /// Initializes a new instance of the ProviderRegistrationRequest class. /// - /// The provider - /// consent. + + /// The provider consent. + /// public ProviderRegistrationRequest(ProviderConsentDefinition thirdPartyProviderConsent = default(ProviderConsentDefinition)) + { - ThirdPartyProviderConsent = thirdPartyProviderConsent; + this.ThirdPartyProviderConsent = thirdPartyProviderConsent; CustomInit(); } @@ -44,11 +38,11 @@ public ProviderRegistrationRequest() /// partial void CustomInit(); + /// /// Gets or sets the provider consent. /// - [JsonProperty(PropertyName = "thirdPartyProviderConsent")] - public ProviderConsentDefinition ThirdPartyProviderConsent { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "thirdPartyProviderConsent")] + public ProviderConsentDefinition ThirdPartyProviderConsent {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/Models/ProviderResourceType.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ProviderResourceType.cs new file mode 100644 index 000000000000..aab9bb27484a --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ProviderResourceType.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Resources.Models +{ + using System.Linq; + + /// + /// Resource type managed by the resource provider. + /// + public partial class ProviderResourceType + { + /// + /// Initializes a new instance of the ProviderResourceType class. + /// + public ProviderResourceType() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ProviderResourceType class. + /// + + /// The resource type. + /// + + /// The collection of locations where this resource type can be created. + /// + + /// The location mappings that are supported by this resource type. + /// + + /// The aliases that are supported by this resource type. + /// + + /// The API version. + /// + + /// The default API version. + /// + + /// + /// + + /// The API profiles for the resource provider. + /// + + /// The additional capabilities offered by this resource type. + /// + + /// The properties. + /// + public ProviderResourceType(string resourceType = default(string), System.Collections.Generic.IList locations = default(System.Collections.Generic.IList), System.Collections.Generic.IList locationMappings = default(System.Collections.Generic.IList), System.Collections.Generic.IList aliases = default(System.Collections.Generic.IList), System.Collections.Generic.IList apiVersions = default(System.Collections.Generic.IList), string defaultApiVersion = default(string), System.Collections.Generic.IList zoneMappings = default(System.Collections.Generic.IList), System.Collections.Generic.IList apiProfiles = default(System.Collections.Generic.IList), string capabilities = default(string), System.Collections.Generic.IDictionary properties = default(System.Collections.Generic.IDictionary)) + + { + this.ResourceType = resourceType; + this.Locations = locations; + this.LocationMappings = locationMappings; + this.Aliases = aliases; + this.ApiVersions = apiVersions; + this.DefaultApiVersion = defaultApiVersion; + this.ZoneMappings = zoneMappings; + this.ApiProfiles = apiProfiles; + this.Capabilities = capabilities; + this.Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the resource type. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "resourceType")] + public string ResourceType {get; set; } + + /// + /// Gets or sets the collection of locations where this resource type can be + /// created. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "locations")] + public System.Collections.Generic.IList Locations {get; set; } + + /// + /// Gets or sets the location mappings that are supported by this resource + /// type. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "locationMappings")] + public System.Collections.Generic.IList LocationMappings {get; set; } + + /// + /// Gets or sets the aliases that are supported by this resource type. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "aliases")] + public System.Collections.Generic.IList Aliases {get; set; } + + /// + /// Gets or sets the API version. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "apiVersions")] + public System.Collections.Generic.IList ApiVersions {get; set; } + + /// + /// Gets the default API version. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "defaultApiVersion")] + public string DefaultApiVersion {get; private set; } + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "zoneMappings")] + public System.Collections.Generic.IList ZoneMappings {get; set; } + + /// + /// Gets the API profiles for the resource provider. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "apiProfiles")] + public System.Collections.Generic.IList ApiProfiles {get; private set; } + + /// + /// Gets or sets the additional capabilities offered by this resource type. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "capabilities")] + public string Capabilities {get; set; } + + /// + /// Gets or sets the properties. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public System.Collections.Generic.IDictionary Properties {get; set; } + } +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ProviderResourceTypeListResult.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ProviderResourceTypeListResult.cs similarity index 61% rename from src/Resources/Resources.Sdk/Generated/Models/ProviderResourceTypeListResult.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ProviderResourceTypeListResult.cs index 7c292c7f3189..8591359b7995 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ProviderResourceTypeListResult.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ProviderResourceTypeListResult.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.Resources.Models public partial class ProviderResourceTypeListResult { /// - /// Initializes a new instance of the ProviderResourceTypeListResult - /// class. + /// Initializes a new instance of the ProviderResourceTypeListResult class. /// public ProviderResourceTypeListResult() { @@ -30,16 +21,19 @@ public ProviderResourceTypeListResult() } /// - /// Initializes a new instance of the ProviderResourceTypeListResult - /// class. + /// Initializes a new instance of the ProviderResourceTypeListResult class. /// - /// An array of resource types. - /// The URL to use for getting the next set of - /// results. - public ProviderResourceTypeListResult(IList value = default(IList), string nextLink = default(string)) + + /// An array of resource types. + /// + + /// The URL to use for getting the next set of results. + /// + public ProviderResourceTypeListResult(System.Collections.Generic.IList value = default(System.Collections.Generic.IList), string nextLink = default(string)) + { - Value = value; - NextLink = nextLink; + this.Value = value; + this.NextLink = nextLink; CustomInit(); } @@ -48,17 +42,17 @@ public ProviderResourceTypeListResult() /// partial void CustomInit(); + /// /// Gets or sets an array of resource types. /// - [JsonProperty(PropertyName = "value")] - public IList Value { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "value")] + public System.Collections.Generic.IList Value {get; set; } /// /// Gets the URL to use for getting the next set of results. /// - [JsonProperty(PropertyName = "nextLink")] - public string NextLink { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "nextLink")] + public string NextLink {get; private set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ProvisioningOperation.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ProvisioningOperation.cs similarity index 82% rename from src/Resources/Resources.Sdk/Generated/Models/ProvisioningOperation.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ProvisioningOperation.cs index fff9c6c61743..e70ebe3eb05d 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ProvisioningOperation.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ProvisioningOperation.cs @@ -1,76 +1,69 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; /// /// Defines values for ProvisioningOperation. /// - [JsonConverter(typeof(StringEnumConverter))] + + + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public enum ProvisioningOperation { /// /// The provisioning operation is not specified. /// - [EnumMember(Value = "NotSpecified")] + [System.Runtime.Serialization.EnumMember(Value = "NotSpecified")] NotSpecified, /// /// The provisioning operation is create. /// - [EnumMember(Value = "Create")] + [System.Runtime.Serialization.EnumMember(Value = "Create")] Create, /// /// The provisioning operation is delete. /// - [EnumMember(Value = "Delete")] + [System.Runtime.Serialization.EnumMember(Value = "Delete")] Delete, /// /// The provisioning operation is waiting. /// - [EnumMember(Value = "Waiting")] + [System.Runtime.Serialization.EnumMember(Value = "Waiting")] Waiting, /// /// The provisioning operation is waiting Azure async operation. /// - [EnumMember(Value = "AzureAsyncOperationWaiting")] + [System.Runtime.Serialization.EnumMember(Value = "AzureAsyncOperationWaiting")] AzureAsyncOperationWaiting, /// /// The provisioning operation is waiting for resource cache. /// - [EnumMember(Value = "ResourceCacheWaiting")] + [System.Runtime.Serialization.EnumMember(Value = "ResourceCacheWaiting")] ResourceCacheWaiting, /// /// The provisioning operation is action. /// - [EnumMember(Value = "Action")] + [System.Runtime.Serialization.EnumMember(Value = "Action")] Action, /// /// The provisioning operation is read. /// - [EnumMember(Value = "Read")] + [System.Runtime.Serialization.EnumMember(Value = "Read")] Read, /// /// The provisioning operation is evaluate output. /// - [EnumMember(Value = "EvaluateDeploymentOutput")] + [System.Runtime.Serialization.EnumMember(Value = "EvaluateDeploymentOutput")] EvaluateDeploymentOutput, /// - /// The provisioning operation is cleanup. This operation is part of - /// the 'complete' mode deployment. + /// The provisioning operation is cleanup. This operation is part of the + /// 'complete' mode deployment. /// - [EnumMember(Value = "DeploymentCleanup")] + [System.Runtime.Serialization.EnumMember(Value = "DeploymentCleanup")] DeploymentCleanup } internal static class ProvisioningOperationEnumExtension @@ -79,7 +72,6 @@ internal static string ToSerializedValue(this ProvisioningOperation? value) { return value == null ? null : ((ProvisioningOperation)value).ToSerializedValue(); } - internal static string ToSerializedValue(this ProvisioningOperation value) { switch( value ) @@ -107,7 +99,6 @@ internal static string ToSerializedValue(this ProvisioningOperation value) } return null; } - internal static ProvisioningOperation? ParseProvisioningOperation(this string value) { switch( value ) @@ -136,4 +127,4 @@ internal static string ToSerializedValue(this ProvisioningOperation value) return null; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ProvisioningState.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ProvisioningState.cs similarity index 90% rename from src/Resources/Resources.Sdk/Generated/Models/ProvisioningState.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ProvisioningState.cs index 3a889667c981..0be408e24be1 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ProvisioningState.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ProvisioningState.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.Resources.Models /// /// Defines values for ProvisioningState. /// + + public static class ProvisioningState { public const string NotSpecified = "NotSpecified"; @@ -29,4 +26,4 @@ public static class ProvisioningState public const string Succeeded = "Succeeded"; public const string Updating = "Updating"; } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ProxyResource.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ProxyResource.cs similarity index 62% rename from src/Resources/Resources.Sdk/Generated/Models/ProxyResource.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ProxyResource.cs index 3b65e15c1911..d237e8cbb60f 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ProxyResource.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ProxyResource.cs @@ -1,24 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Newtonsoft.Json; using System.Linq; /// /// An Azure proxy resource. /// - public partial class ProxyResource : IResource + public partial class ProxyResource : Microsoft.Rest.Azure.IResource { /// /// Initializes a new instance of the ProxyResource class. @@ -31,14 +23,21 @@ public ProxyResource() /// /// Initializes a new instance of the ProxyResource class. /// - /// Azure resource Id. - /// Azure resource name. - /// Azure resource type. + + /// Azure resource Id. + /// + + /// Azure resource name. + /// + + /// Azure resource type. + /// public ProxyResource(string id = default(string), string name = default(string), string type = default(string)) + { - Id = id; - Name = name; - Type = type; + this.Id = id; + this.Name = name; + this.Type = type; CustomInit(); } @@ -47,23 +46,23 @@ public ProxyResource() /// partial void CustomInit(); + /// /// Gets azure resource Id. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; private set; } /// /// Gets azure resource name. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; private set; } /// /// Gets azure resource type. /// - [JsonProperty(PropertyName = "type")] - public string Type { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; private set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/PublicNetworkAccessOptions.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/PublicNetworkAccessOptions.cs similarity index 84% rename from src/Resources/Resources.Sdk/Generated/Models/PublicNetworkAccessOptions.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/PublicNetworkAccessOptions.cs index c26e7e4bc0f7..ff8269c6ea05 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/PublicNetworkAccessOptions.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/PublicNetworkAccessOptions.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { @@ -14,9 +9,11 @@ namespace Microsoft.Azure.Management.Resources.Models /// /// Defines values for PublicNetworkAccessOptions. /// + + public static class PublicNetworkAccessOptions { public const string Enabled = "Enabled"; public const string Disabled = "Disabled"; } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/RegionCategory.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/RegionCategory.cs similarity index 84% rename from src/Resources/Resources.Sdk/Generated/Models/RegionCategory.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/RegionCategory.cs index 5a89727a4b6c..da7926727844 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/RegionCategory.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/RegionCategory.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.Resources.Models /// /// Defines values for RegionCategory. /// + + public static class RegionCategory { public const string Recommended = "Recommended"; public const string Extended = "Extended"; public const string Other = "Other"; } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/RegionType.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/RegionType.cs similarity index 83% rename from src/Resources/Resources.Sdk/Generated/Models/RegionType.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/RegionType.cs index 5ae824119ae2..c9b5c94ea608 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/RegionType.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/RegionType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { @@ -14,9 +9,11 @@ namespace Microsoft.Azure.Management.Resources.Models /// /// Defines values for RegionType. /// + + public static class RegionType { public const string Physical = "Physical"; public const string Logical = "Logical"; } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/Resource.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/Resource.cs similarity index 51% rename from src/Resources/Resources.Sdk/Generated/Models/Resource.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/Resource.cs index 2905bf975c1f..9c8b0bf803d7 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/Resource.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/Resource.cs @@ -1,26 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// /// Specified resource. /// - public partial class Resource : IResource + public partial class Resource : Microsoft.Rest.Azure.IResource { /// /// Initializes a new instance of the Resource class. @@ -33,20 +23,33 @@ public Resource() /// /// Initializes a new instance of the Resource class. /// - /// Resource ID - /// Resource name - /// Resource type - /// Resource location - /// Resource extended location. - /// Resource tags - public Resource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), ExtendedLocation extendedLocation = default(ExtendedLocation), IDictionary tags = default(IDictionary)) + + /// Resource ID + /// + + /// Resource name + /// + + /// Resource type + /// + + /// Resource location + /// + + /// Resource extended location. + /// + + /// Resource tags + /// + public Resource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), ExtendedLocation extendedLocation = default(ExtendedLocation), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary)) + { - Id = id; - Name = name; - Type = type; - Location = location; - ExtendedLocation = extendedLocation; - Tags = tags; + this.Id = id; + this.Name = name; + this.Type = type; + this.Location = location; + this.ExtendedLocation = extendedLocation; + this.Tags = tags; CustomInit(); } @@ -55,41 +58,41 @@ public Resource() /// partial void CustomInit(); + /// /// Gets resource ID /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; private set; } /// /// Gets resource name /// - [JsonProperty(PropertyName = "name")] - public string Name { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; private set; } /// /// Gets resource type /// - [JsonProperty(PropertyName = "type")] - public string Type { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; private set; } /// /// Gets or sets resource location /// - [JsonProperty(PropertyName = "location")] - public string Location { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "location")] + public string Location {get; set; } /// /// Gets or sets resource extended location. /// - [JsonProperty(PropertyName = "extendedLocation")] - public ExtendedLocation ExtendedLocation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "extendedLocation")] + public ExtendedLocation ExtendedLocation {get; set; } /// /// Gets or sets resource tags /// - [JsonProperty(PropertyName = "tags")] - public IDictionary Tags { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "tags")] + public System.Collections.Generic.IDictionary Tags {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ResourceGroup.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ResourceGroup.cs similarity index 50% rename from src/Resources/Resources.Sdk/Generated/Models/ResourceGroup.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ResourceGroup.cs index b99712836505..2796d6f1d9f5 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ResourceGroup.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ResourceGroup.cs @@ -1,26 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// /// Resource group information. /// - public partial class ResourceGroup : IResource + public partial class ResourceGroup : Microsoft.Rest.Azure.IResource { /// /// Initializes a new instance of the ResourceGroup class. @@ -33,25 +23,38 @@ public ResourceGroup() /// /// Initializes a new instance of the ResourceGroup class. /// - /// The location of the resource group. It - /// cannot be changed after the resource group has been created. It - /// must be one of the supported Azure locations. - /// The ID of the resource group. - /// The name of the resource group. - /// The type of the resource group. - /// The resource group properties. - /// The ID of the resource that manages this - /// resource group. - /// The tags attached to the resource group. - public ResourceGroup(string location, string id = default(string), string name = default(string), string type = default(string), ResourceGroupProperties properties = default(ResourceGroupProperties), string managedBy = default(string), IDictionary tags = default(IDictionary)) + + /// The ID of the resource group. + /// + + /// The name of the resource group. + /// + + /// The type of the resource group. + /// + + /// The resource group properties. + /// + + /// The location of the resource group. It cannot be changed after the resource + /// group has been created. It must be one of the supported Azure locations. + /// + + /// The ID of the resource that manages this resource group. + /// + + /// The tags attached to the resource group. + /// + public ResourceGroup(string location, string id = default(string), string name = default(string), string type = default(string), ResourceGroupProperties properties = default(ResourceGroupProperties), string managedBy = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary)) + { - Id = id; - Name = name; - Type = type; - Properties = properties; - Location = location; - ManagedBy = managedBy; - Tags = tags; + this.Id = id; + this.Name = name; + this.Type = type; + this.Properties = properties; + this.Location = location; + this.ManagedBy = managedBy; + this.Tags = tags; CustomInit(); } @@ -60,63 +63,69 @@ public ResourceGroup() /// partial void CustomInit(); + /// /// Gets the ID of the resource group. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; private set; } /// /// Gets the name of the resource group. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; private set; } /// /// Gets the type of the resource group. /// - [JsonProperty(PropertyName = "type")] - public string Type { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; private set; } /// /// Gets or sets the resource group properties. /// - [JsonProperty(PropertyName = "properties")] - public ResourceGroupProperties Properties { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public ResourceGroupProperties Properties {get; set; } /// - /// Gets or sets the location of the resource group. It cannot be - /// changed after the resource group has been created. It must be one - /// of the supported Azure locations. + /// Gets or sets the location of the resource group. It cannot be changed after + /// the resource group has been created. It must be one of the supported Azure + /// locations. /// - [JsonProperty(PropertyName = "location")] - public string Location { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "location")] + public string Location {get; set; } /// - /// Gets or sets the ID of the resource that manages this resource - /// group. + /// Gets or sets the ID of the resource that manages this resource group. /// - [JsonProperty(PropertyName = "managedBy")] - public string ManagedBy { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "managedBy")] + public string ManagedBy {get; set; } /// /// Gets or sets the tags attached to the resource group. /// - [JsonProperty(PropertyName = "tags")] - public IDictionary Tags { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "tags")] + public System.Collections.Generic.IDictionary Tags {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Location == null) + if (this.Location == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Location"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Location"); } + + + + + + + } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ResourceGroupExportResult.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ResourceGroupExportResult.cs similarity index 72% rename from src/Resources/Resources.Sdk/Generated/Models/ResourceGroupExportResult.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ResourceGroupExportResult.cs index 9f42c16800a5..1e833da24835 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ResourceGroupExportResult.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ResourceGroupExportResult.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,12 +23,17 @@ public ResourceGroupExportResult() /// /// Initializes a new instance of the ResourceGroupExportResult class. /// - /// The template content. - /// The template export error. + + /// The template content. + /// + + /// The template export error. + /// public ResourceGroupExportResult(object template = default(object), ErrorResponse error = default(ErrorResponse)) + { - Template = template; - Error = error; + this.Template = template; + this.Error = error; CustomInit(); } @@ -43,17 +42,17 @@ public ResourceGroupExportResult() /// partial void CustomInit(); + /// /// Gets or sets the template content. /// - [JsonProperty(PropertyName = "template")] - public object Template { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "template")] + public object Template {get; set; } /// /// Gets or sets the template export error. /// - [JsonProperty(PropertyName = "error")] - public ErrorResponse Error { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "error")] + public ErrorResponse Error {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ResourceGroupFilter.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ResourceGroupFilter.cs similarity index 71% rename from src/Resources/Resources.Sdk/Generated/Models/ResourceGroupFilter.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ResourceGroupFilter.cs index 55c768a704ad..14130ef41f65 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ResourceGroupFilter.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ResourceGroupFilter.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,12 +23,17 @@ public ResourceGroupFilter() /// /// Initializes a new instance of the ResourceGroupFilter class. /// - /// The tag name. - /// The tag value. + + /// The tag name. + /// + + /// The tag value. + /// public ResourceGroupFilter(string tagName = default(string), string tagValue = default(string)) + { - TagName = tagName; - TagValue = tagValue; + this.TagName = tagName; + this.TagValue = tagValue; CustomInit(); } @@ -43,17 +42,17 @@ public ResourceGroupFilter() /// partial void CustomInit(); + /// /// Gets or sets the tag name. /// - [JsonProperty(PropertyName = "tagName")] - public string TagName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tagName")] + public string TagName {get; set; } /// /// Gets or sets the tag value. /// - [JsonProperty(PropertyName = "tagValue")] - public string TagValue { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "tagValue")] + public string TagValue {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ResourceGroupPatchable.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ResourceGroupPatchable.cs similarity index 62% rename from src/Resources/Resources.Sdk/Generated/Models/ResourceGroupPatchable.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ResourceGroupPatchable.cs index 403383791071..4f23dd170c79 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ResourceGroupPatchable.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ResourceGroupPatchable.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,17 +23,25 @@ public ResourceGroupPatchable() /// /// Initializes a new instance of the ResourceGroupPatchable class. /// - /// The name of the resource group. - /// The resource group properties. - /// The ID of the resource that manages this - /// resource group. - /// The tags attached to the resource group. - public ResourceGroupPatchable(string name = default(string), ResourceGroupProperties properties = default(ResourceGroupProperties), string managedBy = default(string), IDictionary tags = default(IDictionary)) + + /// The name of the resource group. + /// + + /// The resource group properties. + /// + + /// The ID of the resource that manages this resource group. + /// + + /// The tags attached to the resource group. + /// + public ResourceGroupPatchable(string name = default(string), ResourceGroupProperties properties = default(ResourceGroupProperties), string managedBy = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary)) + { - Name = name; - Properties = properties; - ManagedBy = managedBy; - Tags = tags; + this.Name = name; + this.Properties = properties; + this.ManagedBy = managedBy; + this.Tags = tags; CustomInit(); } @@ -50,30 +50,29 @@ public ResourceGroupPatchable() /// partial void CustomInit(); + /// /// Gets or sets the name of the resource group. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } /// /// Gets or sets the resource group properties. /// - [JsonProperty(PropertyName = "properties")] - public ResourceGroupProperties Properties { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public ResourceGroupProperties Properties {get; set; } /// - /// Gets or sets the ID of the resource that manages this resource - /// group. + /// Gets or sets the ID of the resource that manages this resource group. /// - [JsonProperty(PropertyName = "managedBy")] - public string ManagedBy { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "managedBy")] + public string ManagedBy {get; set; } /// /// Gets or sets the tags attached to the resource group. /// - [JsonProperty(PropertyName = "tags")] - public IDictionary Tags { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "tags")] + public System.Collections.Generic.IDictionary Tags {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ResourceGroupProperties.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ResourceGroupProperties.cs similarity index 79% rename from src/Resources/Resources.Sdk/Generated/Models/ResourceGroupProperties.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ResourceGroupProperties.cs index e621acb230ae..8218c00946ef 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ResourceGroupProperties.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ResourceGroupProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,10 +23,13 @@ public ResourceGroupProperties() /// /// Initializes a new instance of the ResourceGroupProperties class. /// - /// The provisioning state. + + /// The provisioning state. + /// public ResourceGroupProperties(string provisioningState = default(string)) + { - ProvisioningState = provisioningState; + this.ProvisioningState = provisioningState; CustomInit(); } @@ -41,11 +38,11 @@ public ResourceGroupProperties() /// partial void CustomInit(); + /// /// Gets the provisioning state. /// - [JsonProperty(PropertyName = "provisioningState")] - public string ProvisioningState { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "provisioningState")] + public string ProvisioningState {get; private set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ResourceIdentityType.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ResourceIdentityType.cs similarity index 80% rename from src/Resources/Resources.Sdk/Generated/Models/ResourceIdentityType.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ResourceIdentityType.cs index 6f1e79cc9860..c59df0e0a8ed 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ResourceIdentityType.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ResourceIdentityType.cs @@ -1,33 +1,26 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; /// /// Defines values for ResourceIdentityType. /// - [JsonConverter(typeof(StringEnumConverter))] + + + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public enum ResourceIdentityType { - [EnumMember(Value = "SystemAssigned")] + [System.Runtime.Serialization.EnumMember(Value = "SystemAssigned")] SystemAssigned, - [EnumMember(Value = "UserAssigned")] + [System.Runtime.Serialization.EnumMember(Value = "UserAssigned")] UserAssigned, - [EnumMember(Value = "SystemAssigned, UserAssigned")] + [System.Runtime.Serialization.EnumMember(Value = "SystemAssigned, UserAssigned")] SystemAssignedUserAssigned, - [EnumMember(Value = "None")] + [System.Runtime.Serialization.EnumMember(Value = "None")] None } internal static class ResourceIdentityTypeEnumExtension @@ -36,7 +29,6 @@ internal static string ToSerializedValue(this ResourceIdentityType? value) { return value == null ? null : ((ResourceIdentityType)value).ToSerializedValue(); } - internal static string ToSerializedValue(this ResourceIdentityType value) { switch( value ) @@ -52,7 +44,6 @@ internal static string ToSerializedValue(this ResourceIdentityType value) } return null; } - internal static ResourceIdentityType? ParseResourceIdentityType(this string value) { switch( value ) @@ -69,4 +60,4 @@ internal static string ToSerializedValue(this ResourceIdentityType value) return null; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ResourceManagementPrivateLink.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ResourceManagementPrivateLink.cs similarity index 56% rename from src/Resources/Resources.Sdk/Generated/Models/ResourceManagementPrivateLink.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ResourceManagementPrivateLink.cs index f5a3d3a1af55..1575b0544628 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ResourceManagementPrivateLink.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ResourceManagementPrivateLink.cs @@ -1,25 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Newtonsoft.Json; using System.Linq; - public partial class ResourceManagementPrivateLink : IResource + public partial class ResourceManagementPrivateLink : Microsoft.Rest.Azure.IResource { /// - /// Initializes a new instance of the ResourceManagementPrivateLink - /// class. + /// Initializes a new instance of the ResourceManagementPrivateLink class. /// public ResourceManagementPrivateLink() { @@ -27,20 +18,31 @@ public ResourceManagementPrivateLink() } /// - /// Initializes a new instance of the ResourceManagementPrivateLink - /// class. + /// Initializes a new instance of the ResourceManagementPrivateLink class. /// - /// The rmplResourceID. - /// The rmpl Name. - /// The operation type. - /// the region of the rmpl + + /// + /// + + /// The rmplResourceID. + /// + + /// The rmpl Name. + /// + + /// The operation type. + /// + + /// the region of the rmpl + /// public ResourceManagementPrivateLink(ResourceManagementPrivateLinkEndpointConnections properties = default(ResourceManagementPrivateLinkEndpointConnections), string id = default(string), string name = default(string), string type = default(string), string location = default(string)) + { - Properties = properties; - Id = id; - Name = name; - Type = type; - Location = location; + this.Properties = properties; + this.Id = id; + this.Name = name; + this.Type = type; + this.Location = location; CustomInit(); } @@ -49,34 +51,35 @@ public ResourceManagementPrivateLink() /// partial void CustomInit(); + /// + /// Gets or sets /// - [JsonProperty(PropertyName = "properties")] - public ResourceManagementPrivateLinkEndpointConnections Properties { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public ResourceManagementPrivateLinkEndpointConnections Properties {get; set; } /// /// Gets the rmplResourceID. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; private set; } /// /// Gets the rmpl Name. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; private set; } /// /// Gets the operation type. /// - [JsonProperty(PropertyName = "type")] - public string Type { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; private set; } /// /// Gets or sets the region of the rmpl /// - [JsonProperty(PropertyName = "location")] - public string Location { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "location")] + public string Location {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ResourceManagementPrivateLinkEndpointConnections.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ResourceManagementPrivateLinkEndpointConnections.cs similarity index 58% rename from src/Resources/Resources.Sdk/Generated/Models/ResourceManagementPrivateLinkEndpointConnections.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ResourceManagementPrivateLinkEndpointConnections.cs index 35334fd4d04a..8fddbabc1e38 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ResourceManagementPrivateLinkEndpointConnections.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ResourceManagementPrivateLinkEndpointConnections.cs @@ -1,25 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; public partial class ResourceManagementPrivateLinkEndpointConnections { /// - /// Initializes a new instance of the - /// ResourceManagementPrivateLinkEndpointConnections class. + /// Initializes a new instance of the ResourceManagementPrivateLinkEndpointConnections class. /// public ResourceManagementPrivateLinkEndpointConnections() { @@ -27,14 +18,15 @@ public ResourceManagementPrivateLinkEndpointConnections() } /// - /// Initializes a new instance of the - /// ResourceManagementPrivateLinkEndpointConnections class. + /// Initializes a new instance of the ResourceManagementPrivateLinkEndpointConnections class. /// - /// The private endpoint - /// connections. - public ResourceManagementPrivateLinkEndpointConnections(IList privateEndpointConnections = default(IList)) + + /// The private endpoint connections. + /// + public ResourceManagementPrivateLinkEndpointConnections(System.Collections.Generic.IList privateEndpointConnections = default(System.Collections.Generic.IList)) + { - PrivateEndpointConnections = privateEndpointConnections; + this.PrivateEndpointConnections = privateEndpointConnections; CustomInit(); } @@ -43,11 +35,11 @@ public ResourceManagementPrivateLinkEndpointConnections() /// partial void CustomInit(); + /// /// Gets or sets the private endpoint connections. /// - [JsonProperty(PropertyName = "privateEndpointConnections")] - public IList PrivateEndpointConnections { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "privateEndpointConnections")] + public System.Collections.Generic.IList PrivateEndpointConnections {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ResourceManagementPrivateLinkListResult.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ResourceManagementPrivateLinkListResult.cs similarity index 57% rename from src/Resources/Resources.Sdk/Generated/Models/ResourceManagementPrivateLinkListResult.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ResourceManagementPrivateLinkListResult.cs index f72c407034de..01d011b48eba 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ResourceManagementPrivateLinkListResult.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ResourceManagementPrivateLinkListResult.cs @@ -1,25 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; public partial class ResourceManagementPrivateLinkListResult { /// - /// Initializes a new instance of the - /// ResourceManagementPrivateLinkListResult class. + /// Initializes a new instance of the ResourceManagementPrivateLinkListResult class. /// public ResourceManagementPrivateLinkListResult() { @@ -27,14 +18,15 @@ public ResourceManagementPrivateLinkListResult() } /// - /// Initializes a new instance of the - /// ResourceManagementPrivateLinkListResult class. + /// Initializes a new instance of the ResourceManagementPrivateLinkListResult class. /// - /// An array of resource management private - /// links. - public ResourceManagementPrivateLinkListResult(IList value = default(IList)) + + /// An array of resource management private links. + /// + public ResourceManagementPrivateLinkListResult(System.Collections.Generic.IList value = default(System.Collections.Generic.IList)) + { - Value = value; + this.Value = value; CustomInit(); } @@ -43,11 +35,11 @@ public ResourceManagementPrivateLinkListResult() /// partial void CustomInit(); + /// /// Gets or sets an array of resource management private links. /// - [JsonProperty(PropertyName = "value")] - public IList Value { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "value")] + public System.Collections.Generic.IList Value {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ResourceManagementPrivateLinkLocation.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ResourceManagementPrivateLinkLocation.cs similarity index 68% rename from src/Resources/Resources.Sdk/Generated/Models/ResourceManagementPrivateLinkLocation.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ResourceManagementPrivateLinkLocation.cs index 2d504557cbca..3fad5ac6ebc8 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ResourceManagementPrivateLinkLocation.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ResourceManagementPrivateLinkLocation.cs @@ -1,23 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; public partial class ResourceManagementPrivateLinkLocation { /// - /// Initializes a new instance of the - /// ResourceManagementPrivateLinkLocation class. + /// Initializes a new instance of the ResourceManagementPrivateLinkLocation class. /// public ResourceManagementPrivateLinkLocation() { @@ -25,14 +18,15 @@ public ResourceManagementPrivateLinkLocation() } /// - /// Initializes a new instance of the - /// ResourceManagementPrivateLinkLocation class. + /// Initializes a new instance of the ResourceManagementPrivateLinkLocation class. /// - /// the region to create private link - /// association. + + /// the region to create private link association. + /// public ResourceManagementPrivateLinkLocation(string location = default(string)) + { - Location = location; + this.Location = location; CustomInit(); } @@ -41,11 +35,11 @@ public ResourceManagementPrivateLinkLocation() /// partial void CustomInit(); + /// /// Gets or sets the region to create private link association. /// - [JsonProperty(PropertyName = "location")] - public string Location { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "location")] + public string Location {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ResourceName.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ResourceName.cs similarity index 63% rename from src/Resources/Resources.Sdk/Generated/Models/ResourceName.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ResourceName.cs index f15694ce573b..4d875d07690f 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ResourceName.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ResourceName.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -30,12 +23,17 @@ public ResourceName() /// /// Initializes a new instance of the ResourceName class. /// - /// Name of the resource - /// The type of the resource + + /// Name of the resource + /// + + /// The type of the resource + /// public ResourceName(string name, string type) + { - Name = name; - Type = type; + this.Name = name; + this.Type = type; CustomInit(); } @@ -44,34 +42,36 @@ public ResourceName(string name, string type) /// partial void CustomInit(); + /// /// Gets or sets name of the resource /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } /// /// Gets or sets the type of the resource /// - [JsonProperty(PropertyName = "type")] - public string Type { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Name == null) + if (this.Name == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Name"); } - if (Type == null) + if (this.Type == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Type"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Type"); } + + } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ResourceNameStatus.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ResourceNameStatus.cs similarity index 83% rename from src/Resources/Resources.Sdk/Generated/Models/ResourceNameStatus.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ResourceNameStatus.cs index 39b9ba4281e5..2d1210cd86ae 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ResourceNameStatus.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ResourceNameStatus.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { @@ -14,9 +9,11 @@ namespace Microsoft.Azure.Management.Resources.Models /// /// Defines values for ResourceNameStatus. /// + + public static class ResourceNameStatus { public const string Allowed = "Allowed"; public const string Reserved = "Reserved"; } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ResourceProviderOperationDisplayProperties.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ResourceProviderOperationDisplayProperties.cs similarity index 53% rename from src/Resources/Resources.Sdk/Generated/Models/ResourceProviderOperationDisplayProperties.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ResourceProviderOperationDisplayProperties.cs index 3676dc4111f6..40b939025650 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ResourceProviderOperationDisplayProperties.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ResourceProviderOperationDisplayProperties.cs @@ -1,26 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// - /// Resource provider operation's display properties. + /// Resource provider operation's display properties. /// public partial class ResourceProviderOperationDisplayProperties { /// - /// Initializes a new instance of the - /// ResourceProviderOperationDisplayProperties class. + /// Initializes a new instance of the ResourceProviderOperationDisplayProperties class. /// public ResourceProviderOperationDisplayProperties() { @@ -28,21 +21,31 @@ public ResourceProviderOperationDisplayProperties() } /// - /// Initializes a new instance of the - /// ResourceProviderOperationDisplayProperties class. + /// Initializes a new instance of the ResourceProviderOperationDisplayProperties class. /// - /// Operation description. - /// Operation provider. - /// Operation resource. - /// Resource provider operation. - /// Operation description. + + /// Operation description. + /// + + /// Operation provider. + /// + + /// Operation resource. + /// + + /// Resource provider operation. + /// + + /// Operation description. + /// public ResourceProviderOperationDisplayProperties(string publisher = default(string), string provider = default(string), string resource = default(string), string operation = default(string), string description = default(string)) + { - Publisher = publisher; - Provider = provider; - Resource = resource; - Operation = operation; - Description = description; + this.Publisher = publisher; + this.Provider = provider; + this.Resource = resource; + this.Operation = operation; + this.Description = description; CustomInit(); } @@ -51,35 +54,35 @@ public ResourceProviderOperationDisplayProperties() /// partial void CustomInit(); + /// /// Gets or sets operation description. /// - [JsonProperty(PropertyName = "publisher")] - public string Publisher { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "publisher")] + public string Publisher {get; set; } /// /// Gets or sets operation provider. /// - [JsonProperty(PropertyName = "provider")] - public string Provider { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "provider")] + public string Provider {get; set; } /// /// Gets or sets operation resource. /// - [JsonProperty(PropertyName = "resource")] - public string Resource { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resource")] + public string Resource {get; set; } /// /// Gets or sets resource provider operation. /// - [JsonProperty(PropertyName = "operation")] - public string Operation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "operation")] + public string Operation {get; set; } /// /// Gets or sets operation description. /// - [JsonProperty(PropertyName = "description")] - public string Description { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "description")] + public string Description {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ResourceReference.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ResourceReference.cs similarity index 80% rename from src/Resources/Resources.Sdk/Generated/Models/ResourceReference.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ResourceReference.cs index eea5593977c1..384d944bf91e 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ResourceReference.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ResourceReference.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,11 +23,13 @@ public ResourceReference() /// /// Initializes a new instance of the ResourceReference class. /// - /// The resourceId of a resource managed by the - /// deployment stack. + + /// The resourceId of a resource managed by the deployment stack. + /// public ResourceReference(string id = default(string)) + { - Id = id; + this.Id = id; CustomInit(); } @@ -42,11 +38,11 @@ public ResourceReference() /// partial void CustomInit(); + /// /// Gets the resourceId of a resource managed by the deployment stack. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; private set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ResourceReferenceExtended.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ResourceReferenceExtended.cs similarity index 62% rename from src/Resources/Resources.Sdk/Generated/Models/ResourceReferenceExtended.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ResourceReferenceExtended.cs index 84542017664f..ec38694df11f 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ResourceReferenceExtended.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ResourceReferenceExtended.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,12 +23,19 @@ public ResourceReferenceExtended() /// /// Initializes a new instance of the ResourceReferenceExtended class. /// - /// The resourceId of a resource managed by the - /// deployment stack. + + /// The resourceId of a resource managed by the deployment stack. + /// + + /// Common error response for all Azure Resource Manager APIs to return error + /// details for failed operations. (This also follows the OData error response + /// format.). + /// public ResourceReferenceExtended(string id = default(string), ErrorResponse error = default(ErrorResponse)) + { - Id = id; - Error = error; + this.Id = id; + this.Error = error; CustomInit(); } @@ -43,16 +44,19 @@ public ResourceReferenceExtended() /// partial void CustomInit(); + /// /// Gets the resourceId of a resource managed by the deployment stack. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; private set; } /// + /// Gets or sets common error response for all Azure Resource Manager APIs to + /// return error details for failed operations. (This also follows the OData + /// error response format.). /// - [JsonProperty(PropertyName = "error")] - public ErrorResponse Error { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "error")] + public ErrorResponse Error {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ResourceStatusMode.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ResourceStatusMode.cs similarity index 84% rename from src/Resources/Resources.Sdk/Generated/Models/ResourceStatusMode.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ResourceStatusMode.cs index 30684b16d74d..a8138b4490d1 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ResourceStatusMode.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ResourceStatusMode.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.Resources.Models /// /// Defines values for ResourceStatusMode. /// + + public static class ResourceStatusMode { /// @@ -25,8 +22,8 @@ public static class ResourceStatusMode /// public const string RemoveDenyFailed = "removeDenyFailed"; /// - /// Unable to delete the resource from Azure. The delete will be - /// retried on the next stack deployment, or can be deleted manually. + /// Unable to delete the resource from Azure. The delete will be retried on the + /// next stack deployment, or can be deleted manually. /// public const string DeleteFailed = "deleteFailed"; /// @@ -34,4 +31,4 @@ public static class ResourceStatusMode /// public const string None = "None"; } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ResourcesMoveInfo.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ResourcesMoveInfo.cs similarity index 62% rename from src/Resources/Resources.Sdk/Generated/Models/ResourcesMoveInfo.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ResourcesMoveInfo.cs index 0c095c68891d..ac305a6b5e9f 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ResourcesMoveInfo.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ResourcesMoveInfo.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,13 +23,17 @@ public ResourcesMoveInfo() /// /// Initializes a new instance of the ResourcesMoveInfo class. /// - /// The IDs of the resources. - /// The target resource - /// group. - public ResourcesMoveInfo(IList resources = default(IList), string targetResourceGroup = default(string)) + + /// The IDs of the resources. + /// + + /// The target resource group. + /// + public ResourcesMoveInfo(System.Collections.Generic.IList resources = default(System.Collections.Generic.IList), string targetResourceGroup = default(string)) + { - Resources = resources; - TargetResourceGroup = targetResourceGroup; + this.Resources = resources; + this.TargetResourceGroup = targetResourceGroup; CustomInit(); } @@ -46,17 +42,17 @@ public ResourcesMoveInfo() /// partial void CustomInit(); + /// /// Gets or sets the IDs of the resources. /// - [JsonProperty(PropertyName = "resources")] - public IList Resources { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resources")] + public System.Collections.Generic.IList Resources {get; set; } /// /// Gets or sets the target resource group. /// - [JsonProperty(PropertyName = "targetResourceGroup")] - public string TargetResourceGroup { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "targetResourceGroup")] + public string TargetResourceGroup {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/RoleDefinition.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/RoleDefinition.cs similarity index 58% rename from src/Resources/Resources.Sdk/Generated/Models/RoleDefinition.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/RoleDefinition.cs index 288eecc8f2dc..ceb08dffda70 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/RoleDefinition.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/RoleDefinition.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,18 +23,29 @@ public RoleDefinition() /// /// Initializes a new instance of the RoleDefinition class. /// - /// The role definition ID. - /// The role definition name. - /// If this is a service role. - /// Role definition permissions. - /// Role definition assignable scopes. - public RoleDefinition(string id = default(string), string name = default(string), bool? isServiceRole = default(bool?), IList permissions = default(IList), IList scopes = default(IList)) + + /// The role definition ID. + /// + + /// The role definition name. + /// + + /// If this is a service role. + /// + + /// Role definition permissions. + /// + + /// Role definition assignable scopes. + /// + public RoleDefinition(string id = default(string), string name = default(string), bool? isServiceRole = default(bool?), System.Collections.Generic.IList permissions = default(System.Collections.Generic.IList), System.Collections.Generic.IList scopes = default(System.Collections.Generic.IList)) + { - Id = id; - Name = name; - IsServiceRole = isServiceRole; - Permissions = permissions; - Scopes = scopes; + this.Id = id; + this.Name = name; + this.IsServiceRole = isServiceRole; + this.Permissions = permissions; + this.Scopes = scopes; CustomInit(); } @@ -51,35 +54,35 @@ public RoleDefinition() /// partial void CustomInit(); + /// /// Gets or sets the role definition ID. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; set; } /// /// Gets or sets the role definition name. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } /// /// Gets or sets if this is a service role. /// - [JsonProperty(PropertyName = "isServiceRole")] - public bool? IsServiceRole { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isServiceRole")] + public bool? IsServiceRole {get; set; } /// /// Gets or sets role definition permissions. /// - [JsonProperty(PropertyName = "permissions")] - public IList Permissions { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "permissions")] + public System.Collections.Generic.IList Permissions {get; set; } /// /// Gets or sets role definition assignable scopes. /// - [JsonProperty(PropertyName = "scopes")] - public IList Scopes { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "scopes")] + public System.Collections.Generic.IList Scopes {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ScopedDeployment.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ScopedDeployment.cs similarity index 55% rename from src/Resources/Resources.Sdk/Generated/Models/ScopedDeployment.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ScopedDeployment.cs index 85c4c3df1ed4..3e2c747acf4a 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ScopedDeployment.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ScopedDeployment.cs @@ -1,19 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,15 +23,21 @@ public ScopedDeployment() /// /// Initializes a new instance of the ScopedDeployment class. /// - /// The location to store the deployment - /// data. - /// The deployment properties. - /// Deployment tags - public ScopedDeployment(string location, DeploymentProperties properties, IDictionary tags = default(IDictionary)) + + /// The location to store the deployment data. + /// + + /// The deployment properties. + /// + + /// Deployment tags + /// + public ScopedDeployment(string location, DeploymentProperties properties, System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary)) + { - Location = location; - Properties = properties; - Tags = tags; + this.Location = location; + this.Properties = properties; + this.Tags = tags; CustomInit(); } @@ -49,44 +46,46 @@ public ScopedDeployment() /// partial void CustomInit(); + /// /// Gets or sets the location to store the deployment data. /// - [JsonProperty(PropertyName = "location")] - public string Location { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "location")] + public string Location {get; set; } /// /// Gets or sets the deployment properties. /// - [JsonProperty(PropertyName = "properties")] - public DeploymentProperties Properties { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public DeploymentProperties Properties {get; set; } /// /// Gets or sets deployment tags /// - [JsonProperty(PropertyName = "tags")] - public IDictionary Tags { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "tags")] + public System.Collections.Generic.IDictionary Tags {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Location == null) + if (this.Location == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Location"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Location"); } - if (Properties == null) + if (this.Properties == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Properties"); } - if (Properties != null) + + if (this.Properties != null) { - Properties.Validate(); + this.Properties.Validate(); } + } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ScopedDeploymentWhatIf.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ScopedDeploymentWhatIf.cs similarity index 63% rename from src/Resources/Resources.Sdk/Generated/Models/ScopedDeploymentWhatIf.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ScopedDeploymentWhatIf.cs index 07462fdb5014..5e393396a189 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ScopedDeploymentWhatIf.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ScopedDeploymentWhatIf.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -30,13 +23,17 @@ public ScopedDeploymentWhatIf() /// /// Initializes a new instance of the ScopedDeploymentWhatIf class. /// - /// The location to store the deployment - /// data. - /// The deployment properties. + + /// The location to store the deployment data. + /// + + /// The deployment properties. + /// public ScopedDeploymentWhatIf(string location, DeploymentWhatIfProperties properties) + { - Location = location; - Properties = properties; + this.Location = location; + this.Properties = properties; CustomInit(); } @@ -45,38 +42,39 @@ public ScopedDeploymentWhatIf(string location, DeploymentWhatIfProperties proper /// partial void CustomInit(); + /// /// Gets or sets the location to store the deployment data. /// - [JsonProperty(PropertyName = "location")] - public string Location { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "location")] + public string Location {get; set; } /// /// Gets or sets the deployment properties. /// - [JsonProperty(PropertyName = "properties")] - public DeploymentWhatIfProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public DeploymentWhatIfProperties Properties {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Location == null) + if (this.Location == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Location"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Location"); } - if (Properties == null) + if (this.Properties == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Properties"); } - if (Properties != null) + + if (this.Properties != null) { - Properties.Validate(); + this.Properties.Validate(); } } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ScriptLog.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ScriptLog.cs similarity index 70% rename from src/Resources/Resources.Sdk/Generated/Models/ScriptLog.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ScriptLog.cs index 764fc8b8e63d..c7167306f04e 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ScriptLog.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ScriptLog.cs @@ -1,24 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; using System.Linq; /// /// Script execution log object. /// - [Rest.Serialization.JsonTransformation] + [Microsoft.Rest.Serialization.JsonTransformation] public partial class ScriptLog : AzureResourceBase { /// @@ -32,15 +24,23 @@ public ScriptLog() /// /// Initializes a new instance of the ScriptLog class. /// - /// String Id used to locate any resource on - /// Azure. - /// Name of this resource. - /// Type of this resource. - /// Script execution logs in text format. + + /// String Id used to locate any resource on Azure. + /// + + /// Name of this resource. + /// + + /// Type of this resource. + /// + + /// Script execution logs in text format. + /// public ScriptLog(string id = default(string), string name = default(string), string type = default(string), string log = default(string)) - : base(id, name, type) + + : base(id, name, type) { - Log = log; + this.Log = log; CustomInit(); } @@ -49,11 +49,11 @@ public ScriptLog() /// partial void CustomInit(); + /// /// Gets script execution logs in text format. /// - [JsonProperty(PropertyName = "properties.log")] - public string Log { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.log")] + public string Log {get; private set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ScriptLogsList.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ScriptLogsList.cs similarity index 69% rename from src/Resources/Resources.Sdk/Generated/Models/ScriptLogsList.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ScriptLogsList.cs index 0626cbdca3b7..a29a1fe45b02 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ScriptLogsList.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ScriptLogsList.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,10 +23,13 @@ public ScriptLogsList() /// /// Initializes a new instance of the ScriptLogsList class. /// - /// Deployment scripts logs. - public ScriptLogsList(IList value = default(IList)) + + /// Deployment scripts logs. + /// + public ScriptLogsList(System.Collections.Generic.IList value = default(System.Collections.Generic.IList)) + { - Value = value; + this.Value = value; CustomInit(); } @@ -43,11 +38,11 @@ public ScriptLogsList() /// partial void CustomInit(); + /// /// Gets or sets deployment scripts logs. /// - [JsonProperty(PropertyName = "value")] - public IList Value { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "value")] + public System.Collections.Generic.IList Value {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ScriptProvisioningState.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ScriptProvisioningState.cs similarity index 88% rename from src/Resources/Resources.Sdk/Generated/Models/ScriptProvisioningState.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ScriptProvisioningState.cs index a95bb8b2af1a..450ce3219b5d 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ScriptProvisioningState.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ScriptProvisioningState.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.Resources.Models /// /// Defines values for ScriptProvisioningState. /// + + public static class ScriptProvisioningState { public const string Creating = "Creating"; @@ -23,4 +20,4 @@ public static class ScriptProvisioningState public const string Failed = "Failed"; public const string Canceled = "Canceled"; } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ScriptStatus.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ScriptStatus.cs similarity index 61% rename from src/Resources/Resources.Sdk/Generated/Models/ScriptStatus.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ScriptStatus.cs index a865808ec11a..17a03e7555c2 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ScriptStatus.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ScriptStatus.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,22 +23,33 @@ public ScriptStatus() /// /// Initializes a new instance of the ScriptStatus class. /// - /// ACI resource Id. - /// Storage account resource Id. - /// Start time of the script execution. - /// End time of the script execution. - /// Time the deployment script resource - /// will expire. - /// Error that is relayed from the script - /// execution. + + /// ACI resource Id. + /// + + /// Storage account resource Id. + /// + + /// Start time of the script execution. + /// + + /// End time of the script execution. + /// + + /// Time the deployment script resource will expire. + /// + + /// Error that is relayed from the script execution. + /// public ScriptStatus(string containerInstanceId = default(string), string storageAccountId = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), System.DateTime? expirationTime = default(System.DateTime?), ErrorResponse error = default(ErrorResponse)) + { - ContainerInstanceId = containerInstanceId; - StorageAccountId = storageAccountId; - StartTime = startTime; - EndTime = endTime; - ExpirationTime = expirationTime; - Error = error; + this.ContainerInstanceId = containerInstanceId; + this.StorageAccountId = storageAccountId; + this.StartTime = startTime; + this.EndTime = endTime; + this.ExpirationTime = expirationTime; + this.Error = error; CustomInit(); } @@ -53,41 +58,41 @@ public ScriptStatus() /// partial void CustomInit(); + /// - /// Gets ACI resource Id. + /// Gets aCI resource Id. /// - [JsonProperty(PropertyName = "containerInstanceId")] - public string ContainerInstanceId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "containerInstanceId")] + public string ContainerInstanceId {get; private set; } /// /// Gets storage account resource Id. /// - [JsonProperty(PropertyName = "storageAccountId")] - public string StorageAccountId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "storageAccountId")] + public string StorageAccountId {get; private set; } /// /// Gets start time of the script execution. /// - [JsonProperty(PropertyName = "startTime")] - public System.DateTime? StartTime { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "startTime")] + public System.DateTime? StartTime {get; private set; } /// /// Gets end time of the script execution. /// - [JsonProperty(PropertyName = "endTime")] - public System.DateTime? EndTime { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "endTime")] + public System.DateTime? EndTime {get; private set; } /// /// Gets time the deployment script resource will expire. /// - [JsonProperty(PropertyName = "expirationTime")] - public System.DateTime? ExpirationTime { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "expirationTime")] + public System.DateTime? ExpirationTime {get; private set; } /// /// Gets or sets error that is relayed from the script execution. /// - [JsonProperty(PropertyName = "error")] - public ErrorResponse Error { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "error")] + public ErrorResponse Error {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/Models/ScriptType.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ScriptType.cs new file mode 100644 index 000000000000..555c8366cbdf --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ScriptType.cs @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Resources.Models +{ + + /// + /// Defines values for ScriptType. + /// + + + public static class ScriptType + { + public const string AzurePowerShell = "AzurePowerShell"; + public const string AzureCLI = "AzureCLI"; + } +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/Sku.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/Sku.cs similarity index 56% rename from src/Resources/Resources.Sdk/Generated/Models/Sku.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/Sku.cs index eb2190ab218b..b8ccbef0a42f 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/Sku.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/Sku.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,20 +23,33 @@ public Sku() /// /// Initializes a new instance of the Sku class. /// - /// The SKU name. - /// The SKU tier. - /// The SKU size. - /// The SKU family. - /// The SKU model. - /// The SKU capacity. + + /// The SKU name. + /// + + /// The SKU tier. + /// + + /// The SKU size. + /// + + /// The SKU family. + /// + + /// The SKU model. + /// + + /// The SKU capacity. + /// public Sku(string name = default(string), string tier = default(string), string size = default(string), string family = default(string), string model = default(string), int? capacity = default(int?)) + { - Name = name; - Tier = tier; - Size = size; - Family = family; - Model = model; - Capacity = capacity; + this.Name = name; + this.Tier = tier; + this.Size = size; + this.Family = family; + this.Model = model; + this.Capacity = capacity; CustomInit(); } @@ -51,41 +58,41 @@ public Sku() /// partial void CustomInit(); + /// /// Gets or sets the SKU name. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } /// /// Gets or sets the SKU tier. /// - [JsonProperty(PropertyName = "tier")] - public string Tier { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tier")] + public string Tier {get; set; } /// /// Gets or sets the SKU size. /// - [JsonProperty(PropertyName = "size")] - public string Size { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "size")] + public string Size {get; set; } /// /// Gets or sets the SKU family. /// - [JsonProperty(PropertyName = "family")] - public string Family { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "family")] + public string Family {get; set; } /// /// Gets or sets the SKU model. /// - [JsonProperty(PropertyName = "model")] - public string Model { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "model")] + public string Model {get; set; } /// /// Gets or sets the SKU capacity. /// - [JsonProperty(PropertyName = "capacity")] - public int? Capacity { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "capacity")] + public int? Capacity {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/spendingLimit.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/SpendingLimit.cs similarity index 79% rename from src/Resources/Resources.Sdk/Generated/Models/spendingLimit.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/SpendingLimit.cs index 63832fad471f..871d4cb65981 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/spendingLimit.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/SpendingLimit.cs @@ -1,31 +1,24 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; /// /// Defines values for SpendingLimit. /// - [JsonConverter(typeof(StringEnumConverter))] + + + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public enum SpendingLimit { - [EnumMember(Value = "On")] + [System.Runtime.Serialization.EnumMember(Value = "On")] On, - [EnumMember(Value = "Off")] + [System.Runtime.Serialization.EnumMember(Value = "Off")] Off, - [EnumMember(Value = "CurrentPeriodOff")] + [System.Runtime.Serialization.EnumMember(Value = "CurrentPeriodOff")] CurrentPeriodOff } internal static class SpendingLimitEnumExtension @@ -34,7 +27,6 @@ internal static string ToSerializedValue(this SpendingLimit? value) { return value == null ? null : ((SpendingLimit)value).ToSerializedValue(); } - internal static string ToSerializedValue(this SpendingLimit value) { switch( value ) @@ -48,7 +40,6 @@ internal static string ToSerializedValue(this SpendingLimit value) } return null; } - internal static SpendingLimit? ParseSpendingLimit(this string value) { switch( value ) @@ -63,4 +54,4 @@ internal static string ToSerializedValue(this SpendingLimit value) return null; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/StatusMessage.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/StatusMessage.cs similarity index 78% rename from src/Resources/Resources.Sdk/Generated/Models/StatusMessage.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/StatusMessage.cs index ade05a8230a5..1acf501237c5 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/StatusMessage.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/StatusMessage.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,12 +23,17 @@ public StatusMessage() /// /// Initializes a new instance of the StatusMessage class. /// - /// Status of the deployment operation. - /// The error reported by the operation. + + /// Status of the deployment operation. + /// + + /// The error reported by the operation. + /// public StatusMessage(string status = default(string), ErrorResponse error = default(ErrorResponse)) + { - Status = status; - Error = error; + this.Status = status; + this.Error = error; CustomInit(); } @@ -43,17 +42,17 @@ public StatusMessage() /// partial void CustomInit(); + /// /// Gets or sets status of the deployment operation. /// - [JsonProperty(PropertyName = "status")] - public string Status { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public string Status {get; set; } /// /// Gets or sets the error reported by the operation. /// - [JsonProperty(PropertyName = "error")] - public ErrorResponse Error { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "error")] + public ErrorResponse Error {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/StorageAccountConfiguration.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/StorageAccountConfiguration.cs similarity index 70% rename from src/Resources/Resources.Sdk/Generated/Models/StorageAccountConfiguration.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/StorageAccountConfiguration.cs index 0a24bf927f1c..573f7f21cbcf 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/StorageAccountConfiguration.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/StorageAccountConfiguration.cs @@ -1,27 +1,20 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// - /// Settings to use an existing storage account. Valid storage account - /// kinds are: Storage, StorageV2 and FileStorage + /// Settings to use an existing storage account. Valid storage account kinds + /// are: Storage, StorageV2 and FileStorage /// public partial class StorageAccountConfiguration { /// - /// Initializes a new instance of the StorageAccountConfiguration - /// class. + /// Initializes a new instance of the StorageAccountConfiguration class. /// public StorageAccountConfiguration() { @@ -29,16 +22,19 @@ public StorageAccountConfiguration() } /// - /// Initializes a new instance of the StorageAccountConfiguration - /// class. + /// Initializes a new instance of the StorageAccountConfiguration class. /// - /// The storage account name. - /// The storage account access - /// key. + + /// The storage account name. + /// + + /// The storage account access key. + /// public StorageAccountConfiguration(string storageAccountName = default(string), string storageAccountKey = default(string)) + { - StorageAccountName = storageAccountName; - StorageAccountKey = storageAccountKey; + this.StorageAccountName = storageAccountName; + this.StorageAccountKey = storageAccountKey; CustomInit(); } @@ -47,17 +43,17 @@ public StorageAccountConfiguration() /// partial void CustomInit(); + /// /// Gets or sets the storage account name. /// - [JsonProperty(PropertyName = "storageAccountName")] - public string StorageAccountName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "storageAccountName")] + public string StorageAccountName {get; set; } /// /// Gets or sets the storage account access key. /// - [JsonProperty(PropertyName = "storageAccountKey")] - public string StorageAccountKey { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "storageAccountKey")] + public string StorageAccountKey {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/SubResource.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/SubResource.cs similarity index 72% rename from src/Resources/Resources.Sdk/Generated/Models/SubResource.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/SubResource.cs index 29132ad19264..179f96e4f38d 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/SubResource.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/SubResource.cs @@ -1,24 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Newtonsoft.Json; using System.Linq; /// /// Sub-resource. /// - public partial class SubResource : IResource + public partial class SubResource : Microsoft.Rest.Azure.IResource { /// /// Initializes a new instance of the SubResource class. @@ -31,10 +23,13 @@ public SubResource() /// /// Initializes a new instance of the SubResource class. /// - /// Resource ID + + /// Resource ID + /// public SubResource(string id = default(string)) + { - Id = id; + this.Id = id; CustomInit(); } @@ -43,11 +38,11 @@ public SubResource() /// partial void CustomInit(); + /// /// Gets or sets resource ID /// - [JsonProperty(PropertyName = "id")] - public string Id { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/Models/Subscription.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/Subscription.cs new file mode 100644 index 000000000000..08259033bc5e --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/Subscription.cs @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Resources.Models +{ + using System.Linq; + + /// + /// Subscription information. + /// + public partial class Subscription + { + /// + /// Initializes a new instance of the Subscription class. + /// + public Subscription() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Subscription class. + /// + + /// The fully qualified ID for the subscription. For example, + /// /subscriptions/00000000-0000-0000-0000-000000000000. + /// + + /// The subscription ID. + /// + + /// The subscription display name. + /// + + /// The subscription tenant ID. + /// + + /// The subscription state. Possible values are Enabled, Warned, PastDue, + /// Disabled, and Deleted. + /// Possible values include: 'Enabled', 'Warned', 'PastDue', 'Disabled', + /// 'Deleted' + + /// The subscription policies. + /// + + /// The authorization source of the request. Valid values are one or more + /// combinations of Legacy, RoleBased, Bypassed, Direct and Management. For + /// example, 'Legacy, RoleBased'. + /// + + /// An array containing the tenants managing the subscription. + /// + + /// The tags attached to the subscription. + /// + public Subscription(string id = default(string), string subscriptionId = default(string), string displayName = default(string), string tenantId = default(string), SubscriptionState? state = default(SubscriptionState?), SubscriptionPolicies subscriptionPolicies = default(SubscriptionPolicies), string authorizationSource = default(string), System.Collections.Generic.IList managedByTenants = default(System.Collections.Generic.IList), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary)) + + { + this.Id = id; + this.SubscriptionId = subscriptionId; + this.DisplayName = displayName; + this.TenantId = tenantId; + this.State = state; + this.SubscriptionPolicies = subscriptionPolicies; + this.AuthorizationSource = authorizationSource; + this.ManagedByTenants = managedByTenants; + this.Tags = tags; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets the fully qualified ID for the subscription. For example, + /// /subscriptions/00000000-0000-0000-0000-000000000000. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; private set; } + + /// + /// Gets the subscription ID. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "subscriptionId")] + public string SubscriptionId {get; private set; } + + /// + /// Gets the subscription display name. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "displayName")] + public string DisplayName {get; private set; } + + /// + /// Gets the subscription tenant ID. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "tenantId")] + public string TenantId {get; private set; } + + /// + /// Gets the subscription state. Possible values are Enabled, Warned, PastDue, + /// Disabled, and Deleted. Possible values include: 'Enabled', 'Warned', 'PastDue', 'Disabled', 'Deleted' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "state")] + public SubscriptionState? State {get; private set; } + + /// + /// Gets or sets the subscription policies. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "subscriptionPolicies")] + public SubscriptionPolicies SubscriptionPolicies {get; set; } + + /// + /// Gets or sets the authorization source of the request. Valid values are one + /// or more combinations of Legacy, RoleBased, Bypassed, Direct and Management. + /// For example, 'Legacy, RoleBased'. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "authorizationSource")] + public string AuthorizationSource {get; set; } + + /// + /// Gets or sets an array containing the tenants managing the subscription. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "managedByTenants")] + public System.Collections.Generic.IList ManagedByTenants {get; set; } + + /// + /// Gets or sets the tags attached to the subscription. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "tags")] + public System.Collections.Generic.IDictionary Tags {get; set; } + } +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/SubscriptionFeatureRegistration.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/SubscriptionFeatureRegistration.cs similarity index 69% rename from src/Resources/Resources.Sdk/Generated/Models/SubscriptionFeatureRegistration.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/SubscriptionFeatureRegistration.cs index aade1d4e50fd..be682a0a1196 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/SubscriptionFeatureRegistration.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/SubscriptionFeatureRegistration.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.Resources.Models public partial class SubscriptionFeatureRegistration : ProxyResource { /// - /// Initializes a new instance of the SubscriptionFeatureRegistration - /// class. + /// Initializes a new instance of the SubscriptionFeatureRegistration class. /// public SubscriptionFeatureRegistration() { @@ -28,16 +21,25 @@ public SubscriptionFeatureRegistration() } /// - /// Initializes a new instance of the SubscriptionFeatureRegistration - /// class. + /// Initializes a new instance of the SubscriptionFeatureRegistration class. /// - /// Azure resource Id. - /// Azure resource name. - /// Azure resource type. + + /// Azure resource Id. + /// + + /// Azure resource name. + /// + + /// Azure resource type. + /// + + /// + /// public SubscriptionFeatureRegistration(string id = default(string), string name = default(string), string type = default(string), SubscriptionFeatureRegistrationProperties properties = default(SubscriptionFeatureRegistrationProperties)) - : base(id, name, type) + + : base(id, name, type) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -46,23 +48,24 @@ public SubscriptionFeatureRegistration() /// partial void CustomInit(); + /// + /// Gets or sets /// - [JsonProperty(PropertyName = "properties")] - public SubscriptionFeatureRegistrationProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public SubscriptionFeatureRegistrationProperties Properties {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Properties != null) + if (this.Properties != null) { - Properties.Validate(); + this.Properties.Validate(); } } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/SubscriptionFeatureRegistrationApprovalType.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/SubscriptionFeatureRegistrationApprovalType.cs similarity index 86% rename from src/Resources/Resources.Sdk/Generated/Models/SubscriptionFeatureRegistrationApprovalType.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/SubscriptionFeatureRegistrationApprovalType.cs index 80de797cc43f..ecdaa0eaa985 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/SubscriptionFeatureRegistrationApprovalType.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/SubscriptionFeatureRegistrationApprovalType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.Resources.Models /// /// Defines values for SubscriptionFeatureRegistrationApprovalType. /// + + public static class SubscriptionFeatureRegistrationApprovalType { public const string NotSpecified = "NotSpecified"; public const string ApprovalRequired = "ApprovalRequired"; public const string AutoApproval = "AutoApproval"; } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/Models/SubscriptionFeatureRegistrationProperties.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/SubscriptionFeatureRegistrationProperties.cs new file mode 100644 index 000000000000..f3165b8195a7 --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/SubscriptionFeatureRegistrationProperties.cs @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Resources.Models +{ + using System.Linq; + + public partial class SubscriptionFeatureRegistrationProperties + { + /// + /// Initializes a new instance of the SubscriptionFeatureRegistrationProperties class. + /// + public SubscriptionFeatureRegistrationProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SubscriptionFeatureRegistrationProperties class. + /// + + /// The tenantId. + /// + + /// The subscriptionId. + /// + + /// The featureName. + /// + + /// The featureDisplayName. + /// + + /// The providerNamespace. + /// + + /// The state. + /// Possible values include: 'NotSpecified', 'NotRegistered', 'Pending', + /// 'Registering', 'Registered', 'Unregistering', 'Unregistered' + + /// Authorization Profile + /// + + /// Key-value pairs for meta data. + /// + + /// The feature release date. + /// + + /// The feature registration date. + /// + + /// The feature documentation link. + /// + + /// The feature approval type. + /// Possible values include: 'NotSpecified', 'ApprovalRequired', 'AutoApproval' + + /// Indicates whether feature should be displayed in Portal. + /// + + /// The feature description. + /// + public SubscriptionFeatureRegistrationProperties(string tenantId = default(string), string subscriptionId = default(string), string featureName = default(string), string displayName = default(string), string providerNamespace = default(string), string state = default(string), AuthorizationProfile authorizationProfile = default(AuthorizationProfile), System.Collections.Generic.IDictionary metadata = default(System.Collections.Generic.IDictionary), System.DateTime? releaseDate = default(System.DateTime?), System.DateTime? registrationDate = default(System.DateTime?), string documentationLink = default(string), string approvalType = default(string), bool? shouldFeatureDisplayInPortal = default(bool?), string description = default(string)) + + { + this.TenantId = tenantId; + this.SubscriptionId = subscriptionId; + this.FeatureName = featureName; + this.DisplayName = displayName; + this.ProviderNamespace = providerNamespace; + this.State = state; + this.AuthorizationProfile = authorizationProfile; + this.Metadata = metadata; + this.ReleaseDate = releaseDate; + this.RegistrationDate = registrationDate; + this.DocumentationLink = documentationLink; + this.ApprovalType = approvalType; + this.ShouldFeatureDisplayInPortal = shouldFeatureDisplayInPortal; + this.Description = description; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets the tenantId. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "tenantId")] + public string TenantId {get; private set; } + + /// + /// Gets the subscriptionId. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "subscriptionId")] + public string SubscriptionId {get; private set; } + + /// + /// Gets the featureName. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "featureName")] + public string FeatureName {get; private set; } + + /// + /// Gets the featureDisplayName. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "displayName")] + public string DisplayName {get; private set; } + + /// + /// Gets the providerNamespace. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "providerNamespace")] + public string ProviderNamespace {get; private set; } + + /// + /// Gets or sets the state. Possible values include: 'NotSpecified', 'NotRegistered', 'Pending', 'Registering', 'Registered', 'Unregistering', 'Unregistered' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "state")] + public string State {get; set; } + + /// + /// Gets or sets authorization Profile + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "authorizationProfile")] + public AuthorizationProfile AuthorizationProfile {get; set; } + + /// + /// Gets or sets key-value pairs for meta data. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "metadata")] + public System.Collections.Generic.IDictionary Metadata {get; set; } + + /// + /// Gets the feature release date. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "releaseDate")] + public System.DateTime? ReleaseDate {get; private set; } + + /// + /// Gets the feature registration date. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "registrationDate")] + public System.DateTime? RegistrationDate {get; private set; } + + /// + /// Gets the feature documentation link. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "documentationLink")] + public string DocumentationLink {get; private set; } + + /// + /// Gets the feature approval type. Possible values include: 'NotSpecified', 'ApprovalRequired', 'AutoApproval' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "approvalType")] + public string ApprovalType {get; private set; } + + /// + /// Gets or sets indicates whether feature should be displayed in Portal. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "shouldFeatureDisplayInPortal")] + public bool? ShouldFeatureDisplayInPortal {get; set; } + + /// + /// Gets or sets the feature description. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "description")] + public string Description {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + + + + + + + + + if (this.DocumentationLink != null) + { + if (this.DocumentationLink.Length > 1000) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "DocumentationLink", 1000); + } + } + + if (this.Description != null) + { + if (this.Description.Length > 1000) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "Description", 1000); + } + } + } + } +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/SubscriptionFeatureRegistrationState.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/SubscriptionFeatureRegistrationState.cs similarity index 89% rename from src/Resources/Resources.Sdk/Generated/Models/SubscriptionFeatureRegistrationState.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/SubscriptionFeatureRegistrationState.cs index de45586cf429..b8ab470038bc 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/SubscriptionFeatureRegistrationState.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/SubscriptionFeatureRegistrationState.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.Resources.Models /// /// Defines values for SubscriptionFeatureRegistrationState. /// + + public static class SubscriptionFeatureRegistrationState { public const string NotSpecified = "NotSpecified"; @@ -24,4 +21,4 @@ public static class SubscriptionFeatureRegistrationState public const string Unregistering = "Unregistering"; public const string Unregistered = "Unregistered"; } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/SubscriptionPolicies.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/SubscriptionPolicies.cs similarity index 55% rename from src/Resources/Resources.Sdk/Generated/Models/SubscriptionPolicies.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/SubscriptionPolicies.cs index 67e5f0400ea7..ac82df33b1ed 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/SubscriptionPolicies.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/SubscriptionPolicies.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,18 +23,23 @@ public SubscriptionPolicies() /// /// Initializes a new instance of the SubscriptionPolicies class. /// - /// The subscription location - /// placement ID. The ID indicates which regions are visible for a - /// subscription. For example, a subscription with a location placement - /// Id of Public_2014-09-01 has access to Azure public regions. - /// The subscription quota ID. + + /// The subscription location placement ID. The ID indicates which regions are + /// visible for a subscription. For example, a subscription with a location + /// placement Id of Public_2014-09-01 has access to Azure public regions. + /// + + /// The subscription quota ID. + /// + /// The subscription spending limit. - /// Possible values include: 'On', 'Off', 'CurrentPeriodOff' + /// Possible values include: 'On', 'Off', 'CurrentPeriodOff' public SubscriptionPolicies(string locationPlacementId = default(string), string quotaId = default(string), SpendingLimit? spendingLimit = default(SpendingLimit?)) + { - LocationPlacementId = locationPlacementId; - QuotaId = quotaId; - SpendingLimit = spendingLimit; + this.LocationPlacementId = locationPlacementId; + this.QuotaId = quotaId; + this.SpendingLimit = spendingLimit; CustomInit(); } @@ -49,27 +48,25 @@ public SubscriptionPolicies() /// partial void CustomInit(); + /// - /// Gets the subscription location placement ID. The ID indicates which - /// regions are visible for a subscription. For example, a subscription - /// with a location placement Id of Public_2014-09-01 has access to - /// Azure public regions. + /// Gets the subscription location placement ID. The ID indicates which regions + /// are visible for a subscription. For example, a subscription with a location + /// placement Id of Public_2014-09-01 has access to Azure public regions. /// - [JsonProperty(PropertyName = "locationPlacementId")] - public string LocationPlacementId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "locationPlacementId")] + public string LocationPlacementId {get; private set; } /// /// Gets the subscription quota ID. /// - [JsonProperty(PropertyName = "quotaId")] - public string QuotaId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "quotaId")] + public string QuotaId {get; private set; } /// - /// Gets the subscription spending limit. Possible values include: - /// 'On', 'Off', 'CurrentPeriodOff' + /// Gets the subscription spending limit. Possible values include: 'On', 'Off', 'CurrentPeriodOff' /// - [JsonProperty(PropertyName = "spendingLimit")] - public SpendingLimit? SpendingLimit { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "spendingLimit")] + public SpendingLimit? SpendingLimit {get; private set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/SubscriptionState.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/SubscriptionState.cs similarity index 80% rename from src/Resources/Resources.Sdk/Generated/Models/SubscriptionState.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/SubscriptionState.cs index 8538abe29cdb..9c56957d3289 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/SubscriptionState.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/SubscriptionState.cs @@ -1,35 +1,28 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; /// /// Defines values for SubscriptionState. /// - [JsonConverter(typeof(StringEnumConverter))] + + + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public enum SubscriptionState { - [EnumMember(Value = "Enabled")] + [System.Runtime.Serialization.EnumMember(Value = "Enabled")] Enabled, - [EnumMember(Value = "Warned")] + [System.Runtime.Serialization.EnumMember(Value = "Warned")] Warned, - [EnumMember(Value = "PastDue")] + [System.Runtime.Serialization.EnumMember(Value = "PastDue")] PastDue, - [EnumMember(Value = "Disabled")] + [System.Runtime.Serialization.EnumMember(Value = "Disabled")] Disabled, - [EnumMember(Value = "Deleted")] + [System.Runtime.Serialization.EnumMember(Value = "Deleted")] Deleted } internal static class SubscriptionStateEnumExtension @@ -38,7 +31,6 @@ internal static string ToSerializedValue(this SubscriptionState? value) { return value == null ? null : ((SubscriptionState)value).ToSerializedValue(); } - internal static string ToSerializedValue(this SubscriptionState value) { switch( value ) @@ -56,7 +48,6 @@ internal static string ToSerializedValue(this SubscriptionState value) } return null; } - internal static SubscriptionState? ParseSubscriptionState(this string value) { switch( value ) @@ -75,4 +66,4 @@ internal static string ToSerializedValue(this SubscriptionState value) return null; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/SystemData.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/SystemData.cs similarity index 57% rename from src/Resources/Resources.Sdk/Generated/Models/SystemData.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/SystemData.cs index 29deca79cb0a..e9df26dbad30 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/SystemData.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/SystemData.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,28 +23,33 @@ public SystemData() /// /// Initializes a new instance of the SystemData class. /// - /// The identity that created the - /// resource. - /// The type of identity that created the - /// resource. Possible values include: 'User', 'Application', - /// 'ManagedIdentity', 'Key' - /// The timestamp of resource creation - /// (UTC). - /// The identity that last modified the - /// resource. - /// The type of identity that last - /// modified the resource. Possible values include: 'User', - /// 'Application', 'ManagedIdentity', 'Key' - /// The timestamp of resource last - /// modification (UTC) + + /// The identity that created the resource. + /// + + /// The type of identity that created the resource. + /// Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + + /// The timestamp of resource creation (UTC). + /// + + /// The identity that last modified the resource. + /// + + /// The type of identity that last modified the resource. + /// Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + + /// The timestamp of resource last modification (UTC) + /// public SystemData(string createdBy = default(string), string createdByType = default(string), System.DateTime? createdAt = default(System.DateTime?), string lastModifiedBy = default(string), string lastModifiedByType = default(string), System.DateTime? lastModifiedAt = default(System.DateTime?)) + { - CreatedBy = createdBy; - CreatedByType = createdByType; - CreatedAt = createdAt; - LastModifiedBy = lastModifiedBy; - LastModifiedByType = lastModifiedByType; - LastModifiedAt = lastModifiedAt; + this.CreatedBy = createdBy; + this.CreatedByType = createdByType; + this.CreatedAt = createdAt; + this.LastModifiedBy = lastModifiedBy; + this.LastModifiedByType = lastModifiedByType; + this.LastModifiedAt = lastModifiedAt; CustomInit(); } @@ -59,45 +58,41 @@ public SystemData() /// partial void CustomInit(); + /// /// Gets or sets the identity that created the resource. /// - [JsonProperty(PropertyName = "createdBy")] - public string CreatedBy { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "createdBy")] + public string CreatedBy {get; set; } /// - /// Gets or sets the type of identity that created the resource. - /// Possible values include: 'User', 'Application', 'ManagedIdentity', - /// 'Key' + /// Gets or sets the type of identity that created the resource. Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' /// - [JsonProperty(PropertyName = "createdByType")] - public string CreatedByType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "createdByType")] + public string CreatedByType {get; set; } /// /// Gets or sets the timestamp of resource creation (UTC). /// - [JsonProperty(PropertyName = "createdAt")] - public System.DateTime? CreatedAt { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "createdAt")] + public System.DateTime? CreatedAt {get; set; } /// /// Gets or sets the identity that last modified the resource. /// - [JsonProperty(PropertyName = "lastModifiedBy")] - public string LastModifiedBy { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastModifiedBy")] + public string LastModifiedBy {get; set; } /// - /// Gets or sets the type of identity that last modified the resource. - /// Possible values include: 'User', 'Application', 'ManagedIdentity', - /// 'Key' + /// Gets or sets the type of identity that last modified the resource. Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' /// - [JsonProperty(PropertyName = "lastModifiedByType")] - public string LastModifiedByType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastModifiedByType")] + public string LastModifiedByType {get; set; } /// /// Gets or sets the timestamp of resource last modification (UTC) /// - [JsonProperty(PropertyName = "lastModifiedAt")] - public System.DateTime? LastModifiedAt { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "lastModifiedAt")] + public System.DateTime? LastModifiedAt {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/TagCount.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/TagCount.cs similarity index 71% rename from src/Resources/Resources.Sdk/Generated/Models/TagCount.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/TagCount.cs index 19335dd0108f..6c613019e0ef 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/TagCount.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/TagCount.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,12 +23,17 @@ public TagCount() /// /// Initializes a new instance of the TagCount class. /// - /// Type of count. - /// Value of count. + + /// Type of count. + /// + + /// Value of count. + /// public TagCount(string type = default(string), int? value = default(int?)) + { - Type = type; - Value = value; + this.Type = type; + this.Value = value; CustomInit(); } @@ -43,17 +42,17 @@ public TagCount() /// partial void CustomInit(); + /// /// Gets or sets type of count. /// - [JsonProperty(PropertyName = "type")] - public string Type { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; set; } /// /// Gets or sets value of count. /// - [JsonProperty(PropertyName = "value")] - public int? Value { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "value")] + public int? Value {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/TagDetails.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/TagDetails.cs similarity index 51% rename from src/Resources/Resources.Sdk/Generated/Models/TagDetails.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/TagDetails.cs index f4508512e44e..3e4ee9bfde5d 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/TagDetails.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/TagDetails.cs @@ -1,26 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// /// Tag details. /// - public partial class TagDetails : IResource + public partial class TagDetails : Microsoft.Rest.Azure.IResource { /// /// Initializes a new instance of the TagDetails class. @@ -33,18 +23,26 @@ public TagDetails() /// /// Initializes a new instance of the TagDetails class. /// - /// The tag name ID. - /// The tag name. - /// The total number of resources that use the - /// resource tag. When a tag is initially created and has no associated - /// resources, the value is 0. - /// The list of tag values. - public TagDetails(string id = default(string), string tagName = default(string), TagCount count = default(TagCount), IList values = default(IList)) + + /// The tag name ID. + /// + + /// The tag name. + /// + + /// The total number of resources that use the resource tag. When a tag is + /// initially created and has no associated resources, the value is 0. + /// + + /// The list of tag values. + /// + public TagDetails(string id = default(string), string tagName = default(string), TagCount count = default(TagCount), System.Collections.Generic.IList values = default(System.Collections.Generic.IList)) + { - Id = id; - TagName = tagName; - Count = count; - Values = values; + this.Id = id; + this.TagName = tagName; + this.Count = count; + this.Values = values; CustomInit(); } @@ -53,31 +51,30 @@ public TagDetails() /// partial void CustomInit(); + /// /// Gets the tag name ID. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; private set; } /// /// Gets or sets the tag name. /// - [JsonProperty(PropertyName = "tagName")] - public string TagName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tagName")] + public string TagName {get; set; } /// - /// Gets or sets the total number of resources that use the resource - /// tag. When a tag is initially created and has no associated - /// resources, the value is 0. + /// Gets or sets the total number of resources that use the resource tag. When + /// a tag is initially created and has no associated resources, the value is 0. /// - [JsonProperty(PropertyName = "count")] - public TagCount Count { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "count")] + public TagCount Count {get; set; } /// /// Gets or sets the list of tag values. /// - [JsonProperty(PropertyName = "values")] - public IList Values { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "values")] + public System.Collections.Generic.IList Values {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/TagValue.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/TagValue.cs similarity index 61% rename from src/Resources/Resources.Sdk/Generated/Models/TagValue.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/TagValue.cs index 7ac6158c91e9..1df144be86a5 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/TagValue.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/TagValue.cs @@ -1,24 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Newtonsoft.Json; using System.Linq; /// /// Tag information. /// - public partial class TagValue : IResource + public partial class TagValue : Microsoft.Rest.Azure.IResource { /// /// Initializes a new instance of the TagValue class. @@ -31,14 +23,21 @@ public TagValue() /// /// Initializes a new instance of the TagValue class. /// - /// The tag value ID. - /// The tag value. - /// The tag value count. + + /// The tag value ID. + /// + + /// The tag value. + /// + + /// The tag value count. + /// public TagValue(string id = default(string), string tagValueProperty = default(string), TagCount count = default(TagCount)) + { - Id = id; - TagValueProperty = tagValueProperty; - Count = count; + this.Id = id; + this.TagValueProperty = tagValueProperty; + this.Count = count; CustomInit(); } @@ -47,23 +46,23 @@ public TagValue() /// partial void CustomInit(); + /// /// Gets the tag value ID. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; private set; } /// /// Gets or sets the tag value. /// - [JsonProperty(PropertyName = "tagValue")] - public string TagValueProperty { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tagValue")] + public string TagValueProperty {get; set; } /// /// Gets or sets the tag value count. /// - [JsonProperty(PropertyName = "count")] - public TagCount Count { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "count")] + public TagCount Count {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/Tags.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/Tags.cs similarity index 64% rename from src/Resources/Resources.Sdk/Generated/Models/Tags.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/Tags.cs index 08a4e5de157b..34cfab1e082d 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/Tags.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/Tags.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,9 +23,13 @@ public Tags() /// /// Initializes a new instance of the Tags class. /// - public Tags(IDictionary tagsProperty = default(IDictionary)) + + /// Dictionary of <string> + /// + public Tags(System.Collections.Generic.IDictionary tagsProperty = default(System.Collections.Generic.IDictionary)) + { - TagsProperty = tagsProperty; + this.TagsProperty = tagsProperty; CustomInit(); } @@ -42,10 +38,11 @@ public Tags() /// partial void CustomInit(); + /// + /// Gets or sets dictionary of <string> /// - [JsonProperty(PropertyName = "tags")] - public IDictionary TagsProperty { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "tags")] + public System.Collections.Generic.IDictionary TagsProperty {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/TagsPatchOperation.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/TagsPatchOperation.cs similarity index 61% rename from src/Resources/Resources.Sdk/Generated/Models/TagsPatchOperation.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/TagsPatchOperation.cs index b006fa06dc76..13e3514eaad8 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/TagsPatchOperation.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/TagsPatchOperation.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { @@ -14,22 +9,24 @@ namespace Microsoft.Azure.Management.Resources.Models /// /// Defines values for TagsPatchOperation. /// + + public static class TagsPatchOperation { /// - /// The 'replace' option replaces the entire set of existing tags with - /// a new set. + /// The 'replace' option replaces the entire set of existing tags with a new + /// set. /// public const string Replace = "Replace"; /// - /// The 'merge' option allows adding tags with new names and updating - /// the values of tags with existing names. + /// The 'merge' option allows adding tags with new names and updating the + /// values of tags with existing names. /// public const string Merge = "Merge"; /// - /// The 'delete' option allows selectively deleting tags based on given - /// names or name/value pairs. + /// The 'delete' option allows selectively deleting tags based on given names + /// or name/value pairs. /// public const string Delete = "Delete"; } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/TagsPatchResource.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/TagsPatchResource.cs similarity index 69% rename from src/Resources/Resources.Sdk/Generated/Models/TagsPatchResource.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/TagsPatchResource.cs index 6f986ea33358..ac5e2db75dc6 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/TagsPatchResource.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/TagsPatchResource.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,13 +23,17 @@ public TagsPatchResource() /// /// Initializes a new instance of the TagsPatchResource class. /// + /// The operation type for the patch API. - /// Possible values include: 'Replace', 'Merge', 'Delete' - /// The set of tags. + /// Possible values include: 'Replace', 'Merge', 'Delete' + + /// The set of tags. + /// public TagsPatchResource(string operation = default(string), Tags properties = default(Tags)) + { - Operation = operation; - Properties = properties; + this.Operation = operation; + this.Properties = properties; CustomInit(); } @@ -44,18 +42,17 @@ public TagsPatchResource() /// partial void CustomInit(); + /// - /// Gets or sets the operation type for the patch API. Possible values - /// include: 'Replace', 'Merge', 'Delete' + /// Gets or sets the operation type for the patch API. Possible values include: 'Replace', 'Merge', 'Delete' /// - [JsonProperty(PropertyName = "operation")] - public string Operation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "operation")] + public string Operation {get; set; } /// /// Gets or sets the set of tags. /// - [JsonProperty(PropertyName = "properties")] - public Tags Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public Tags Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/TagsResource.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/TagsResource.cs similarity index 63% rename from src/Resources/Resources.Sdk/Generated/Models/TagsResource.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/TagsResource.cs index 353b790824fa..c5aa4bc916a3 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/TagsResource.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/TagsResource.cs @@ -1,24 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Newtonsoft.Json; using System.Linq; /// /// Wrapper resource for tags API requests and responses. /// - public partial class TagsResource : IResource + public partial class TagsResource : Microsoft.Rest.Azure.IResource { /// /// Initializes a new instance of the TagsResource class. @@ -31,16 +23,25 @@ public TagsResource() /// /// Initializes a new instance of the TagsResource class. /// - /// The set of tags. - /// The ID of the tags wrapper resource. - /// The name of the tags wrapper resource. - /// The type of the tags wrapper resource. + + /// The ID of the tags wrapper resource. + /// + + /// The name of the tags wrapper resource. + /// + + /// The type of the tags wrapper resource. + /// + + /// The set of tags. + /// public TagsResource(Tags properties, string id = default(string), string name = default(string), string type = default(string)) + { - Id = id; - Name = name; - Type = type; - Properties = properties; + this.Id = id; + this.Name = name; + this.Type = type; + this.Properties = properties; CustomInit(); } @@ -49,42 +50,46 @@ public TagsResource() /// partial void CustomInit(); + /// /// Gets the ID of the tags wrapper resource. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; private set; } /// /// Gets the name of the tags wrapper resource. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; private set; } /// /// Gets the type of the tags wrapper resource. /// - [JsonProperty(PropertyName = "type")] - public string Type { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; private set; } /// /// Gets or sets the set of tags. /// - [JsonProperty(PropertyName = "properties")] - public Tags Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public Tags Properties {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Properties == null) + if (this.Properties == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Properties"); } + + + + } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/TargetResource.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/TargetResource.cs similarity index 70% rename from src/Resources/Resources.Sdk/Generated/Models/TargetResource.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/TargetResource.cs index a1b3e6e165a8..1cacb9a124e7 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/TargetResource.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/TargetResource.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,14 +23,21 @@ public TargetResource() /// /// Initializes a new instance of the TargetResource class. /// - /// The ID of the resource. - /// The name of the resource. - /// The type of the resource. + + /// The ID of the resource. + /// + + /// The name of the resource. + /// + + /// The type of the resource. + /// public TargetResource(string id = default(string), string resourceName = default(string), string resourceType = default(string)) + { - Id = id; - ResourceName = resourceName; - ResourceType = resourceType; + this.Id = id; + this.ResourceName = resourceName; + this.ResourceType = resourceType; CustomInit(); } @@ -45,23 +46,23 @@ public TargetResource() /// partial void CustomInit(); + /// /// Gets or sets the ID of the resource. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; set; } /// /// Gets or sets the name of the resource. /// - [JsonProperty(PropertyName = "resourceName")] - public string ResourceName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resourceName")] + public string ResourceName {get; set; } /// /// Gets or sets the type of the resource. /// - [JsonProperty(PropertyName = "resourceType")] - public string ResourceType { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "resourceType")] + public string ResourceType {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/TemplateHashResult.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/TemplateHashResult.cs similarity index 70% rename from src/Resources/Resources.Sdk/Generated/Models/TemplateHashResult.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/TemplateHashResult.cs index 9b70cdd45a53..a401b91830f6 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/TemplateHashResult.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/TemplateHashResult.cs @@ -1,21 +1,15 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// - /// Result of the request to calculate template hash. It contains a string - /// of minified template and its hash. + /// Result of the request to calculate template hash. It contains a string of + /// minified template and its hash. /// public partial class TemplateHashResult { @@ -30,13 +24,17 @@ public TemplateHashResult() /// /// Initializes a new instance of the TemplateHashResult class. /// - /// The minified template - /// string. - /// The template hash. + + /// The minified template string. + /// + + /// The template hash. + /// public TemplateHashResult(string minifiedTemplate = default(string), string templateHash = default(string)) + { - MinifiedTemplate = minifiedTemplate; - TemplateHash = templateHash; + this.MinifiedTemplate = minifiedTemplate; + this.TemplateHash = templateHash; CustomInit(); } @@ -45,17 +43,17 @@ public TemplateHashResult() /// partial void CustomInit(); + /// /// Gets or sets the minified template string. /// - [JsonProperty(PropertyName = "minifiedTemplate")] - public string MinifiedTemplate { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "minifiedTemplate")] + public string MinifiedTemplate {get; set; } /// /// Gets or sets the template hash. /// - [JsonProperty(PropertyName = "templateHash")] - public string TemplateHash { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "templateHash")] + public string TemplateHash {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/TemplateLink.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/TemplateLink.cs similarity index 50% rename from src/Resources/Resources.Sdk/Generated/Models/TemplateLink.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/TemplateLink.cs index 619ee7b26213..be765c4775a4 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/TemplateLink.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/TemplateLink.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,27 +23,36 @@ public TemplateLink() /// /// Initializes a new instance of the TemplateLink class. /// - /// The URI of the template to deploy. Use either the - /// uri or id property, but not both. - /// The resource id of a Template Spec. Use either the - /// id or uri property, but not both. - /// The relativePath property can be used to - /// deploy a linked template at a location relative to the parent. If - /// the parent template was linked with a TemplateSpec, this will - /// reference an artifact in the TemplateSpec. If the parent was - /// linked with a URI, the child deployment will be a combination of - /// the parent and relativePath URIs - /// If included, must match the - /// ContentVersion in the template. - /// The query string (for example, a SAS - /// token) to be used with the templateLink URI. + + /// The URI of the template to deploy. Use either the uri or id property, but + /// not both. + /// + + /// The resource id of a Template Spec. Use either the id or uri property, but + /// not both. + /// + + /// The relativePath property can be used to deploy a linked template at a + /// location relative to the parent. If the parent template was linked with a + /// TemplateSpec, this will reference an artifact in the TemplateSpec. If the + /// parent was linked with a URI, the child deployment will be a combination of + /// the parent and relativePath URIs + /// + + /// If included, must match the ContentVersion in the template. + /// + + /// The query string (for example, a SAS token) to be used with the + /// templateLink URI. + /// public TemplateLink(string uri = default(string), string id = default(string), string relativePath = default(string), string contentVersion = default(string), string queryString = default(string)) + { - Uri = uri; - Id = id; - RelativePath = relativePath; - ContentVersion = contentVersion; - QueryString = queryString; + this.Uri = uri; + this.Id = id; + this.RelativePath = relativePath; + this.ContentVersion = contentVersion; + this.QueryString = queryString; CustomInit(); } @@ -58,44 +61,42 @@ public TemplateLink() /// partial void CustomInit(); + /// - /// Gets or sets the URI of the template to deploy. Use either the uri - /// or id property, but not both. + /// Gets or sets the URI of the template to deploy. Use either the uri or id + /// property, but not both. /// - [JsonProperty(PropertyName = "uri")] - public string Uri { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "uri")] + public string Uri {get; set; } /// - /// Gets or sets the resource id of a Template Spec. Use either the id - /// or uri property, but not both. + /// Gets or sets the resource id of a Template Spec. Use either the id or uri + /// property, but not both. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; set; } /// - /// Gets or sets the relativePath property can be used to deploy a - /// linked template at a location relative to the parent. If the parent - /// template was linked with a TemplateSpec, this will reference an - /// artifact in the TemplateSpec. If the parent was linked with a URI, - /// the child deployment will be a combination of the parent and - /// relativePath URIs + /// Gets or sets the relativePath property can be used to deploy a linked + /// template at a location relative to the parent. If the parent template was + /// linked with a TemplateSpec, this will reference an artifact in the + /// TemplateSpec. If the parent was linked with a URI, the child deployment + /// will be a combination of the parent and relativePath URIs /// - [JsonProperty(PropertyName = "relativePath")] - public string RelativePath { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "relativePath")] + public string RelativePath {get; set; } /// - /// Gets or sets if included, must match the ContentVersion in the - /// template. + /// Gets or sets if included, must match the ContentVersion in the template. /// - [JsonProperty(PropertyName = "contentVersion")] - public string ContentVersion { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "contentVersion")] + public string ContentVersion {get; set; } /// - /// Gets or sets the query string (for example, a SAS token) to be used - /// with the templateLink URI. + /// Gets or sets the query string (for example, a SAS token) to be used with + /// the templateLink URI. /// - [JsonProperty(PropertyName = "queryString")] - public string QueryString { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "queryString")] + public string QueryString {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/Models/TemplateSpec.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/TemplateSpec.cs new file mode 100644 index 000000000000..3ec6e30e6b34 --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/TemplateSpec.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Resources.Models +{ + using System.Linq; + + /// + /// Template Spec object. + /// + [Microsoft.Rest.Serialization.JsonTransformation] + public partial class TemplateSpec : AzureResourceBase + { + /// + /// Initializes a new instance of the TemplateSpec class. + /// + public TemplateSpec() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the TemplateSpec class. + /// + + /// String Id used to locate any resource on Azure. + /// + + /// Name of this resource. + /// + + /// Type of this resource. + /// + + /// Azure Resource Manager metadata containing createdBy and modifiedBy + /// information. + /// + + /// The location of the Template Spec. It cannot be changed after Template Spec + /// creation. It must be one of the supported Azure locations. + /// + + /// Resource tags. + /// + + /// Template Spec description. + /// + + /// Template Spec display name. + /// + + /// The Template Spec metadata. Metadata is an open-ended object and is + /// typically a collection of key-value pairs. + /// + + /// High-level information about the versions within this Template Spec. The + /// keys are the version names. Only populated if the $expand query parameter + /// is set to 'versions'. + /// + public TemplateSpec(string location, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), string description = default(string), string displayName = default(string), object metadata = default(object), System.Collections.Generic.IDictionary versions = default(System.Collections.Generic.IDictionary)) + + : base(id, name, type, systemData) + { + this.Location = location; + this.Tags = tags; + this.Description = description; + this.DisplayName = displayName; + this.Metadata = metadata; + this.Versions = versions; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the location of the Template Spec. It cannot be changed after + /// Template Spec creation. It must be one of the supported Azure locations. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "location")] + public string Location {get; set; } + + /// + /// Gets or sets resource tags. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "tags")] + public System.Collections.Generic.IDictionary Tags {get; set; } + + /// + /// Gets or sets template Spec description. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.description")] + public string Description {get; set; } + + /// + /// Gets or sets template Spec display name. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.displayName")] + public string DisplayName {get; set; } + + /// + /// Gets or sets the Template Spec metadata. Metadata is an open-ended object + /// and is typically a collection of key-value pairs. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.metadata")] + public object Metadata {get; set; } + + /// + /// Gets high-level information about the versions within this Template Spec. + /// The keys are the version names. Only populated if the $expand query + /// parameter is set to 'versions'. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.versions")] + public System.Collections.Generic.IDictionary Versions {get; private set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.Location == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Location"); + } + + + if (this.Description != null) + { + if (this.Description.Length > 4096) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "Description", 4096); + } + } + if (this.DisplayName != null) + { + if (this.DisplayName.Length > 64) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "DisplayName", 64); + } + } + + + } + } +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/TemplateSpecExpandKind.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/TemplateSpecExpandKind.cs similarity index 85% rename from src/Resources/Resources.Sdk/Generated/Models/TemplateSpecExpandKind.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/TemplateSpecExpandKind.cs index 8a358e96ac73..0bfbabb59a28 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/TemplateSpecExpandKind.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/TemplateSpecExpandKind.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.Resources.Models /// /// Defines values for TemplateSpecExpandKind. /// + + public static class TemplateSpecExpandKind { /// @@ -21,4 +18,4 @@ public static class TemplateSpecExpandKind /// public const string Versions = "versions"; } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/Models/TemplateSpecProperties.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/TemplateSpecProperties.cs new file mode 100644 index 000000000000..794ab1f0e840 --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/TemplateSpecProperties.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Resources.Models +{ + using System.Linq; + + /// + /// Template Spec properties. + /// + public partial class TemplateSpecProperties + { + /// + /// Initializes a new instance of the TemplateSpecProperties class. + /// + public TemplateSpecProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the TemplateSpecProperties class. + /// + + /// Template Spec description. + /// + + /// Template Spec display name. + /// + + /// The Template Spec metadata. Metadata is an open-ended object and is + /// typically a collection of key-value pairs. + /// + + /// High-level information about the versions within this Template Spec. The + /// keys are the version names. Only populated if the $expand query parameter + /// is set to 'versions'. + /// + public TemplateSpecProperties(string description = default(string), string displayName = default(string), object metadata = default(object), System.Collections.Generic.IDictionary versions = default(System.Collections.Generic.IDictionary)) + + { + this.Description = description; + this.DisplayName = displayName; + this.Metadata = metadata; + this.Versions = versions; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets template Spec description. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "description")] + public string Description {get; set; } + + /// + /// Gets or sets template Spec display name. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "displayName")] + public string DisplayName {get; set; } + + /// + /// Gets or sets the Template Spec metadata. Metadata is an open-ended object + /// and is typically a collection of key-value pairs. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "metadata")] + public object Metadata {get; set; } + + /// + /// Gets high-level information about the versions within this Template Spec. + /// The keys are the version names. Only populated if the $expand query + /// parameter is set to 'versions'. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "versions")] + public System.Collections.Generic.IDictionary Versions {get; private set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.Description != null) + { + if (this.Description.Length > 4096) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "Description", 4096); + } + } + if (this.DisplayName != null) + { + if (this.DisplayName.Length > 64) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "DisplayName", 64); + } + } + + + } + } +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/TemplateSpecUpdateModel.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/TemplateSpecUpdateModel.cs similarity index 63% rename from src/Resources/Resources.Sdk/Generated/Models/TemplateSpecUpdateModel.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/TemplateSpecUpdateModel.cs index 76e5f297a020..bcf2e4c36240 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/TemplateSpecUpdateModel.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/TemplateSpecUpdateModel.cs @@ -1,23 +1,14 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// - /// Template Spec properties to be updated (only tags are currently - /// supported). + /// Template Spec properties to be updated (only tags are currently supported). /// public partial class TemplateSpecUpdateModel : AzureResourceBase { @@ -32,17 +23,27 @@ public TemplateSpecUpdateModel() /// /// Initializes a new instance of the TemplateSpecUpdateModel class. /// - /// String Id used to locate any resource on - /// Azure. - /// Name of this resource. - /// Type of this resource. - /// Azure Resource Manager metadata containing - /// createdBy and modifiedBy information. - /// Resource tags. - public TemplateSpecUpdateModel(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), IDictionary tags = default(IDictionary)) - : base(id, name, type, systemData) + + /// String Id used to locate any resource on Azure. + /// + + /// Name of this resource. + /// + + /// Type of this resource. + /// + + /// Azure Resource Manager metadata containing createdBy and modifiedBy + /// information. + /// + + /// Resource tags. + /// + public TemplateSpecUpdateModel(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary)) + + : base(id, name, type, systemData) { - Tags = tags; + this.Tags = tags; CustomInit(); } @@ -51,11 +52,11 @@ public TemplateSpecUpdateModel() /// partial void CustomInit(); + /// /// Gets or sets resource tags. /// - [JsonProperty(PropertyName = "tags")] - public IDictionary Tags { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "tags")] + public System.Collections.Generic.IDictionary Tags {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/Models/TemplateSpecVersion.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/TemplateSpecVersion.cs new file mode 100644 index 000000000000..b433b55f962b --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/TemplateSpecVersion.cs @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Resources.Models +{ + using System.Linq; + + /// + /// Template Spec Version object. + /// + [Microsoft.Rest.Serialization.JsonTransformation] + public partial class TemplateSpecVersion : AzureResourceBase + { + /// + /// Initializes a new instance of the TemplateSpecVersion class. + /// + public TemplateSpecVersion() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the TemplateSpecVersion class. + /// + + /// String Id used to locate any resource on Azure. + /// + + /// Name of this resource. + /// + + /// Type of this resource. + /// + + /// Azure Resource Manager metadata containing createdBy and modifiedBy + /// information. + /// + + /// The location of the Template Spec Version. It must match the location of + /// the parent Template Spec. + /// + + /// Resource tags. + /// + + /// Template Spec version description. + /// + + /// An array of linked template artifacts. + /// + + /// The version metadata. Metadata is an open-ended object and is typically a + /// collection of key-value pairs. + /// + + /// The main Azure Resource Manager template content. + /// + + /// The Azure Resource Manager template UI definition content. + /// + public TemplateSpecVersion(string location, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), string description = default(string), System.Collections.Generic.IList linkedTemplates = default(System.Collections.Generic.IList), object metadata = default(object), object mainTemplate = default(object), object uiFormDefinition = default(object)) + + : base(id, name, type, systemData) + { + this.Location = location; + this.Tags = tags; + this.Description = description; + this.LinkedTemplates = linkedTemplates; + this.Metadata = metadata; + this.MainTemplate = mainTemplate; + this.UiFormDefinition = uiFormDefinition; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the location of the Template Spec Version. It must match the + /// location of the parent Template Spec. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "location")] + public string Location {get; set; } + + /// + /// Gets or sets resource tags. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "tags")] + public System.Collections.Generic.IDictionary Tags {get; set; } + + /// + /// Gets or sets template Spec version description. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.description")] + public string Description {get; set; } + + /// + /// Gets or sets an array of linked template artifacts. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.linkedTemplates")] + public System.Collections.Generic.IList LinkedTemplates {get; set; } + + /// + /// Gets or sets the version metadata. Metadata is an open-ended object and is + /// typically a collection of key-value pairs. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.metadata")] + public object Metadata {get; set; } + + /// + /// Gets or sets the main Azure Resource Manager template content. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.mainTemplate")] + public object MainTemplate {get; set; } + + /// + /// Gets or sets the Azure Resource Manager template UI definition content. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.uiFormDefinition")] + public object UiFormDefinition {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.Location == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Location"); + } + + + if (this.Description != null) + { + if (this.Description.Length > 4096) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "Description", 4096); + } + } + if (this.LinkedTemplates != null) + { + foreach (var element in this.LinkedTemplates) + { + if (element != null) + { + element.Validate(); + } + } + } + + + + } + } +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/TemplateSpecVersionInfo.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/TemplateSpecVersionInfo.cs similarity index 68% rename from src/Resources/Resources.Sdk/Generated/Models/TemplateSpecVersionInfo.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/TemplateSpecVersionInfo.cs index 60808c5fcd96..80641494c9ba 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/TemplateSpecVersionInfo.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/TemplateSpecVersionInfo.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,17 +23,21 @@ public TemplateSpecVersionInfo() /// /// Initializes a new instance of the TemplateSpecVersionInfo class. /// - /// Template Spec version - /// description. - /// The timestamp of when the version was - /// created. - /// The timestamp of when the version was - /// last modified. + + /// Template Spec version description. + /// + + /// The timestamp of when the version was created. + /// + + /// The timestamp of when the version was last modified. + /// public TemplateSpecVersionInfo(string description = default(string), System.DateTime? timeCreated = default(System.DateTime?), System.DateTime? timeModified = default(System.DateTime?)) + { - Description = description; - TimeCreated = timeCreated; - TimeModified = timeModified; + this.Description = description; + this.TimeCreated = timeCreated; + this.TimeModified = timeModified; CustomInit(); } @@ -48,23 +46,23 @@ public TemplateSpecVersionInfo() /// partial void CustomInit(); + /// /// Gets template Spec version description. /// - [JsonProperty(PropertyName = "description")] - public string Description { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "description")] + public string Description {get; private set; } /// /// Gets the timestamp of when the version was created. /// - [JsonProperty(PropertyName = "timeCreated")] - public System.DateTime? TimeCreated { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "timeCreated")] + public System.DateTime? TimeCreated {get; private set; } /// /// Gets the timestamp of when the version was last modified. /// - [JsonProperty(PropertyName = "timeModified")] - public System.DateTime? TimeModified { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "timeModified")] + public System.DateTime? TimeModified {get; private set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/Models/TemplateSpecVersionProperties.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/TemplateSpecVersionProperties.cs new file mode 100644 index 000000000000..592fd32b9c48 --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/TemplateSpecVersionProperties.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Resources.Models +{ + using System.Linq; + + /// + /// Template Spec Version properties. + /// + public partial class TemplateSpecVersionProperties + { + /// + /// Initializes a new instance of the TemplateSpecVersionProperties class. + /// + public TemplateSpecVersionProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the TemplateSpecVersionProperties class. + /// + + /// Template Spec version description. + /// + + /// An array of linked template artifacts. + /// + + /// The version metadata. Metadata is an open-ended object and is typically a + /// collection of key-value pairs. + /// + + /// The main Azure Resource Manager template content. + /// + + /// The Azure Resource Manager template UI definition content. + /// + public TemplateSpecVersionProperties(string description = default(string), System.Collections.Generic.IList linkedTemplates = default(System.Collections.Generic.IList), object metadata = default(object), object mainTemplate = default(object), object uiFormDefinition = default(object)) + + { + this.Description = description; + this.LinkedTemplates = linkedTemplates; + this.Metadata = metadata; + this.MainTemplate = mainTemplate; + this.UiFormDefinition = uiFormDefinition; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets template Spec version description. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "description")] + public string Description {get; set; } + + /// + /// Gets or sets an array of linked template artifacts. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "linkedTemplates")] + public System.Collections.Generic.IList LinkedTemplates {get; set; } + + /// + /// Gets or sets the version metadata. Metadata is an open-ended object and is + /// typically a collection of key-value pairs. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "metadata")] + public object Metadata {get; set; } + + /// + /// Gets or sets the main Azure Resource Manager template content. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "mainTemplate")] + public object MainTemplate {get; set; } + + /// + /// Gets or sets the Azure Resource Manager template UI definition content. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "uiFormDefinition")] + public object UiFormDefinition {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.Description != null) + { + if (this.Description.Length > 4096) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "Description", 4096); + } + } + if (this.LinkedTemplates != null) + { + foreach (var element in this.LinkedTemplates) + { + if (element != null) + { + element.Validate(); + } + } + } + + + + } + } +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/TemplateSpecVersionUpdateModel.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/TemplateSpecVersionUpdateModel.cs similarity index 62% rename from src/Resources/Resources.Sdk/Generated/Models/TemplateSpecVersionUpdateModel.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/TemplateSpecVersionUpdateModel.cs index 0496f11d2e16..ac99e87d23ca 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/TemplateSpecVersionUpdateModel.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/TemplateSpecVersionUpdateModel.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.Resources.Models public partial class TemplateSpecVersionUpdateModel : AzureResourceBase { /// - /// Initializes a new instance of the TemplateSpecVersionUpdateModel - /// class. + /// Initializes a new instance of the TemplateSpecVersionUpdateModel class. /// public TemplateSpecVersionUpdateModel() { @@ -31,20 +22,29 @@ public TemplateSpecVersionUpdateModel() } /// - /// Initializes a new instance of the TemplateSpecVersionUpdateModel - /// class. + /// Initializes a new instance of the TemplateSpecVersionUpdateModel class. /// - /// String Id used to locate any resource on - /// Azure. - /// Name of this resource. - /// Type of this resource. - /// Azure Resource Manager metadata containing - /// createdBy and modifiedBy information. - /// Resource tags. - public TemplateSpecVersionUpdateModel(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), IDictionary tags = default(IDictionary)) - : base(id, name, type, systemData) + + /// String Id used to locate any resource on Azure. + /// + + /// Name of this resource. + /// + + /// Type of this resource. + /// + + /// Azure Resource Manager metadata containing createdBy and modifiedBy + /// information. + /// + + /// Resource tags. + /// + public TemplateSpecVersionUpdateModel(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary)) + + : base(id, name, type, systemData) { - Tags = tags; + this.Tags = tags; CustomInit(); } @@ -53,11 +53,11 @@ public TemplateSpecVersionUpdateModel() /// partial void CustomInit(); + /// /// Gets or sets resource tags. /// - [JsonProperty(PropertyName = "tags")] - public IDictionary Tags { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "tags")] + public System.Collections.Generic.IDictionary Tags {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/TemplateSpecsError.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/TemplateSpecsError.cs similarity index 63% rename from src/Resources/Resources.Sdk/Generated/Models/TemplateSpecsError.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/TemplateSpecsError.cs index cc3ace2cd1ed..326afb229199 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/TemplateSpecsError.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/TemplateSpecsError.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,9 +23,15 @@ public TemplateSpecsError() /// /// Initializes a new instance of the TemplateSpecsError class. /// + + /// Common error response for all Azure Resource Manager APIs to return error + /// details for failed operations. (This also follows the OData error response + /// format.) + /// public TemplateSpecsError(ErrorResponse error = default(ErrorResponse)) + { - Error = error; + this.Error = error; CustomInit(); } @@ -40,10 +40,13 @@ public TemplateSpecsError() /// partial void CustomInit(); + /// + /// Gets or sets common error response for all Azure Resource Manager APIs to + /// return error details for failed operations. (This also follows the OData + /// error response format.) /// - [JsonProperty(PropertyName = "error")] - public ErrorResponse Error { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "error")] + public ErrorResponse Error {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/TemplateSpecsErrorException.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/TemplateSpecsErrorException.cs similarity index 80% rename from src/Resources/Resources.Sdk/Generated/Models/TemplateSpecsErrorException.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/TemplateSpecsErrorException.cs index 74f35c046511..b08d86aab4e1 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/TemplateSpecsErrorException.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/TemplateSpecsErrorException.cs @@ -1,32 +1,25 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Microsoft.Rest; /// - /// Exception thrown for an invalid response with TemplateSpecsError - /// information. + /// Exception thrown for an invalid response with TemplateSpecsError information. /// - public partial class TemplateSpecsErrorException : RestException + public partial class TemplateSpecsErrorException : Microsoft.Rest.RestException { /// /// Gets information about the associated HTTP request. /// - public HttpRequestMessageWrapper Request { get; set; } + public Microsoft.Rest.HttpRequestMessageWrapper Request { get; set; } /// /// Gets information about the associated HTTP response. /// - public HttpResponseMessageWrapper Response { get; set; } + public Microsoft.Rest.HttpResponseMessageWrapper Response { get; set; } /// /// Gets or sets the body object. @@ -41,7 +34,7 @@ public TemplateSpecsErrorException() } /// - /// Initializes a new instance of the TemplateSpecsErrorException class. + /// Initializes a new instance of the TemplateSpecsError class. /// /// The exception message. public TemplateSpecsErrorException(string message) @@ -50,7 +43,7 @@ public TemplateSpecsErrorException(string message) } /// - /// Initializes a new instance of the TemplateSpecsErrorException class. + /// Initializes a new instance of the TemplateSpecsError class. /// /// The exception message. /// Inner exception. @@ -59,4 +52,4 @@ public TemplateSpecsErrorException(string message, System.Exception innerExcepti { } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/TenantCategory.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/TenantCategory.cs similarity index 79% rename from src/Resources/Resources.Sdk/Generated/Models/TenantCategory.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/TenantCategory.cs index 2d6d083c1436..0d2ba1e65c59 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/TenantCategory.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/TenantCategory.cs @@ -1,31 +1,24 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; /// /// Defines values for TenantCategory. /// - [JsonConverter(typeof(StringEnumConverter))] + + + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public enum TenantCategory { - [EnumMember(Value = "Home")] + [System.Runtime.Serialization.EnumMember(Value = "Home")] Home, - [EnumMember(Value = "ProjectedBy")] + [System.Runtime.Serialization.EnumMember(Value = "ProjectedBy")] ProjectedBy, - [EnumMember(Value = "ManagedBy")] + [System.Runtime.Serialization.EnumMember(Value = "ManagedBy")] ManagedBy } internal static class TenantCategoryEnumExtension @@ -34,7 +27,6 @@ internal static string ToSerializedValue(this TenantCategory? value) { return value == null ? null : ((TenantCategory)value).ToSerializedValue(); } - internal static string ToSerializedValue(this TenantCategory value) { switch( value ) @@ -48,7 +40,6 @@ internal static string ToSerializedValue(this TenantCategory value) } return null; } - internal static TenantCategory? ParseTenantCategory(this string value) { switch( value ) @@ -63,4 +54,4 @@ internal static string ToSerializedValue(this TenantCategory value) return null; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/Models/TenantIdDescription.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/TenantIdDescription.cs new file mode 100644 index 000000000000..b48fcb261fc5 --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/TenantIdDescription.cs @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Resources.Models +{ + using System.Linq; + + /// + /// Tenant Id information. + /// + public partial class TenantIdDescription + { + /// + /// Initializes a new instance of the TenantIdDescription class. + /// + public TenantIdDescription() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the TenantIdDescription class. + /// + + /// The fully qualified ID of the tenant. For example, + /// /tenants/00000000-0000-0000-0000-000000000000. + /// + + /// The tenant ID. For example, 00000000-0000-0000-0000-000000000000. + /// + + /// Category of the tenant. + /// Possible values include: 'Home', 'ProjectedBy', 'ManagedBy' + + /// Country/region name of the address for the tenant. + /// + + /// Country/region abbreviation for the tenant. + /// + + /// The display name of the tenant. + /// + + /// The list of domains for the tenant. + /// + + /// The default domain for the tenant. + /// + + /// The tenant type. Only available for 'Home' tenant category. + /// + + /// The tenant's branding logo URL. Only available for 'Home' tenant category. + /// + public TenantIdDescription(string id = default(string), string tenantId = default(string), TenantCategory? tenantCategory = default(TenantCategory?), string country = default(string), string countryCode = default(string), string displayName = default(string), System.Collections.Generic.IList domains = default(System.Collections.Generic.IList), string defaultDomain = default(string), string tenantType = default(string), string tenantBrandingLogoUrl = default(string)) + + { + this.Id = id; + this.TenantId = tenantId; + this.TenantCategory = tenantCategory; + this.Country = country; + this.CountryCode = countryCode; + this.DisplayName = displayName; + this.Domains = domains; + this.DefaultDomain = defaultDomain; + this.TenantType = tenantType; + this.TenantBrandingLogoUrl = tenantBrandingLogoUrl; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets the fully qualified ID of the tenant. For example, + /// /tenants/00000000-0000-0000-0000-000000000000. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; private set; } + + /// + /// Gets the tenant ID. For example, 00000000-0000-0000-0000-000000000000. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "tenantId")] + public string TenantId {get; private set; } + + /// + /// Gets category of the tenant. Possible values include: 'Home', 'ProjectedBy', 'ManagedBy' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "tenantCategory")] + public TenantCategory? TenantCategory {get; private set; } + + /// + /// Gets country/region name of the address for the tenant. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "country")] + public string Country {get; private set; } + + /// + /// Gets country/region abbreviation for the tenant. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "countryCode")] + public string CountryCode {get; private set; } + + /// + /// Gets the display name of the tenant. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "displayName")] + public string DisplayName {get; private set; } + + /// + /// Gets the list of domains for the tenant. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "domains")] + public System.Collections.Generic.IList Domains {get; private set; } + + /// + /// Gets the default domain for the tenant. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "defaultDomain")] + public string DefaultDomain {get; private set; } + + /// + /// Gets the tenant type. Only available for 'Home' tenant category. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "tenantType")] + public string TenantType {get; private set; } + + /// + /// Gets the tenant's branding logo URL. Only available for 'Home' tenant + /// category. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "tenantBrandingLogoUrl")] + public string TenantBrandingLogoUrl {get; private set; } + } +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/UnmanageActionManagementGroupMode.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/UnmanageActionManagementGroupMode.cs similarity index 84% rename from src/Resources/Resources.Sdk/Generated/Models/UnmanageActionManagementGroupMode.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/UnmanageActionManagementGroupMode.cs index 03656a2c18bb..31a4319c5f00 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/UnmanageActionManagementGroupMode.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/UnmanageActionManagementGroupMode.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { @@ -14,9 +9,11 @@ namespace Microsoft.Azure.Management.Resources.Models /// /// Defines values for UnmanageActionManagementGroupMode. /// + + public static class UnmanageActionManagementGroupMode { public const string Delete = "delete"; public const string Detach = "detach"; } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/UnmanageActionResourceGroupMode.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/UnmanageActionResourceGroupMode.cs similarity index 84% rename from src/Resources/Resources.Sdk/Generated/Models/UnmanageActionResourceGroupMode.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/UnmanageActionResourceGroupMode.cs index fdb0592fb200..e64511a17fbf 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/UnmanageActionResourceGroupMode.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/UnmanageActionResourceGroupMode.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { @@ -14,9 +9,11 @@ namespace Microsoft.Azure.Management.Resources.Models /// /// Defines values for UnmanageActionResourceGroupMode. /// + + public static class UnmanageActionResourceGroupMode { public const string Delete = "delete"; public const string Detach = "detach"; } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/UnmanageActionResourceMode.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/UnmanageActionResourceMode.cs similarity index 84% rename from src/Resources/Resources.Sdk/Generated/Models/UnmanageActionResourceMode.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/UnmanageActionResourceMode.cs index 0def28b2dd00..b81bec9fba7e 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/UnmanageActionResourceMode.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/UnmanageActionResourceMode.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { @@ -14,9 +9,11 @@ namespace Microsoft.Azure.Management.Resources.Models /// /// Defines values for UnmanageActionResourceMode. /// + + public static class UnmanageActionResourceMode { public const string Delete = "delete"; public const string Detach = "detach"; } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/UserAssignedIdentity.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/UserAssignedIdentity.cs similarity index 72% rename from src/Resources/Resources.Sdk/Generated/Models/UserAssignedIdentity.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/UserAssignedIdentity.cs index b8dba2f8a421..96adc29d1be1 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/UserAssignedIdentity.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/UserAssignedIdentity.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,14 +23,17 @@ public UserAssignedIdentity() /// /// Initializes a new instance of the UserAssignedIdentity class. /// - /// Azure Active Directory principal ID - /// associated with this identity. - /// Client App Id associated with this - /// identity. + + /// Azure Active Directory principal ID associated with this identity. + /// + + /// Client App Id associated with this identity. + /// public UserAssignedIdentity(string principalId = default(string), string clientId = default(string)) + { - PrincipalId = principalId; - ClientId = clientId; + this.PrincipalId = principalId; + this.ClientId = clientId; CustomInit(); } @@ -45,18 +42,17 @@ public UserAssignedIdentity() /// partial void CustomInit(); + /// - /// Gets azure Active Directory principal ID associated with this - /// identity. + /// Gets azure Active Directory principal ID associated with this identity. /// - [JsonProperty(PropertyName = "principalId")] - public string PrincipalId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "principalId")] + public string PrincipalId {get; private set; } /// /// Gets client App Id associated with this identity. /// - [JsonProperty(PropertyName = "clientId")] - public string ClientId { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "clientId")] + public string ClientId {get; private set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/WhatIfChange.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/WhatIfChange.cs similarity index 51% rename from src/Resources/Resources.Sdk/Generated/Models/WhatIfChange.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/WhatIfChange.cs index 9a6b8e69da80..af7748d237be 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/WhatIfChange.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/WhatIfChange.cs @@ -1,24 +1,14 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// - /// Information about a single resource change predicted by What-If - /// operation. + /// Information about a single resource change predicted by What-If operation. /// public partial class WhatIfChange { @@ -33,27 +23,35 @@ public WhatIfChange() /// /// Initializes a new instance of the WhatIfChange class. /// - /// Resource ID - /// Type of change that will be made to the - /// resource when the deployment is executed. Possible values include: - /// 'Create', 'Delete', 'Ignore', 'Deploy', 'NoChange', 'Modify', - /// 'Unsupported' - /// The explanation about why the - /// resource is unsupported by What-If. - /// The snapshot of the resource before the - /// deployment is executed. - /// The predicted snapshot of the resource after - /// the deployment is executed. - /// The predicted changes to resource - /// properties. - public WhatIfChange(string resourceId, ChangeType changeType, string unsupportedReason = default(string), object before = default(object), object after = default(object), IList delta = default(IList)) + + /// Resource ID + /// + + /// Type of change that will be made to the resource when the deployment is + /// executed. + /// Possible values include: 'Create', 'Delete', 'Ignore', 'Deploy', + /// 'NoChange', 'Modify', 'Unsupported' + + /// The explanation about why the resource is unsupported by What-If. + /// + + /// The snapshot of the resource before the deployment is executed. + /// + + /// The predicted snapshot of the resource after the deployment is executed. + /// + + /// The predicted changes to resource properties. + /// + public WhatIfChange(string resourceId, ChangeType changeType, string unsupportedReason = default(string), object before = default(object), object after = default(object), System.Collections.Generic.IList delta = default(System.Collections.Generic.IList)) + { - ResourceId = resourceId; - ChangeType = changeType; - UnsupportedReason = unsupportedReason; - Before = before; - After = after; - Delta = delta; + this.ResourceId = resourceId; + this.ChangeType = changeType; + this.UnsupportedReason = unsupportedReason; + this.Before = before; + this.After = after; + this.Delta = delta; CustomInit(); } @@ -62,62 +60,66 @@ public WhatIfChange() /// partial void CustomInit(); + /// /// Gets or sets resource ID /// - [JsonProperty(PropertyName = "resourceId")] - public string ResourceId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resourceId")] + public string ResourceId {get; set; } /// - /// Gets or sets type of change that will be made to the resource when - /// the deployment is executed. Possible values include: 'Create', - /// 'Delete', 'Ignore', 'Deploy', 'NoChange', 'Modify', 'Unsupported' + /// Gets or sets type of change that will be made to the resource when the + /// deployment is executed. Possible values include: 'Create', 'Delete', 'Ignore', 'Deploy', 'NoChange', 'Modify', 'Unsupported' /// - [JsonProperty(PropertyName = "changeType")] - public ChangeType ChangeType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "changeType")] + public ChangeType ChangeType {get; set; } /// - /// Gets or sets the explanation about why the resource is unsupported - /// by What-If. + /// Gets or sets the explanation about why the resource is unsupported by + /// What-If. /// - [JsonProperty(PropertyName = "unsupportedReason")] - public string UnsupportedReason { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "unsupportedReason")] + public string UnsupportedReason {get; set; } /// /// Gets or sets the snapshot of the resource before the deployment is /// executed. /// - [JsonProperty(PropertyName = "before")] - public object Before { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "before")] + public object Before {get; set; } /// - /// Gets or sets the predicted snapshot of the resource after the - /// deployment is executed. + /// Gets or sets the predicted snapshot of the resource after the deployment is + /// executed. /// - [JsonProperty(PropertyName = "after")] - public object After { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "after")] + public object After {get; set; } /// /// Gets or sets the predicted changes to resource properties. /// - [JsonProperty(PropertyName = "delta")] - public IList Delta { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "delta")] + public System.Collections.Generic.IList Delta {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (ResourceId == null) + if (this.ResourceId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "ResourceId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ResourceId"); } - if (Delta != null) + + + + + + if (this.Delta != null) { - foreach (var element in Delta) + foreach (var element in this.Delta) { if (element != null) { @@ -127,4 +129,4 @@ public virtual void Validate() } } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/Models/WhatIfOperationProperties.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/WhatIfOperationProperties.cs new file mode 100644 index 000000000000..e58196d3c803 --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/WhatIfOperationProperties.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Resources.Models +{ + using System.Linq; + + /// + /// Deployment operation properties. + /// + public partial class WhatIfOperationProperties + { + /// + /// Initializes a new instance of the WhatIfOperationProperties class. + /// + public WhatIfOperationProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WhatIfOperationProperties class. + /// + + /// List of resource changes predicted by What-If operation. + /// + public WhatIfOperationProperties(System.Collections.Generic.IList changes = default(System.Collections.Generic.IList)) + + { + this.Changes = changes; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets list of resource changes predicted by What-If operation. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "changes")] + public System.Collections.Generic.IList Changes {get; set; } + } +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/WhatIfOperationResult.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/WhatIfOperationResult.cs similarity index 62% rename from src/Resources/Resources.Sdk/Generated/Models/WhatIfOperationResult.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/WhatIfOperationResult.cs index 2769453cb3b3..fdeb5bf79388 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/WhatIfOperationResult.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/WhatIfOperationResult.cs @@ -1,27 +1,17 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// - /// Result of the What-If operation. Contains a list of predicted changes - /// and a URL link to get to the next set of results. + /// Result of the What-If operation. Contains a list of predicted changes and a + /// URL link to get to the next set of results. /// - [Rest.Serialization.JsonTransformation] + [Microsoft.Rest.Serialization.JsonTransformation] public partial class WhatIfOperationResult { /// @@ -35,15 +25,21 @@ public WhatIfOperationResult() /// /// Initializes a new instance of the WhatIfOperationResult class. /// - /// Status of the What-If operation. - /// List of resource changes predicted by What-If - /// operation. - /// Error when What-If operation fails. - public WhatIfOperationResult(string status = default(string), IList changes = default(IList), ErrorResponse error = default(ErrorResponse)) + + /// Status of the What-If operation. + /// + + /// Error when What-If operation fails. + /// + + /// List of resource changes predicted by What-If operation. + /// + public WhatIfOperationResult(string status = default(string), ErrorResponse error = default(ErrorResponse), System.Collections.Generic.IList changes = default(System.Collections.Generic.IList)) + { - Status = status; - Changes = changes; - Error = error; + this.Status = status; + this.Error = error; + this.Changes = changes; CustomInit(); } @@ -52,24 +48,23 @@ public WhatIfOperationResult() /// partial void CustomInit(); + /// /// Gets or sets status of the What-If operation. /// - [JsonProperty(PropertyName = "status")] - public string Status { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public string Status {get; set; } /// - /// Gets or sets list of resource changes predicted by What-If - /// operation. + /// Gets or sets error when What-If operation fails. /// - [JsonProperty(PropertyName = "properties.changes")] - public IList Changes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "error")] + public ErrorResponse Error {get; set; } /// - /// Gets or sets error when What-If operation fails. + /// Gets or sets list of resource changes predicted by What-If operation. /// - [JsonProperty(PropertyName = "error")] - public ErrorResponse Error { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.changes")] + public System.Collections.Generic.IList Changes {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/WhatIfPropertyChange.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/WhatIfPropertyChange.cs similarity index 55% rename from src/Resources/Resources.Sdk/Generated/Models/WhatIfPropertyChange.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/WhatIfPropertyChange.cs index 21981587ac60..755fae24d1bb 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/WhatIfPropertyChange.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/WhatIfPropertyChange.cs @@ -1,19 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,22 +23,29 @@ public WhatIfPropertyChange() /// /// Initializes a new instance of the WhatIfPropertyChange class. /// - /// The path of the property. + + /// The path of the property. + /// + /// The type of property change. - /// Possible values include: 'Create', 'Delete', 'Modify', 'Array', - /// 'NoEffect' - /// The value of the property before the - /// deployment is executed. - /// The value of the property after the deployment - /// is executed. - /// Nested property changes. - public WhatIfPropertyChange(string path, PropertyChangeType propertyChangeType, object before = default(object), object after = default(object), IList children = default(IList)) + /// Possible values include: 'Create', 'Delete', 'Modify', 'Array', 'NoEffect' + + /// The value of the property before the deployment is executed. + /// + + /// The value of the property after the deployment is executed. + /// + + /// Nested property changes. + /// + public WhatIfPropertyChange(string path, PropertyChangeType propertyChangeType, object before = default(object), object after = default(object), System.Collections.Generic.IList children = default(System.Collections.Generic.IList)) + { - Path = path; - PropertyChangeType = propertyChangeType; - Before = before; - After = after; - Children = children; + this.Path = path; + this.PropertyChangeType = propertyChangeType; + this.Before = before; + this.After = after; + this.Children = children; CustomInit(); } @@ -56,54 +54,55 @@ public WhatIfPropertyChange() /// partial void CustomInit(); + /// /// Gets or sets the path of the property. /// - [JsonProperty(PropertyName = "path")] - public string Path { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "path")] + public string Path {get; set; } /// - /// Gets or sets the type of property change. Possible values include: - /// 'Create', 'Delete', 'Modify', 'Array', 'NoEffect' + /// Gets or sets the type of property change. Possible values include: 'Create', 'Delete', 'Modify', 'Array', 'NoEffect' /// - [JsonProperty(PropertyName = "propertyChangeType")] - public PropertyChangeType PropertyChangeType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "propertyChangeType")] + public PropertyChangeType PropertyChangeType {get; set; } /// - /// Gets or sets the value of the property before the deployment is - /// executed. + /// Gets or sets the value of the property before the deployment is executed. /// - [JsonProperty(PropertyName = "before")] - public object Before { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "before")] + public object Before {get; set; } /// - /// Gets or sets the value of the property after the deployment is - /// executed. + /// Gets or sets the value of the property after the deployment is executed. /// - [JsonProperty(PropertyName = "after")] - public object After { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "after")] + public object After {get; set; } /// /// Gets or sets nested property changes. /// - [JsonProperty(PropertyName = "children")] - public IList Children { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "children")] + public System.Collections.Generic.IList Children {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Path == null) + if (this.Path == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Path"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Path"); } - if (Children != null) + + + + + if (this.Children != null) { - foreach (var element in Children) + foreach (var element in this.Children) { if (element != null) { @@ -113,4 +112,4 @@ public virtual void Validate() } } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/WhatIfResultFormat.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/WhatIfResultFormat.cs similarity index 80% rename from src/Resources/Resources.Sdk/Generated/Models/WhatIfResultFormat.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/WhatIfResultFormat.cs index 6538818337fb..a6dbc9fa08b9 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/WhatIfResultFormat.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/WhatIfResultFormat.cs @@ -1,29 +1,22 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; /// /// Defines values for WhatIfResultFormat. /// - [JsonConverter(typeof(StringEnumConverter))] + + + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public enum WhatIfResultFormat { - [EnumMember(Value = "ResourceIdOnly")] + [System.Runtime.Serialization.EnumMember(Value = "ResourceIdOnly")] ResourceIdOnly, - [EnumMember(Value = "FullResourcePayloads")] + [System.Runtime.Serialization.EnumMember(Value = "FullResourcePayloads")] FullResourcePayloads } internal static class WhatIfResultFormatEnumExtension @@ -32,7 +25,6 @@ internal static string ToSerializedValue(this WhatIfResultFormat? value) { return value == null ? null : ((WhatIfResultFormat)value).ToSerializedValue(); } - internal static string ToSerializedValue(this WhatIfResultFormat value) { switch( value ) @@ -44,7 +36,6 @@ internal static string ToSerializedValue(this WhatIfResultFormat value) } return null; } - internal static WhatIfResultFormat? ParseWhatIfResultFormat(this string value) { switch( value ) @@ -57,4 +48,4 @@ internal static string ToSerializedValue(this WhatIfResultFormat value) return null; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Models/ZoneMapping.cs b/src/Resources/Resources.Management.Sdk/Generated/Models/ZoneMapping.cs similarity index 63% rename from src/Resources/Resources.Sdk/Generated/Models/ZoneMapping.cs rename to src/Resources/Resources.Management.Sdk/Generated/Models/ZoneMapping.cs index cba653880677..841f877440c9 100644 --- a/src/Resources/Resources.Sdk/Generated/Models/ZoneMapping.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Models/ZoneMapping.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; public partial class ZoneMapping @@ -28,11 +20,17 @@ public ZoneMapping() /// /// Initializes a new instance of the ZoneMapping class. /// - /// The location of the zone mapping. - public ZoneMapping(string location = default(string), IList zones = default(IList)) + + /// The location of the zone mapping. + /// + + /// + /// + public ZoneMapping(string location = default(string), System.Collections.Generic.IList zones = default(System.Collections.Generic.IList)) + { - Location = location; - Zones = zones; + this.Location = location; + this.Zones = zones; CustomInit(); } @@ -41,16 +39,17 @@ public ZoneMapping() /// partial void CustomInit(); + /// /// Gets or sets the location of the zone mapping. /// - [JsonProperty(PropertyName = "location")] - public string Location { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "location")] + public string Location {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "zones")] - public IList Zones { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "zones")] + public System.Collections.Generic.IList Zones {get; set; } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/Operations.cs b/src/Resources/Resources.Management.Sdk/Generated/Operations.cs similarity index 58% rename from src/Resources/Resources.Sdk/Generated/Operations.cs rename to src/Resources/Resources.Management.Sdk/Generated/Operations.cs index 1cfe6cbb5016..9d207e0e5585 100644 --- a/src/Resources/Resources.Sdk/Generated/Operations.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/Operations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// Operations operations. /// - internal partial class Operations : IServiceOperations, IOperations + internal partial class Operations : Microsoft.Rest.IServiceOperations, IOperations { /// /// Initializes a new instance of the Operations class. @@ -36,13 +24,13 @@ internal partial class Operations : IServiceOperations /// /// Thrown when a required parameter is null /// - internal Operations(ResourceManagementClient client) + internal Operations (ResourceManagementClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -59,13 +47,13 @@ internal Operations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -74,54 +62,62 @@ internal Operations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Resources/operations").ToString(); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -133,55 +129,56 @@ internal Operations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -191,9 +188,10 @@ internal Operations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -204,25 +202,29 @@ internal Operations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Lists all of the available Microsoft.Resources REST API operations. /// @@ -235,13 +237,13 @@ internal Operations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -250,51 +252,54 @@ internal Operations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -306,55 +311,56 @@ internal Operations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -364,9 +370,10 @@ internal Operations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -377,24 +384,28 @@ internal Operations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/OperationsExtensions.cs b/src/Resources/Resources.Management.Sdk/Generated/OperationsExtensions.cs new file mode 100644 index 000000000000..eb8dd7383f74 --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/OperationsExtensions.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +namespace Microsoft.Azure.Management.Resources +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// Extension methods for Operations + /// + public static partial class OperationsExtensions + { + /// + /// Lists all of the available Microsoft.Resources REST API operations. + /// + /// + /// The operations group for this extension method. + /// + public static Microsoft.Rest.Azure.IPage List(this IOperations operations) + { + return ((IOperations)operations).ListAsync().GetAwaiter().GetResult(); + } + + /// + /// Lists all of the available Microsoft.Resources REST API operations. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IOperations operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Lists all of the available Microsoft.Resources REST API operations. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IOperations operations, string nextPageLink) + { + return ((IOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists all of the available Microsoft.Resources REST API operations. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } +} diff --git a/src/Resources/Resources.Sdk/Generated/PrivateLinkAssociationOperations.cs b/src/Resources/Resources.Management.Sdk/Generated/PrivateLinkAssociationOperations.cs similarity index 57% rename from src/Resources/Resources.Sdk/Generated/PrivateLinkAssociationOperations.cs rename to src/Resources/Resources.Management.Sdk/Generated/PrivateLinkAssociationOperations.cs index 996f2405f143..f2614e0003d3 100644 --- a/src/Resources/Resources.Sdk/Generated/PrivateLinkAssociationOperations.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/PrivateLinkAssociationOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// PrivateLinkAssociationOperations operations. /// - internal partial class PrivateLinkAssociationOperations : IServiceOperations, IPrivateLinkAssociationOperations + internal partial class PrivateLinkAssociationOperations : Microsoft.Rest.IServiceOperations, IPrivateLinkAssociationOperations { /// /// Initializes a new instance of the PrivateLinkAssociationOperations class. @@ -36,13 +24,13 @@ internal partial class PrivateLinkAssociationOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal PrivateLinkAssociationOperations(ResourcePrivateLinkClient client) + internal PrivateLinkAssociationOperations (ResourcePrivateLinkClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -68,13 +56,13 @@ internal PrivateLinkAssociationOperations(ResourcePrivateLinkClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -83,82 +71,92 @@ internal PrivateLinkAssociationOperations(ResourcePrivateLinkClient client) /// /// A response object containing the response body and response headers. /// - public async Task> PutWithHttpMessagesAsync(string groupId, string plaId, PrivateLinkAssociationObject parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> PutWithHttpMessagesAsync(string groupId, string plaId, PrivateLinkAssociationObject parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (parameters == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (groupId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "groupId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "groupId"); } if (groupId != null) { if (groupId.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "groupId", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "groupId", 90); } if (groupId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "groupId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "groupId", 1); } } if (plaId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "plaId"); - } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "plaId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("groupId", groupId); tracingParameters.Add("plaId", plaId); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Put", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Put", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Authorization/privateLinkAssociations/{plaId}").ToString(); _url = _url.Replace("{groupId}", System.Uri.EscapeDataString(groupId)); _url = _url.Replace("{plaId}", System.Uri.EscapeDataString(plaId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -170,61 +168,62 @@ internal PrivateLinkAssociationOperations(ResourcePrivateLinkClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 201) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -234,9 +233,10 @@ internal PrivateLinkAssociationOperations(ResourcePrivateLinkClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -247,16 +247,16 @@ internal PrivateLinkAssociationOperations(ResourcePrivateLinkClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } // Deserialize Response @@ -265,25 +265,29 @@ internal PrivateLinkAssociationOperations(ResourcePrivateLinkClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Get a single private link association /// @@ -299,13 +303,13 @@ internal PrivateLinkAssociationOperations(ResourcePrivateLinkClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -314,77 +318,86 @@ internal PrivateLinkAssociationOperations(ResourcePrivateLinkClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string groupId, string plaId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string groupId, string plaId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (groupId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "groupId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "groupId"); } if (groupId != null) { if (groupId.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "groupId", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "groupId", 90); } if (groupId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "groupId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "groupId", 1); } } if (plaId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "plaId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "plaId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("groupId", groupId); tracingParameters.Add("plaId", plaId); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Authorization/privateLinkAssociations/{plaId}").ToString(); _url = _url.Replace("{groupId}", System.Uri.EscapeDataString(groupId)); _url = _url.Replace("{plaId}", System.Uri.EscapeDataString(plaId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -396,55 +409,56 @@ internal PrivateLinkAssociationOperations(ResourcePrivateLinkClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -454,9 +468,10 @@ internal PrivateLinkAssociationOperations(ResourcePrivateLinkClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -467,25 +482,29 @@ internal PrivateLinkAssociationOperations(ResourcePrivateLinkClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Delete a PrivateLinkAssociation /// @@ -501,10 +520,10 @@ internal PrivateLinkAssociationOperations(ResourcePrivateLinkClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -513,77 +532,86 @@ internal PrivateLinkAssociationOperations(ResourcePrivateLinkClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteWithHttpMessagesAsync(string groupId, string plaId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string groupId, string plaId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (groupId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "groupId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "groupId"); } if (groupId != null) { if (groupId.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "groupId", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "groupId", 90); } if (groupId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "groupId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "groupId", 1); } } if (plaId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "plaId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "plaId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("groupId", groupId); tracingParameters.Add("plaId", plaId); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Authorization/privateLinkAssociations/{plaId}").ToString(); _url = _url.Replace("{groupId}", System.Uri.EscapeDataString(groupId)); _url = _url.Replace("{plaId}", System.Uri.EscapeDataString(plaId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -595,55 +623,56 @@ internal PrivateLinkAssociationOperations(ResourcePrivateLinkClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -653,20 +682,25 @@ internal PrivateLinkAssociationOperations(ResourcePrivateLinkClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Get a private link association for a management group scope /// @@ -679,13 +713,13 @@ internal PrivateLinkAssociationOperations(ResourcePrivateLinkClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -694,71 +728,79 @@ internal PrivateLinkAssociationOperations(ResourcePrivateLinkClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListWithHttpMessagesAsync(string groupId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> ListWithHttpMessagesAsync(string groupId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (groupId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "groupId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "groupId"); } if (groupId != null) { if (groupId.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "groupId", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "groupId", 90); } if (groupId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "groupId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "groupId", 1); } } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("groupId", groupId); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Authorization/privateLinkAssociations").ToString(); _url = _url.Replace("{groupId}", System.Uri.EscapeDataString(groupId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -770,55 +812,56 @@ internal PrivateLinkAssociationOperations(ResourcePrivateLinkClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -828,9 +871,10 @@ internal PrivateLinkAssociationOperations(ResourcePrivateLinkClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -841,24 +885,28 @@ internal PrivateLinkAssociationOperations(ResourcePrivateLinkClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/PrivateLinkAssociationOperationsExtensions.cs b/src/Resources/Resources.Management.Sdk/Generated/PrivateLinkAssociationOperationsExtensions.cs new file mode 100644 index 000000000000..40540047b28c --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/PrivateLinkAssociationOperationsExtensions.cs @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +namespace Microsoft.Azure.Management.Resources +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// Extension methods for PrivateLinkAssociationOperations + /// + public static partial class PrivateLinkAssociationOperationsExtensions + { + /// + /// Create a PrivateLinkAssociation + /// + /// + /// The operations group for this extension method. + /// + /// + /// The management group ID. + /// + /// + /// The ID of the PLA + /// + public static PrivateLinkAssociation Put(this IPrivateLinkAssociationOperations operations, string groupId, string plaId, PrivateLinkAssociationObject parameters) + { + return ((IPrivateLinkAssociationOperations)operations).PutAsync(groupId, plaId, parameters).GetAwaiter().GetResult(); + } + + /// + /// Create a PrivateLinkAssociation + /// + /// + /// The operations group for this extension method. + /// + /// + /// The management group ID. + /// + /// + /// The ID of the PLA + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task PutAsync(this IPrivateLinkAssociationOperations operations, string groupId, string plaId, PrivateLinkAssociationObject parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.PutWithHttpMessagesAsync(groupId, plaId, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Get a single private link association + /// + /// + /// The operations group for this extension method. + /// + /// + /// The management group ID. + /// + /// + /// The ID of the PLA + /// + public static PrivateLinkAssociation Get(this IPrivateLinkAssociationOperations operations, string groupId, string plaId) + { + return ((IPrivateLinkAssociationOperations)operations).GetAsync(groupId, plaId).GetAwaiter().GetResult(); + } + + /// + /// Get a single private link association + /// + /// + /// The operations group for this extension method. + /// + /// + /// The management group ID. + /// + /// + /// The ID of the PLA + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IPrivateLinkAssociationOperations operations, string groupId, string plaId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(groupId, plaId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Delete a PrivateLinkAssociation + /// + /// + /// The operations group for this extension method. + /// + /// + /// The management group ID. + /// + /// + /// The ID of the PLA + /// + public static void Delete(this IPrivateLinkAssociationOperations operations, string groupId, string plaId) + { + ((IPrivateLinkAssociationOperations)operations).DeleteAsync(groupId, plaId).GetAwaiter().GetResult(); + } + + /// + /// Delete a PrivateLinkAssociation + /// + /// + /// The operations group for this extension method. + /// + /// + /// The management group ID. + /// + /// + /// The ID of the PLA + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAsync(this IPrivateLinkAssociationOperations operations, string groupId, string plaId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(groupId, plaId, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Get a private link association for a management group scope + /// + /// + /// The operations group for this extension method. + /// + /// + /// The management group ID. + /// + public static PrivateLinkAssociationGetResult List(this IPrivateLinkAssociationOperations operations, string groupId) + { + return ((IPrivateLinkAssociationOperations)operations).ListAsync(groupId).GetAwaiter().GetResult(); + } + + /// + /// Get a private link association for a management group scope + /// + /// + /// The operations group for this extension method. + /// + /// + /// The management group ID. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ListAsync(this IPrivateLinkAssociationOperations operations, string groupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(groupId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } +} diff --git a/src/Resources/Resources.Sdk/Generated/ProviderResourceTypesOperations.cs b/src/Resources/Resources.Management.Sdk/Generated/ProviderResourceTypesOperations.cs similarity index 60% rename from src/Resources/Resources.Sdk/Generated/ProviderResourceTypesOperations.cs rename to src/Resources/Resources.Management.Sdk/Generated/ProviderResourceTypesOperations.cs index 317c80613639..1b48e626a5d8 100644 --- a/src/Resources/Resources.Sdk/Generated/ProviderResourceTypesOperations.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/ProviderResourceTypesOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// ProviderResourceTypesOperations operations. /// - internal partial class ProviderResourceTypesOperations : IServiceOperations, IProviderResourceTypesOperations + internal partial class ProviderResourceTypesOperations : Microsoft.Rest.IServiceOperations, IProviderResourceTypesOperations { /// /// Initializes a new instance of the ProviderResourceTypesOperations class. @@ -36,13 +24,13 @@ internal partial class ProviderResourceTypesOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal ProviderResourceTypesOperations(ResourceManagementClient client) + internal ProviderResourceTypesOperations (ResourceManagementClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -53,26 +41,26 @@ internal ProviderResourceTypesOperations(ResourceManagementClient client) /// /// List the resource types for a specified resource provider. /// - /// - /// The namespace of the resource provider. - /// /// /// The $expand query parameter. For example, to include property aliases in /// response, use $expand=resourceTypes/aliases. /// + /// + /// The namespace of the resource provider. + /// /// /// Headers that will be added to request. /// /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -81,70 +69,81 @@ internal ProviderResourceTypesOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListWithHttpMessagesAsync(string resourceProviderNamespace, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> ListWithHttpMessagesAsync(string resourceProviderNamespace, string expand = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + + if (resourceProviderNamespace == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceProviderNamespace"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceProviderNamespace"); } - if (Client.ApiVersion == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("expand", expand); tracingParameters.Add("resourceProviderNamespace", resourceProviderNamespace); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}/resourceTypes").ToString(); _url = _url.Replace("{resourceProviderNamespace}", System.Uri.EscapeDataString(resourceProviderNamespace)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (expand != null) { _queryParameters.Add(string.Format("$expand={0}", System.Uri.EscapeDataString(expand))); } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -156,55 +155,56 @@ internal ProviderResourceTypesOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -214,9 +214,10 @@ internal ProviderResourceTypesOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -227,24 +228,28 @@ internal ProviderResourceTypesOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/ProviderResourceTypesOperationsExtensions.cs b/src/Resources/Resources.Management.Sdk/Generated/ProviderResourceTypesOperationsExtensions.cs new file mode 100644 index 000000000000..ac17e804c56a --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/ProviderResourceTypesOperationsExtensions.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +namespace Microsoft.Azure.Management.Resources +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// Extension methods for ProviderResourceTypesOperations + /// + public static partial class ProviderResourceTypesOperationsExtensions + { + /// + /// List the resource types for a specified resource provider. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The $expand query parameter. For example, to include property aliases in + /// response, use $expand=resourceTypes/aliases. + /// + /// + /// The namespace of the resource provider. + /// + public static ProviderResourceTypeListResult List(this IProviderResourceTypesOperations operations, string resourceProviderNamespace, string expand = default(string)) + { + return ((IProviderResourceTypesOperations)operations).ListAsync(resourceProviderNamespace, expand).GetAwaiter().GetResult(); + } + + /// + /// List the resource types for a specified resource provider. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The $expand query parameter. For example, to include property aliases in + /// response, use $expand=resourceTypes/aliases. + /// + /// + /// The namespace of the resource provider. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ListAsync(this IProviderResourceTypesOperations operations, string resourceProviderNamespace, string expand = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceProviderNamespace, expand, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } +} diff --git a/src/Resources/Resources.Sdk/Generated/ProvidersOperations.cs b/src/Resources/Resources.Management.Sdk/Generated/ProvidersOperations.cs similarity index 57% rename from src/Resources/Resources.Sdk/Generated/ProvidersOperations.cs rename to src/Resources/Resources.Management.Sdk/Generated/ProvidersOperations.cs index 75f8a919dc6e..ed393b331c52 100644 --- a/src/Resources/Resources.Sdk/Generated/ProvidersOperations.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/ProvidersOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// ProvidersOperations operations. /// - internal partial class ProvidersOperations : IServiceOperations, IProvidersOperations + internal partial class ProvidersOperations : Microsoft.Rest.IServiceOperations, IProvidersOperations { /// /// Initializes a new instance of the ProvidersOperations class. @@ -36,13 +24,13 @@ internal partial class ProvidersOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal ProvidersOperations(ResourceManagementClient client) + internal ProvidersOperations (ResourceManagementClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -62,13 +50,13 @@ internal ProvidersOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -77,65 +65,75 @@ internal ProvidersOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UnregisterWithHttpMessagesAsync(string resourceProviderNamespace, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> UnregisterWithHttpMessagesAsync(string resourceProviderNamespace, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (resourceProviderNamespace == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceProviderNamespace"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceProviderNamespace"); } - if (Client.ApiVersion == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceProviderNamespace", resourceProviderNamespace); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Unregister", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Unregister", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}/unregister").ToString(); _url = _url.Replace("{resourceProviderNamespace}", System.Uri.EscapeDataString(resourceProviderNamespace)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -147,55 +145,56 @@ internal ProvidersOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -205,9 +204,10 @@ internal ProvidersOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -218,25 +218,29 @@ internal ProvidersOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Registers a management group with a resource provider. Use this operation /// to register a resource provider with resource types that can be deployed at @@ -256,10 +260,10 @@ internal ProvidersOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -268,77 +272,86 @@ internal ProvidersOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task RegisterAtManagementGroupScopeWithHttpMessagesAsync(string resourceProviderNamespace, string groupId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task RegisterAtManagementGroupScopeWithHttpMessagesAsync(string resourceProviderNamespace, string groupId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (resourceProviderNamespace == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceProviderNamespace"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceProviderNamespace"); } - if (Client.ApiVersion == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (groupId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "groupId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "groupId"); } if (groupId != null) { if (groupId.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "groupId", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "groupId", 90); } if (groupId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "groupId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "groupId", 1); } } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceProviderNamespace", resourceProviderNamespace); tracingParameters.Add("groupId", groupId); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "RegisterAtManagementGroupScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "RegisterAtManagementGroupScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Management/managementGroups/{groupId}/providers/{resourceProviderNamespace}/register").ToString(); _url = _url.Replace("{resourceProviderNamespace}", System.Uri.EscapeDataString(resourceProviderNamespace)); _url = _url.Replace("{groupId}", System.Uri.EscapeDataString(groupId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -350,55 +363,56 @@ internal ProvidersOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -408,20 +422,25 @@ internal ProvidersOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Get the provider permissions. /// @@ -434,13 +453,13 @@ internal ProvidersOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -449,65 +468,75 @@ internal ProvidersOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ProviderPermissionsWithHttpMessagesAsync(string resourceProviderNamespace, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> ProviderPermissionsWithHttpMessagesAsync(string resourceProviderNamespace, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (resourceProviderNamespace == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceProviderNamespace"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceProviderNamespace"); } - if (Client.ApiVersion == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceProviderNamespace", resourceProviderNamespace); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ProviderPermissions", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ProviderPermissions", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}/providerPermissions").ToString(); _url = _url.Replace("{resourceProviderNamespace}", System.Uri.EscapeDataString(resourceProviderNamespace)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -519,55 +548,56 @@ internal ProvidersOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -577,9 +607,10 @@ internal ProvidersOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -590,25 +621,29 @@ internal ProvidersOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Registers a subscription with a resource provider. /// @@ -624,13 +659,13 @@ internal ProvidersOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -639,66 +674,77 @@ internal ProvidersOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> RegisterWithHttpMessagesAsync(string resourceProviderNamespace, ProviderRegistrationRequest properties = default(ProviderRegistrationRequest), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> RegisterWithHttpMessagesAsync(string resourceProviderNamespace, ProviderRegistrationRequest properties = default(ProviderRegistrationRequest), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + + if (resourceProviderNamespace == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceProviderNamespace"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceProviderNamespace"); } - if (Client.ApiVersion == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceProviderNamespace", resourceProviderNamespace); + tracingParameters.Add("properties", properties); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Register", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Register", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}/register").ToString(); _url = _url.Replace("{resourceProviderNamespace}", System.Uri.EscapeDataString(resourceProviderNamespace)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -710,61 +756,62 @@ internal ProvidersOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(properties != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(properties, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(properties, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -774,9 +821,10 @@ internal ProvidersOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -787,25 +835,29 @@ internal ProvidersOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets all resource providers for a subscription. /// @@ -821,13 +873,13 @@ internal ProvidersOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -836,64 +888,74 @@ internal ProvidersOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string expand = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("expand", expand); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (expand != null) { _queryParameters.Add(string.Format("$expand={0}", System.Uri.EscapeDataString(expand))); } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -905,55 +967,56 @@ internal ProvidersOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -963,9 +1026,10 @@ internal ProvidersOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -976,25 +1040,29 @@ internal ProvidersOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets all resource providers for the tenant. /// @@ -1010,13 +1078,13 @@ internal ProvidersOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1025,59 +1093,68 @@ internal ProvidersOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListAtTenantScopeWithHttpMessagesAsync(string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListAtTenantScopeWithHttpMessagesAsync(string expand = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("expand", expand); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListAtTenantScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListAtTenantScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers").ToString(); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (expand != null) { _queryParameters.Add(string.Format("$expand={0}", System.Uri.EscapeDataString(expand))); } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1089,55 +1166,56 @@ internal ProvidersOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1147,9 +1225,10 @@ internal ProvidersOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -1160,48 +1239,52 @@ internal ProvidersOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets the specified resource provider. /// - /// - /// The namespace of the resource provider. - /// /// /// The $expand query parameter. For example, to include property aliases in /// response, use $expand=resourceTypes/aliases. /// + /// + /// The namespace of the resource provider. + /// /// /// Headers that will be added to request. /// /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1210,70 +1293,81 @@ internal ProvidersOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string resourceProviderNamespace, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceProviderNamespace, string expand = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + + if (resourceProviderNamespace == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceProviderNamespace"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceProviderNamespace"); } - if (Client.ApiVersion == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("expand", expand); tracingParameters.Add("resourceProviderNamespace", resourceProviderNamespace); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}").ToString(); _url = _url.Replace("{resourceProviderNamespace}", System.Uri.EscapeDataString(resourceProviderNamespace)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (expand != null) { _queryParameters.Add(string.Format("$expand={0}", System.Uri.EscapeDataString(expand))); } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1285,55 +1379,56 @@ internal ProvidersOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1343,9 +1438,10 @@ internal ProvidersOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -1356,48 +1452,52 @@ internal ProvidersOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets the specified resource provider at the tenant level. /// - /// - /// The namespace of the resource provider. - /// /// /// The $expand query parameter. For example, to include property aliases in /// response, use $expand=resourceTypes/aliases. /// + /// + /// The namespace of the resource provider. + /// /// /// Headers that will be added to request. /// /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1406,65 +1506,75 @@ internal ProvidersOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetAtTenantScopeWithHttpMessagesAsync(string resourceProviderNamespace, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetAtTenantScopeWithHttpMessagesAsync(string resourceProviderNamespace, string expand = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + + if (resourceProviderNamespace == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceProviderNamespace"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceProviderNamespace"); } - if (Client.ApiVersion == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("expand", expand); tracingParameters.Add("resourceProviderNamespace", resourceProviderNamespace); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetAtTenantScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "GetAtTenantScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/{resourceProviderNamespace}").ToString(); _url = _url.Replace("{resourceProviderNamespace}", System.Uri.EscapeDataString(resourceProviderNamespace)); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (expand != null) { _queryParameters.Add(string.Format("$expand={0}", System.Uri.EscapeDataString(expand))); } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1476,55 +1586,56 @@ internal ProvidersOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1534,9 +1645,10 @@ internal ProvidersOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -1547,25 +1659,29 @@ internal ProvidersOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets all resource providers for a subscription. /// @@ -1578,13 +1694,13 @@ internal ProvidersOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1593,51 +1709,54 @@ internal ProvidersOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1649,55 +1768,56 @@ internal ProvidersOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1707,9 +1827,10 @@ internal ProvidersOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -1720,25 +1841,29 @@ internal ProvidersOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets all resource providers for the tenant. /// @@ -1751,13 +1876,13 @@ internal ProvidersOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1766,51 +1891,54 @@ internal ProvidersOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListAtTenantScopeNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListAtTenantScopeNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListAtTenantScopeNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListAtTenantScopeNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1822,55 +1950,56 @@ internal ProvidersOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1880,9 +2009,10 @@ internal ProvidersOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -1893,24 +2023,28 @@ internal ProvidersOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/ProvidersOperationsExtensions.cs b/src/Resources/Resources.Management.Sdk/Generated/ProvidersOperationsExtensions.cs new file mode 100644 index 000000000000..f6ea696e03e0 --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/ProvidersOperationsExtensions.cs @@ -0,0 +1,385 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +namespace Microsoft.Azure.Management.Resources +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// Extension methods for ProvidersOperations + /// + public static partial class ProvidersOperationsExtensions + { + /// + /// Unregisters a subscription from a resource provider. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The namespace of the resource provider to unregister. + /// + public static Provider Unregister(this IProvidersOperations operations, string resourceProviderNamespace) + { + return ((IProvidersOperations)operations).UnregisterAsync(resourceProviderNamespace).GetAwaiter().GetResult(); + } + + /// + /// Unregisters a subscription from a resource provider. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The namespace of the resource provider to unregister. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task UnregisterAsync(this IProvidersOperations operations, string resourceProviderNamespace, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.UnregisterWithHttpMessagesAsync(resourceProviderNamespace, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Registers a management group with a resource provider. Use this operation + /// to register a resource provider with resource types that can be deployed at + /// the management group scope. It does not recursively register subscriptions + /// within the management group. Instead, you must register subscriptions + /// individually. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The namespace of the resource provider to register. + /// + /// + /// The management group ID. + /// + public static void RegisterAtManagementGroupScope(this IProvidersOperations operations, string resourceProviderNamespace, string groupId) + { + ((IProvidersOperations)operations).RegisterAtManagementGroupScopeAsync(resourceProviderNamespace, groupId).GetAwaiter().GetResult(); + } + + /// + /// Registers a management group with a resource provider. Use this operation + /// to register a resource provider with resource types that can be deployed at + /// the management group scope. It does not recursively register subscriptions + /// within the management group. Instead, you must register subscriptions + /// individually. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The namespace of the resource provider to register. + /// + /// + /// The management group ID. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task RegisterAtManagementGroupScopeAsync(this IProvidersOperations operations, string resourceProviderNamespace, string groupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.RegisterAtManagementGroupScopeWithHttpMessagesAsync(resourceProviderNamespace, groupId, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Get the provider permissions. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The namespace of the resource provider. + /// + public static ProviderPermissionListResult ProviderPermissions(this IProvidersOperations operations, string resourceProviderNamespace) + { + return ((IProvidersOperations)operations).ProviderPermissionsAsync(resourceProviderNamespace).GetAwaiter().GetResult(); + } + + /// + /// Get the provider permissions. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The namespace of the resource provider. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ProviderPermissionsAsync(this IProvidersOperations operations, string resourceProviderNamespace, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ProviderPermissionsWithHttpMessagesAsync(resourceProviderNamespace, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Registers a subscription with a resource provider. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The namespace of the resource provider to register. + /// + public static Provider Register(this IProvidersOperations operations, string resourceProviderNamespace, ProviderRegistrationRequest properties = default(ProviderRegistrationRequest)) + { + return ((IProvidersOperations)operations).RegisterAsync(resourceProviderNamespace, properties).GetAwaiter().GetResult(); + } + + /// + /// Registers a subscription with a resource provider. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The namespace of the resource provider to register. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task RegisterAsync(this IProvidersOperations operations, string resourceProviderNamespace, ProviderRegistrationRequest properties = default(ProviderRegistrationRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.RegisterWithHttpMessagesAsync(resourceProviderNamespace, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets all resource providers for a subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The properties to include in the results. For example, use + /// &$expand=metadata in the query string to retrieve resource provider + /// metadata. To include property aliases in response, use + /// $expand=resourceTypes/aliases. + /// + public static Microsoft.Rest.Azure.IPage List(this IProvidersOperations operations, string expand = default(string)) + { + return ((IProvidersOperations)operations).ListAsync(expand).GetAwaiter().GetResult(); + } + + /// + /// Gets all resource providers for a subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The properties to include in the results. For example, use + /// &$expand=metadata in the query string to retrieve resource provider + /// metadata. To include property aliases in response, use + /// $expand=resourceTypes/aliases. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IProvidersOperations operations, string expand = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(expand, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets all resource providers for the tenant. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The properties to include in the results. For example, use + /// &$expand=metadata in the query string to retrieve resource provider + /// metadata. To include property aliases in response, use + /// $expand=resourceTypes/aliases. + /// + public static Microsoft.Rest.Azure.IPage ListAtTenantScope(this IProvidersOperations operations, string expand = default(string)) + { + return ((IProvidersOperations)operations).ListAtTenantScopeAsync(expand).GetAwaiter().GetResult(); + } + + /// + /// Gets all resource providers for the tenant. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The properties to include in the results. For example, use + /// &$expand=metadata in the query string to retrieve resource provider + /// metadata. To include property aliases in response, use + /// $expand=resourceTypes/aliases. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAtTenantScopeAsync(this IProvidersOperations operations, string expand = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListAtTenantScopeWithHttpMessagesAsync(expand, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets the specified resource provider. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The $expand query parameter. For example, to include property aliases in + /// response, use $expand=resourceTypes/aliases. + /// + /// + /// The namespace of the resource provider. + /// + public static Provider Get(this IProvidersOperations operations, string resourceProviderNamespace, string expand = default(string)) + { + return ((IProvidersOperations)operations).GetAsync(resourceProviderNamespace, expand).GetAwaiter().GetResult(); + } + + /// + /// Gets the specified resource provider. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The $expand query parameter. For example, to include property aliases in + /// response, use $expand=resourceTypes/aliases. + /// + /// + /// The namespace of the resource provider. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IProvidersOperations operations, string resourceProviderNamespace, string expand = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceProviderNamespace, expand, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets the specified resource provider at the tenant level. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The $expand query parameter. For example, to include property aliases in + /// response, use $expand=resourceTypes/aliases. + /// + /// + /// The namespace of the resource provider. + /// + public static Provider GetAtTenantScope(this IProvidersOperations operations, string resourceProviderNamespace, string expand = default(string)) + { + return ((IProvidersOperations)operations).GetAtTenantScopeAsync(resourceProviderNamespace, expand).GetAwaiter().GetResult(); + } + + /// + /// Gets the specified resource provider at the tenant level. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The $expand query parameter. For example, to include property aliases in + /// response, use $expand=resourceTypes/aliases. + /// + /// + /// The namespace of the resource provider. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAtTenantScopeAsync(this IProvidersOperations operations, string resourceProviderNamespace, string expand = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetAtTenantScopeWithHttpMessagesAsync(resourceProviderNamespace, expand, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets all resource providers for a subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IProvidersOperations operations, string nextPageLink) + { + return ((IProvidersOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets all resource providers for a subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IProvidersOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets all resource providers for the tenant. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListAtTenantScopeNext(this IProvidersOperations operations, string nextPageLink) + { + return ((IProvidersOperations)operations).ListAtTenantScopeNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets all resource providers for the tenant. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAtTenantScopeNextAsync(this IProvidersOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListAtTenantScopeNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } +} diff --git a/src/Resources/Resources.Sdk/Generated/ResourceGroupsOperations.cs b/src/Resources/Resources.Management.Sdk/Generated/ResourceGroupsOperations.cs similarity index 56% rename from src/Resources/Resources.Sdk/Generated/ResourceGroupsOperations.cs rename to src/Resources/Resources.Management.Sdk/Generated/ResourceGroupsOperations.cs index 55cab691fb4a..efb025b3a451 100644 --- a/src/Resources/Resources.Sdk/Generated/ResourceGroupsOperations.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/ResourceGroupsOperations.cs @@ -1,32 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// ResourceGroupsOperations operations. /// - internal partial class ResourceGroupsOperations : IServiceOperations, IResourceGroupsOperations + internal partial class ResourceGroupsOperations : Microsoft.Rest.IServiceOperations, IResourceGroupsOperations { /// /// Initializes a new instance of the ResourceGroupsOperations class. @@ -37,13 +24,13 @@ internal partial class ResourceGroupsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal ResourceGroupsOperations(ResourceManagementClient client) + internal ResourceGroupsOperations (ResourceManagementClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -63,10 +50,10 @@ internal ResourceGroupsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -75,80 +62,89 @@ internal ResourceGroupsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CheckExistenceWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CheckExistenceWithHttpMessagesAsync(string resourceGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CheckExistence", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "CheckExistence", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("HEAD"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("HEAD"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -160,55 +156,56 @@ internal ResourceGroupsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 204 && (int)_statusCode != 404) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -218,21 +215,25 @@ internal ResourceGroupsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; - _result.Body = _statusCode == System.Net.HttpStatusCode.NoContent; + _result.Body = (_statusCode == System.Net.HttpStatusCode.NoContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Creates or updates a resource group. /// @@ -250,13 +251,13 @@ internal ResourceGroupsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -265,89 +266,98 @@ internal ResourceGroupsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, ResourceGroup parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, ResourceGroup parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + + if (parameters == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); } } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } - if (parameters != null) + if (this.Client.ApiVersion == null) { - parameters.Validate(); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -359,61 +369,62 @@ internal ResourceGroupsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 201) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -423,9 +434,10 @@ internal ResourceGroupsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -436,16 +448,16 @@ internal ResourceGroupsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } // Deserialize Response @@ -454,33 +466,32 @@ internal ResourceGroupsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Deletes a resource group. + /// When you delete a resource group, all of its resources are also deleted. Deleting a resource group deletes all of its template deployments and currently stored operations. /// - /// - /// When you delete a resource group, all of its resources are also deleted. - /// Deleting a resource group deletes all of its template deployments and - /// currently stored operations. - /// /// /// The name of the resource group to delete. The name is case insensitive. /// @@ -490,16 +501,16 @@ internal ResourceGroupsOperations(ResourceManagementClient client) /// forceDeletionTypes=Microsoft.Compute/virtualMachines,Microsoft.Compute/virtualMachineScaleSets /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string forceDeletionTypes = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string forceDeletionTypes = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, forceDeletionTypes, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, forceDeletionTypes, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// @@ -514,13 +525,13 @@ internal ResourceGroupsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -529,80 +540,89 @@ internal ResourceGroupsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -614,55 +634,56 @@ internal ResourceGroupsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -672,9 +693,10 @@ internal ResourceGroupsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -685,33 +707,34 @@ internal ResourceGroupsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Updates a resource group. - /// - /// /// Resource groups can be updated through a simple PATCH operation to a group /// address. The format of the request is the same as that for creating a /// resource group. If a field is unspecified, the current value is retained. - /// + /// /// /// The name of the resource group to update. The name is case insensitive. /// @@ -724,13 +747,13 @@ internal ResourceGroupsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -739,85 +762,94 @@ internal ResourceGroupsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, ResourceGroupPatchable parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, ResourceGroupPatchable parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + + if (parameters == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); + } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); } } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PATCH"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -829,61 +861,62 @@ internal ResourceGroupsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -893,9 +926,10 @@ internal ResourceGroupsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -906,25 +940,29 @@ internal ResourceGroupsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Captures the specified resource group as a template. /// @@ -935,23 +973,23 @@ internal ResourceGroupsOperations(ResourceManagementClient client) /// Parameters for exporting the template. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> ExportTemplateWithHttpMessagesAsync(string resourceGroupName, ExportTemplateRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> ExportTemplateWithHttpMessagesAsync(string resourceGroupName, ExportTemplateRequest parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginExportTemplateWithHttpMessagesAsync(resourceGroupName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginExportTemplateWithHttpMessagesAsync(resourceGroupName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// /// Gets all the resource groups for a subscription. /// /// - /// OData parameters to apply to the operation. + /// /// /// /// Headers that will be added to request. @@ -959,13 +997,13 @@ internal ResourceGroupsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -974,68 +1012,78 @@ internal ResourceGroupsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("odataQuery", odataQuery); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourcegroups").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (odataQuery != null) { - var _odataFilter = odataQuery.ToString(); - if (!string.IsNullOrEmpty(_odataFilter)) + var _resourceGroupFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_resourceGroupFilter)) { - _queryParameters.Add(_odataFilter); + _queryParameters.Add(_resourceGroupFilter); } } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1047,55 +1095,56 @@ internal ResourceGroupsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1105,9 +1154,10 @@ internal ResourceGroupsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -1118,33 +1168,34 @@ internal ResourceGroupsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Deletes a resource group. - /// - /// /// When you delete a resource group, all of its resources are also deleted. /// Deleting a resource group deletes all of its template deployments and /// currently stored operations. - /// + /// /// /// The name of the resource group to delete. The name is case insensitive. /// @@ -1159,10 +1210,10 @@ internal ResourceGroupsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1171,85 +1222,95 @@ internal ResourceGroupsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string forceDeletionTypes = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string forceDeletionTypes = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("forceDeletionTypes", forceDeletionTypes); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (forceDeletionTypes != null) { _queryParameters.Add(string.Format("forceDeletionTypes={0}", System.Uri.EscapeDataString(forceDeletionTypes))); } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1261,55 +1322,56 @@ internal ResourceGroupsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1319,20 +1381,25 @@ internal ResourceGroupsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Captures the specified resource group as a template. /// @@ -1348,13 +1415,13 @@ internal ResourceGroupsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1363,81 +1430,91 @@ internal ResourceGroupsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginExportTemplateWithHttpMessagesAsync(string resourceGroupName, ExportTemplateRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginExportTemplateWithHttpMessagesAsync(string resourceGroupName, ExportTemplateRequest parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (parameters == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); } + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (parameters == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginExportTemplate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginExportTemplate", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/exportTemplate").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1449,61 +1526,62 @@ internal ResourceGroupsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1513,9 +1591,10 @@ internal ResourceGroupsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -1526,25 +1605,29 @@ internal ResourceGroupsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets all the resource groups for a subscription. /// @@ -1557,13 +1640,13 @@ internal ResourceGroupsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1572,51 +1655,54 @@ internal ResourceGroupsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1628,55 +1714,56 @@ internal ResourceGroupsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1686,9 +1773,10 @@ internal ResourceGroupsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -1699,24 +1787,28 @@ internal ResourceGroupsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/ResourceGroupsOperationsExtensions.cs b/src/Resources/Resources.Management.Sdk/Generated/ResourceGroupsOperationsExtensions.cs new file mode 100644 index 000000000000..66b6830ebb99 --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/ResourceGroupsOperationsExtensions.cs @@ -0,0 +1,376 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +namespace Microsoft.Azure.Management.Resources +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// Extension methods for ResourceGroupsOperations + /// + public static partial class ResourceGroupsOperationsExtensions + { + /// + /// Checks whether a resource group exists. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group to check. The name is case insensitive. + /// + public static bool CheckExistence(this IResourceGroupsOperations operations, string resourceGroupName) + { + return ((IResourceGroupsOperations)operations).CheckExistenceAsync(resourceGroupName).GetAwaiter().GetResult(); + } + + /// + /// Checks whether a resource group exists. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group to check. The name is case insensitive. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CheckExistenceAsync(this IResourceGroupsOperations operations, string resourceGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CheckExistenceWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Creates or updates a resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group to create or update. Can include + /// alphanumeric, underscore, parentheses, hyphen, period (except at end), and + /// Unicode characters that match the allowed characters. + /// + public static ResourceGroup CreateOrUpdate(this IResourceGroupsOperations operations, string resourceGroupName, ResourceGroup parameters) + { + return ((IResourceGroupsOperations)operations).CreateOrUpdateAsync(resourceGroupName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group to create or update. Can include + /// alphanumeric, underscore, parentheses, hyphen, period (except at end), and + /// Unicode characters that match the allowed characters. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateOrUpdateAsync(this IResourceGroupsOperations operations, string resourceGroupName, ResourceGroup parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// When you delete a resource group, all of its resources are also deleted. + /// Deleting a resource group deletes all of its template deployments and + /// currently stored operations. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group to delete. The name is case insensitive. + /// + /// + /// The resource types you want to force delete. Currently, only the following + /// is supported: + /// forceDeletionTypes=Microsoft.Compute/virtualMachines,Microsoft.Compute/virtualMachineScaleSets + /// + public static void Delete(this IResourceGroupsOperations operations, string resourceGroupName, string forceDeletionTypes = default(string)) + { + ((IResourceGroupsOperations)operations).DeleteAsync(resourceGroupName, forceDeletionTypes).GetAwaiter().GetResult(); + } + + /// + /// When you delete a resource group, all of its resources are also deleted. + /// Deleting a resource group deletes all of its template deployments and + /// currently stored operations. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group to delete. The name is case insensitive. + /// + /// + /// The resource types you want to force delete. Currently, only the following + /// is supported: + /// forceDeletionTypes=Microsoft.Compute/virtualMachines,Microsoft.Compute/virtualMachineScaleSets + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAsync(this IResourceGroupsOperations operations, string resourceGroupName, string forceDeletionTypes = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, forceDeletionTypes, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Gets a resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group to get. The name is case insensitive. + /// + public static ResourceGroup Get(this IResourceGroupsOperations operations, string resourceGroupName) + { + return ((IResourceGroupsOperations)operations).GetAsync(resourceGroupName).GetAwaiter().GetResult(); + } + + /// + /// Gets a resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group to get. The name is case insensitive. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IResourceGroupsOperations operations, string resourceGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Resource groups can be updated through a simple PATCH operation to a group + /// address. The format of the request is the same as that for creating a + /// resource group. If a field is unspecified, the current value is retained. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group to update. The name is case insensitive. + /// + public static ResourceGroup Update(this IResourceGroupsOperations operations, string resourceGroupName, ResourceGroupPatchable parameters) + { + return ((IResourceGroupsOperations)operations).UpdateAsync(resourceGroupName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Resource groups can be updated through a simple PATCH operation to a group + /// address. The format of the request is the same as that for creating a + /// resource group. If a field is unspecified, the current value is retained. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group to update. The name is case insensitive. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task UpdateAsync(this IResourceGroupsOperations operations, string resourceGroupName, ResourceGroupPatchable parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Captures the specified resource group as a template. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + public static ResourceGroupExportResult ExportTemplate(this IResourceGroupsOperations operations, string resourceGroupName, ExportTemplateRequest parameters) + { + return ((IResourceGroupsOperations)operations).ExportTemplateAsync(resourceGroupName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Captures the specified resource group as a template. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ExportTemplateAsync(this IResourceGroupsOperations operations, string resourceGroupName, ExportTemplateRequest parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ExportTemplateWithHttpMessagesAsync(resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets all the resource groups for a subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + public static Microsoft.Rest.Azure.IPage List(this IResourceGroupsOperations operations, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery)) + { + return ((IResourceGroupsOperations)operations).ListAsync(odataQuery).GetAwaiter().GetResult(); + } + + /// + /// Gets all the resource groups for a subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IResourceGroupsOperations operations, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(odataQuery, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// When you delete a resource group, all of its resources are also deleted. + /// Deleting a resource group deletes all of its template deployments and + /// currently stored operations. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group to delete. The name is case insensitive. + /// + /// + /// The resource types you want to force delete. Currently, only the following + /// is supported: + /// forceDeletionTypes=Microsoft.Compute/virtualMachines,Microsoft.Compute/virtualMachineScaleSets + /// + public static void BeginDelete(this IResourceGroupsOperations operations, string resourceGroupName, string forceDeletionTypes = default(string)) + { + ((IResourceGroupsOperations)operations).BeginDeleteAsync(resourceGroupName, forceDeletionTypes).GetAwaiter().GetResult(); + } + + /// + /// When you delete a resource group, all of its resources are also deleted. + /// Deleting a resource group deletes all of its template deployments and + /// currently stored operations. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group to delete. The name is case insensitive. + /// + /// + /// The resource types you want to force delete. Currently, only the following + /// is supported: + /// forceDeletionTypes=Microsoft.Compute/virtualMachines,Microsoft.Compute/virtualMachineScaleSets + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginDeleteAsync(this IResourceGroupsOperations operations, string resourceGroupName, string forceDeletionTypes = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, forceDeletionTypes, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Captures the specified resource group as a template. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + public static ResourceGroupExportResult BeginExportTemplate(this IResourceGroupsOperations operations, string resourceGroupName, ExportTemplateRequest parameters) + { + return ((IResourceGroupsOperations)operations).BeginExportTemplateAsync(resourceGroupName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Captures the specified resource group as a template. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginExportTemplateAsync(this IResourceGroupsOperations operations, string resourceGroupName, ExportTemplateRequest parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginExportTemplateWithHttpMessagesAsync(resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets all the resource groups for a subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IResourceGroupsOperations operations, string nextPageLink) + { + return ((IResourceGroupsOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets all the resource groups for a subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IResourceGroupsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } +} diff --git a/src/Resources/Resources.Sdk/Generated/ResourceManagementClient.cs b/src/Resources/Resources.Management.Sdk/Generated/ResourceManagementClient.cs similarity index 64% rename from src/Resources/Resources.Sdk/Generated/ResourceManagementClient.cs rename to src/Resources/Resources.Management.Sdk/Generated/ResourceManagementClient.cs index 0cd029e9ae3f..5690e0096a74 100644 --- a/src/Resources/Resources.Sdk/Generated/ResourceManagementClient.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/ResourceManagementClient.cs @@ -1,119 +1,97 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Serialization; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; /// /// Provides operations for working with resources and resource groups. /// - public partial class ResourceManagementClient : ServiceClient, IResourceManagementClient, IAzureClient + public partial class ResourceManagementClient : Microsoft.Rest.ServiceClient, IResourceManagementClient, IAzureClient { /// /// The base URI of the service. /// public System.Uri BaseUri { get; set; } - /// /// Gets or sets json serialization settings. /// - public JsonSerializerSettings SerializationSettings { get; private set; } - + public Newtonsoft.Json.JsonSerializerSettings SerializationSettings { get; private set; } /// /// Gets or sets json deserialization settings. /// - public JsonSerializerSettings DeserializationSettings { get; private set; } - + public Newtonsoft.Json.JsonSerializerSettings DeserializationSettings { get; private set; } /// /// Credentials needed for the client to connect to Azure. /// - public ServiceClientCredentials Credentials { get; private set; } + public Microsoft.Rest.ServiceClientCredentials Credentials { get; private set; } /// - /// The Microsoft Azure subscription ID. + /// The API version to use for this operation. /// - public string SubscriptionId { get; set; } + public string ApiVersion { get; private set; } /// - /// The API version to use for this operation. + /// The Microsoft Azure subscription ID. /// - public string ApiVersion { get; private set; } + public string SubscriptionId { get; set;} /// /// The preferred language for the response. /// - public string AcceptLanguage { get; set; } + public string AcceptLanguage { get; set;} /// - /// The retry timeout in seconds for Long Running Operations. Default value is - /// 30. + /// The retry timeout in seconds for Long Running Operations. Default + /// /// value is 30. /// - public int? LongRunningOperationRetryTimeout { get; set; } + public int? LongRunningOperationRetryTimeout { get; set;} /// - /// Whether a unique x-ms-client-request-id should be generated. When set to - /// true a unique x-ms-client-request-id value is generated and included in - /// each request. Default is true. + /// Whether a unique x-ms-client-request-id should be generated. When + /// /// set to true a unique x-ms-client-request-id value is generated and + /// /// included in each request. Default is true. /// - public bool? GenerateClientRequestId { get; set; } + public bool? GenerateClientRequestId { get; set;} /// - /// Gets the IOperations. + /// Gets the IOperations /// public virtual IOperations Operations { get; private set; } - /// - /// Gets the IDeploymentsOperations. + /// Gets the IDeploymentsOperations /// public virtual IDeploymentsOperations Deployments { get; private set; } - /// - /// Gets the IProvidersOperations. + /// Gets the IProvidersOperations /// public virtual IProvidersOperations Providers { get; private set; } - /// - /// Gets the IProviderResourceTypesOperations. + /// Gets the IProviderResourceTypesOperations /// public virtual IProviderResourceTypesOperations ProviderResourceTypes { get; private set; } - /// - /// Gets the IResourcesOperations. + /// Gets the IResourcesOperations /// public virtual IResourcesOperations Resources { get; private set; } - /// - /// Gets the IResourceGroupsOperations. + /// Gets the IResourceGroupsOperations /// public virtual IResourceGroupsOperations ResourceGroups { get; private set; } - /// - /// Gets the ITagsOperations. + /// Gets the ITagsOperations /// public virtual ITagsOperations Tags { get; private set; } - /// - /// Gets the IDeploymentOperations. + /// Gets the IDeploymentOperations /// public virtual IDeploymentOperations DeploymentOperations { get; private set; } - /// /// Initializes a new instance of the ResourceManagementClient class. /// @@ -122,24 +100,22 @@ public partial class ResourceManagementClient : ServiceClient /// /// True: will dispose the provided httpClient on calling ResourceManagementClient.Dispose(). False: will not dispose provided httpClient - protected ResourceManagementClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient) + protected ResourceManagementClient(System.Net.Http.HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient) { - Initialize(); + this.Initialize(); } - /// /// Initializes a new instance of the ResourceManagementClient class. /// /// /// Optional. The delegating handlers to add to the http client pipeline. /// - protected ResourceManagementClient(params DelegatingHandler[] handlers) : base(handlers) + protected ResourceManagementClient(params System.Net.Http.DelegatingHandler[] handlers) : base(handlers) { - Initialize(); + this.Initialize(); } - /// - /// Initializes a new instance of the ResourceManagementClient class. + /// Initializes a new instance of the ResourceManagementClient class. /// /// /// Optional. The http client handler used to handle http transport. @@ -147,11 +123,10 @@ protected ResourceManagementClient(params DelegatingHandler[] handlers) : base(h /// /// Optional. The delegating handlers to add to the http client pipeline. /// - protected ResourceManagementClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers) + protected ResourceManagementClient(System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : base(rootHandler, handlers) { - Initialize(); + this.Initialize(); } - /// /// Initializes a new instance of the ResourceManagementClient class. /// @@ -164,15 +139,14 @@ protected ResourceManagementClient(HttpClientHandler rootHandler, params Delegat /// /// Thrown when a required parameter is null /// - protected ResourceManagementClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) + protected ResourceManagementClient(System.Uri baseUri, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) { throw new System.ArgumentNullException("baseUri"); } - BaseUri = baseUri; + this.BaseUri = baseUri; } - /// /// Initializes a new instance of the ResourceManagementClient class. /// @@ -188,15 +162,15 @@ protected ResourceManagementClient(System.Uri baseUri, params DelegatingHandler[ /// /// Thrown when a required parameter is null /// - protected ResourceManagementClient(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + protected ResourceManagementClient(System.Uri baseUri, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) { throw new System.ArgumentNullException("baseUri"); } - BaseUri = baseUri; + + this.BaseUri = baseUri; } - /// /// Initializes a new instance of the ResourceManagementClient class. /// @@ -209,23 +183,23 @@ protected ResourceManagementClient(System.Uri baseUri, HttpClientHandler rootHan /// /// Thrown when a required parameter is null /// - public ResourceManagementClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + public ResourceManagementClient(Microsoft.Rest.ServiceClientCredentials credentials, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) { if (credentials == null) { throw new System.ArgumentNullException("credentials"); } - Credentials = credentials; - if (Credentials != null) + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the ResourceManagementClient class. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// @@ -236,23 +210,23 @@ public ResourceManagementClient(ServiceClientCredentials credentials, params Del /// /// Thrown when a required parameter is null /// - public ResourceManagementClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient) + public ResourceManagementClient(Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient) { if (credentials == null) { throw new System.ArgumentNullException("credentials"); } - Credentials = credentials; - if (Credentials != null) + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the ResourceManagementClient class. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// @@ -264,26 +238,26 @@ public ResourceManagementClient(ServiceClientCredentials credentials, HttpClient /// /// Thrown when a required parameter is null /// - public ResourceManagementClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + public ResourceManagementClient(Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (credentials == null) { throw new System.ArgumentNullException("credentials"); } - Credentials = credentials; - if (Credentials != null) + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the ResourceManagementClient class. /// /// /// Optional. The base URI of the service. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// @@ -292,7 +266,7 @@ public ResourceManagementClient(ServiceClientCredentials credentials, HttpClient /// /// Thrown when a required parameter is null /// - public ResourceManagementClient(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + public ResourceManagementClient(System.Uri baseUri, Microsoft.Rest.ServiceClientCredentials credentials, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) { @@ -302,33 +276,30 @@ public ResourceManagementClient(System.Uri baseUri, ServiceClientCredentials cre { throw new System.ArgumentNullException("credentials"); } - BaseUri = baseUri; - Credentials = credentials; - if (Credentials != null) + this.BaseUri = baseUri; + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the ResourceManagementClient class. /// /// /// Optional. The base URI of the service. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// /// Optional. The http client handler used to handle http transport. /// - /// - /// Optional. The delegating handlers to add to the http client pipeline. - /// /// /// Thrown when a required parameter is null /// - public ResourceManagementClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + public ResourceManagementClient(System.Uri baseUri, Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) { @@ -338,65 +309,66 @@ public ResourceManagementClient(System.Uri baseUri, ServiceClientCredentials cre { throw new System.ArgumentNullException("credentials"); } - BaseUri = baseUri; - Credentials = credentials; - if (Credentials != null) + this.BaseUri = baseUri; + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// An optional partial-method to perform custom initialization. /// partial void CustomInitialize(); + /// /// Initializes client properties. /// private void Initialize() { - Operations = new Operations(this); - Deployments = new DeploymentsOperations(this); - Providers = new ProvidersOperations(this); - ProviderResourceTypes = new ProviderResourceTypesOperations(this); - Resources = new ResourcesOperations(this); - ResourceGroups = new ResourceGroupsOperations(this); - Tags = new TagsOperations(this); - DeploymentOperations = new DeploymentOperations(this); - BaseUri = new System.Uri("https://management.azure.com"); - ApiVersion = "2021-04-01"; - AcceptLanguage = "en-US"; - LongRunningOperationRetryTimeout = 30; - GenerateClientRequestId = true; - SerializationSettings = new JsonSerializerSettings + this.Operations = new Operations(this); + this.Deployments = new DeploymentsOperations(this); + this.Providers = new ProvidersOperations(this); + this.ProviderResourceTypes = new ProviderResourceTypesOperations(this); + this.Resources = new ResourcesOperations(this); + this.ResourceGroups = new ResourceGroupsOperations(this); + this.Tags = new TagsOperations(this); + this.DeploymentOperations = new DeploymentOperations(this); + this.BaseUri = new System.Uri("https://management.azure.com"); + this.ApiVersion = "2021-04-01"; + this.AcceptLanguage = "en-US"; + this.LongRunningOperationRetryTimeout = 30; + this.GenerateClientRequestId = true; + SerializationSettings = new Newtonsoft.Json.JsonSerializerSettings { Formatting = Newtonsoft.Json.Formatting.Indented, DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, - ContractResolver = new ReadOnlyJsonContractResolver(), - Converters = new List + ContractResolver = new Microsoft.Rest.Serialization.ReadOnlyJsonContractResolver(), + Converters = new System.Collections.Generic.List { - new Iso8601TimeSpanConverter() + new Microsoft.Rest.Serialization.Iso8601TimeSpanConverter() } }; - SerializationSettings.Converters.Add(new TransformationJsonConverter()); - DeserializationSettings = new JsonSerializerSettings + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.TransformationJsonConverter()); + DeserializationSettings = new Newtonsoft.Json.JsonSerializerSettings { DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, - ContractResolver = new ReadOnlyJsonContractResolver(), - Converters = new List + ContractResolver = new Microsoft.Rest.Serialization.ReadOnlyJsonContractResolver(), + Converters = new System.Collections.Generic.List { - new Iso8601TimeSpanConverter() + new Microsoft.Rest.Serialization.Iso8601TimeSpanConverter() } }; CustomInitialize(); - DeserializationSettings.Converters.Add(new TransformationJsonConverter()); - DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.TransformationJsonConverter()); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Azure.CloudErrorJsonConverter()); } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/ResourceManagementPrivateLinkOperations.cs b/src/Resources/Resources.Management.Sdk/Generated/ResourceManagementPrivateLinkOperations.cs similarity index 56% rename from src/Resources/Resources.Sdk/Generated/ResourceManagementPrivateLinkOperations.cs rename to src/Resources/Resources.Management.Sdk/Generated/ResourceManagementPrivateLinkOperations.cs index b8416aed0852..a4f241e8b3a2 100644 --- a/src/Resources/Resources.Sdk/Generated/ResourceManagementPrivateLinkOperations.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/ResourceManagementPrivateLinkOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// ResourceManagementPrivateLinkOperations operations. /// - internal partial class ResourceManagementPrivateLinkOperations : IServiceOperations, IResourceManagementPrivateLinkOperations + internal partial class ResourceManagementPrivateLinkOperations : Microsoft.Rest.IServiceOperations, IResourceManagementPrivateLinkOperations { /// /// Initializes a new instance of the ResourceManagementPrivateLinkOperations class. @@ -36,13 +24,13 @@ internal partial class ResourceManagementPrivateLinkOperations : IServiceOperati /// /// Thrown when a required parameter is null /// - internal ResourceManagementPrivateLinkOperations(ResourcePrivateLinkClient client) + internal ResourceManagementPrivateLinkOperations (ResourcePrivateLinkClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -68,13 +56,13 @@ internal ResourceManagementPrivateLinkOperations(ResourcePrivateLinkClient clien /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -83,87 +71,98 @@ internal ResourceManagementPrivateLinkOperations(ResourcePrivateLinkClient clien /// /// A response object containing the response body and response headers. /// - public async Task> PutWithHttpMessagesAsync(string resourceGroupName, string rmplName, ResourceManagementPrivateLinkLocation parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> PutWithHttpMessagesAsync(string resourceGroupName, string rmplName, ResourceManagementPrivateLinkLocation parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (parameters == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); + } + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (rmplName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "rmplName"); - } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "rmplName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("rmplName", rmplName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Put", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Put", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/resourceManagementPrivateLinks/{rmplName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{rmplName}", System.Uri.EscapeDataString(rmplName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -175,61 +174,62 @@ internal ResourceManagementPrivateLinkOperations(ResourcePrivateLinkClient clien _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 201) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -239,9 +239,10 @@ internal ResourceManagementPrivateLinkOperations(ResourcePrivateLinkClient clien throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -252,16 +253,16 @@ internal ResourceManagementPrivateLinkOperations(ResourcePrivateLinkClient clien _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } // Deserialize Response @@ -270,25 +271,29 @@ internal ResourceManagementPrivateLinkOperations(ResourcePrivateLinkClient clien _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Get a resource management private link(resource-level). /// @@ -304,13 +309,13 @@ internal ResourceManagementPrivateLinkOperations(ResourcePrivateLinkClient clien /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -319,82 +324,92 @@ internal ResourceManagementPrivateLinkOperations(ResourcePrivateLinkClient clien /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string rmplName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string rmplName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (rmplName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "rmplName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "rmplName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("rmplName", rmplName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/resourceManagementPrivateLinks/{rmplName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{rmplName}", System.Uri.EscapeDataString(rmplName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -406,55 +421,56 @@ internal ResourceManagementPrivateLinkOperations(ResourcePrivateLinkClient clien _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -464,9 +480,10 @@ internal ResourceManagementPrivateLinkOperations(ResourcePrivateLinkClient clien throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -477,25 +494,29 @@ internal ResourceManagementPrivateLinkOperations(ResourcePrivateLinkClient clien _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Delete a resource management private link. /// @@ -511,10 +532,10 @@ internal ResourceManagementPrivateLinkOperations(ResourcePrivateLinkClient clien /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -523,82 +544,92 @@ internal ResourceManagementPrivateLinkOperations(ResourcePrivateLinkClient clien /// /// A response object containing the response body and response headers. /// - public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string rmplName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string rmplName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (rmplName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "rmplName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "rmplName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("rmplName", rmplName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/resourceManagementPrivateLinks/{rmplName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{rmplName}", System.Uri.EscapeDataString(rmplName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -610,55 +641,56 @@ internal ResourceManagementPrivateLinkOperations(ResourcePrivateLinkClient clien _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -668,20 +700,25 @@ internal ResourceManagementPrivateLinkOperations(ResourcePrivateLinkClient clien throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Get all the resource management private links in a subscription. /// @@ -691,13 +728,13 @@ internal ResourceManagementPrivateLinkOperations(ResourcePrivateLinkClient clien /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -706,59 +743,68 @@ internal ResourceManagementPrivateLinkOperations(ResourcePrivateLinkClient clien /// /// A response object containing the response body and response headers. /// - public async Task> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.ApiVersion == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Authorization/resourceManagementPrivateLinks").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -770,55 +816,56 @@ internal ResourceManagementPrivateLinkOperations(ResourcePrivateLinkClient clien _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -828,9 +875,10 @@ internal ResourceManagementPrivateLinkOperations(ResourcePrivateLinkClient clien throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -841,25 +889,29 @@ internal ResourceManagementPrivateLinkOperations(ResourcePrivateLinkClient clien _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Get all the resource management private links in a resource group. /// @@ -872,13 +924,13 @@ internal ResourceManagementPrivateLinkOperations(ResourcePrivateLinkClient clien /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -887,76 +939,85 @@ internal ResourceManagementPrivateLinkOperations(ResourcePrivateLinkClient clien /// /// A response object containing the response body and response headers. /// - public async Task> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/resourceManagementPrivateLinks").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -968,55 +1029,56 @@ internal ResourceManagementPrivateLinkOperations(ResourcePrivateLinkClient clien _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1026,9 +1088,10 @@ internal ResourceManagementPrivateLinkOperations(ResourcePrivateLinkClient clien throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -1039,24 +1102,28 @@ internal ResourceManagementPrivateLinkOperations(ResourcePrivateLinkClient clien _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/ResourceManagementPrivateLinkOperationsExtensions.cs b/src/Resources/Resources.Management.Sdk/Generated/ResourceManagementPrivateLinkOperationsExtensions.cs new file mode 100644 index 000000000000..d249e1586b5d --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/ResourceManagementPrivateLinkOperationsExtensions.cs @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +namespace Microsoft.Azure.Management.Resources +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// Extension methods for ResourceManagementPrivateLinkOperations + /// + public static partial class ResourceManagementPrivateLinkOperationsExtensions + { + /// + /// Create a resource management group private link. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the resource management private link. + /// + public static ResourceManagementPrivateLink Put(this IResourceManagementPrivateLinkOperations operations, string resourceGroupName, string rmplName, ResourceManagementPrivateLinkLocation parameters) + { + return ((IResourceManagementPrivateLinkOperations)operations).PutAsync(resourceGroupName, rmplName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Create a resource management group private link. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the resource management private link. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task PutAsync(this IResourceManagementPrivateLinkOperations operations, string resourceGroupName, string rmplName, ResourceManagementPrivateLinkLocation parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.PutWithHttpMessagesAsync(resourceGroupName, rmplName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Get a resource management private link(resource-level). + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the resource management private link. + /// + public static ResourceManagementPrivateLink Get(this IResourceManagementPrivateLinkOperations operations, string resourceGroupName, string rmplName) + { + return ((IResourceManagementPrivateLinkOperations)operations).GetAsync(resourceGroupName, rmplName).GetAwaiter().GetResult(); + } + + /// + /// Get a resource management private link(resource-level). + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the resource management private link. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IResourceManagementPrivateLinkOperations operations, string resourceGroupName, string rmplName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, rmplName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Delete a resource management private link. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the resource management private link. + /// + public static void Delete(this IResourceManagementPrivateLinkOperations operations, string resourceGroupName, string rmplName) + { + ((IResourceManagementPrivateLinkOperations)operations).DeleteAsync(resourceGroupName, rmplName).GetAwaiter().GetResult(); + } + + /// + /// Delete a resource management private link. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the resource management private link. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAsync(this IResourceManagementPrivateLinkOperations operations, string resourceGroupName, string rmplName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, rmplName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Get all the resource management private links in a subscription. + /// + /// + /// The operations group for this extension method. + /// + public static ResourceManagementPrivateLinkListResult List(this IResourceManagementPrivateLinkOperations operations) + { + return ((IResourceManagementPrivateLinkOperations)operations).ListAsync().GetAwaiter().GetResult(); + } + + /// + /// Get all the resource management private links in a subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ListAsync(this IResourceManagementPrivateLinkOperations operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Get all the resource management private links in a resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + public static ResourceManagementPrivateLinkListResult ListByResourceGroup(this IResourceManagementPrivateLinkOperations operations, string resourceGroupName) + { + return ((IResourceManagementPrivateLinkOperations)operations).ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult(); + } + + /// + /// Get all the resource management private links in a resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ListByResourceGroupAsync(this IResourceManagementPrivateLinkOperations operations, string resourceGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } +} diff --git a/src/Resources/Resources.Sdk/Generated/ResourcePrivateLinkClient.cs b/src/Resources/Resources.Management.Sdk/Generated/ResourcePrivateLinkClient.cs similarity index 66% rename from src/Resources/Resources.Sdk/Generated/ResourcePrivateLinkClient.cs rename to src/Resources/Resources.Management.Sdk/Generated/ResourcePrivateLinkClient.cs index bb455edaf2c1..fffa2de0fc6e 100644 --- a/src/Resources/Resources.Sdk/Generated/ResourcePrivateLinkClient.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/ResourcePrivateLinkClient.cs @@ -1,50 +1,36 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Serialization; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; /// /// Provides operations for managing private link resources /// - public partial class ResourcePrivateLinkClient : ServiceClient, IResourcePrivateLinkClient, IAzureClient + public partial class ResourcePrivateLinkClient : Microsoft.Rest.ServiceClient, IResourcePrivateLinkClient, IAzureClient { /// /// The base URI of the service. /// public System.Uri BaseUri { get; set; } - /// /// Gets or sets json serialization settings. /// - public JsonSerializerSettings SerializationSettings { get; private set; } - + public Newtonsoft.Json.JsonSerializerSettings SerializationSettings { get; private set; } /// /// Gets or sets json deserialization settings. /// - public JsonSerializerSettings DeserializationSettings { get; private set; } - + public Newtonsoft.Json.JsonSerializerSettings DeserializationSettings { get; private set; } /// /// Credentials needed for the client to connect to Azure. /// - public ServiceClientCredentials Credentials { get; private set; } + public Microsoft.Rest.ServiceClientCredentials Credentials { get; private set; } /// /// The API version to use for this operation. @@ -54,36 +40,34 @@ public partial class ResourcePrivateLinkClient : ServiceClient /// The ID of the target subscription. /// - public string SubscriptionId { get; set; } + public string SubscriptionId { get; set;} /// /// The preferred language for the response. /// - public string AcceptLanguage { get; set; } + public string AcceptLanguage { get; set;} /// - /// The retry timeout in seconds for Long Running Operations. Default value is - /// 30. + /// The retry timeout in seconds for Long Running Operations. Default + /// /// value is 30. /// - public int? LongRunningOperationRetryTimeout { get; set; } + public int? LongRunningOperationRetryTimeout { get; set;} /// - /// Whether a unique x-ms-client-request-id should be generated. When set to - /// true a unique x-ms-client-request-id value is generated and included in - /// each request. Default is true. + /// Whether a unique x-ms-client-request-id should be generated. When + /// /// set to true a unique x-ms-client-request-id value is generated and + /// /// included in each request. Default is true. /// - public bool? GenerateClientRequestId { get; set; } + public bool? GenerateClientRequestId { get; set;} /// - /// Gets the IPrivateLinkAssociationOperations. + /// Gets the IPrivateLinkAssociationOperations /// public virtual IPrivateLinkAssociationOperations PrivateLinkAssociation { get; private set; } - /// - /// Gets the IResourceManagementPrivateLinkOperations. + /// Gets the IResourceManagementPrivateLinkOperations /// public virtual IResourceManagementPrivateLinkOperations ResourceManagementPrivateLink { get; private set; } - /// /// Initializes a new instance of the ResourcePrivateLinkClient class. /// @@ -92,24 +76,22 @@ public partial class ResourcePrivateLinkClient : ServiceClient /// /// True: will dispose the provided httpClient on calling ResourcePrivateLinkClient.Dispose(). False: will not dispose provided httpClient - protected ResourcePrivateLinkClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient) + protected ResourcePrivateLinkClient(System.Net.Http.HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient) { - Initialize(); + this.Initialize(); } - /// /// Initializes a new instance of the ResourcePrivateLinkClient class. /// /// /// Optional. The delegating handlers to add to the http client pipeline. /// - protected ResourcePrivateLinkClient(params DelegatingHandler[] handlers) : base(handlers) + protected ResourcePrivateLinkClient(params System.Net.Http.DelegatingHandler[] handlers) : base(handlers) { - Initialize(); + this.Initialize(); } - /// - /// Initializes a new instance of the ResourcePrivateLinkClient class. + /// Initializes a new instance of the ResourcePrivateLinkClient class. /// /// /// Optional. The http client handler used to handle http transport. @@ -117,11 +99,10 @@ protected ResourcePrivateLinkClient(params DelegatingHandler[] handlers) : base( /// /// Optional. The delegating handlers to add to the http client pipeline. /// - protected ResourcePrivateLinkClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers) + protected ResourcePrivateLinkClient(System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : base(rootHandler, handlers) { - Initialize(); + this.Initialize(); } - /// /// Initializes a new instance of the ResourcePrivateLinkClient class. /// @@ -134,15 +115,14 @@ protected ResourcePrivateLinkClient(HttpClientHandler rootHandler, params Delega /// /// Thrown when a required parameter is null /// - protected ResourcePrivateLinkClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) + protected ResourcePrivateLinkClient(System.Uri baseUri, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) { throw new System.ArgumentNullException("baseUri"); } - BaseUri = baseUri; + this.BaseUri = baseUri; } - /// /// Initializes a new instance of the ResourcePrivateLinkClient class. /// @@ -158,15 +138,15 @@ protected ResourcePrivateLinkClient(System.Uri baseUri, params DelegatingHandler /// /// Thrown when a required parameter is null /// - protected ResourcePrivateLinkClient(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + protected ResourcePrivateLinkClient(System.Uri baseUri, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) { throw new System.ArgumentNullException("baseUri"); } - BaseUri = baseUri; + + this.BaseUri = baseUri; } - /// /// Initializes a new instance of the ResourcePrivateLinkClient class. /// @@ -179,23 +159,23 @@ protected ResourcePrivateLinkClient(System.Uri baseUri, HttpClientHandler rootHa /// /// Thrown when a required parameter is null /// - public ResourcePrivateLinkClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + public ResourcePrivateLinkClient(Microsoft.Rest.ServiceClientCredentials credentials, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) { if (credentials == null) { throw new System.ArgumentNullException("credentials"); } - Credentials = credentials; - if (Credentials != null) + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the ResourcePrivateLinkClient class. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// @@ -206,23 +186,23 @@ public ResourcePrivateLinkClient(ServiceClientCredentials credentials, params De /// /// Thrown when a required parameter is null /// - public ResourcePrivateLinkClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient) + public ResourcePrivateLinkClient(Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient) { if (credentials == null) { throw new System.ArgumentNullException("credentials"); } - Credentials = credentials; - if (Credentials != null) + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the ResourcePrivateLinkClient class. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// @@ -234,26 +214,26 @@ public ResourcePrivateLinkClient(ServiceClientCredentials credentials, HttpClien /// /// Thrown when a required parameter is null /// - public ResourcePrivateLinkClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + public ResourcePrivateLinkClient(Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (credentials == null) { throw new System.ArgumentNullException("credentials"); } - Credentials = credentials; - if (Credentials != null) + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the ResourcePrivateLinkClient class. /// /// /// Optional. The base URI of the service. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// @@ -262,7 +242,7 @@ public ResourcePrivateLinkClient(ServiceClientCredentials credentials, HttpClien /// /// Thrown when a required parameter is null /// - public ResourcePrivateLinkClient(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + public ResourcePrivateLinkClient(System.Uri baseUri, Microsoft.Rest.ServiceClientCredentials credentials, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) { @@ -272,33 +252,30 @@ public ResourcePrivateLinkClient(System.Uri baseUri, ServiceClientCredentials cr { throw new System.ArgumentNullException("credentials"); } - BaseUri = baseUri; - Credentials = credentials; - if (Credentials != null) + this.BaseUri = baseUri; + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the ResourcePrivateLinkClient class. /// /// /// Optional. The base URI of the service. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// /// Optional. The http client handler used to handle http transport. /// - /// - /// Optional. The delegating handlers to add to the http client pipeline. - /// /// /// Thrown when a required parameter is null /// - public ResourcePrivateLinkClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + public ResourcePrivateLinkClient(System.Uri baseUri, Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) { @@ -308,57 +285,58 @@ public ResourcePrivateLinkClient(System.Uri baseUri, ServiceClientCredentials cr { throw new System.ArgumentNullException("credentials"); } - BaseUri = baseUri; - Credentials = credentials; - if (Credentials != null) + this.BaseUri = baseUri; + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// An optional partial-method to perform custom initialization. /// partial void CustomInitialize(); + /// /// Initializes client properties. /// private void Initialize() { - PrivateLinkAssociation = new PrivateLinkAssociationOperations(this); - ResourceManagementPrivateLink = new ResourceManagementPrivateLinkOperations(this); - BaseUri = new System.Uri("https://management.azure.com"); - ApiVersion = "2020-05-01"; - AcceptLanguage = "en-US"; - LongRunningOperationRetryTimeout = 30; - GenerateClientRequestId = true; - SerializationSettings = new JsonSerializerSettings + this.PrivateLinkAssociation = new PrivateLinkAssociationOperations(this); + this.ResourceManagementPrivateLink = new ResourceManagementPrivateLinkOperations(this); + this.BaseUri = new System.Uri("https://management.azure.com"); + this.ApiVersion = "2020-05-01"; + this.AcceptLanguage = "en-US"; + this.LongRunningOperationRetryTimeout = 30; + this.GenerateClientRequestId = true; + SerializationSettings = new Newtonsoft.Json.JsonSerializerSettings { Formatting = Newtonsoft.Json.Formatting.Indented, DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, - ContractResolver = new ReadOnlyJsonContractResolver(), - Converters = new List + ContractResolver = new Microsoft.Rest.Serialization.ReadOnlyJsonContractResolver(), + Converters = new System.Collections.Generic.List { - new Iso8601TimeSpanConverter() + new Microsoft.Rest.Serialization.Iso8601TimeSpanConverter() } }; - DeserializationSettings = new JsonSerializerSettings + DeserializationSettings = new Newtonsoft.Json.JsonSerializerSettings { DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, - ContractResolver = new ReadOnlyJsonContractResolver(), - Converters = new List + ContractResolver = new Microsoft.Rest.Serialization.ReadOnlyJsonContractResolver(), + Converters = new System.Collections.Generic.List { - new Iso8601TimeSpanConverter() + new Microsoft.Rest.Serialization.Iso8601TimeSpanConverter() } }; CustomInitialize(); - DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Azure.CloudErrorJsonConverter()); } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/ResourcesOperations.cs b/src/Resources/Resources.Management.Sdk/Generated/ResourcesOperations.cs similarity index 57% rename from src/Resources/Resources.Sdk/Generated/ResourcesOperations.cs rename to src/Resources/Resources.Management.Sdk/Generated/ResourcesOperations.cs index fdf3877c70fa..607adc546905 100644 --- a/src/Resources/Resources.Sdk/Generated/ResourcesOperations.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/ResourcesOperations.cs @@ -1,32 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// ResourcesOperations operations. /// - internal partial class ResourcesOperations : IServiceOperations, IResourcesOperations + internal partial class ResourcesOperations : Microsoft.Rest.IServiceOperations, IResourcesOperations { /// /// Initializes a new instance of the ResourcesOperations class. @@ -37,13 +24,13 @@ internal partial class ResourcesOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal ResourcesOperations(ResourceManagementClient client) + internal ResourcesOperations (ResourceManagementClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -54,25 +41,25 @@ internal ResourcesOperations(ResourceManagementClient client) /// /// Get all the resources for a resource group. /// + /// + /// + /// /// /// The resource group with the resources to get. /// - /// - /// OData parameters to apply to the operation. - /// /// /// Headers that will be added to request. /// /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -81,89 +68,99 @@ internal ResourcesOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("odataQuery", odataQuery); tracingParameters.Add("resourceGroupName", resourceGroupName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/resources").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (odataQuery != null) { - var _odataFilter = odataQuery.ToString(); - if (!string.IsNullOrEmpty(_odataFilter)) + var _genericResourceFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_genericResourceFilter)) { - _queryParameters.Add(_odataFilter); + _queryParameters.Add(_genericResourceFilter); } } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -175,55 +172,56 @@ internal ResourcesOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -233,9 +231,10 @@ internal ResourcesOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -246,35 +245,32 @@ internal ResourcesOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Moves resources from one resource group to another resource group. + /// The resources to be moved must be in the same source resource group in the source subscription being used. The target resource group may be in a different subscription. When moving resources, both the source group and the target group are locked for the duration of the operation. Write and delete operations are blocked on the groups until the move completes. /// - /// - /// The resources to be moved must be in the same source resource group in the - /// source subscription being used. The target resource group may be in a - /// different subscription. When moving resources, both the source group and - /// the target group are locked for the duration of the operation. Write and - /// delete operations are blocked on the groups until the move completes. - /// /// /// The name of the resource group from the source subscription containing the /// resources to be moved. @@ -283,31 +279,21 @@ internal ResourcesOperations(ResourceManagementClient client) /// Parameters for moving resources. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task MoveResourcesWithHttpMessagesAsync(string sourceResourceGroupName, ResourcesMoveInfo parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task MoveResourcesWithHttpMessagesAsync(string sourceResourceGroupName, ResourcesMoveInfo parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginMoveResourcesWithHttpMessagesAsync(sourceResourceGroupName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginMoveResourcesWithHttpMessagesAsync(sourceResourceGroupName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Validates whether resources can be moved from one resource group to another - /// resource group. + /// This operation checks whether the specified resources can be moved to the target. The resources to be moved must be in the same source resource group in the source subscription being used. The target resource group may be in a different subscription. If validation succeeds, it returns HTTP response code 204 (no content). If validation fails, it returns HTTP response code 409 (Conflict) with an error message. Retrieve the URL in the Location header value to check the result of the long-running operation. /// - /// - /// This operation checks whether the specified resources can be moved to the - /// target. The resources to be moved must be in the same source resource group - /// in the source subscription being used. The target resource group may be in - /// a different subscription. If validation succeeds, it returns HTTP response - /// code 204 (no content). If validation fails, it returns HTTP response code - /// 409 (Conflict) with an error message. Retrieve the URL in the Location - /// header value to check the result of the long-running operation. - /// /// /// The name of the resource group from the source subscription containing the /// resources to be validated for move. @@ -316,23 +302,23 @@ internal ResourcesOperations(ResourceManagementClient client) /// Parameters for moving resources. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task ValidateMoveResourcesWithHttpMessagesAsync(string sourceResourceGroupName, ResourcesMoveInfo parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task ValidateMoveResourcesWithHttpMessagesAsync(string sourceResourceGroupName, ResourcesMoveInfo parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginValidateMoveResourcesWithHttpMessagesAsync(sourceResourceGroupName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginValidateMoveResourcesWithHttpMessagesAsync(sourceResourceGroupName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// /// Get all the resources in a subscription. /// /// - /// OData parameters to apply to the operation. + /// /// /// /// Headers that will be added to request. @@ -340,13 +326,13 @@ internal ResourcesOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -355,68 +341,78 @@ internal ResourcesOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("odataQuery", odataQuery); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resources").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (odataQuery != null) { - var _odataFilter = odataQuery.ToString(); - if (!string.IsNullOrEmpty(_odataFilter)) + var _genericResourceFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_genericResourceFilter)) { - _queryParameters.Add(_odataFilter); + _queryParameters.Add(_genericResourceFilter); } } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -428,55 +424,56 @@ internal ResourcesOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -486,9 +483,10 @@ internal ResourcesOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -499,25 +497,29 @@ internal ResourcesOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Checks whether a resource exists. /// @@ -546,10 +548,10 @@ internal ResourcesOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -558,77 +560,91 @@ internal ResourcesOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CheckExistenceWithHttpMessagesAsync(string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CheckExistenceWithHttpMessagesAsync(string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); } } if (resourceProviderNamespace == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceProviderNamespace"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceProviderNamespace"); } + if (parentResourcePath == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "parentResourcePath"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parentResourcePath"); } + if (resourceType == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceType"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceType"); } + if (resourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceName"); } + if (apiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "apiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "apiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceProviderNamespace", resourceProviderNamespace); tracingParameters.Add("parentResourcePath", parentResourcePath); tracingParameters.Add("resourceType", resourceType); tracingParameters.Add("resourceName", resourceName); tracingParameters.Add("apiVersion", apiVersion); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CheckExistence", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "CheckExistence", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceProviderNamespace}", System.Uri.EscapeDataString(resourceProviderNamespace)); _url = _url.Replace("{parentResourcePath}", parentResourcePath); _url = _url.Replace("{resourceType}", resourceType); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (apiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); @@ -638,25 +654,24 @@ internal ResourcesOperations(ResourceManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("HEAD"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("HEAD"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -668,55 +683,56 @@ internal ResourcesOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 204 && (int)_statusCode != 404) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -726,21 +742,25 @@ internal ResourcesOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; - _result.Body = _statusCode == System.Net.HttpStatusCode.NoContent; + _result.Body = (_statusCode == System.Net.HttpStatusCode.NoContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Deletes a resource. /// @@ -764,16 +784,16 @@ internal ResourcesOperations(ResourceManagementClient client) /// The API version to use for the operation. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// @@ -802,16 +822,16 @@ internal ResourcesOperations(ResourceManagementClient client) /// Parameters for creating or updating the resource. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, GenericResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, GenericResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send Request - AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// @@ -840,16 +860,16 @@ internal ResourcesOperations(ResourceManagementClient client) /// Parameters for updating the resource. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, GenericResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, GenericResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send Request - AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// @@ -880,13 +900,13 @@ internal ResourcesOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -895,77 +915,91 @@ internal ResourcesOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); } } if (resourceProviderNamespace == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceProviderNamespace"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceProviderNamespace"); } + if (parentResourcePath == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "parentResourcePath"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parentResourcePath"); } + if (resourceType == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceType"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceType"); } + if (resourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceName"); } + if (apiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "apiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "apiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceProviderNamespace", resourceProviderNamespace); tracingParameters.Add("parentResourcePath", parentResourcePath); tracingParameters.Add("resourceType", resourceType); tracingParameters.Add("resourceName", resourceName); tracingParameters.Add("apiVersion", apiVersion); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceProviderNamespace}", System.Uri.EscapeDataString(resourceProviderNamespace)); _url = _url.Replace("{parentResourcePath}", parentResourcePath); _url = _url.Replace("{resourceType}", resourceType); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (apiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); @@ -975,25 +1009,24 @@ internal ResourcesOperations(ResourceManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1005,55 +1038,56 @@ internal ResourcesOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1063,9 +1097,10 @@ internal ResourcesOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -1076,25 +1111,29 @@ internal ResourcesOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Checks by ID whether a resource exists. This API currently works only for a /// limited set of Resource providers. In the event that a Resource provider @@ -1115,10 +1154,10 @@ internal ResourcesOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1127,33 +1166,43 @@ internal ResourcesOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CheckExistenceByIdWithHttpMessagesAsync(string resourceId, string apiVersion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CheckExistenceByIdWithHttpMessagesAsync(string resourceId, string apiVersion, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (resourceId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceId"); } + if (apiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "apiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "apiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceId", resourceId); tracingParameters.Add("apiVersion", apiVersion); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CheckExistenceById", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "CheckExistenceById", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{resourceId}").ToString(); _url = _url.Replace("{resourceId}", resourceId); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (apiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); @@ -1163,25 +1212,24 @@ internal ResourcesOperations(ResourceManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("HEAD"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("HEAD"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1193,55 +1241,56 @@ internal ResourcesOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 204 && (int)_statusCode != 404) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1251,21 +1300,25 @@ internal ResourcesOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; - _result.Body = _statusCode == System.Net.HttpStatusCode.NoContent; + _result.Body = (_statusCode == System.Net.HttpStatusCode.NoContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Deletes a resource by ID. /// @@ -1278,16 +1331,16 @@ internal ResourcesOperations(ResourceManagementClient client) /// The API version to use for the operation. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task DeleteByIdWithHttpMessagesAsync(string resourceId, string apiVersion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task DeleteByIdWithHttpMessagesAsync(string resourceId, string apiVersion, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginDeleteByIdWithHttpMessagesAsync(resourceId, apiVersion, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginDeleteByIdWithHttpMessagesAsync(resourceId, apiVersion, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// @@ -1305,16 +1358,16 @@ internal ResourcesOperations(ResourceManagementClient client) /// Create or update resource parameters. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> CreateOrUpdateByIdWithHttpMessagesAsync(string resourceId, string apiVersion, GenericResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CreateOrUpdateByIdWithHttpMessagesAsync(string resourceId, string apiVersion, GenericResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send Request - AzureOperationResponse _response = await BeginCreateOrUpdateByIdWithHttpMessagesAsync(resourceId, apiVersion, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateOrUpdateByIdWithHttpMessagesAsync(resourceId, apiVersion, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// @@ -1332,16 +1385,16 @@ internal ResourcesOperations(ResourceManagementClient client) /// Update resource parameters. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> UpdateByIdWithHttpMessagesAsync(string resourceId, string apiVersion, GenericResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> UpdateByIdWithHttpMessagesAsync(string resourceId, string apiVersion, GenericResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send Request - AzureOperationResponse _response = await BeginUpdateByIdWithHttpMessagesAsync(resourceId, apiVersion, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginUpdateByIdWithHttpMessagesAsync(resourceId, apiVersion, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// @@ -1361,13 +1414,13 @@ internal ResourcesOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1376,33 +1429,43 @@ internal ResourcesOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetByIdWithHttpMessagesAsync(string resourceId, string apiVersion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetByIdWithHttpMessagesAsync(string resourceId, string apiVersion, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (resourceId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceId"); } + if (apiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "apiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "apiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceId", resourceId); tracingParameters.Add("apiVersion", apiVersion); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetById", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "GetById", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{resourceId}").ToString(); _url = _url.Replace("{resourceId}", resourceId); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (apiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); @@ -1412,25 +1475,24 @@ internal ResourcesOperations(ResourceManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1442,55 +1504,56 @@ internal ResourcesOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1500,9 +1563,10 @@ internal ResourcesOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -1513,35 +1577,36 @@ internal ResourcesOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Moves resources from one resource group to another resource group. - /// - /// /// The resources to be moved must be in the same source resource group in the /// source subscription being used. The target resource group may be in a /// different subscription. When moving resources, both the source group and /// the target group are locked for the duration of the operation. Write and /// delete operations are blocked on the groups until the move completes. - /// + /// /// /// The name of the resource group from the source subscription containing the /// resources to be moved. @@ -1555,10 +1620,10 @@ internal ResourcesOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1567,85 +1632,95 @@ internal ResourcesOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginMoveResourcesWithHttpMessagesAsync(string sourceResourceGroupName, ResourcesMoveInfo parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task BeginMoveResourcesWithHttpMessagesAsync(string sourceResourceGroupName, ResourcesMoveInfo parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + + if (parameters == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); + } + if (sourceResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "sourceResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "sourceResourceGroupName"); } if (sourceResourceGroupName != null) { if (sourceResourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "sourceResourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "sourceResourceGroupName", 90); } if (sourceResourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "sourceResourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "sourceResourceGroupName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(sourceResourceGroupName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "sourceResourceGroupName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "sourceResourceGroupName", "^[-\\w\\._\\(\\)]+$"); } } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("sourceResourceGroupName", sourceResourceGroupName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginMoveResources", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginMoveResources", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{sourceResourceGroupName}/moveResources").ToString(); _url = _url.Replace("{sourceResourceGroupName}", System.Uri.EscapeDataString(sourceResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1657,61 +1732,62 @@ internal ResourcesOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1721,25 +1797,26 @@ internal ResourcesOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Validates whether resources can be moved from one resource group to another - /// resource group. - /// - /// /// This operation checks whether the specified resources can be moved to the /// target. The resources to be moved must be in the same source resource group /// in the source subscription being used. The target resource group may be in @@ -1747,7 +1824,7 @@ internal ResourcesOperations(ResourceManagementClient client) /// code 204 (no content). If validation fails, it returns HTTP response code /// 409 (Conflict) with an error message. Retrieve the URL in the Location /// header value to check the result of the long-running operation. - /// + /// /// /// The name of the resource group from the source subscription containing the /// resources to be validated for move. @@ -1761,10 +1838,10 @@ internal ResourcesOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1773,85 +1850,95 @@ internal ResourcesOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginValidateMoveResourcesWithHttpMessagesAsync(string sourceResourceGroupName, ResourcesMoveInfo parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task BeginValidateMoveResourcesWithHttpMessagesAsync(string sourceResourceGroupName, ResourcesMoveInfo parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + + if (parameters == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); + } + if (sourceResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "sourceResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "sourceResourceGroupName"); } if (sourceResourceGroupName != null) { if (sourceResourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "sourceResourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "sourceResourceGroupName", 90); } if (sourceResourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "sourceResourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "sourceResourceGroupName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(sourceResourceGroupName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "sourceResourceGroupName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "sourceResourceGroupName", "^[-\\w\\._\\(\\)]+$"); } } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("sourceResourceGroupName", sourceResourceGroupName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginValidateMoveResources", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginValidateMoveResources", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{sourceResourceGroupName}/validateMoveResources").ToString(); _url = _url.Replace("{sourceResourceGroupName}", System.Uri.EscapeDataString(sourceResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1863,61 +1950,62 @@ internal ResourcesOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1927,20 +2015,25 @@ internal ResourcesOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Deletes a resource. /// @@ -1969,10 +2062,10 @@ internal ResourcesOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1981,77 +2074,91 @@ internal ResourcesOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); } } if (resourceProviderNamespace == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceProviderNamespace"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceProviderNamespace"); } + if (parentResourcePath == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "parentResourcePath"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parentResourcePath"); } + if (resourceType == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceType"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceType"); } + if (resourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceName"); } + if (apiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "apiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "apiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceProviderNamespace", resourceProviderNamespace); tracingParameters.Add("parentResourcePath", parentResourcePath); tracingParameters.Add("resourceType", resourceType); tracingParameters.Add("resourceName", resourceName); tracingParameters.Add("apiVersion", apiVersion); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceProviderNamespace}", System.Uri.EscapeDataString(resourceProviderNamespace)); _url = _url.Replace("{parentResourcePath}", parentResourcePath); _url = _url.Replace("{resourceType}", resourceType); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (apiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); @@ -2061,25 +2168,24 @@ internal ResourcesOperations(ResourceManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2091,55 +2197,56 @@ internal ResourcesOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -2149,20 +2256,25 @@ internal ResourcesOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Creates a resource. /// @@ -2194,13 +2306,13 @@ internal ResourcesOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -2209,86 +2321,100 @@ internal ResourcesOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, GenericResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, GenericResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + + if (parameters == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); } } if (resourceProviderNamespace == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceProviderNamespace"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceProviderNamespace"); } + if (parentResourcePath == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "parentResourcePath"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parentResourcePath"); } + if (resourceType == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceType"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceType"); } + if (resourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceName"); } + if (apiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "apiVersion"); - } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "apiVersion"); } - if (parameters != null) - { - parameters.Validate(); - } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceProviderNamespace", resourceProviderNamespace); tracingParameters.Add("parentResourcePath", parentResourcePath); tracingParameters.Add("resourceType", resourceType); tracingParameters.Add("resourceName", resourceName); tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceProviderNamespace}", System.Uri.EscapeDataString(resourceProviderNamespace)); _url = _url.Replace("{parentResourcePath}", parentResourcePath); _url = _url.Replace("{resourceType}", resourceType); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (apiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); @@ -2298,25 +2424,24 @@ internal ResourcesOperations(ResourceManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2328,61 +2453,62 @@ internal ResourcesOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -2392,9 +2518,10 @@ internal ResourcesOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -2405,16 +2532,16 @@ internal ResourcesOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } // Deserialize Response @@ -2423,25 +2550,29 @@ internal ResourcesOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Updates a resource. /// @@ -2473,13 +2604,13 @@ internal ResourcesOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -2488,82 +2619,96 @@ internal ResourcesOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, GenericResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, GenericResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + + if (parameters == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); + } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); } } if (resourceProviderNamespace == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceProviderNamespace"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceProviderNamespace"); } + if (parentResourcePath == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "parentResourcePath"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parentResourcePath"); } + if (resourceType == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceType"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceType"); } + if (resourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceName"); } + if (apiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "apiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "apiVersion"); } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceProviderNamespace", resourceProviderNamespace); tracingParameters.Add("parentResourcePath", parentResourcePath); tracingParameters.Add("resourceType", resourceType); tracingParameters.Add("resourceName", resourceName); tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceProviderNamespace}", System.Uri.EscapeDataString(resourceProviderNamespace)); _url = _url.Replace("{parentResourcePath}", parentResourcePath); _url = _url.Replace("{resourceType}", resourceType); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (apiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); @@ -2573,25 +2718,24 @@ internal ResourcesOperations(ResourceManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PATCH"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2603,61 +2747,62 @@ internal ResourcesOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -2667,9 +2812,10 @@ internal ResourcesOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -2680,25 +2826,29 @@ internal ResourcesOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Deletes a resource by ID. /// @@ -2716,10 +2866,10 @@ internal ResourcesOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -2728,33 +2878,43 @@ internal ResourcesOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginDeleteByIdWithHttpMessagesAsync(string resourceId, string apiVersion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task BeginDeleteByIdWithHttpMessagesAsync(string resourceId, string apiVersion, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (resourceId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceId"); } + if (apiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "apiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "apiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceId", resourceId); tracingParameters.Add("apiVersion", apiVersion); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDeleteById", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginDeleteById", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{resourceId}").ToString(); _url = _url.Replace("{resourceId}", resourceId); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (apiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); @@ -2764,25 +2924,24 @@ internal ResourcesOperations(ResourceManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2794,55 +2953,56 @@ internal ResourcesOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -2852,20 +3012,25 @@ internal ResourcesOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Create a resource by ID. /// @@ -2886,13 +3051,13 @@ internal ResourcesOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -2901,42 +3066,52 @@ internal ResourcesOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateOrUpdateByIdWithHttpMessagesAsync(string resourceId, string apiVersion, GenericResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginCreateOrUpdateByIdWithHttpMessagesAsync(string resourceId, string apiVersion, GenericResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (resourceId == null) + + + + + if (parameters == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); } - if (apiVersion == null) + if (parameters != null) { - throw new ValidationException(ValidationRules.CannotBeNull, "apiVersion"); + parameters.Validate(); } - if (parameters == null) + if (resourceId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceId"); } - if (parameters != null) + + if (apiVersion == null) { - parameters.Validate(); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "apiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceId", resourceId); tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdateById", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdateById", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{resourceId}").ToString(); _url = _url.Replace("{resourceId}", resourceId); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (apiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); @@ -2946,25 +3121,24 @@ internal ResourcesOperations(ResourceManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2976,61 +3150,62 @@ internal ResourcesOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -3040,9 +3215,10 @@ internal ResourcesOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -3053,16 +3229,16 @@ internal ResourcesOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } // Deserialize Response @@ -3071,25 +3247,29 @@ internal ResourcesOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Updates a resource by ID. /// @@ -3110,13 +3290,13 @@ internal ResourcesOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -3125,38 +3305,48 @@ internal ResourcesOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginUpdateByIdWithHttpMessagesAsync(string resourceId, string apiVersion, GenericResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginUpdateByIdWithHttpMessagesAsync(string resourceId, string apiVersion, GenericResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (resourceId == null) + + + + + if (parameters == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); } - if (apiVersion == null) + if (resourceId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "apiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceId"); } - if (parameters == null) + + if (apiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "apiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceId", resourceId); tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginUpdateById", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginUpdateById", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{resourceId}").ToString(); _url = _url.Replace("{resourceId}", resourceId); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (apiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); @@ -3166,25 +3356,24 @@ internal ResourcesOperations(ResourceManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PATCH"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -3196,61 +3385,62 @@ internal ResourcesOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -3260,9 +3450,10 @@ internal ResourcesOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -3273,25 +3464,29 @@ internal ResourcesOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Get all the resources for a resource group. /// @@ -3304,13 +3499,13 @@ internal ResourcesOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -3319,51 +3514,54 @@ internal ResourcesOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroupNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroupNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -3375,55 +3573,56 @@ internal ResourcesOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -3433,9 +3632,10 @@ internal ResourcesOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -3446,25 +3646,29 @@ internal ResourcesOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Get all the resources in a subscription. /// @@ -3477,13 +3681,13 @@ internal ResourcesOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -3492,51 +3696,54 @@ internal ResourcesOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -3548,55 +3755,56 @@ internal ResourcesOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -3606,9 +3814,10 @@ internal ResourcesOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -3619,24 +3828,28 @@ internal ResourcesOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/ResourcesOperationsExtensions.cs b/src/Resources/Resources.Management.Sdk/Generated/ResourcesOperationsExtensions.cs new file mode 100644 index 000000000000..d0683ca08d8f --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/ResourcesOperationsExtensions.cs @@ -0,0 +1,1180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +namespace Microsoft.Azure.Management.Resources +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// Extension methods for ResourcesOperations + /// + public static partial class ResourcesOperationsExtensions + { + /// + /// Get all the resources for a resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The resource group with the resources to get. + /// + public static Microsoft.Rest.Azure.IPage ListByResourceGroup(this IResourcesOperations operations, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery)) + { + return ((IResourcesOperations)operations).ListByResourceGroupAsync(resourceGroupName, odataQuery).GetAwaiter().GetResult(); + } + + /// + /// Get all the resources for a resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The resource group with the resources to get. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByResourceGroupAsync(this IResourcesOperations operations, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, odataQuery, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The resources to be moved must be in the same source resource group in the + /// source subscription being used. The target resource group may be in a + /// different subscription. When moving resources, both the source group and + /// the target group are locked for the duration of the operation. Write and + /// delete operations are blocked on the groups until the move completes. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group from the source subscription containing the + /// resources to be moved. + /// + public static void MoveResources(this IResourcesOperations operations, string sourceResourceGroupName, ResourcesMoveInfo parameters) + { + ((IResourcesOperations)operations).MoveResourcesAsync(sourceResourceGroupName, parameters).GetAwaiter().GetResult(); + } + + /// + /// The resources to be moved must be in the same source resource group in the + /// source subscription being used. The target resource group may be in a + /// different subscription. When moving resources, both the source group and + /// the target group are locked for the duration of the operation. Write and + /// delete operations are blocked on the groups until the move completes. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group from the source subscription containing the + /// resources to be moved. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task MoveResourcesAsync(this IResourcesOperations operations, string sourceResourceGroupName, ResourcesMoveInfo parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.MoveResourcesWithHttpMessagesAsync(sourceResourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// This operation checks whether the specified resources can be moved to the + /// target. The resources to be moved must be in the same source resource group + /// in the source subscription being used. The target resource group may be in + /// a different subscription. If validation succeeds, it returns HTTP response + /// code 204 (no content). If validation fails, it returns HTTP response code + /// 409 (Conflict) with an error message. Retrieve the URL in the Location + /// header value to check the result of the long-running operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group from the source subscription containing the + /// resources to be validated for move. + /// + public static void ValidateMoveResources(this IResourcesOperations operations, string sourceResourceGroupName, ResourcesMoveInfo parameters) + { + ((IResourcesOperations)operations).ValidateMoveResourcesAsync(sourceResourceGroupName, parameters).GetAwaiter().GetResult(); + } + + /// + /// This operation checks whether the specified resources can be moved to the + /// target. The resources to be moved must be in the same source resource group + /// in the source subscription being used. The target resource group may be in + /// a different subscription. If validation succeeds, it returns HTTP response + /// code 204 (no content). If validation fails, it returns HTTP response code + /// 409 (Conflict) with an error message. Retrieve the URL in the Location + /// header value to check the result of the long-running operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group from the source subscription containing the + /// resources to be validated for move. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ValidateMoveResourcesAsync(this IResourcesOperations operations, string sourceResourceGroupName, ResourcesMoveInfo parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.ValidateMoveResourcesWithHttpMessagesAsync(sourceResourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Get all the resources in a subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + public static Microsoft.Rest.Azure.IPage List(this IResourcesOperations operations, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery)) + { + return ((IResourcesOperations)operations).ListAsync(odataQuery).GetAwaiter().GetResult(); + } + + /// + /// Get all the resources in a subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IResourcesOperations operations, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(odataQuery, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Checks whether a resource exists. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group containing the resource to check. The name + /// is case insensitive. + /// + /// + /// The resource provider of the resource to check. + /// + /// + /// The parent resource identity. + /// + /// + /// The resource type. + /// + /// + /// The name of the resource to check whether it exists. + /// + /// + /// The API version to use for the operation. + /// + public static bool CheckExistence(this IResourcesOperations operations, string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion) + { + return ((IResourcesOperations)operations).CheckExistenceAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion).GetAwaiter().GetResult(); + } + + /// + /// Checks whether a resource exists. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group containing the resource to check. The name + /// is case insensitive. + /// + /// + /// The resource provider of the resource to check. + /// + /// + /// The parent resource identity. + /// + /// + /// The resource type. + /// + /// + /// The name of the resource to check whether it exists. + /// + /// + /// The API version to use for the operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CheckExistenceAsync(this IResourcesOperations operations, string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CheckExistenceWithHttpMessagesAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Deletes a resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource to delete. The + /// name is case insensitive. + /// + /// + /// The namespace of the resource provider. + /// + /// + /// The parent resource identity. + /// + /// + /// The resource type. + /// + /// + /// The name of the resource to delete. + /// + /// + /// The API version to use for the operation. + /// + public static void Delete(this IResourcesOperations operations, string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion) + { + ((IResourcesOperations)operations).DeleteAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion).GetAwaiter().GetResult(); + } + + /// + /// Deletes a resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource to delete. The + /// name is case insensitive. + /// + /// + /// The namespace of the resource provider. + /// + /// + /// The parent resource identity. + /// + /// + /// The resource type. + /// + /// + /// The name of the resource to delete. + /// + /// + /// The API version to use for the operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAsync(this IResourcesOperations operations, string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Creates a resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group for the resource. The name is case + /// insensitive. + /// + /// + /// The namespace of the resource provider. + /// + /// + /// The parent resource identity. + /// + /// + /// The resource type of the resource to create. + /// + /// + /// The name of the resource to create. + /// + /// + /// The API version to use for the operation. + /// + public static GenericResource CreateOrUpdate(this IResourcesOperations operations, string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, GenericResource parameters) + { + return ((IResourcesOperations)operations).CreateOrUpdateAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates a resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group for the resource. The name is case + /// insensitive. + /// + /// + /// The namespace of the resource provider. + /// + /// + /// The parent resource identity. + /// + /// + /// The resource type of the resource to create. + /// + /// + /// The name of the resource to create. + /// + /// + /// The API version to use for the operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateOrUpdateAsync(this IResourcesOperations operations, string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, GenericResource parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Updates a resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group for the resource. The name is case + /// insensitive. + /// + /// + /// The namespace of the resource provider. + /// + /// + /// The parent resource identity. + /// + /// + /// The resource type of the resource to update. + /// + /// + /// The name of the resource to update. + /// + /// + /// The API version to use for the operation. + /// + public static GenericResource Update(this IResourcesOperations operations, string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, GenericResource parameters) + { + return ((IResourcesOperations)operations).UpdateAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion, parameters).GetAwaiter().GetResult(); + } + + /// + /// Updates a resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group for the resource. The name is case + /// insensitive. + /// + /// + /// The namespace of the resource provider. + /// + /// + /// The parent resource identity. + /// + /// + /// The resource type of the resource to update. + /// + /// + /// The name of the resource to update. + /// + /// + /// The API version to use for the operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task UpdateAsync(this IResourcesOperations operations, string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, GenericResource parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets a resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group containing the resource to get. The name is + /// case insensitive. + /// + /// + /// The namespace of the resource provider. + /// + /// + /// The parent resource identity. + /// + /// + /// The resource type of the resource. + /// + /// + /// The name of the resource to get. + /// + /// + /// The API version to use for the operation. + /// + public static GenericResource Get(this IResourcesOperations operations, string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion) + { + return ((IResourcesOperations)operations).GetAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion).GetAwaiter().GetResult(); + } + + /// + /// Gets a resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group containing the resource to get. The name is + /// case insensitive. + /// + /// + /// The namespace of the resource provider. + /// + /// + /// The parent resource identity. + /// + /// + /// The resource type of the resource. + /// + /// + /// The name of the resource to get. + /// + /// + /// The API version to use for the operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IResourcesOperations operations, string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Checks by ID whether a resource exists. This API currently works only for a + /// limited set of Resource providers. In the event that a Resource provider + /// does not implement this API, ARM will respond with a 405. The alternative + /// then is to use the GET API to check for the existence of the resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The fully qualified ID of the resource, including the resource name and + /// resource type. Use the format, + /// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} + /// + /// + /// The API version to use for the operation. + /// + public static bool CheckExistenceById(this IResourcesOperations operations, string resourceId, string apiVersion) + { + return ((IResourcesOperations)operations).CheckExistenceByIdAsync(resourceId, apiVersion).GetAwaiter().GetResult(); + } + + /// + /// Checks by ID whether a resource exists. This API currently works only for a + /// limited set of Resource providers. In the event that a Resource provider + /// does not implement this API, ARM will respond with a 405. The alternative + /// then is to use the GET API to check for the existence of the resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The fully qualified ID of the resource, including the resource name and + /// resource type. Use the format, + /// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} + /// + /// + /// The API version to use for the operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CheckExistenceByIdAsync(this IResourcesOperations operations, string resourceId, string apiVersion, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CheckExistenceByIdWithHttpMessagesAsync(resourceId, apiVersion, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Deletes a resource by ID. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The fully qualified ID of the resource, including the resource name and + /// resource type. Use the format, + /// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} + /// + /// + /// The API version to use for the operation. + /// + public static void DeleteById(this IResourcesOperations operations, string resourceId, string apiVersion) + { + ((IResourcesOperations)operations).DeleteByIdAsync(resourceId, apiVersion).GetAwaiter().GetResult(); + } + + /// + /// Deletes a resource by ID. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The fully qualified ID of the resource, including the resource name and + /// resource type. Use the format, + /// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} + /// + /// + /// The API version to use for the operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteByIdAsync(this IResourcesOperations operations, string resourceId, string apiVersion, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteByIdWithHttpMessagesAsync(resourceId, apiVersion, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Create a resource by ID. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The fully qualified ID of the resource, including the resource name and + /// resource type. Use the format, + /// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} + /// + /// + /// The API version to use for the operation. + /// + public static GenericResource CreateOrUpdateById(this IResourcesOperations operations, string resourceId, string apiVersion, GenericResource parameters) + { + return ((IResourcesOperations)operations).CreateOrUpdateByIdAsync(resourceId, apiVersion, parameters).GetAwaiter().GetResult(); + } + + /// + /// Create a resource by ID. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The fully qualified ID of the resource, including the resource name and + /// resource type. Use the format, + /// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} + /// + /// + /// The API version to use for the operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateOrUpdateByIdAsync(this IResourcesOperations operations, string resourceId, string apiVersion, GenericResource parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateByIdWithHttpMessagesAsync(resourceId, apiVersion, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Updates a resource by ID. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The fully qualified ID of the resource, including the resource name and + /// resource type. Use the format, + /// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} + /// + /// + /// The API version to use for the operation. + /// + public static GenericResource UpdateById(this IResourcesOperations operations, string resourceId, string apiVersion, GenericResource parameters) + { + return ((IResourcesOperations)operations).UpdateByIdAsync(resourceId, apiVersion, parameters).GetAwaiter().GetResult(); + } + + /// + /// Updates a resource by ID. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The fully qualified ID of the resource, including the resource name and + /// resource type. Use the format, + /// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} + /// + /// + /// The API version to use for the operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task UpdateByIdAsync(this IResourcesOperations operations, string resourceId, string apiVersion, GenericResource parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.UpdateByIdWithHttpMessagesAsync(resourceId, apiVersion, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets a resource by ID. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The fully qualified ID of the resource, including the resource name and + /// resource type. Use the format, + /// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} + /// + /// + /// The API version to use for the operation. + /// + public static GenericResource GetById(this IResourcesOperations operations, string resourceId, string apiVersion) + { + return ((IResourcesOperations)operations).GetByIdAsync(resourceId, apiVersion).GetAwaiter().GetResult(); + } + + /// + /// Gets a resource by ID. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The fully qualified ID of the resource, including the resource name and + /// resource type. Use the format, + /// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} + /// + /// + /// The API version to use for the operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetByIdAsync(this IResourcesOperations operations, string resourceId, string apiVersion, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetByIdWithHttpMessagesAsync(resourceId, apiVersion, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The resources to be moved must be in the same source resource group in the + /// source subscription being used. The target resource group may be in a + /// different subscription. When moving resources, both the source group and + /// the target group are locked for the duration of the operation. Write and + /// delete operations are blocked on the groups until the move completes. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group from the source subscription containing the + /// resources to be moved. + /// + public static void BeginMoveResources(this IResourcesOperations operations, string sourceResourceGroupName, ResourcesMoveInfo parameters) + { + ((IResourcesOperations)operations).BeginMoveResourcesAsync(sourceResourceGroupName, parameters).GetAwaiter().GetResult(); + } + + /// + /// The resources to be moved must be in the same source resource group in the + /// source subscription being used. The target resource group may be in a + /// different subscription. When moving resources, both the source group and + /// the target group are locked for the duration of the operation. Write and + /// delete operations are blocked on the groups until the move completes. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group from the source subscription containing the + /// resources to be moved. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginMoveResourcesAsync(this IResourcesOperations operations, string sourceResourceGroupName, ResourcesMoveInfo parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.BeginMoveResourcesWithHttpMessagesAsync(sourceResourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// This operation checks whether the specified resources can be moved to the + /// target. The resources to be moved must be in the same source resource group + /// in the source subscription being used. The target resource group may be in + /// a different subscription. If validation succeeds, it returns HTTP response + /// code 204 (no content). If validation fails, it returns HTTP response code + /// 409 (Conflict) with an error message. Retrieve the URL in the Location + /// header value to check the result of the long-running operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group from the source subscription containing the + /// resources to be validated for move. + /// + public static void BeginValidateMoveResources(this IResourcesOperations operations, string sourceResourceGroupName, ResourcesMoveInfo parameters) + { + ((IResourcesOperations)operations).BeginValidateMoveResourcesAsync(sourceResourceGroupName, parameters).GetAwaiter().GetResult(); + } + + /// + /// This operation checks whether the specified resources can be moved to the + /// target. The resources to be moved must be in the same source resource group + /// in the source subscription being used. The target resource group may be in + /// a different subscription. If validation succeeds, it returns HTTP response + /// code 204 (no content). If validation fails, it returns HTTP response code + /// 409 (Conflict) with an error message. Retrieve the URL in the Location + /// header value to check the result of the long-running operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group from the source subscription containing the + /// resources to be validated for move. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginValidateMoveResourcesAsync(this IResourcesOperations operations, string sourceResourceGroupName, ResourcesMoveInfo parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.BeginValidateMoveResourcesWithHttpMessagesAsync(sourceResourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Deletes a resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource to delete. The + /// name is case insensitive. + /// + /// + /// The namespace of the resource provider. + /// + /// + /// The parent resource identity. + /// + /// + /// The resource type. + /// + /// + /// The name of the resource to delete. + /// + /// + /// The API version to use for the operation. + /// + public static void BeginDelete(this IResourcesOperations operations, string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion) + { + ((IResourcesOperations)operations).BeginDeleteAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion).GetAwaiter().GetResult(); + } + + /// + /// Deletes a resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource to delete. The + /// name is case insensitive. + /// + /// + /// The namespace of the resource provider. + /// + /// + /// The parent resource identity. + /// + /// + /// The resource type. + /// + /// + /// The name of the resource to delete. + /// + /// + /// The API version to use for the operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginDeleteAsync(this IResourcesOperations operations, string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Creates a resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group for the resource. The name is case + /// insensitive. + /// + /// + /// The namespace of the resource provider. + /// + /// + /// The parent resource identity. + /// + /// + /// The resource type of the resource to create. + /// + /// + /// The name of the resource to create. + /// + /// + /// The API version to use for the operation. + /// + public static GenericResource BeginCreateOrUpdate(this IResourcesOperations operations, string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, GenericResource parameters) + { + return ((IResourcesOperations)operations).BeginCreateOrUpdateAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates a resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group for the resource. The name is case + /// insensitive. + /// + /// + /// The namespace of the resource provider. + /// + /// + /// The parent resource identity. + /// + /// + /// The resource type of the resource to create. + /// + /// + /// The name of the resource to create. + /// + /// + /// The API version to use for the operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginCreateOrUpdateAsync(this IResourcesOperations operations, string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, GenericResource parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Updates a resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group for the resource. The name is case + /// insensitive. + /// + /// + /// The namespace of the resource provider. + /// + /// + /// The parent resource identity. + /// + /// + /// The resource type of the resource to update. + /// + /// + /// The name of the resource to update. + /// + /// + /// The API version to use for the operation. + /// + public static GenericResource BeginUpdate(this IResourcesOperations operations, string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, GenericResource parameters) + { + return ((IResourcesOperations)operations).BeginUpdateAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion, parameters).GetAwaiter().GetResult(); + } + + /// + /// Updates a resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group for the resource. The name is case + /// insensitive. + /// + /// + /// The namespace of the resource provider. + /// + /// + /// The parent resource identity. + /// + /// + /// The resource type of the resource to update. + /// + /// + /// The name of the resource to update. + /// + /// + /// The API version to use for the operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginUpdateAsync(this IResourcesOperations operations, string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, GenericResource parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Deletes a resource by ID. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The fully qualified ID of the resource, including the resource name and + /// resource type. Use the format, + /// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} + /// + /// + /// The API version to use for the operation. + /// + public static void BeginDeleteById(this IResourcesOperations operations, string resourceId, string apiVersion) + { + ((IResourcesOperations)operations).BeginDeleteByIdAsync(resourceId, apiVersion).GetAwaiter().GetResult(); + } + + /// + /// Deletes a resource by ID. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The fully qualified ID of the resource, including the resource name and + /// resource type. Use the format, + /// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} + /// + /// + /// The API version to use for the operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginDeleteByIdAsync(this IResourcesOperations operations, string resourceId, string apiVersion, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.BeginDeleteByIdWithHttpMessagesAsync(resourceId, apiVersion, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Create a resource by ID. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The fully qualified ID of the resource, including the resource name and + /// resource type. Use the format, + /// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} + /// + /// + /// The API version to use for the operation. + /// + public static GenericResource BeginCreateOrUpdateById(this IResourcesOperations operations, string resourceId, string apiVersion, GenericResource parameters) + { + return ((IResourcesOperations)operations).BeginCreateOrUpdateByIdAsync(resourceId, apiVersion, parameters).GetAwaiter().GetResult(); + } + + /// + /// Create a resource by ID. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The fully qualified ID of the resource, including the resource name and + /// resource type. Use the format, + /// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} + /// + /// + /// The API version to use for the operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginCreateOrUpdateByIdAsync(this IResourcesOperations operations, string resourceId, string apiVersion, GenericResource parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginCreateOrUpdateByIdWithHttpMessagesAsync(resourceId, apiVersion, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Updates a resource by ID. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The fully qualified ID of the resource, including the resource name and + /// resource type. Use the format, + /// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} + /// + /// + /// The API version to use for the operation. + /// + public static GenericResource BeginUpdateById(this IResourcesOperations operations, string resourceId, string apiVersion, GenericResource parameters) + { + return ((IResourcesOperations)operations).BeginUpdateByIdAsync(resourceId, apiVersion, parameters).GetAwaiter().GetResult(); + } + + /// + /// Updates a resource by ID. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The fully qualified ID of the resource, including the resource name and + /// resource type. Use the format, + /// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} + /// + /// + /// The API version to use for the operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginUpdateByIdAsync(this IResourcesOperations operations, string resourceId, string apiVersion, GenericResource parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginUpdateByIdWithHttpMessagesAsync(resourceId, apiVersion, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Get all the resources for a resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListByResourceGroupNext(this IResourcesOperations operations, string nextPageLink) + { + return ((IResourcesOperations)operations).ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Get all the resources for a resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByResourceGroupNextAsync(this IResourcesOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Get all the resources in a subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IResourcesOperations operations, string nextPageLink) + { + return ((IResourcesOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Get all the resources in a subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IResourcesOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } +} diff --git a/src/Resources/Resources.Sdk/Generated/SubscriptionClient.cs b/src/Resources/Resources.Management.Sdk/Generated/SubscriptionClient.cs similarity index 62% rename from src/Resources/Resources.Sdk/Generated/SubscriptionClient.cs rename to src/Resources/Resources.Management.Sdk/Generated/SubscriptionClient.cs index bcb86eb12958..633674a903b4 100644 --- a/src/Resources/Resources.Sdk/Generated/SubscriptionClient.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/SubscriptionClient.cs @@ -1,89 +1,71 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Serialization; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// All resource groups and resources exist within subscriptions. These - /// operation enable you get information about your subscriptions and - /// tenants. A tenant is a dedicated instance of Azure Active Directory - /// (Azure AD) for your organization. + /// operation enable you get information about your subscriptions and tenants. + /// A tenant is a dedicated instance of Azure Active Directory (Azure AD) for + /// your organization. /// - public partial class SubscriptionClient : ServiceClient, ISubscriptionClient, IAzureClient + public partial class SubscriptionClient : Microsoft.Rest.ServiceClient, ISubscriptionClient, IAzureClient { /// /// The base URI of the service. /// public System.Uri BaseUri { get; set; } - /// /// Gets or sets json serialization settings. /// - public JsonSerializerSettings SerializationSettings { get; private set; } - + public Newtonsoft.Json.JsonSerializerSettings SerializationSettings { get; private set; } /// /// Gets or sets json deserialization settings. /// - public JsonSerializerSettings DeserializationSettings { get; private set; } - + public Newtonsoft.Json.JsonSerializerSettings DeserializationSettings { get; private set; } /// /// Credentials needed for the client to connect to Azure. /// - public ServiceClientCredentials Credentials { get; private set; } + public Microsoft.Rest.ServiceClientCredentials Credentials { get; private set; } /// - /// The API version to use for the operation. + /// The API version to use for this operation. /// public string ApiVersion { get; private set; } /// /// The preferred language for the response. /// - public string AcceptLanguage { get; set; } + public string AcceptLanguage { get; set;} /// - /// The retry timeout in seconds for Long Running Operations. Default value is - /// 30. + /// The retry timeout in seconds for Long Running Operations. Default + /// /// value is 30. /// - public int? LongRunningOperationRetryTimeout { get; set; } + public int? LongRunningOperationRetryTimeout { get; set;} /// - /// Whether a unique x-ms-client-request-id should be generated. When set to - /// true a unique x-ms-client-request-id value is generated and included in - /// each request. Default is true. + /// Whether a unique x-ms-client-request-id should be generated. When + /// /// set to true a unique x-ms-client-request-id value is generated and + /// /// included in each request. Default is true. /// - public bool? GenerateClientRequestId { get; set; } + public bool? GenerateClientRequestId { get; set;} /// - /// Gets the ISubscriptionsOperations. + /// Gets the ISubscriptionsOperations /// public virtual ISubscriptionsOperations Subscriptions { get; private set; } - /// - /// Gets the ITenantsOperations. + /// Gets the ITenantsOperations /// public virtual ITenantsOperations Tenants { get; private set; } - /// /// Initializes a new instance of the SubscriptionClient class. /// @@ -92,24 +74,22 @@ public partial class SubscriptionClient : ServiceClient, ISu /// /// /// True: will dispose the provided httpClient on calling SubscriptionClient.Dispose(). False: will not dispose provided httpClient - protected SubscriptionClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient) + protected SubscriptionClient(System.Net.Http.HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient) { - Initialize(); + this.Initialize(); } - /// /// Initializes a new instance of the SubscriptionClient class. /// /// /// Optional. The delegating handlers to add to the http client pipeline. /// - protected SubscriptionClient(params DelegatingHandler[] handlers) : base(handlers) + protected SubscriptionClient(params System.Net.Http.DelegatingHandler[] handlers) : base(handlers) { - Initialize(); + this.Initialize(); } - /// - /// Initializes a new instance of the SubscriptionClient class. + /// Initializes a new instance of the SubscriptionClient class. /// /// /// Optional. The http client handler used to handle http transport. @@ -117,11 +97,10 @@ protected SubscriptionClient(params DelegatingHandler[] handlers) : base(handler /// /// Optional. The delegating handlers to add to the http client pipeline. /// - protected SubscriptionClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers) + protected SubscriptionClient(System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : base(rootHandler, handlers) { - Initialize(); + this.Initialize(); } - /// /// Initializes a new instance of the SubscriptionClient class. /// @@ -134,15 +113,14 @@ protected SubscriptionClient(HttpClientHandler rootHandler, params DelegatingHan /// /// Thrown when a required parameter is null /// - protected SubscriptionClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) + protected SubscriptionClient(System.Uri baseUri, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) { throw new System.ArgumentNullException("baseUri"); } - BaseUri = baseUri; + this.BaseUri = baseUri; } - /// /// Initializes a new instance of the SubscriptionClient class. /// @@ -158,15 +136,15 @@ protected SubscriptionClient(System.Uri baseUri, params DelegatingHandler[] hand /// /// Thrown when a required parameter is null /// - protected SubscriptionClient(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + protected SubscriptionClient(System.Uri baseUri, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) { throw new System.ArgumentNullException("baseUri"); } - BaseUri = baseUri; + + this.BaseUri = baseUri; } - /// /// Initializes a new instance of the SubscriptionClient class. /// @@ -179,23 +157,23 @@ protected SubscriptionClient(System.Uri baseUri, HttpClientHandler rootHandler, /// /// Thrown when a required parameter is null /// - public SubscriptionClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + public SubscriptionClient(Microsoft.Rest.ServiceClientCredentials credentials, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) { if (credentials == null) { throw new System.ArgumentNullException("credentials"); } - Credentials = credentials; - if (Credentials != null) + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the SubscriptionClient class. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// @@ -206,23 +184,23 @@ public SubscriptionClient(ServiceClientCredentials credentials, params Delegatin /// /// Thrown when a required parameter is null /// - public SubscriptionClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient) + public SubscriptionClient(Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient) { if (credentials == null) { throw new System.ArgumentNullException("credentials"); } - Credentials = credentials; - if (Credentials != null) + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the SubscriptionClient class. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// @@ -234,26 +212,26 @@ public SubscriptionClient(ServiceClientCredentials credentials, HttpClient httpC /// /// Thrown when a required parameter is null /// - public SubscriptionClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + public SubscriptionClient(Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (credentials == null) { throw new System.ArgumentNullException("credentials"); } - Credentials = credentials; - if (Credentials != null) + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the SubscriptionClient class. /// /// /// Optional. The base URI of the service. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// @@ -262,7 +240,7 @@ public SubscriptionClient(ServiceClientCredentials credentials, HttpClientHandle /// /// Thrown when a required parameter is null /// - public SubscriptionClient(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + public SubscriptionClient(System.Uri baseUri, Microsoft.Rest.ServiceClientCredentials credentials, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) { @@ -272,33 +250,30 @@ public SubscriptionClient(System.Uri baseUri, ServiceClientCredentials credentia { throw new System.ArgumentNullException("credentials"); } - BaseUri = baseUri; - Credentials = credentials; - if (Credentials != null) + this.BaseUri = baseUri; + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the SubscriptionClient class. /// /// /// Optional. The base URI of the service. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// /// Optional. The http client handler used to handle http transport. /// - /// - /// Optional. The delegating handlers to add to the http client pipeline. - /// /// /// Thrown when a required parameter is null /// - public SubscriptionClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + public SubscriptionClient(System.Uri baseUri, Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) { @@ -308,65 +283,63 @@ public SubscriptionClient(System.Uri baseUri, ServiceClientCredentials credentia { throw new System.ArgumentNullException("credentials"); } - BaseUri = baseUri; - Credentials = credentials; - if (Credentials != null) + this.BaseUri = baseUri; + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// An optional partial-method to perform custom initialization. /// partial void CustomInitialize(); + /// /// Initializes client properties. /// private void Initialize() { - Subscriptions = new SubscriptionsOperations(this); - Tenants = new TenantsOperations(this); - BaseUri = new System.Uri("https://management.azure.com"); - ApiVersion = "2021-01-01"; - AcceptLanguage = "en-US"; - LongRunningOperationRetryTimeout = 30; - GenerateClientRequestId = true; - SerializationSettings = new JsonSerializerSettings + this.Subscriptions = new SubscriptionsOperations(this); + this.Tenants = new TenantsOperations(this); + this.BaseUri = new System.Uri("https://management.azure.com"); + this.ApiVersion = "2021-01-01"; + this.AcceptLanguage = "en-US"; + this.LongRunningOperationRetryTimeout = 30; + this.GenerateClientRequestId = true; + SerializationSettings = new Newtonsoft.Json.JsonSerializerSettings { Formatting = Newtonsoft.Json.Formatting.Indented, DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, - ContractResolver = new ReadOnlyJsonContractResolver(), - Converters = new List + ContractResolver = new Microsoft.Rest.Serialization.ReadOnlyJsonContractResolver(), + Converters = new System.Collections.Generic.List { - new Iso8601TimeSpanConverter() + new Microsoft.Rest.Serialization.Iso8601TimeSpanConverter() } }; - DeserializationSettings = new JsonSerializerSettings + DeserializationSettings = new Newtonsoft.Json.JsonSerializerSettings { DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, - ContractResolver = new ReadOnlyJsonContractResolver(), - Converters = new List + ContractResolver = new Microsoft.Rest.Serialization.ReadOnlyJsonContractResolver(), + Converters = new System.Collections.Generic.List { - new Iso8601TimeSpanConverter() + new Microsoft.Rest.Serialization.Iso8601TimeSpanConverter() } }; CustomInitialize(); - DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Azure.CloudErrorJsonConverter()); } /// - /// Checks resource name validity - /// - /// /// A resource name is valid if it is not a reserved word, does not contains a /// reserved word and does not start with a reserved word - /// + /// /// /// Resource object with values for resource name and resource type /// @@ -376,13 +349,13 @@ private void Initialize() /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -391,59 +364,67 @@ private void Initialize() /// /// A response object containing the response body and response headers. /// - public async Task> CheckResourceNameWithHttpMessagesAsync(ResourceName resourceNameDefinition = default(ResourceName), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CheckResourceNameWithHttpMessagesAsync(ResourceName resourceNameDefinition = default(ResourceName), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (resourceNameDefinition != null) { resourceNameDefinition.Validate(); } - if (ApiVersion == null) + if (this.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceNameDefinition", resourceNameDefinition); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CheckResourceName", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "CheckResourceName", tracingParameters); } // Construct URL - var _baseUrl = BaseUri.AbsoluteUri; + + var _baseUrl = this.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Resources/checkResourceName").ToString(); - List _queryParameters = new List(); - if (ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (GenerateClientRequestId != null && GenerateClientRequestId.Value) + if (this.GenerateClientRequestId != null && this.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (AcceptLanguage != null) + if (this.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -455,61 +436,62 @@ private void Initialize() _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(resourceNameDefinition != null) { - _requestContent = SafeJsonConvert.SerializeObject(resourceNameDefinition, SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(resourceNameDefinition, this.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Credentials != null) + if (this.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -519,9 +501,10 @@ private void Initialize() throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -532,24 +515,28 @@ private void Initialize() _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/SubscriptionClientExtensions.cs b/src/Resources/Resources.Management.Sdk/Generated/SubscriptionClientExtensions.cs new file mode 100644 index 000000000000..158ef717cebc --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/SubscriptionClientExtensions.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +namespace Microsoft.Azure.Management.Resources +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// Extension methods for SubscriptionClient + /// + public static partial class SubscriptionClientExtensions + { + /// + /// A resource name is valid if it is not a reserved word, does not contains a + /// reserved word and does not start with a reserved word + /// + /// + /// The operations group for this extension method. + /// + public static CheckResourceNameResult CheckResourceName(this ISubscriptionClient operations, ResourceName resourceNameDefinition = default(ResourceName)) + { + return ((ISubscriptionClient)operations).CheckResourceNameAsync(resourceNameDefinition).GetAwaiter().GetResult(); + } + + /// + /// A resource name is valid if it is not a reserved word, does not contains a + /// reserved word and does not start with a reserved word + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CheckResourceNameAsync(this ISubscriptionClient operations, ResourceName resourceNameDefinition = default(ResourceName), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CheckResourceNameWithHttpMessagesAsync(resourceNameDefinition, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } +} diff --git a/src/Resources/Resources.Sdk/Generated/SubscriptionFeatureRegistrationsOperations.cs b/src/Resources/Resources.Management.Sdk/Generated/SubscriptionFeatureRegistrationsOperations.cs similarity index 58% rename from src/Resources/Resources.Sdk/Generated/SubscriptionFeatureRegistrationsOperations.cs rename to src/Resources/Resources.Management.Sdk/Generated/SubscriptionFeatureRegistrationsOperations.cs index 9a22a2469049..a20844ae3166 100644 --- a/src/Resources/Resources.Sdk/Generated/SubscriptionFeatureRegistrationsOperations.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/SubscriptionFeatureRegistrationsOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// SubscriptionFeatureRegistrationsOperations operations. /// - internal partial class SubscriptionFeatureRegistrationsOperations : IServiceOperations, ISubscriptionFeatureRegistrationsOperations + internal partial class SubscriptionFeatureRegistrationsOperations : Microsoft.Rest.IServiceOperations, ISubscriptionFeatureRegistrationsOperations { /// /// Initializes a new instance of the SubscriptionFeatureRegistrationsOperations class. @@ -36,13 +24,13 @@ internal partial class SubscriptionFeatureRegistrationsOperations : IServiceOper /// /// Thrown when a required parameter is null /// - internal SubscriptionFeatureRegistrationsOperations(FeatureClient client) + internal SubscriptionFeatureRegistrationsOperations (FeatureClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -65,13 +53,13 @@ internal SubscriptionFeatureRegistrationsOperations(FeatureClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -80,71 +68,82 @@ internal SubscriptionFeatureRegistrationsOperations(FeatureClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string providerNamespace, string featureName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string providerNamespace, string featureName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (providerNamespace == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "providerNamespace"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "providerNamespace"); } + if (featureName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "featureName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "featureName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("providerNamespace", providerNamespace); tracingParameters.Add("featureName", featureName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Features/featureProviders/{providerNamespace}/subscriptionFeatureRegistrations/{featureName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{providerNamespace}", System.Uri.EscapeDataString(providerNamespace)); _url = _url.Replace("{featureName}", System.Uri.EscapeDataString(featureName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -156,50 +155,51 @@ internal SubscriptionFeatureRegistrationsOperations(FeatureClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -209,9 +209,10 @@ internal SubscriptionFeatureRegistrationsOperations(FeatureClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -222,25 +223,29 @@ internal SubscriptionFeatureRegistrationsOperations(FeatureClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Create or update a feature registration. /// @@ -259,13 +264,13 @@ internal SubscriptionFeatureRegistrationsOperations(FeatureClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -274,76 +279,87 @@ internal SubscriptionFeatureRegistrationsOperations(FeatureClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdateWithHttpMessagesAsync(string providerNamespace, string featureName, SubscriptionFeatureRegistration subscriptionFeatureRegistrationType = default(SubscriptionFeatureRegistration), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string providerNamespace, string featureName, SubscriptionFeatureRegistration subscriptionFeatureRegistrationType = default(SubscriptionFeatureRegistration), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (subscriptionFeatureRegistrationType != null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + subscriptionFeatureRegistrationType.Validate(); } - if (Client.SubscriptionId == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (providerNamespace == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "providerNamespace"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (featureName == null) + + if (providerNamespace == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "featureName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "providerNamespace"); } - if (subscriptionFeatureRegistrationType != null) + + if (featureName == null) { - subscriptionFeatureRegistrationType.Validate(); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "featureName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("providerNamespace", providerNamespace); tracingParameters.Add("featureName", featureName); + tracingParameters.Add("subscriptionFeatureRegistrationType", subscriptionFeatureRegistrationType); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Features/featureProviders/{providerNamespace}/subscriptionFeatureRegistrations/{featureName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{providerNamespace}", System.Uri.EscapeDataString(providerNamespace)); _url = _url.Replace("{featureName}", System.Uri.EscapeDataString(featureName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -355,56 +371,57 @@ internal SubscriptionFeatureRegistrationsOperations(FeatureClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(subscriptionFeatureRegistrationType != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(subscriptionFeatureRegistrationType, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(subscriptionFeatureRegistrationType, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -414,9 +431,10 @@ internal SubscriptionFeatureRegistrationsOperations(FeatureClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -427,25 +445,29 @@ internal SubscriptionFeatureRegistrationsOperations(FeatureClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Deletes a feature registration /// @@ -461,10 +483,10 @@ internal SubscriptionFeatureRegistrationsOperations(FeatureClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -473,71 +495,82 @@ internal SubscriptionFeatureRegistrationsOperations(FeatureClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteWithHttpMessagesAsync(string providerNamespace, string featureName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string providerNamespace, string featureName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (providerNamespace == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "providerNamespace"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "providerNamespace"); } + if (featureName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "featureName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "featureName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("providerNamespace", providerNamespace); tracingParameters.Add("featureName", featureName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Features/featureProviders/{providerNamespace}/subscriptionFeatureRegistrations/{featureName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{providerNamespace}", System.Uri.EscapeDataString(providerNamespace)); _url = _url.Replace("{featureName}", System.Uri.EscapeDataString(featureName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -549,50 +582,51 @@ internal SubscriptionFeatureRegistrationsOperations(FeatureClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 204) { var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -602,20 +636,25 @@ internal SubscriptionFeatureRegistrationsOperations(FeatureClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Returns subscription feature registrations for given subscription and /// provider namespace. @@ -629,13 +668,13 @@ internal SubscriptionFeatureRegistrationsOperations(FeatureClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -644,65 +683,75 @@ internal SubscriptionFeatureRegistrationsOperations(FeatureClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListBySubscriptionWithHttpMessagesAsync(string providerNamespace, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListBySubscriptionWithHttpMessagesAsync(string providerNamespace, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (providerNamespace == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "providerNamespace"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "providerNamespace"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("providerNamespace", providerNamespace); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListBySubscription", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListBySubscription", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Features/featureProviders/{providerNamespace}/subscriptionFeatureRegistrations").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{providerNamespace}", System.Uri.EscapeDataString(providerNamespace)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -714,50 +763,51 @@ internal SubscriptionFeatureRegistrationsOperations(FeatureClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -767,9 +817,10 @@ internal SubscriptionFeatureRegistrationsOperations(FeatureClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -780,25 +831,29 @@ internal SubscriptionFeatureRegistrationsOperations(FeatureClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Returns subscription feature registrations for given subscription. /// @@ -808,13 +863,13 @@ internal SubscriptionFeatureRegistrationsOperations(FeatureClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -823,59 +878,68 @@ internal SubscriptionFeatureRegistrationsOperations(FeatureClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListAllBySubscriptionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListAllBySubscriptionWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListAllBySubscription", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListAllBySubscription", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Features/subscriptionFeatureRegistrations").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -887,50 +951,51 @@ internal SubscriptionFeatureRegistrationsOperations(FeatureClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -940,9 +1005,10 @@ internal SubscriptionFeatureRegistrationsOperations(FeatureClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -953,25 +1019,29 @@ internal SubscriptionFeatureRegistrationsOperations(FeatureClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Returns subscription feature registrations for given subscription and /// provider namespace. @@ -985,13 +1055,13 @@ internal SubscriptionFeatureRegistrationsOperations(FeatureClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1000,51 +1070,54 @@ internal SubscriptionFeatureRegistrationsOperations(FeatureClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListBySubscriptionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListBySubscriptionNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListBySubscriptionNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListBySubscriptionNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1056,50 +1129,51 @@ internal SubscriptionFeatureRegistrationsOperations(FeatureClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1109,9 +1183,10 @@ internal SubscriptionFeatureRegistrationsOperations(FeatureClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -1122,25 +1197,29 @@ internal SubscriptionFeatureRegistrationsOperations(FeatureClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Returns subscription feature registrations for given subscription. /// @@ -1153,13 +1232,13 @@ internal SubscriptionFeatureRegistrationsOperations(FeatureClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1168,51 +1247,54 @@ internal SubscriptionFeatureRegistrationsOperations(FeatureClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListAllBySubscriptionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListAllBySubscriptionNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListAllBySubscriptionNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListAllBySubscriptionNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1224,50 +1306,51 @@ internal SubscriptionFeatureRegistrationsOperations(FeatureClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1277,9 +1360,10 @@ internal SubscriptionFeatureRegistrationsOperations(FeatureClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -1290,24 +1374,28 @@ internal SubscriptionFeatureRegistrationsOperations(FeatureClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/SubscriptionFeatureRegistrationsOperationsExtensions.cs b/src/Resources/Resources.Management.Sdk/Generated/SubscriptionFeatureRegistrationsOperationsExtensions.cs new file mode 100644 index 000000000000..9ef82e924aa6 --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/SubscriptionFeatureRegistrationsOperationsExtensions.cs @@ -0,0 +1,260 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +namespace Microsoft.Azure.Management.Resources +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// Extension methods for SubscriptionFeatureRegistrationsOperations + /// + public static partial class SubscriptionFeatureRegistrationsOperationsExtensions + { + /// + /// Returns a feature registration + /// + /// + /// The operations group for this extension method. + /// + /// + /// The provider namespace. + /// + /// + /// The feature name. + /// + public static SubscriptionFeatureRegistration Get(this ISubscriptionFeatureRegistrationsOperations operations, string providerNamespace, string featureName) + { + return ((ISubscriptionFeatureRegistrationsOperations)operations).GetAsync(providerNamespace, featureName).GetAwaiter().GetResult(); + } + + /// + /// Returns a feature registration + /// + /// + /// The operations group for this extension method. + /// + /// + /// The provider namespace. + /// + /// + /// The feature name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this ISubscriptionFeatureRegistrationsOperations operations, string providerNamespace, string featureName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(providerNamespace, featureName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Create or update a feature registration. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The provider namespace. + /// + /// + /// The feature name. + /// + public static SubscriptionFeatureRegistration CreateOrUpdate(this ISubscriptionFeatureRegistrationsOperations operations, string providerNamespace, string featureName, SubscriptionFeatureRegistration subscriptionFeatureRegistrationType = default(SubscriptionFeatureRegistration)) + { + return ((ISubscriptionFeatureRegistrationsOperations)operations).CreateOrUpdateAsync(providerNamespace, featureName, subscriptionFeatureRegistrationType).GetAwaiter().GetResult(); + } + + /// + /// Create or update a feature registration. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The provider namespace. + /// + /// + /// The feature name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateOrUpdateAsync(this ISubscriptionFeatureRegistrationsOperations operations, string providerNamespace, string featureName, SubscriptionFeatureRegistration subscriptionFeatureRegistrationType = default(SubscriptionFeatureRegistration), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(providerNamespace, featureName, subscriptionFeatureRegistrationType, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Deletes a feature registration + /// + /// + /// The operations group for this extension method. + /// + /// + /// The provider namespace. + /// + /// + /// The feature name. + /// + public static void Delete(this ISubscriptionFeatureRegistrationsOperations operations, string providerNamespace, string featureName) + { + ((ISubscriptionFeatureRegistrationsOperations)operations).DeleteAsync(providerNamespace, featureName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a feature registration + /// + /// + /// The operations group for this extension method. + /// + /// + /// The provider namespace. + /// + /// + /// The feature name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAsync(this ISubscriptionFeatureRegistrationsOperations operations, string providerNamespace, string featureName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(providerNamespace, featureName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Returns subscription feature registrations for given subscription and + /// provider namespace. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The provider namespace. + /// + public static Microsoft.Rest.Azure.IPage ListBySubscription(this ISubscriptionFeatureRegistrationsOperations operations, string providerNamespace) + { + return ((ISubscriptionFeatureRegistrationsOperations)operations).ListBySubscriptionAsync(providerNamespace).GetAwaiter().GetResult(); + } + + /// + /// Returns subscription feature registrations for given subscription and + /// provider namespace. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The provider namespace. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListBySubscriptionAsync(this ISubscriptionFeatureRegistrationsOperations operations, string providerNamespace, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(providerNamespace, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Returns subscription feature registrations for given subscription. + /// + /// + /// The operations group for this extension method. + /// + public static Microsoft.Rest.Azure.IPage ListAllBySubscription(this ISubscriptionFeatureRegistrationsOperations operations) + { + return ((ISubscriptionFeatureRegistrationsOperations)operations).ListAllBySubscriptionAsync().GetAwaiter().GetResult(); + } + + /// + /// Returns subscription feature registrations for given subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAllBySubscriptionAsync(this ISubscriptionFeatureRegistrationsOperations operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListAllBySubscriptionWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Returns subscription feature registrations for given subscription and + /// provider namespace. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListBySubscriptionNext(this ISubscriptionFeatureRegistrationsOperations operations, string nextPageLink) + { + return ((ISubscriptionFeatureRegistrationsOperations)operations).ListBySubscriptionNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Returns subscription feature registrations for given subscription and + /// provider namespace. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListBySubscriptionNextAsync(this ISubscriptionFeatureRegistrationsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListBySubscriptionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Returns subscription feature registrations for given subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListAllBySubscriptionNext(this ISubscriptionFeatureRegistrationsOperations operations, string nextPageLink) + { + return ((ISubscriptionFeatureRegistrationsOperations)operations).ListAllBySubscriptionNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Returns subscription feature registrations for given subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAllBySubscriptionNextAsync(this ISubscriptionFeatureRegistrationsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListAllBySubscriptionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } +} diff --git a/src/Resources/Resources.Sdk/Generated/SubscriptionsOperations.cs b/src/Resources/Resources.Management.Sdk/Generated/SubscriptionsOperations.cs similarity index 57% rename from src/Resources/Resources.Sdk/Generated/SubscriptionsOperations.cs rename to src/Resources/Resources.Management.Sdk/Generated/SubscriptionsOperations.cs index b556162902bd..d08a5db8dd77 100644 --- a/src/Resources/Resources.Sdk/Generated/SubscriptionsOperations.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/SubscriptionsOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// SubscriptionsOperations operations. /// - internal partial class SubscriptionsOperations : IServiceOperations, ISubscriptionsOperations + internal partial class SubscriptionsOperations : Microsoft.Rest.IServiceOperations, ISubscriptionsOperations { /// /// Initializes a new instance of the SubscriptionsOperations class. @@ -36,13 +24,13 @@ internal partial class SubscriptionsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal SubscriptionsOperations(SubscriptionClient client) + internal SubscriptionsOperations (SubscriptionClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -51,13 +39,10 @@ internal SubscriptionsOperations(SubscriptionClient client) public SubscriptionClient Client { get; private set; } /// - /// Gets all available geo-locations. - /// - /// /// This operation provides all the locations that are available for resource /// providers; however, each resource provider may support a subset of this /// list. - /// + /// /// /// The ID of the target subscription. /// @@ -70,13 +55,13 @@ internal SubscriptionsOperations(SubscriptionClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -85,65 +70,75 @@ internal SubscriptionsOperations(SubscriptionClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListLocationsWithHttpMessagesAsync(string subscriptionId, bool? includeExtendedLocations = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListLocationsWithHttpMessagesAsync(string subscriptionId, bool? includeExtendedLocations = default(bool?), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (subscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "subscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "subscriptionId"); } - if (Client.ApiVersion == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("subscriptionId", subscriptionId); tracingParameters.Add("includeExtendedLocations", includeExtendedLocations); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListLocations", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListLocations", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/locations").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(subscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (includeExtendedLocations != null) { - _queryParameters.Add(string.Format("includeExtendedLocations={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(includeExtendedLocations, Client.SerializationSettings).Trim('"')))); + _queryParameters.Add(string.Format("includeExtendedLocations={0}", System.Uri.EscapeDataString(Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(includeExtendedLocations, this.Client.SerializationSettings).Trim('"')))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -155,55 +150,56 @@ internal SubscriptionsOperations(SubscriptionClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -213,9 +209,10 @@ internal SubscriptionsOperations(SubscriptionClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -226,25 +223,29 @@ internal SubscriptionsOperations(SubscriptionClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets details about a specified subscription. /// @@ -257,13 +258,13 @@ internal SubscriptionsOperations(SubscriptionClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -272,60 +273,69 @@ internal SubscriptionsOperations(SubscriptionClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string subscriptionId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string subscriptionId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (subscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "subscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "subscriptionId"); } - if (Client.ApiVersion == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("subscriptionId", subscriptionId); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(subscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -337,55 +347,56 @@ internal SubscriptionsOperations(SubscriptionClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -395,9 +406,10 @@ internal SubscriptionsOperations(SubscriptionClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -408,25 +420,29 @@ internal SubscriptionsOperations(SubscriptionClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets all subscriptions for a tenant. /// @@ -436,13 +452,13 @@ internal SubscriptionsOperations(SubscriptionClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -451,54 +467,62 @@ internal SubscriptionsOperations(SubscriptionClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions").ToString(); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -510,55 +534,56 @@ internal SubscriptionsOperations(SubscriptionClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -568,9 +593,10 @@ internal SubscriptionsOperations(SubscriptionClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -581,25 +607,29 @@ internal SubscriptionsOperations(SubscriptionClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Compares a subscriptions logical zone mapping /// @@ -615,13 +645,13 @@ internal SubscriptionsOperations(SubscriptionClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -630,65 +660,75 @@ internal SubscriptionsOperations(SubscriptionClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CheckZonePeersWithHttpMessagesAsync(string subscriptionId, CheckZonePeersRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CheckZonePeersWithHttpMessagesAsync(string subscriptionId, CheckZonePeersRequest parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (subscriptionId == null) + + + + + if (parameters == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "subscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); } - if (Client.ApiVersion == null) + + if (subscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "subscriptionId"); } - if (parameters == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("subscriptionId", subscriptionId); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CheckZonePeers", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "CheckZonePeers", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Resources/checkZonePeers/").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(subscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -700,56 +740,57 @@ internal SubscriptionsOperations(SubscriptionClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseAutoGeneratedException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponseAutoGenerated _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -759,9 +800,10 @@ internal SubscriptionsOperations(SubscriptionClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -772,25 +814,29 @@ internal SubscriptionsOperations(SubscriptionClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets all subscriptions for a tenant. /// @@ -803,13 +849,13 @@ internal SubscriptionsOperations(SubscriptionClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -818,51 +864,54 @@ internal SubscriptionsOperations(SubscriptionClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -874,55 +923,56 @@ internal SubscriptionsOperations(SubscriptionClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -932,9 +982,10 @@ internal SubscriptionsOperations(SubscriptionClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -945,24 +996,28 @@ internal SubscriptionsOperations(SubscriptionClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/SubscriptionsOperationsExtensions.cs b/src/Resources/Resources.Management.Sdk/Generated/SubscriptionsOperationsExtensions.cs new file mode 100644 index 000000000000..412e44b7ac32 --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/SubscriptionsOperationsExtensions.cs @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +namespace Microsoft.Azure.Management.Resources +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// Extension methods for SubscriptionsOperations + /// + public static partial class SubscriptionsOperationsExtensions + { + /// + /// This operation provides all the locations that are available for resource + /// providers; however, each resource provider may support a subset of this + /// list. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The ID of the target subscription. + /// + /// + /// Whether to include extended locations. + /// + public static System.Collections.Generic.IEnumerable ListLocations(this ISubscriptionsOperations operations, string subscriptionId, bool? includeExtendedLocations = default(bool?)) + { + return ((ISubscriptionsOperations)operations).ListLocationsAsync(subscriptionId, includeExtendedLocations).GetAwaiter().GetResult(); + } + + /// + /// This operation provides all the locations that are available for resource + /// providers; however, each resource provider may support a subset of this + /// list. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The ID of the target subscription. + /// + /// + /// Whether to include extended locations. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListLocationsAsync(this ISubscriptionsOperations operations, string subscriptionId, bool? includeExtendedLocations = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListLocationsWithHttpMessagesAsync(subscriptionId, includeExtendedLocations, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets details about a specified subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The ID of the target subscription. + /// + public static Subscription Get(this ISubscriptionsOperations operations, string subscriptionId) + { + return ((ISubscriptionsOperations)operations).GetAsync(subscriptionId).GetAwaiter().GetResult(); + } + + /// + /// Gets details about a specified subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The ID of the target subscription. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this ISubscriptionsOperations operations, string subscriptionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(subscriptionId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets all subscriptions for a tenant. + /// + /// + /// The operations group for this extension method. + /// + public static Microsoft.Rest.Azure.IPage List(this ISubscriptionsOperations operations) + { + return ((ISubscriptionsOperations)operations).ListAsync().GetAwaiter().GetResult(); + } + + /// + /// Gets all subscriptions for a tenant. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this ISubscriptionsOperations operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Compares a subscriptions logical zone mapping + /// + /// + /// The operations group for this extension method. + /// + /// + /// The ID of the target subscription. + /// + public static CheckZonePeersResult CheckZonePeers(this ISubscriptionsOperations operations, string subscriptionId, CheckZonePeersRequest parameters) + { + return ((ISubscriptionsOperations)operations).CheckZonePeersAsync(subscriptionId, parameters).GetAwaiter().GetResult(); + } + + /// + /// Compares a subscriptions logical zone mapping + /// + /// + /// The operations group for this extension method. + /// + /// + /// The ID of the target subscription. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CheckZonePeersAsync(this ISubscriptionsOperations operations, string subscriptionId, CheckZonePeersRequest parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CheckZonePeersWithHttpMessagesAsync(subscriptionId, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets all subscriptions for a tenant. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this ISubscriptionsOperations operations, string nextPageLink) + { + return ((ISubscriptionsOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets all subscriptions for a tenant. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this ISubscriptionsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } +} diff --git a/src/Resources/Resources.Sdk/Generated/TagsOperations.cs b/src/Resources/Resources.Management.Sdk/Generated/TagsOperations.cs similarity index 57% rename from src/Resources/Resources.Sdk/Generated/TagsOperations.cs rename to src/Resources/Resources.Management.Sdk/Generated/TagsOperations.cs index 75e9d503c31d..a0717a64bec1 100644 --- a/src/Resources/Resources.Sdk/Generated/TagsOperations.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/TagsOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// TagsOperations operations. /// - internal partial class TagsOperations : IServiceOperations, ITagsOperations + internal partial class TagsOperations : Microsoft.Rest.IServiceOperations, ITagsOperations { /// /// Initializes a new instance of the TagsOperations class. @@ -36,13 +24,13 @@ internal partial class TagsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal TagsOperations(ResourceManagementClient client) + internal TagsOperations (ResourceManagementClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -51,13 +39,10 @@ internal TagsOperations(ResourceManagementClient client) public ResourceManagementClient Client { get; private set; } /// - /// Deletes a predefined tag value for a predefined tag name. - /// - /// /// This operation allows deleting a value from the list of predefined values /// for an existing predefined tag name. The value being deleted must not be in /// use as a tag value for the given tag name for any resource. - /// + /// /// /// The name of the tag. /// @@ -70,10 +55,10 @@ internal TagsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -82,71 +67,82 @@ internal TagsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteValueWithHttpMessagesAsync(string tagName, string tagValue, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task DeleteValueWithHttpMessagesAsync(string tagName, string tagValue, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (tagName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "tagName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "tagName"); } + if (tagValue == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "tagValue"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "tagValue"); } - if (Client.ApiVersion == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("tagName", tagName); tracingParameters.Add("tagValue", tagValue); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteValue", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "DeleteValue", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/tagNames/{tagName}/tagValues/{tagValue}").ToString(); _url = _url.Replace("{tagName}", System.Uri.EscapeDataString(tagName)); _url = _url.Replace("{tagValue}", System.Uri.EscapeDataString(tagValue)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -158,55 +154,56 @@ internal TagsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -216,28 +213,30 @@ internal TagsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Creates a predefined value for a predefined tag name. - /// - /// /// This operation allows adding a value to the list of predefined values for /// an existing predefined tag name. A tag value can have a maximum of 256 /// characters. - /// + /// /// /// The name of the tag. /// @@ -250,13 +249,13 @@ internal TagsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -265,71 +264,82 @@ internal TagsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdateValueWithHttpMessagesAsync(string tagName, string tagValue, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CreateOrUpdateValueWithHttpMessagesAsync(string tagName, string tagValue, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (tagName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "tagName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "tagName"); } + if (tagValue == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "tagValue"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "tagValue"); } - if (Client.ApiVersion == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("tagName", tagName); tracingParameters.Add("tagValue", tagValue); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateValue", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateValue", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/tagNames/{tagName}/tagValues/{tagValue}").ToString(); _url = _url.Replace("{tagName}", System.Uri.EscapeDataString(tagName)); _url = _url.Replace("{tagValue}", System.Uri.EscapeDataString(tagValue)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -341,55 +351,56 @@ internal TagsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 201) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -399,9 +410,10 @@ internal TagsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -412,16 +424,16 @@ internal TagsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } // Deserialize Response @@ -430,34 +442,35 @@ internal TagsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Creates a predefined tag name. - /// - /// /// This operation allows adding a name to the list of predefined tag names for /// the given subscription. A tag name can have a maximum of 512 characters and /// is case-insensitive. Tag names cannot have the following prefixes which are - /// reserved for Azure use: 'microsoft', 'azure', 'windows'. - /// + /// reserved for Azure use: 'microsoft', 'azure', 'windows'. + /// /// /// The name of the tag to create. /// @@ -467,13 +480,13 @@ internal TagsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -482,65 +495,75 @@ internal TagsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdateWithHttpMessagesAsync(string tagName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string tagName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (tagName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "tagName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "tagName"); } - if (Client.ApiVersion == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("tagName", tagName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/tagNames/{tagName}").ToString(); _url = _url.Replace("{tagName}", System.Uri.EscapeDataString(tagName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -552,55 +575,56 @@ internal TagsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 201) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -610,9 +634,10 @@ internal TagsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -623,16 +648,16 @@ internal TagsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } // Deserialize Response @@ -641,34 +666,35 @@ internal TagsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Deletes a predefined tag name. - /// - /// /// This operation allows deleting a name from the list of predefined tag names /// for the given subscription. The name being deleted must not be in use as a /// tag name for any resource. All predefined values for the given name must /// have already been deleted. - /// + /// /// /// The name of the tag. /// @@ -678,10 +704,10 @@ internal TagsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -690,65 +716,75 @@ internal TagsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteWithHttpMessagesAsync(string tagName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string tagName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (tagName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "tagName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "tagName"); } - if (Client.ApiVersion == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("tagName", tagName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/tagNames/{tagName}").ToString(); _url = _url.Replace("{tagName}", System.Uri.EscapeDataString(tagName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -760,55 +796,56 @@ internal TagsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -818,42 +855,44 @@ internal TagsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets a summary of tag usage under the subscription. - /// - /// /// This operation performs a union of predefined tags, resource tags, resource /// group tags and subscription tags, and returns a summary of usage for each /// tag name and value under the given subscription. In case of a large number /// of tags, this operation may return a previously cached result. - /// + /// /// /// Headers that will be added to request. /// /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -862,59 +901,68 @@ internal TagsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/tagNames").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -926,55 +974,56 @@ internal TagsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -984,9 +1033,10 @@ internal TagsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -997,37 +1047,39 @@ internal TagsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Creates or updates the entire set of tags on a resource or subscription. - /// - /// /// This operation allows adding or replacing the entire set of tags on the /// specified resource or subscription. The specified entity can have a maximum /// of 50 tags. - /// + /// /// /// The resource scope. /// /// + /// /// /// /// Headers that will be added to request. @@ -1035,13 +1087,13 @@ internal TagsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1050,69 +1102,78 @@ internal TagsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdateAtScopeWithHttpMessagesAsync(string scope, TagsResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CreateOrUpdateAtScopeWithHttpMessagesAsync(string scope, TagsResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (scope == null) + + + + + if (parameters == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "scope"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); } - if (Client.ApiVersion == null) + if (parameters != null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + parameters.Validate(); } - if (parameters == null) + if (scope == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "scope"); } - if (parameters != null) + + if (this.Client.ApiVersion == null) { - parameters.Validate(); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("scope", scope); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateAtScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateAtScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{scope}/providers/Microsoft.Resources/tags/default").ToString(); _url = _url.Replace("{scope}", scope); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1124,61 +1185,62 @@ internal TagsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1188,9 +1250,10 @@ internal TagsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -1201,41 +1264,43 @@ internal TagsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Selectively updates the set of tags on a resource or subscription. - /// - /// /// This operation allows replacing, merging or selectively deleting tags on /// the specified resource or subscription. The specified entity can have a - /// maximum of 50 tags at the end of the operation. The 'replace' option - /// replaces the entire set of existing tags with a new set. The 'merge' option + /// maximum of 50 tags at the end of the operation. The 'replace' option + /// replaces the entire set of existing tags with a new set. The 'merge' option /// allows adding tags with new names and updating the values of tags with - /// existing names. The 'delete' option allows selectively deleting tags based + /// existing names. The 'delete' option allows selectively deleting tags based /// on given names or name/value pairs. - /// + /// /// /// The resource scope. /// /// + /// /// /// /// Headers that will be added to request. @@ -1243,13 +1308,13 @@ internal TagsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1258,65 +1323,74 @@ internal TagsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateAtScopeWithHttpMessagesAsync(string scope, TagsPatchResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> UpdateAtScopeWithHttpMessagesAsync(string scope, TagsPatchResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (scope == null) + + + + + if (parameters == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "scope"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); } - if (Client.ApiVersion == null) + if (scope == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "scope"); } - if (parameters == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("scope", scope); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateAtScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "UpdateAtScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{scope}/providers/Microsoft.Resources/tags/default").ToString(); _url = _url.Replace("{scope}", scope); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PATCH"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1328,61 +1402,62 @@ internal TagsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1392,9 +1467,10 @@ internal TagsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -1405,25 +1481,29 @@ internal TagsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets the entire set of tags on a resource or subscription. /// @@ -1436,13 +1516,13 @@ internal TagsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1451,60 +1531,69 @@ internal TagsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetAtScopeWithHttpMessagesAsync(string scope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetAtScopeWithHttpMessagesAsync(string scope, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (scope == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "scope"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "scope"); } - if (Client.ApiVersion == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("scope", scope); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetAtScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "GetAtScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{scope}/providers/Microsoft.Resources/tags/default").ToString(); _url = _url.Replace("{scope}", scope); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1516,55 +1605,56 @@ internal TagsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1574,9 +1664,10 @@ internal TagsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -1587,25 +1678,29 @@ internal TagsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Deletes the entire set of tags on a resource or subscription. /// @@ -1618,10 +1713,10 @@ internal TagsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1630,60 +1725,69 @@ internal TagsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteAtScopeWithHttpMessagesAsync(string scope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task DeleteAtScopeWithHttpMessagesAsync(string scope, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + + + + if (scope == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "scope"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "scope"); } - if (Client.ApiVersion == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("scope", scope); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteAtScope", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "DeleteAtScope", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{scope}/providers/Microsoft.Resources/tags/default").ToString(); _url = _url.Replace("{scope}", scope); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1695,55 +1799,56 @@ internal TagsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1753,29 +1858,31 @@ internal TagsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets a summary of tag usage under the subscription. - /// - /// /// This operation performs a union of predefined tags, resource tags, resource /// group tags and subscription tags, and returns a summary of usage for each /// tag name and value under the given subscription. In case of a large number /// of tags, this operation may return a previously cached result. - /// + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -1785,13 +1892,13 @@ internal TagsOperations(ResourceManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1800,51 +1907,54 @@ internal TagsOperations(ResourceManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1856,55 +1966,56 @@ internal TagsOperations(ResourceManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1914,9 +2025,10 @@ internal TagsOperations(ResourceManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -1927,24 +2039,28 @@ internal TagsOperations(ResourceManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/TagsOperationsExtensions.cs b/src/Resources/Resources.Management.Sdk/Generated/TagsOperationsExtensions.cs new file mode 100644 index 000000000000..b57136d3d16b --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/TagsOperationsExtensions.cs @@ -0,0 +1,391 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +namespace Microsoft.Azure.Management.Resources +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// Extension methods for TagsOperations + /// + public static partial class TagsOperationsExtensions + { + /// + /// This operation allows deleting a value from the list of predefined values + /// for an existing predefined tag name. The value being deleted must not be in + /// use as a tag value for the given tag name for any resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the tag. + /// + /// + /// The value of the tag to delete. + /// + public static void DeleteValue(this ITagsOperations operations, string tagName, string tagValue) + { + ((ITagsOperations)operations).DeleteValueAsync(tagName, tagValue).GetAwaiter().GetResult(); + } + + /// + /// This operation allows deleting a value from the list of predefined values + /// for an existing predefined tag name. The value being deleted must not be in + /// use as a tag value for the given tag name for any resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the tag. + /// + /// + /// The value of the tag to delete. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteValueAsync(this ITagsOperations operations, string tagName, string tagValue, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteValueWithHttpMessagesAsync(tagName, tagValue, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// This operation allows adding a value to the list of predefined values for + /// an existing predefined tag name. A tag value can have a maximum of 256 + /// characters. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the tag. + /// + /// + /// The value of the tag to create. + /// + public static TagValue CreateOrUpdateValue(this ITagsOperations operations, string tagName, string tagValue) + { + return ((ITagsOperations)operations).CreateOrUpdateValueAsync(tagName, tagValue).GetAwaiter().GetResult(); + } + + /// + /// This operation allows adding a value to the list of predefined values for + /// an existing predefined tag name. A tag value can have a maximum of 256 + /// characters. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the tag. + /// + /// + /// The value of the tag to create. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateOrUpdateValueAsync(this ITagsOperations operations, string tagName, string tagValue, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateValueWithHttpMessagesAsync(tagName, tagValue, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// This operation allows adding a name to the list of predefined tag names for + /// the given subscription. A tag name can have a maximum of 512 characters and + /// is case-insensitive. Tag names cannot have the following prefixes which are + /// reserved for Azure use: 'microsoft', 'azure', 'windows'. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the tag to create. + /// + public static TagDetails CreateOrUpdate(this ITagsOperations operations, string tagName) + { + return ((ITagsOperations)operations).CreateOrUpdateAsync(tagName).GetAwaiter().GetResult(); + } + + /// + /// This operation allows adding a name to the list of predefined tag names for + /// the given subscription. A tag name can have a maximum of 512 characters and + /// is case-insensitive. Tag names cannot have the following prefixes which are + /// reserved for Azure use: 'microsoft', 'azure', 'windows'. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the tag to create. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateOrUpdateAsync(this ITagsOperations operations, string tagName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(tagName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// This operation allows deleting a name from the list of predefined tag names + /// for the given subscription. The name being deleted must not be in use as a + /// tag name for any resource. All predefined values for the given name must + /// have already been deleted. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the tag. + /// + public static void Delete(this ITagsOperations operations, string tagName) + { + ((ITagsOperations)operations).DeleteAsync(tagName).GetAwaiter().GetResult(); + } + + /// + /// This operation allows deleting a name from the list of predefined tag names + /// for the given subscription. The name being deleted must not be in use as a + /// tag name for any resource. All predefined values for the given name must + /// have already been deleted. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the tag. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAsync(this ITagsOperations operations, string tagName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(tagName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// This operation performs a union of predefined tags, resource tags, resource + /// group tags and subscription tags, and returns a summary of usage for each + /// tag name and value under the given subscription. In case of a large number + /// of tags, this operation may return a previously cached result. + /// + /// + /// The operations group for this extension method. + /// + public static Microsoft.Rest.Azure.IPage List(this ITagsOperations operations) + { + return ((ITagsOperations)operations).ListAsync().GetAwaiter().GetResult(); + } + + /// + /// This operation performs a union of predefined tags, resource tags, resource + /// group tags and subscription tags, and returns a summary of usage for each + /// tag name and value under the given subscription. In case of a large number + /// of tags, this operation may return a previously cached result. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this ITagsOperations operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// This operation allows adding or replacing the entire set of tags on the + /// specified resource or subscription. The specified entity can have a maximum + /// of 50 tags. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource scope. + /// + public static TagsResource CreateOrUpdateAtScope(this ITagsOperations operations, string scope, TagsResource parameters) + { + return ((ITagsOperations)operations).CreateOrUpdateAtScopeAsync(scope, parameters).GetAwaiter().GetResult(); + } + + /// + /// This operation allows adding or replacing the entire set of tags on the + /// specified resource or subscription. The specified entity can have a maximum + /// of 50 tags. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource scope. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateOrUpdateAtScopeAsync(this ITagsOperations operations, string scope, TagsResource parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateAtScopeWithHttpMessagesAsync(scope, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// This operation allows replacing, merging or selectively deleting tags on + /// the specified resource or subscription. The specified entity can have a + /// maximum of 50 tags at the end of the operation. The 'replace' option + /// replaces the entire set of existing tags with a new set. The 'merge' option + /// allows adding tags with new names and updating the values of tags with + /// existing names. The 'delete' option allows selectively deleting tags based + /// on given names or name/value pairs. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource scope. + /// + public static TagsResource UpdateAtScope(this ITagsOperations operations, string scope, TagsPatchResource parameters) + { + return ((ITagsOperations)operations).UpdateAtScopeAsync(scope, parameters).GetAwaiter().GetResult(); + } + + /// + /// This operation allows replacing, merging or selectively deleting tags on + /// the specified resource or subscription. The specified entity can have a + /// maximum of 50 tags at the end of the operation. The 'replace' option + /// replaces the entire set of existing tags with a new set. The 'merge' option + /// allows adding tags with new names and updating the values of tags with + /// existing names. The 'delete' option allows selectively deleting tags based + /// on given names or name/value pairs. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource scope. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task UpdateAtScopeAsync(this ITagsOperations operations, string scope, TagsPatchResource parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.UpdateAtScopeWithHttpMessagesAsync(scope, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets the entire set of tags on a resource or subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource scope. + /// + public static TagsResource GetAtScope(this ITagsOperations operations, string scope) + { + return ((ITagsOperations)operations).GetAtScopeAsync(scope).GetAwaiter().GetResult(); + } + + /// + /// Gets the entire set of tags on a resource or subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource scope. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAtScopeAsync(this ITagsOperations operations, string scope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetAtScopeWithHttpMessagesAsync(scope, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Deletes the entire set of tags on a resource or subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource scope. + /// + public static void DeleteAtScope(this ITagsOperations operations, string scope) + { + ((ITagsOperations)operations).DeleteAtScopeAsync(scope).GetAwaiter().GetResult(); + } + + /// + /// Deletes the entire set of tags on a resource or subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource scope. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAtScopeAsync(this ITagsOperations operations, string scope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteAtScopeWithHttpMessagesAsync(scope, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// This operation performs a union of predefined tags, resource tags, resource + /// group tags and subscription tags, and returns a summary of usage for each + /// tag name and value under the given subscription. In case of a large number + /// of tags, this operation may return a previously cached result. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this ITagsOperations operations, string nextPageLink) + { + return ((ITagsOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// This operation performs a union of predefined tags, resource tags, resource + /// group tags and subscription tags, and returns a summary of usage for each + /// tag name and value under the given subscription. In case of a large number + /// of tags, this operation may return a previously cached result. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this ITagsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } +} diff --git a/src/Resources/Resources.Sdk/Generated/TemplateSpecVersionsOperations.cs b/src/Resources/Resources.Management.Sdk/Generated/TemplateSpecVersionsOperations.cs similarity index 57% rename from src/Resources/Resources.Sdk/Generated/TemplateSpecVersionsOperations.cs rename to src/Resources/Resources.Management.Sdk/Generated/TemplateSpecVersionsOperations.cs index 6c6741c893c3..8029c1d12a71 100644 --- a/src/Resources/Resources.Sdk/Generated/TemplateSpecVersionsOperations.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/TemplateSpecVersionsOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// TemplateSpecVersionsOperations operations. /// - internal partial class TemplateSpecVersionsOperations : IServiceOperations, ITemplateSpecVersionsOperations + internal partial class TemplateSpecVersionsOperations : Microsoft.Rest.IServiceOperations, ITemplateSpecVersionsOperations { /// /// Initializes a new instance of the TemplateSpecVersionsOperations class. @@ -36,13 +24,13 @@ internal partial class TemplateSpecVersionsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal TemplateSpecVersionsOperations(TemplateSpecsClient client) + internal TemplateSpecVersionsOperations (TemplateSpecsClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -71,13 +59,13 @@ internal TemplateSpecVersionsOperations(TemplateSpecsClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -86,131 +74,140 @@ internal TemplateSpecVersionsOperations(TemplateSpecsClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string templateSpecName, string templateSpecVersion, TemplateSpecVersion templateSpecVersionModel, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string templateSpecName, string templateSpecVersion, TemplateSpecVersion templateSpecVersionModel, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (templateSpecVersionModel == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "templateSpecVersionModel"); + } + if (templateSpecVersionModel != null) + { + templateSpecVersionModel.Validate(); + } + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); } } if (templateSpecName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "templateSpecName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "templateSpecName"); } if (templateSpecName != null) { if (templateSpecName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "templateSpecName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "templateSpecName", 90); } if (templateSpecName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "templateSpecName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "templateSpecName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(templateSpecName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "templateSpecName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "templateSpecName", "^[-\\w\\._\\(\\)]+$"); } } if (templateSpecVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "templateSpecVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "templateSpecVersion"); } if (templateSpecVersion != null) { if (templateSpecVersion.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "templateSpecVersion", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "templateSpecVersion", 90); } if (templateSpecVersion.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "templateSpecVersion", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "templateSpecVersion", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(templateSpecVersion, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "templateSpecVersion", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "templateSpecVersion", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (templateSpecVersionModel == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "templateSpecVersionModel"); - } - if (templateSpecVersionModel != null) - { - templateSpecVersionModel.Validate(); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("templateSpecName", templateSpecName); tracingParameters.Add("templateSpecVersion", templateSpecVersion); + tracingParameters.Add("templateSpecVersionModel", templateSpecVersionModel); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/templateSpecs/{templateSpecName}/versions/{templateSpecVersion}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{templateSpecName}", System.Uri.EscapeDataString(templateSpecName)); _url = _url.Replace("{templateSpecVersion}", System.Uri.EscapeDataString(templateSpecVersion)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -222,56 +219,57 @@ internal TemplateSpecVersionsOperations(TemplateSpecsClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(templateSpecVersionModel != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(templateSpecVersionModel, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(templateSpecVersionModel, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 201) { var ex = new TemplateSpecsErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - TemplateSpecsError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + TemplateSpecsError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -281,9 +279,10 @@ internal TemplateSpecVersionsOperations(TemplateSpecsClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -294,16 +293,16 @@ internal TemplateSpecVersionsOperations(TemplateSpecsClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } // Deserialize Response @@ -312,25 +311,29 @@ internal TemplateSpecVersionsOperations(TemplateSpecsClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Updates Template Spec Version tags with specified values. /// @@ -352,13 +355,13 @@ internal TemplateSpecVersionsOperations(TemplateSpecsClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -367,123 +370,132 @@ internal TemplateSpecVersionsOperations(TemplateSpecsClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string templateSpecName, string templateSpecVersion, TemplateSpecVersionUpdateModel templateSpecVersionUpdateModel = default(TemplateSpecVersionUpdateModel), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string templateSpecName, string templateSpecVersion, TemplateSpecVersionUpdateModel templateSpecVersionUpdateModel = default(TemplateSpecVersionUpdateModel), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); } } if (templateSpecName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "templateSpecName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "templateSpecName"); } if (templateSpecName != null) { if (templateSpecName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "templateSpecName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "templateSpecName", 90); } if (templateSpecName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "templateSpecName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "templateSpecName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(templateSpecName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "templateSpecName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "templateSpecName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (templateSpecVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "templateSpecVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "templateSpecVersion"); } if (templateSpecVersion != null) { if (templateSpecVersion.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "templateSpecVersion", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "templateSpecVersion", 90); } if (templateSpecVersion.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "templateSpecVersion", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "templateSpecVersion", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(templateSpecVersion, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "templateSpecVersion", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "templateSpecVersion", "^[-\\w\\._\\(\\)]+$"); } } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("templateSpecName", templateSpecName); tracingParameters.Add("templateSpecVersion", templateSpecVersion); + tracingParameters.Add("templateSpecVersionUpdateModel", templateSpecVersionUpdateModel); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/templateSpecs/{templateSpecName}/versions/{templateSpecVersion}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{templateSpecName}", System.Uri.EscapeDataString(templateSpecName)); _url = _url.Replace("{templateSpecVersion}", System.Uri.EscapeDataString(templateSpecVersion)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PATCH"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -495,56 +507,57 @@ internal TemplateSpecVersionsOperations(TemplateSpecsClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(templateSpecVersionUpdateModel != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(templateSpecVersionUpdateModel, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(templateSpecVersionUpdateModel, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new TemplateSpecsErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - TemplateSpecsError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + TemplateSpecsError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -554,9 +567,10 @@ internal TemplateSpecVersionsOperations(TemplateSpecsClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -567,25 +581,29 @@ internal TemplateSpecVersionsOperations(TemplateSpecsClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets a Template Spec version from a specific Template Spec. /// @@ -604,13 +622,13 @@ internal TemplateSpecVersionsOperations(TemplateSpecsClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -619,122 +637,131 @@ internal TemplateSpecVersionsOperations(TemplateSpecsClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string templateSpecName, string templateSpecVersion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string templateSpecName, string templateSpecVersion, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); } } if (templateSpecName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "templateSpecName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "templateSpecName"); } if (templateSpecName != null) { if (templateSpecName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "templateSpecName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "templateSpecName", 90); } if (templateSpecName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "templateSpecName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "templateSpecName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(templateSpecName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "templateSpecName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "templateSpecName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (templateSpecVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "templateSpecVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "templateSpecVersion"); } if (templateSpecVersion != null) { if (templateSpecVersion.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "templateSpecVersion", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "templateSpecVersion", 90); } if (templateSpecVersion.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "templateSpecVersion", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "templateSpecVersion", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(templateSpecVersion, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "templateSpecVersion", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "templateSpecVersion", "^[-\\w\\._\\(\\)]+$"); } } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("templateSpecName", templateSpecName); tracingParameters.Add("templateSpecVersion", templateSpecVersion); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/templateSpecs/{templateSpecName}/versions/{templateSpecVersion}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{templateSpecName}", System.Uri.EscapeDataString(templateSpecName)); _url = _url.Replace("{templateSpecVersion}", System.Uri.EscapeDataString(templateSpecVersion)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -746,50 +773,51 @@ internal TemplateSpecVersionsOperations(TemplateSpecsClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new TemplateSpecsErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - TemplateSpecsError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + TemplateSpecsError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -799,9 +827,10 @@ internal TemplateSpecVersionsOperations(TemplateSpecsClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -812,25 +841,29 @@ internal TemplateSpecVersionsOperations(TemplateSpecsClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Deletes a specific version from a Template Spec. When operation completes, /// status code 200 returned without content. @@ -850,10 +883,10 @@ internal TemplateSpecVersionsOperations(TemplateSpecsClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -862,122 +895,131 @@ internal TemplateSpecVersionsOperations(TemplateSpecsClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string templateSpecName, string templateSpecVersion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string templateSpecName, string templateSpecVersion, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); } } if (templateSpecName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "templateSpecName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "templateSpecName"); } if (templateSpecName != null) { if (templateSpecName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "templateSpecName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "templateSpecName", 90); } if (templateSpecName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "templateSpecName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "templateSpecName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(templateSpecName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "templateSpecName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "templateSpecName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (templateSpecVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "templateSpecVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "templateSpecVersion"); } if (templateSpecVersion != null) { if (templateSpecVersion.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "templateSpecVersion", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "templateSpecVersion", 90); } if (templateSpecVersion.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "templateSpecVersion", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "templateSpecVersion", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(templateSpecVersion, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "templateSpecVersion", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "templateSpecVersion", "^[-\\w\\._\\(\\)]+$"); } } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("templateSpecName", templateSpecName); tracingParameters.Add("templateSpecVersion", templateSpecVersion); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/templateSpecs/{templateSpecName}/versions/{templateSpecVersion}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{templateSpecName}", System.Uri.EscapeDataString(templateSpecName)); _url = _url.Replace("{templateSpecVersion}", System.Uri.EscapeDataString(templateSpecVersion)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -989,50 +1031,51 @@ internal TemplateSpecVersionsOperations(TemplateSpecsClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 204) { var ex = new TemplateSpecsErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - TemplateSpecsError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + TemplateSpecsError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1042,20 +1085,25 @@ internal TemplateSpecVersionsOperations(TemplateSpecsClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Lists all the Template Spec versions in the specified Template Spec. /// @@ -1071,13 +1119,13 @@ internal TemplateSpecVersionsOperations(TemplateSpecsClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1086,101 +1134,110 @@ internal TemplateSpecVersionsOperations(TemplateSpecsClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, string templateSpecName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string templateSpecName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); } } if (templateSpecName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "templateSpecName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "templateSpecName"); } if (templateSpecName != null) { if (templateSpecName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "templateSpecName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "templateSpecName", 90); } if (templateSpecName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "templateSpecName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "templateSpecName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(templateSpecName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "templateSpecName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "templateSpecName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("templateSpecName", templateSpecName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/templateSpecs/{templateSpecName}/versions").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{templateSpecName}", System.Uri.EscapeDataString(templateSpecName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1192,50 +1249,51 @@ internal TemplateSpecVersionsOperations(TemplateSpecsClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new TemplateSpecsErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - TemplateSpecsError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + TemplateSpecsError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1245,9 +1303,10 @@ internal TemplateSpecVersionsOperations(TemplateSpecsClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -1258,25 +1317,29 @@ internal TemplateSpecVersionsOperations(TemplateSpecsClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Lists all the Template Spec versions in the specified Template Spec. /// @@ -1289,13 +1352,13 @@ internal TemplateSpecVersionsOperations(TemplateSpecsClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1304,51 +1367,54 @@ internal TemplateSpecVersionsOperations(TemplateSpecsClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1360,50 +1426,51 @@ internal TemplateSpecVersionsOperations(TemplateSpecsClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new TemplateSpecsErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - TemplateSpecsError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + TemplateSpecsError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1413,9 +1480,10 @@ internal TemplateSpecVersionsOperations(TemplateSpecsClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -1426,24 +1494,28 @@ internal TemplateSpecVersionsOperations(TemplateSpecsClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/TemplateSpecVersionsOperationsExtensions.cs b/src/Resources/Resources.Management.Sdk/Generated/TemplateSpecVersionsOperationsExtensions.cs new file mode 100644 index 000000000000..ea377bbe9e0a --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/TemplateSpecVersionsOperationsExtensions.cs @@ -0,0 +1,267 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +namespace Microsoft.Azure.Management.Resources +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// Extension methods for TemplateSpecVersionsOperations + /// + public static partial class TemplateSpecVersionsOperationsExtensions + { + /// + /// Creates or updates a Template Spec version. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of the Template Spec. + /// + /// + /// The version of the Template Spec. + /// + public static TemplateSpecVersion CreateOrUpdate(this ITemplateSpecVersionsOperations operations, string resourceGroupName, string templateSpecName, string templateSpecVersion, TemplateSpecVersion templateSpecVersionModel) + { + return ((ITemplateSpecVersionsOperations)operations).CreateOrUpdateAsync(resourceGroupName, templateSpecName, templateSpecVersion, templateSpecVersionModel).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a Template Spec version. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of the Template Spec. + /// + /// + /// The version of the Template Spec. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateOrUpdateAsync(this ITemplateSpecVersionsOperations operations, string resourceGroupName, string templateSpecName, string templateSpecVersion, TemplateSpecVersion templateSpecVersionModel, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, templateSpecName, templateSpecVersion, templateSpecVersionModel, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Updates Template Spec Version tags with specified values. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of the Template Spec. + /// + /// + /// The version of the Template Spec. + /// + public static TemplateSpecVersion Update(this ITemplateSpecVersionsOperations operations, string resourceGroupName, string templateSpecName, string templateSpecVersion, TemplateSpecVersionUpdateModel templateSpecVersionUpdateModel = default(TemplateSpecVersionUpdateModel)) + { + return ((ITemplateSpecVersionsOperations)operations).UpdateAsync(resourceGroupName, templateSpecName, templateSpecVersion, templateSpecVersionUpdateModel).GetAwaiter().GetResult(); + } + + /// + /// Updates Template Spec Version tags with specified values. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of the Template Spec. + /// + /// + /// The version of the Template Spec. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task UpdateAsync(this ITemplateSpecVersionsOperations operations, string resourceGroupName, string templateSpecName, string templateSpecVersion, TemplateSpecVersionUpdateModel templateSpecVersionUpdateModel = default(TemplateSpecVersionUpdateModel), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, templateSpecName, templateSpecVersion, templateSpecVersionUpdateModel, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets a Template Spec version from a specific Template Spec. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of the Template Spec. + /// + /// + /// The version of the Template Spec. + /// + public static TemplateSpecVersion Get(this ITemplateSpecVersionsOperations operations, string resourceGroupName, string templateSpecName, string templateSpecVersion) + { + return ((ITemplateSpecVersionsOperations)operations).GetAsync(resourceGroupName, templateSpecName, templateSpecVersion).GetAwaiter().GetResult(); + } + + /// + /// Gets a Template Spec version from a specific Template Spec. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of the Template Spec. + /// + /// + /// The version of the Template Spec. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this ITemplateSpecVersionsOperations operations, string resourceGroupName, string templateSpecName, string templateSpecVersion, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, templateSpecName, templateSpecVersion, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Deletes a specific version from a Template Spec. When operation completes, + /// status code 200 returned without content. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of the Template Spec. + /// + /// + /// The version of the Template Spec. + /// + public static void Delete(this ITemplateSpecVersionsOperations operations, string resourceGroupName, string templateSpecName, string templateSpecVersion) + { + ((ITemplateSpecVersionsOperations)operations).DeleteAsync(resourceGroupName, templateSpecName, templateSpecVersion).GetAwaiter().GetResult(); + } + + /// + /// Deletes a specific version from a Template Spec. When operation completes, + /// status code 200 returned without content. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of the Template Spec. + /// + /// + /// The version of the Template Spec. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAsync(this ITemplateSpecVersionsOperations operations, string resourceGroupName, string templateSpecName, string templateSpecVersion, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, templateSpecName, templateSpecVersion, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Lists all the Template Spec versions in the specified Template Spec. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of the Template Spec. + /// + public static Microsoft.Rest.Azure.IPage List(this ITemplateSpecVersionsOperations operations, string resourceGroupName, string templateSpecName) + { + return ((ITemplateSpecVersionsOperations)operations).ListAsync(resourceGroupName, templateSpecName).GetAwaiter().GetResult(); + } + + /// + /// Lists all the Template Spec versions in the specified Template Spec. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of the Template Spec. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this ITemplateSpecVersionsOperations operations, string resourceGroupName, string templateSpecName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, templateSpecName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Lists all the Template Spec versions in the specified Template Spec. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this ITemplateSpecVersionsOperations operations, string nextPageLink) + { + return ((ITemplateSpecVersionsOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists all the Template Spec versions in the specified Template Spec. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this ITemplateSpecVersionsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } +} diff --git a/src/Resources/Resources.Sdk/Generated/TemplateSpecsClient.cs b/src/Resources/Resources.Management.Sdk/Generated/TemplateSpecsClient.cs similarity index 64% rename from src/Resources/Resources.Sdk/Generated/TemplateSpecsClient.cs rename to src/Resources/Resources.Management.Sdk/Generated/TemplateSpecsClient.cs index 3bf5f1273fb6..0db8c9ad9fd7 100644 --- a/src/Resources/Resources.Sdk/Generated/TemplateSpecsClient.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/TemplateSpecsClient.cs @@ -1,90 +1,74 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Serialization; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; /// - /// The APIs listed in this specification can be used to manage Template - /// Spec resources through the Azure Resource Manager. + /// The APIs listed in this specification can be used to manage Template Spec + /// resources through the Azure Resource Manager. /// - public partial class TemplateSpecsClient : ServiceClient, ITemplateSpecsClient, IAzureClient + public partial class TemplateSpecsClient : Microsoft.Rest.ServiceClient, ITemplateSpecsClient, IAzureClient { /// /// The base URI of the service. /// public System.Uri BaseUri { get; set; } - /// /// Gets or sets json serialization settings. /// - public JsonSerializerSettings SerializationSettings { get; private set; } - + public Newtonsoft.Json.JsonSerializerSettings SerializationSettings { get; private set; } /// /// Gets or sets json deserialization settings. /// - public JsonSerializerSettings DeserializationSettings { get; private set; } - + public Newtonsoft.Json.JsonSerializerSettings DeserializationSettings { get; private set; } /// /// Credentials needed for the client to connect to Azure. /// - public ServiceClientCredentials Credentials { get; private set; } + public Microsoft.Rest.ServiceClientCredentials Credentials { get; private set; } /// - /// Subscription Id which forms part of the URI for every service call. + /// The API version to use for this operation. /// - public string SubscriptionId { get; set; } + public string ApiVersion { get; private set; } /// - /// Client Api version. + /// Subscription Id which forms part of the URI for every service call. /// - public string ApiVersion { get; private set; } + public string SubscriptionId { get; set;} /// /// The preferred language for the response. /// - public string AcceptLanguage { get; set; } + public string AcceptLanguage { get; set;} /// - /// The retry timeout in seconds for Long Running Operations. Default value is - /// 30. + /// The retry timeout in seconds for Long Running Operations. Default + /// /// value is 30. /// - public int? LongRunningOperationRetryTimeout { get; set; } + public int? LongRunningOperationRetryTimeout { get; set;} /// - /// Whether a unique x-ms-client-request-id should be generated. When set to - /// true a unique x-ms-client-request-id value is generated and included in - /// each request. Default is true. + /// Whether a unique x-ms-client-request-id should be generated. When + /// /// set to true a unique x-ms-client-request-id value is generated and + /// /// included in each request. Default is true. /// - public bool? GenerateClientRequestId { get; set; } + public bool? GenerateClientRequestId { get; set;} /// - /// Gets the ITemplateSpecsOperations. + /// Gets the ITemplateSpecsOperations /// public virtual ITemplateSpecsOperations TemplateSpecs { get; private set; } - /// - /// Gets the ITemplateSpecVersionsOperations. + /// Gets the ITemplateSpecVersionsOperations /// public virtual ITemplateSpecVersionsOperations TemplateSpecVersions { get; private set; } - /// /// Initializes a new instance of the TemplateSpecsClient class. /// @@ -93,24 +77,22 @@ public partial class TemplateSpecsClient : ServiceClient, I /// /// /// True: will dispose the provided httpClient on calling TemplateSpecsClient.Dispose(). False: will not dispose provided httpClient - protected TemplateSpecsClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient) + protected TemplateSpecsClient(System.Net.Http.HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient) { - Initialize(); + this.Initialize(); } - /// /// Initializes a new instance of the TemplateSpecsClient class. /// /// /// Optional. The delegating handlers to add to the http client pipeline. /// - protected TemplateSpecsClient(params DelegatingHandler[] handlers) : base(handlers) + protected TemplateSpecsClient(params System.Net.Http.DelegatingHandler[] handlers) : base(handlers) { - Initialize(); + this.Initialize(); } - /// - /// Initializes a new instance of the TemplateSpecsClient class. + /// Initializes a new instance of the TemplateSpecsClient class. /// /// /// Optional. The http client handler used to handle http transport. @@ -118,11 +100,10 @@ protected TemplateSpecsClient(params DelegatingHandler[] handlers) : base(handle /// /// Optional. The delegating handlers to add to the http client pipeline. /// - protected TemplateSpecsClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers) + protected TemplateSpecsClient(System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : base(rootHandler, handlers) { - Initialize(); + this.Initialize(); } - /// /// Initializes a new instance of the TemplateSpecsClient class. /// @@ -135,15 +116,14 @@ protected TemplateSpecsClient(HttpClientHandler rootHandler, params DelegatingHa /// /// Thrown when a required parameter is null /// - protected TemplateSpecsClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) + protected TemplateSpecsClient(System.Uri baseUri, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) { throw new System.ArgumentNullException("baseUri"); } - BaseUri = baseUri; + this.BaseUri = baseUri; } - /// /// Initializes a new instance of the TemplateSpecsClient class. /// @@ -159,15 +139,15 @@ protected TemplateSpecsClient(System.Uri baseUri, params DelegatingHandler[] han /// /// Thrown when a required parameter is null /// - protected TemplateSpecsClient(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + protected TemplateSpecsClient(System.Uri baseUri, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) { throw new System.ArgumentNullException("baseUri"); } - BaseUri = baseUri; + + this.BaseUri = baseUri; } - /// /// Initializes a new instance of the TemplateSpecsClient class. /// @@ -180,23 +160,23 @@ protected TemplateSpecsClient(System.Uri baseUri, HttpClientHandler rootHandler, /// /// Thrown when a required parameter is null /// - public TemplateSpecsClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + public TemplateSpecsClient(Microsoft.Rest.ServiceClientCredentials credentials, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) { if (credentials == null) { throw new System.ArgumentNullException("credentials"); } - Credentials = credentials; - if (Credentials != null) + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the TemplateSpecsClient class. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// @@ -207,23 +187,23 @@ public TemplateSpecsClient(ServiceClientCredentials credentials, params Delegati /// /// Thrown when a required parameter is null /// - public TemplateSpecsClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient) + public TemplateSpecsClient(Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient) { if (credentials == null) { throw new System.ArgumentNullException("credentials"); } - Credentials = credentials; - if (Credentials != null) + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the TemplateSpecsClient class. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// @@ -235,26 +215,26 @@ public TemplateSpecsClient(ServiceClientCredentials credentials, HttpClient http /// /// Thrown when a required parameter is null /// - public TemplateSpecsClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + public TemplateSpecsClient(Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (credentials == null) { throw new System.ArgumentNullException("credentials"); } - Credentials = credentials; - if (Credentials != null) + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the TemplateSpecsClient class. /// /// /// Optional. The base URI of the service. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// @@ -263,7 +243,7 @@ public TemplateSpecsClient(ServiceClientCredentials credentials, HttpClientHandl /// /// Thrown when a required parameter is null /// - public TemplateSpecsClient(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + public TemplateSpecsClient(System.Uri baseUri, Microsoft.Rest.ServiceClientCredentials credentials, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) { @@ -273,33 +253,30 @@ public TemplateSpecsClient(System.Uri baseUri, ServiceClientCredentials credenti { throw new System.ArgumentNullException("credentials"); } - BaseUri = baseUri; - Credentials = credentials; - if (Credentials != null) + this.BaseUri = baseUri; + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the TemplateSpecsClient class. /// /// /// Optional. The base URI of the service. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// /// Optional. The http client handler used to handle http transport. /// - /// - /// Optional. The delegating handlers to add to the http client pipeline. - /// /// /// Thrown when a required parameter is null /// - public TemplateSpecsClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + public TemplateSpecsClient(System.Uri baseUri, Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) { @@ -309,59 +286,60 @@ public TemplateSpecsClient(System.Uri baseUri, ServiceClientCredentials credenti { throw new System.ArgumentNullException("credentials"); } - BaseUri = baseUri; - Credentials = credentials; - if (Credentials != null) + this.BaseUri = baseUri; + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// An optional partial-method to perform custom initialization. /// partial void CustomInitialize(); + /// /// Initializes client properties. /// private void Initialize() { - TemplateSpecs = new TemplateSpecsOperations(this); - TemplateSpecVersions = new TemplateSpecVersionsOperations(this); - BaseUri = new System.Uri("https://management.azure.com"); - ApiVersion = "2021-05-01"; - AcceptLanguage = "en-US"; - LongRunningOperationRetryTimeout = 30; - GenerateClientRequestId = true; - SerializationSettings = new JsonSerializerSettings + this.TemplateSpecs = new TemplateSpecsOperations(this); + this.TemplateSpecVersions = new TemplateSpecVersionsOperations(this); + this.BaseUri = new System.Uri("https://management.azure.com"); + this.ApiVersion = "2021-05-01"; + this.AcceptLanguage = "en-US"; + this.LongRunningOperationRetryTimeout = 30; + this.GenerateClientRequestId = true; + SerializationSettings = new Newtonsoft.Json.JsonSerializerSettings { Formatting = Newtonsoft.Json.Formatting.Indented, DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, - ContractResolver = new ReadOnlyJsonContractResolver(), - Converters = new List + ContractResolver = new Microsoft.Rest.Serialization.ReadOnlyJsonContractResolver(), + Converters = new System.Collections.Generic.List { - new Iso8601TimeSpanConverter() + new Microsoft.Rest.Serialization.Iso8601TimeSpanConverter() } }; - SerializationSettings.Converters.Add(new TransformationJsonConverter()); - DeserializationSettings = new JsonSerializerSettings + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.TransformationJsonConverter()); + DeserializationSettings = new Newtonsoft.Json.JsonSerializerSettings { DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, - ContractResolver = new ReadOnlyJsonContractResolver(), - Converters = new List + ContractResolver = new Microsoft.Rest.Serialization.ReadOnlyJsonContractResolver(), + Converters = new System.Collections.Generic.List { - new Iso8601TimeSpanConverter() + new Microsoft.Rest.Serialization.Iso8601TimeSpanConverter() } }; CustomInitialize(); - DeserializationSettings.Converters.Add(new TransformationJsonConverter()); - DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.TransformationJsonConverter()); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Azure.CloudErrorJsonConverter()); } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Sdk/Generated/TemplateSpecsOperations.cs b/src/Resources/Resources.Management.Sdk/Generated/TemplateSpecsOperations.cs similarity index 57% rename from src/Resources/Resources.Sdk/Generated/TemplateSpecsOperations.cs rename to src/Resources/Resources.Management.Sdk/Generated/TemplateSpecsOperations.cs index 93f6fc72cbd5..253beeb17d92 100644 --- a/src/Resources/Resources.Sdk/Generated/TemplateSpecsOperations.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/TemplateSpecsOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// TemplateSpecsOperations operations. /// - internal partial class TemplateSpecsOperations : IServiceOperations, ITemplateSpecsOperations + internal partial class TemplateSpecsOperations : Microsoft.Rest.IServiceOperations, ITemplateSpecsOperations { /// /// Initializes a new instance of the TemplateSpecsOperations class. @@ -36,13 +24,13 @@ internal partial class TemplateSpecsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal TemplateSpecsOperations(TemplateSpecsClient client) + internal TemplateSpecsOperations (TemplateSpecsClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -68,13 +56,13 @@ internal TemplateSpecsOperations(TemplateSpecsClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -83,110 +71,119 @@ internal TemplateSpecsOperations(TemplateSpecsClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string templateSpecName, TemplateSpec templateSpec, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string templateSpecName, TemplateSpec templateSpec, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (templateSpec == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "templateSpec"); + } + if (templateSpec != null) + { + templateSpec.Validate(); + } + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); } } if (templateSpecName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "templateSpecName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "templateSpecName"); } if (templateSpecName != null) { if (templateSpecName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "templateSpecName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "templateSpecName", 90); } if (templateSpecName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "templateSpecName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "templateSpecName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(templateSpecName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "templateSpecName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "templateSpecName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (templateSpec == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "templateSpec"); - } - if (templateSpec != null) - { - templateSpec.Validate(); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("templateSpecName", templateSpecName); + tracingParameters.Add("templateSpec", templateSpec); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/templateSpecs/{templateSpecName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{templateSpecName}", System.Uri.EscapeDataString(templateSpecName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -198,56 +195,57 @@ internal TemplateSpecsOperations(TemplateSpecsClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(templateSpec != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(templateSpec, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(templateSpec, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 201) { var ex = new TemplateSpecsErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - TemplateSpecsError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + TemplateSpecsError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -257,9 +255,10 @@ internal TemplateSpecsOperations(TemplateSpecsClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -270,16 +269,16 @@ internal TemplateSpecsOperations(TemplateSpecsClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } // Deserialize Response @@ -288,25 +287,29 @@ internal TemplateSpecsOperations(TemplateSpecsClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Updates Template Spec tags with specified values. /// @@ -325,13 +328,13 @@ internal TemplateSpecsOperations(TemplateSpecsClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -340,102 +343,111 @@ internal TemplateSpecsOperations(TemplateSpecsClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string templateSpecName, TemplateSpecUpdateModel templateSpec = default(TemplateSpecUpdateModel), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string templateSpecName, TemplateSpecUpdateModel templateSpec = default(TemplateSpecUpdateModel), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); } } if (templateSpecName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "templateSpecName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "templateSpecName"); } if (templateSpecName != null) { if (templateSpecName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "templateSpecName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "templateSpecName", 90); } if (templateSpecName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "templateSpecName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "templateSpecName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(templateSpecName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "templateSpecName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "templateSpecName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("templateSpecName", templateSpecName); + tracingParameters.Add("templateSpec", templateSpec); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/templateSpecs/{templateSpecName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{templateSpecName}", System.Uri.EscapeDataString(templateSpecName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PATCH"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -447,56 +459,57 @@ internal TemplateSpecsOperations(TemplateSpecsClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(templateSpec != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(templateSpec, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(templateSpec, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new TemplateSpecsErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - TemplateSpecsError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + TemplateSpecsError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -506,9 +519,10 @@ internal TemplateSpecsOperations(TemplateSpecsClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -519,25 +533,29 @@ internal TemplateSpecsOperations(TemplateSpecsClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets a Template Spec with a given name. /// @@ -549,7 +567,7 @@ internal TemplateSpecsOperations(TemplateSpecsClient client) /// /// /// Allows for expansion of additional Template Spec details in the response. - /// Optional. Possible values include: 'versions' + /// Optional. /// /// /// Headers that will be added to request. @@ -557,13 +575,13 @@ internal TemplateSpecsOperations(TemplateSpecsClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -572,106 +590,116 @@ internal TemplateSpecsOperations(TemplateSpecsClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string templateSpecName, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string templateSpecName, string expand = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); } } if (templateSpecName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "templateSpecName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "templateSpecName"); } if (templateSpecName != null) { if (templateSpecName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "templateSpecName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "templateSpecName", 90); } if (templateSpecName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "templateSpecName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "templateSpecName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(templateSpecName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "templateSpecName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "templateSpecName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("templateSpecName", templateSpecName); tracingParameters.Add("expand", expand); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/templateSpecs/{templateSpecName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{templateSpecName}", System.Uri.EscapeDataString(templateSpecName)); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (expand != null) { _queryParameters.Add(string.Format("$expand={0}", System.Uri.EscapeDataString(expand))); } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -683,50 +711,51 @@ internal TemplateSpecsOperations(TemplateSpecsClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new TemplateSpecsErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - TemplateSpecsError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + TemplateSpecsError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -736,9 +765,10 @@ internal TemplateSpecsOperations(TemplateSpecsClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -749,25 +779,29 @@ internal TemplateSpecsOperations(TemplateSpecsClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Deletes a Template Spec by name. When operation completes, status code 200 /// returned without content. @@ -784,10 +818,10 @@ internal TemplateSpecsOperations(TemplateSpecsClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -796,101 +830,110 @@ internal TemplateSpecsOperations(TemplateSpecsClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string templateSpecName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string templateSpecName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); } } if (templateSpecName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "templateSpecName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "templateSpecName"); } if (templateSpecName != null) { if (templateSpecName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "templateSpecName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "templateSpecName", 90); } if (templateSpecName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "templateSpecName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "templateSpecName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(templateSpecName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "templateSpecName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "templateSpecName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("templateSpecName", templateSpecName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/templateSpecs/{templateSpecName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{templateSpecName}", System.Uri.EscapeDataString(templateSpecName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -902,50 +945,51 @@ internal TemplateSpecsOperations(TemplateSpecsClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 204) { var ex = new TemplateSpecsErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - TemplateSpecsError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + TemplateSpecsError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -955,26 +999,31 @@ internal TemplateSpecsOperations(TemplateSpecsClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Lists all the Template Specs within the specified subscriptions. /// /// /// Allows for expansion of additional Template Spec details in the response. - /// Optional. Possible values include: 'versions' + /// Optional. /// /// /// Headers that will be added to request. @@ -982,13 +1031,13 @@ internal TemplateSpecsOperations(TemplateSpecsClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -997,64 +1046,74 @@ internal TemplateSpecsOperations(TemplateSpecsClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListBySubscriptionWithHttpMessagesAsync(string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListBySubscriptionWithHttpMessagesAsync(string expand = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.ApiVersion == null) + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("expand", expand); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListBySubscription", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListBySubscription", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Resources/templateSpecs/").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (expand != null) { _queryParameters.Add(string.Format("$expand={0}", System.Uri.EscapeDataString(expand))); } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1066,50 +1125,51 @@ internal TemplateSpecsOperations(TemplateSpecsClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new TemplateSpecsErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - TemplateSpecsError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + TemplateSpecsError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1119,9 +1179,10 @@ internal TemplateSpecsOperations(TemplateSpecsClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -1132,25 +1193,29 @@ internal TemplateSpecsOperations(TemplateSpecsClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Lists all the Template Specs within the specified resource group. /// @@ -1159,7 +1224,7 @@ internal TemplateSpecsOperations(TemplateSpecsClient client) /// /// /// Allows for expansion of additional Template Spec details in the response. - /// Optional. Possible values include: 'versions' + /// Optional. /// /// /// Headers that will be added to request. @@ -1167,13 +1232,13 @@ internal TemplateSpecsOperations(TemplateSpecsClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1182,85 +1247,95 @@ internal TemplateSpecsOperations(TemplateSpecsClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string expand = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); } } - if (Client.ApiVersion == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("expand", expand); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/templateSpecs/").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (expand != null) { _queryParameters.Add(string.Format("$expand={0}", System.Uri.EscapeDataString(expand))); } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1272,50 +1347,51 @@ internal TemplateSpecsOperations(TemplateSpecsClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new TemplateSpecsErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - TemplateSpecsError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + TemplateSpecsError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1325,9 +1401,10 @@ internal TemplateSpecsOperations(TemplateSpecsClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -1338,25 +1415,29 @@ internal TemplateSpecsOperations(TemplateSpecsClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Lists all the Template Specs within the specified subscriptions. /// @@ -1369,13 +1450,13 @@ internal TemplateSpecsOperations(TemplateSpecsClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1384,51 +1465,54 @@ internal TemplateSpecsOperations(TemplateSpecsClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListBySubscriptionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListBySubscriptionNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListBySubscriptionNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListBySubscriptionNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1440,50 +1524,51 @@ internal TemplateSpecsOperations(TemplateSpecsClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new TemplateSpecsErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - TemplateSpecsError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + TemplateSpecsError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1493,9 +1578,10 @@ internal TemplateSpecsOperations(TemplateSpecsClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -1506,25 +1592,29 @@ internal TemplateSpecsOperations(TemplateSpecsClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Lists all the Template Specs within the specified resource group. /// @@ -1537,13 +1627,13 @@ internal TemplateSpecsOperations(TemplateSpecsClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1552,51 +1642,54 @@ internal TemplateSpecsOperations(TemplateSpecsClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroupNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroupNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1608,50 +1701,51 @@ internal TemplateSpecsOperations(TemplateSpecsClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new TemplateSpecsErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - TemplateSpecsError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + TemplateSpecsError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1661,9 +1755,10 @@ internal TemplateSpecsOperations(TemplateSpecsClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -1674,24 +1769,28 @@ internal TemplateSpecsOperations(TemplateSpecsClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/TemplateSpecsOperationsExtensions.cs b/src/Resources/Resources.Management.Sdk/Generated/TemplateSpecsOperationsExtensions.cs new file mode 100644 index 000000000000..f1a0e169e0cc --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/TemplateSpecsOperationsExtensions.cs @@ -0,0 +1,321 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +namespace Microsoft.Azure.Management.Resources +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// Extension methods for TemplateSpecsOperations + /// + public static partial class TemplateSpecsOperationsExtensions + { + /// + /// Creates or updates a Template Spec. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of the Template Spec. + /// + public static TemplateSpec CreateOrUpdate(this ITemplateSpecsOperations operations, string resourceGroupName, string templateSpecName, TemplateSpec templateSpec) + { + return ((ITemplateSpecsOperations)operations).CreateOrUpdateAsync(resourceGroupName, templateSpecName, templateSpec).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a Template Spec. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of the Template Spec. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateOrUpdateAsync(this ITemplateSpecsOperations operations, string resourceGroupName, string templateSpecName, TemplateSpec templateSpec, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, templateSpecName, templateSpec, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Updates Template Spec tags with specified values. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of the Template Spec. + /// + public static TemplateSpec Update(this ITemplateSpecsOperations operations, string resourceGroupName, string templateSpecName, TemplateSpecUpdateModel templateSpec = default(TemplateSpecUpdateModel)) + { + return ((ITemplateSpecsOperations)operations).UpdateAsync(resourceGroupName, templateSpecName, templateSpec).GetAwaiter().GetResult(); + } + + /// + /// Updates Template Spec tags with specified values. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of the Template Spec. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task UpdateAsync(this ITemplateSpecsOperations operations, string resourceGroupName, string templateSpecName, TemplateSpecUpdateModel templateSpec = default(TemplateSpecUpdateModel), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, templateSpecName, templateSpec, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets a Template Spec with a given name. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of the Template Spec. + /// + /// + /// Allows for expansion of additional Template Spec details in the response. + /// Optional. + /// + public static TemplateSpec Get(this ITemplateSpecsOperations operations, string resourceGroupName, string templateSpecName, string expand = default(string)) + { + return ((ITemplateSpecsOperations)operations).GetAsync(resourceGroupName, templateSpecName, expand).GetAwaiter().GetResult(); + } + + /// + /// Gets a Template Spec with a given name. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of the Template Spec. + /// + /// + /// Allows for expansion of additional Template Spec details in the response. + /// Optional. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this ITemplateSpecsOperations operations, string resourceGroupName, string templateSpecName, string expand = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, templateSpecName, expand, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Deletes a Template Spec by name. When operation completes, status code 200 + /// returned without content. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of the Template Spec. + /// + public static void Delete(this ITemplateSpecsOperations operations, string resourceGroupName, string templateSpecName) + { + ((ITemplateSpecsOperations)operations).DeleteAsync(resourceGroupName, templateSpecName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a Template Spec by name. When operation completes, status code 200 + /// returned without content. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of the Template Spec. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAsync(this ITemplateSpecsOperations operations, string resourceGroupName, string templateSpecName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, templateSpecName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Lists all the Template Specs within the specified subscriptions. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Allows for expansion of additional Template Spec details in the response. + /// Optional. + /// + public static Microsoft.Rest.Azure.IPage ListBySubscription(this ITemplateSpecsOperations operations, string expand = default(string)) + { + return ((ITemplateSpecsOperations)operations).ListBySubscriptionAsync(expand).GetAwaiter().GetResult(); + } + + /// + /// Lists all the Template Specs within the specified subscriptions. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Allows for expansion of additional Template Spec details in the response. + /// Optional. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListBySubscriptionAsync(this ITemplateSpecsOperations operations, string expand = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(expand, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Lists all the Template Specs within the specified resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Allows for expansion of additional Template Spec details in the response. + /// Optional. + /// + public static Microsoft.Rest.Azure.IPage ListByResourceGroup(this ITemplateSpecsOperations operations, string resourceGroupName, string expand = default(string)) + { + return ((ITemplateSpecsOperations)operations).ListByResourceGroupAsync(resourceGroupName, expand).GetAwaiter().GetResult(); + } + + /// + /// Lists all the Template Specs within the specified resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Allows for expansion of additional Template Spec details in the response. + /// Optional. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByResourceGroupAsync(this ITemplateSpecsOperations operations, string resourceGroupName, string expand = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, expand, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Lists all the Template Specs within the specified subscriptions. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListBySubscriptionNext(this ITemplateSpecsOperations operations, string nextPageLink) + { + return ((ITemplateSpecsOperations)operations).ListBySubscriptionNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists all the Template Specs within the specified subscriptions. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListBySubscriptionNextAsync(this ITemplateSpecsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListBySubscriptionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Lists all the Template Specs within the specified resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListByResourceGroupNext(this ITemplateSpecsOperations operations, string nextPageLink) + { + return ((ITemplateSpecsOperations)operations).ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists all the Template Specs within the specified resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByResourceGroupNextAsync(this ITemplateSpecsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } +} diff --git a/src/Resources/Resources.Sdk/Generated/TenantsOperations.cs b/src/Resources/Resources.Management.Sdk/Generated/TenantsOperations.cs similarity index 58% rename from src/Resources/Resources.Sdk/Generated/TenantsOperations.cs rename to src/Resources/Resources.Management.Sdk/Generated/TenantsOperations.cs index ca317edb0fe9..15b3851a8bed 100644 --- a/src/Resources/Resources.Sdk/Generated/TenantsOperations.cs +++ b/src/Resources/Resources.Management.Sdk/Generated/TenantsOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.Resources { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// TenantsOperations operations. /// - internal partial class TenantsOperations : IServiceOperations, ITenantsOperations + internal partial class TenantsOperations : Microsoft.Rest.IServiceOperations, ITenantsOperations { /// /// Initializes a new instance of the TenantsOperations class. @@ -36,13 +24,13 @@ internal partial class TenantsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal TenantsOperations(SubscriptionClient client) + internal TenantsOperations (SubscriptionClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -59,13 +47,13 @@ internal TenantsOperations(SubscriptionClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -74,54 +62,62 @@ internal TenantsOperations(SubscriptionClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "tenants").ToString(); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -133,55 +129,56 @@ internal TenantsOperations(SubscriptionClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -191,9 +188,10 @@ internal TenantsOperations(SubscriptionClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -204,25 +202,29 @@ internal TenantsOperations(SubscriptionClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets the tenants for your account. /// @@ -235,13 +237,13 @@ internal TenantsOperations(SubscriptionClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -250,51 +252,54 @@ internal TenantsOperations(SubscriptionClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -306,55 +311,56 @@ internal TenantsOperations(SubscriptionClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -364,9 +370,10 @@ internal TenantsOperations(SubscriptionClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); @@ -377,24 +384,28 @@ internal TenantsOperations(SubscriptionClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/Resources/Resources.Management.Sdk/Generated/TenantsOperationsExtensions.cs b/src/Resources/Resources.Management.Sdk/Generated/TenantsOperationsExtensions.cs new file mode 100644 index 000000000000..6630a827cda4 --- /dev/null +++ b/src/Resources/Resources.Management.Sdk/Generated/TenantsOperationsExtensions.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +namespace Microsoft.Azure.Management.Resources +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// Extension methods for TenantsOperations + /// + public static partial class TenantsOperationsExtensions + { + /// + /// Gets the tenants for your account. + /// + /// + /// The operations group for this extension method. + /// + public static Microsoft.Rest.Azure.IPage List(this ITenantsOperations operations) + { + return ((ITenantsOperations)operations).ListAsync().GetAwaiter().GetResult(); + } + + /// + /// Gets the tenants for your account. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this ITenantsOperations operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets the tenants for your account. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this ITenantsOperations operations, string nextPageLink) + { + return ((ITenantsOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets the tenants for your account. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this ITenantsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } +} diff --git a/src/Resources/Resources.Sdk/Properties/AssemblyInfo.cs b/src/Resources/Resources.Management.Sdk/Properties/AssemblyInfo.cs similarity index 100% rename from src/Resources/Resources.Sdk/Properties/AssemblyInfo.cs rename to src/Resources/Resources.Management.Sdk/Properties/AssemblyInfo.cs diff --git a/src/Resources/Resources.Sdk/Readme.md b/src/Resources/Resources.Management.Sdk/Readme.md similarity index 85% rename from src/Resources/Resources.Sdk/Readme.md rename to src/Resources/Resources.Management.Sdk/Readme.md index 06f173fb559c..a82081fdcd83 100644 --- a/src/Resources/Resources.Sdk/Readme.md +++ b/src/Resources/Resources.Management.Sdk/Readme.md @@ -6,13 +6,13 @@ In this directory, run AutoRest: ``` rm -r Generated/* autorest --reset -autorest.cmd README.md --tag=package-privatelinks-2020-05 --version=v2 -autorest.cmd README.md --tag=package-subscriptions-2021-01 --version=v2 -autorest.cmd README.md --tag=package-features-2021-07 --version=v2 -autorest.cmd README.md --tag=package-deploymentscripts-2020-10 --version=v2 -autorest.cmd README.md --tag=package-resources-2021-04 --version=v2 -autorest.cmd README.md --tag=package-deploymentstacks-2022-08-preview --version=v2 -autorest.cmd README.md --tag=package-templatespecs-2021-05 --version=v2 +autorest --use:@autorest/powershell@4.x --tag=package-privatelinks-2020-05 +autorest --use:@autorest/powershell@4.x --tag=package-subscriptions-2021-01 +autorest --use:@autorest/powershell@4.x --tag=package-features-2021-07 +autorest --use:@autorest/powershell@4.x --tag=package-deploymentscripts-2020-10 +autorest --use:@autorest/powershell@4.x --tag=package-resources-2021-04 +autorest --use:@autorest/powershell@4.x --tag=package-deploymentstacks-2022-08-preview +autorest --use:@autorest/powershell@4.x --tag=package-templatespecs-2021-05 ``` ### AutoRest Configuration @@ -20,7 +20,8 @@ autorest.cmd README.md --tag=package-templatespecs-2021-05 --version=v2 ``` yaml output-folder: Generated namespace: Microsoft.Azure.Management.Resources -csharp: true +isSdkGenerator: true +powershell: true clear-output-folder: false reflect-api-versions: true azure-arm: true diff --git a/src/Resources/Resources.Sdk/Resources.Sdk.csproj b/src/Resources/Resources.Management.Sdk/Resources.Management.Sdk.csproj similarity index 100% rename from src/Resources/Resources.Sdk/Resources.Sdk.csproj rename to src/Resources/Resources.Management.Sdk/Resources.Management.Sdk.csproj diff --git a/src/Resources/Resources.Sdk/Utility/SafeJsonConvertWrapper.cs b/src/Resources/Resources.Management.Sdk/Utility/SafeJsonConvertWrapper.cs similarity index 100% rename from src/Resources/Resources.Sdk/Utility/SafeJsonConvertWrapper.cs rename to src/Resources/Resources.Management.Sdk/Utility/SafeJsonConvertWrapper.cs diff --git a/src/Resources/Resources.Sdk/generate.ps1 b/src/Resources/Resources.Management.Sdk/generate.ps1 similarity index 100% rename from src/Resources/Resources.Sdk/generate.ps1 rename to src/Resources/Resources.Management.Sdk/generate.ps1 diff --git a/src/Resources/Resources.Sdk/Generated/DeploymentOperationsExtensions.cs b/src/Resources/Resources.Sdk/Generated/DeploymentOperationsExtensions.cs deleted file mode 100644 index bddbc0e873c0..000000000000 --- a/src/Resources/Resources.Sdk/Generated/DeploymentOperationsExtensions.cs +++ /dev/null @@ -1,631 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for DeploymentOperations. - /// - public static partial class DeploymentOperationsExtensions - { - /// - /// Gets a deployments operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The resource scope. - /// - /// - /// The name of the deployment. - /// - /// - /// The ID of the operation to get. - /// - public static DeploymentOperation GetAtScope(this IDeploymentOperations operations, string scope, string deploymentName, string operationId) - { - return operations.GetAtScopeAsync(scope, deploymentName, operationId).GetAwaiter().GetResult(); - } - - /// - /// Gets a deployments operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The resource scope. - /// - /// - /// The name of the deployment. - /// - /// - /// The ID of the operation to get. - /// - /// - /// The cancellation token. - /// - public static async Task GetAtScopeAsync(this IDeploymentOperations operations, string scope, string deploymentName, string operationId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetAtScopeWithHttpMessagesAsync(scope, deploymentName, operationId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets all deployments operations for a deployment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The resource scope. - /// - /// - /// The name of the deployment. - /// - /// - /// The number of results to return. - /// - public static IPage ListAtScope(this IDeploymentOperations operations, string scope, string deploymentName, int? top = default(int?)) - { - return operations.ListAtScopeAsync(scope, deploymentName, top).GetAwaiter().GetResult(); - } - - /// - /// Gets all deployments operations for a deployment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The resource scope. - /// - /// - /// The name of the deployment. - /// - /// - /// The number of results to return. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAtScopeAsync(this IDeploymentOperations operations, string scope, string deploymentName, int? top = default(int?), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListAtScopeWithHttpMessagesAsync(scope, deploymentName, top, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a deployments operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - /// - /// The ID of the operation to get. - /// - public static DeploymentOperation GetAtTenantScope(this IDeploymentOperations operations, string deploymentName, string operationId) - { - return operations.GetAtTenantScopeAsync(deploymentName, operationId).GetAwaiter().GetResult(); - } - - /// - /// Gets a deployments operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - /// - /// The ID of the operation to get. - /// - /// - /// The cancellation token. - /// - public static async Task GetAtTenantScopeAsync(this IDeploymentOperations operations, string deploymentName, string operationId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetAtTenantScopeWithHttpMessagesAsync(deploymentName, operationId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets all deployments operations for a deployment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - /// - /// The number of results to return. - /// - public static IPage ListAtTenantScope(this IDeploymentOperations operations, string deploymentName, int? top = default(int?)) - { - return operations.ListAtTenantScopeAsync(deploymentName, top).GetAwaiter().GetResult(); - } - - /// - /// Gets all deployments operations for a deployment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - /// - /// The number of results to return. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAtTenantScopeAsync(this IDeploymentOperations operations, string deploymentName, int? top = default(int?), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListAtTenantScopeWithHttpMessagesAsync(deploymentName, top, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a deployments operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The management group ID. - /// - /// - /// The name of the deployment. - /// - /// - /// The ID of the operation to get. - /// - public static DeploymentOperation GetAtManagementGroupScope(this IDeploymentOperations operations, string groupId, string deploymentName, string operationId) - { - return operations.GetAtManagementGroupScopeAsync(groupId, deploymentName, operationId).GetAwaiter().GetResult(); - } - - /// - /// Gets a deployments operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The management group ID. - /// - /// - /// The name of the deployment. - /// - /// - /// The ID of the operation to get. - /// - /// - /// The cancellation token. - /// - public static async Task GetAtManagementGroupScopeAsync(this IDeploymentOperations operations, string groupId, string deploymentName, string operationId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetAtManagementGroupScopeWithHttpMessagesAsync(groupId, deploymentName, operationId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets all deployments operations for a deployment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The management group ID. - /// - /// - /// The name of the deployment. - /// - /// - /// The number of results to return. - /// - public static IPage ListAtManagementGroupScope(this IDeploymentOperations operations, string groupId, string deploymentName, int? top = default(int?)) - { - return operations.ListAtManagementGroupScopeAsync(groupId, deploymentName, top).GetAwaiter().GetResult(); - } - - /// - /// Gets all deployments operations for a deployment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The management group ID. - /// - /// - /// The name of the deployment. - /// - /// - /// The number of results to return. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAtManagementGroupScopeAsync(this IDeploymentOperations operations, string groupId, string deploymentName, int? top = default(int?), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListAtManagementGroupScopeWithHttpMessagesAsync(groupId, deploymentName, top, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a deployments operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - /// - /// The ID of the operation to get. - /// - public static DeploymentOperation GetAtSubscriptionScope(this IDeploymentOperations operations, string deploymentName, string operationId) - { - return operations.GetAtSubscriptionScopeAsync(deploymentName, operationId).GetAwaiter().GetResult(); - } - - /// - /// Gets a deployments operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - /// - /// The ID of the operation to get. - /// - /// - /// The cancellation token. - /// - public static async Task GetAtSubscriptionScopeAsync(this IDeploymentOperations operations, string deploymentName, string operationId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetAtSubscriptionScopeWithHttpMessagesAsync(deploymentName, operationId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets all deployments operations for a deployment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - /// - /// The number of results to return. - /// - public static IPage ListAtSubscriptionScope(this IDeploymentOperations operations, string deploymentName, int? top = default(int?)) - { - return operations.ListAtSubscriptionScopeAsync(deploymentName, top).GetAwaiter().GetResult(); - } - - /// - /// Gets all deployments operations for a deployment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - /// - /// The number of results to return. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAtSubscriptionScopeAsync(this IDeploymentOperations operations, string deploymentName, int? top = default(int?), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListAtSubscriptionScopeWithHttpMessagesAsync(deploymentName, top, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a deployments operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the deployment. - /// - /// - /// The ID of the operation to get. - /// - public static DeploymentOperation Get(this IDeploymentOperations operations, string resourceGroupName, string deploymentName, string operationId) - { - return operations.GetAsync(resourceGroupName, deploymentName, operationId).GetAwaiter().GetResult(); - } - - /// - /// Gets a deployments operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the deployment. - /// - /// - /// The ID of the operation to get. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IDeploymentOperations operations, string resourceGroupName, string deploymentName, string operationId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, deploymentName, operationId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets all deployments operations for a deployment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the deployment. - /// - /// - /// The number of results to return. - /// - public static IPage List(this IDeploymentOperations operations, string resourceGroupName, string deploymentName, int? top = default(int?)) - { - return operations.ListAsync(resourceGroupName, deploymentName, top).GetAwaiter().GetResult(); - } - - /// - /// Gets all deployments operations for a deployment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the deployment. - /// - /// - /// The number of results to return. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IDeploymentOperations operations, string resourceGroupName, string deploymentName, int? top = default(int?), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, deploymentName, top, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets all deployments operations for a deployment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListAtScopeNext(this IDeploymentOperations operations, string nextPageLink) - { - return operations.ListAtScopeNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets all deployments operations for a deployment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAtScopeNextAsync(this IDeploymentOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListAtScopeNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets all deployments operations for a deployment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListAtTenantScopeNext(this IDeploymentOperations operations, string nextPageLink) - { - return operations.ListAtTenantScopeNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets all deployments operations for a deployment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAtTenantScopeNextAsync(this IDeploymentOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListAtTenantScopeNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets all deployments operations for a deployment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListAtManagementGroupScopeNext(this IDeploymentOperations operations, string nextPageLink) - { - return operations.ListAtManagementGroupScopeNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets all deployments operations for a deployment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAtManagementGroupScopeNextAsync(this IDeploymentOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListAtManagementGroupScopeNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets all deployments operations for a deployment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListAtSubscriptionScopeNext(this IDeploymentOperations operations, string nextPageLink) - { - return operations.ListAtSubscriptionScopeNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets all deployments operations for a deployment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAtSubscriptionScopeNextAsync(this IDeploymentOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListAtSubscriptionScopeNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets all deployments operations for a deployment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IDeploymentOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets all deployments operations for a deployment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IDeploymentOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/src/Resources/Resources.Sdk/Generated/DeploymentScriptsOperationsExtensions.cs b/src/Resources/Resources.Sdk/Generated/DeploymentScriptsOperationsExtensions.cs deleted file mode 100644 index cfe9637c9a39..000000000000 --- a/src/Resources/Resources.Sdk/Generated/DeploymentScriptsOperationsExtensions.cs +++ /dev/null @@ -1,462 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for DeploymentScriptsOperations. - /// - public static partial class DeploymentScriptsOperationsExtensions - { - /// - /// Creates a deployment script. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of the deployment script. - /// - /// - /// Deployment script supplied to the operation. - /// - public static DeploymentScript Create(this IDeploymentScriptsOperations operations, string resourceGroupName, string scriptName, DeploymentScript deploymentScript) - { - return operations.CreateAsync(resourceGroupName, scriptName, deploymentScript).GetAwaiter().GetResult(); - } - - /// - /// Creates a deployment script. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of the deployment script. - /// - /// - /// Deployment script supplied to the operation. - /// - /// - /// The cancellation token. - /// - public static async Task CreateAsync(this IDeploymentScriptsOperations operations, string resourceGroupName, string scriptName, DeploymentScript deploymentScript, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, scriptName, deploymentScript, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Updates deployment script tags with specified values. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of the deployment script. - /// - /// - /// Deployment script resource with the tags to be updated. - /// - public static DeploymentScript Update(this IDeploymentScriptsOperations operations, string resourceGroupName, string scriptName, DeploymentScriptUpdateParameter deploymentScript = default(DeploymentScriptUpdateParameter)) - { - return operations.UpdateAsync(resourceGroupName, scriptName, deploymentScript).GetAwaiter().GetResult(); - } - - /// - /// Updates deployment script tags with specified values. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of the deployment script. - /// - /// - /// Deployment script resource with the tags to be updated. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateAsync(this IDeploymentScriptsOperations operations, string resourceGroupName, string scriptName, DeploymentScriptUpdateParameter deploymentScript = default(DeploymentScriptUpdateParameter), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, scriptName, deploymentScript, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a deployment script with a given name. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of the deployment script. - /// - public static DeploymentScript Get(this IDeploymentScriptsOperations operations, string resourceGroupName, string scriptName) - { - return operations.GetAsync(resourceGroupName, scriptName).GetAwaiter().GetResult(); - } - - /// - /// Gets a deployment script with a given name. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of the deployment script. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IDeploymentScriptsOperations operations, string resourceGroupName, string scriptName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, scriptName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a deployment script. When operation completes, status code 200 - /// returned without content. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of the deployment script. - /// - public static void Delete(this IDeploymentScriptsOperations operations, string resourceGroupName, string scriptName) - { - operations.DeleteAsync(resourceGroupName, scriptName).GetAwaiter().GetResult(); - } - - /// - /// Deletes a deployment script. When operation completes, status code 200 - /// returned without content. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of the deployment script. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this IDeploymentScriptsOperations operations, string resourceGroupName, string scriptName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, scriptName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Lists all deployment scripts for a given subscription. - /// - /// - /// The operations group for this extension method. - /// - public static IPage ListBySubscription(this IDeploymentScriptsOperations operations) - { - return operations.ListBySubscriptionAsync().GetAwaiter().GetResult(); - } - - /// - /// Lists all deployment scripts for a given subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListBySubscriptionAsync(this IDeploymentScriptsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets deployment script logs for a given deployment script name. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of the deployment script. - /// - public static ScriptLogsList GetLogs(this IDeploymentScriptsOperations operations, string resourceGroupName, string scriptName) - { - return operations.GetLogsAsync(resourceGroupName, scriptName).GetAwaiter().GetResult(); - } - - /// - /// Gets deployment script logs for a given deployment script name. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of the deployment script. - /// - /// - /// The cancellation token. - /// - public static async Task GetLogsAsync(this IDeploymentScriptsOperations operations, string resourceGroupName, string scriptName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetLogsWithHttpMessagesAsync(resourceGroupName, scriptName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets deployment script logs for a given deployment script name. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of the deployment script. - /// - /// - /// The number of lines to show from the tail of the deployment script log. - /// Valid value is a positive number up to 1000. If 'tail' is not provided, all - /// available logs are shown up to container instance log capacity of 4mb. - /// - public static ScriptLog GetLogsDefault(this IDeploymentScriptsOperations operations, string resourceGroupName, string scriptName, int? tail = default(int?)) - { - return operations.GetLogsDefaultAsync(resourceGroupName, scriptName, tail).GetAwaiter().GetResult(); - } - - /// - /// Gets deployment script logs for a given deployment script name. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of the deployment script. - /// - /// - /// The number of lines to show from the tail of the deployment script log. - /// Valid value is a positive number up to 1000. If 'tail' is not provided, all - /// available logs are shown up to container instance log capacity of 4mb. - /// - /// - /// The cancellation token. - /// - public static async Task GetLogsDefaultAsync(this IDeploymentScriptsOperations operations, string resourceGroupName, string scriptName, int? tail = default(int?), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetLogsDefaultWithHttpMessagesAsync(resourceGroupName, scriptName, tail, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Lists deployments scripts. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - public static IPage ListByResourceGroup(this IDeploymentScriptsOperations operations, string resourceGroupName) - { - return operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult(); - } - - /// - /// Lists deployments scripts. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByResourceGroupAsync(this IDeploymentScriptsOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates a deployment script. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of the deployment script. - /// - /// - /// Deployment script supplied to the operation. - /// - public static DeploymentScript BeginCreate(this IDeploymentScriptsOperations operations, string resourceGroupName, string scriptName, DeploymentScript deploymentScript) - { - return operations.BeginCreateAsync(resourceGroupName, scriptName, deploymentScript).GetAwaiter().GetResult(); - } - - /// - /// Creates a deployment script. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of the deployment script. - /// - /// - /// Deployment script supplied to the operation. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateAsync(this IDeploymentScriptsOperations operations, string resourceGroupName, string scriptName, DeploymentScript deploymentScript, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCreateWithHttpMessagesAsync(resourceGroupName, scriptName, deploymentScript, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Lists all deployment scripts for a given subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListBySubscriptionNext(this IDeploymentScriptsOperations operations, string nextPageLink) - { - return operations.ListBySubscriptionNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Lists all deployment scripts for a given subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListBySubscriptionNextAsync(this IDeploymentScriptsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListBySubscriptionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Lists deployments scripts. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListByResourceGroupNext(this IDeploymentScriptsOperations operations, string nextPageLink) - { - return operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Lists deployments scripts. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByResourceGroupNextAsync(this IDeploymentScriptsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/src/Resources/Resources.Sdk/Generated/DeploymentStacksOperationsExtensions.cs b/src/Resources/Resources.Sdk/Generated/DeploymentStacksOperationsExtensions.cs deleted file mode 100644 index 39dc0af41be3..000000000000 --- a/src/Resources/Resources.Sdk/Generated/DeploymentStacksOperationsExtensions.cs +++ /dev/null @@ -1,1067 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for DeploymentStacksOperations. - /// - public static partial class DeploymentStacksOperationsExtensions - { - /// - /// Lists all the Deployment Stacks within the specified resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - public static IPage ListAtResourceGroup(this IDeploymentStacksOperations operations, string resourceGroupName) - { - return operations.ListAtResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult(); - } - - /// - /// Lists all the Deployment Stacks within the specified resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAtResourceGroupAsync(this IDeploymentStacksOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListAtResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Lists all the Deployment Stacks within the specified subscription. - /// - /// - /// The operations group for this extension method. - /// - public static IPage ListAtSubscription(this IDeploymentStacksOperations operations) - { - return operations.ListAtSubscriptionAsync().GetAwaiter().GetResult(); - } - - /// - /// Lists all the Deployment Stacks within the specified subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAtSubscriptionAsync(this IDeploymentStacksOperations operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListAtSubscriptionWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Lists all the Deployment Stacks within the specified management group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Management Group. - /// - public static IPage ListAtManagementGroup(this IDeploymentStacksOperations operations, string managementGroupId) - { - return operations.ListAtManagementGroupAsync(managementGroupId).GetAwaiter().GetResult(); - } - - /// - /// Lists all the Deployment Stacks within the specified management group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Management Group. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAtManagementGroupAsync(this IDeploymentStacksOperations operations, string managementGroupId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListAtManagementGroupWithHttpMessagesAsync(managementGroupId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates or updates a Deployment Stack. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of the deployment stack. - /// - /// - /// Deployment Stack supplied to the operation. - /// - public static DeploymentStack CreateOrUpdateAtResourceGroup(this IDeploymentStacksOperations operations, string resourceGroupName, string deploymentStackName, DeploymentStack deploymentStack) - { - return operations.CreateOrUpdateAtResourceGroupAsync(resourceGroupName, deploymentStackName, deploymentStack).GetAwaiter().GetResult(); - } - - /// - /// Creates or updates a Deployment Stack. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of the deployment stack. - /// - /// - /// Deployment Stack supplied to the operation. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateAtResourceGroupAsync(this IDeploymentStacksOperations operations, string resourceGroupName, string deploymentStackName, DeploymentStack deploymentStack, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateAtResourceGroupWithHttpMessagesAsync(resourceGroupName, deploymentStackName, deploymentStack, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a Deployment Stack with a given name. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of the deployment stack. - /// - public static DeploymentStack GetAtResourceGroup(this IDeploymentStacksOperations operations, string resourceGroupName, string deploymentStackName) - { - return operations.GetAtResourceGroupAsync(resourceGroupName, deploymentStackName).GetAwaiter().GetResult(); - } - - /// - /// Gets a Deployment Stack with a given name. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of the deployment stack. - /// - /// - /// The cancellation token. - /// - public static async Task GetAtResourceGroupAsync(this IDeploymentStacksOperations operations, string resourceGroupName, string deploymentStackName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetAtResourceGroupWithHttpMessagesAsync(resourceGroupName, deploymentStackName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a Deployment Stack by name. When operation completes, status code - /// 200 returned without content. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of the deployment stack. - /// - /// - /// Flag to indicate delete rather than detach for the resources. Possible - /// values include: 'delete', 'detach' - /// - /// - /// Flag to indicate delete rather than detach for the resource groups. - /// Possible values include: 'delete', 'detach' - /// - public static DeploymentStacksDeleteAtResourceGroupHeaders DeleteAtResourceGroup(this IDeploymentStacksOperations operations, string resourceGroupName, string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string)) - { - return operations.DeleteAtResourceGroupAsync(resourceGroupName, deploymentStackName, unmanageActionResources, unmanageActionResourceGroups).GetAwaiter().GetResult(); - } - - /// - /// Deletes a Deployment Stack by name. When operation completes, status code - /// 200 returned without content. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of the deployment stack. - /// - /// - /// Flag to indicate delete rather than detach for the resources. Possible - /// values include: 'delete', 'detach' - /// - /// - /// Flag to indicate delete rather than detach for the resource groups. - /// Possible values include: 'delete', 'detach' - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAtResourceGroupAsync(this IDeploymentStacksOperations operations, string resourceGroupName, string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.DeleteAtResourceGroupWithHttpMessagesAsync(resourceGroupName, deploymentStackName, unmanageActionResources, unmanageActionResourceGroups, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Headers; - } - } - - /// - /// Creates or updates a Deployment Stack. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the deployment stack. - /// - /// - /// Deployment Stack supplied to the operation. - /// - public static DeploymentStack CreateOrUpdateAtSubscription(this IDeploymentStacksOperations operations, string deploymentStackName, DeploymentStack deploymentStack) - { - return operations.CreateOrUpdateAtSubscriptionAsync(deploymentStackName, deploymentStack).GetAwaiter().GetResult(); - } - - /// - /// Creates or updates a Deployment Stack. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the deployment stack. - /// - /// - /// Deployment Stack supplied to the operation. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateAtSubscriptionAsync(this IDeploymentStacksOperations operations, string deploymentStackName, DeploymentStack deploymentStack, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateAtSubscriptionWithHttpMessagesAsync(deploymentStackName, deploymentStack, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a Deployment Stack with a given name. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the deployment stack. - /// - public static DeploymentStack GetAtSubscription(this IDeploymentStacksOperations operations, string deploymentStackName) - { - return operations.GetAtSubscriptionAsync(deploymentStackName).GetAwaiter().GetResult(); - } - - /// - /// Gets a Deployment Stack with a given name. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the deployment stack. - /// - /// - /// The cancellation token. - /// - public static async Task GetAtSubscriptionAsync(this IDeploymentStacksOperations operations, string deploymentStackName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetAtSubscriptionWithHttpMessagesAsync(deploymentStackName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a Deployment Stack by name. When operation completes, status code - /// 200 returned without content. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the deployment stack. - /// - /// - /// Flag to indicate delete rather than detach for the resources. Possible - /// values include: 'delete', 'detach' - /// - /// - /// Flag to indicate delete rather than detach for the resource groups. - /// Possible values include: 'delete', 'detach' - /// - public static DeploymentStacksDeleteAtSubscriptionHeaders DeleteAtSubscription(this IDeploymentStacksOperations operations, string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string)) - { - return operations.DeleteAtSubscriptionAsync(deploymentStackName, unmanageActionResources, unmanageActionResourceGroups).GetAwaiter().GetResult(); - } - - /// - /// Deletes a Deployment Stack by name. When operation completes, status code - /// 200 returned without content. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the deployment stack. - /// - /// - /// Flag to indicate delete rather than detach for the resources. Possible - /// values include: 'delete', 'detach' - /// - /// - /// Flag to indicate delete rather than detach for the resource groups. - /// Possible values include: 'delete', 'detach' - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAtSubscriptionAsync(this IDeploymentStacksOperations operations, string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.DeleteAtSubscriptionWithHttpMessagesAsync(deploymentStackName, unmanageActionResources, unmanageActionResourceGroups, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Headers; - } - } - - /// - /// Creates or updates a Deployment Stack. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Management Group. - /// - /// - /// Name of the deployment stack. - /// - /// - /// Deployment Stack supplied to the operation. - /// - public static DeploymentStack CreateOrUpdateAtManagementGroup(this IDeploymentStacksOperations operations, string managementGroupId, string deploymentStackName, DeploymentStack deploymentStack) - { - return operations.CreateOrUpdateAtManagementGroupAsync(managementGroupId, deploymentStackName, deploymentStack).GetAwaiter().GetResult(); - } - - /// - /// Creates or updates a Deployment Stack. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Management Group. - /// - /// - /// Name of the deployment stack. - /// - /// - /// Deployment Stack supplied to the operation. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateAtManagementGroupAsync(this IDeploymentStacksOperations operations, string managementGroupId, string deploymentStackName, DeploymentStack deploymentStack, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateAtManagementGroupWithHttpMessagesAsync(managementGroupId, deploymentStackName, deploymentStack, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a Deployment Stack with a given name. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Management Group. - /// - /// - /// Name of the deployment stack. - /// - public static DeploymentStack GetAtManagementGroup(this IDeploymentStacksOperations operations, string managementGroupId, string deploymentStackName) - { - return operations.GetAtManagementGroupAsync(managementGroupId, deploymentStackName).GetAwaiter().GetResult(); - } - - /// - /// Gets a Deployment Stack with a given name. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Management Group. - /// - /// - /// Name of the deployment stack. - /// - /// - /// The cancellation token. - /// - public static async Task GetAtManagementGroupAsync(this IDeploymentStacksOperations operations, string managementGroupId, string deploymentStackName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetAtManagementGroupWithHttpMessagesAsync(managementGroupId, deploymentStackName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a Deployment Stack by name. When operation completes, status code - /// 200 returned without content. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Management Group. - /// - /// - /// Name of the deployment stack. - /// - /// - /// Flag to indicate delete rather than detach for the resources. Possible - /// values include: 'delete', 'detach' - /// - /// - /// Flag to indicate delete rather than detach for the resource groups. - /// Possible values include: 'delete', 'detach' - /// - /// - /// Flag to indicate delete rather than detach for the management groups. - /// Possible values include: 'delete', 'detach' - /// - public static DeploymentStacksDeleteAtManagementGroupHeaders DeleteAtManagementGroup(this IDeploymentStacksOperations operations, string managementGroupId, string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string), string unmanageActionManagementGroups = default(string)) - { - return operations.DeleteAtManagementGroupAsync(managementGroupId, deploymentStackName, unmanageActionResources, unmanageActionResourceGroups, unmanageActionManagementGroups).GetAwaiter().GetResult(); - } - - /// - /// Deletes a Deployment Stack by name. When operation completes, status code - /// 200 returned without content. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Management Group. - /// - /// - /// Name of the deployment stack. - /// - /// - /// Flag to indicate delete rather than detach for the resources. Possible - /// values include: 'delete', 'detach' - /// - /// - /// Flag to indicate delete rather than detach for the resource groups. - /// Possible values include: 'delete', 'detach' - /// - /// - /// Flag to indicate delete rather than detach for the management groups. - /// Possible values include: 'delete', 'detach' - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAtManagementGroupAsync(this IDeploymentStacksOperations operations, string managementGroupId, string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string), string unmanageActionManagementGroups = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.DeleteAtManagementGroupWithHttpMessagesAsync(managementGroupId, deploymentStackName, unmanageActionResources, unmanageActionResourceGroups, unmanageActionManagementGroups, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Headers; - } - } - - /// - /// Exports the template used to create the deployment stack. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of the deployment stack. - /// - public static DeploymentStackTemplateDefinition ExportTemplateAtResourceGroup(this IDeploymentStacksOperations operations, string resourceGroupName, string deploymentStackName) - { - return operations.ExportTemplateAtResourceGroupAsync(resourceGroupName, deploymentStackName).GetAwaiter().GetResult(); - } - - /// - /// Exports the template used to create the deployment stack. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of the deployment stack. - /// - /// - /// The cancellation token. - /// - public static async Task ExportTemplateAtResourceGroupAsync(this IDeploymentStacksOperations operations, string resourceGroupName, string deploymentStackName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ExportTemplateAtResourceGroupWithHttpMessagesAsync(resourceGroupName, deploymentStackName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Exports the template used to create the deployment stack. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the deployment stack. - /// - public static DeploymentStackTemplateDefinition ExportTemplateAtSubscription(this IDeploymentStacksOperations operations, string deploymentStackName) - { - return operations.ExportTemplateAtSubscriptionAsync(deploymentStackName).GetAwaiter().GetResult(); - } - - /// - /// Exports the template used to create the deployment stack. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the deployment stack. - /// - /// - /// The cancellation token. - /// - public static async Task ExportTemplateAtSubscriptionAsync(this IDeploymentStacksOperations operations, string deploymentStackName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ExportTemplateAtSubscriptionWithHttpMessagesAsync(deploymentStackName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Exports the template used to create the deployment stack. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Management Group. - /// - /// - /// Name of the deployment stack. - /// - public static DeploymentStackTemplateDefinition ExportTemplateAtManagementGroup(this IDeploymentStacksOperations operations, string managementGroupId, string deploymentStackName) - { - return operations.ExportTemplateAtManagementGroupAsync(managementGroupId, deploymentStackName).GetAwaiter().GetResult(); - } - - /// - /// Exports the template used to create the deployment stack. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Management Group. - /// - /// - /// Name of the deployment stack. - /// - /// - /// The cancellation token. - /// - public static async Task ExportTemplateAtManagementGroupAsync(this IDeploymentStacksOperations operations, string managementGroupId, string deploymentStackName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ExportTemplateAtManagementGroupWithHttpMessagesAsync(managementGroupId, deploymentStackName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates or updates a Deployment Stack. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of the deployment stack. - /// - /// - /// Deployment Stack supplied to the operation. - /// - public static DeploymentStack BeginCreateOrUpdateAtResourceGroup(this IDeploymentStacksOperations operations, string resourceGroupName, string deploymentStackName, DeploymentStack deploymentStack) - { - return operations.BeginCreateOrUpdateAtResourceGroupAsync(resourceGroupName, deploymentStackName, deploymentStack).GetAwaiter().GetResult(); - } - - /// - /// Creates or updates a Deployment Stack. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of the deployment stack. - /// - /// - /// Deployment Stack supplied to the operation. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateOrUpdateAtResourceGroupAsync(this IDeploymentStacksOperations operations, string resourceGroupName, string deploymentStackName, DeploymentStack deploymentStack, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCreateOrUpdateAtResourceGroupWithHttpMessagesAsync(resourceGroupName, deploymentStackName, deploymentStack, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a Deployment Stack by name. When operation completes, status code - /// 200 returned without content. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of the deployment stack. - /// - /// - /// Flag to indicate delete rather than detach for the resources. Possible - /// values include: 'delete', 'detach' - /// - /// - /// Flag to indicate delete rather than detach for the resource groups. - /// Possible values include: 'delete', 'detach' - /// - public static DeploymentStacksDeleteAtResourceGroupHeaders BeginDeleteAtResourceGroup(this IDeploymentStacksOperations operations, string resourceGroupName, string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string)) - { - return operations.BeginDeleteAtResourceGroupAsync(resourceGroupName, deploymentStackName, unmanageActionResources, unmanageActionResourceGroups).GetAwaiter().GetResult(); - } - - /// - /// Deletes a Deployment Stack by name. When operation completes, status code - /// 200 returned without content. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of the deployment stack. - /// - /// - /// Flag to indicate delete rather than detach for the resources. Possible - /// values include: 'delete', 'detach' - /// - /// - /// Flag to indicate delete rather than detach for the resource groups. - /// Possible values include: 'delete', 'detach' - /// - /// - /// The cancellation token. - /// - public static async Task BeginDeleteAtResourceGroupAsync(this IDeploymentStacksOperations operations, string resourceGroupName, string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginDeleteAtResourceGroupWithHttpMessagesAsync(resourceGroupName, deploymentStackName, unmanageActionResources, unmanageActionResourceGroups, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Headers; - } - } - - /// - /// Creates or updates a Deployment Stack. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the deployment stack. - /// - /// - /// Deployment Stack supplied to the operation. - /// - public static DeploymentStack BeginCreateOrUpdateAtSubscription(this IDeploymentStacksOperations operations, string deploymentStackName, DeploymentStack deploymentStack) - { - return operations.BeginCreateOrUpdateAtSubscriptionAsync(deploymentStackName, deploymentStack).GetAwaiter().GetResult(); - } - - /// - /// Creates or updates a Deployment Stack. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the deployment stack. - /// - /// - /// Deployment Stack supplied to the operation. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateOrUpdateAtSubscriptionAsync(this IDeploymentStacksOperations operations, string deploymentStackName, DeploymentStack deploymentStack, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCreateOrUpdateAtSubscriptionWithHttpMessagesAsync(deploymentStackName, deploymentStack, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a Deployment Stack by name. When operation completes, status code - /// 200 returned without content. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the deployment stack. - /// - /// - /// Flag to indicate delete rather than detach for the resources. Possible - /// values include: 'delete', 'detach' - /// - /// - /// Flag to indicate delete rather than detach for the resource groups. - /// Possible values include: 'delete', 'detach' - /// - public static DeploymentStacksDeleteAtSubscriptionHeaders BeginDeleteAtSubscription(this IDeploymentStacksOperations operations, string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string)) - { - return operations.BeginDeleteAtSubscriptionAsync(deploymentStackName, unmanageActionResources, unmanageActionResourceGroups).GetAwaiter().GetResult(); - } - - /// - /// Deletes a Deployment Stack by name. When operation completes, status code - /// 200 returned without content. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the deployment stack. - /// - /// - /// Flag to indicate delete rather than detach for the resources. Possible - /// values include: 'delete', 'detach' - /// - /// - /// Flag to indicate delete rather than detach for the resource groups. - /// Possible values include: 'delete', 'detach' - /// - /// - /// The cancellation token. - /// - public static async Task BeginDeleteAtSubscriptionAsync(this IDeploymentStacksOperations operations, string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginDeleteAtSubscriptionWithHttpMessagesAsync(deploymentStackName, unmanageActionResources, unmanageActionResourceGroups, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Headers; - } - } - - /// - /// Creates or updates a Deployment Stack. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Management Group. - /// - /// - /// Name of the deployment stack. - /// - /// - /// Deployment Stack supplied to the operation. - /// - public static DeploymentStack BeginCreateOrUpdateAtManagementGroup(this IDeploymentStacksOperations operations, string managementGroupId, string deploymentStackName, DeploymentStack deploymentStack) - { - return operations.BeginCreateOrUpdateAtManagementGroupAsync(managementGroupId, deploymentStackName, deploymentStack).GetAwaiter().GetResult(); - } - - /// - /// Creates or updates a Deployment Stack. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Management Group. - /// - /// - /// Name of the deployment stack. - /// - /// - /// Deployment Stack supplied to the operation. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateOrUpdateAtManagementGroupAsync(this IDeploymentStacksOperations operations, string managementGroupId, string deploymentStackName, DeploymentStack deploymentStack, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCreateOrUpdateAtManagementGroupWithHttpMessagesAsync(managementGroupId, deploymentStackName, deploymentStack, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a Deployment Stack by name. When operation completes, status code - /// 200 returned without content. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Management Group. - /// - /// - /// Name of the deployment stack. - /// - /// - /// Flag to indicate delete rather than detach for the resources. Possible - /// values include: 'delete', 'detach' - /// - /// - /// Flag to indicate delete rather than detach for the resource groups. - /// Possible values include: 'delete', 'detach' - /// - /// - /// Flag to indicate delete rather than detach for the management groups. - /// Possible values include: 'delete', 'detach' - /// - public static DeploymentStacksDeleteAtManagementGroupHeaders BeginDeleteAtManagementGroup(this IDeploymentStacksOperations operations, string managementGroupId, string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string), string unmanageActionManagementGroups = default(string)) - { - return operations.BeginDeleteAtManagementGroupAsync(managementGroupId, deploymentStackName, unmanageActionResources, unmanageActionResourceGroups, unmanageActionManagementGroups).GetAwaiter().GetResult(); - } - - /// - /// Deletes a Deployment Stack by name. When operation completes, status code - /// 200 returned without content. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Management Group. - /// - /// - /// Name of the deployment stack. - /// - /// - /// Flag to indicate delete rather than detach for the resources. Possible - /// values include: 'delete', 'detach' - /// - /// - /// Flag to indicate delete rather than detach for the resource groups. - /// Possible values include: 'delete', 'detach' - /// - /// - /// Flag to indicate delete rather than detach for the management groups. - /// Possible values include: 'delete', 'detach' - /// - /// - /// The cancellation token. - /// - public static async Task BeginDeleteAtManagementGroupAsync(this IDeploymentStacksOperations operations, string managementGroupId, string deploymentStackName, string unmanageActionResources = default(string), string unmanageActionResourceGroups = default(string), string unmanageActionManagementGroups = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginDeleteAtManagementGroupWithHttpMessagesAsync(managementGroupId, deploymentStackName, unmanageActionResources, unmanageActionResourceGroups, unmanageActionManagementGroups, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Headers; - } - } - - /// - /// Lists all the Deployment Stacks within the specified resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListAtResourceGroupNext(this IDeploymentStacksOperations operations, string nextPageLink) - { - return operations.ListAtResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Lists all the Deployment Stacks within the specified resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAtResourceGroupNextAsync(this IDeploymentStacksOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListAtResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Lists all the Deployment Stacks within the specified subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListAtSubscriptionNext(this IDeploymentStacksOperations operations, string nextPageLink) - { - return operations.ListAtSubscriptionNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Lists all the Deployment Stacks within the specified subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAtSubscriptionNextAsync(this IDeploymentStacksOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListAtSubscriptionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Lists all the Deployment Stacks within the specified management group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListAtManagementGroupNext(this IDeploymentStacksOperations operations, string nextPageLink) - { - return operations.ListAtManagementGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Lists all the Deployment Stacks within the specified management group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAtManagementGroupNextAsync(this IDeploymentStacksOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListAtManagementGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/src/Resources/Resources.Sdk/Generated/DeploymentsOperationsExtensions.cs b/src/Resources/Resources.Sdk/Generated/DeploymentsOperationsExtensions.cs deleted file mode 100644 index 0148d39496da..000000000000 --- a/src/Resources/Resources.Sdk/Generated/DeploymentsOperationsExtensions.cs +++ /dev/null @@ -1,3137 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for DeploymentsOperations. - /// - public static partial class DeploymentsOperationsExtensions - { - /// - /// Deletes a deployment from the deployment history. - /// - /// - /// A template deployment that is currently running cannot be deleted. Deleting - /// a template deployment removes the associated deployment operations. This is - /// an asynchronous operation that returns a status of 202 until the template - /// deployment is successfully deleted. The Location response header contains - /// the URI that is used to obtain the status of the process. While the process - /// is running, a call to the URI in the Location header returns a status of - /// 202. When the process finishes, the URI in the Location header returns a - /// status of 204 on success. If the asynchronous request failed, the URI in - /// the Location header returns an error-level status code. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The resource scope. - /// - /// - /// The name of the deployment. - /// - public static void DeleteAtScope(this IDeploymentsOperations operations, string scope, string deploymentName) - { - operations.DeleteAtScopeAsync(scope, deploymentName).GetAwaiter().GetResult(); - } - - /// - /// Deletes a deployment from the deployment history. - /// - /// - /// A template deployment that is currently running cannot be deleted. Deleting - /// a template deployment removes the associated deployment operations. This is - /// an asynchronous operation that returns a status of 202 until the template - /// deployment is successfully deleted. The Location response header contains - /// the URI that is used to obtain the status of the process. While the process - /// is running, a call to the URI in the Location header returns a status of - /// 202. When the process finishes, the URI in the Location header returns a - /// status of 204 on success. If the asynchronous request failed, the URI in - /// the Location header returns an error-level status code. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The resource scope. - /// - /// - /// The name of the deployment. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAtScopeAsync(this IDeploymentsOperations operations, string scope, string deploymentName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteAtScopeWithHttpMessagesAsync(scope, deploymentName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Checks whether the deployment exists. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The resource scope. - /// - /// - /// The name of the deployment. - /// - public static bool CheckExistenceAtScope(this IDeploymentsOperations operations, string scope, string deploymentName) - { - return operations.CheckExistenceAtScopeAsync(scope, deploymentName).GetAwaiter().GetResult(); - } - - /// - /// Checks whether the deployment exists. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The resource scope. - /// - /// - /// The name of the deployment. - /// - /// - /// The cancellation token. - /// - public static async Task CheckExistenceAtScopeAsync(this IDeploymentsOperations operations, string scope, string deploymentName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CheckExistenceAtScopeWithHttpMessagesAsync(scope, deploymentName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deploys resources at a given scope. - /// - /// - /// You can provide the template and parameters directly in the request or link - /// to JSON files. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The resource scope. - /// - /// - /// The name of the deployment. - /// - /// - /// Additional parameters supplied to the operation. - /// - public static DeploymentExtended CreateOrUpdateAtScope(this IDeploymentsOperations operations, string scope, string deploymentName, Deployment parameters) - { - return operations.CreateOrUpdateAtScopeAsync(scope, deploymentName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Deploys resources at a given scope. - /// - /// - /// You can provide the template and parameters directly in the request or link - /// to JSON files. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The resource scope. - /// - /// - /// The name of the deployment. - /// - /// - /// Additional parameters supplied to the operation. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateAtScopeAsync(this IDeploymentsOperations operations, string scope, string deploymentName, Deployment parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateAtScopeWithHttpMessagesAsync(scope, deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a deployment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The resource scope. - /// - /// - /// The name of the deployment. - /// - public static DeploymentExtended GetAtScope(this IDeploymentsOperations operations, string scope, string deploymentName) - { - return operations.GetAtScopeAsync(scope, deploymentName).GetAwaiter().GetResult(); - } - - /// - /// Gets a deployment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The resource scope. - /// - /// - /// The name of the deployment. - /// - /// - /// The cancellation token. - /// - public static async Task GetAtScopeAsync(this IDeploymentsOperations operations, string scope, string deploymentName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetAtScopeWithHttpMessagesAsync(scope, deploymentName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Cancels a currently running template deployment. - /// - /// - /// You can cancel a deployment only if the provisioningState is Accepted or - /// Running. After the deployment is canceled, the provisioningState is set to - /// Canceled. Canceling a template deployment stops the currently running - /// template deployment and leaves the resources partially deployed. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The resource scope. - /// - /// - /// The name of the deployment. - /// - public static void CancelAtScope(this IDeploymentsOperations operations, string scope, string deploymentName) - { - operations.CancelAtScopeAsync(scope, deploymentName).GetAwaiter().GetResult(); - } - - /// - /// Cancels a currently running template deployment. - /// - /// - /// You can cancel a deployment only if the provisioningState is Accepted or - /// Running. After the deployment is canceled, the provisioningState is set to - /// Canceled. Canceling a template deployment stops the currently running - /// template deployment and leaves the resources partially deployed. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The resource scope. - /// - /// - /// The name of the deployment. - /// - /// - /// The cancellation token. - /// - public static async Task CancelAtScopeAsync(this IDeploymentsOperations operations, string scope, string deploymentName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.CancelAtScopeWithHttpMessagesAsync(scope, deploymentName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Validates whether the specified template is syntactically correct and will - /// be accepted by Azure Resource Manager.. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The resource scope. - /// - /// - /// The name of the deployment. - /// - /// - /// Parameters to validate. - /// - public static DeploymentValidateResult ValidateAtScope(this IDeploymentsOperations operations, string scope, string deploymentName, Deployment parameters) - { - return operations.ValidateAtScopeAsync(scope, deploymentName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Validates whether the specified template is syntactically correct and will - /// be accepted by Azure Resource Manager.. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The resource scope. - /// - /// - /// The name of the deployment. - /// - /// - /// Parameters to validate. - /// - /// - /// The cancellation token. - /// - public static async Task ValidateAtScopeAsync(this IDeploymentsOperations operations, string scope, string deploymentName, Deployment parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ValidateAtScopeWithHttpMessagesAsync(scope, deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Exports the template used for specified deployment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The resource scope. - /// - /// - /// The name of the deployment. - /// - public static DeploymentExportResult ExportTemplateAtScope(this IDeploymentsOperations operations, string scope, string deploymentName) - { - return operations.ExportTemplateAtScopeAsync(scope, deploymentName).GetAwaiter().GetResult(); - } - - /// - /// Exports the template used for specified deployment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The resource scope. - /// - /// - /// The name of the deployment. - /// - /// - /// The cancellation token. - /// - public static async Task ExportTemplateAtScopeAsync(this IDeploymentsOperations operations, string scope, string deploymentName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ExportTemplateAtScopeWithHttpMessagesAsync(scope, deploymentName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all the deployments at the given scope. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The resource scope. - /// - /// - /// OData parameters to apply to the operation. - /// - public static IPage ListAtScope(this IDeploymentsOperations operations, string scope, ODataQuery odataQuery = default(ODataQuery)) - { - return operations.ListAtScopeAsync(scope, odataQuery).GetAwaiter().GetResult(); - } - - /// - /// Get all the deployments at the given scope. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The resource scope. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAtScopeAsync(this IDeploymentsOperations operations, string scope, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListAtScopeWithHttpMessagesAsync(scope, odataQuery, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a deployment from the deployment history. - /// - /// - /// A template deployment that is currently running cannot be deleted. Deleting - /// a template deployment removes the associated deployment operations. This is - /// an asynchronous operation that returns a status of 202 until the template - /// deployment is successfully deleted. The Location response header contains - /// the URI that is used to obtain the status of the process. While the process - /// is running, a call to the URI in the Location header returns a status of - /// 202. When the process finishes, the URI in the Location header returns a - /// status of 204 on success. If the asynchronous request failed, the URI in - /// the Location header returns an error-level status code. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - public static void DeleteAtTenantScope(this IDeploymentsOperations operations, string deploymentName) - { - operations.DeleteAtTenantScopeAsync(deploymentName).GetAwaiter().GetResult(); - } - - /// - /// Deletes a deployment from the deployment history. - /// - /// - /// A template deployment that is currently running cannot be deleted. Deleting - /// a template deployment removes the associated deployment operations. This is - /// an asynchronous operation that returns a status of 202 until the template - /// deployment is successfully deleted. The Location response header contains - /// the URI that is used to obtain the status of the process. While the process - /// is running, a call to the URI in the Location header returns a status of - /// 202. When the process finishes, the URI in the Location header returns a - /// status of 204 on success. If the asynchronous request failed, the URI in - /// the Location header returns an error-level status code. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAtTenantScopeAsync(this IDeploymentsOperations operations, string deploymentName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteAtTenantScopeWithHttpMessagesAsync(deploymentName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Checks whether the deployment exists. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - public static bool CheckExistenceAtTenantScope(this IDeploymentsOperations operations, string deploymentName) - { - return operations.CheckExistenceAtTenantScopeAsync(deploymentName).GetAwaiter().GetResult(); - } - - /// - /// Checks whether the deployment exists. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - /// - /// The cancellation token. - /// - public static async Task CheckExistenceAtTenantScopeAsync(this IDeploymentsOperations operations, string deploymentName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CheckExistenceAtTenantScopeWithHttpMessagesAsync(deploymentName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deploys resources at tenant scope. - /// - /// - /// You can provide the template and parameters directly in the request or link - /// to JSON files. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - /// - /// Additional parameters supplied to the operation. - /// - public static DeploymentExtended CreateOrUpdateAtTenantScope(this IDeploymentsOperations operations, string deploymentName, ScopedDeployment parameters) - { - return operations.CreateOrUpdateAtTenantScopeAsync(deploymentName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Deploys resources at tenant scope. - /// - /// - /// You can provide the template and parameters directly in the request or link - /// to JSON files. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - /// - /// Additional parameters supplied to the operation. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateAtTenantScopeAsync(this IDeploymentsOperations operations, string deploymentName, ScopedDeployment parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateAtTenantScopeWithHttpMessagesAsync(deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a deployment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - public static DeploymentExtended GetAtTenantScope(this IDeploymentsOperations operations, string deploymentName) - { - return operations.GetAtTenantScopeAsync(deploymentName).GetAwaiter().GetResult(); - } - - /// - /// Gets a deployment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - /// - /// The cancellation token. - /// - public static async Task GetAtTenantScopeAsync(this IDeploymentsOperations operations, string deploymentName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetAtTenantScopeWithHttpMessagesAsync(deploymentName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Cancels a currently running template deployment. - /// - /// - /// You can cancel a deployment only if the provisioningState is Accepted or - /// Running. After the deployment is canceled, the provisioningState is set to - /// Canceled. Canceling a template deployment stops the currently running - /// template deployment and leaves the resources partially deployed. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - public static void CancelAtTenantScope(this IDeploymentsOperations operations, string deploymentName) - { - operations.CancelAtTenantScopeAsync(deploymentName).GetAwaiter().GetResult(); - } - - /// - /// Cancels a currently running template deployment. - /// - /// - /// You can cancel a deployment only if the provisioningState is Accepted or - /// Running. After the deployment is canceled, the provisioningState is set to - /// Canceled. Canceling a template deployment stops the currently running - /// template deployment and leaves the resources partially deployed. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - /// - /// The cancellation token. - /// - public static async Task CancelAtTenantScopeAsync(this IDeploymentsOperations operations, string deploymentName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.CancelAtTenantScopeWithHttpMessagesAsync(deploymentName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Validates whether the specified template is syntactically correct and will - /// be accepted by Azure Resource Manager.. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - /// - /// Parameters to validate. - /// - public static DeploymentValidateResult ValidateAtTenantScope(this IDeploymentsOperations operations, string deploymentName, ScopedDeployment parameters) - { - return operations.ValidateAtTenantScopeAsync(deploymentName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Validates whether the specified template is syntactically correct and will - /// be accepted by Azure Resource Manager.. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - /// - /// Parameters to validate. - /// - /// - /// The cancellation token. - /// - public static async Task ValidateAtTenantScopeAsync(this IDeploymentsOperations operations, string deploymentName, ScopedDeployment parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ValidateAtTenantScopeWithHttpMessagesAsync(deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Returns changes that will be made by the deployment if executed at the - /// scope of the tenant group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - /// - /// Parameters to validate. - /// - public static WhatIfOperationResult WhatIfAtTenantScope(this IDeploymentsOperations operations, string deploymentName, ScopedDeploymentWhatIf parameters) - { - return operations.WhatIfAtTenantScopeAsync(deploymentName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Returns changes that will be made by the deployment if executed at the - /// scope of the tenant group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - /// - /// Parameters to validate. - /// - /// - /// The cancellation token. - /// - public static async Task WhatIfAtTenantScopeAsync(this IDeploymentsOperations operations, string deploymentName, ScopedDeploymentWhatIf parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.WhatIfAtTenantScopeWithHttpMessagesAsync(deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Exports the template used for specified deployment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - public static DeploymentExportResult ExportTemplateAtTenantScope(this IDeploymentsOperations operations, string deploymentName) - { - return operations.ExportTemplateAtTenantScopeAsync(deploymentName).GetAwaiter().GetResult(); - } - - /// - /// Exports the template used for specified deployment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - /// - /// The cancellation token. - /// - public static async Task ExportTemplateAtTenantScopeAsync(this IDeploymentsOperations operations, string deploymentName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ExportTemplateAtTenantScopeWithHttpMessagesAsync(deploymentName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all the deployments at the tenant scope. - /// - /// - /// The operations group for this extension method. - /// - /// - /// OData parameters to apply to the operation. - /// - public static IPage ListAtTenantScope(this IDeploymentsOperations operations, ODataQuery odataQuery = default(ODataQuery)) - { - return operations.ListAtTenantScopeAsync(odataQuery).GetAwaiter().GetResult(); - } - - /// - /// Get all the deployments at the tenant scope. - /// - /// - /// The operations group for this extension method. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAtTenantScopeAsync(this IDeploymentsOperations operations, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListAtTenantScopeWithHttpMessagesAsync(odataQuery, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a deployment from the deployment history. - /// - /// - /// A template deployment that is currently running cannot be deleted. Deleting - /// a template deployment removes the associated deployment operations. This is - /// an asynchronous operation that returns a status of 202 until the template - /// deployment is successfully deleted. The Location response header contains - /// the URI that is used to obtain the status of the process. While the process - /// is running, a call to the URI in the Location header returns a status of - /// 202. When the process finishes, the URI in the Location header returns a - /// status of 204 on success. If the asynchronous request failed, the URI in - /// the Location header returns an error-level status code. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The management group ID. - /// - /// - /// The name of the deployment. - /// - public static void DeleteAtManagementGroupScope(this IDeploymentsOperations operations, string groupId, string deploymentName) - { - operations.DeleteAtManagementGroupScopeAsync(groupId, deploymentName).GetAwaiter().GetResult(); - } - - /// - /// Deletes a deployment from the deployment history. - /// - /// - /// A template deployment that is currently running cannot be deleted. Deleting - /// a template deployment removes the associated deployment operations. This is - /// an asynchronous operation that returns a status of 202 until the template - /// deployment is successfully deleted. The Location response header contains - /// the URI that is used to obtain the status of the process. While the process - /// is running, a call to the URI in the Location header returns a status of - /// 202. When the process finishes, the URI in the Location header returns a - /// status of 204 on success. If the asynchronous request failed, the URI in - /// the Location header returns an error-level status code. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The management group ID. - /// - /// - /// The name of the deployment. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAtManagementGroupScopeAsync(this IDeploymentsOperations operations, string groupId, string deploymentName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteAtManagementGroupScopeWithHttpMessagesAsync(groupId, deploymentName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Checks whether the deployment exists. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The management group ID. - /// - /// - /// The name of the deployment. - /// - public static bool CheckExistenceAtManagementGroupScope(this IDeploymentsOperations operations, string groupId, string deploymentName) - { - return operations.CheckExistenceAtManagementGroupScopeAsync(groupId, deploymentName).GetAwaiter().GetResult(); - } - - /// - /// Checks whether the deployment exists. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The management group ID. - /// - /// - /// The name of the deployment. - /// - /// - /// The cancellation token. - /// - public static async Task CheckExistenceAtManagementGroupScopeAsync(this IDeploymentsOperations operations, string groupId, string deploymentName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CheckExistenceAtManagementGroupScopeWithHttpMessagesAsync(groupId, deploymentName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deploys resources at management group scope. - /// - /// - /// You can provide the template and parameters directly in the request or link - /// to JSON files. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The management group ID. - /// - /// - /// The name of the deployment. - /// - /// - /// Additional parameters supplied to the operation. - /// - public static DeploymentExtended CreateOrUpdateAtManagementGroupScope(this IDeploymentsOperations operations, string groupId, string deploymentName, ScopedDeployment parameters) - { - return operations.CreateOrUpdateAtManagementGroupScopeAsync(groupId, deploymentName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Deploys resources at management group scope. - /// - /// - /// You can provide the template and parameters directly in the request or link - /// to JSON files. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The management group ID. - /// - /// - /// The name of the deployment. - /// - /// - /// Additional parameters supplied to the operation. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateAtManagementGroupScopeAsync(this IDeploymentsOperations operations, string groupId, string deploymentName, ScopedDeployment parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateAtManagementGroupScopeWithHttpMessagesAsync(groupId, deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a deployment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The management group ID. - /// - /// - /// The name of the deployment. - /// - public static DeploymentExtended GetAtManagementGroupScope(this IDeploymentsOperations operations, string groupId, string deploymentName) - { - return operations.GetAtManagementGroupScopeAsync(groupId, deploymentName).GetAwaiter().GetResult(); - } - - /// - /// Gets a deployment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The management group ID. - /// - /// - /// The name of the deployment. - /// - /// - /// The cancellation token. - /// - public static async Task GetAtManagementGroupScopeAsync(this IDeploymentsOperations operations, string groupId, string deploymentName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetAtManagementGroupScopeWithHttpMessagesAsync(groupId, deploymentName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Cancels a currently running template deployment. - /// - /// - /// You can cancel a deployment only if the provisioningState is Accepted or - /// Running. After the deployment is canceled, the provisioningState is set to - /// Canceled. Canceling a template deployment stops the currently running - /// template deployment and leaves the resources partially deployed. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The management group ID. - /// - /// - /// The name of the deployment. - /// - public static void CancelAtManagementGroupScope(this IDeploymentsOperations operations, string groupId, string deploymentName) - { - operations.CancelAtManagementGroupScopeAsync(groupId, deploymentName).GetAwaiter().GetResult(); - } - - /// - /// Cancels a currently running template deployment. - /// - /// - /// You can cancel a deployment only if the provisioningState is Accepted or - /// Running. After the deployment is canceled, the provisioningState is set to - /// Canceled. Canceling a template deployment stops the currently running - /// template deployment and leaves the resources partially deployed. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The management group ID. - /// - /// - /// The name of the deployment. - /// - /// - /// The cancellation token. - /// - public static async Task CancelAtManagementGroupScopeAsync(this IDeploymentsOperations operations, string groupId, string deploymentName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.CancelAtManagementGroupScopeWithHttpMessagesAsync(groupId, deploymentName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Validates whether the specified template is syntactically correct and will - /// be accepted by Azure Resource Manager.. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The management group ID. - /// - /// - /// The name of the deployment. - /// - /// - /// Parameters to validate. - /// - public static DeploymentValidateResult ValidateAtManagementGroupScope(this IDeploymentsOperations operations, string groupId, string deploymentName, ScopedDeployment parameters) - { - return operations.ValidateAtManagementGroupScopeAsync(groupId, deploymentName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Validates whether the specified template is syntactically correct and will - /// be accepted by Azure Resource Manager.. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The management group ID. - /// - /// - /// The name of the deployment. - /// - /// - /// Parameters to validate. - /// - /// - /// The cancellation token. - /// - public static async Task ValidateAtManagementGroupScopeAsync(this IDeploymentsOperations operations, string groupId, string deploymentName, ScopedDeployment parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ValidateAtManagementGroupScopeWithHttpMessagesAsync(groupId, deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Returns changes that will be made by the deployment if executed at the - /// scope of the management group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The management group ID. - /// - /// - /// The name of the deployment. - /// - /// - /// Parameters to validate. - /// - public static WhatIfOperationResult WhatIfAtManagementGroupScope(this IDeploymentsOperations operations, string groupId, string deploymentName, ScopedDeploymentWhatIf parameters) - { - return operations.WhatIfAtManagementGroupScopeAsync(groupId, deploymentName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Returns changes that will be made by the deployment if executed at the - /// scope of the management group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The management group ID. - /// - /// - /// The name of the deployment. - /// - /// - /// Parameters to validate. - /// - /// - /// The cancellation token. - /// - public static async Task WhatIfAtManagementGroupScopeAsync(this IDeploymentsOperations operations, string groupId, string deploymentName, ScopedDeploymentWhatIf parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.WhatIfAtManagementGroupScopeWithHttpMessagesAsync(groupId, deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Exports the template used for specified deployment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The management group ID. - /// - /// - /// The name of the deployment. - /// - public static DeploymentExportResult ExportTemplateAtManagementGroupScope(this IDeploymentsOperations operations, string groupId, string deploymentName) - { - return operations.ExportTemplateAtManagementGroupScopeAsync(groupId, deploymentName).GetAwaiter().GetResult(); - } - - /// - /// Exports the template used for specified deployment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The management group ID. - /// - /// - /// The name of the deployment. - /// - /// - /// The cancellation token. - /// - public static async Task ExportTemplateAtManagementGroupScopeAsync(this IDeploymentsOperations operations, string groupId, string deploymentName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ExportTemplateAtManagementGroupScopeWithHttpMessagesAsync(groupId, deploymentName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all the deployments for a management group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The management group ID. - /// - /// - /// OData parameters to apply to the operation. - /// - public static IPage ListAtManagementGroupScope(this IDeploymentsOperations operations, string groupId, ODataQuery odataQuery = default(ODataQuery)) - { - return operations.ListAtManagementGroupScopeAsync(groupId, odataQuery).GetAwaiter().GetResult(); - } - - /// - /// Get all the deployments for a management group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The management group ID. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAtManagementGroupScopeAsync(this IDeploymentsOperations operations, string groupId, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListAtManagementGroupScopeWithHttpMessagesAsync(groupId, odataQuery, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a deployment from the deployment history. - /// - /// - /// A template deployment that is currently running cannot be deleted. Deleting - /// a template deployment removes the associated deployment operations. This is - /// an asynchronous operation that returns a status of 202 until the template - /// deployment is successfully deleted. The Location response header contains - /// the URI that is used to obtain the status of the process. While the process - /// is running, a call to the URI in the Location header returns a status of - /// 202. When the process finishes, the URI in the Location header returns a - /// status of 204 on success. If the asynchronous request failed, the URI in - /// the Location header returns an error-level status code. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - public static void DeleteAtSubscriptionScope(this IDeploymentsOperations operations, string deploymentName) - { - operations.DeleteAtSubscriptionScopeAsync(deploymentName).GetAwaiter().GetResult(); - } - - /// - /// Deletes a deployment from the deployment history. - /// - /// - /// A template deployment that is currently running cannot be deleted. Deleting - /// a template deployment removes the associated deployment operations. This is - /// an asynchronous operation that returns a status of 202 until the template - /// deployment is successfully deleted. The Location response header contains - /// the URI that is used to obtain the status of the process. While the process - /// is running, a call to the URI in the Location header returns a status of - /// 202. When the process finishes, the URI in the Location header returns a - /// status of 204 on success. If the asynchronous request failed, the URI in - /// the Location header returns an error-level status code. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAtSubscriptionScopeAsync(this IDeploymentsOperations operations, string deploymentName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteAtSubscriptionScopeWithHttpMessagesAsync(deploymentName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Checks whether the deployment exists. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - public static bool CheckExistenceAtSubscriptionScope(this IDeploymentsOperations operations, string deploymentName) - { - return operations.CheckExistenceAtSubscriptionScopeAsync(deploymentName).GetAwaiter().GetResult(); - } - - /// - /// Checks whether the deployment exists. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - /// - /// The cancellation token. - /// - public static async Task CheckExistenceAtSubscriptionScopeAsync(this IDeploymentsOperations operations, string deploymentName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CheckExistenceAtSubscriptionScopeWithHttpMessagesAsync(deploymentName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deploys resources at subscription scope. - /// - /// - /// You can provide the template and parameters directly in the request or link - /// to JSON files. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - /// - /// Additional parameters supplied to the operation. - /// - public static DeploymentExtended CreateOrUpdateAtSubscriptionScope(this IDeploymentsOperations operations, string deploymentName, Deployment parameters) - { - return operations.CreateOrUpdateAtSubscriptionScopeAsync(deploymentName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Deploys resources at subscription scope. - /// - /// - /// You can provide the template and parameters directly in the request or link - /// to JSON files. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - /// - /// Additional parameters supplied to the operation. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateAtSubscriptionScopeAsync(this IDeploymentsOperations operations, string deploymentName, Deployment parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateAtSubscriptionScopeWithHttpMessagesAsync(deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a deployment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - public static DeploymentExtended GetAtSubscriptionScope(this IDeploymentsOperations operations, string deploymentName) - { - return operations.GetAtSubscriptionScopeAsync(deploymentName).GetAwaiter().GetResult(); - } - - /// - /// Gets a deployment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - /// - /// The cancellation token. - /// - public static async Task GetAtSubscriptionScopeAsync(this IDeploymentsOperations operations, string deploymentName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetAtSubscriptionScopeWithHttpMessagesAsync(deploymentName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Cancels a currently running template deployment. - /// - /// - /// You can cancel a deployment only if the provisioningState is Accepted or - /// Running. After the deployment is canceled, the provisioningState is set to - /// Canceled. Canceling a template deployment stops the currently running - /// template deployment and leaves the resources partially deployed. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - public static void CancelAtSubscriptionScope(this IDeploymentsOperations operations, string deploymentName) - { - operations.CancelAtSubscriptionScopeAsync(deploymentName).GetAwaiter().GetResult(); - } - - /// - /// Cancels a currently running template deployment. - /// - /// - /// You can cancel a deployment only if the provisioningState is Accepted or - /// Running. After the deployment is canceled, the provisioningState is set to - /// Canceled. Canceling a template deployment stops the currently running - /// template deployment and leaves the resources partially deployed. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - /// - /// The cancellation token. - /// - public static async Task CancelAtSubscriptionScopeAsync(this IDeploymentsOperations operations, string deploymentName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.CancelAtSubscriptionScopeWithHttpMessagesAsync(deploymentName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Validates whether the specified template is syntactically correct and will - /// be accepted by Azure Resource Manager.. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - /// - /// Parameters to validate. - /// - public static DeploymentValidateResult ValidateAtSubscriptionScope(this IDeploymentsOperations operations, string deploymentName, Deployment parameters) - { - return operations.ValidateAtSubscriptionScopeAsync(deploymentName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Validates whether the specified template is syntactically correct and will - /// be accepted by Azure Resource Manager.. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - /// - /// Parameters to validate. - /// - /// - /// The cancellation token. - /// - public static async Task ValidateAtSubscriptionScopeAsync(this IDeploymentsOperations operations, string deploymentName, Deployment parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ValidateAtSubscriptionScopeWithHttpMessagesAsync(deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Returns changes that will be made by the deployment if executed at the - /// scope of the subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - /// - /// Parameters to What If. - /// - public static WhatIfOperationResult WhatIfAtSubscriptionScope(this IDeploymentsOperations operations, string deploymentName, DeploymentWhatIf parameters) - { - return operations.WhatIfAtSubscriptionScopeAsync(deploymentName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Returns changes that will be made by the deployment if executed at the - /// scope of the subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - /// - /// Parameters to What If. - /// - /// - /// The cancellation token. - /// - public static async Task WhatIfAtSubscriptionScopeAsync(this IDeploymentsOperations operations, string deploymentName, DeploymentWhatIf parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.WhatIfAtSubscriptionScopeWithHttpMessagesAsync(deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Exports the template used for specified deployment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - public static DeploymentExportResult ExportTemplateAtSubscriptionScope(this IDeploymentsOperations operations, string deploymentName) - { - return operations.ExportTemplateAtSubscriptionScopeAsync(deploymentName).GetAwaiter().GetResult(); - } - - /// - /// Exports the template used for specified deployment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - /// - /// The cancellation token. - /// - public static async Task ExportTemplateAtSubscriptionScopeAsync(this IDeploymentsOperations operations, string deploymentName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ExportTemplateAtSubscriptionScopeWithHttpMessagesAsync(deploymentName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all the deployments for a subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// OData parameters to apply to the operation. - /// - public static IPage ListAtSubscriptionScope(this IDeploymentsOperations operations, ODataQuery odataQuery = default(ODataQuery)) - { - return operations.ListAtSubscriptionScopeAsync(odataQuery).GetAwaiter().GetResult(); - } - - /// - /// Get all the deployments for a subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAtSubscriptionScopeAsync(this IDeploymentsOperations operations, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListAtSubscriptionScopeWithHttpMessagesAsync(odataQuery, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a deployment from the deployment history. - /// - /// - /// A template deployment that is currently running cannot be deleted. Deleting - /// a template deployment removes the associated deployment operations. - /// Deleting a template deployment does not affect the state of the resource - /// group. This is an asynchronous operation that returns a status of 202 until - /// the template deployment is successfully deleted. The Location response - /// header contains the URI that is used to obtain the status of the process. - /// While the process is running, a call to the URI in the Location header - /// returns a status of 202. When the process finishes, the URI in the Location - /// header returns a status of 204 on success. If the asynchronous request - /// failed, the URI in the Location header returns an error-level status code. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group with the deployment to delete. The name is - /// case insensitive. - /// - /// - /// The name of the deployment. - /// - public static void Delete(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName) - { - operations.DeleteAsync(resourceGroupName, deploymentName).GetAwaiter().GetResult(); - } - - /// - /// Deletes a deployment from the deployment history. - /// - /// - /// A template deployment that is currently running cannot be deleted. Deleting - /// a template deployment removes the associated deployment operations. - /// Deleting a template deployment does not affect the state of the resource - /// group. This is an asynchronous operation that returns a status of 202 until - /// the template deployment is successfully deleted. The Location response - /// header contains the URI that is used to obtain the status of the process. - /// While the process is running, a call to the URI in the Location header - /// returns a status of 202. When the process finishes, the URI in the Location - /// header returns a status of 204 on success. If the asynchronous request - /// failed, the URI in the Location header returns an error-level status code. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group with the deployment to delete. The name is - /// case insensitive. - /// - /// - /// The name of the deployment. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, deploymentName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Checks whether the deployment exists. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group with the deployment to check. The name is - /// case insensitive. - /// - /// - /// The name of the deployment. - /// - public static bool CheckExistence(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName) - { - return operations.CheckExistenceAsync(resourceGroupName, deploymentName).GetAwaiter().GetResult(); - } - - /// - /// Checks whether the deployment exists. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group with the deployment to check. The name is - /// case insensitive. - /// - /// - /// The name of the deployment. - /// - /// - /// The cancellation token. - /// - public static async Task CheckExistenceAsync(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CheckExistenceWithHttpMessagesAsync(resourceGroupName, deploymentName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deploys resources to a resource group. - /// - /// - /// You can provide the template and parameters directly in the request or link - /// to JSON files. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group to deploy the resources to. The name is case - /// insensitive. The resource group must already exist. - /// - /// - /// The name of the deployment. - /// - /// - /// Additional parameters supplied to the operation. - /// - public static DeploymentExtended CreateOrUpdate(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName, Deployment parameters) - { - return operations.CreateOrUpdateAsync(resourceGroupName, deploymentName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Deploys resources to a resource group. - /// - /// - /// You can provide the template and parameters directly in the request or link - /// to JSON files. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group to deploy the resources to. The name is case - /// insensitive. The resource group must already exist. - /// - /// - /// The name of the deployment. - /// - /// - /// Additional parameters supplied to the operation. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateAsync(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName, Deployment parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a deployment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the deployment. - /// - public static DeploymentExtended Get(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName) - { - return operations.GetAsync(resourceGroupName, deploymentName).GetAwaiter().GetResult(); - } - - /// - /// Gets a deployment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the deployment. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, deploymentName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Cancels a currently running template deployment. - /// - /// - /// You can cancel a deployment only if the provisioningState is Accepted or - /// Running. After the deployment is canceled, the provisioningState is set to - /// Canceled. Canceling a template deployment stops the currently running - /// template deployment and leaves the resource group partially deployed. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the deployment. - /// - public static void Cancel(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName) - { - operations.CancelAsync(resourceGroupName, deploymentName).GetAwaiter().GetResult(); - } - - /// - /// Cancels a currently running template deployment. - /// - /// - /// You can cancel a deployment only if the provisioningState is Accepted or - /// Running. After the deployment is canceled, the provisioningState is set to - /// Canceled. Canceling a template deployment stops the currently running - /// template deployment and leaves the resource group partially deployed. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the deployment. - /// - /// - /// The cancellation token. - /// - public static async Task CancelAsync(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.CancelWithHttpMessagesAsync(resourceGroupName, deploymentName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Validates whether the specified template is syntactically correct and will - /// be accepted by Azure Resource Manager.. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group the template will be deployed to. The name - /// is case insensitive. - /// - /// - /// The name of the deployment. - /// - /// - /// Parameters to validate. - /// - public static DeploymentValidateResult Validate(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName, Deployment parameters) - { - return operations.ValidateAsync(resourceGroupName, deploymentName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Validates whether the specified template is syntactically correct and will - /// be accepted by Azure Resource Manager.. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group the template will be deployed to. The name - /// is case insensitive. - /// - /// - /// The name of the deployment. - /// - /// - /// Parameters to validate. - /// - /// - /// The cancellation token. - /// - public static async Task ValidateAsync(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName, Deployment parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ValidateWithHttpMessagesAsync(resourceGroupName, deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Returns changes that will be made by the deployment if executed at the - /// scope of the resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group the template will be deployed to. The name - /// is case insensitive. - /// - /// - /// The name of the deployment. - /// - /// - /// Parameters to validate. - /// - public static WhatIfOperationResult WhatIf(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName, DeploymentWhatIf parameters) - { - return operations.WhatIfAsync(resourceGroupName, deploymentName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Returns changes that will be made by the deployment if executed at the - /// scope of the resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group the template will be deployed to. The name - /// is case insensitive. - /// - /// - /// The name of the deployment. - /// - /// - /// Parameters to validate. - /// - /// - /// The cancellation token. - /// - public static async Task WhatIfAsync(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName, DeploymentWhatIf parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.WhatIfWithHttpMessagesAsync(resourceGroupName, deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Exports the template used for specified deployment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the deployment. - /// - public static DeploymentExportResult ExportTemplate(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName) - { - return operations.ExportTemplateAsync(resourceGroupName, deploymentName).GetAwaiter().GetResult(); - } - - /// - /// Exports the template used for specified deployment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the deployment. - /// - /// - /// The cancellation token. - /// - public static async Task ExportTemplateAsync(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ExportTemplateWithHttpMessagesAsync(resourceGroupName, deploymentName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all the deployments for a resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group with the deployments to get. The name is - /// case insensitive. - /// - /// - /// OData parameters to apply to the operation. - /// - public static IPage ListByResourceGroup(this IDeploymentsOperations operations, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery)) - { - return operations.ListByResourceGroupAsync(resourceGroupName, odataQuery).GetAwaiter().GetResult(); - } - - /// - /// Get all the deployments for a resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group with the deployments to get. The name is - /// case insensitive. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByResourceGroupAsync(this IDeploymentsOperations operations, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, odataQuery, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Calculate the hash of the given template. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The template provided to calculate hash. - /// - public static TemplateHashResult CalculateTemplateHash(this IDeploymentsOperations operations, object template) - { - return operations.CalculateTemplateHashAsync(template).GetAwaiter().GetResult(); - } - - /// - /// Calculate the hash of the given template. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The template provided to calculate hash. - /// - /// - /// The cancellation token. - /// - public static async Task CalculateTemplateHashAsync(this IDeploymentsOperations operations, object template, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CalculateTemplateHashWithHttpMessagesAsync(template, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a deployment from the deployment history. - /// - /// - /// A template deployment that is currently running cannot be deleted. Deleting - /// a template deployment removes the associated deployment operations. This is - /// an asynchronous operation that returns a status of 202 until the template - /// deployment is successfully deleted. The Location response header contains - /// the URI that is used to obtain the status of the process. While the process - /// is running, a call to the URI in the Location header returns a status of - /// 202. When the process finishes, the URI in the Location header returns a - /// status of 204 on success. If the asynchronous request failed, the URI in - /// the Location header returns an error-level status code. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The resource scope. - /// - /// - /// The name of the deployment. - /// - public static void BeginDeleteAtScope(this IDeploymentsOperations operations, string scope, string deploymentName) - { - operations.BeginDeleteAtScopeAsync(scope, deploymentName).GetAwaiter().GetResult(); - } - - /// - /// Deletes a deployment from the deployment history. - /// - /// - /// A template deployment that is currently running cannot be deleted. Deleting - /// a template deployment removes the associated deployment operations. This is - /// an asynchronous operation that returns a status of 202 until the template - /// deployment is successfully deleted. The Location response header contains - /// the URI that is used to obtain the status of the process. While the process - /// is running, a call to the URI in the Location header returns a status of - /// 202. When the process finishes, the URI in the Location header returns a - /// status of 204 on success. If the asynchronous request failed, the URI in - /// the Location header returns an error-level status code. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The resource scope. - /// - /// - /// The name of the deployment. - /// - /// - /// The cancellation token. - /// - public static async Task BeginDeleteAtScopeAsync(this IDeploymentsOperations operations, string scope, string deploymentName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginDeleteAtScopeWithHttpMessagesAsync(scope, deploymentName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Deploys resources at a given scope. - /// - /// - /// You can provide the template and parameters directly in the request or link - /// to JSON files. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The resource scope. - /// - /// - /// The name of the deployment. - /// - /// - /// Additional parameters supplied to the operation. - /// - public static DeploymentExtended BeginCreateOrUpdateAtScope(this IDeploymentsOperations operations, string scope, string deploymentName, Deployment parameters) - { - return operations.BeginCreateOrUpdateAtScopeAsync(scope, deploymentName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Deploys resources at a given scope. - /// - /// - /// You can provide the template and parameters directly in the request or link - /// to JSON files. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The resource scope. - /// - /// - /// The name of the deployment. - /// - /// - /// Additional parameters supplied to the operation. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateOrUpdateAtScopeAsync(this IDeploymentsOperations operations, string scope, string deploymentName, Deployment parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCreateOrUpdateAtScopeWithHttpMessagesAsync(scope, deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Validates whether the specified template is syntactically correct and will - /// be accepted by Azure Resource Manager.. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The resource scope. - /// - /// - /// The name of the deployment. - /// - /// - /// Parameters to validate. - /// - public static DeploymentValidateResult BeginValidateAtScope(this IDeploymentsOperations operations, string scope, string deploymentName, Deployment parameters) - { - return operations.BeginValidateAtScopeAsync(scope, deploymentName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Validates whether the specified template is syntactically correct and will - /// be accepted by Azure Resource Manager.. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The resource scope. - /// - /// - /// The name of the deployment. - /// - /// - /// Parameters to validate. - /// - /// - /// The cancellation token. - /// - public static async Task BeginValidateAtScopeAsync(this IDeploymentsOperations operations, string scope, string deploymentName, Deployment parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginValidateAtScopeWithHttpMessagesAsync(scope, deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a deployment from the deployment history. - /// - /// - /// A template deployment that is currently running cannot be deleted. Deleting - /// a template deployment removes the associated deployment operations. This is - /// an asynchronous operation that returns a status of 202 until the template - /// deployment is successfully deleted. The Location response header contains - /// the URI that is used to obtain the status of the process. While the process - /// is running, a call to the URI in the Location header returns a status of - /// 202. When the process finishes, the URI in the Location header returns a - /// status of 204 on success. If the asynchronous request failed, the URI in - /// the Location header returns an error-level status code. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - public static void BeginDeleteAtTenantScope(this IDeploymentsOperations operations, string deploymentName) - { - operations.BeginDeleteAtTenantScopeAsync(deploymentName).GetAwaiter().GetResult(); - } - - /// - /// Deletes a deployment from the deployment history. - /// - /// - /// A template deployment that is currently running cannot be deleted. Deleting - /// a template deployment removes the associated deployment operations. This is - /// an asynchronous operation that returns a status of 202 until the template - /// deployment is successfully deleted. The Location response header contains - /// the URI that is used to obtain the status of the process. While the process - /// is running, a call to the URI in the Location header returns a status of - /// 202. When the process finishes, the URI in the Location header returns a - /// status of 204 on success. If the asynchronous request failed, the URI in - /// the Location header returns an error-level status code. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - /// - /// The cancellation token. - /// - public static async Task BeginDeleteAtTenantScopeAsync(this IDeploymentsOperations operations, string deploymentName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginDeleteAtTenantScopeWithHttpMessagesAsync(deploymentName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Deploys resources at tenant scope. - /// - /// - /// You can provide the template and parameters directly in the request or link - /// to JSON files. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - /// - /// Additional parameters supplied to the operation. - /// - public static DeploymentExtended BeginCreateOrUpdateAtTenantScope(this IDeploymentsOperations operations, string deploymentName, ScopedDeployment parameters) - { - return operations.BeginCreateOrUpdateAtTenantScopeAsync(deploymentName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Deploys resources at tenant scope. - /// - /// - /// You can provide the template and parameters directly in the request or link - /// to JSON files. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - /// - /// Additional parameters supplied to the operation. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateOrUpdateAtTenantScopeAsync(this IDeploymentsOperations operations, string deploymentName, ScopedDeployment parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCreateOrUpdateAtTenantScopeWithHttpMessagesAsync(deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Validates whether the specified template is syntactically correct and will - /// be accepted by Azure Resource Manager.. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - /// - /// Parameters to validate. - /// - public static DeploymentValidateResult BeginValidateAtTenantScope(this IDeploymentsOperations operations, string deploymentName, ScopedDeployment parameters) - { - return operations.BeginValidateAtTenantScopeAsync(deploymentName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Validates whether the specified template is syntactically correct and will - /// be accepted by Azure Resource Manager.. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - /// - /// Parameters to validate. - /// - /// - /// The cancellation token. - /// - public static async Task BeginValidateAtTenantScopeAsync(this IDeploymentsOperations operations, string deploymentName, ScopedDeployment parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginValidateAtTenantScopeWithHttpMessagesAsync(deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Returns changes that will be made by the deployment if executed at the - /// scope of the tenant group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - /// - /// Parameters to validate. - /// - public static WhatIfOperationResult BeginWhatIfAtTenantScope(this IDeploymentsOperations operations, string deploymentName, ScopedDeploymentWhatIf parameters) - { - return operations.BeginWhatIfAtTenantScopeAsync(deploymentName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Returns changes that will be made by the deployment if executed at the - /// scope of the tenant group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - /// - /// Parameters to validate. - /// - /// - /// The cancellation token. - /// - public static async Task BeginWhatIfAtTenantScopeAsync(this IDeploymentsOperations operations, string deploymentName, ScopedDeploymentWhatIf parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginWhatIfAtTenantScopeWithHttpMessagesAsync(deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a deployment from the deployment history. - /// - /// - /// A template deployment that is currently running cannot be deleted. Deleting - /// a template deployment removes the associated deployment operations. This is - /// an asynchronous operation that returns a status of 202 until the template - /// deployment is successfully deleted. The Location response header contains - /// the URI that is used to obtain the status of the process. While the process - /// is running, a call to the URI in the Location header returns a status of - /// 202. When the process finishes, the URI in the Location header returns a - /// status of 204 on success. If the asynchronous request failed, the URI in - /// the Location header returns an error-level status code. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The management group ID. - /// - /// - /// The name of the deployment. - /// - public static void BeginDeleteAtManagementGroupScope(this IDeploymentsOperations operations, string groupId, string deploymentName) - { - operations.BeginDeleteAtManagementGroupScopeAsync(groupId, deploymentName).GetAwaiter().GetResult(); - } - - /// - /// Deletes a deployment from the deployment history. - /// - /// - /// A template deployment that is currently running cannot be deleted. Deleting - /// a template deployment removes the associated deployment operations. This is - /// an asynchronous operation that returns a status of 202 until the template - /// deployment is successfully deleted. The Location response header contains - /// the URI that is used to obtain the status of the process. While the process - /// is running, a call to the URI in the Location header returns a status of - /// 202. When the process finishes, the URI in the Location header returns a - /// status of 204 on success. If the asynchronous request failed, the URI in - /// the Location header returns an error-level status code. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The management group ID. - /// - /// - /// The name of the deployment. - /// - /// - /// The cancellation token. - /// - public static async Task BeginDeleteAtManagementGroupScopeAsync(this IDeploymentsOperations operations, string groupId, string deploymentName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginDeleteAtManagementGroupScopeWithHttpMessagesAsync(groupId, deploymentName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Deploys resources at management group scope. - /// - /// - /// You can provide the template and parameters directly in the request or link - /// to JSON files. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The management group ID. - /// - /// - /// The name of the deployment. - /// - /// - /// Additional parameters supplied to the operation. - /// - public static DeploymentExtended BeginCreateOrUpdateAtManagementGroupScope(this IDeploymentsOperations operations, string groupId, string deploymentName, ScopedDeployment parameters) - { - return operations.BeginCreateOrUpdateAtManagementGroupScopeAsync(groupId, deploymentName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Deploys resources at management group scope. - /// - /// - /// You can provide the template and parameters directly in the request or link - /// to JSON files. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The management group ID. - /// - /// - /// The name of the deployment. - /// - /// - /// Additional parameters supplied to the operation. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateOrUpdateAtManagementGroupScopeAsync(this IDeploymentsOperations operations, string groupId, string deploymentName, ScopedDeployment parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCreateOrUpdateAtManagementGroupScopeWithHttpMessagesAsync(groupId, deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Validates whether the specified template is syntactically correct and will - /// be accepted by Azure Resource Manager.. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The management group ID. - /// - /// - /// The name of the deployment. - /// - /// - /// Parameters to validate. - /// - public static DeploymentValidateResult BeginValidateAtManagementGroupScope(this IDeploymentsOperations operations, string groupId, string deploymentName, ScopedDeployment parameters) - { - return operations.BeginValidateAtManagementGroupScopeAsync(groupId, deploymentName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Validates whether the specified template is syntactically correct and will - /// be accepted by Azure Resource Manager.. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The management group ID. - /// - /// - /// The name of the deployment. - /// - /// - /// Parameters to validate. - /// - /// - /// The cancellation token. - /// - public static async Task BeginValidateAtManagementGroupScopeAsync(this IDeploymentsOperations operations, string groupId, string deploymentName, ScopedDeployment parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginValidateAtManagementGroupScopeWithHttpMessagesAsync(groupId, deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Returns changes that will be made by the deployment if executed at the - /// scope of the management group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The management group ID. - /// - /// - /// The name of the deployment. - /// - /// - /// Parameters to validate. - /// - public static WhatIfOperationResult BeginWhatIfAtManagementGroupScope(this IDeploymentsOperations operations, string groupId, string deploymentName, ScopedDeploymentWhatIf parameters) - { - return operations.BeginWhatIfAtManagementGroupScopeAsync(groupId, deploymentName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Returns changes that will be made by the deployment if executed at the - /// scope of the management group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The management group ID. - /// - /// - /// The name of the deployment. - /// - /// - /// Parameters to validate. - /// - /// - /// The cancellation token. - /// - public static async Task BeginWhatIfAtManagementGroupScopeAsync(this IDeploymentsOperations operations, string groupId, string deploymentName, ScopedDeploymentWhatIf parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginWhatIfAtManagementGroupScopeWithHttpMessagesAsync(groupId, deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a deployment from the deployment history. - /// - /// - /// A template deployment that is currently running cannot be deleted. Deleting - /// a template deployment removes the associated deployment operations. This is - /// an asynchronous operation that returns a status of 202 until the template - /// deployment is successfully deleted. The Location response header contains - /// the URI that is used to obtain the status of the process. While the process - /// is running, a call to the URI in the Location header returns a status of - /// 202. When the process finishes, the URI in the Location header returns a - /// status of 204 on success. If the asynchronous request failed, the URI in - /// the Location header returns an error-level status code. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - public static void BeginDeleteAtSubscriptionScope(this IDeploymentsOperations operations, string deploymentName) - { - operations.BeginDeleteAtSubscriptionScopeAsync(deploymentName).GetAwaiter().GetResult(); - } - - /// - /// Deletes a deployment from the deployment history. - /// - /// - /// A template deployment that is currently running cannot be deleted. Deleting - /// a template deployment removes the associated deployment operations. This is - /// an asynchronous operation that returns a status of 202 until the template - /// deployment is successfully deleted. The Location response header contains - /// the URI that is used to obtain the status of the process. While the process - /// is running, a call to the URI in the Location header returns a status of - /// 202. When the process finishes, the URI in the Location header returns a - /// status of 204 on success. If the asynchronous request failed, the URI in - /// the Location header returns an error-level status code. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - /// - /// The cancellation token. - /// - public static async Task BeginDeleteAtSubscriptionScopeAsync(this IDeploymentsOperations operations, string deploymentName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginDeleteAtSubscriptionScopeWithHttpMessagesAsync(deploymentName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Deploys resources at subscription scope. - /// - /// - /// You can provide the template and parameters directly in the request or link - /// to JSON files. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - /// - /// Additional parameters supplied to the operation. - /// - public static DeploymentExtended BeginCreateOrUpdateAtSubscriptionScope(this IDeploymentsOperations operations, string deploymentName, Deployment parameters) - { - return operations.BeginCreateOrUpdateAtSubscriptionScopeAsync(deploymentName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Deploys resources at subscription scope. - /// - /// - /// You can provide the template and parameters directly in the request or link - /// to JSON files. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - /// - /// Additional parameters supplied to the operation. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateOrUpdateAtSubscriptionScopeAsync(this IDeploymentsOperations operations, string deploymentName, Deployment parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCreateOrUpdateAtSubscriptionScopeWithHttpMessagesAsync(deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Validates whether the specified template is syntactically correct and will - /// be accepted by Azure Resource Manager.. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - /// - /// Parameters to validate. - /// - public static DeploymentValidateResult BeginValidateAtSubscriptionScope(this IDeploymentsOperations operations, string deploymentName, Deployment parameters) - { - return operations.BeginValidateAtSubscriptionScopeAsync(deploymentName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Validates whether the specified template is syntactically correct and will - /// be accepted by Azure Resource Manager.. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - /// - /// Parameters to validate. - /// - /// - /// The cancellation token. - /// - public static async Task BeginValidateAtSubscriptionScopeAsync(this IDeploymentsOperations operations, string deploymentName, Deployment parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginValidateAtSubscriptionScopeWithHttpMessagesAsync(deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Returns changes that will be made by the deployment if executed at the - /// scope of the subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - /// - /// Parameters to What If. - /// - public static WhatIfOperationResult BeginWhatIfAtSubscriptionScope(this IDeploymentsOperations operations, string deploymentName, DeploymentWhatIf parameters) - { - return operations.BeginWhatIfAtSubscriptionScopeAsync(deploymentName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Returns changes that will be made by the deployment if executed at the - /// scope of the subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the deployment. - /// - /// - /// Parameters to What If. - /// - /// - /// The cancellation token. - /// - public static async Task BeginWhatIfAtSubscriptionScopeAsync(this IDeploymentsOperations operations, string deploymentName, DeploymentWhatIf parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginWhatIfAtSubscriptionScopeWithHttpMessagesAsync(deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a deployment from the deployment history. - /// - /// - /// A template deployment that is currently running cannot be deleted. Deleting - /// a template deployment removes the associated deployment operations. - /// Deleting a template deployment does not affect the state of the resource - /// group. This is an asynchronous operation that returns a status of 202 until - /// the template deployment is successfully deleted. The Location response - /// header contains the URI that is used to obtain the status of the process. - /// While the process is running, a call to the URI in the Location header - /// returns a status of 202. When the process finishes, the URI in the Location - /// header returns a status of 204 on success. If the asynchronous request - /// failed, the URI in the Location header returns an error-level status code. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group with the deployment to delete. The name is - /// case insensitive. - /// - /// - /// The name of the deployment. - /// - public static void BeginDelete(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName) - { - operations.BeginDeleteAsync(resourceGroupName, deploymentName).GetAwaiter().GetResult(); - } - - /// - /// Deletes a deployment from the deployment history. - /// - /// - /// A template deployment that is currently running cannot be deleted. Deleting - /// a template deployment removes the associated deployment operations. - /// Deleting a template deployment does not affect the state of the resource - /// group. This is an asynchronous operation that returns a status of 202 until - /// the template deployment is successfully deleted. The Location response - /// header contains the URI that is used to obtain the status of the process. - /// While the process is running, a call to the URI in the Location header - /// returns a status of 202. When the process finishes, the URI in the Location - /// header returns a status of 204 on success. If the asynchronous request - /// failed, the URI in the Location header returns an error-level status code. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group with the deployment to delete. The name is - /// case insensitive. - /// - /// - /// The name of the deployment. - /// - /// - /// The cancellation token. - /// - public static async Task BeginDeleteAsync(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, deploymentName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Deploys resources to a resource group. - /// - /// - /// You can provide the template and parameters directly in the request or link - /// to JSON files. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group to deploy the resources to. The name is case - /// insensitive. The resource group must already exist. - /// - /// - /// The name of the deployment. - /// - /// - /// Additional parameters supplied to the operation. - /// - public static DeploymentExtended BeginCreateOrUpdate(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName, Deployment parameters) - { - return operations.BeginCreateOrUpdateAsync(resourceGroupName, deploymentName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Deploys resources to a resource group. - /// - /// - /// You can provide the template and parameters directly in the request or link - /// to JSON files. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group to deploy the resources to. The name is case - /// insensitive. The resource group must already exist. - /// - /// - /// The name of the deployment. - /// - /// - /// Additional parameters supplied to the operation. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateOrUpdateAsync(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName, Deployment parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Validates whether the specified template is syntactically correct and will - /// be accepted by Azure Resource Manager.. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group the template will be deployed to. The name - /// is case insensitive. - /// - /// - /// The name of the deployment. - /// - /// - /// Parameters to validate. - /// - public static DeploymentValidateResult BeginValidate(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName, Deployment parameters) - { - return operations.BeginValidateAsync(resourceGroupName, deploymentName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Validates whether the specified template is syntactically correct and will - /// be accepted by Azure Resource Manager.. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group the template will be deployed to. The name - /// is case insensitive. - /// - /// - /// The name of the deployment. - /// - /// - /// Parameters to validate. - /// - /// - /// The cancellation token. - /// - public static async Task BeginValidateAsync(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName, Deployment parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginValidateWithHttpMessagesAsync(resourceGroupName, deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Returns changes that will be made by the deployment if executed at the - /// scope of the resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group the template will be deployed to. The name - /// is case insensitive. - /// - /// - /// The name of the deployment. - /// - /// - /// Parameters to validate. - /// - public static WhatIfOperationResult BeginWhatIf(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName, DeploymentWhatIf parameters) - { - return operations.BeginWhatIfAsync(resourceGroupName, deploymentName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Returns changes that will be made by the deployment if executed at the - /// scope of the resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group the template will be deployed to. The name - /// is case insensitive. - /// - /// - /// The name of the deployment. - /// - /// - /// Parameters to validate. - /// - /// - /// The cancellation token. - /// - public static async Task BeginWhatIfAsync(this IDeploymentsOperations operations, string resourceGroupName, string deploymentName, DeploymentWhatIf parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginWhatIfWithHttpMessagesAsync(resourceGroupName, deploymentName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all the deployments at the given scope. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListAtScopeNext(this IDeploymentsOperations operations, string nextPageLink) - { - return operations.ListAtScopeNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get all the deployments at the given scope. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAtScopeNextAsync(this IDeploymentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListAtScopeNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all the deployments at the tenant scope. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListAtTenantScopeNext(this IDeploymentsOperations operations, string nextPageLink) - { - return operations.ListAtTenantScopeNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get all the deployments at the tenant scope. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAtTenantScopeNextAsync(this IDeploymentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListAtTenantScopeNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all the deployments for a management group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListAtManagementGroupScopeNext(this IDeploymentsOperations operations, string nextPageLink) - { - return operations.ListAtManagementGroupScopeNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get all the deployments for a management group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAtManagementGroupScopeNextAsync(this IDeploymentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListAtManagementGroupScopeNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all the deployments for a subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListAtSubscriptionScopeNext(this IDeploymentsOperations operations, string nextPageLink) - { - return operations.ListAtSubscriptionScopeNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get all the deployments for a subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAtSubscriptionScopeNextAsync(this IDeploymentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListAtSubscriptionScopeNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all the deployments for a resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListByResourceGroupNext(this IDeploymentsOperations operations, string nextPageLink) - { - return operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get all the deployments for a resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByResourceGroupNextAsync(this IDeploymentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/src/Resources/Resources.Sdk/Generated/FeatureClientExtensions.cs b/src/Resources/Resources.Sdk/Generated/FeatureClientExtensions.cs deleted file mode 100644 index 540df4d86502..000000000000 --- a/src/Resources/Resources.Sdk/Generated/FeatureClientExtensions.cs +++ /dev/null @@ -1,87 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for FeatureClient. - /// - public static partial class FeatureClientExtensions - { - /// - /// Lists all of the available Microsoft.Features REST API operations. - /// - /// - /// The operations group for this extension method. - /// - public static IPage ListOperations(this IFeatureClient operations) - { - return operations.ListOperationsAsync().GetAwaiter().GetResult(); - } - - /// - /// Lists all of the available Microsoft.Features REST API operations. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListOperationsAsync(this IFeatureClient operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListOperationsWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Lists all of the available Microsoft.Features REST API operations. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListOperationsNext(this IFeatureClient operations, string nextPageLink) - { - return operations.ListOperationsNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Lists all of the available Microsoft.Features REST API operations. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListOperationsNextAsync(this IFeatureClient operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListOperationsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/src/Resources/Resources.Sdk/Generated/FeaturesOperationsExtensions.cs b/src/Resources/Resources.Sdk/Generated/FeaturesOperationsExtensions.cs deleted file mode 100644 index 65f6f564dadf..000000000000 --- a/src/Resources/Resources.Sdk/Generated/FeaturesOperationsExtensions.cs +++ /dev/null @@ -1,283 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for FeaturesOperations. - /// - public static partial class FeaturesOperationsExtensions - { - /// - /// Gets all the preview features that are available through AFEC for the - /// subscription. - /// - /// - /// The operations group for this extension method. - /// - public static IPage ListAll(this IFeaturesOperations operations) - { - return operations.ListAllAsync().GetAwaiter().GetResult(); - } - - /// - /// Gets all the preview features that are available through AFEC for the - /// subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAllAsync(this IFeaturesOperations operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListAllWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets all the preview features in a provider namespace that are available - /// through AFEC for the subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The namespace of the resource provider for getting features. - /// - public static IPage List(this IFeaturesOperations operations, string resourceProviderNamespace) - { - return operations.ListAsync(resourceProviderNamespace).GetAwaiter().GetResult(); - } - - /// - /// Gets all the preview features in a provider namespace that are available - /// through AFEC for the subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The namespace of the resource provider for getting features. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IFeaturesOperations operations, string resourceProviderNamespace, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(resourceProviderNamespace, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the preview feature with the specified name. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The resource provider namespace for the feature. - /// - /// - /// The name of the feature to get. - /// - public static FeatureResult Get(this IFeaturesOperations operations, string resourceProviderNamespace, string featureName) - { - return operations.GetAsync(resourceProviderNamespace, featureName).GetAwaiter().GetResult(); - } - - /// - /// Gets the preview feature with the specified name. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The resource provider namespace for the feature. - /// - /// - /// The name of the feature to get. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IFeaturesOperations operations, string resourceProviderNamespace, string featureName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceProviderNamespace, featureName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Registers the preview feature for the subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The namespace of the resource provider. - /// - /// - /// The name of the feature to register. - /// - public static FeatureResult Register(this IFeaturesOperations operations, string resourceProviderNamespace, string featureName) - { - return operations.RegisterAsync(resourceProviderNamespace, featureName).GetAwaiter().GetResult(); - } - - /// - /// Registers the preview feature for the subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The namespace of the resource provider. - /// - /// - /// The name of the feature to register. - /// - /// - /// The cancellation token. - /// - public static async Task RegisterAsync(this IFeaturesOperations operations, string resourceProviderNamespace, string featureName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.RegisterWithHttpMessagesAsync(resourceProviderNamespace, featureName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Unregisters the preview feature for the subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The namespace of the resource provider. - /// - /// - /// The name of the feature to unregister. - /// - public static FeatureResult Unregister(this IFeaturesOperations operations, string resourceProviderNamespace, string featureName) - { - return operations.UnregisterAsync(resourceProviderNamespace, featureName).GetAwaiter().GetResult(); - } - - /// - /// Unregisters the preview feature for the subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The namespace of the resource provider. - /// - /// - /// The name of the feature to unregister. - /// - /// - /// The cancellation token. - /// - public static async Task UnregisterAsync(this IFeaturesOperations operations, string resourceProviderNamespace, string featureName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UnregisterWithHttpMessagesAsync(resourceProviderNamespace, featureName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets all the preview features that are available through AFEC for the - /// subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListAllNext(this IFeaturesOperations operations, string nextPageLink) - { - return operations.ListAllNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets all the preview features that are available through AFEC for the - /// subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAllNextAsync(this IFeaturesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListAllNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets all the preview features in a provider namespace that are available - /// through AFEC for the subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IFeaturesOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets all the preview features in a provider namespace that are available - /// through AFEC for the subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IFeaturesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/src/Resources/Resources.Sdk/Generated/IFeatureClient.cs b/src/Resources/Resources.Sdk/Generated/IFeatureClient.cs deleted file mode 100644 index 1faa100a26e9..000000000000 --- a/src/Resources/Resources.Sdk/Generated/IFeatureClient.cs +++ /dev/null @@ -1,111 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// - public partial interface IFeatureClient : System.IDisposable - { - /// - /// The base URI of the service. - /// - System.Uri BaseUri { get; set; } - - /// - /// Gets or sets json serialization settings. - /// - JsonSerializerSettings SerializationSettings { get; } - - /// - /// Gets or sets json deserialization settings. - /// - JsonSerializerSettings DeserializationSettings { get; } - - /// - /// Credentials needed for the client to connect to Azure. - /// - ServiceClientCredentials Credentials { get; } - - /// - /// The Azure subscription ID. - /// - string SubscriptionId { get; set; } - - /// - /// The API version to use for this operation. - /// - string ApiVersion { get; } - - /// - /// The preferred language for the response. - /// - string AcceptLanguage { get; set; } - - /// - /// The retry timeout in seconds for Long Running Operations. Default - /// value is 30. - /// - int? LongRunningOperationRetryTimeout { get; set; } - - /// - /// Whether a unique x-ms-client-request-id should be generated. When - /// set to true a unique x-ms-client-request-id value is generated and - /// included in each request. Default is true. - /// - bool? GenerateClientRequestId { get; set; } - - - /// - /// Gets the IFeaturesOperations. - /// - IFeaturesOperations Features { get; } - - /// - /// Gets the ISubscriptionFeatureRegistrationsOperations. - /// - ISubscriptionFeatureRegistrationsOperations SubscriptionFeatureRegistrations { get; } - - /// - /// Lists all of the available Microsoft.Features REST API operations. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - Task>> ListOperationsWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Lists all of the available Microsoft.Features REST API operations. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - Task>> ListOperationsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - - } -} diff --git a/src/Resources/Resources.Sdk/Generated/ITagsOperations.cs b/src/Resources/Resources.Sdk/Generated/ITagsOperations.cs deleted file mode 100644 index 5557b50a7878..000000000000 --- a/src/Resources/Resources.Sdk/Generated/ITagsOperations.cs +++ /dev/null @@ -1,299 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// TagsOperations operations. - /// - public partial interface ITagsOperations - { - /// - /// Deletes a predefined tag value for a predefined tag name. - /// - /// - /// This operation allows deleting a value from the list of predefined - /// values for an existing predefined tag name. The value being deleted - /// must not be in use as a tag value for the given tag name for any - /// resource. - /// - /// - /// The name of the tag. - /// - /// - /// The value of the tag to delete. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteValueWithHttpMessagesAsync(string tagName, string tagValue, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates a predefined value for a predefined tag name. - /// - /// - /// This operation allows adding a value to the list of predefined - /// values for an existing predefined tag name. A tag value can have a - /// maximum of 256 characters. - /// - /// - /// The name of the tag. - /// - /// - /// The value of the tag to create. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateOrUpdateValueWithHttpMessagesAsync(string tagName, string tagValue, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates a predefined tag name. - /// - /// - /// This operation allows adding a name to the list of predefined tag - /// names for the given subscription. A tag name can have a maximum of - /// 512 characters and is case-insensitive. Tag names cannot have the - /// following prefixes which are reserved for Azure use: 'microsoft', - /// 'azure', 'windows'. - /// - /// - /// The name of the tag to create. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateOrUpdateWithHttpMessagesAsync(string tagName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes a predefined tag name. - /// - /// - /// This operation allows deleting a name from the list of predefined - /// tag names for the given subscription. The name being deleted must - /// not be in use as a tag name for any resource. All predefined values - /// for the given name must have already been deleted. - /// - /// - /// The name of the tag. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteWithHttpMessagesAsync(string tagName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a summary of tag usage under the subscription. - /// - /// - /// This operation performs a union of predefined tags, resource tags, - /// resource group tags and subscription tags, and returns a summary of - /// usage for each tag name and value under the given subscription. In - /// case of a large number of tags, this operation may return a - /// previously cached result. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates or updates the entire set of tags on a resource or - /// subscription. - /// - /// - /// This operation allows adding or replacing the entire set of tags on - /// the specified resource or subscription. The specified entity can - /// have a maximum of 50 tags. - /// - /// - /// The resource scope. - /// - /// - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateOrUpdateAtScopeWithHttpMessagesAsync(string scope, TagsResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Selectively updates the set of tags on a resource or subscription. - /// - /// - /// This operation allows replacing, merging or selectively deleting - /// tags on the specified resource or subscription. The specified - /// entity can have a maximum of 50 tags at the end of the operation. - /// The 'replace' option replaces the entire set of existing tags with - /// a new set. The 'merge' option allows adding tags with new names and - /// updating the values of tags with existing names. The 'delete' - /// option allows selectively deleting tags based on given names or - /// name/value pairs. - /// - /// - /// The resource scope. - /// - /// - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> UpdateAtScopeWithHttpMessagesAsync(string scope, TagsPatchResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the entire set of tags on a resource or subscription. - /// - /// - /// The resource scope. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> GetAtScopeWithHttpMessagesAsync(string scope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes the entire set of tags on a resource or subscription. - /// - /// - /// The resource scope. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteAtScopeWithHttpMessagesAsync(string scope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a summary of tag usage under the subscription. - /// - /// - /// This operation performs a union of predefined tags, resource tags, - /// resource group tags and subscription tags, and returns a summary of - /// usage for each tag name and value under the given subscription. In - /// case of a large number of tags, this operation may return a - /// previously cached result. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/src/Resources/Resources.Sdk/Generated/Models/Alias.cs b/src/Resources/Resources.Sdk/Generated/Models/Alias.cs deleted file mode 100644 index 7ab83c96e4f1..000000000000 --- a/src/Resources/Resources.Sdk/Generated/Models/Alias.cs +++ /dev/null @@ -1,99 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// The alias type. - /// - public partial class Alias - { - /// - /// Initializes a new instance of the Alias class. - /// - public Alias() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Alias class. - /// - /// The alias name. - /// The paths for an alias. - /// The type of the alias. Possible values include: - /// 'NotSpecified', 'PlainText', 'Mask' - /// The default path for an alias. - /// The default pattern for an - /// alias. - /// The default alias path metadata. - /// Applies to the default path and to any alias path that doesn't have - /// metadata - public Alias(string name = default(string), IList paths = default(IList), AliasType? type = default(AliasType?), string defaultPath = default(string), AliasPattern defaultPattern = default(AliasPattern), AliasPathMetadata defaultMetadata = default(AliasPathMetadata)) - { - Name = name; - Paths = paths; - Type = type; - DefaultPath = defaultPath; - DefaultPattern = defaultPattern; - DefaultMetadata = defaultMetadata; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the alias name. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets the paths for an alias. - /// - [JsonProperty(PropertyName = "paths")] - public IList Paths { get; set; } - - /// - /// Gets or sets the type of the alias. Possible values include: - /// 'NotSpecified', 'PlainText', 'Mask' - /// - [JsonProperty(PropertyName = "type")] - public AliasType? Type { get; set; } - - /// - /// Gets or sets the default path for an alias. - /// - [JsonProperty(PropertyName = "defaultPath")] - public string DefaultPath { get; set; } - - /// - /// Gets or sets the default pattern for an alias. - /// - [JsonProperty(PropertyName = "defaultPattern")] - public AliasPattern DefaultPattern { get; set; } - - /// - /// Gets the default alias path metadata. Applies to the default path - /// and to any alias path that doesn't have metadata - /// - [JsonProperty(PropertyName = "defaultMetadata")] - public AliasPathMetadata DefaultMetadata { get; private set; } - - } -} diff --git a/src/Resources/Resources.Sdk/Generated/Models/AzureCliScript.cs b/src/Resources/Resources.Sdk/Generated/Models/AzureCliScript.cs deleted file mode 100644 index 0ab8db603065..000000000000 --- a/src/Resources/Resources.Sdk/Generated/Models/AzureCliScript.cs +++ /dev/null @@ -1,244 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Object model for the Azure CLI script. - /// - [Newtonsoft.Json.JsonObject("AzureCLI")] - [Rest.Serialization.JsonTransformation] - public partial class AzureCliScript : DeploymentScript - { - /// - /// Initializes a new instance of the AzureCliScript class. - /// - public AzureCliScript() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AzureCliScript class. - /// - /// The location of the ACI and the storage - /// account for the deployment script. - /// Interval for which the service - /// retains the script resource after it reaches a terminal state. - /// Resource will be deleted when this duration expires. Duration is - /// based on ISO 8601 pattern (for example P1D means one day). - /// Azure CLI module version to be - /// used. - /// String Id used to locate any resource on - /// Azure. - /// Name of this resource. - /// Type of this resource. - /// Optional property. Managed identity to be - /// used for this deployment script. Currently, only user-assigned MSI - /// is supported. - /// Resource tags. - /// The system metadata related to this - /// resource. - /// Container settings. - /// Storage Account - /// settings. - /// The clean up preference when the - /// script execution gets in a terminal state. Default setting is - /// 'Always'. Possible values include: 'Always', 'OnSuccess', - /// 'OnExpiration' - /// State of the script execution. This - /// only appears in the response. Possible values include: 'Creating', - /// 'ProvisioningResources', 'Running', 'Succeeded', 'Failed', - /// 'Canceled' - /// Contains the results of script - /// execution. - /// List of script outputs. - /// Uri for the script. This is the - /// entry point for the external script. - /// Supporting files for the - /// external script. - /// Script body. - /// Command line arguments to pass to the - /// script. Arguments are separated by spaces. ex: -Name blue* - /// -Location 'West US 2' - /// The environment variables to - /// pass over to the script. - /// Gets or sets how the deployment script - /// should be forced to execute even if the script resource has not - /// changed. Can be current time stamp or a GUID. - /// Maximum allowed script execution time - /// specified in ISO 8601 format. Default value is P1D - public AzureCliScript(string location, System.TimeSpan retentionInterval, string azCliVersion, string id = default(string), string name = default(string), string type = default(string), ManagedServiceIdentity identity = default(ManagedServiceIdentity), IDictionary tags = default(IDictionary), SystemData systemData = default(SystemData), ContainerConfiguration containerSettings = default(ContainerConfiguration), StorageAccountConfiguration storageAccountSettings = default(StorageAccountConfiguration), string cleanupPreference = default(string), string provisioningState = default(string), ScriptStatus status = default(ScriptStatus), IDictionary outputs = default(IDictionary), string primaryScriptUri = default(string), IList supportingScriptUris = default(IList), string scriptContent = default(string), string arguments = default(string), IList environmentVariables = default(IList), string forceUpdateTag = default(string), System.TimeSpan? timeout = default(System.TimeSpan?)) - : base(location, id, name, type, identity, tags, systemData) - { - ContainerSettings = containerSettings; - StorageAccountSettings = storageAccountSettings; - CleanupPreference = cleanupPreference; - ProvisioningState = provisioningState; - Status = status; - Outputs = outputs; - PrimaryScriptUri = primaryScriptUri; - SupportingScriptUris = supportingScriptUris; - ScriptContent = scriptContent; - Arguments = arguments; - EnvironmentVariables = environmentVariables; - ForceUpdateTag = forceUpdateTag; - RetentionInterval = retentionInterval; - Timeout = timeout; - AzCliVersion = azCliVersion; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets container settings. - /// - [JsonProperty(PropertyName = "properties.containerSettings")] - public ContainerConfiguration ContainerSettings { get; set; } - - /// - /// Gets or sets storage Account settings. - /// - [JsonProperty(PropertyName = "properties.storageAccountSettings")] - public StorageAccountConfiguration StorageAccountSettings { get; set; } - - /// - /// Gets or sets the clean up preference when the script execution gets - /// in a terminal state. Default setting is 'Always'. Possible values - /// include: 'Always', 'OnSuccess', 'OnExpiration' - /// - [JsonProperty(PropertyName = "properties.cleanupPreference")] - public string CleanupPreference { get; set; } - - /// - /// Gets state of the script execution. This only appears in the - /// response. Possible values include: 'Creating', - /// 'ProvisioningResources', 'Running', 'Succeeded', 'Failed', - /// 'Canceled' - /// - [JsonProperty(PropertyName = "properties.provisioningState")] - public string ProvisioningState { get; private set; } - - /// - /// Gets contains the results of script execution. - /// - [JsonProperty(PropertyName = "properties.status")] - public ScriptStatus Status { get; private set; } - - /// - /// Gets list of script outputs. - /// - [JsonProperty(PropertyName = "properties.outputs")] - public IDictionary Outputs { get; private set; } - - /// - /// Gets or sets uri for the script. This is the entry point for the - /// external script. - /// - [JsonProperty(PropertyName = "properties.primaryScriptUri")] - public string PrimaryScriptUri { get; set; } - - /// - /// Gets or sets supporting files for the external script. - /// - [JsonProperty(PropertyName = "properties.supportingScriptUris")] - public IList SupportingScriptUris { get; set; } - - /// - /// Gets or sets script body. - /// - [JsonProperty(PropertyName = "properties.scriptContent")] - public string ScriptContent { get; set; } - - /// - /// Gets or sets command line arguments to pass to the script. - /// Arguments are separated by spaces. ex: -Name blue* -Location 'West - /// US 2' - /// - [JsonProperty(PropertyName = "properties.arguments")] - public string Arguments { get; set; } - - /// - /// Gets or sets the environment variables to pass over to the script. - /// - [JsonProperty(PropertyName = "properties.environmentVariables")] - public IList EnvironmentVariables { get; set; } - - /// - /// Gets or sets how the deployment script should be forced to execute - /// even if the script resource has not changed. Can be current time - /// stamp or a GUID. - /// - [JsonProperty(PropertyName = "properties.forceUpdateTag")] - public string ForceUpdateTag { get; set; } - - /// - /// Gets or sets interval for which the service retains the script - /// resource after it reaches a terminal state. Resource will be - /// deleted when this duration expires. Duration is based on ISO 8601 - /// pattern (for example P1D means one day). - /// - [JsonProperty(PropertyName = "properties.retentionInterval")] - public System.TimeSpan RetentionInterval { get; set; } - - /// - /// Gets or sets maximum allowed script execution time specified in ISO - /// 8601 format. Default value is P1D - /// - [JsonProperty(PropertyName = "properties.timeout")] - public System.TimeSpan? Timeout { get; set; } - - /// - /// Gets or sets azure CLI module version to be used. - /// - [JsonProperty(PropertyName = "properties.azCliVersion")] - public string AzCliVersion { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - if (AzCliVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "AzCliVersion"); - } - if (ContainerSettings != null) - { - ContainerSettings.Validate(); - } - if (EnvironmentVariables != null) - { - foreach (var element in EnvironmentVariables) - { - if (element != null) - { - element.Validate(); - } - } - } - } - } -} diff --git a/src/Resources/Resources.Sdk/Generated/Models/AzurePowerShellScript.cs b/src/Resources/Resources.Sdk/Generated/Models/AzurePowerShellScript.cs deleted file mode 100644 index 678104696514..000000000000 --- a/src/Resources/Resources.Sdk/Generated/Models/AzurePowerShellScript.cs +++ /dev/null @@ -1,244 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Object model for the Azure PowerShell script. - /// - [Newtonsoft.Json.JsonObject("AzurePowerShell")] - [Rest.Serialization.JsonTransformation] - public partial class AzurePowerShellScript : DeploymentScript - { - /// - /// Initializes a new instance of the AzurePowerShellScript class. - /// - public AzurePowerShellScript() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AzurePowerShellScript class. - /// - /// The location of the ACI and the storage - /// account for the deployment script. - /// Interval for which the service - /// retains the script resource after it reaches a terminal state. - /// Resource will be deleted when this duration expires. Duration is - /// based on ISO 8601 pattern (for example P1D means one day). - /// Azure PowerShell module version - /// to be used. - /// String Id used to locate any resource on - /// Azure. - /// Name of this resource. - /// Type of this resource. - /// Optional property. Managed identity to be - /// used for this deployment script. Currently, only user-assigned MSI - /// is supported. - /// Resource tags. - /// The system metadata related to this - /// resource. - /// Container settings. - /// Storage Account - /// settings. - /// The clean up preference when the - /// script execution gets in a terminal state. Default setting is - /// 'Always'. Possible values include: 'Always', 'OnSuccess', - /// 'OnExpiration' - /// State of the script execution. This - /// only appears in the response. Possible values include: 'Creating', - /// 'ProvisioningResources', 'Running', 'Succeeded', 'Failed', - /// 'Canceled' - /// Contains the results of script - /// execution. - /// List of script outputs. - /// Uri for the script. This is the - /// entry point for the external script. - /// Supporting files for the - /// external script. - /// Script body. - /// Command line arguments to pass to the - /// script. Arguments are separated by spaces. ex: -Name blue* - /// -Location 'West US 2' - /// The environment variables to - /// pass over to the script. - /// Gets or sets how the deployment script - /// should be forced to execute even if the script resource has not - /// changed. Can be current time stamp or a GUID. - /// Maximum allowed script execution time - /// specified in ISO 8601 format. Default value is P1D - public AzurePowerShellScript(string location, System.TimeSpan retentionInterval, string azPowerShellVersion, string id = default(string), string name = default(string), string type = default(string), ManagedServiceIdentity identity = default(ManagedServiceIdentity), IDictionary tags = default(IDictionary), SystemData systemData = default(SystemData), ContainerConfiguration containerSettings = default(ContainerConfiguration), StorageAccountConfiguration storageAccountSettings = default(StorageAccountConfiguration), string cleanupPreference = default(string), string provisioningState = default(string), ScriptStatus status = default(ScriptStatus), IDictionary outputs = default(IDictionary), string primaryScriptUri = default(string), IList supportingScriptUris = default(IList), string scriptContent = default(string), string arguments = default(string), IList environmentVariables = default(IList), string forceUpdateTag = default(string), System.TimeSpan? timeout = default(System.TimeSpan?)) - : base(location, id, name, type, identity, tags, systemData) - { - ContainerSettings = containerSettings; - StorageAccountSettings = storageAccountSettings; - CleanupPreference = cleanupPreference; - ProvisioningState = provisioningState; - Status = status; - Outputs = outputs; - PrimaryScriptUri = primaryScriptUri; - SupportingScriptUris = supportingScriptUris; - ScriptContent = scriptContent; - Arguments = arguments; - EnvironmentVariables = environmentVariables; - ForceUpdateTag = forceUpdateTag; - RetentionInterval = retentionInterval; - Timeout = timeout; - AzPowerShellVersion = azPowerShellVersion; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets container settings. - /// - [JsonProperty(PropertyName = "properties.containerSettings")] - public ContainerConfiguration ContainerSettings { get; set; } - - /// - /// Gets or sets storage Account settings. - /// - [JsonProperty(PropertyName = "properties.storageAccountSettings")] - public StorageAccountConfiguration StorageAccountSettings { get; set; } - - /// - /// Gets or sets the clean up preference when the script execution gets - /// in a terminal state. Default setting is 'Always'. Possible values - /// include: 'Always', 'OnSuccess', 'OnExpiration' - /// - [JsonProperty(PropertyName = "properties.cleanupPreference")] - public string CleanupPreference { get; set; } - - /// - /// Gets state of the script execution. This only appears in the - /// response. Possible values include: 'Creating', - /// 'ProvisioningResources', 'Running', 'Succeeded', 'Failed', - /// 'Canceled' - /// - [JsonProperty(PropertyName = "properties.provisioningState")] - public string ProvisioningState { get; private set; } - - /// - /// Gets contains the results of script execution. - /// - [JsonProperty(PropertyName = "properties.status")] - public ScriptStatus Status { get; private set; } - - /// - /// Gets list of script outputs. - /// - [JsonProperty(PropertyName = "properties.outputs")] - public IDictionary Outputs { get; private set; } - - /// - /// Gets or sets uri for the script. This is the entry point for the - /// external script. - /// - [JsonProperty(PropertyName = "properties.primaryScriptUri")] - public string PrimaryScriptUri { get; set; } - - /// - /// Gets or sets supporting files for the external script. - /// - [JsonProperty(PropertyName = "properties.supportingScriptUris")] - public IList SupportingScriptUris { get; set; } - - /// - /// Gets or sets script body. - /// - [JsonProperty(PropertyName = "properties.scriptContent")] - public string ScriptContent { get; set; } - - /// - /// Gets or sets command line arguments to pass to the script. - /// Arguments are separated by spaces. ex: -Name blue* -Location 'West - /// US 2' - /// - [JsonProperty(PropertyName = "properties.arguments")] - public string Arguments { get; set; } - - /// - /// Gets or sets the environment variables to pass over to the script. - /// - [JsonProperty(PropertyName = "properties.environmentVariables")] - public IList EnvironmentVariables { get; set; } - - /// - /// Gets or sets how the deployment script should be forced to execute - /// even if the script resource has not changed. Can be current time - /// stamp or a GUID. - /// - [JsonProperty(PropertyName = "properties.forceUpdateTag")] - public string ForceUpdateTag { get; set; } - - /// - /// Gets or sets interval for which the service retains the script - /// resource after it reaches a terminal state. Resource will be - /// deleted when this duration expires. Duration is based on ISO 8601 - /// pattern (for example P1D means one day). - /// - [JsonProperty(PropertyName = "properties.retentionInterval")] - public System.TimeSpan RetentionInterval { get; set; } - - /// - /// Gets or sets maximum allowed script execution time specified in ISO - /// 8601 format. Default value is P1D - /// - [JsonProperty(PropertyName = "properties.timeout")] - public System.TimeSpan? Timeout { get; set; } - - /// - /// Gets or sets azure PowerShell module version to be used. - /// - [JsonProperty(PropertyName = "properties.azPowerShellVersion")] - public string AzPowerShellVersion { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - if (AzPowerShellVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "AzPowerShellVersion"); - } - if (ContainerSettings != null) - { - ContainerSettings.Validate(); - } - if (EnvironmentVariables != null) - { - foreach (var element in EnvironmentVariables) - { - if (element != null) - { - element.Validate(); - } - } - } - } - } -} diff --git a/src/Resources/Resources.Sdk/Generated/Models/ContainerConfiguration.cs b/src/Resources/Resources.Sdk/Generated/Models/ContainerConfiguration.cs deleted file mode 100644 index b03dce13604b..000000000000 --- a/src/Resources/Resources.Sdk/Generated/Models/ContainerConfiguration.cs +++ /dev/null @@ -1,98 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Settings to customize ACI container instance. - /// - public partial class ContainerConfiguration - { - /// - /// Initializes a new instance of the ContainerConfiguration class. - /// - public ContainerConfiguration() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ContainerConfiguration class. - /// - /// Container group name, if not - /// specified then the name will get auto-generated. Not specifying a - /// 'containerGroupName' indicates the system to generate a unique name - /// which might end up flagging an Azure Policy as non-compliant. Use - /// 'containerGroupName' when you have an Azure Policy that expects a - /// specific naming convention or when you want to fully control the - /// name. 'containerGroupName' property must be between 1 and 63 - /// characters long, must contain only lowercase letters, numbers, and - /// dashes and it cannot start or end with a dash and consecutive - /// dashes are not allowed. To specify a 'containerGroupName', add the - /// following object to properties: { "containerSettings": { - /// "containerGroupName": "contoso-container" } }. If you do not want - /// to specify a 'containerGroupName' then do not add - /// 'containerSettings' property. - public ContainerConfiguration(string containerGroupName = default(string)) - { - ContainerGroupName = containerGroupName; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets container group name, if not specified then the name - /// will get auto-generated. Not specifying a 'containerGroupName' - /// indicates the system to generate a unique name which might end up - /// flagging an Azure Policy as non-compliant. Use 'containerGroupName' - /// when you have an Azure Policy that expects a specific naming - /// convention or when you want to fully control the name. - /// 'containerGroupName' property must be between 1 and 63 characters - /// long, must contain only lowercase letters, numbers, and dashes and - /// it cannot start or end with a dash and consecutive dashes are not - /// allowed. To specify a 'containerGroupName', add the following - /// object to properties: { "containerSettings": { - /// "containerGroupName": "contoso-container" } }. If you do not want - /// to specify a 'containerGroupName' then do not add - /// 'containerSettings' property. - /// - [JsonProperty(PropertyName = "containerGroupName")] - public string ContainerGroupName { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (ContainerGroupName != null) - { - if (ContainerGroupName.Length > 63) - { - throw new ValidationException(ValidationRules.MaxLength, "ContainerGroupName", 63); - } - if (ContainerGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "ContainerGroupName", 1); - } - } - } - } -} diff --git a/src/Resources/Resources.Sdk/Generated/Models/DenySettings.cs b/src/Resources/Resources.Sdk/Generated/Models/DenySettings.cs deleted file mode 100644 index e70b6cfa42d5..000000000000 --- a/src/Resources/Resources.Sdk/Generated/Models/DenySettings.cs +++ /dev/null @@ -1,113 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Defines how resources deployed by the deployment stack are locked. - /// - public partial class DenySettings - { - /// - /// Initializes a new instance of the DenySettings class. - /// - public DenySettings() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the DenySettings class. - /// - /// denySettings Mode. Possible values include: - /// 'denyDelete', 'denyWriteAndDelete', 'none' - /// List of AAD principal IDs excluded - /// from the lock. Up to 5 principals are permitted. - /// List of role-based management - /// operations that are excluded from the denySettings. Up to 200 - /// actions are permitted. If the denySetting mode is set to - /// 'denyWriteAndDelete', then the following actions are automatically - /// appended to 'excludedActions': '*/read' and - /// 'Microsoft.Authorization/locks/delete'. If the denySetting mode is - /// set to 'denyDelete', then the following actions are automatically - /// appended to 'excludedActions': - /// 'Microsoft.Authorization/locks/delete'. Duplicate actions will be - /// removed. - /// DenySettings will be applied to - /// child scopes. - public DenySettings(string mode, IList excludedPrincipals = default(IList), IList excludedActions = default(IList), bool? applyToChildScopes = default(bool?)) - { - Mode = mode; - ExcludedPrincipals = excludedPrincipals; - ExcludedActions = excludedActions; - ApplyToChildScopes = applyToChildScopes; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets denySettings Mode. Possible values include: - /// 'denyDelete', 'denyWriteAndDelete', 'none' - /// - [JsonProperty(PropertyName = "mode")] - public string Mode { get; set; } - - /// - /// Gets or sets list of AAD principal IDs excluded from the lock. Up - /// to 5 principals are permitted. - /// - [JsonProperty(PropertyName = "excludedPrincipals")] - public IList ExcludedPrincipals { get; set; } - - /// - /// Gets or sets list of role-based management operations that are - /// excluded from the denySettings. Up to 200 actions are permitted. If - /// the denySetting mode is set to 'denyWriteAndDelete', then the - /// following actions are automatically appended to 'excludedActions': - /// '*/read' and 'Microsoft.Authorization/locks/delete'. If the - /// denySetting mode is set to 'denyDelete', then the following actions - /// are automatically appended to 'excludedActions': - /// 'Microsoft.Authorization/locks/delete'. Duplicate actions will be - /// removed. - /// - [JsonProperty(PropertyName = "excludedActions")] - public IList ExcludedActions { get; set; } - - /// - /// Gets or sets denySettings will be applied to child scopes. - /// - [JsonProperty(PropertyName = "applyToChildScopes")] - public bool? ApplyToChildScopes { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Mode == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Mode"); - } - } - } -} diff --git a/src/Resources/Resources.Sdk/Generated/Models/DeploymentOperationProperties.cs b/src/Resources/Resources.Sdk/Generated/Models/DeploymentOperationProperties.cs deleted file mode 100644 index b82045b46f81..000000000000 --- a/src/Resources/Resources.Sdk/Generated/Models/DeploymentOperationProperties.cs +++ /dev/null @@ -1,142 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Deployment operation properties. - /// - public partial class DeploymentOperationProperties - { - /// - /// Initializes a new instance of the DeploymentOperationProperties - /// class. - /// - public DeploymentOperationProperties() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the DeploymentOperationProperties - /// class. - /// - /// The name of the current - /// provisioning operation. Possible values include: 'NotSpecified', - /// 'Create', 'Delete', 'Waiting', 'AzureAsyncOperationWaiting', - /// 'ResourceCacheWaiting', 'Action', 'Read', - /// 'EvaluateDeploymentOutput', 'DeploymentCleanup' - /// The state of the - /// provisioning. - /// The date and time of the operation. - /// The duration of the operation. - /// Deployment operation service request - /// id. - /// Operation status code from the resource - /// provider. This property may not be set if a response has not yet - /// been received. - /// Operation status message from the - /// resource provider. This property is optional. It will only be - /// provided if an error was received from the resource - /// provider. - /// The target resource. - /// The HTTP request message. - /// The HTTP response message. - public DeploymentOperationProperties(ProvisioningOperation? provisioningOperation = default(ProvisioningOperation?), string provisioningState = default(string), System.DateTime? timestamp = default(System.DateTime?), string duration = default(string), string serviceRequestId = default(string), string statusCode = default(string), StatusMessage statusMessage = default(StatusMessage), TargetResource targetResource = default(TargetResource), HttpMessage request = default(HttpMessage), HttpMessage response = default(HttpMessage)) - { - ProvisioningOperation = provisioningOperation; - ProvisioningState = provisioningState; - Timestamp = timestamp; - Duration = duration; - ServiceRequestId = serviceRequestId; - StatusCode = statusCode; - StatusMessage = statusMessage; - TargetResource = targetResource; - Request = request; - Response = response; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets the name of the current provisioning operation. Possible - /// values include: 'NotSpecified', 'Create', 'Delete', 'Waiting', - /// 'AzureAsyncOperationWaiting', 'ResourceCacheWaiting', 'Action', - /// 'Read', 'EvaluateDeploymentOutput', 'DeploymentCleanup' - /// - [JsonProperty(PropertyName = "provisioningOperation")] - public ProvisioningOperation? ProvisioningOperation { get; private set; } - - /// - /// Gets the state of the provisioning. - /// - [JsonProperty(PropertyName = "provisioningState")] - public string ProvisioningState { get; private set; } - - /// - /// Gets the date and time of the operation. - /// - [JsonProperty(PropertyName = "timestamp")] - public System.DateTime? Timestamp { get; private set; } - - /// - /// Gets the duration of the operation. - /// - [JsonProperty(PropertyName = "duration")] - public string Duration { get; private set; } - - /// - /// Gets deployment operation service request id. - /// - [JsonProperty(PropertyName = "serviceRequestId")] - public string ServiceRequestId { get; private set; } - - /// - /// Gets operation status code from the resource provider. This - /// property may not be set if a response has not yet been received. - /// - [JsonProperty(PropertyName = "statusCode")] - public string StatusCode { get; private set; } - - /// - /// Gets operation status message from the resource provider. This - /// property is optional. It will only be provided if an error was - /// received from the resource provider. - /// - [JsonProperty(PropertyName = "statusMessage")] - public StatusMessage StatusMessage { get; private set; } - - /// - /// Gets the target resource. - /// - [JsonProperty(PropertyName = "targetResource")] - public TargetResource TargetResource { get; private set; } - - /// - /// Gets the HTTP request message. - /// - [JsonProperty(PropertyName = "request")] - public HttpMessage Request { get; private set; } - - /// - /// Gets the HTTP response message. - /// - [JsonProperty(PropertyName = "response")] - public HttpMessage Response { get; private set; } - - } -} diff --git a/src/Resources/Resources.Sdk/Generated/Models/DeploymentProperties.cs b/src/Resources/Resources.Sdk/Generated/Models/DeploymentProperties.cs deleted file mode 100644 index 23ec8ed0cc1e..000000000000 --- a/src/Resources/Resources.Sdk/Generated/Models/DeploymentProperties.cs +++ /dev/null @@ -1,168 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Deployment properties. - /// - public partial class DeploymentProperties - { - /// - /// Initializes a new instance of the DeploymentProperties class. - /// - public DeploymentProperties() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the DeploymentProperties class. - /// - /// The mode that is used to deploy resources. This - /// value can be either Incremental or Complete. In Incremental mode, - /// resources are deployed without deleting existing resources that are - /// not included in the template. In Complete mode, resources are - /// deployed and existing resources in the resource group that are not - /// included in the template are deleted. Be careful when using - /// Complete mode as you may unintentionally delete resources. Possible - /// values include: 'Incremental', 'Complete' - /// The template content. You use this element - /// when you want to pass the template syntax directly in the request - /// rather than link to an existing template. It can be a JObject or - /// well-formed JSON string. Use either the templateLink property or - /// the template property, but not both. - /// The URI of the template. Use either the - /// templateLink property or the template property, but not - /// both. - /// Name and value pairs that define the - /// deployment parameters for the template. You use this element when - /// you want to provide the parameter values directly in the request - /// rather than link to an existing parameter file. Use either the - /// parametersLink property or the parameters property, but not both. - /// It can be a JObject or a well formed JSON string. - /// The URI of parameters file. You use - /// this element to link to an existing parameters file. Use either the - /// parametersLink property or the parameters property, but not - /// both. - /// The debug setting of the - /// deployment. - /// The deployment on error - /// behavior. - /// Specifies whether - /// template expressions are evaluated within the scope of the parent - /// template or nested template. Only applicable to nested templates. - /// If not specified, default value is outer. - public DeploymentProperties(DeploymentMode mode, object template = default(object), TemplateLink templateLink = default(TemplateLink), object parameters = default(object), ParametersLink parametersLink = default(ParametersLink), DebugSetting debugSetting = default(DebugSetting), OnErrorDeployment onErrorDeployment = default(OnErrorDeployment), ExpressionEvaluationOptions expressionEvaluationOptions = default(ExpressionEvaluationOptions)) - { - Template = template; - TemplateLink = templateLink; - Parameters = parameters; - ParametersLink = parametersLink; - Mode = mode; - DebugSetting = debugSetting; - OnErrorDeployment = onErrorDeployment; - ExpressionEvaluationOptions = expressionEvaluationOptions; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the template content. You use this element when you - /// want to pass the template syntax directly in the request rather - /// than link to an existing template. It can be a JObject or - /// well-formed JSON string. Use either the templateLink property or - /// the template property, but not both. - /// - [JsonProperty(PropertyName = "template")] - public object Template { get; set; } - - /// - /// Gets or sets the URI of the template. Use either the templateLink - /// property or the template property, but not both. - /// - [JsonProperty(PropertyName = "templateLink")] - public TemplateLink TemplateLink { get; set; } - - /// - /// Gets or sets name and value pairs that define the deployment - /// parameters for the template. You use this element when you want to - /// provide the parameter values directly in the request rather than - /// link to an existing parameter file. Use either the parametersLink - /// property or the parameters property, but not both. It can be a - /// JObject or a well formed JSON string. - /// - [JsonProperty(PropertyName = "parameters")] - public object Parameters { get; set; } - - /// - /// Gets or sets the URI of parameters file. You use this element to - /// link to an existing parameters file. Use either the parametersLink - /// property or the parameters property, but not both. - /// - [JsonProperty(PropertyName = "parametersLink")] - public ParametersLink ParametersLink { get; set; } - - /// - /// Gets or sets the mode that is used to deploy resources. This value - /// can be either Incremental or Complete. In Incremental mode, - /// resources are deployed without deleting existing resources that are - /// not included in the template. In Complete mode, resources are - /// deployed and existing resources in the resource group that are not - /// included in the template are deleted. Be careful when using - /// Complete mode as you may unintentionally delete resources. Possible - /// values include: 'Incremental', 'Complete' - /// - [JsonProperty(PropertyName = "mode")] - public DeploymentMode Mode { get; set; } - - /// - /// Gets or sets the debug setting of the deployment. - /// - [JsonProperty(PropertyName = "debugSetting")] - public DebugSetting DebugSetting { get; set; } - - /// - /// Gets or sets the deployment on error behavior. - /// - [JsonProperty(PropertyName = "onErrorDeployment")] - public OnErrorDeployment OnErrorDeployment { get; set; } - - /// - /// Gets or sets specifies whether template expressions are evaluated - /// within the scope of the parent template or nested template. Only - /// applicable to nested templates. If not specified, default value is - /// outer. - /// - [JsonProperty(PropertyName = "expressionEvaluationOptions")] - public ExpressionEvaluationOptions ExpressionEvaluationOptions { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (ParametersLink != null) - { - ParametersLink.Validate(); - } - } - } -} diff --git a/src/Resources/Resources.Sdk/Generated/Models/DeploymentPropertiesExtended.cs b/src/Resources/Resources.Sdk/Generated/Models/DeploymentPropertiesExtended.cs deleted file mode 100644 index 5f5d6ee34265..000000000000 --- a/src/Resources/Resources.Sdk/Generated/Models/DeploymentPropertiesExtended.cs +++ /dev/null @@ -1,218 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Deployment properties with additional details. - /// - public partial class DeploymentPropertiesExtended - { - /// - /// Initializes a new instance of the DeploymentPropertiesExtended - /// class. - /// - public DeploymentPropertiesExtended() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the DeploymentPropertiesExtended - /// class. - /// - /// Denotes the state of provisioning. - /// Possible values include: 'NotSpecified', 'Accepted', 'Running', - /// 'Ready', 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', - /// 'Failed', 'Succeeded', 'Updating' - /// The correlation ID of the - /// deployment. - /// The timestamp of the template - /// deployment. - /// The duration of the template - /// deployment. - /// Key/value pairs that represent deployment - /// output. - /// The list of resource providers needed for - /// the deployment. - /// The list of deployment - /// dependencies. - /// The URI referencing the - /// template. - /// Deployment parameters. - /// The URI referencing the parameters. - /// - /// The deployment mode. Possible values are - /// Incremental and Complete. Possible values include: 'Incremental', - /// 'Complete' - /// The debug setting of the - /// deployment. - /// The deployment on error - /// behavior. - /// The hash produced for the - /// template. - /// Array of provisioned - /// resources. - /// Array of validated - /// resources. - /// The deployment error. - public DeploymentPropertiesExtended(string provisioningState = default(string), string correlationId = default(string), System.DateTime? timestamp = default(System.DateTime?), string duration = default(string), object outputs = default(object), IList providers = default(IList), IList dependencies = default(IList), TemplateLink templateLink = default(TemplateLink), object parameters = default(object), ParametersLink parametersLink = default(ParametersLink), DeploymentMode? mode = default(DeploymentMode?), DebugSetting debugSetting = default(DebugSetting), OnErrorDeploymentExtended onErrorDeployment = default(OnErrorDeploymentExtended), string templateHash = default(string), IList outputResources = default(IList), IList validatedResources = default(IList), ErrorResponse error = default(ErrorResponse)) - { - ProvisioningState = provisioningState; - CorrelationId = correlationId; - Timestamp = timestamp; - Duration = duration; - Outputs = outputs; - Providers = providers; - Dependencies = dependencies; - TemplateLink = templateLink; - Parameters = parameters; - ParametersLink = parametersLink; - Mode = mode; - DebugSetting = debugSetting; - OnErrorDeployment = onErrorDeployment; - TemplateHash = templateHash; - OutputResources = outputResources; - ValidatedResources = validatedResources; - Error = error; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets denotes the state of provisioning. Possible values include: - /// 'NotSpecified', 'Accepted', 'Running', 'Ready', 'Creating', - /// 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', - /// 'Succeeded', 'Updating' - /// - [JsonProperty(PropertyName = "provisioningState")] - public string ProvisioningState { get; private set; } - - /// - /// Gets the correlation ID of the deployment. - /// - [JsonProperty(PropertyName = "correlationId")] - public string CorrelationId { get; private set; } - - /// - /// Gets the timestamp of the template deployment. - /// - [JsonProperty(PropertyName = "timestamp")] - public System.DateTime? Timestamp { get; private set; } - - /// - /// Gets the duration of the template deployment. - /// - [JsonProperty(PropertyName = "duration")] - public string Duration { get; private set; } - - /// - /// Gets key/value pairs that represent deployment output. - /// - [JsonProperty(PropertyName = "outputs")] - public object Outputs { get; private set; } - - /// - /// Gets the list of resource providers needed for the deployment. - /// - [JsonProperty(PropertyName = "providers")] - public IList Providers { get; private set; } - - /// - /// Gets the list of deployment dependencies. - /// - [JsonProperty(PropertyName = "dependencies")] - public IList Dependencies { get; private set; } - - /// - /// Gets the URI referencing the template. - /// - [JsonProperty(PropertyName = "templateLink")] - public TemplateLink TemplateLink { get; private set; } - - /// - /// Gets deployment parameters. - /// - [JsonProperty(PropertyName = "parameters")] - public object Parameters { get; private set; } - - /// - /// Gets the URI referencing the parameters. - /// - [JsonProperty(PropertyName = "parametersLink")] - public ParametersLink ParametersLink { get; private set; } - - /// - /// Gets the deployment mode. Possible values are Incremental and - /// Complete. Possible values include: 'Incremental', 'Complete' - /// - [JsonProperty(PropertyName = "mode")] - public DeploymentMode? Mode { get; private set; } - - /// - /// Gets the debug setting of the deployment. - /// - [JsonProperty(PropertyName = "debugSetting")] - public DebugSetting DebugSetting { get; private set; } - - /// - /// Gets the deployment on error behavior. - /// - [JsonProperty(PropertyName = "onErrorDeployment")] - public OnErrorDeploymentExtended OnErrorDeployment { get; private set; } - - /// - /// Gets the hash produced for the template. - /// - [JsonProperty(PropertyName = "templateHash")] - public string TemplateHash { get; private set; } - - /// - /// Gets array of provisioned resources. - /// - [JsonProperty(PropertyName = "outputResources")] - public IList OutputResources { get; private set; } - - /// - /// Gets array of validated resources. - /// - [JsonProperty(PropertyName = "validatedResources")] - public IList ValidatedResources { get; private set; } - - /// - /// Gets the deployment error. - /// - [JsonProperty(PropertyName = "error")] - public ErrorResponse Error { get; private set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (ParametersLink != null) - { - ParametersLink.Validate(); - } - } - } -} diff --git a/src/Resources/Resources.Sdk/Generated/Models/DeploymentStack.cs b/src/Resources/Resources.Sdk/Generated/Models/DeploymentStack.cs deleted file mode 100644 index 053711c12622..000000000000 --- a/src/Resources/Resources.Sdk/Generated/Models/DeploymentStack.cs +++ /dev/null @@ -1,317 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Deployment stack object. - /// - [Rest.Serialization.JsonTransformation] - public partial class DeploymentStack : AzureResourceBase - { - /// - /// Initializes a new instance of the DeploymentStack class. - /// - public DeploymentStack() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the DeploymentStack class. - /// - /// Defines the behavior of resources - /// that are not managed immediately after the stack is - /// updated. - /// Defines how resources deployed by the - /// stack are locked. - /// String Id used to locate any resource on - /// Azure. - /// Name of this resource. - /// Type of this resource. - /// Azure Resource Manager metadata containing - /// createdBy and modifiedBy information. - /// The location of the deployment stack. It - /// cannot be changed after creation. It must be one of the supported - /// Azure locations. - /// Deployment stack resource tags. - /// The template content. You use this element - /// when you want to pass the template syntax directly in the request - /// rather than link to an existing template. It can be a JObject or - /// well-formed JSON string. Use either the templateLink property or - /// the template property, but not both. - /// The URI of the template. Use either the - /// templateLink property or the template property, but not - /// both. - /// Name and value pairs that define the - /// deployment parameters for the template. Use this element when - /// providing the parameter values directly in the request, rather than - /// linking to an existing parameter file. Use either the - /// parametersLink property or the parameters property, but not both. - /// It can be a JObject or a well formed JSON string. - /// The URI of parameters file. Use this - /// element to link to an existing parameters file. Use either the - /// parametersLink property or the parameters property, but not - /// both. - /// The debug setting of the - /// deployment. - /// The scope at which the initial - /// deployment should be created. If a scope is not specified, it will - /// default to the scope of the deployment stack. Valid scopes are: - /// management group (format: - /// '/providers/Microsoft.Management/managementGroups/{managementGroupId}'), - /// subscription (format: '/subscriptions/{subscriptionId}'), resource - /// group (format: - /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}'). - /// Deployment stack description. - /// State of the deployment stack. - /// Possible values include: 'Creating', 'Validating', 'Waiting', - /// 'Deploying', 'Canceling', 'Locking', 'DeletingResources', - /// 'Succeeded', 'Failed', 'Canceled', 'Deleting' - /// An array of resources that were - /// detached during the most recent update. - /// An array of resources that were - /// deleted during the most recent update. - /// An array of resources that failed to - /// reach goal state during the most recent update. - /// An array of resources currently - /// managed by the deployment stack. - /// The resourceId of the deployment - /// resource created by the deployment stack. - /// The outputs of the underlying - /// deployment. - /// The duration of the deployment stack - /// update. - public DeploymentStack(DeploymentStackPropertiesActionOnUnmanage actionOnUnmanage, DenySettings denySettings, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string location = default(string), IDictionary tags = default(IDictionary), ErrorResponse error = default(ErrorResponse), object template = default(object), DeploymentStacksTemplateLink templateLink = default(DeploymentStacksTemplateLink), object parameters = default(object), DeploymentStacksParametersLink parametersLink = default(DeploymentStacksParametersLink), DeploymentStacksDebugSetting debugSetting = default(DeploymentStacksDebugSetting), string deploymentScope = default(string), string description = default(string), string provisioningState = default(string), IList detachedResources = default(IList), IList deletedResources = default(IList), IList failedResources = default(IList), IList resourcesProperty = default(IList), string deploymentId = default(string), object outputs = default(object), string duration = default(string)) - : base(id, name, type, systemData) - { - Location = location; - Tags = tags; - Error = error; - Template = template; - TemplateLink = templateLink; - Parameters = parameters; - ParametersLink = parametersLink; - ActionOnUnmanage = actionOnUnmanage; - DebugSetting = debugSetting; - DeploymentScope = deploymentScope; - Description = description; - DenySettings = denySettings; - ProvisioningState = provisioningState; - DetachedResources = detachedResources; - DeletedResources = deletedResources; - FailedResources = failedResources; - ResourcesProperty = resourcesProperty; - DeploymentId = deploymentId; - Outputs = outputs; - Duration = duration; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the location of the deployment stack. It cannot be - /// changed after creation. It must be one of the supported Azure - /// locations. - /// - [JsonProperty(PropertyName = "location")] - public string Location { get; set; } - - /// - /// Gets or sets deployment stack resource tags. - /// - [JsonProperty(PropertyName = "tags")] - public IDictionary Tags { get; set; } - - /// - /// - [JsonProperty(PropertyName = "properties.error")] - public ErrorResponse Error { get; set; } - - /// - /// Gets or sets the template content. You use this element when you - /// want to pass the template syntax directly in the request rather - /// than link to an existing template. It can be a JObject or - /// well-formed JSON string. Use either the templateLink property or - /// the template property, but not both. - /// - [JsonProperty(PropertyName = "properties.template")] - public object Template { get; set; } - - /// - /// Gets or sets the URI of the template. Use either the templateLink - /// property or the template property, but not both. - /// - [JsonProperty(PropertyName = "properties.templateLink")] - public DeploymentStacksTemplateLink TemplateLink { get; set; } - - /// - /// Gets or sets name and value pairs that define the deployment - /// parameters for the template. Use this element when providing the - /// parameter values directly in the request, rather than linking to an - /// existing parameter file. Use either the parametersLink property or - /// the parameters property, but not both. It can be a JObject or a - /// well formed JSON string. - /// - [JsonProperty(PropertyName = "properties.parameters")] - public object Parameters { get; set; } - - /// - /// Gets or sets the URI of parameters file. Use this element to link - /// to an existing parameters file. Use either the parametersLink - /// property or the parameters property, but not both. - /// - [JsonProperty(PropertyName = "properties.parametersLink")] - public DeploymentStacksParametersLink ParametersLink { get; set; } - - /// - /// Gets or sets defines the behavior of resources that are not managed - /// immediately after the stack is updated. - /// - [JsonProperty(PropertyName = "properties.actionOnUnmanage")] - public DeploymentStackPropertiesActionOnUnmanage ActionOnUnmanage { get; set; } - - /// - /// Gets or sets the debug setting of the deployment. - /// - [JsonProperty(PropertyName = "properties.debugSetting")] - public DeploymentStacksDebugSetting DebugSetting { get; set; } - - /// - /// Gets or sets the scope at which the initial deployment should be - /// created. If a scope is not specified, it will default to the scope - /// of the deployment stack. Valid scopes are: management group - /// (format: - /// '/providers/Microsoft.Management/managementGroups/{managementGroupId}'), - /// subscription (format: '/subscriptions/{subscriptionId}'), resource - /// group (format: - /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}'). - /// - [JsonProperty(PropertyName = "properties.deploymentScope")] - public string DeploymentScope { get; set; } - - /// - /// Gets or sets deployment stack description. - /// - [JsonProperty(PropertyName = "properties.description")] - public string Description { get; set; } - - /// - /// Gets or sets defines how resources deployed by the stack are - /// locked. - /// - [JsonProperty(PropertyName = "properties.denySettings")] - public DenySettings DenySettings { get; set; } - - /// - /// Gets state of the deployment stack. Possible values include: - /// 'Creating', 'Validating', 'Waiting', 'Deploying', 'Canceling', - /// 'Locking', 'DeletingResources', 'Succeeded', 'Failed', 'Canceled', - /// 'Deleting' - /// - [JsonProperty(PropertyName = "properties.provisioningState")] - public string ProvisioningState { get; private set; } - - /// - /// Gets an array of resources that were detached during the most - /// recent update. - /// - [JsonProperty(PropertyName = "properties.detachedResources")] - public IList DetachedResources { get; private set; } - - /// - /// Gets an array of resources that were deleted during the most recent - /// update. - /// - [JsonProperty(PropertyName = "properties.deletedResources")] - public IList DeletedResources { get; private set; } - - /// - /// Gets an array of resources that failed to reach goal state during - /// the most recent update. - /// - [JsonProperty(PropertyName = "properties.failedResources")] - public IList FailedResources { get; private set; } - - /// - /// Gets an array of resources currently managed by the deployment - /// stack. - /// - [JsonProperty(PropertyName = "properties.resources")] - public IList ResourcesProperty { get; private set; } - - /// - /// Gets the resourceId of the deployment resource created by the - /// deployment stack. - /// - [JsonProperty(PropertyName = "properties.deploymentId")] - public string DeploymentId { get; private set; } - - /// - /// Gets the outputs of the underlying deployment. - /// - [JsonProperty(PropertyName = "properties.outputs")] - public object Outputs { get; private set; } - - /// - /// Gets the duration of the deployment stack update. - /// - [JsonProperty(PropertyName = "properties.duration")] - public string Duration { get; private set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (ActionOnUnmanage == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "ActionOnUnmanage"); - } - if (DenySettings == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "DenySettings"); - } - if (ParametersLink != null) - { - ParametersLink.Validate(); - } - if (ActionOnUnmanage != null) - { - ActionOnUnmanage.Validate(); - } - if (Description != null) - { - if (Description.Length > 4096) - { - throw new ValidationException(ValidationRules.MaxLength, "Description", 4096); - } - } - if (DenySettings != null) - { - DenySettings.Validate(); - } - } - } -} diff --git a/src/Resources/Resources.Sdk/Generated/Models/DeploymentStackProperties.cs b/src/Resources/Resources.Sdk/Generated/Models/DeploymentStackProperties.cs deleted file mode 100644 index 929376ef6d6b..000000000000 --- a/src/Resources/Resources.Sdk/Generated/Models/DeploymentStackProperties.cs +++ /dev/null @@ -1,283 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Deployment stack properties. - /// - public partial class DeploymentStackProperties : DeploymentStacksError - { - /// - /// Initializes a new instance of the DeploymentStackProperties class. - /// - public DeploymentStackProperties() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the DeploymentStackProperties class. - /// - /// Defines the behavior of resources - /// that are not managed immediately after the stack is - /// updated. - /// Defines how resources deployed by the - /// stack are locked. - /// The template content. You use this element - /// when you want to pass the template syntax directly in the request - /// rather than link to an existing template. It can be a JObject or - /// well-formed JSON string. Use either the templateLink property or - /// the template property, but not both. - /// The URI of the template. Use either the - /// templateLink property or the template property, but not - /// both. - /// Name and value pairs that define the - /// deployment parameters for the template. Use this element when - /// providing the parameter values directly in the request, rather than - /// linking to an existing parameter file. Use either the - /// parametersLink property or the parameters property, but not both. - /// It can be a JObject or a well formed JSON string. - /// The URI of parameters file. Use this - /// element to link to an existing parameters file. Use either the - /// parametersLink property or the parameters property, but not - /// both. - /// The debug setting of the - /// deployment. - /// The scope at which the initial - /// deployment should be created. If a scope is not specified, it will - /// default to the scope of the deployment stack. Valid scopes are: - /// management group (format: - /// '/providers/Microsoft.Management/managementGroups/{managementGroupId}'), - /// subscription (format: '/subscriptions/{subscriptionId}'), resource - /// group (format: - /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}'). - /// Deployment stack description. - /// State of the deployment stack. - /// Possible values include: 'Creating', 'Validating', 'Waiting', - /// 'Deploying', 'Canceling', 'Locking', 'DeletingResources', - /// 'Succeeded', 'Failed', 'Canceled', 'Deleting' - /// An array of resources that were - /// detached during the most recent update. - /// An array of resources that were - /// deleted during the most recent update. - /// An array of resources that failed to - /// reach goal state during the most recent update. - /// An array of resources currently managed by - /// the deployment stack. - /// The resourceId of the deployment - /// resource created by the deployment stack. - /// The outputs of the underlying - /// deployment. - /// The duration of the deployment stack - /// update. - public DeploymentStackProperties(DeploymentStackPropertiesActionOnUnmanage actionOnUnmanage, DenySettings denySettings, ErrorResponse error = default(ErrorResponse), object template = default(object), DeploymentStacksTemplateLink templateLink = default(DeploymentStacksTemplateLink), object parameters = default(object), DeploymentStacksParametersLink parametersLink = default(DeploymentStacksParametersLink), DeploymentStacksDebugSetting debugSetting = default(DeploymentStacksDebugSetting), string deploymentScope = default(string), string description = default(string), string provisioningState = default(string), IList detachedResources = default(IList), IList deletedResources = default(IList), IList failedResources = default(IList), IList resources = default(IList), string deploymentId = default(string), object outputs = default(object), string duration = default(string)) - : base(error) - { - Template = template; - TemplateLink = templateLink; - Parameters = parameters; - ParametersLink = parametersLink; - ActionOnUnmanage = actionOnUnmanage; - DebugSetting = debugSetting; - DeploymentScope = deploymentScope; - Description = description; - DenySettings = denySettings; - ProvisioningState = provisioningState; - DetachedResources = detachedResources; - DeletedResources = deletedResources; - FailedResources = failedResources; - Resources = resources; - DeploymentId = deploymentId; - Outputs = outputs; - Duration = duration; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the template content. You use this element when you - /// want to pass the template syntax directly in the request rather - /// than link to an existing template. It can be a JObject or - /// well-formed JSON string. Use either the templateLink property or - /// the template property, but not both. - /// - [JsonProperty(PropertyName = "template")] - public object Template { get; set; } - - /// - /// Gets or sets the URI of the template. Use either the templateLink - /// property or the template property, but not both. - /// - [JsonProperty(PropertyName = "templateLink")] - public DeploymentStacksTemplateLink TemplateLink { get; set; } - - /// - /// Gets or sets name and value pairs that define the deployment - /// parameters for the template. Use this element when providing the - /// parameter values directly in the request, rather than linking to an - /// existing parameter file. Use either the parametersLink property or - /// the parameters property, but not both. It can be a JObject or a - /// well formed JSON string. - /// - [JsonProperty(PropertyName = "parameters")] - public object Parameters { get; set; } - - /// - /// Gets or sets the URI of parameters file. Use this element to link - /// to an existing parameters file. Use either the parametersLink - /// property or the parameters property, but not both. - /// - [JsonProperty(PropertyName = "parametersLink")] - public DeploymentStacksParametersLink ParametersLink { get; set; } - - /// - /// Gets or sets defines the behavior of resources that are not managed - /// immediately after the stack is updated. - /// - [JsonProperty(PropertyName = "actionOnUnmanage")] - public DeploymentStackPropertiesActionOnUnmanage ActionOnUnmanage { get; set; } - - /// - /// Gets or sets the debug setting of the deployment. - /// - [JsonProperty(PropertyName = "debugSetting")] - public DeploymentStacksDebugSetting DebugSetting { get; set; } - - /// - /// Gets or sets the scope at which the initial deployment should be - /// created. If a scope is not specified, it will default to the scope - /// of the deployment stack. Valid scopes are: management group - /// (format: - /// '/providers/Microsoft.Management/managementGroups/{managementGroupId}'), - /// subscription (format: '/subscriptions/{subscriptionId}'), resource - /// group (format: - /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}'). - /// - [JsonProperty(PropertyName = "deploymentScope")] - public string DeploymentScope { get; set; } - - /// - /// Gets or sets deployment stack description. - /// - [JsonProperty(PropertyName = "description")] - public string Description { get; set; } - - /// - /// Gets or sets defines how resources deployed by the stack are - /// locked. - /// - [JsonProperty(PropertyName = "denySettings")] - public DenySettings DenySettings { get; set; } - - /// - /// Gets state of the deployment stack. Possible values include: - /// 'Creating', 'Validating', 'Waiting', 'Deploying', 'Canceling', - /// 'Locking', 'DeletingResources', 'Succeeded', 'Failed', 'Canceled', - /// 'Deleting' - /// - [JsonProperty(PropertyName = "provisioningState")] - public string ProvisioningState { get; private set; } - - /// - /// Gets an array of resources that were detached during the most - /// recent update. - /// - [JsonProperty(PropertyName = "detachedResources")] - public IList DetachedResources { get; private set; } - - /// - /// Gets an array of resources that were deleted during the most recent - /// update. - /// - [JsonProperty(PropertyName = "deletedResources")] - public IList DeletedResources { get; private set; } - - /// - /// Gets an array of resources that failed to reach goal state during - /// the most recent update. - /// - [JsonProperty(PropertyName = "failedResources")] - public IList FailedResources { get; private set; } - - /// - /// Gets an array of resources currently managed by the deployment - /// stack. - /// - [JsonProperty(PropertyName = "resources")] - public IList Resources { get; private set; } - - /// - /// Gets the resourceId of the deployment resource created by the - /// deployment stack. - /// - [JsonProperty(PropertyName = "deploymentId")] - public string DeploymentId { get; private set; } - - /// - /// Gets the outputs of the underlying deployment. - /// - [JsonProperty(PropertyName = "outputs")] - public object Outputs { get; private set; } - - /// - /// Gets the duration of the deployment stack update. - /// - [JsonProperty(PropertyName = "duration")] - public string Duration { get; private set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (ActionOnUnmanage == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "ActionOnUnmanage"); - } - if (DenySettings == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "DenySettings"); - } - if (ParametersLink != null) - { - ParametersLink.Validate(); - } - if (ActionOnUnmanage != null) - { - ActionOnUnmanage.Validate(); - } - if (Description != null) - { - if (Description.Length > 4096) - { - throw new ValidationException(ValidationRules.MaxLength, "Description", 4096); - } - } - if (DenySettings != null) - { - DenySettings.Validate(); - } - } - } -} diff --git a/src/Resources/Resources.Sdk/Generated/Models/DeploymentStackPropertiesActionOnUnmanage.cs b/src/Resources/Resources.Sdk/Generated/Models/DeploymentStackPropertiesActionOnUnmanage.cs deleted file mode 100644 index fce37c8fdcea..000000000000 --- a/src/Resources/Resources.Sdk/Generated/Models/DeploymentStackPropertiesActionOnUnmanage.cs +++ /dev/null @@ -1,87 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Defines the behavior of resources that are not managed immediately - /// after the stack is updated. - /// - public partial class DeploymentStackPropertiesActionOnUnmanage - { - /// - /// Initializes a new instance of the - /// DeploymentStackPropertiesActionOnUnmanage class. - /// - public DeploymentStackPropertiesActionOnUnmanage() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// DeploymentStackPropertiesActionOnUnmanage class. - /// - /// Possible values include: 'delete', - /// 'detach' - /// Possible values include: 'delete', - /// 'detach' - /// Possible values include: 'delete', - /// 'detach' - public DeploymentStackPropertiesActionOnUnmanage(string resources, string resourceGroups = default(string), string managementGroups = default(string)) - { - Resources = resources; - ResourceGroups = resourceGroups; - ManagementGroups = managementGroups; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets possible values include: 'delete', 'detach' - /// - [JsonProperty(PropertyName = "resources")] - public string Resources { get; set; } - - /// - /// Gets or sets possible values include: 'delete', 'detach' - /// - [JsonProperty(PropertyName = "resourceGroups")] - public string ResourceGroups { get; set; } - - /// - /// Gets or sets possible values include: 'delete', 'detach' - /// - [JsonProperty(PropertyName = "managementGroups")] - public string ManagementGroups { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Resources == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Resources"); - } - } - } -} diff --git a/src/Resources/Resources.Sdk/Generated/Models/DeploymentStacksDebugSetting.cs b/src/Resources/Resources.Sdk/Generated/Models/DeploymentStacksDebugSetting.cs deleted file mode 100644 index 36cd6c69a054..000000000000 --- a/src/Resources/Resources.Sdk/Generated/Models/DeploymentStacksDebugSetting.cs +++ /dev/null @@ -1,67 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The debug setting. - /// - public partial class DeploymentStacksDebugSetting - { - /// - /// Initializes a new instance of the DeploymentStacksDebugSetting - /// class. - /// - public DeploymentStacksDebugSetting() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the DeploymentStacksDebugSetting - /// class. - /// - /// Specifies the type of information to log - /// for debugging. The permitted values are none, requestContent, - /// responseContent, or both requestContent and responseContent - /// separated by a comma. The default is none. When setting this value, - /// carefully consider the type of information that is being passed in - /// during deployment. By logging information about the request or - /// response, sensitive data that is retrieved through the deployment - /// operations could potentially be exposed. - public DeploymentStacksDebugSetting(string detailLevel = default(string)) - { - DetailLevel = detailLevel; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets specifies the type of information to log for - /// debugging. The permitted values are none, requestContent, - /// responseContent, or both requestContent and responseContent - /// separated by a comma. The default is none. When setting this value, - /// carefully consider the type of information that is being passed in - /// during deployment. By logging information about the request or - /// response, sensitive data that is retrieved through the deployment - /// operations could potentially be exposed. - /// - [JsonProperty(PropertyName = "detailLevel")] - public string DetailLevel { get; set; } - - } -} diff --git a/src/Resources/Resources.Sdk/Generated/Models/DeploymentsWhatIfAtManagementGroupScopeHeaders.cs b/src/Resources/Resources.Sdk/Generated/Models/DeploymentsWhatIfAtManagementGroupScopeHeaders.cs deleted file mode 100644 index ab3f107eda79..000000000000 --- a/src/Resources/Resources.Sdk/Generated/Models/DeploymentsWhatIfAtManagementGroupScopeHeaders.cs +++ /dev/null @@ -1,63 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Defines headers for WhatIfAtManagementGroupScope operation. - /// - public partial class DeploymentsWhatIfAtManagementGroupScopeHeaders - { - /// - /// Initializes a new instance of the - /// DeploymentsWhatIfAtManagementGroupScopeHeaders class. - /// - public DeploymentsWhatIfAtManagementGroupScopeHeaders() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// DeploymentsWhatIfAtManagementGroupScopeHeaders class. - /// - /// URL to get status of this long-running - /// operation. - /// Number of seconds to wait before polling - /// for status. - public DeploymentsWhatIfAtManagementGroupScopeHeaders(string location = default(string), string retryAfter = default(string)) - { - Location = location; - RetryAfter = retryAfter; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets URL to get status of this long-running operation. - /// - [JsonProperty(PropertyName = "Location")] - public string Location { get; set; } - - /// - /// Gets or sets number of seconds to wait before polling for status. - /// - [JsonProperty(PropertyName = "Retry-After")] - public string RetryAfter { get; set; } - - } -} diff --git a/src/Resources/Resources.Sdk/Generated/Models/DeploymentsWhatIfAtSubscriptionScopeHeaders.cs b/src/Resources/Resources.Sdk/Generated/Models/DeploymentsWhatIfAtSubscriptionScopeHeaders.cs deleted file mode 100644 index be99d8eae7a5..000000000000 --- a/src/Resources/Resources.Sdk/Generated/Models/DeploymentsWhatIfAtSubscriptionScopeHeaders.cs +++ /dev/null @@ -1,63 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Defines headers for WhatIfAtSubscriptionScope operation. - /// - public partial class DeploymentsWhatIfAtSubscriptionScopeHeaders - { - /// - /// Initializes a new instance of the - /// DeploymentsWhatIfAtSubscriptionScopeHeaders class. - /// - public DeploymentsWhatIfAtSubscriptionScopeHeaders() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// DeploymentsWhatIfAtSubscriptionScopeHeaders class. - /// - /// URL to get status of this long-running - /// operation. - /// Number of seconds to wait before polling - /// for status. - public DeploymentsWhatIfAtSubscriptionScopeHeaders(string location = default(string), string retryAfter = default(string)) - { - Location = location; - RetryAfter = retryAfter; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets URL to get status of this long-running operation. - /// - [JsonProperty(PropertyName = "Location")] - public string Location { get; set; } - - /// - /// Gets or sets number of seconds to wait before polling for status. - /// - [JsonProperty(PropertyName = "Retry-After")] - public string RetryAfter { get; set; } - - } -} diff --git a/src/Resources/Resources.Sdk/Generated/Models/DeploymentsWhatIfAtTenantScopeHeaders.cs b/src/Resources/Resources.Sdk/Generated/Models/DeploymentsWhatIfAtTenantScopeHeaders.cs deleted file mode 100644 index 8e0239fc145d..000000000000 --- a/src/Resources/Resources.Sdk/Generated/Models/DeploymentsWhatIfAtTenantScopeHeaders.cs +++ /dev/null @@ -1,63 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Defines headers for WhatIfAtTenantScope operation. - /// - public partial class DeploymentsWhatIfAtTenantScopeHeaders - { - /// - /// Initializes a new instance of the - /// DeploymentsWhatIfAtTenantScopeHeaders class. - /// - public DeploymentsWhatIfAtTenantScopeHeaders() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// DeploymentsWhatIfAtTenantScopeHeaders class. - /// - /// URL to get status of this long-running - /// operation. - /// Number of seconds to wait before polling - /// for status. - public DeploymentsWhatIfAtTenantScopeHeaders(string location = default(string), string retryAfter = default(string)) - { - Location = location; - RetryAfter = retryAfter; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets URL to get status of this long-running operation. - /// - [JsonProperty(PropertyName = "Location")] - public string Location { get; set; } - - /// - /// Gets or sets number of seconds to wait before polling for status. - /// - [JsonProperty(PropertyName = "Retry-After")] - public string RetryAfter { get; set; } - - } -} diff --git a/src/Resources/Resources.Sdk/Generated/Models/ErrorDetail.cs b/src/Resources/Resources.Sdk/Generated/Models/ErrorDetail.cs deleted file mode 100644 index c76868c39635..000000000000 --- a/src/Resources/Resources.Sdk/Generated/Models/ErrorDetail.cs +++ /dev/null @@ -1,85 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// The error detail. - /// - public partial class ErrorDetail - { - /// - /// Initializes a new instance of the ErrorDetail class. - /// - public ErrorDetail() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ErrorDetail class. - /// - /// The error code. - /// The error message. - /// The error target. - /// The error details. - /// The error additional info. - public ErrorDetail(string code = default(string), string message = default(string), string target = default(string), IList details = default(IList), IList additionalInfo = default(IList)) - { - Code = code; - Message = message; - Target = target; - Details = details; - AdditionalInfo = additionalInfo; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets the error code. - /// - [JsonProperty(PropertyName = "code")] - public string Code { get; private set; } - - /// - /// Gets the error message. - /// - [JsonProperty(PropertyName = "message")] - public string Message { get; private set; } - - /// - /// Gets the error target. - /// - [JsonProperty(PropertyName = "target")] - public string Target { get; private set; } - - /// - /// Gets the error details. - /// - [JsonProperty(PropertyName = "details")] - public IList Details { get; private set; } - - /// - /// Gets the error additional info. - /// - [JsonProperty(PropertyName = "additionalInfo")] - public IList AdditionalInfo { get; private set; } - - } -} diff --git a/src/Resources/Resources.Sdk/Generated/Models/ErrorResponse.cs b/src/Resources/Resources.Sdk/Generated/Models/ErrorResponse.cs deleted file mode 100644 index d842b51d1c7a..000000000000 --- a/src/Resources/Resources.Sdk/Generated/Models/ErrorResponse.cs +++ /dev/null @@ -1,90 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Error Response - /// - /// - /// Common error response for all Azure Resource Manager APIs to return - /// error details for failed operations. (This also follows the OData error - /// response format.) - /// - public partial class ErrorResponse - { - /// - /// Initializes a new instance of the ErrorResponse class. - /// - public ErrorResponse() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ErrorResponse class. - /// - /// The error code. - /// The error message. - /// The error target. - /// The error details. - /// The error additional info. - public ErrorResponse(string code = default(string), string message = default(string), string target = default(string), IList details = default(IList), IList additionalInfo = default(IList)) - { - Code = code; - Message = message; - Target = target; - Details = details; - AdditionalInfo = additionalInfo; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets the error code. - /// - [JsonProperty(PropertyName = "code")] - public string Code { get; private set; } - - /// - /// Gets the error message. - /// - [JsonProperty(PropertyName = "message")] - public string Message { get; private set; } - - /// - /// Gets the error target. - /// - [JsonProperty(PropertyName = "target")] - public string Target { get; private set; } - - /// - /// Gets the error details. - /// - [JsonProperty(PropertyName = "details")] - public IList Details { get; private set; } - - /// - /// Gets the error additional info. - /// - [JsonProperty(PropertyName = "additionalInfo")] - public IList AdditionalInfo { get; private set; } - - } -} diff --git a/src/Resources/Resources.Sdk/Generated/Models/GenericResource.cs b/src/Resources/Resources.Sdk/Generated/Models/GenericResource.cs deleted file mode 100644 index 2ab6f4e1cc56..000000000000 --- a/src/Resources/Resources.Sdk/Generated/Models/GenericResource.cs +++ /dev/null @@ -1,118 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Resource information. - /// - public partial class GenericResource : Resource - { - /// - /// Initializes a new instance of the GenericResource class. - /// - public GenericResource() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the GenericResource class. - /// - /// Resource ID - /// Resource name - /// Resource type - /// Resource location - /// Resource extended location. - /// Resource tags - /// The plan of the resource. - /// The resource properties. - /// The kind of the resource. - /// ID of the resource that manages this - /// resource. - /// The SKU of the resource. - /// The identity of the resource. - public GenericResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), ExtendedLocation extendedLocation = default(ExtendedLocation), IDictionary tags = default(IDictionary), Plan plan = default(Plan), object properties = default(object), string kind = default(string), string managedBy = default(string), Sku sku = default(Sku), Identity identity = default(Identity)) - : base(id, name, type, location, extendedLocation, tags) - { - Plan = plan; - Properties = properties; - Kind = kind; - ManagedBy = managedBy; - Sku = sku; - Identity = identity; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the plan of the resource. - /// - [JsonProperty(PropertyName = "plan")] - public Plan Plan { get; set; } - - /// - /// Gets or sets the resource properties. - /// - [JsonProperty(PropertyName = "properties")] - public object Properties { get; set; } - - /// - /// Gets or sets the kind of the resource. - /// - [JsonProperty(PropertyName = "kind")] - public string Kind { get; set; } - - /// - /// Gets or sets ID of the resource that manages this resource. - /// - [JsonProperty(PropertyName = "managedBy")] - public string ManagedBy { get; set; } - - /// - /// Gets or sets the SKU of the resource. - /// - [JsonProperty(PropertyName = "sku")] - public Sku Sku { get; set; } - - /// - /// Gets or sets the identity of the resource. - /// - [JsonProperty(PropertyName = "identity")] - public Identity Identity { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Kind != null) - { - if (!System.Text.RegularExpressions.Regex.IsMatch(Kind, "^[-\\w\\._,\\(\\)]+$")) - { - throw new ValidationException(ValidationRules.Pattern, "Kind", "^[-\\w\\._,\\(\\)]+$"); - } - } - } - } -} diff --git a/src/Resources/Resources.Sdk/Generated/Models/GenericResourceExpanded.cs b/src/Resources/Resources.Sdk/Generated/Models/GenericResourceExpanded.cs deleted file mode 100644 index 637e3ac492e0..000000000000 --- a/src/Resources/Resources.Sdk/Generated/Models/GenericResourceExpanded.cs +++ /dev/null @@ -1,100 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Resource information. - /// - public partial class GenericResourceExpanded : GenericResource - { - /// - /// Initializes a new instance of the GenericResourceExpanded class. - /// - public GenericResourceExpanded() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the GenericResourceExpanded class. - /// - /// Resource ID - /// Resource name - /// Resource type - /// Resource location - /// Resource extended location. - /// Resource tags - /// The plan of the resource. - /// The resource properties. - /// The kind of the resource. - /// ID of the resource that manages this - /// resource. - /// The SKU of the resource. - /// The identity of the resource. - /// The created time of the resource. This is - /// only present if requested via the $expand query parameter. - /// The changed time of the resource. This is - /// only present if requested via the $expand query parameter. - /// The provisioning state of the - /// resource. This is only present if requested via the $expand query - /// parameter. - public GenericResourceExpanded(string id = default(string), string name = default(string), string type = default(string), string location = default(string), ExtendedLocation extendedLocation = default(ExtendedLocation), IDictionary tags = default(IDictionary), Plan plan = default(Plan), object properties = default(object), string kind = default(string), string managedBy = default(string), Sku sku = default(Sku), Identity identity = default(Identity), System.DateTime? createdTime = default(System.DateTime?), System.DateTime? changedTime = default(System.DateTime?), string provisioningState = default(string)) - : base(id, name, type, location, extendedLocation, tags, plan, properties, kind, managedBy, sku, identity) - { - CreatedTime = createdTime; - ChangedTime = changedTime; - ProvisioningState = provisioningState; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets the created time of the resource. This is only present if - /// requested via the $expand query parameter. - /// - [JsonProperty(PropertyName = "createdTime")] - public System.DateTime? CreatedTime { get; private set; } - - /// - /// Gets the changed time of the resource. This is only present if - /// requested via the $expand query parameter. - /// - [JsonProperty(PropertyName = "changedTime")] - public System.DateTime? ChangedTime { get; private set; } - - /// - /// Gets the provisioning state of the resource. This is only present - /// if requested via the $expand query parameter. - /// - [JsonProperty(PropertyName = "provisioningState")] - public string ProvisioningState { get; private set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - } - } -} diff --git a/src/Resources/Resources.Sdk/Generated/Models/Identity.cs b/src/Resources/Resources.Sdk/Generated/Models/Identity.cs deleted file mode 100644 index 984fdd9852ad..000000000000 --- a/src/Resources/Resources.Sdk/Generated/Models/Identity.cs +++ /dev/null @@ -1,88 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Identity for the resource. - /// - public partial class Identity - { - /// - /// Initializes a new instance of the Identity class. - /// - public Identity() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Identity class. - /// - /// The principal ID of resource - /// identity. - /// The tenant ID of resource. - /// The identity type. Possible values include: - /// 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', - /// 'None' - /// The list of user identities - /// associated with the resource. The user identity dictionary key - /// references will be ARM resource ids in the form: - /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - public Identity(string principalId = default(string), string tenantId = default(string), ResourceIdentityType? type = default(ResourceIdentityType?), IDictionary userAssignedIdentities = default(IDictionary)) - { - PrincipalId = principalId; - TenantId = tenantId; - Type = type; - UserAssignedIdentities = userAssignedIdentities; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets the principal ID of resource identity. - /// - [JsonProperty(PropertyName = "principalId")] - public string PrincipalId { get; private set; } - - /// - /// Gets the tenant ID of resource. - /// - [JsonProperty(PropertyName = "tenantId")] - public string TenantId { get; private set; } - - /// - /// Gets or sets the identity type. Possible values include: - /// 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', - /// 'None' - /// - [JsonProperty(PropertyName = "type")] - public ResourceIdentityType? Type { get; set; } - - /// - /// Gets or sets the list of user identities associated with the - /// resource. The user identity dictionary key references will be ARM - /// resource ids in the form: - /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - /// - [JsonProperty(PropertyName = "userAssignedIdentities")] - public IDictionary UserAssignedIdentities { get; set; } - - } -} diff --git a/src/Resources/Resources.Sdk/Generated/Models/Page.cs b/src/Resources/Resources.Sdk/Generated/Models/Page.cs deleted file mode 100644 index 6978b2600aa6..000000000000 --- a/src/Resources/Resources.Sdk/Generated/Models/Page.cs +++ /dev/null @@ -1,53 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - - /// - /// Defines a page in Azure responses. - /// - /// Type of the page content items - [JsonObject] - public class Page : IPage - { - /// - /// Gets the link to the next page. - /// - [JsonProperty("nextLink")] - public string NextPageLink { get; private set; } - - [JsonProperty("value")] - private IList Items{ get; set; } - - /// - /// Returns an enumerator that iterates through the collection. - /// - /// A an enumerator that can be used to iterate through the collection. - public IEnumerator GetEnumerator() - { - return Items == null ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator(); - } - - /// - /// Returns an enumerator that iterates through the collection. - /// - /// A an enumerator that can be used to iterate through the collection. - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - } -} diff --git a/src/Resources/Resources.Sdk/Generated/Models/Page1.cs b/src/Resources/Resources.Sdk/Generated/Models/Page1.cs deleted file mode 100644 index 879d3363a9fa..000000000000 --- a/src/Resources/Resources.Sdk/Generated/Models/Page1.cs +++ /dev/null @@ -1,53 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - - /// - /// Defines a page in Azure responses. - /// - /// Type of the page content items - [JsonObject] - public class Page1 : IPage - { - /// - /// Gets the link to the next page. - /// - [JsonProperty("nextLink")] - public string NextPageLink { get; private set; } - - [JsonProperty("value")] - private IList Items{ get; set; } - - /// - /// Returns an enumerator that iterates through the collection. - /// - /// A an enumerator that can be used to iterate through the collection. - public IEnumerator GetEnumerator() - { - return Items == null ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator(); - } - - /// - /// Returns an enumerator that iterates through the collection. - /// - /// A an enumerator that can be used to iterate through the collection. - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - } -} diff --git a/src/Resources/Resources.Sdk/Generated/Models/Permission.cs b/src/Resources/Resources.Sdk/Generated/Models/Permission.cs deleted file mode 100644 index 0eb4c7f2f57c..000000000000 --- a/src/Resources/Resources.Sdk/Generated/Models/Permission.cs +++ /dev/null @@ -1,77 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Role definition permissions. - /// - public partial class Permission - { - /// - /// Initializes a new instance of the Permission class. - /// - public Permission() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Permission class. - /// - /// Allowed actions. - /// Denied actions. - /// Allowed Data actions. - /// Denied Data actions. - public Permission(IList actions = default(IList), IList notActions = default(IList), IList dataActions = default(IList), IList notDataActions = default(IList)) - { - Actions = actions; - NotActions = notActions; - DataActions = dataActions; - NotDataActions = notDataActions; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets allowed actions. - /// - [JsonProperty(PropertyName = "actions")] - public IList Actions { get; set; } - - /// - /// Gets or sets denied actions. - /// - [JsonProperty(PropertyName = "notActions")] - public IList NotActions { get; set; } - - /// - /// Gets or sets allowed Data actions. - /// - [JsonProperty(PropertyName = "dataActions")] - public IList DataActions { get; set; } - - /// - /// Gets or sets denied Data actions. - /// - [JsonProperty(PropertyName = "notDataActions")] - public IList NotDataActions { get; set; } - - } -} diff --git a/src/Resources/Resources.Sdk/Generated/Models/PrivateLinkAssociationPropertiesExpanded.cs b/src/Resources/Resources.Sdk/Generated/Models/PrivateLinkAssociationPropertiesExpanded.cs deleted file mode 100644 index 484b55dd37f9..000000000000 --- a/src/Resources/Resources.Sdk/Generated/Models/PrivateLinkAssociationPropertiesExpanded.cs +++ /dev/null @@ -1,79 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Private Link Association Properties. - /// - public partial class PrivateLinkAssociationPropertiesExpanded - { - /// - /// Initializes a new instance of the - /// PrivateLinkAssociationPropertiesExpanded class. - /// - public PrivateLinkAssociationPropertiesExpanded() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// PrivateLinkAssociationPropertiesExpanded class. - /// - /// The rmpl Resource ID. - /// Possible values include: - /// 'Enabled', 'Disabled' - /// The TenantID. - /// The scope of the private link - /// association. - public PrivateLinkAssociationPropertiesExpanded(string privateLink = default(string), string publicNetworkAccess = default(string), string tenantID = default(string), string scope = default(string)) - { - PrivateLink = privateLink; - PublicNetworkAccess = publicNetworkAccess; - TenantID = tenantID; - Scope = scope; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the rmpl Resource ID. - /// - [JsonProperty(PropertyName = "privateLink")] - public string PrivateLink { get; set; } - - /// - /// Gets or sets possible values include: 'Enabled', 'Disabled' - /// - [JsonProperty(PropertyName = "publicNetworkAccess")] - public string PublicNetworkAccess { get; set; } - - /// - /// Gets or sets the TenantID. - /// - [JsonProperty(PropertyName = "tenantID")] - public string TenantID { get; set; } - - /// - /// Gets or sets the scope of the private link association. - /// - [JsonProperty(PropertyName = "scope")] - public string Scope { get; set; } - - } -} diff --git a/src/Resources/Resources.Sdk/Generated/Models/ProviderResourceType.cs b/src/Resources/Resources.Sdk/Generated/Models/ProviderResourceType.cs deleted file mode 100644 index 0309c1d45f5c..000000000000 --- a/src/Resources/Resources.Sdk/Generated/Models/ProviderResourceType.cs +++ /dev/null @@ -1,131 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Resource type managed by the resource provider. - /// - public partial class ProviderResourceType - { - /// - /// Initializes a new instance of the ProviderResourceType class. - /// - public ProviderResourceType() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ProviderResourceType class. - /// - /// The resource type. - /// The collection of locations where this - /// resource type can be created. - /// The location mappings that are - /// supported by this resource type. - /// The aliases that are supported by this - /// resource type. - /// The API version. - /// The default API version. - /// The API profiles for the resource - /// provider. - /// The additional capabilities offered by - /// this resource type. - /// The properties. - public ProviderResourceType(string resourceType = default(string), IList locations = default(IList), IList locationMappings = default(IList), IList aliases = default(IList), IList apiVersions = default(IList), string defaultApiVersion = default(string), IList zoneMappings = default(IList), IList apiProfiles = default(IList), string capabilities = default(string), IDictionary properties = default(IDictionary)) - { - ResourceType = resourceType; - Locations = locations; - LocationMappings = locationMappings; - Aliases = aliases; - ApiVersions = apiVersions; - DefaultApiVersion = defaultApiVersion; - ZoneMappings = zoneMappings; - ApiProfiles = apiProfiles; - Capabilities = capabilities; - Properties = properties; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the resource type. - /// - [JsonProperty(PropertyName = "resourceType")] - public string ResourceType { get; set; } - - /// - /// Gets or sets the collection of locations where this resource type - /// can be created. - /// - [JsonProperty(PropertyName = "locations")] - public IList Locations { get; set; } - - /// - /// Gets or sets the location mappings that are supported by this - /// resource type. - /// - [JsonProperty(PropertyName = "locationMappings")] - public IList LocationMappings { get; set; } - - /// - /// Gets or sets the aliases that are supported by this resource type. - /// - [JsonProperty(PropertyName = "aliases")] - public IList Aliases { get; set; } - - /// - /// Gets or sets the API version. - /// - [JsonProperty(PropertyName = "apiVersions")] - public IList ApiVersions { get; set; } - - /// - /// Gets the default API version. - /// - [JsonProperty(PropertyName = "defaultApiVersion")] - public string DefaultApiVersion { get; private set; } - - /// - /// - [JsonProperty(PropertyName = "zoneMappings")] - public IList ZoneMappings { get; set; } - - /// - /// Gets the API profiles for the resource provider. - /// - [JsonProperty(PropertyName = "apiProfiles")] - public IList ApiProfiles { get; private set; } - - /// - /// Gets or sets the additional capabilities offered by this resource - /// type. - /// - [JsonProperty(PropertyName = "capabilities")] - public string Capabilities { get; set; } - - /// - /// Gets or sets the properties. - /// - [JsonProperty(PropertyName = "properties")] - public IDictionary Properties { get; set; } - - } -} diff --git a/src/Resources/Resources.Sdk/Generated/Models/Subscription.cs b/src/Resources/Resources.Sdk/Generated/Models/Subscription.cs deleted file mode 100644 index bdebc9565886..000000000000 --- a/src/Resources/Resources.Sdk/Generated/Models/Subscription.cs +++ /dev/null @@ -1,133 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Subscription information. - /// - public partial class Subscription - { - /// - /// Initializes a new instance of the Subscription class. - /// - public Subscription() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Subscription class. - /// - /// The fully qualified ID for the subscription. For - /// example, - /// /subscriptions/00000000-0000-0000-0000-000000000000. - /// The subscription ID. - /// The subscription display name. - /// The subscription tenant ID. - /// The subscription state. Possible values are - /// Enabled, Warned, PastDue, Disabled, and Deleted. Possible values - /// include: 'Enabled', 'Warned', 'PastDue', 'Disabled', - /// 'Deleted' - /// The subscription - /// policies. - /// The authorization source of the - /// request. Valid values are one or more combinations of Legacy, - /// RoleBased, Bypassed, Direct and Management. For example, 'Legacy, - /// RoleBased'. - /// An array containing the tenants - /// managing the subscription. - /// The tags attached to the subscription. - public Subscription(string id = default(string), string subscriptionId = default(string), string displayName = default(string), string tenantId = default(string), SubscriptionState? state = default(SubscriptionState?), SubscriptionPolicies subscriptionPolicies = default(SubscriptionPolicies), string authorizationSource = default(string), IList managedByTenants = default(IList), IDictionary tags = default(IDictionary)) - { - Id = id; - SubscriptionId = subscriptionId; - DisplayName = displayName; - TenantId = tenantId; - State = state; - SubscriptionPolicies = subscriptionPolicies; - AuthorizationSource = authorizationSource; - ManagedByTenants = managedByTenants; - Tags = tags; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets the fully qualified ID for the subscription. For example, - /// /subscriptions/00000000-0000-0000-0000-000000000000. - /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } - - /// - /// Gets the subscription ID. - /// - [JsonProperty(PropertyName = "subscriptionId")] - public string SubscriptionId { get; private set; } - - /// - /// Gets the subscription display name. - /// - [JsonProperty(PropertyName = "displayName")] - public string DisplayName { get; private set; } - - /// - /// Gets the subscription tenant ID. - /// - [JsonProperty(PropertyName = "tenantId")] - public string TenantId { get; private set; } - - /// - /// Gets the subscription state. Possible values are Enabled, Warned, - /// PastDue, Disabled, and Deleted. Possible values include: 'Enabled', - /// 'Warned', 'PastDue', 'Disabled', 'Deleted' - /// - [JsonProperty(PropertyName = "state")] - public SubscriptionState? State { get; private set; } - - /// - /// Gets or sets the subscription policies. - /// - [JsonProperty(PropertyName = "subscriptionPolicies")] - public SubscriptionPolicies SubscriptionPolicies { get; set; } - - /// - /// Gets or sets the authorization source of the request. Valid values - /// are one or more combinations of Legacy, RoleBased, Bypassed, Direct - /// and Management. For example, 'Legacy, RoleBased'. - /// - [JsonProperty(PropertyName = "authorizationSource")] - public string AuthorizationSource { get; set; } - - /// - /// Gets or sets an array containing the tenants managing the - /// subscription. - /// - [JsonProperty(PropertyName = "managedByTenants")] - public IList ManagedByTenants { get; set; } - - /// - /// Gets or sets the tags attached to the subscription. - /// - [JsonProperty(PropertyName = "tags")] - public IDictionary Tags { get; set; } - - } -} diff --git a/src/Resources/Resources.Sdk/Generated/Models/SubscriptionFeatureRegistrationProperties.cs b/src/Resources/Resources.Sdk/Generated/Models/SubscriptionFeatureRegistrationProperties.cs deleted file mode 100644 index 254bcfe4e6bb..000000000000 --- a/src/Resources/Resources.Sdk/Generated/Models/SubscriptionFeatureRegistrationProperties.cs +++ /dev/null @@ -1,189 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - public partial class SubscriptionFeatureRegistrationProperties - { - /// - /// Initializes a new instance of the - /// SubscriptionFeatureRegistrationProperties class. - /// - public SubscriptionFeatureRegistrationProperties() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// SubscriptionFeatureRegistrationProperties class. - /// - /// The tenantId. - /// The subscriptionId. - /// The featureName. - /// The featureDisplayName. - /// The providerNamespace. - /// The state. Possible values include: - /// 'NotSpecified', 'NotRegistered', 'Pending', 'Registering', - /// 'Registered', 'Unregistering', 'Unregistered' - /// Key-value pairs for meta data. - /// The feature release date. - /// The feature registration - /// date. - /// The feature documentation - /// link. - /// The feature approval type. Possible - /// values include: 'NotSpecified', 'ApprovalRequired', - /// 'AutoApproval' - /// Indicates whether - /// feature should be displayed in Portal. - /// The feature description. - public SubscriptionFeatureRegistrationProperties(string tenantId = default(string), string subscriptionId = default(string), string featureName = default(string), string displayName = default(string), string providerNamespace = default(string), string state = default(string), AuthorizationProfile authorizationProfile = default(AuthorizationProfile), IDictionary metadata = default(IDictionary), System.DateTime? releaseDate = default(System.DateTime?), System.DateTime? registrationDate = default(System.DateTime?), string documentationLink = default(string), string approvalType = default(string), bool? shouldFeatureDisplayInPortal = default(bool?), string description = default(string)) - { - TenantId = tenantId; - SubscriptionId = subscriptionId; - FeatureName = featureName; - DisplayName = displayName; - ProviderNamespace = providerNamespace; - State = state; - AuthorizationProfile = authorizationProfile; - Metadata = metadata; - ReleaseDate = releaseDate; - RegistrationDate = registrationDate; - DocumentationLink = documentationLink; - ApprovalType = approvalType; - ShouldFeatureDisplayInPortal = shouldFeatureDisplayInPortal; - Description = description; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets the tenantId. - /// - [JsonProperty(PropertyName = "tenantId")] - public string TenantId { get; private set; } - - /// - /// Gets the subscriptionId. - /// - [JsonProperty(PropertyName = "subscriptionId")] - public string SubscriptionId { get; private set; } - - /// - /// Gets the featureName. - /// - [JsonProperty(PropertyName = "featureName")] - public string FeatureName { get; private set; } - - /// - /// Gets the featureDisplayName. - /// - [JsonProperty(PropertyName = "displayName")] - public string DisplayName { get; private set; } - - /// - /// Gets the providerNamespace. - /// - [JsonProperty(PropertyName = "providerNamespace")] - public string ProviderNamespace { get; private set; } - - /// - /// Gets or sets the state. Possible values include: 'NotSpecified', - /// 'NotRegistered', 'Pending', 'Registering', 'Registered', - /// 'Unregistering', 'Unregistered' - /// - [JsonProperty(PropertyName = "state")] - public string State { get; set; } - - /// - /// - [JsonProperty(PropertyName = "authorizationProfile")] - public AuthorizationProfile AuthorizationProfile { get; set; } - - /// - /// Gets or sets key-value pairs for meta data. - /// - [JsonProperty(PropertyName = "metadata")] - public IDictionary Metadata { get; set; } - - /// - /// Gets the feature release date. - /// - [JsonProperty(PropertyName = "releaseDate")] - public System.DateTime? ReleaseDate { get; private set; } - - /// - /// Gets the feature registration date. - /// - [JsonProperty(PropertyName = "registrationDate")] - public System.DateTime? RegistrationDate { get; private set; } - - /// - /// Gets the feature documentation link. - /// - [JsonProperty(PropertyName = "documentationLink")] - public string DocumentationLink { get; private set; } - - /// - /// Gets the feature approval type. Possible values include: - /// 'NotSpecified', 'ApprovalRequired', 'AutoApproval' - /// - [JsonProperty(PropertyName = "approvalType")] - public string ApprovalType { get; private set; } - - /// - /// Gets or sets indicates whether feature should be displayed in - /// Portal. - /// - [JsonProperty(PropertyName = "shouldFeatureDisplayInPortal")] - public bool? ShouldFeatureDisplayInPortal { get; set; } - - /// - /// Gets or sets the feature description. - /// - [JsonProperty(PropertyName = "description")] - public string Description { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (DocumentationLink != null) - { - if (DocumentationLink.Length > 1000) - { - throw new ValidationException(ValidationRules.MaxLength, "DocumentationLink", 1000); - } - } - if (Description != null) - { - if (Description.Length > 1000) - { - throw new ValidationException(ValidationRules.MaxLength, "Description", 1000); - } - } - } - } -} diff --git a/src/Resources/Resources.Sdk/Generated/Models/TemplateSpec.cs b/src/Resources/Resources.Sdk/Generated/Models/TemplateSpec.cs deleted file mode 100644 index f074c91f5705..000000000000 --- a/src/Resources/Resources.Sdk/Generated/Models/TemplateSpec.cs +++ /dev/null @@ -1,142 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Template Spec object. - /// - [Rest.Serialization.JsonTransformation] - public partial class TemplateSpec : AzureResourceBase - { - /// - /// Initializes a new instance of the TemplateSpec class. - /// - public TemplateSpec() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the TemplateSpec class. - /// - /// The location of the Template Spec. It cannot - /// be changed after Template Spec creation. It must be one of the - /// supported Azure locations. - /// String Id used to locate any resource on - /// Azure. - /// Name of this resource. - /// Type of this resource. - /// Azure Resource Manager metadata containing - /// createdBy and modifiedBy information. - /// Template Spec description. - /// Template Spec display name. - /// The Template Spec metadata. Metadata is an - /// open-ended object and is typically a collection of key-value - /// pairs. - /// High-level information about the versions - /// within this Template Spec. The keys are the version names. Only - /// populated if the $expand query parameter is set to - /// 'versions'. - /// Resource tags. - public TemplateSpec(string location, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string description = default(string), string displayName = default(string), object metadata = default(object), IDictionary versions = default(IDictionary), IDictionary tags = default(IDictionary)) - : base(id, name, type, systemData) - { - Location = location; - Description = description; - DisplayName = displayName; - Metadata = metadata; - Versions = versions; - Tags = tags; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the location of the Template Spec. It cannot be - /// changed after Template Spec creation. It must be one of the - /// supported Azure locations. - /// - [JsonProperty(PropertyName = "location")] - public string Location { get; set; } - - /// - /// Gets or sets template Spec description. - /// - [JsonProperty(PropertyName = "properties.description")] - public string Description { get; set; } - - /// - /// Gets or sets template Spec display name. - /// - [JsonProperty(PropertyName = "properties.displayName")] - public string DisplayName { get; set; } - - /// - /// Gets or sets the Template Spec metadata. Metadata is an open-ended - /// object and is typically a collection of key-value pairs. - /// - [JsonProperty(PropertyName = "properties.metadata")] - public object Metadata { get; set; } - - /// - /// Gets high-level information about the versions within this Template - /// Spec. The keys are the version names. Only populated if the $expand - /// query parameter is set to 'versions'. - /// - [JsonProperty(PropertyName = "properties.versions")] - public IDictionary Versions { get; private set; } - - /// - /// Gets or sets resource tags. - /// - [JsonProperty(PropertyName = "tags")] - public IDictionary Tags { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Location == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Location"); - } - if (Description != null) - { - if (Description.Length > 4096) - { - throw new ValidationException(ValidationRules.MaxLength, "Description", 4096); - } - } - if (DisplayName != null) - { - if (DisplayName.Length > 64) - { - throw new ValidationException(ValidationRules.MaxLength, "DisplayName", 64); - } - } - } - } -} diff --git a/src/Resources/Resources.Sdk/Generated/Models/TemplateSpecVersion.cs b/src/Resources/Resources.Sdk/Generated/Models/TemplateSpecVersion.cs deleted file mode 100644 index 1aed1386e529..000000000000 --- a/src/Resources/Resources.Sdk/Generated/Models/TemplateSpecVersion.cs +++ /dev/null @@ -1,151 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Template Spec Version object. - /// - [Rest.Serialization.JsonTransformation] - public partial class TemplateSpecVersion : AzureResourceBase - { - /// - /// Initializes a new instance of the TemplateSpecVersion class. - /// - public TemplateSpecVersion() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the TemplateSpecVersion class. - /// - /// The location of the Template Spec Version. - /// It must match the location of the parent Template Spec. - /// String Id used to locate any resource on - /// Azure. - /// Name of this resource. - /// Type of this resource. - /// Azure Resource Manager metadata containing - /// createdBy and modifiedBy information. - /// Template Spec version - /// description. - /// An array of linked template - /// artifacts. - /// The version metadata. Metadata is an - /// open-ended object and is typically a collection of key-value - /// pairs. - /// The main Azure Resource Manager template - /// content. - /// The Azure Resource Manager template - /// UI definition content. - /// Resource tags. - public TemplateSpecVersion(string location, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string description = default(string), IList linkedTemplates = default(IList), object metadata = default(object), object mainTemplate = default(object), object uiFormDefinition = default(object), IDictionary tags = default(IDictionary)) - : base(id, name, type, systemData) - { - Location = location; - Description = description; - LinkedTemplates = linkedTemplates; - Metadata = metadata; - MainTemplate = mainTemplate; - UiFormDefinition = uiFormDefinition; - Tags = tags; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the location of the Template Spec Version. It must - /// match the location of the parent Template Spec. - /// - [JsonProperty(PropertyName = "location")] - public string Location { get; set; } - - /// - /// Gets or sets template Spec version description. - /// - [JsonProperty(PropertyName = "properties.description")] - public string Description { get; set; } - - /// - /// Gets or sets an array of linked template artifacts. - /// - [JsonProperty(PropertyName = "properties.linkedTemplates")] - public IList LinkedTemplates { get; set; } - - /// - /// Gets or sets the version metadata. Metadata is an open-ended object - /// and is typically a collection of key-value pairs. - /// - [JsonProperty(PropertyName = "properties.metadata")] - public object Metadata { get; set; } - - /// - /// Gets or sets the main Azure Resource Manager template content. - /// - [JsonProperty(PropertyName = "properties.mainTemplate")] - public object MainTemplate { get; set; } - - /// - /// Gets or sets the Azure Resource Manager template UI definition - /// content. - /// - [JsonProperty(PropertyName = "properties.uiFormDefinition")] - public object UiFormDefinition { get; set; } - - /// - /// Gets or sets resource tags. - /// - [JsonProperty(PropertyName = "tags")] - public IDictionary Tags { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Location == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Location"); - } - if (Description != null) - { - if (Description.Length > 4096) - { - throw new ValidationException(ValidationRules.MaxLength, "Description", 4096); - } - } - if (LinkedTemplates != null) - { - foreach (var element in LinkedTemplates) - { - if (element != null) - { - element.Validate(); - } - } - } - } - } -} diff --git a/src/Resources/Resources.Sdk/Generated/Models/TenantIdDescription.cs b/src/Resources/Resources.Sdk/Generated/Models/TenantIdDescription.cs deleted file mode 100644 index 1d45e4f626e5..000000000000 --- a/src/Resources/Resources.Sdk/Generated/Models/TenantIdDescription.cs +++ /dev/null @@ -1,137 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Tenant Id information. - /// - public partial class TenantIdDescription - { - /// - /// Initializes a new instance of the TenantIdDescription class. - /// - public TenantIdDescription() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the TenantIdDescription class. - /// - /// The fully qualified ID of the tenant. For example, - /// /tenants/00000000-0000-0000-0000-000000000000. - /// The tenant ID. For example, - /// 00000000-0000-0000-0000-000000000000. - /// Category of the tenant. Possible - /// values include: 'Home', 'ProjectedBy', 'ManagedBy' - /// Country/region name of the address for the - /// tenant. - /// Country/region abbreviation for the - /// tenant. - /// The display name of the tenant. - /// The list of domains for the tenant. - /// The default domain for the - /// tenant. - /// The tenant type. Only available for 'Home' - /// tenant category. - /// The tenant's branding logo URL. - /// Only available for 'Home' tenant category. - public TenantIdDescription(string id = default(string), string tenantId = default(string), TenantCategory? tenantCategory = default(TenantCategory?), string country = default(string), string countryCode = default(string), string displayName = default(string), IList domains = default(IList), string defaultDomain = default(string), string tenantType = default(string), string tenantBrandingLogoUrl = default(string)) - { - Id = id; - TenantId = tenantId; - TenantCategory = tenantCategory; - Country = country; - CountryCode = countryCode; - DisplayName = displayName; - Domains = domains; - DefaultDomain = defaultDomain; - TenantType = tenantType; - TenantBrandingLogoUrl = tenantBrandingLogoUrl; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets the fully qualified ID of the tenant. For example, - /// /tenants/00000000-0000-0000-0000-000000000000. - /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } - - /// - /// Gets the tenant ID. For example, - /// 00000000-0000-0000-0000-000000000000. - /// - [JsonProperty(PropertyName = "tenantId")] - public string TenantId { get; private set; } - - /// - /// Gets category of the tenant. Possible values include: 'Home', - /// 'ProjectedBy', 'ManagedBy' - /// - [JsonProperty(PropertyName = "tenantCategory")] - public TenantCategory? TenantCategory { get; private set; } - - /// - /// Gets country/region name of the address for the tenant. - /// - [JsonProperty(PropertyName = "country")] - public string Country { get; private set; } - - /// - /// Gets country/region abbreviation for the tenant. - /// - [JsonProperty(PropertyName = "countryCode")] - public string CountryCode { get; private set; } - - /// - /// Gets the display name of the tenant. - /// - [JsonProperty(PropertyName = "displayName")] - public string DisplayName { get; private set; } - - /// - /// Gets the list of domains for the tenant. - /// - [JsonProperty(PropertyName = "domains")] - public IList Domains { get; private set; } - - /// - /// Gets the default domain for the tenant. - /// - [JsonProperty(PropertyName = "defaultDomain")] - public string DefaultDomain { get; private set; } - - /// - /// Gets the tenant type. Only available for 'Home' tenant category. - /// - [JsonProperty(PropertyName = "tenantType")] - public string TenantType { get; private set; } - - /// - /// Gets the tenant's branding logo URL. Only available for 'Home' - /// tenant category. - /// - [JsonProperty(PropertyName = "tenantBrandingLogoUrl")] - public string TenantBrandingLogoUrl { get; private set; } - - } -} diff --git a/src/Resources/Resources.Sdk/Generated/OperationsExtensions.cs b/src/Resources/Resources.Sdk/Generated/OperationsExtensions.cs deleted file mode 100644 index 4c67ffb50c97..000000000000 --- a/src/Resources/Resources.Sdk/Generated/OperationsExtensions.cs +++ /dev/null @@ -1,87 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for Operations. - /// - public static partial class OperationsExtensions - { - /// - /// Lists all of the available Microsoft.Resources REST API operations. - /// - /// - /// The operations group for this extension method. - /// - public static IPage List(this IOperations operations) - { - return operations.ListAsync().GetAwaiter().GetResult(); - } - - /// - /// Lists all of the available Microsoft.Resources REST API operations. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IOperations operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Lists all of the available Microsoft.Resources REST API operations. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Lists all of the available Microsoft.Resources REST API operations. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/src/Resources/Resources.Sdk/Generated/PrivateLinkAssociationOperationsExtensions.cs b/src/Resources/Resources.Sdk/Generated/PrivateLinkAssociationOperationsExtensions.cs deleted file mode 100644 index 59e41861831d..000000000000 --- a/src/Resources/Resources.Sdk/Generated/PrivateLinkAssociationOperationsExtensions.cs +++ /dev/null @@ -1,182 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for PrivateLinkAssociationOperations. - /// - public static partial class PrivateLinkAssociationOperationsExtensions - { - /// - /// Create a PrivateLinkAssociation - /// - /// - /// The operations group for this extension method. - /// - /// - /// The management group ID. - /// - /// - /// The ID of the PLA - /// - /// - /// Parameters supplied to create the private link association. - /// - public static PrivateLinkAssociation Put(this IPrivateLinkAssociationOperations operations, string groupId, string plaId, PrivateLinkAssociationObject parameters) - { - return operations.PutAsync(groupId, plaId, parameters).GetAwaiter().GetResult(); - } - - /// - /// Create a PrivateLinkAssociation - /// - /// - /// The operations group for this extension method. - /// - /// - /// The management group ID. - /// - /// - /// The ID of the PLA - /// - /// - /// Parameters supplied to create the private link association. - /// - /// - /// The cancellation token. - /// - public static async Task PutAsync(this IPrivateLinkAssociationOperations operations, string groupId, string plaId, PrivateLinkAssociationObject parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.PutWithHttpMessagesAsync(groupId, plaId, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get a single private link association - /// - /// - /// The operations group for this extension method. - /// - /// - /// The management group ID. - /// - /// - /// The ID of the PLA - /// - public static PrivateLinkAssociation Get(this IPrivateLinkAssociationOperations operations, string groupId, string plaId) - { - return operations.GetAsync(groupId, plaId).GetAwaiter().GetResult(); - } - - /// - /// Get a single private link association - /// - /// - /// The operations group for this extension method. - /// - /// - /// The management group ID. - /// - /// - /// The ID of the PLA - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IPrivateLinkAssociationOperations operations, string groupId, string plaId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(groupId, plaId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Delete a PrivateLinkAssociation - /// - /// - /// The operations group for this extension method. - /// - /// - /// The management group ID. - /// - /// - /// The ID of the PLA - /// - public static void Delete(this IPrivateLinkAssociationOperations operations, string groupId, string plaId) - { - operations.DeleteAsync(groupId, plaId).GetAwaiter().GetResult(); - } - - /// - /// Delete a PrivateLinkAssociation - /// - /// - /// The operations group for this extension method. - /// - /// - /// The management group ID. - /// - /// - /// The ID of the PLA - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this IPrivateLinkAssociationOperations operations, string groupId, string plaId, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteWithHttpMessagesAsync(groupId, plaId, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Get a private link association for a management group scope - /// - /// - /// The operations group for this extension method. - /// - /// - /// The management group ID. - /// - public static PrivateLinkAssociationGetResult List(this IPrivateLinkAssociationOperations operations, string groupId) - { - return operations.ListAsync(groupId).GetAwaiter().GetResult(); - } - - /// - /// Get a private link association for a management group scope - /// - /// - /// The operations group for this extension method. - /// - /// - /// The management group ID. - /// - /// - /// The cancellation token. - /// - public static async Task ListAsync(this IPrivateLinkAssociationOperations operations, string groupId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(groupId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/src/Resources/Resources.Sdk/Generated/ProviderResourceTypesOperationsExtensions.cs b/src/Resources/Resources.Sdk/Generated/ProviderResourceTypesOperationsExtensions.cs deleted file mode 100644 index 36c18b1756b4..000000000000 --- a/src/Resources/Resources.Sdk/Generated/ProviderResourceTypesOperationsExtensions.cs +++ /dev/null @@ -1,67 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for ProviderResourceTypesOperations. - /// - public static partial class ProviderResourceTypesOperationsExtensions - { - /// - /// List the resource types for a specified resource provider. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The namespace of the resource provider. - /// - /// - /// The $expand query parameter. For example, to include property aliases in - /// response, use $expand=resourceTypes/aliases. - /// - public static ProviderResourceTypeListResult List(this IProviderResourceTypesOperations operations, string resourceProviderNamespace, string expand = default(string)) - { - return operations.ListAsync(resourceProviderNamespace, expand).GetAwaiter().GetResult(); - } - - /// - /// List the resource types for a specified resource provider. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The namespace of the resource provider. - /// - /// - /// The $expand query parameter. For example, to include property aliases in - /// response, use $expand=resourceTypes/aliases. - /// - /// - /// The cancellation token. - /// - public static async Task ListAsync(this IProviderResourceTypesOperations operations, string resourceProviderNamespace, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(resourceProviderNamespace, expand, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/src/Resources/Resources.Sdk/Generated/ProvidersOperationsExtensions.cs b/src/Resources/Resources.Sdk/Generated/ProvidersOperationsExtensions.cs deleted file mode 100644 index 7f98dffec6c4..000000000000 --- a/src/Resources/Resources.Sdk/Generated/ProvidersOperationsExtensions.cs +++ /dev/null @@ -1,410 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for ProvidersOperations. - /// - public static partial class ProvidersOperationsExtensions - { - /// - /// Unregisters a subscription from a resource provider. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The namespace of the resource provider to unregister. - /// - public static Provider Unregister(this IProvidersOperations operations, string resourceProviderNamespace) - { - return operations.UnregisterAsync(resourceProviderNamespace).GetAwaiter().GetResult(); - } - - /// - /// Unregisters a subscription from a resource provider. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The namespace of the resource provider to unregister. - /// - /// - /// The cancellation token. - /// - public static async Task UnregisterAsync(this IProvidersOperations operations, string resourceProviderNamespace, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UnregisterWithHttpMessagesAsync(resourceProviderNamespace, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Registers a management group with a resource provider. Use this operation - /// to register a resource provider with resource types that can be deployed at - /// the management group scope. It does not recursively register subscriptions - /// within the management group. Instead, you must register subscriptions - /// individually. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The namespace of the resource provider to register. - /// - /// - /// The management group ID. - /// - public static void RegisterAtManagementGroupScope(this IProvidersOperations operations, string resourceProviderNamespace, string groupId) - { - operations.RegisterAtManagementGroupScopeAsync(resourceProviderNamespace, groupId).GetAwaiter().GetResult(); - } - - /// - /// Registers a management group with a resource provider. Use this operation - /// to register a resource provider with resource types that can be deployed at - /// the management group scope. It does not recursively register subscriptions - /// within the management group. Instead, you must register subscriptions - /// individually. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The namespace of the resource provider to register. - /// - /// - /// The management group ID. - /// - /// - /// The cancellation token. - /// - public static async Task RegisterAtManagementGroupScopeAsync(this IProvidersOperations operations, string resourceProviderNamespace, string groupId, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.RegisterAtManagementGroupScopeWithHttpMessagesAsync(resourceProviderNamespace, groupId, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Get the provider permissions. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The namespace of the resource provider. - /// - public static ProviderPermissionListResult ProviderPermissions(this IProvidersOperations operations, string resourceProviderNamespace) - { - return operations.ProviderPermissionsAsync(resourceProviderNamespace).GetAwaiter().GetResult(); - } - - /// - /// Get the provider permissions. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The namespace of the resource provider. - /// - /// - /// The cancellation token. - /// - public static async Task ProviderPermissionsAsync(this IProvidersOperations operations, string resourceProviderNamespace, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ProviderPermissionsWithHttpMessagesAsync(resourceProviderNamespace, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Registers a subscription with a resource provider. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The namespace of the resource provider to register. - /// - /// - /// The third party consent for S2S. - /// - public static Provider Register(this IProvidersOperations operations, string resourceProviderNamespace, ProviderRegistrationRequest properties = default(ProviderRegistrationRequest)) - { - return operations.RegisterAsync(resourceProviderNamespace, properties).GetAwaiter().GetResult(); - } - - /// - /// Registers a subscription with a resource provider. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The namespace of the resource provider to register. - /// - /// - /// The third party consent for S2S. - /// - /// - /// The cancellation token. - /// - public static async Task RegisterAsync(this IProvidersOperations operations, string resourceProviderNamespace, ProviderRegistrationRequest properties = default(ProviderRegistrationRequest), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.RegisterWithHttpMessagesAsync(resourceProviderNamespace, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets all resource providers for a subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The properties to include in the results. For example, use - /// &$expand=metadata in the query string to retrieve resource provider - /// metadata. To include property aliases in response, use - /// $expand=resourceTypes/aliases. - /// - public static IPage List(this IProvidersOperations operations, string expand = default(string)) - { - return operations.ListAsync(expand).GetAwaiter().GetResult(); - } - - /// - /// Gets all resource providers for a subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The properties to include in the results. For example, use - /// &$expand=metadata in the query string to retrieve resource provider - /// metadata. To include property aliases in response, use - /// $expand=resourceTypes/aliases. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IProvidersOperations operations, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(expand, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets all resource providers for the tenant. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The properties to include in the results. For example, use - /// &$expand=metadata in the query string to retrieve resource provider - /// metadata. To include property aliases in response, use - /// $expand=resourceTypes/aliases. - /// - public static IPage ListAtTenantScope(this IProvidersOperations operations, string expand = default(string)) - { - return operations.ListAtTenantScopeAsync(expand).GetAwaiter().GetResult(); - } - - /// - /// Gets all resource providers for the tenant. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The properties to include in the results. For example, use - /// &$expand=metadata in the query string to retrieve resource provider - /// metadata. To include property aliases in response, use - /// $expand=resourceTypes/aliases. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAtTenantScopeAsync(this IProvidersOperations operations, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListAtTenantScopeWithHttpMessagesAsync(expand, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the specified resource provider. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The namespace of the resource provider. - /// - /// - /// The $expand query parameter. For example, to include property aliases in - /// response, use $expand=resourceTypes/aliases. - /// - public static Provider Get(this IProvidersOperations operations, string resourceProviderNamespace, string expand = default(string)) - { - return operations.GetAsync(resourceProviderNamespace, expand).GetAwaiter().GetResult(); - } - - /// - /// Gets the specified resource provider. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The namespace of the resource provider. - /// - /// - /// The $expand query parameter. For example, to include property aliases in - /// response, use $expand=resourceTypes/aliases. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IProvidersOperations operations, string resourceProviderNamespace, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceProviderNamespace, expand, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the specified resource provider at the tenant level. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The namespace of the resource provider. - /// - /// - /// The $expand query parameter. For example, to include property aliases in - /// response, use $expand=resourceTypes/aliases. - /// - public static Provider GetAtTenantScope(this IProvidersOperations operations, string resourceProviderNamespace, string expand = default(string)) - { - return operations.GetAtTenantScopeAsync(resourceProviderNamespace, expand).GetAwaiter().GetResult(); - } - - /// - /// Gets the specified resource provider at the tenant level. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The namespace of the resource provider. - /// - /// - /// The $expand query parameter. For example, to include property aliases in - /// response, use $expand=resourceTypes/aliases. - /// - /// - /// The cancellation token. - /// - public static async Task GetAtTenantScopeAsync(this IProvidersOperations operations, string resourceProviderNamespace, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetAtTenantScopeWithHttpMessagesAsync(resourceProviderNamespace, expand, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets all resource providers for a subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IProvidersOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets all resource providers for a subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IProvidersOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets all resource providers for the tenant. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListAtTenantScopeNext(this IProvidersOperations operations, string nextPageLink) - { - return operations.ListAtTenantScopeNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets all resource providers for the tenant. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAtTenantScopeNextAsync(this IProvidersOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListAtTenantScopeNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/src/Resources/Resources.Sdk/Generated/ResourceGroupsOperationsExtensions.cs b/src/Resources/Resources.Sdk/Generated/ResourceGroupsOperationsExtensions.cs deleted file mode 100644 index 3754340c8539..000000000000 --- a/src/Resources/Resources.Sdk/Generated/ResourceGroupsOperationsExtensions.cs +++ /dev/null @@ -1,438 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for ResourceGroupsOperations. - /// - public static partial class ResourceGroupsOperationsExtensions - { - /// - /// Checks whether a resource group exists. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group to check. The name is case insensitive. - /// - public static bool CheckExistence(this IResourceGroupsOperations operations, string resourceGroupName) - { - return operations.CheckExistenceAsync(resourceGroupName).GetAwaiter().GetResult(); - } - - /// - /// Checks whether a resource group exists. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group to check. The name is case insensitive. - /// - /// - /// The cancellation token. - /// - public static async Task CheckExistenceAsync(this IResourceGroupsOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CheckExistenceWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates or updates a resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group to create or update. Can include - /// alphanumeric, underscore, parentheses, hyphen, period (except at end), and - /// Unicode characters that match the allowed characters. - /// - /// - /// Parameters supplied to the create or update a resource group. - /// - public static ResourceGroup CreateOrUpdate(this IResourceGroupsOperations operations, string resourceGroupName, ResourceGroup parameters) - { - return operations.CreateOrUpdateAsync(resourceGroupName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Creates or updates a resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group to create or update. Can include - /// alphanumeric, underscore, parentheses, hyphen, period (except at end), and - /// Unicode characters that match the allowed characters. - /// - /// - /// Parameters supplied to the create or update a resource group. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateAsync(this IResourceGroupsOperations operations, string resourceGroupName, ResourceGroup parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a resource group. - /// - /// - /// When you delete a resource group, all of its resources are also deleted. - /// Deleting a resource group deletes all of its template deployments and - /// currently stored operations. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group to delete. The name is case insensitive. - /// - /// - /// The resource types you want to force delete. Currently, only the following - /// is supported: - /// forceDeletionTypes=Microsoft.Compute/virtualMachines,Microsoft.Compute/virtualMachineScaleSets - /// - public static void Delete(this IResourceGroupsOperations operations, string resourceGroupName, string forceDeletionTypes = default(string)) - { - operations.DeleteAsync(resourceGroupName, forceDeletionTypes).GetAwaiter().GetResult(); - } - - /// - /// Deletes a resource group. - /// - /// - /// When you delete a resource group, all of its resources are also deleted. - /// Deleting a resource group deletes all of its template deployments and - /// currently stored operations. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group to delete. The name is case insensitive. - /// - /// - /// The resource types you want to force delete. Currently, only the following - /// is supported: - /// forceDeletionTypes=Microsoft.Compute/virtualMachines,Microsoft.Compute/virtualMachineScaleSets - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this IResourceGroupsOperations operations, string resourceGroupName, string forceDeletionTypes = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, forceDeletionTypes, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Gets a resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group to get. The name is case insensitive. - /// - public static ResourceGroup Get(this IResourceGroupsOperations operations, string resourceGroupName) - { - return operations.GetAsync(resourceGroupName).GetAwaiter().GetResult(); - } - - /// - /// Gets a resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group to get. The name is case insensitive. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IResourceGroupsOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Updates a resource group. - /// - /// - /// Resource groups can be updated through a simple PATCH operation to a group - /// address. The format of the request is the same as that for creating a - /// resource group. If a field is unspecified, the current value is retained. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group to update. The name is case insensitive. - /// - /// - /// Parameters supplied to update a resource group. - /// - public static ResourceGroup Update(this IResourceGroupsOperations operations, string resourceGroupName, ResourceGroupPatchable parameters) - { - return operations.UpdateAsync(resourceGroupName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Updates a resource group. - /// - /// - /// Resource groups can be updated through a simple PATCH operation to a group - /// address. The format of the request is the same as that for creating a - /// resource group. If a field is unspecified, the current value is retained. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group to update. The name is case insensitive. - /// - /// - /// Parameters supplied to update a resource group. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateAsync(this IResourceGroupsOperations operations, string resourceGroupName, ResourceGroupPatchable parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Captures the specified resource group as a template. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Parameters for exporting the template. - /// - public static ResourceGroupExportResult ExportTemplate(this IResourceGroupsOperations operations, string resourceGroupName, ExportTemplateRequest parameters) - { - return operations.ExportTemplateAsync(resourceGroupName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Captures the specified resource group as a template. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Parameters for exporting the template. - /// - /// - /// The cancellation token. - /// - public static async Task ExportTemplateAsync(this IResourceGroupsOperations operations, string resourceGroupName, ExportTemplateRequest parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ExportTemplateWithHttpMessagesAsync(resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets all the resource groups for a subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// OData parameters to apply to the operation. - /// - public static IPage List(this IResourceGroupsOperations operations, ODataQuery odataQuery = default(ODataQuery)) - { - return operations.ListAsync(odataQuery).GetAwaiter().GetResult(); - } - - /// - /// Gets all the resource groups for a subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IResourceGroupsOperations operations, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(odataQuery, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a resource group. - /// - /// - /// When you delete a resource group, all of its resources are also deleted. - /// Deleting a resource group deletes all of its template deployments and - /// currently stored operations. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group to delete. The name is case insensitive. - /// - /// - /// The resource types you want to force delete. Currently, only the following - /// is supported: - /// forceDeletionTypes=Microsoft.Compute/virtualMachines,Microsoft.Compute/virtualMachineScaleSets - /// - public static void BeginDelete(this IResourceGroupsOperations operations, string resourceGroupName, string forceDeletionTypes = default(string)) - { - operations.BeginDeleteAsync(resourceGroupName, forceDeletionTypes).GetAwaiter().GetResult(); - } - - /// - /// Deletes a resource group. - /// - /// - /// When you delete a resource group, all of its resources are also deleted. - /// Deleting a resource group deletes all of its template deployments and - /// currently stored operations. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group to delete. The name is case insensitive. - /// - /// - /// The resource types you want to force delete. Currently, only the following - /// is supported: - /// forceDeletionTypes=Microsoft.Compute/virtualMachines,Microsoft.Compute/virtualMachineScaleSets - /// - /// - /// The cancellation token. - /// - public static async Task BeginDeleteAsync(this IResourceGroupsOperations operations, string resourceGroupName, string forceDeletionTypes = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, forceDeletionTypes, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Captures the specified resource group as a template. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Parameters for exporting the template. - /// - public static ResourceGroupExportResult BeginExportTemplate(this IResourceGroupsOperations operations, string resourceGroupName, ExportTemplateRequest parameters) - { - return operations.BeginExportTemplateAsync(resourceGroupName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Captures the specified resource group as a template. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Parameters for exporting the template. - /// - /// - /// The cancellation token. - /// - public static async Task BeginExportTemplateAsync(this IResourceGroupsOperations operations, string resourceGroupName, ExportTemplateRequest parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginExportTemplateWithHttpMessagesAsync(resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets all the resource groups for a subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IResourceGroupsOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets all the resource groups for a subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IResourceGroupsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/src/Resources/Resources.Sdk/Generated/ResourceManagementPrivateLinkOperationsExtensions.cs b/src/Resources/Resources.Sdk/Generated/ResourceManagementPrivateLinkOperationsExtensions.cs deleted file mode 100644 index 8ff27f962593..000000000000 --- a/src/Resources/Resources.Sdk/Generated/ResourceManagementPrivateLinkOperationsExtensions.cs +++ /dev/null @@ -1,210 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for ResourceManagementPrivateLinkOperations. - /// - public static partial class ResourceManagementPrivateLinkOperationsExtensions - { - /// - /// Create a resource management group private link. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the resource management private link. - /// - /// - /// The region to create the Resource Management private link. - /// - public static ResourceManagementPrivateLink Put(this IResourceManagementPrivateLinkOperations operations, string resourceGroupName, string rmplName, ResourceManagementPrivateLinkLocation parameters) - { - return operations.PutAsync(resourceGroupName, rmplName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Create a resource management group private link. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the resource management private link. - /// - /// - /// The region to create the Resource Management private link. - /// - /// - /// The cancellation token. - /// - public static async Task PutAsync(this IResourceManagementPrivateLinkOperations operations, string resourceGroupName, string rmplName, ResourceManagementPrivateLinkLocation parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.PutWithHttpMessagesAsync(resourceGroupName, rmplName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get a resource management private link(resource-level). - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the resource management private link. - /// - public static ResourceManagementPrivateLink Get(this IResourceManagementPrivateLinkOperations operations, string resourceGroupName, string rmplName) - { - return operations.GetAsync(resourceGroupName, rmplName).GetAwaiter().GetResult(); - } - - /// - /// Get a resource management private link(resource-level). - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the resource management private link. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IResourceManagementPrivateLinkOperations operations, string resourceGroupName, string rmplName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, rmplName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Delete a resource management private link. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the resource management private link. - /// - public static void Delete(this IResourceManagementPrivateLinkOperations operations, string resourceGroupName, string rmplName) - { - operations.DeleteAsync(resourceGroupName, rmplName).GetAwaiter().GetResult(); - } - - /// - /// Delete a resource management private link. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the resource management private link. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this IResourceManagementPrivateLinkOperations operations, string resourceGroupName, string rmplName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, rmplName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Get all the resource management private links in a subscription. - /// - /// - /// The operations group for this extension method. - /// - public static ResourceManagementPrivateLinkListResult List(this IResourceManagementPrivateLinkOperations operations) - { - return operations.ListAsync().GetAwaiter().GetResult(); - } - - /// - /// Get all the resource management private links in a subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task ListAsync(this IResourceManagementPrivateLinkOperations operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all the resource management private links in a resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - public static ResourceManagementPrivateLinkListResult ListByResourceGroup(this IResourceManagementPrivateLinkOperations operations, string resourceGroupName) - { - return operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult(); - } - - /// - /// Get all the resource management private links in a resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The cancellation token. - /// - public static async Task ListByResourceGroupAsync(this IResourceManagementPrivateLinkOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/src/Resources/Resources.Sdk/Generated/ResourcesOperationsExtensions.cs b/src/Resources/Resources.Sdk/Generated/ResourcesOperationsExtensions.cs deleted file mode 100644 index a63fddffbce6..000000000000 --- a/src/Resources/Resources.Sdk/Generated/ResourcesOperationsExtensions.cs +++ /dev/null @@ -1,1314 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for ResourcesOperations. - /// - public static partial class ResourcesOperationsExtensions - { - /// - /// Get all the resources for a resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The resource group with the resources to get. - /// - /// - /// OData parameters to apply to the operation. - /// - public static IPage ListByResourceGroup(this IResourcesOperations operations, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery)) - { - return operations.ListByResourceGroupAsync(resourceGroupName, odataQuery).GetAwaiter().GetResult(); - } - - /// - /// Get all the resources for a resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The resource group with the resources to get. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByResourceGroupAsync(this IResourcesOperations operations, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, odataQuery, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Moves resources from one resource group to another resource group. - /// - /// - /// The resources to be moved must be in the same source resource group in the - /// source subscription being used. The target resource group may be in a - /// different subscription. When moving resources, both the source group and - /// the target group are locked for the duration of the operation. Write and - /// delete operations are blocked on the groups until the move completes. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group from the source subscription containing the - /// resources to be moved. - /// - /// - /// Parameters for moving resources. - /// - public static void MoveResources(this IResourcesOperations operations, string sourceResourceGroupName, ResourcesMoveInfo parameters) - { - operations.MoveResourcesAsync(sourceResourceGroupName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Moves resources from one resource group to another resource group. - /// - /// - /// The resources to be moved must be in the same source resource group in the - /// source subscription being used. The target resource group may be in a - /// different subscription. When moving resources, both the source group and - /// the target group are locked for the duration of the operation. Write and - /// delete operations are blocked on the groups until the move completes. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group from the source subscription containing the - /// resources to be moved. - /// - /// - /// Parameters for moving resources. - /// - /// - /// The cancellation token. - /// - public static async Task MoveResourcesAsync(this IResourcesOperations operations, string sourceResourceGroupName, ResourcesMoveInfo parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.MoveResourcesWithHttpMessagesAsync(sourceResourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Validates whether resources can be moved from one resource group to another - /// resource group. - /// - /// - /// This operation checks whether the specified resources can be moved to the - /// target. The resources to be moved must be in the same source resource group - /// in the source subscription being used. The target resource group may be in - /// a different subscription. If validation succeeds, it returns HTTP response - /// code 204 (no content). If validation fails, it returns HTTP response code - /// 409 (Conflict) with an error message. Retrieve the URL in the Location - /// header value to check the result of the long-running operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group from the source subscription containing the - /// resources to be validated for move. - /// - /// - /// Parameters for moving resources. - /// - public static void ValidateMoveResources(this IResourcesOperations operations, string sourceResourceGroupName, ResourcesMoveInfo parameters) - { - operations.ValidateMoveResourcesAsync(sourceResourceGroupName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Validates whether resources can be moved from one resource group to another - /// resource group. - /// - /// - /// This operation checks whether the specified resources can be moved to the - /// target. The resources to be moved must be in the same source resource group - /// in the source subscription being used. The target resource group may be in - /// a different subscription. If validation succeeds, it returns HTTP response - /// code 204 (no content). If validation fails, it returns HTTP response code - /// 409 (Conflict) with an error message. Retrieve the URL in the Location - /// header value to check the result of the long-running operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group from the source subscription containing the - /// resources to be validated for move. - /// - /// - /// Parameters for moving resources. - /// - /// - /// The cancellation token. - /// - public static async Task ValidateMoveResourcesAsync(this IResourcesOperations operations, string sourceResourceGroupName, ResourcesMoveInfo parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.ValidateMoveResourcesWithHttpMessagesAsync(sourceResourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Get all the resources in a subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// OData parameters to apply to the operation. - /// - public static IPage List(this IResourcesOperations operations, ODataQuery odataQuery = default(ODataQuery)) - { - return operations.ListAsync(odataQuery).GetAwaiter().GetResult(); - } - - /// - /// Get all the resources in a subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IResourcesOperations operations, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(odataQuery, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Checks whether a resource exists. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group containing the resource to check. The name - /// is case insensitive. - /// - /// - /// The resource provider of the resource to check. - /// - /// - /// The parent resource identity. - /// - /// - /// The resource type. - /// - /// - /// The name of the resource to check whether it exists. - /// - /// - /// The API version to use for the operation. - /// - public static bool CheckExistence(this IResourcesOperations operations, string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion) - { - return operations.CheckExistenceAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion).GetAwaiter().GetResult(); - } - - /// - /// Checks whether a resource exists. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group containing the resource to check. The name - /// is case insensitive. - /// - /// - /// The resource provider of the resource to check. - /// - /// - /// The parent resource identity. - /// - /// - /// The resource type. - /// - /// - /// The name of the resource to check whether it exists. - /// - /// - /// The API version to use for the operation. - /// - /// - /// The cancellation token. - /// - public static async Task CheckExistenceAsync(this IResourcesOperations operations, string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CheckExistenceWithHttpMessagesAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a resource. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group that contains the resource to delete. The - /// name is case insensitive. - /// - /// - /// The namespace of the resource provider. - /// - /// - /// The parent resource identity. - /// - /// - /// The resource type. - /// - /// - /// The name of the resource to delete. - /// - /// - /// The API version to use for the operation. - /// - public static void Delete(this IResourcesOperations operations, string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion) - { - operations.DeleteAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion).GetAwaiter().GetResult(); - } - - /// - /// Deletes a resource. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group that contains the resource to delete. The - /// name is case insensitive. - /// - /// - /// The namespace of the resource provider. - /// - /// - /// The parent resource identity. - /// - /// - /// The resource type. - /// - /// - /// The name of the resource to delete. - /// - /// - /// The API version to use for the operation. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this IResourcesOperations operations, string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Creates a resource. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group for the resource. The name is case - /// insensitive. - /// - /// - /// The namespace of the resource provider. - /// - /// - /// The parent resource identity. - /// - /// - /// The resource type of the resource to create. - /// - /// - /// The name of the resource to create. - /// - /// - /// The API version to use for the operation. - /// - /// - /// Parameters for creating or updating the resource. - /// - public static GenericResource CreateOrUpdate(this IResourcesOperations operations, string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, GenericResource parameters) - { - return operations.CreateOrUpdateAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion, parameters).GetAwaiter().GetResult(); - } - - /// - /// Creates a resource. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group for the resource. The name is case - /// insensitive. - /// - /// - /// The namespace of the resource provider. - /// - /// - /// The parent resource identity. - /// - /// - /// The resource type of the resource to create. - /// - /// - /// The name of the resource to create. - /// - /// - /// The API version to use for the operation. - /// - /// - /// Parameters for creating or updating the resource. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateAsync(this IResourcesOperations operations, string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, GenericResource parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Updates a resource. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group for the resource. The name is case - /// insensitive. - /// - /// - /// The namespace of the resource provider. - /// - /// - /// The parent resource identity. - /// - /// - /// The resource type of the resource to update. - /// - /// - /// The name of the resource to update. - /// - /// - /// The API version to use for the operation. - /// - /// - /// Parameters for updating the resource. - /// - public static GenericResource Update(this IResourcesOperations operations, string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, GenericResource parameters) - { - return operations.UpdateAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion, parameters).GetAwaiter().GetResult(); - } - - /// - /// Updates a resource. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group for the resource. The name is case - /// insensitive. - /// - /// - /// The namespace of the resource provider. - /// - /// - /// The parent resource identity. - /// - /// - /// The resource type of the resource to update. - /// - /// - /// The name of the resource to update. - /// - /// - /// The API version to use for the operation. - /// - /// - /// Parameters for updating the resource. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateAsync(this IResourcesOperations operations, string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, GenericResource parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a resource. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group containing the resource to get. The name is - /// case insensitive. - /// - /// - /// The namespace of the resource provider. - /// - /// - /// The parent resource identity. - /// - /// - /// The resource type of the resource. - /// - /// - /// The name of the resource to get. - /// - /// - /// The API version to use for the operation. - /// - public static GenericResource Get(this IResourcesOperations operations, string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion) - { - return operations.GetAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion).GetAwaiter().GetResult(); - } - - /// - /// Gets a resource. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group containing the resource to get. The name is - /// case insensitive. - /// - /// - /// The namespace of the resource provider. - /// - /// - /// The parent resource identity. - /// - /// - /// The resource type of the resource. - /// - /// - /// The name of the resource to get. - /// - /// - /// The API version to use for the operation. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IResourcesOperations operations, string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Checks by ID whether a resource exists. This API currently works only for a - /// limited set of Resource providers. In the event that a Resource provider - /// does not implement this API, ARM will respond with a 405. The alternative - /// then is to use the GET API to check for the existence of the resource. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The fully qualified ID of the resource, including the resource name and - /// resource type. Use the format, - /// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} - /// - /// - /// The API version to use for the operation. - /// - public static bool CheckExistenceById(this IResourcesOperations operations, string resourceId, string apiVersion) - { - return operations.CheckExistenceByIdAsync(resourceId, apiVersion).GetAwaiter().GetResult(); - } - - /// - /// Checks by ID whether a resource exists. This API currently works only for a - /// limited set of Resource providers. In the event that a Resource provider - /// does not implement this API, ARM will respond with a 405. The alternative - /// then is to use the GET API to check for the existence of the resource. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The fully qualified ID of the resource, including the resource name and - /// resource type. Use the format, - /// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} - /// - /// - /// The API version to use for the operation. - /// - /// - /// The cancellation token. - /// - public static async Task CheckExistenceByIdAsync(this IResourcesOperations operations, string resourceId, string apiVersion, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CheckExistenceByIdWithHttpMessagesAsync(resourceId, apiVersion, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a resource by ID. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The fully qualified ID of the resource, including the resource name and - /// resource type. Use the format, - /// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} - /// - /// - /// The API version to use for the operation. - /// - public static void DeleteById(this IResourcesOperations operations, string resourceId, string apiVersion) - { - operations.DeleteByIdAsync(resourceId, apiVersion).GetAwaiter().GetResult(); - } - - /// - /// Deletes a resource by ID. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The fully qualified ID of the resource, including the resource name and - /// resource type. Use the format, - /// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} - /// - /// - /// The API version to use for the operation. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteByIdAsync(this IResourcesOperations operations, string resourceId, string apiVersion, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteByIdWithHttpMessagesAsync(resourceId, apiVersion, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Create a resource by ID. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The fully qualified ID of the resource, including the resource name and - /// resource type. Use the format, - /// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} - /// - /// - /// The API version to use for the operation. - /// - /// - /// Create or update resource parameters. - /// - public static GenericResource CreateOrUpdateById(this IResourcesOperations operations, string resourceId, string apiVersion, GenericResource parameters) - { - return operations.CreateOrUpdateByIdAsync(resourceId, apiVersion, parameters).GetAwaiter().GetResult(); - } - - /// - /// Create a resource by ID. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The fully qualified ID of the resource, including the resource name and - /// resource type. Use the format, - /// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} - /// - /// - /// The API version to use for the operation. - /// - /// - /// Create or update resource parameters. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateByIdAsync(this IResourcesOperations operations, string resourceId, string apiVersion, GenericResource parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateByIdWithHttpMessagesAsync(resourceId, apiVersion, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Updates a resource by ID. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The fully qualified ID of the resource, including the resource name and - /// resource type. Use the format, - /// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} - /// - /// - /// The API version to use for the operation. - /// - /// - /// Update resource parameters. - /// - public static GenericResource UpdateById(this IResourcesOperations operations, string resourceId, string apiVersion, GenericResource parameters) - { - return operations.UpdateByIdAsync(resourceId, apiVersion, parameters).GetAwaiter().GetResult(); - } - - /// - /// Updates a resource by ID. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The fully qualified ID of the resource, including the resource name and - /// resource type. Use the format, - /// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} - /// - /// - /// The API version to use for the operation. - /// - /// - /// Update resource parameters. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateByIdAsync(this IResourcesOperations operations, string resourceId, string apiVersion, GenericResource parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateByIdWithHttpMessagesAsync(resourceId, apiVersion, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a resource by ID. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The fully qualified ID of the resource, including the resource name and - /// resource type. Use the format, - /// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} - /// - /// - /// The API version to use for the operation. - /// - public static GenericResource GetById(this IResourcesOperations operations, string resourceId, string apiVersion) - { - return operations.GetByIdAsync(resourceId, apiVersion).GetAwaiter().GetResult(); - } - - /// - /// Gets a resource by ID. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The fully qualified ID of the resource, including the resource name and - /// resource type. Use the format, - /// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} - /// - /// - /// The API version to use for the operation. - /// - /// - /// The cancellation token. - /// - public static async Task GetByIdAsync(this IResourcesOperations operations, string resourceId, string apiVersion, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetByIdWithHttpMessagesAsync(resourceId, apiVersion, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Moves resources from one resource group to another resource group. - /// - /// - /// The resources to be moved must be in the same source resource group in the - /// source subscription being used. The target resource group may be in a - /// different subscription. When moving resources, both the source group and - /// the target group are locked for the duration of the operation. Write and - /// delete operations are blocked on the groups until the move completes. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group from the source subscription containing the - /// resources to be moved. - /// - /// - /// Parameters for moving resources. - /// - public static void BeginMoveResources(this IResourcesOperations operations, string sourceResourceGroupName, ResourcesMoveInfo parameters) - { - operations.BeginMoveResourcesAsync(sourceResourceGroupName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Moves resources from one resource group to another resource group. - /// - /// - /// The resources to be moved must be in the same source resource group in the - /// source subscription being used. The target resource group may be in a - /// different subscription. When moving resources, both the source group and - /// the target group are locked for the duration of the operation. Write and - /// delete operations are blocked on the groups until the move completes. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group from the source subscription containing the - /// resources to be moved. - /// - /// - /// Parameters for moving resources. - /// - /// - /// The cancellation token. - /// - public static async Task BeginMoveResourcesAsync(this IResourcesOperations operations, string sourceResourceGroupName, ResourcesMoveInfo parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginMoveResourcesWithHttpMessagesAsync(sourceResourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Validates whether resources can be moved from one resource group to another - /// resource group. - /// - /// - /// This operation checks whether the specified resources can be moved to the - /// target. The resources to be moved must be in the same source resource group - /// in the source subscription being used. The target resource group may be in - /// a different subscription. If validation succeeds, it returns HTTP response - /// code 204 (no content). If validation fails, it returns HTTP response code - /// 409 (Conflict) with an error message. Retrieve the URL in the Location - /// header value to check the result of the long-running operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group from the source subscription containing the - /// resources to be validated for move. - /// - /// - /// Parameters for moving resources. - /// - public static void BeginValidateMoveResources(this IResourcesOperations operations, string sourceResourceGroupName, ResourcesMoveInfo parameters) - { - operations.BeginValidateMoveResourcesAsync(sourceResourceGroupName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Validates whether resources can be moved from one resource group to another - /// resource group. - /// - /// - /// This operation checks whether the specified resources can be moved to the - /// target. The resources to be moved must be in the same source resource group - /// in the source subscription being used. The target resource group may be in - /// a different subscription. If validation succeeds, it returns HTTP response - /// code 204 (no content). If validation fails, it returns HTTP response code - /// 409 (Conflict) with an error message. Retrieve the URL in the Location - /// header value to check the result of the long-running operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group from the source subscription containing the - /// resources to be validated for move. - /// - /// - /// Parameters for moving resources. - /// - /// - /// The cancellation token. - /// - public static async Task BeginValidateMoveResourcesAsync(this IResourcesOperations operations, string sourceResourceGroupName, ResourcesMoveInfo parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginValidateMoveResourcesWithHttpMessagesAsync(sourceResourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Deletes a resource. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group that contains the resource to delete. The - /// name is case insensitive. - /// - /// - /// The namespace of the resource provider. - /// - /// - /// The parent resource identity. - /// - /// - /// The resource type. - /// - /// - /// The name of the resource to delete. - /// - /// - /// The API version to use for the operation. - /// - public static void BeginDelete(this IResourcesOperations operations, string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion) - { - operations.BeginDeleteAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion).GetAwaiter().GetResult(); - } - - /// - /// Deletes a resource. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group that contains the resource to delete. The - /// name is case insensitive. - /// - /// - /// The namespace of the resource provider. - /// - /// - /// The parent resource identity. - /// - /// - /// The resource type. - /// - /// - /// The name of the resource to delete. - /// - /// - /// The API version to use for the operation. - /// - /// - /// The cancellation token. - /// - public static async Task BeginDeleteAsync(this IResourcesOperations operations, string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Creates a resource. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group for the resource. The name is case - /// insensitive. - /// - /// - /// The namespace of the resource provider. - /// - /// - /// The parent resource identity. - /// - /// - /// The resource type of the resource to create. - /// - /// - /// The name of the resource to create. - /// - /// - /// The API version to use for the operation. - /// - /// - /// Parameters for creating or updating the resource. - /// - public static GenericResource BeginCreateOrUpdate(this IResourcesOperations operations, string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, GenericResource parameters) - { - return operations.BeginCreateOrUpdateAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion, parameters).GetAwaiter().GetResult(); - } - - /// - /// Creates a resource. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group for the resource. The name is case - /// insensitive. - /// - /// - /// The namespace of the resource provider. - /// - /// - /// The parent resource identity. - /// - /// - /// The resource type of the resource to create. - /// - /// - /// The name of the resource to create. - /// - /// - /// The API version to use for the operation. - /// - /// - /// Parameters for creating or updating the resource. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateOrUpdateAsync(this IResourcesOperations operations, string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, GenericResource parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Updates a resource. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group for the resource. The name is case - /// insensitive. - /// - /// - /// The namespace of the resource provider. - /// - /// - /// The parent resource identity. - /// - /// - /// The resource type of the resource to update. - /// - /// - /// The name of the resource to update. - /// - /// - /// The API version to use for the operation. - /// - /// - /// Parameters for updating the resource. - /// - public static GenericResource BeginUpdate(this IResourcesOperations operations, string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, GenericResource parameters) - { - return operations.BeginUpdateAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion, parameters).GetAwaiter().GetResult(); - } - - /// - /// Updates a resource. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group for the resource. The name is case - /// insensitive. - /// - /// - /// The namespace of the resource provider. - /// - /// - /// The parent resource identity. - /// - /// - /// The resource type of the resource to update. - /// - /// - /// The name of the resource to update. - /// - /// - /// The API version to use for the operation. - /// - /// - /// Parameters for updating the resource. - /// - /// - /// The cancellation token. - /// - public static async Task BeginUpdateAsync(this IResourcesOperations operations, string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, GenericResource parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a resource by ID. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The fully qualified ID of the resource, including the resource name and - /// resource type. Use the format, - /// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} - /// - /// - /// The API version to use for the operation. - /// - public static void BeginDeleteById(this IResourcesOperations operations, string resourceId, string apiVersion) - { - operations.BeginDeleteByIdAsync(resourceId, apiVersion).GetAwaiter().GetResult(); - } - - /// - /// Deletes a resource by ID. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The fully qualified ID of the resource, including the resource name and - /// resource type. Use the format, - /// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} - /// - /// - /// The API version to use for the operation. - /// - /// - /// The cancellation token. - /// - public static async Task BeginDeleteByIdAsync(this IResourcesOperations operations, string resourceId, string apiVersion, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginDeleteByIdWithHttpMessagesAsync(resourceId, apiVersion, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Create a resource by ID. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The fully qualified ID of the resource, including the resource name and - /// resource type. Use the format, - /// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} - /// - /// - /// The API version to use for the operation. - /// - /// - /// Create or update resource parameters. - /// - public static GenericResource BeginCreateOrUpdateById(this IResourcesOperations operations, string resourceId, string apiVersion, GenericResource parameters) - { - return operations.BeginCreateOrUpdateByIdAsync(resourceId, apiVersion, parameters).GetAwaiter().GetResult(); - } - - /// - /// Create a resource by ID. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The fully qualified ID of the resource, including the resource name and - /// resource type. Use the format, - /// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} - /// - /// - /// The API version to use for the operation. - /// - /// - /// Create or update resource parameters. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateOrUpdateByIdAsync(this IResourcesOperations operations, string resourceId, string apiVersion, GenericResource parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCreateOrUpdateByIdWithHttpMessagesAsync(resourceId, apiVersion, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Updates a resource by ID. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The fully qualified ID of the resource, including the resource name and - /// resource type. Use the format, - /// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} - /// - /// - /// The API version to use for the operation. - /// - /// - /// Update resource parameters. - /// - public static GenericResource BeginUpdateById(this IResourcesOperations operations, string resourceId, string apiVersion, GenericResource parameters) - { - return operations.BeginUpdateByIdAsync(resourceId, apiVersion, parameters).GetAwaiter().GetResult(); - } - - /// - /// Updates a resource by ID. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The fully qualified ID of the resource, including the resource name and - /// resource type. Use the format, - /// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} - /// - /// - /// The API version to use for the operation. - /// - /// - /// Update resource parameters. - /// - /// - /// The cancellation token. - /// - public static async Task BeginUpdateByIdAsync(this IResourcesOperations operations, string resourceId, string apiVersion, GenericResource parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginUpdateByIdWithHttpMessagesAsync(resourceId, apiVersion, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all the resources for a resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListByResourceGroupNext(this IResourcesOperations operations, string nextPageLink) - { - return operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get all the resources for a resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByResourceGroupNextAsync(this IResourcesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all the resources in a subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IResourcesOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get all the resources in a subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IResourcesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/src/Resources/Resources.Sdk/Generated/SdkInfo_DeploymentScriptsClient.cs b/src/Resources/Resources.Sdk/Generated/SdkInfo_DeploymentScriptsClient.cs deleted file mode 100644 index 45317cac72c7..000000000000 --- a/src/Resources/Resources.Sdk/Generated/SdkInfo_DeploymentScriptsClient.cs +++ /dev/null @@ -1,27 +0,0 @@ - -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources -{ - using System; - using System.Collections.Generic; - using System.Linq; - - internal static partial class SdkInfo - { - public static IEnumerable> ApiInfo_DeploymentScriptsClient - { - get - { - return new Tuple[] - { - new Tuple("Resources", "DeploymentScripts", "2020-10-01"), - }.AsEnumerable(); - } - } - } -} diff --git a/src/Resources/Resources.Sdk/Generated/SdkInfo_DeploymentStacksClient.cs b/src/Resources/Resources.Sdk/Generated/SdkInfo_DeploymentStacksClient.cs deleted file mode 100644 index 3ae1c2d32600..000000000000 --- a/src/Resources/Resources.Sdk/Generated/SdkInfo_DeploymentStacksClient.cs +++ /dev/null @@ -1,28 +0,0 @@ - -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources -{ - using System; - using System.Collections.Generic; - using System.Linq; - - internal static partial class SdkInfo - { - public static IEnumerable> ApiInfo_DeploymentStacksClient - { - get - { - return new Tuple[] - { - new Tuple("Management", "DeploymentStacks", "2022-08-01-preview"), - new Tuple("Resources", "DeploymentStacks", "2022-08-01-preview"), - }.AsEnumerable(); - } - } - } -} diff --git a/src/Resources/Resources.Sdk/Generated/SdkInfo_FeatureClient.cs b/src/Resources/Resources.Sdk/Generated/SdkInfo_FeatureClient.cs deleted file mode 100644 index 2ee2062124de..000000000000 --- a/src/Resources/Resources.Sdk/Generated/SdkInfo_FeatureClient.cs +++ /dev/null @@ -1,29 +0,0 @@ - -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources -{ - using System; - using System.Collections.Generic; - using System.Linq; - - internal static partial class SdkInfo - { - public static IEnumerable> ApiInfo_FeatureClient - { - get - { - return new Tuple[] - { - new Tuple("Features", "Features", "2021-07-01"), - new Tuple("Features", "ListOperations", "2021-07-01"), - new Tuple("Features", "SubscriptionFeatureRegistrations", "2021-07-01"), - }.AsEnumerable(); - } - } - } -} diff --git a/src/Resources/Resources.Sdk/Generated/SdkInfo_ResourceManagementClient.cs b/src/Resources/Resources.Sdk/Generated/SdkInfo_ResourceManagementClient.cs deleted file mode 100644 index 98cc75263051..000000000000 --- a/src/Resources/Resources.Sdk/Generated/SdkInfo_ResourceManagementClient.cs +++ /dev/null @@ -1,39 +0,0 @@ - -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources -{ - using System; - using System.Collections.Generic; - using System.Linq; - - internal static partial class SdkInfo - { - public static IEnumerable> ApiInfo_ResourceManagementClient - { - get - { - return new Tuple[] - { - new Tuple("Management", "DeploymentOperations", "2021-04-01"), - new Tuple("Management", "Deployments", "2021-04-01"), - new Tuple("Management", "Providers", "2021-04-01"), - new Tuple("ResourceManagementClient", "DeploymentOperations", "2021-04-01"), - new Tuple("ResourceManagementClient", "ProviderResourceTypes", "2021-04-01"), - new Tuple("ResourceManagementClient", "Providers", "2021-04-01"), - new Tuple("ResourceManagementClient", "ResourceGroups", "2021-04-01"), - new Tuple("ResourceManagementClient", "Resources", "2021-04-01"), - new Tuple("ResourceManagementClient", "Tags", "2021-04-01"), - new Tuple("Resources", "DeploymentOperations", "2021-04-01"), - new Tuple("Resources", "Deployments", "2021-04-01"), - new Tuple("Resources", "Operations", "2021-04-01"), - new Tuple("Resources", "Tags", "2021-04-01"), - }.AsEnumerable(); - } - } - } -} diff --git a/src/Resources/Resources.Sdk/Generated/SdkInfo_ResourcePrivateLinkClient.cs b/src/Resources/Resources.Sdk/Generated/SdkInfo_ResourcePrivateLinkClient.cs deleted file mode 100644 index 366cb80af515..000000000000 --- a/src/Resources/Resources.Sdk/Generated/SdkInfo_ResourcePrivateLinkClient.cs +++ /dev/null @@ -1,28 +0,0 @@ - -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources -{ - using System; - using System.Collections.Generic; - using System.Linq; - - internal static partial class SdkInfo - { - public static IEnumerable> ApiInfo_ResourcePrivateLinkClient - { - get - { - return new Tuple[] - { - new Tuple("Authorization", "ResourceManagementPrivateLink", "2020-05-01"), - new Tuple("Management", "PrivateLinkAssociation", "2020-05-01"), - }.AsEnumerable(); - } - } - } -} diff --git a/src/Resources/Resources.Sdk/Generated/SdkInfo_SubscriptionClient.cs b/src/Resources/Resources.Sdk/Generated/SdkInfo_SubscriptionClient.cs deleted file mode 100644 index 1c2d5f376b40..000000000000 --- a/src/Resources/Resources.Sdk/Generated/SdkInfo_SubscriptionClient.cs +++ /dev/null @@ -1,30 +0,0 @@ - -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources -{ - using System; - using System.Collections.Generic; - using System.Linq; - - internal static partial class SdkInfo - { - public static IEnumerable> ApiInfo_SubscriptionClient - { - get - { - return new Tuple[] - { - new Tuple("Resources", "Subscriptions", "2021-01-01"), - new Tuple("Resources", "checkResourceName", "2021-01-01"), - new Tuple("SubscriptionClient", "Subscriptions", "2021-01-01"), - new Tuple("SubscriptionClient", "Tenants", "2021-01-01"), - }.AsEnumerable(); - } - } - } -} diff --git a/src/Resources/Resources.Sdk/Generated/SdkInfo_TemplateSpecsClient.cs b/src/Resources/Resources.Sdk/Generated/SdkInfo_TemplateSpecsClient.cs deleted file mode 100644 index 0eb0af5b94c0..000000000000 --- a/src/Resources/Resources.Sdk/Generated/SdkInfo_TemplateSpecsClient.cs +++ /dev/null @@ -1,28 +0,0 @@ - -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources -{ - using System; - using System.Collections.Generic; - using System.Linq; - - internal static partial class SdkInfo - { - public static IEnumerable> ApiInfo_TemplateSpecsClient - { - get - { - return new Tuple[] - { - new Tuple("Resources", "TemplateSpecVersions", "2021-05-01"), - new Tuple("Resources", "TemplateSpecs", "2021-05-01"), - }.AsEnumerable(); - } - } - } -} diff --git a/src/Resources/Resources.Sdk/Generated/SubscriptionClientExtensions.cs b/src/Resources/Resources.Sdk/Generated/SubscriptionClientExtensions.cs deleted file mode 100644 index 27db02a39d15..000000000000 --- a/src/Resources/Resources.Sdk/Generated/SubscriptionClientExtensions.cs +++ /dev/null @@ -1,67 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for SubscriptionClient. - /// - public static partial class SubscriptionClientExtensions - { - /// - /// Checks resource name validity - /// - /// - /// A resource name is valid if it is not a reserved word, does not contains a - /// reserved word and does not start with a reserved word - /// - /// - /// The operations group for this extension method. - /// - /// - /// Resource object with values for resource name and resource type - /// - public static CheckResourceNameResult CheckResourceName(this ISubscriptionClient operations, ResourceName resourceNameDefinition = default(ResourceName)) - { - return operations.CheckResourceNameAsync(resourceNameDefinition).GetAwaiter().GetResult(); - } - - /// - /// Checks resource name validity - /// - /// - /// A resource name is valid if it is not a reserved word, does not contains a - /// reserved word and does not start with a reserved word - /// - /// - /// The operations group for this extension method. - /// - /// - /// Resource object with values for resource name and resource type - /// - /// - /// The cancellation token. - /// - public static async Task CheckResourceNameAsync(this ISubscriptionClient operations, ResourceName resourceNameDefinition = default(ResourceName), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CheckResourceNameWithHttpMessagesAsync(resourceNameDefinition, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/src/Resources/Resources.Sdk/Generated/SubscriptionFeatureRegistrationsOperationsExtensions.cs b/src/Resources/Resources.Sdk/Generated/SubscriptionFeatureRegistrationsOperationsExtensions.cs deleted file mode 100644 index 97b3779b3a9b..000000000000 --- a/src/Resources/Resources.Sdk/Generated/SubscriptionFeatureRegistrationsOperationsExtensions.cs +++ /dev/null @@ -1,282 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for SubscriptionFeatureRegistrationsOperations. - /// - public static partial class SubscriptionFeatureRegistrationsOperationsExtensions - { - /// - /// Returns a feature registration - /// - /// - /// The operations group for this extension method. - /// - /// - /// The provider namespace. - /// - /// - /// The feature name. - /// - public static SubscriptionFeatureRegistration Get(this ISubscriptionFeatureRegistrationsOperations operations, string providerNamespace, string featureName) - { - return operations.GetAsync(providerNamespace, featureName).GetAwaiter().GetResult(); - } - - /// - /// Returns a feature registration - /// - /// - /// The operations group for this extension method. - /// - /// - /// The provider namespace. - /// - /// - /// The feature name. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this ISubscriptionFeatureRegistrationsOperations operations, string providerNamespace, string featureName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(providerNamespace, featureName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Create or update a feature registration. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The provider namespace. - /// - /// - /// The feature name. - /// - /// - /// Subscription Feature Registration Type details. - /// - public static SubscriptionFeatureRegistration CreateOrUpdate(this ISubscriptionFeatureRegistrationsOperations operations, string providerNamespace, string featureName, SubscriptionFeatureRegistration subscriptionFeatureRegistrationType = default(SubscriptionFeatureRegistration)) - { - return operations.CreateOrUpdateAsync(providerNamespace, featureName, subscriptionFeatureRegistrationType).GetAwaiter().GetResult(); - } - - /// - /// Create or update a feature registration. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The provider namespace. - /// - /// - /// The feature name. - /// - /// - /// Subscription Feature Registration Type details. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateAsync(this ISubscriptionFeatureRegistrationsOperations operations, string providerNamespace, string featureName, SubscriptionFeatureRegistration subscriptionFeatureRegistrationType = default(SubscriptionFeatureRegistration), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(providerNamespace, featureName, subscriptionFeatureRegistrationType, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a feature registration - /// - /// - /// The operations group for this extension method. - /// - /// - /// The provider namespace. - /// - /// - /// The feature name. - /// - public static void Delete(this ISubscriptionFeatureRegistrationsOperations operations, string providerNamespace, string featureName) - { - operations.DeleteAsync(providerNamespace, featureName).GetAwaiter().GetResult(); - } - - /// - /// Deletes a feature registration - /// - /// - /// The operations group for this extension method. - /// - /// - /// The provider namespace. - /// - /// - /// The feature name. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this ISubscriptionFeatureRegistrationsOperations operations, string providerNamespace, string featureName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteWithHttpMessagesAsync(providerNamespace, featureName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Returns subscription feature registrations for given subscription and - /// provider namespace. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The provider namespace. - /// - public static IPage ListBySubscription(this ISubscriptionFeatureRegistrationsOperations operations, string providerNamespace) - { - return operations.ListBySubscriptionAsync(providerNamespace).GetAwaiter().GetResult(); - } - - /// - /// Returns subscription feature registrations for given subscription and - /// provider namespace. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The provider namespace. - /// - /// - /// The cancellation token. - /// - public static async Task> ListBySubscriptionAsync(this ISubscriptionFeatureRegistrationsOperations operations, string providerNamespace, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(providerNamespace, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Returns subscription feature registrations for given subscription. - /// - /// - /// The operations group for this extension method. - /// - public static IPage ListAllBySubscription(this ISubscriptionFeatureRegistrationsOperations operations) - { - return operations.ListAllBySubscriptionAsync().GetAwaiter().GetResult(); - } - - /// - /// Returns subscription feature registrations for given subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAllBySubscriptionAsync(this ISubscriptionFeatureRegistrationsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListAllBySubscriptionWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Returns subscription feature registrations for given subscription and - /// provider namespace. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListBySubscriptionNext(this ISubscriptionFeatureRegistrationsOperations operations, string nextPageLink) - { - return operations.ListBySubscriptionNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Returns subscription feature registrations for given subscription and - /// provider namespace. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListBySubscriptionNextAsync(this ISubscriptionFeatureRegistrationsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListBySubscriptionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Returns subscription feature registrations for given subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListAllBySubscriptionNext(this ISubscriptionFeatureRegistrationsOperations operations, string nextPageLink) - { - return operations.ListAllBySubscriptionNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Returns subscription feature registrations for given subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAllBySubscriptionNextAsync(this ISubscriptionFeatureRegistrationsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListAllBySubscriptionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/src/Resources/Resources.Sdk/Generated/SubscriptionsOperationsExtensions.cs b/src/Resources/Resources.Sdk/Generated/SubscriptionsOperationsExtensions.cs deleted file mode 100644 index 5dd4e0ea761e..000000000000 --- a/src/Resources/Resources.Sdk/Generated/SubscriptionsOperationsExtensions.cs +++ /dev/null @@ -1,213 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for SubscriptionsOperations. - /// - public static partial class SubscriptionsOperationsExtensions - { - /// - /// Gets all available geo-locations. - /// - /// - /// This operation provides all the locations that are available for resource - /// providers; however, each resource provider may support a subset of this - /// list. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The ID of the target subscription. - /// - /// - /// Whether to include extended locations. - /// - public static IEnumerable ListLocations(this ISubscriptionsOperations operations, string subscriptionId, bool? includeExtendedLocations = default(bool?)) - { - return operations.ListLocationsAsync(subscriptionId, includeExtendedLocations).GetAwaiter().GetResult(); - } - - /// - /// Gets all available geo-locations. - /// - /// - /// This operation provides all the locations that are available for resource - /// providers; however, each resource provider may support a subset of this - /// list. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The ID of the target subscription. - /// - /// - /// Whether to include extended locations. - /// - /// - /// The cancellation token. - /// - public static async Task> ListLocationsAsync(this ISubscriptionsOperations operations, string subscriptionId, bool? includeExtendedLocations = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListLocationsWithHttpMessagesAsync(subscriptionId, includeExtendedLocations, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets details about a specified subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The ID of the target subscription. - /// - public static Subscription Get(this ISubscriptionsOperations operations, string subscriptionId) - { - return operations.GetAsync(subscriptionId).GetAwaiter().GetResult(); - } - - /// - /// Gets details about a specified subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The ID of the target subscription. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this ISubscriptionsOperations operations, string subscriptionId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(subscriptionId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets all subscriptions for a tenant. - /// - /// - /// The operations group for this extension method. - /// - public static IPage List(this ISubscriptionsOperations operations) - { - return operations.ListAsync().GetAwaiter().GetResult(); - } - - /// - /// Gets all subscriptions for a tenant. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this ISubscriptionsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Compares a subscriptions logical zone mapping - /// - /// - /// The operations group for this extension method. - /// - /// - /// The ID of the target subscription. - /// - /// - /// Parameters for checking zone peers. - /// - public static CheckZonePeersResult CheckZonePeers(this ISubscriptionsOperations operations, string subscriptionId, CheckZonePeersRequest parameters) - { - return operations.CheckZonePeersAsync(subscriptionId, parameters).GetAwaiter().GetResult(); - } - - /// - /// Compares a subscriptions logical zone mapping - /// - /// - /// The operations group for this extension method. - /// - /// - /// The ID of the target subscription. - /// - /// - /// Parameters for checking zone peers. - /// - /// - /// The cancellation token. - /// - public static async Task CheckZonePeersAsync(this ISubscriptionsOperations operations, string subscriptionId, CheckZonePeersRequest parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CheckZonePeersWithHttpMessagesAsync(subscriptionId, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets all subscriptions for a tenant. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this ISubscriptionsOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets all subscriptions for a tenant. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this ISubscriptionsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/src/Resources/Resources.Sdk/Generated/TagsOperationsExtensions.cs b/src/Resources/Resources.Sdk/Generated/TagsOperationsExtensions.cs deleted file mode 100644 index ef6fa37ad5d4..000000000000 --- a/src/Resources/Resources.Sdk/Generated/TagsOperationsExtensions.cs +++ /dev/null @@ -1,466 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for TagsOperations. - /// - public static partial class TagsOperationsExtensions - { - /// - /// Deletes a predefined tag value for a predefined tag name. - /// - /// - /// This operation allows deleting a value from the list of predefined values - /// for an existing predefined tag name. The value being deleted must not be in - /// use as a tag value for the given tag name for any resource. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the tag. - /// - /// - /// The value of the tag to delete. - /// - public static void DeleteValue(this ITagsOperations operations, string tagName, string tagValue) - { - operations.DeleteValueAsync(tagName, tagValue).GetAwaiter().GetResult(); - } - - /// - /// Deletes a predefined tag value for a predefined tag name. - /// - /// - /// This operation allows deleting a value from the list of predefined values - /// for an existing predefined tag name. The value being deleted must not be in - /// use as a tag value for the given tag name for any resource. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the tag. - /// - /// - /// The value of the tag to delete. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteValueAsync(this ITagsOperations operations, string tagName, string tagValue, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteValueWithHttpMessagesAsync(tagName, tagValue, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Creates a predefined value for a predefined tag name. - /// - /// - /// This operation allows adding a value to the list of predefined values for - /// an existing predefined tag name. A tag value can have a maximum of 256 - /// characters. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the tag. - /// - /// - /// The value of the tag to create. - /// - public static TagValue CreateOrUpdateValue(this ITagsOperations operations, string tagName, string tagValue) - { - return operations.CreateOrUpdateValueAsync(tagName, tagValue).GetAwaiter().GetResult(); - } - - /// - /// Creates a predefined value for a predefined tag name. - /// - /// - /// This operation allows adding a value to the list of predefined values for - /// an existing predefined tag name. A tag value can have a maximum of 256 - /// characters. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the tag. - /// - /// - /// The value of the tag to create. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateValueAsync(this ITagsOperations operations, string tagName, string tagValue, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateValueWithHttpMessagesAsync(tagName, tagValue, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates a predefined tag name. - /// - /// - /// This operation allows adding a name to the list of predefined tag names for - /// the given subscription. A tag name can have a maximum of 512 characters and - /// is case-insensitive. Tag names cannot have the following prefixes which are - /// reserved for Azure use: 'microsoft', 'azure', 'windows'. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the tag to create. - /// - public static TagDetails CreateOrUpdate(this ITagsOperations operations, string tagName) - { - return operations.CreateOrUpdateAsync(tagName).GetAwaiter().GetResult(); - } - - /// - /// Creates a predefined tag name. - /// - /// - /// This operation allows adding a name to the list of predefined tag names for - /// the given subscription. A tag name can have a maximum of 512 characters and - /// is case-insensitive. Tag names cannot have the following prefixes which are - /// reserved for Azure use: 'microsoft', 'azure', 'windows'. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the tag to create. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateAsync(this ITagsOperations operations, string tagName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(tagName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a predefined tag name. - /// - /// - /// This operation allows deleting a name from the list of predefined tag names - /// for the given subscription. The name being deleted must not be in use as a - /// tag name for any resource. All predefined values for the given name must - /// have already been deleted. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the tag. - /// - public static void Delete(this ITagsOperations operations, string tagName) - { - operations.DeleteAsync(tagName).GetAwaiter().GetResult(); - } - - /// - /// Deletes a predefined tag name. - /// - /// - /// This operation allows deleting a name from the list of predefined tag names - /// for the given subscription. The name being deleted must not be in use as a - /// tag name for any resource. All predefined values for the given name must - /// have already been deleted. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the tag. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this ITagsOperations operations, string tagName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteWithHttpMessagesAsync(tagName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Gets a summary of tag usage under the subscription. - /// - /// - /// This operation performs a union of predefined tags, resource tags, resource - /// group tags and subscription tags, and returns a summary of usage for each - /// tag name and value under the given subscription. In case of a large number - /// of tags, this operation may return a previously cached result. - /// - /// - /// The operations group for this extension method. - /// - public static IPage List(this ITagsOperations operations) - { - return operations.ListAsync().GetAwaiter().GetResult(); - } - - /// - /// Gets a summary of tag usage under the subscription. - /// - /// - /// This operation performs a union of predefined tags, resource tags, resource - /// group tags and subscription tags, and returns a summary of usage for each - /// tag name and value under the given subscription. In case of a large number - /// of tags, this operation may return a previously cached result. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this ITagsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates or updates the entire set of tags on a resource or subscription. - /// - /// - /// This operation allows adding or replacing the entire set of tags on the - /// specified resource or subscription. The specified entity can have a maximum - /// of 50 tags. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The resource scope. - /// - /// - /// - public static TagsResource CreateOrUpdateAtScope(this ITagsOperations operations, string scope, TagsResource parameters) - { - return operations.CreateOrUpdateAtScopeAsync(scope, parameters).GetAwaiter().GetResult(); - } - - /// - /// Creates or updates the entire set of tags on a resource or subscription. - /// - /// - /// This operation allows adding or replacing the entire set of tags on the - /// specified resource or subscription. The specified entity can have a maximum - /// of 50 tags. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The resource scope. - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateAtScopeAsync(this ITagsOperations operations, string scope, TagsResource parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateAtScopeWithHttpMessagesAsync(scope, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Selectively updates the set of tags on a resource or subscription. - /// - /// - /// This operation allows replacing, merging or selectively deleting tags on - /// the specified resource or subscription. The specified entity can have a - /// maximum of 50 tags at the end of the operation. The 'replace' option - /// replaces the entire set of existing tags with a new set. The 'merge' option - /// allows adding tags with new names and updating the values of tags with - /// existing names. The 'delete' option allows selectively deleting tags based - /// on given names or name/value pairs. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The resource scope. - /// - /// - /// - public static TagsResource UpdateAtScope(this ITagsOperations operations, string scope, TagsPatchResource parameters) - { - return operations.UpdateAtScopeAsync(scope, parameters).GetAwaiter().GetResult(); - } - - /// - /// Selectively updates the set of tags on a resource or subscription. - /// - /// - /// This operation allows replacing, merging or selectively deleting tags on - /// the specified resource or subscription. The specified entity can have a - /// maximum of 50 tags at the end of the operation. The 'replace' option - /// replaces the entire set of existing tags with a new set. The 'merge' option - /// allows adding tags with new names and updating the values of tags with - /// existing names. The 'delete' option allows selectively deleting tags based - /// on given names or name/value pairs. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The resource scope. - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task UpdateAtScopeAsync(this ITagsOperations operations, string scope, TagsPatchResource parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateAtScopeWithHttpMessagesAsync(scope, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the entire set of tags on a resource or subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The resource scope. - /// - public static TagsResource GetAtScope(this ITagsOperations operations, string scope) - { - return operations.GetAtScopeAsync(scope).GetAwaiter().GetResult(); - } - - /// - /// Gets the entire set of tags on a resource or subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The resource scope. - /// - /// - /// The cancellation token. - /// - public static async Task GetAtScopeAsync(this ITagsOperations operations, string scope, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetAtScopeWithHttpMessagesAsync(scope, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes the entire set of tags on a resource or subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The resource scope. - /// - public static void DeleteAtScope(this ITagsOperations operations, string scope) - { - operations.DeleteAtScopeAsync(scope).GetAwaiter().GetResult(); - } - - /// - /// Deletes the entire set of tags on a resource or subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The resource scope. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAtScopeAsync(this ITagsOperations operations, string scope, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteAtScopeWithHttpMessagesAsync(scope, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Gets a summary of tag usage under the subscription. - /// - /// - /// This operation performs a union of predefined tags, resource tags, resource - /// group tags and subscription tags, and returns a summary of usage for each - /// tag name and value under the given subscription. In case of a large number - /// of tags, this operation may return a previously cached result. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this ITagsOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets a summary of tag usage under the subscription. - /// - /// - /// This operation performs a union of predefined tags, resource tags, resource - /// group tags and subscription tags, and returns a summary of usage for each - /// tag name and value under the given subscription. In case of a large number - /// of tags, this operation may return a previously cached result. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this ITagsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/src/Resources/Resources.Sdk/Generated/TemplateSpecVersionsOperationsExtensions.cs b/src/Resources/Resources.Sdk/Generated/TemplateSpecVersionsOperationsExtensions.cs deleted file mode 100644 index c691907a9034..000000000000 --- a/src/Resources/Resources.Sdk/Generated/TemplateSpecVersionsOperationsExtensions.cs +++ /dev/null @@ -1,294 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for TemplateSpecVersionsOperations. - /// - public static partial class TemplateSpecVersionsOperationsExtensions - { - /// - /// Creates or updates a Template Spec version. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of the Template Spec. - /// - /// - /// The version of the Template Spec. - /// - /// - /// Template Spec Version supplied to the operation. - /// - public static TemplateSpecVersion CreateOrUpdate(this ITemplateSpecVersionsOperations operations, string resourceGroupName, string templateSpecName, string templateSpecVersion, TemplateSpecVersion templateSpecVersionModel) - { - return operations.CreateOrUpdateAsync(resourceGroupName, templateSpecName, templateSpecVersion, templateSpecVersionModel).GetAwaiter().GetResult(); - } - - /// - /// Creates or updates a Template Spec version. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of the Template Spec. - /// - /// - /// The version of the Template Spec. - /// - /// - /// Template Spec Version supplied to the operation. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateAsync(this ITemplateSpecVersionsOperations operations, string resourceGroupName, string templateSpecName, string templateSpecVersion, TemplateSpecVersion templateSpecVersionModel, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, templateSpecName, templateSpecVersion, templateSpecVersionModel, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Updates Template Spec Version tags with specified values. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of the Template Spec. - /// - /// - /// The version of the Template Spec. - /// - /// - /// Template Spec Version resource with the tags to be updated. - /// - public static TemplateSpecVersion Update(this ITemplateSpecVersionsOperations operations, string resourceGroupName, string templateSpecName, string templateSpecVersion, TemplateSpecVersionUpdateModel templateSpecVersionUpdateModel = default(TemplateSpecVersionUpdateModel)) - { - return operations.UpdateAsync(resourceGroupName, templateSpecName, templateSpecVersion, templateSpecVersionUpdateModel).GetAwaiter().GetResult(); - } - - /// - /// Updates Template Spec Version tags with specified values. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of the Template Spec. - /// - /// - /// The version of the Template Spec. - /// - /// - /// Template Spec Version resource with the tags to be updated. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateAsync(this ITemplateSpecVersionsOperations operations, string resourceGroupName, string templateSpecName, string templateSpecVersion, TemplateSpecVersionUpdateModel templateSpecVersionUpdateModel = default(TemplateSpecVersionUpdateModel), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, templateSpecName, templateSpecVersion, templateSpecVersionUpdateModel, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a Template Spec version from a specific Template Spec. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of the Template Spec. - /// - /// - /// The version of the Template Spec. - /// - public static TemplateSpecVersion Get(this ITemplateSpecVersionsOperations operations, string resourceGroupName, string templateSpecName, string templateSpecVersion) - { - return operations.GetAsync(resourceGroupName, templateSpecName, templateSpecVersion).GetAwaiter().GetResult(); - } - - /// - /// Gets a Template Spec version from a specific Template Spec. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of the Template Spec. - /// - /// - /// The version of the Template Spec. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this ITemplateSpecVersionsOperations operations, string resourceGroupName, string templateSpecName, string templateSpecVersion, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, templateSpecName, templateSpecVersion, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a specific version from a Template Spec. When operation completes, - /// status code 200 returned without content. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of the Template Spec. - /// - /// - /// The version of the Template Spec. - /// - public static void Delete(this ITemplateSpecVersionsOperations operations, string resourceGroupName, string templateSpecName, string templateSpecVersion) - { - operations.DeleteAsync(resourceGroupName, templateSpecName, templateSpecVersion).GetAwaiter().GetResult(); - } - - /// - /// Deletes a specific version from a Template Spec. When operation completes, - /// status code 200 returned without content. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of the Template Spec. - /// - /// - /// The version of the Template Spec. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this ITemplateSpecVersionsOperations operations, string resourceGroupName, string templateSpecName, string templateSpecVersion, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, templateSpecName, templateSpecVersion, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Lists all the Template Spec versions in the specified Template Spec. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of the Template Spec. - /// - public static IPage List(this ITemplateSpecVersionsOperations operations, string resourceGroupName, string templateSpecName) - { - return operations.ListAsync(resourceGroupName, templateSpecName).GetAwaiter().GetResult(); - } - - /// - /// Lists all the Template Spec versions in the specified Template Spec. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of the Template Spec. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this ITemplateSpecVersionsOperations operations, string resourceGroupName, string templateSpecName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, templateSpecName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Lists all the Template Spec versions in the specified Template Spec. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this ITemplateSpecVersionsOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Lists all the Template Spec versions in the specified Template Spec. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this ITemplateSpecVersionsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/src/Resources/Resources.Sdk/Generated/TemplateSpecsOperationsExtensions.cs b/src/Resources/Resources.Sdk/Generated/TemplateSpecsOperationsExtensions.cs deleted file mode 100644 index df08233560c8..000000000000 --- a/src/Resources/Resources.Sdk/Generated/TemplateSpecsOperationsExtensions.cs +++ /dev/null @@ -1,350 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for TemplateSpecsOperations. - /// - public static partial class TemplateSpecsOperationsExtensions - { - /// - /// Creates or updates a Template Spec. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of the Template Spec. - /// - /// - /// Template Spec supplied to the operation. - /// - public static TemplateSpec CreateOrUpdate(this ITemplateSpecsOperations operations, string resourceGroupName, string templateSpecName, TemplateSpec templateSpec) - { - return operations.CreateOrUpdateAsync(resourceGroupName, templateSpecName, templateSpec).GetAwaiter().GetResult(); - } - - /// - /// Creates or updates a Template Spec. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of the Template Spec. - /// - /// - /// Template Spec supplied to the operation. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateAsync(this ITemplateSpecsOperations operations, string resourceGroupName, string templateSpecName, TemplateSpec templateSpec, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, templateSpecName, templateSpec, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Updates Template Spec tags with specified values. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of the Template Spec. - /// - /// - /// Template Spec resource with the tags to be updated. - /// - public static TemplateSpec Update(this ITemplateSpecsOperations operations, string resourceGroupName, string templateSpecName, TemplateSpecUpdateModel templateSpec = default(TemplateSpecUpdateModel)) - { - return operations.UpdateAsync(resourceGroupName, templateSpecName, templateSpec).GetAwaiter().GetResult(); - } - - /// - /// Updates Template Spec tags with specified values. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of the Template Spec. - /// - /// - /// Template Spec resource with the tags to be updated. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateAsync(this ITemplateSpecsOperations operations, string resourceGroupName, string templateSpecName, TemplateSpecUpdateModel templateSpec = default(TemplateSpecUpdateModel), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, templateSpecName, templateSpec, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a Template Spec with a given name. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of the Template Spec. - /// - /// - /// Allows for expansion of additional Template Spec details in the response. - /// Optional. Possible values include: 'versions' - /// - public static TemplateSpec Get(this ITemplateSpecsOperations operations, string resourceGroupName, string templateSpecName, string expand = default(string)) - { - return operations.GetAsync(resourceGroupName, templateSpecName, expand).GetAwaiter().GetResult(); - } - - /// - /// Gets a Template Spec with a given name. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of the Template Spec. - /// - /// - /// Allows for expansion of additional Template Spec details in the response. - /// Optional. Possible values include: 'versions' - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this ITemplateSpecsOperations operations, string resourceGroupName, string templateSpecName, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, templateSpecName, expand, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a Template Spec by name. When operation completes, status code 200 - /// returned without content. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of the Template Spec. - /// - public static void Delete(this ITemplateSpecsOperations operations, string resourceGroupName, string templateSpecName) - { - operations.DeleteAsync(resourceGroupName, templateSpecName).GetAwaiter().GetResult(); - } - - /// - /// Deletes a Template Spec by name. When operation completes, status code 200 - /// returned without content. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of the Template Spec. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this ITemplateSpecsOperations operations, string resourceGroupName, string templateSpecName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, templateSpecName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Lists all the Template Specs within the specified subscriptions. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Allows for expansion of additional Template Spec details in the response. - /// Optional. Possible values include: 'versions' - /// - public static IPage ListBySubscription(this ITemplateSpecsOperations operations, string expand = default(string)) - { - return operations.ListBySubscriptionAsync(expand).GetAwaiter().GetResult(); - } - - /// - /// Lists all the Template Specs within the specified subscriptions. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Allows for expansion of additional Template Spec details in the response. - /// Optional. Possible values include: 'versions' - /// - /// - /// The cancellation token. - /// - public static async Task> ListBySubscriptionAsync(this ITemplateSpecsOperations operations, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(expand, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Lists all the Template Specs within the specified resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Allows for expansion of additional Template Spec details in the response. - /// Optional. Possible values include: 'versions' - /// - public static IPage ListByResourceGroup(this ITemplateSpecsOperations operations, string resourceGroupName, string expand = default(string)) - { - return operations.ListByResourceGroupAsync(resourceGroupName, expand).GetAwaiter().GetResult(); - } - - /// - /// Lists all the Template Specs within the specified resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Allows for expansion of additional Template Spec details in the response. - /// Optional. Possible values include: 'versions' - /// - /// - /// The cancellation token. - /// - public static async Task> ListByResourceGroupAsync(this ITemplateSpecsOperations operations, string resourceGroupName, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, expand, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Lists all the Template Specs within the specified subscriptions. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListBySubscriptionNext(this ITemplateSpecsOperations operations, string nextPageLink) - { - return operations.ListBySubscriptionNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Lists all the Template Specs within the specified subscriptions. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListBySubscriptionNextAsync(this ITemplateSpecsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListBySubscriptionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Lists all the Template Specs within the specified resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListByResourceGroupNext(this ITemplateSpecsOperations operations, string nextPageLink) - { - return operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Lists all the Template Specs within the specified resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByResourceGroupNextAsync(this ITemplateSpecsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/src/Resources/Resources.Sdk/Generated/TenantsOperationsExtensions.cs b/src/Resources/Resources.Sdk/Generated/TenantsOperationsExtensions.cs deleted file mode 100644 index 43a761b0fd2e..000000000000 --- a/src/Resources/Resources.Sdk/Generated/TenantsOperationsExtensions.cs +++ /dev/null @@ -1,87 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Resources -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for TenantsOperations. - /// - public static partial class TenantsOperationsExtensions - { - /// - /// Gets the tenants for your account. - /// - /// - /// The operations group for this extension method. - /// - public static IPage List(this ITenantsOperations operations) - { - return operations.ListAsync().GetAwaiter().GetResult(); - } - - /// - /// Gets the tenants for your account. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this ITenantsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the tenants for your account. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this ITenantsOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets the tenants for your account. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this ITenantsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/src/Resources/Resources.Test/Resources.Test.csproj b/src/Resources/Resources.Test/Resources.Test.csproj index ac0b72538c10..c0604e708013 100644 --- a/src/Resources/Resources.Test/Resources.Test.csproj +++ b/src/Resources/Resources.Test/Resources.Test.csproj @@ -27,7 +27,7 @@ - + diff --git a/src/Resources/Resources.sln b/src/Resources/Resources.sln index af23bd0bade2..f6cdea4dbd5b 100644 --- a/src/Resources/Resources.sln +++ b/src/Resources/Resources.sln @@ -47,7 +47,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.MSGraph", "MSGraph.Autor EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceManager", "ResourceManager\ResourceManager.csproj", "{F25C740F-1FC7-4536-A597-837DF0C611A8}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Resources.Sdk", "Resources.Sdk\Resources.Sdk.csproj", "{06D245AC-A806-40CB-AD44-459AA3F90E21}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Resources.Management.Sdk", "Resources.Management.Sdk\Resources.Management.Sdk.csproj", "{06D245AC-A806-40CB-AD44-459AA3F90E21}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Resources.Test", "Resources.Test\Resources.Test.csproj", "{79B1C27E-AB8F-458C-B872-A5DC5041BE08}" EndProject diff --git a/src/Resources/Tags/Tags.csproj b/src/Resources/Tags/Tags.csproj index 540132d8262a..e3dd8d64850b 100644 --- a/src/Resources/Tags/Tags.csproj +++ b/src/Resources/Tags/Tags.csproj @@ -12,7 +12,7 @@ - + diff --git a/tools/StaticAnalysis/GeneratedSdkAnalyzer/SDKGeneratedCodeVerify.ps1 b/tools/StaticAnalysis/GeneratedSdkAnalyzer/SDKGeneratedCodeVerify.ps1 index ba5050299369..501dd72d7f80 100644 --- a/tools/StaticAnalysis/GeneratedSdkAnalyzer/SDKGeneratedCodeVerify.ps1 +++ b/tools/StaticAnalysis/GeneratedSdkAnalyzer/SDKGeneratedCodeVerify.ps1 @@ -86,6 +86,13 @@ try { Write-Host "Preparing Autorest..." npx autorest --reset foreach ($_ in $ChangedSdks) { + # If it is Resources.Management.Sdk, flag and will use tag for sdk generation + $IsResources = $false; + if ($_ -match "Resources.Management.Sdk") + { + $IsResources = $true; + } + # Extract Module Name $ModuleName = "Az." + ($_ -split "\/|\\")[1] @@ -107,7 +114,22 @@ try { if ([regex]::Matches($readMeContent, '\s*powershell\s*:\s*true\s*') -and [regex]::Matches($readMeContent, '\s*isSdkGenerator\s*:\s*true\s*')) { Write-Host "Using autorest powershell v4:`nRe-generating SDK under Generated folder for $ModuleName..." - npx autorest + if ($IsResources) + { + Write-Host "Specific generation for Resources.Management.Sdk" + rm -r Generated/* + npx autorest --use:@autorest/powershell@4.x --tag=package-privatelinks-2020-05 + npx autorest --use:@autorest/powershell@4.x --tag=package-subscriptions-2021-01 + npx autorest --use:@autorest/powershell@4.x --tag=package-features-2021-07 + npx autorest --use:@autorest/powershell@4.x --tag=package-deploymentscripts-2020-10 + npx autorest --use:@autorest/powershell@4.x --tag=package-resources-2021-04 + npx autorest --use:@autorest/powershell@4.x --tag=package-deploymentstacks-2022-08-preview + npx autorest --use:@autorest/powershell@4.x --tag=package-templatespecs-2021-05 + } + else + { + npx autorest + } } elseif ([regex]::Matches($readMeContent, '\s*csharp\s*:\s*true\s*')) {